Browse Source

fix:配置增加跳转小程序的

super-yimizi 2 months ago
parent
commit
91510cc872
2 changed files with 26 additions and 8 deletions
  1. 19 6
      addons/shop/config.php
  2. 7 2
      application/api/controller/Common.php

+ 19 - 6
addons/shop/config.php

@@ -54,7 +54,7 @@ return [
         'title' => 'ICP备案号',
         'title' => 'ICP备案号',
         'type' => 'string',
         'type' => 'string',
         'content' => [],
         'content' => [],
-        'value' => '',
+        'value' => 'ICP备案号',
         'rule' => '',
         'rule' => '',
         'msg' => '',
         'msg' => '',
         'tip' => '',
         'tip' => '',
@@ -66,7 +66,7 @@ return [
         'title' => '公安备案号',
         'title' => '公安备案号',
         'type' => 'string',
         'type' => 'string',
         'content' => [],
         'content' => [],
-        'value' => '',
+        'value' => '公安备案号',
         'rule' => '',
         'rule' => '',
         'msg' => '',
         'msg' => '',
         'tip' => '',
         'tip' => '',
@@ -327,6 +327,7 @@ return [
         'content' => [
         'content' => [
             'wechat' => '微信支付',
             'wechat' => '微信支付',
             'alipay' => '支付宝支付',
             'alipay' => '支付宝支付',
+            'balance' => '余额支付',
         ],
         ],
         'value' => 'wechat,alipay',
         'value' => 'wechat,alipay',
         'rule' => 'required',
         'rule' => 'required',
@@ -778,7 +779,7 @@ return [
         'title' => '微信小程序AppID',
         'title' => '微信小程序AppID',
         'type' => 'string',
         'type' => 'string',
         'content' => [],
         'content' => [],
-        'value' => '',
+        'value' => 'wx84a6c614d68ee3c5',
         'rule' => '',
         'rule' => '',
         'msg' => '',
         'msg' => '',
         'tip' => '微信小程序的app_id',
         'tip' => '微信小程序的app_id',
@@ -790,7 +791,7 @@ return [
         'title' => '微信小程序AppSecret',
         'title' => '微信小程序AppSecret',
         'type' => 'string',
         'type' => 'string',
         'content' => [],
         'content' => [],
-        'value' => '',
+        'value' => '207517012a3a0ea95aa142401fe16b59',
         'rule' => '',
         'rule' => '',
         'msg' => '',
         'msg' => '',
         'tip' => '微信小程序的app_secret',
         'tip' => '微信小程序的app_secret',
@@ -846,6 +847,18 @@ return [
         'extend' => '',
         'extend' => '',
     ],
     ],
     [
     [
+        'name' => 'wx_universal_link',
+        'title' => 'IOSAPP微信授权登录地址',
+        'type' => 'string',
+        'content' => [],
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => 'IOSAPP授权登录需要的地址',
+        'ok' => '',
+        'extend' => '',
+    ],
+    [
         'name' => 'logintypelist',
         'name' => 'logintypelist',
         'title' => '登录类型列表',
         'title' => '登录类型列表',
         'type' => 'checkbox',
         'type' => 'checkbox',
@@ -853,9 +866,9 @@ return [
             'account' => '账号密码登录',
             'account' => '账号密码登录',
             'mobile' => '手机号登录',
             'mobile' => '手机号登录',
             'wechat' => '微信授权登录',
             'wechat' => '微信授权登录',
-            'wechatmobile' => '微信手机授权登录',
+            'wechatMobile' => '微信手机授权登录',
         ],
         ],
-        'value' => 'account,mobile,wechat,wechatmobile',
+        'value' => 'account,mobile,wechat,wechatMobile',
         'rule' => '',
         'rule' => '',
         'msg' => '',
         'msg' => '',
         'tip' => '',
         'tip' => '',

+ 7 - 2
application/api/controller/Common.php

@@ -121,7 +121,7 @@ class Common extends Api
             'upload'         => $upload,
             'upload'         => $upload,
             //登录类型列表
             //登录类型列表
             'logintypearr'   => $logintypearr,
             'logintypearr'   => $logintypearr,
-            'paytypelist'    => implode(',', $logintypearr),
+            'paytypelist'    => $paytypearr,
             'defaultpaytype' => $defaultPaytype,
             'defaultpaytype' => $defaultPaytype,
             '__token__'      => $this->request->token()
             '__token__'      => $this->request->token()
         ];
         ];
@@ -157,7 +157,12 @@ class Common extends Api
         $config['default_category_img'] = cdnurl(Config::get('shop.default_category_img'), true);
         $config['default_category_img'] = cdnurl(Config::get('shop.default_category_img'), true);
         // 热门搜索关键词
         // 热门搜索关键词
         $config['hot_keyword'] = SearchLog::order('nums desc')->limit(10)->column('keywords');
         $config['hot_keyword'] = SearchLog::order('nums desc')->limit(10)->column('keywords');
-
+        // 微信授权登录地址
+        $config['wx_universal_link'] = Config::get('shop.wx_universal_link');
+        // 微信appid
+        $config['wx_appid'] = Config::get('shop.wx_appid');
+        //  微信小程序跳转
+        //$config['wechat_min_program'] = ;
 
 
         // $config['navigate'] = Navigation::tableList();
         // $config['navigate'] = Navigation::tableList();
         // $config['brands'] = \addons\shop\model\Brand::field('id,name')->order('weigh desc')->select();
         // $config['brands'] = \addons\shop\model\Brand::field('id,name')->order('weigh desc')->select();