Skip to content

Commit

Permalink
V1.3.0
Browse files Browse the repository at this point in the history
新增:任务中心应用
新增:后台支持设置分类的显示/隐藏
新增:店铺分享图和描述可自定义
优化:后台基础设置页面样式优化
优化:个人中心的联系方式修改后实时生效
优化:添加直播商品无需输入ID,可选择商品
修复:素材管理无法上传本地视频问题
修复:手机端直播列表商品图片的显示问题
修复:公众号商城支付无效问题
  • Loading branch information
wj005 committed Jul 14, 2021
1 parent f905454 commit 4f11aa7
Show file tree
Hide file tree
Showing 260 changed files with 8,787 additions and 2,045 deletions.
6 changes: 3 additions & 3 deletions Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Event extends BasicEvent
public $pay_order_sn = null; //支付订单编号
public $pay_uid = null; //支付用户
public $refunded = [
"order_sn" => null,
"order_goods_id" => null,
"return_number" => null,
"order_sn" => null,
"order_goods_id" => null,
"return_number" => null,
]; //退款事件信息
public $sms = [
'type' => '',
Expand Down
18 changes: 9 additions & 9 deletions api/CrontabController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public function actions()
public function actionCreate()
{
$behavior = \Yii::$app->request->get('behavior');
$name = \Yii::$app->request->post('name');
$name = \Yii::$app->request->post('name');
$name && \Yii::$app->crontab->getCrontab($name);
$setting = Setting::findOne(['AppID' => \Yii::$app->params['AppID'], 'merchant_id' => 1, 'keyword' => 'crontab_access_token']);
if (!$setting || $behavior == 'reset') {
$accessToken = $this->generateAccessToken($setting);
} else {
$accessToken = $setting['content'];
}
$url = \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl .'/index.php?q=api/leadmall/crontab&access_token=' . $accessToken . '&appid=' . \Yii::$app->params['AppID'];
$url = \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl . '/index.php?q=api/leadmall/crontab&access_token=' . $accessToken . '&appid=' . \Yii::$app->params['AppID'];
if ($name) {
return $url . '&name=' . $name;
}
Expand All @@ -43,11 +43,11 @@ private function generateAccessToken($setting)
if (!$setting) {
$setting = new Setting();
}
$accessToken = \Yii::$app->security->generateRandomString(16);
$setting->AppID = \Yii::$app->params['AppID'];
$accessToken = \Yii::$app->security->generateRandomString(16);
$setting->AppID = \Yii::$app->params['AppID'];
$setting->merchant_id = 1;
$setting->keyword = 'crontab_access_token';
$setting->content = $accessToken;
$setting->keyword = 'crontab_access_token';
$setting->content = $accessToken;
if (!$setting->save()) {
Error($setting->getErrorMsg());
}
Expand All @@ -67,7 +67,7 @@ public function actionIndex()

private function checkAccessToken()
{
$appid = \Yii::$app->request->get('appid');
$appid = \Yii::$app->request->get('appid');
if (!$appid) {
Error('店铺AppID不存在');
}
Expand All @@ -76,7 +76,7 @@ private function checkAccessToken()
Error('店铺不存在');
}
\Yii::$app->params = json_decode(file_get_contents($file), true);
$accessToken = \Yii::$app->request->get('access_token');
$accessToken = \Yii::$app->request->get('access_token');
if (!$accessToken) {
Error('定时任务access_token不存在');
}
Expand All @@ -89,4 +89,4 @@ private function checkAccessToken()
}

}
}
}
86 changes: 81 additions & 5 deletions api/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,89 @@
class DemoController extends BasicsModules implements Map
{

/**
* 处理数据分页问题
* @return [type] [description]
*/
public function actionIndex()
{
return 1111;
// $event = array('sms' => []);

// $event = json_decode(json_encode($event));

// $event->sms = array(
// 'type' => 'score_due',
// 'mobile' => ['18957301032'],
// 'params' => [
// 'code' => '111',
// ],
// 'template_id' => 'SMS_215333695',
// );
// P($event);
// $res = (new smsController($this->id, $this->module))->sendSms($event);
// P($res);
//exit();
// return $this->plugins("task", "config.integral_return");
// return $this->plugins("task", ["scoreadd", [-2, 94, 0, 'del', '后台手动扣减']]);

// $order_sn = "osn628884227247724";

// $M = '\order\models\Order';
// $model = $M::find()->where(['order_sn' => $order_sn])->one();
// //判断插件已经安装,则执行
// if ($this->plugins("task", "status")) {
// //判断是否积分订单
// if ($model->total_score > 0) {
// //执行下单操作减积分操作
// $this->plugins("task", ["order", [
// $model->total_score,
// $model->UID,
// $order_sn,
// "order",
// ]]);
// }
// P(123);
// //执行下单操作
// $this->plugins("task", ["score", [
// "goods",
// $model->total_amount,
// $model->UID,

// ]]);
// P(345);
// //执行下单操作
// $this->plugins("task", ["score", [
// "order",
// $model->total_amount,
// $model->UID,
// ]]);
// P(456);
// }
// osn713704239689910

//执行下单操作
$this->plugins("task", ["score", ["goods", 0.03, 4, 'osn713704239689910']]);
P2("完成");

//执行下单操作
// $this->plugins("task", ["score", ["signin", 1, 4]]);
// P2("完成");

// //执行下单操作
// $this->plugins("task", ["score", ["perfect", 4, 4]]);
// P2("完成");

// //执行下单操作
// $this->plugins("task", ["score", ["browse", time(), 4]]);
// P2("完成");

// //执行下单操作
// $this->plugins("task", ["score", ["share", 1, 4]]);
// P2("完成");
// exit();
//执行下单操作
// $this->plugins("task", ["score", ["order", 1, 45, "SSSSSS"]]);
// P2("完成");
// exit();
// $this->plugins("task", ["score", ["invite", time(), 4]]);
// P2("完成");
exit();
}

}
Loading

0 comments on commit 4f11aa7

Please sign in to comment.