jufubao-base 1.0.357 → 1.0.358-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,4 +10,16 @@
|
|
|
10
10
|
* 更新列表记录(updateFfffXxxxx)
|
|
11
11
|
* @type {*[]}
|
|
12
12
|
*/
|
|
13
|
-
module.exports = [
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'getSpShopId', //自定义方法名字(必选)
|
|
16
|
+
title: '特殊扫水牌地址兼容获取shopid',
|
|
17
|
+
path: '/mall/v1/shop/old-to-new',
|
|
18
|
+
isRule: false,
|
|
19
|
+
params: {
|
|
20
|
+
shop_id: ['门店ID', 'Number', '必选'],
|
|
21
|
+
},
|
|
22
|
+
isConsole: true,
|
|
23
|
+
disabled: true,
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -125,7 +125,29 @@ export default {
|
|
|
125
125
|
const matches = hostname.match(/[^.]+\.[^.]+$/);
|
|
126
126
|
return matches ? matches[0] : hostname;
|
|
127
127
|
},
|
|
128
|
+
|
|
128
129
|
//#ifdef H5
|
|
130
|
+
spLink(params){
|
|
131
|
+
jfbRootExec("getSpShopId", {
|
|
132
|
+
vm: this,
|
|
133
|
+
data: params,
|
|
134
|
+
})
|
|
135
|
+
.then(res => {
|
|
136
|
+
if(res["x-params"]) {
|
|
137
|
+
//x-params=base64(a:1,b:3);
|
|
138
|
+
this.$xdUniHelper.navigateTo({
|
|
139
|
+
url: `${this.change_url}?x-params=${res["x-params"]}&referrer=official`,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
.catch(error=>{
|
|
144
|
+
console.error(error);
|
|
145
|
+
this.other = true;
|
|
146
|
+
this.show = false;
|
|
147
|
+
this.flag = false;
|
|
148
|
+
})
|
|
149
|
+
},
|
|
150
|
+
|
|
129
151
|
handleH5() {
|
|
130
152
|
// 判断jwxSDK是否为空
|
|
131
153
|
if (this.jwxSDK !== null) {
|
|
@@ -137,7 +159,21 @@ export default {
|
|
|
137
159
|
scanType: ["qrCode"],
|
|
138
160
|
// 扫描成功后的回调函数
|
|
139
161
|
success: (res) => {
|
|
140
|
-
|
|
162
|
+
|
|
163
|
+
//特殊地址
|
|
164
|
+
if(res['resultStr'].includes('/main/goods/index')) {
|
|
165
|
+
let params = this.$xdUniHelper.parseURL(res['resultStr'])['params'];
|
|
166
|
+
|
|
167
|
+
if(params.shop_id){
|
|
168
|
+
this.spLink(params);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.other = true;
|
|
172
|
+
this.show = false;
|
|
173
|
+
this.flag = false;
|
|
174
|
+
}
|
|
175
|
+
return
|
|
176
|
+
}
|
|
141
177
|
// 判断res.resultStr是否包含'wx/cake/index/'
|
|
142
178
|
if(res.resultStr.includes('wx/cake/index/')){
|
|
143
179
|
// 将res.resultStr以'wx/cake/index/'分割,取分割后的第一个元素
|
|
@@ -152,7 +188,7 @@ export default {
|
|
|
152
188
|
// 拼接change_url和x-params参数
|
|
153
189
|
let path = `${this.change_url}?x-params=${xParams}&referrer=official`;
|
|
154
190
|
// 打印xParams和path
|
|
155
|
-
console.log(xParams,'pathpath');
|
|
191
|
+
console.log(xParams,'pathpath');
|
|
156
192
|
// 跳转到指定路径
|
|
157
193
|
this.$xdUniHelper.navigateTo({
|
|
158
194
|
url: path,
|
|
@@ -261,7 +297,7 @@ export default {
|
|
|
261
297
|
// 拼接change_url和x-params参数
|
|
262
298
|
let path = `${this.change_url}?x-params=${xParams}&referrer=official`;
|
|
263
299
|
// 打印xParams和path
|
|
264
|
-
console.log(xParams,'pathpath');
|
|
300
|
+
console.log(xParams,'pathpath');
|
|
265
301
|
// 跳转到指定路径
|
|
266
302
|
this.$xdUniHelper.navigateTo({
|
|
267
303
|
url: path,
|