Auth::class, ] ]; return ArrayHelper::merge($merge, parent::behaviors()); } /** * 初始化操作 */ public function init() { parent::init(); $this->store_id = get_params('store_id', 1); $this->platform = input_params('platform', 'wechat'); $this->is_platform = input_params('is_platform', 'no'); if ($this->platform != 'alipay') { $this->initWX(); if ($this->wechat_config) { $this->initWXPay(); } } // 抖音小程序 if ($this->platform == 'bytedance') { $this->initBytedance(); } } public function initWX() { // TODO: 小程序为例 // 获取微信配置进行初始化 $_form = input_params('_form', 'mini'); $type = 1; if ($_form == 'h5') { $type = 2; $this->client_type = 2; } if ($_form == 'app') { $this->client_type = 3; $type = 3; } // 是否为单店铺 if (is_single_store()) { $appid = Option::get('one_store_wechat_appid', 0, 'saas', '')['value']; $secret = Option::get('one_store_wechat_secret', 0, 'saas', '')['value']; $config = [ 'app_id' => $appid, 'secret' => $secret, 'response_type' => 'array' ]; $this->wechat = Factory::miniProgram($config); } else { if(\app\modules\admin\models\WastoreForm::$test && get_mini_id() == 88){ $config =[]; $config['app_id'] = 'wx1ce41243db1e4373'; $config['secret'] = '6563aceb2ef97e0d2f5b884f11e43544'; $config['response_type'] = 'array'; $this->wechat = Factory::miniProgram($config); $mini_id = 88; return $this->wechat; } $this->wechat_config = WechatConfig::findOne(['store_id' => get_store_id(), 'type' => $type]); if ($this->wechat_config) { $config = [ 'app_id' => $this->wechat_config->app_id, 'secret' => $this->wechat_config->app_secret, 'response_type' => 'array' ]; if ($type == 2) { // 公众号 $this->wechat = Factory::officialAccount($config); } else { // 小程序 $this->wechat = Factory::miniProgram($config); } } } } /** * Undocumented function * * @Author LGL 24963@qq.com * @DateTime 2021-02-03 * @desc: 实例化支付类 * @return void */ protected function initWXPay () { // 证书 if (!is_dir(\Yii::$app->runtimePath . '/pem')) { mkdir(\Yii::$app->runtimePath . '/pem'); file_put_contents(\Yii::$app->runtimePath . '/pem/index.html', ''); } $cert_pem_file = null; if ($this->wechat_config->cert_pem) { $cert_pem_file = \Yii::$app->runtimePath . '/pem/' . md5($this->wechat_config->cert_pem); if (!file_exists($cert_pem_file)) { file_put_contents($cert_pem_file, $this->wechat_config->cert_pem); } } $key_pem_file = null; if ($this->wechat_config->key_pem) { $key_pem_file = \Yii::$app->runtimePath . '/pem/' . md5($this->wechat_config->key_pem); if (!file_exists($key_pem_file)) { file_put_contents($key_pem_file, $this->wechat_config->key_pem); } } $config = [ 'app_id' => $this->wechat_config->app_id, 'secret' => $this->wechat_config->app_secret, 'key' => $this->wechat_config->pay_key, 'mch_id' => $this->wechat_config->mch_id, 'cert_path' => $cert_pem_file, 'key_path' => $key_pem_file, 'response_type' => 'array' ]; $this->wechatPay = Factory::payment($config); $this->wechatMini = Factory::miniProgram($config); // return Factory::payment($config); } /** * 支付宝初始化操作 */ public function initAlipay() { $config_cache = \Yii::$app->cache->get('alipay_config_cache_' . get_store_id()); if ($config_cache) { $this->alipay_config = Json::decode($config_cache); } else { $this->alipay_config = Json::decode(Option::get(Option::OPTOPN_KEY, get_store_id(), 'alipay')['value']); } $config = [ 'app_id' => $this->alipay_config['app_id'] ?? '', 'notify_url' => 'www.baidu.com', 'return_url' => '', 'ali_public_key' => $this->alipay_config['alipay_public_key'] ?? '', 'private_key' => preg_replace('# #', '', $this->alipay_config['app_private_key'] ?? ''), // 'log' => [ // optional // 'file' => '~/var/logs/alipay.log', // 'level' => 'info', // 建议生产环境等级调整为 info,开发环境为 debug // 'type' => 'single', // optional, 可选 daily. // 'max_file' => 30, // optional, 当 type 为 daily 时有效,默认 30 天 // ], 'http' => [ 'timeout' => 5.0, 'connect_timeout' => 5.0, ], // 'mode' => 'dev', // optional,设置此参数,将进入沙箱模式 ]; $this->aliPay = Pay::alipay($config); } // 抖音初始化操作 public function initBytedance() { $config = [ 'app_id' => '', 'app_secret' => '', 'response_type' => 'array' ]; if ($this->is_platform == self::IS_PLATFORM_NOT) { $bytedance_config = Option::get('douyin', $this->store_id, 'store'); if (!empty($bytedance_config['value'])) { $bytedance_config = Json::decode($bytedance_config['value']); $config['app_id'] = $bytedance_config['app_id']; $config['app_secret'] = $bytedance_config['app_secret']; } } else { $bytedance_config = Option::getSaasPlatformBytedance(); $config['app_id'] = $bytedance_config['appid']; $config['app_secret'] = $bytedance_config['key']; } if (!empty($config['app_id']) && !empty($config['app_secret'])) { $this->byteDance = \ByteDance\Factory::miniProgram($config); } } public function asJson($data, $is_custom_name = 0) { // var_dump(self::isJson(0));die; // $testJson = '{"code":0,"msg":"加载成功","data":{"list":[{"id":"375","store_id":"1","name":"system","template":"{\"page_name\":\"\\u6211\\u7684\",\"is_index\":\"0\",\"page_type\":1,\"page_link\":\"\",\"theme\":{\"color\":\"\"},\"pageCss\":{\"margin\":0,\"padding\":0,\"vSpave\":0,\"hSpace\":0,\"borderRadius\":0,\"borderRaNum\":0,\"backgroundColor\":\"#f2f2f2\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"templates\":[{\"name\":\"\\u5934\\u90e8\\u5bfc\\u822a\",\"type\":\"pageHeader\",\"comName\":\"pageHeader\",\"controlComName\":\"pageHeaderControl\",\"moduleCss\":{\"backgroundColor\":\"\",\"backgroundImage\":\"url(https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-23\\/8212b4f5b2eebc593e503ada46a1336452129b0b.png)\",\"bgImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-23\\/8212b4f5b2eebc593e503ada46a1336452129b0b.png\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"params\":{\"text\":\"\\u9875\\u9762\\u6807\\u9898\",\"showText\":0,\"capsuleType\":\"2\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"18\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"bold\",\"textDecoration\":\"inherit\",\"textAlign\":\"center\"}}},{\"name\":\"\\u6211\\u7684\\u9875\\u9762-\\u4f1a\\u5458\\u6a21\\u5757\",\"type\":\"\",\"comName\":\"userMember\",\"icon\":\"\",\"controlComName\":\"userMemberControl\",\"moduleCss\":{\"backgroundColor\":\"\",\"backgroundImage\":\"url(https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-23\\/2e97892d4896b8cdbc17097521b6d763d0e3d8d8.png)\",\"bgImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-23\\/2e97892d4896b8cdbc17097521b6d763d0e3d8d8.png\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":0,\"borderRadius\":0},\"params\":{\"styleType\":\"2\",\"fontColor\":\"#fffafa\",\"memberAdImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-23\\/fe6cbd7ea663aa37e2ff49a19704016d74649362.png\",\"showModule\":false,\"beforeBuyText\":\"\\u5f00\\u901aSuper\\u4f1a\\u5458\\uff0c\\u98867\\u5f2020\\u5143\\u65e0\\u95e8\\u69db\\u6d25\\u8d34\",\"afterBuyText\":\"\",\"memberCardCss\":{\"backgroundColor\":\"#303478\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"padding\":10,\"borderRadius\":10},\"memberCardLink\":[],\"memberTabGroup\":[{\"title\":\"\\u4f1a\\u5458\\u4e13\\u4eab\",\"subtitle\":\"\\u597d\\u7269\\u6298\\u6263\\u4ef7\",\"link\":[],\"picImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/5ea9e3e86ac57f16f40f178bab3e7a1975833997.png\",\"titleColor\":\"#262626\",\"subtitleColor\":\"#B4853F\",\"controlComName\":\"userMemberTabItemControl\"},{\"title\":\"Super\\u4f1a\\u5458\",\"subtitle\":\"\\u989d\\u5916\\u8fd4\\u4f18\\u60e0\",\"link\":[],\"picImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/5dbcb1077bb59db13386f9b547da98ea0a59c4ce.png\",\"titleColor\":\"#262626\",\"subtitleColor\":\"#B4853F\",\"controlComName\":\"userMemberTabItemControl\"},{\"title\":\"\\u90012\\u5e74Super\",\"subtitle\":\"\\u9886200\\u5143\\u652f\\u4ed8\\u5238\",\"link\":[],\"picImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/0664e1c403a5e8cbf39661f420b25f32c1cfe00a.png\",\"titleColor\":\"#262626\",\"subtitleColor\":\"#B4853F\",\"controlComName\":\"userMemberTabItemControl\"}],\"memberTabNum\":3,\"memberTabCss\":{\"backgroundColor\":\"#FDEDCF\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"padding\":9,\"borderRadius\":10},\"showMember\":false,\"showMemberCode\":true}},{\"name\":\"\\u6211\\u7684\\u9875\\u9762-\\u6211\\u7684\\u8ba2\\u5355\",\"type\":\"\",\"comName\":\"userOrder\",\"icon\":\"\",\"controlComName\":\"userOrderControl\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":10,\"borderRadius\":10},\"params\":{\"moduleName\":\"\\u6211\\u7684\\u8ba2\\u5355\",\"showText\":1,\"moduleNameCss\":{\"color\":\"#262626\",\"fontNum\":\"14\",\"fontSize\":\"14px\",\"fontStyle\":\"normal\",\"fontWeight\":\"bold\",\"textDecoration\":\"inherit\"},\"moduleMoreCss\":{\"color\":\"#888888\",\"fontNum\":\"12\",\"fontSize\":\"12px\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"},\"fontColor\":\"#414141\",\"tabsList\":[{\"tabImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/8e6630802514bea7480079a7b5bd5490b65307c9.png\",\"tabText\":\"\\u5f85\\u4ed8\\u6b3e\",\"link\":[],\"controlComName\":\"userOrderTabItemControl\"},{\"tabImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/2305cab5806a042a2768d22e8f0720b7df36db90.png\",\"tabText\":\"\\u5f85\\u53d1\\u8d27\",\"link\":[],\"controlComName\":\"userOrderTabItemControl\"},{\"tabImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/a1d3f824ff9c4311bb5c41ea47816bbb6b648dac.png\",\"tabText\":\"\\u5f85\\u6536\\u8d27\",\"link\":[],\"controlComName\":\"userOrderTabItemControl\"},{\"tabImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/a0eee0c78a4040b04343466635d17cd0f62505fa.png\",\"tabText\":\"\\u5df2\\u5b8c\\u6210\",\"link\":[],\"controlComName\":\"userOrderTabItemControl\"},{\"tabImg\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-25\\/ad8aaca1a0214adca4a238770e87a5a5575579f6.png\",\"tabText\":\"\\u9000\\u6362\\u552e\\u540e\",\"link\":[],\"controlComName\":\"userOrderTabItemControl\"}]}},{\"name\":\"\\u6211\\u7684\\u94b1\\u5305\",\"type\":\"\",\"comName\":\"userWallet\",\"icon\":\"\",\"controlComName\":\"userWalletControl\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":10,\"borderRadius\":10},\"params\":{\"showModule\":true,\"text\":\"\\u6211\\u7684\\u94b1\\u5305\",\"useTitle\":1,\"showStyle\":\"1\",\"moduleNameCss\":{\"color\":\"#262626\",\"fontNum\":\"14\",\"fontSize\":\"14px\",\"fontStyle\":\"normal\",\"fontWeight\":\"bold\",\"textDecoration\":\"inherit\"},\"moduleMoreCss\":{\"color\":\"#888888\",\"fontNum\":\"12\",\"fontSize\":\"12px\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"},\"list\":[{\"name\":\"\\u79ef\\u5206\",\"subName\":\"\\u79ef\\u5206\\u6362\\u597d\\u7269\",\"controlComName\":\"walletItemControl\",\"color\":\"#262626\",\"subColor\":\"#bbbbbb\"},{\"name\":\"\\u4f18\\u60e0\\u5238\",\"subName\":\"\\u4e0b\\u5355\\u7acb\\u7701\",\"controlComName\":\"walletItemControl\",\"color\":\"#262626\",\"subColor\":\"#bbbbbb\"},{\"name\":\"\\u4f59\\u989d\",\"subName\":\"\\u968f\\u65f6\\u63d0\\u73b0\",\"controlComName\":\"walletItemControl\",\"color\":\"#262626\",\"subColor\":\"#bbbbbb\"},{\"name\":\"\\u7ea2\\u5305\\u8865\\u8d34\",\"subName\":\"\\u79d2\\u5230\\u8d26\",\"controlComName\":\"walletItemControl\",\"color\":\"#262626\",\"subColor\":\"#bbbbbb\"}]},\"showModule\":true},{\"name\":\"\\u5de5\\u5177\\u4e0e\\u670d\\u52a1\",\"type\":\"\",\"comName\":\"userTools\",\"icon\":\"\",\"controlComName\":\"userToolsControl\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":10,\"borderRadius\":10},\"params\":{\"showModule\":true,\"text\":\"\\u5de5\\u5177\\u4e0e\\u670d\\u52a1\",\"useTitle\":1,\"showStyle\":\"1\",\"list\":[{\"name\":\"\\u5f53\\u9762\\u4ed8\",\"link\":{\"name\":\"\\u5f53\\u9762\\u4ed8\",\"link\":\"\\/face-pay\\/face-pay\\/payOut\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-11-03\\/94053d9ae7dc802a88a054567652b7c5a29d305d.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#242427\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u626b\\u7801\\u6838\\u9500\",\"link\":{\"name\":\"\\u6838\\u9500\",\"link\":\"clerk\",\"open_type\":\"clerk\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/f24dbddc75257c97db8de177fe9aa3b254843242.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#242427\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u6838\\u9500\\u5361\",\"link\":{\"name\":\"\\u6211\\u7684\\u6838\\u9500\\u5361\",\"link\":\"\\/user\\/write_off_card\\/write_off_card\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/9b4e332a77d0eef15c24e8e09f3125a693db6d8a.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u5361\\u5238\",\"link\":{\"name\":\"\\u6211\\u7684\\u6838\\u9500\\u5361\",\"link\":\"\\/user\\/write_off_card\\/write_off_card\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/524ee54c809c675d840da367b97931b2b96bd405.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u6211\\u7684\\u4f18\\u60e0\\u5238\",\"link\":{\"name\":\"\\u6211\\u7684\\u4f18\\u60e0\\u5238\",\"link\":\"\\/user\\/my_coupon\\/my_coupon\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/bbe2dc261d4e6669ec6355811df58c216a0fdfaf.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u5206\\u9500\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u5206\\u9500\\u4e2d\\u5fc3\",\"link\":\"\\/user\\/share\\/index\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/1f3a5f5664cd5f0843ab2d4092bd0f2aa1259744.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#242427\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u80a1\\u4e1c\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u80a1\\u4e1c\\u4e2d\\u5fc3\",\"link\":\"\\/shareholder\\/shareholder\\/index\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/971dabac43a7725a2cf7b42c3cc3f9989f3edf73.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u80a1\\u4e1c\",\"link\":{\"name\":\"\\u7533\\u8bf7\\u80a1\\u4e1c\",\"link\":\"\\/shareholder\\/apply\\/apply\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/a13a2a1fddb0c2b776563780f3f2d04b0921ae7c.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u95e8\\u5e97\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u95e8\\u5e97\\u4e2d\\u5fc3\",\"link\":\"\\/md_admin\\/md-center\\/md\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/36dc2b4da21efa42ae420ed30bd9414ddbd493c3.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u540e\\u53f0\\u7ba1\\u7406\",\"link\":{\"name\":\"\\u540e\\u53f0\\u7ba1\\u7406\",\"link\":\"\\/admin\\/home\\/home\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-06\\/e1b8f7f286046d1ce179d04301c4920416676c20.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u9886\\u52b5\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u9886\\u5238\\u4e2d\\u5fc3\",\"link\":\"\\/pages\\/coupon_center\\/coupon_center\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/235a6f0810d35f2ab83a7110fba73afa819d3361.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u6296\\u54c1\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u6296\\u54c1\\u4e2d\\u5fc3\",\"link\":\"\\/videoGoods\\/userInfo\\/index\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/f8a5d2a3684a7eb791e24cd821e859354a7f568f.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u6296\\u54c1\",\"link\":{\"name\":\"\\u6296\\u54c1\\u5217\\u8868\",\"link\":\"\\/videoGoods\\/list\\/index\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/3998f78786464742b30e3c63224b21beadda3498.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u6296\\u54c1\\u5217\\u8868\",\"link\":{\"name\":\"\\u6296\\u54c1\\u5217\\u8868\",\"link\":\"\\/videoGoods\\/list\\/index\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/7190fda51c73fa3fca5e6e17c23f26a150ae94f4.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u8054\\u7cfb\\u6211\\u4eec\",\"link\":{\"name\":\"\\u4e00\\u952e\\u62e8\\u53f7\",\"link\":\"tel?tel=18567654210\",\"open_type\":\"tel\",\"params\":[{\"key\":\"tel\",\"value\":\"18567654210\",\"desc\":\"\\u8bf7\\u586b\\u5199\\u8054\\u7cfb\\u7535\\u8bdd\"}]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-11-03\\/fdcfc884fa56cb8ff83baa0cec127320688c84ab.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u9ed8\\u8ba4\",\"link\":{\"name\":\"\\u6211\\u7684\\u4f18\\u60e0\\u5238\",\"link\":\"\\/user\\/my_coupon\\/my_coupon\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/235a6f0810d35f2ab83a7110fba73afa819d3361.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}},{\"name\":\"\\u5458\\u5de5\\u4e2d\\u5fc3\",\"link\":{\"name\":\"\\u95e8\\u5e97\\u5458\\u5de5\\u4e2d\\u5fc3\",\"link\":\"\\/md_admin\\/staff-center\\/staff\",\"open_type\":\"navigate\",\"params\":[]},\"iconUrl\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2022-12-09\\/f24dbddc75257c97db8de177fe9aa3b254843242.png\",\"controlComName\":\"userToolControl\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"12\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"}}]},\"showModule\":true},{\"name\":\"\\u4e3a\\u60a8\\u63a8\\u8350\",\"type\":\"\",\"comName\":\"userRecommend\",\"icon\":\"\",\"controlComName\":\"userRecommendControl\",\"moduleCss\":{\"backgroundColor\":\"#000000\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":10,\"borderRadius\":0},\"params\":{\"showModule\":false,\"count\":10}}],\"controlComName\":\"pageControl\",\"id\":\"375\",\"system_type\":\"my\"}","is_delete":"0","addtime":"1691394895","is_index":"0","type":"1"},{"id":"394","store_id":"1","name":"system","template":"{\"page_name\":\"\\u8d2d\\u7269\\u8f66\",\"is_index\":\"0\",\"page_type\":1,\"system_type\":\"cart\",\"page_link\":\"\",\"theme\":{\"color\":\"#3285FC\",\"time\":1648806790683},\"pageCss\":{\"margin\":0,\"padding\":0,\"vSpave\":0,\"hSpace\":0,\"borderRadius\":0,\"borderRaNum\":0,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"templates\":[{\"name\":\"\\u8d2d\\u7269\\u8f66\",\"type\":\"\",\"comName\":\"shoppingCart\",\"icon\":\"\",\"controlComName\":\"shoppingCartControl\",\"moduleCss\":[],\"params\":[]},{\"name\":\"\\u641c\\u7d22\\u6846\",\"type\":\"search\",\"comName\":\"diySearch\",\"controlComName\":\"diySearchControl\",\"icon\":\"icon-sousuokuang\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":0,\"padding\":0,\"borderRadius\":0},\"params\":{\"placeholder\":\"\",\"fixedTop\":0,\"borderType\":\"2\",\"styleType\":\"1\",\"contentAlign\":\"\",\"inputBgColor\":\"#F2F2F2\",\"inputBorder\":\"#707070\",\"inputTextColor\":\"#9B9B9B\",\"searchBtnColor\":\"#FA2C1B\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"14\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\",\"textAlign\":\"inherit\"}},\"image_search_status\":1},{\"name\":\"\\u641c\\u7d22\\u6846\",\"type\":\"search\",\"comName\":\"diySearch\",\"controlComName\":\"diySearchControl\",\"icon\":\"icon-sousuokuang\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":0,\"padding\":0,\"borderRadius\":0},\"params\":{\"placeholder\":\"\",\"fixedTop\":0,\"borderType\":\"1\",\"styleType\":\"1\",\"contentAlign\":\"\",\"inputBgColor\":\"#F2F2F2\",\"inputBorder\":\"#707070\",\"inputTextColor\":\"#9B9B9B\",\"searchBtnColor\":\"#FA2C1B\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"14\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\",\"textAlign\":\"inherit\"}},\"image_search_status\":1},{\"name\":\"\\u641c\\u7d22\\u6846\",\"type\":\"search\",\"comName\":\"diySearch\",\"controlComName\":\"diySearchControl\",\"icon\":\"icon-sousuokuang\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":0,\"padding\":0,\"borderRadius\":0},\"params\":{\"placeholder\":\"\",\"fixedTop\":0,\"borderType\":\"1\",\"styleType\":\"2\",\"contentAlign\":\"\",\"inputBgColor\":\"#F2F2F2\",\"inputBorder\":\"#707070\",\"inputTextColor\":\"#9B9B9B\",\"searchBtnColor\":\"#FA2C1B\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"14\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\",\"textAlign\":\"inherit\"}},\"image_search_status\":1},{\"name\":\"\\u641c\\u7d22\\u6846\",\"type\":\"search\",\"comName\":\"diySearch\",\"controlComName\":\"diySearchControl\",\"icon\":\"icon-sousuokuang\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":0,\"padding\":0,\"borderRadius\":0},\"params\":{\"placeholder\":\"\",\"fixedTop\":0,\"borderType\":\"1\",\"styleType\":\"1\",\"contentAlign\":\"\",\"inputBgColor\":\"#F2F2F2\",\"inputBorder\":\"#707070\",\"inputTextColor\":\"#9B9B9B\",\"searchBtnColor\":\"#FA2C1B\",\"css\":{\"color\":\"#000000\",\"fontNum\":\"14\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\",\"textAlign\":\"inherit\"}},\"image_search_status\":1}],\"controlComName\":\"pageControl\",\"id\":\"394\"}","is_delete":"0","addtime":"1682324030","is_index":"0","type":"1"},{"id":"395","store_id":"1","name":"system","template":"{\"page_name\":\"\\u5206\\u7c7b\",\"is_index\":\"0\",\"page_type\":1,\"system_type\":\"classify\",\"page_link\":\"\",\"theme\":{\"color\":\"\"},\"pageCss\":{\"margin\":0,\"padding\":0,\"vSpave\":0,\"hSpace\":0,\"borderRadius\":0,\"borderRaNum\":0,\"backgroundColor\":\"#f2f2f2\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"templates\":[{\"name\":\"\\u5206\\u7c7b\\u9875\\u9762-\\u5934\\u90e8\\u5bfc\\u822a\",\"type\":\"\",\"comName\":\"classifyHeader\",\"icon\":\"\",\"controlComName\":\"\",\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"params\":[]},{\"name\":\"\\u5206\\u7c7b\\u9875\\u9762-\\u5206\\u7c7b\\u5de6\\u4fa7\\u5217\\u8868\",\"type\":\"\",\"comName\":\"classifyContent\",\"icon\":\"\",\"controlComName\":\"classifyContentControl\",\"params\":{\"levelNum\":\"2\",\"styleType\":1,\"goodsShowType\":\"2\",\"showModule\":false,\"abConfig\":{\"isShow\":true,\"imgSrc\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-28\\/ec60d24b4328ffd9256c9a4e232a506cd1d4898c.gif\",\"link\":{\"name\":\"\\u70b9\\u9910\",\"link\":\"\\/alipay-order\\/orderMeal\\/orderMeal?table_num=1\",\"open_type\":\"navigate\",\"params\":[{\"key\":\"table_num\",\"value\":\"1\",\"desc\":\"\\u684c\\u53f7\\uff0c\\u5fc5\\u586b\"}]}}}}],\"controlComName\":\"pageControl\",\"id\":\"395\"}","is_delete":"0","addtime":"1690428094","is_index":"0","type":"1"},{"id":"405","store_id":"1","name":"system","template":"{\"page_name\":\"\\u5546\\u54c1\\u8be6\\u60c5\",\"is_index\":\"0\",\"page_type\":1,\"system_type\":\"goodsDetail\",\"page_link\":\"\",\"theme\":{\"color\":\"\"},\"pageCss\":{\"margin\":0,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"templates\":[{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5934\\u90e8\\u5546\\u54c1\\u8f6e\\u64ad\\u56fe\",\"type\":\"\",\"comName\":\"goodsSwiperImgs\",\"icon\":\"\",\"controlComName\":\"goodsSwiperImgsControl\",\"params\":{\"margin\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5546\\u54c1\\u4ecb\\u7ecd\",\"type\":\"\",\"comName\":\"goodsIntroduce\",\"icon\":\"\",\"controlComName\":\"goodsIntroduceControl\",\"params\":{\"showMemberPrice\":true,\"showOriginPrice\":true},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":0,\"borderRadius\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5546\\u54c1\\u4f18\\u60e0\\u6d3b\\u52a8\",\"type\":\"\",\"comName\":\"goodsDiscount\",\"icon\":\"\",\"controlComName\":\"goodsDiscountControl\",\"params\":{\"showGoodsDiscount\":false},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":0,\"borderRadius\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5546\\u54c1sku\\u5c5e\\u6027\\u9009\\u62e9\",\"type\":\"\",\"comName\":\"goodsAttribute\",\"icon\":\"\",\"controlComName\":\"goodsAttributeControl\",\"params\":{\"showAddress\":false,\"showNearbyShop\":false,\"showFreight\":false},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":0,\"borderRadius\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5546\\u54c1\\u8bc4\\u4ef7\",\"type\":\"\",\"comName\":\"goodsEvaluate\",\"icon\":\"\",\"controlComName\":\"goodsEvaluateControl\",\"params\":{\"showEvaluate\":false},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":10,\"padding\":0,\"borderRadius\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5546\\u54c1\\u8bc4\\u4ef7\",\"type\":\"\",\"comName\":\"goodsShopEntry\",\"icon\":\"\",\"controlComName\":\"goodsShopEntryControl\",\"params\":{\"showGoodsShopEntry\":false},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"margin\":12,\"padding\":0,\"borderRadius\":0}},{\"name\":\"\\u5546\\u54c1\\u8be6\\u60c5\\u9875\\u9762-\\u5e95\\u90e8\\u5bfc\\u822a\",\"type\":\"\",\"comName\":\"goodsFootNav\",\"icon\":\"\",\"controlComName\":\"goodsFootNavControl\",\"params\":{\"styleType\":\"1\",\"tabList\":[{\"text\":\"\\u9996\\u9875\",\"icon\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-11-02\\/857370f6a7a788ff0674b4255dabc91974b402a0.png\",\"link\":{\"name\":\"\\u9996\\u9875\",\"link\":\"\\/pages\\/home\\/home\",\"open_type\":\"switchtab\",\"params\":[]},\"fontColor\":\"#262626\",\"controlComName\":\"goodsFootNavItemControl\"},{\"text\":\"\\u6211\\u7684\",\"icon\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-10-27\\/0f7048ecd1c7d0d30278ca9665beca219ff3e778.png\",\"link\":{\"name\":\"\\u6211\\u7684\",\"link\":\"\\/pages\\/my\\/my\",\"open_type\":\"switchtab\",\"params\":[],\"id\":\"375\"},\"fontColor\":\"#262626\",\"controlComName\":\"goodsFootNavItemControl\"},{\"text\":\"\\u8d2d\\u7269\\u8f66\",\"icon\":\"https:\\/\\/chidian.cyyvip.com\\/web\\/uploads\\/images\\/store_1\\/2021-11-02\\/5d156040e27daf1da32d3a4241355684f4708f7e.png\",\"link\":{\"name\":\"\\u8d2d\\u7269\\u8f66\",\"link\":\"\\/pages\\/shoppingcart\\/shoppingcart\",\"open_type\":\"switchtab\",\"params\":[]},\"fontColor\":\"#262626\",\"controlComName\":\"goodsFootNavItemControl\"}],\"buyBtn\":{\"text\":\"\\u7acb\\u5373\\u8d2d\\u4e70\",\"color\":\"#fbf9f9\",\"bgColor\":\"#ff0000\"},\"cartBtn\":{\"text\":\"\\u52a0\\u5165\\u8d2d\\u7269\\u8f66\",\"color\":\"#FFFFFF\",\"bgColor\":\"#ffa200\"}},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\",\"borderRadius\":0}}],\"controlComName\":\"pageControl\",\"id\":\"405\"}","is_delete":"0","addtime":"1682324033","is_index":"0","type":"1"},{"id":"641","store_id":"1","name":"system","template":"{\"page_name\":\"\\u70b9\\u9910\\u9875\",\"is_index\":\"0\",\"page_type\":1,\"system_type\":\"orderMeal\",\"page_link\":\"\",\"theme\":{\"color\":\"\"},\"pageCss\":{\"margin\":0,\"padding\":0,\"vSpave\":0,\"hSpace\":0,\"borderRadius\":0,\"borderRaNum\":0,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"bgOpacity\":100,\"opacity\":\"100\",\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"},\"templates\":[{\"name\":\"\\u70b9\\u9910\",\"type\":\"\",\"comName\":\"orderMealPage\",\"icon\":\"\",\"controlComName\":\"orderMealPageControl\",\"params\":{\"styleType\":\"1\",\"leftTabBg\":\"#ffffff\",\"fontCss\":{\"color\":\"#262626\",\"fontNum\":\"15\",\"fontSize\":\"\",\"fontStyle\":\"normal\",\"fontWeight\":\"normal\",\"textDecoration\":\"inherit\"},\"goodsType\":\"2\"}}],\"controlComName\":\"pageControl\",\"id\":\"641\"}","is_delete":"0","addtime":"1687915921","is_index":"0","type":"1"}],"controls":"[{\"name\":\"导航\",\"is_show\":true,\"controlComName\":\"widgetNavControl\",\"show_type\":\"nav\",\"params\":{\"defaultColor\":\"#2e2d2d\",\"activeColor\":\"#FF0000\",\"navList\":[{\"pic_url\":\"https://chidian.cyyvip.com/web/uploads/images/store_1/2021-10-08/a534bf3a2644848cb89f990729666d4896ac8297.png\",\"active_url\":\"https://chidian.cyyvip.com/web/uploads/images/store_1/2021-10-08/f31be583049b0f7c4eb2abf7c9e7b0619b30986a.png\",\"nav_text\":\"首页\",\"link\":{\"name\":\"首页\",\"link\":\"/pages/home/home\",\"open_type\":\"switchtab\",\"params\":[]}},{\"pic_url\":\"\",\"active_url\":\"\",\"nav_text\":\"我的\",\"link\":{\"name\":\"我的\",\"link\":\"/pages/my/my\",\"open_type\":\"switchtab\",\"params\":[]}}]},\"moduleCss\":{\"backgroundColor\":\"#ffffff\",\"backgroundImage\":\"\",\"bgImg\":\"\",\"useBackground\":true,\"backgroundSize\":\"100% 100%\",\"backgroundRepeat\":\"no-repeat\"}},{\"name\":\"弹窗\",\"is_show\":false,\"show_type\":\"window\",\"controlComName\":\"widgetPopupControl\",\"params\":{\"list\":[],\"rule\":1}},{\"name\":\"电话\",\"is_show\":false,\"show_type\":\"list\",\"controlComName\":\"widgetPhoneControl\",\"params\":{\"phone\":\"\",\"picUrl\":\"\"}},{\"name\":\"微信客服\",\"is_show\":true,\"show_type\":\"list\",\"controlComName\":\"widgetWxControl\",\"params\":{\"picUrl\":\"http://tianxin100we10.cyyvip.com/web/uploads/images/supplier_40/2023-07-05/f69cb9c016ee6d04e0e589805e6e78378e603a0a.png\"}}]"}}'; // $data = json_decode($testJson, true); if (!$is_custom_name) { $search = '积分'; $integral_name = Option::get(OptionSetting::STORE_INTEGRAL_NAME, $this->store_id, 'gift', Option::get(OptionSetting::STORE_INTEGRAL_NAME, $this->store_id, 'store', $search)['value'])['value']; $replace = $integral_name; self::strReplaceArr($search, $replace, $data); // $share_holder_search = '股东'; // $share_holder_name = Option::get('shareHolderAliasName', $this->store_id, 'bonus_pool', $share_holder_search)['value']; // $replace = $share_holder_name; // self::strReplaceArr($share_holder_search, $replace, $data); } return parent::asJson($data); } public static function strReplaceArr($search, $replace, &$arr) { if(is_string($arr)){ $arr = str_replace($search, $replace, $arr); } if(is_array($arr)){ foreach($arr as $k => $v){ if(self::isJson($v)){ $d = json_decode($v, true); self::strReplaceArr($search, $replace, $d); $arr[$k] = json_encode($d, JSON_UNESCAPED_UNICODE); }elseif(is_array($v)){ self::strReplaceArr($search, $replace, $arr[$k]); }elseif(is_string($v)){ $arr[$k] = str_replace($search, $replace, $arr[$k]); } } } } public static function isJson($str) { if(is_string($str)){ $arr = json_decode($str, true); return is_array($arr) && (json_last_error() == JSON_ERROR_NONE); } return false; } }