jufubao-base 1.0.355 → 1.0.356-beta1
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
|
@@ -57,7 +57,8 @@ export default {
|
|
|
57
57
|
backgroundColor: "",
|
|
58
58
|
fontStyle: {},
|
|
59
59
|
changeCompanyPath: "",
|
|
60
|
-
company_name: ''
|
|
60
|
+
company_name: '',
|
|
61
|
+
if_redirect_url: 'Y'
|
|
61
62
|
};
|
|
62
63
|
},
|
|
63
64
|
watch: {
|
|
@@ -96,6 +97,7 @@ export default {
|
|
|
96
97
|
init(container) {
|
|
97
98
|
//content
|
|
98
99
|
this.companyPosition = gCPVal(container, "companyPosition", "left", {});
|
|
100
|
+
this.if_redirect_url = gCPVal(container, "if_redirect_url", "Y", {});
|
|
99
101
|
//style
|
|
100
102
|
this.contentPadding = gCPVal(
|
|
101
103
|
container,
|
|
@@ -137,8 +139,9 @@ export default {
|
|
|
137
139
|
redirect_url = this["$xdUniHelper"].parseURL().source;
|
|
138
140
|
if (store.state.configProject.platform === "h5")
|
|
139
141
|
redirect_url = this.$route.fullPath;
|
|
142
|
+
//加配置面板是否需要设置返回地址进行判断是否加?redirect_url=${Base64.encodeURI(redirect_url)}
|
|
140
143
|
this.$xdUniHelper.navigateTo({
|
|
141
|
-
url: `${this.changeCompanyPath}?redirect_url=${Base64.encodeURI(redirect_url)}`,
|
|
144
|
+
url: this.if_redirect_url === 'Y' ? `${this.changeCompanyPath}?redirect_url=${Base64.encodeURI(redirect_url)}` : `${this.changeCompanyPath}`,
|
|
142
145
|
});
|
|
143
146
|
},
|
|
144
147
|
onJfbScroll(options) {
|
|
@@ -23,5 +23,17 @@ export default (data, gValue, gColor, oldData) => {
|
|
|
23
23
|
{ label: '居中', value: 'center' },
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
label: '返回本页',
|
|
28
|
+
ele: 'xd-radio',
|
|
29
|
+
groupKey: 'content',
|
|
30
|
+
valueKey: 'if_redirect_url',
|
|
31
|
+
value: dataVal({ data, key: 'if_redirect_url', dValue: 'Y' }),
|
|
32
|
+
labelInline: true,
|
|
33
|
+
list: [
|
|
34
|
+
{ label: '是', value: 'Y' },
|
|
35
|
+
{ label: '否', value: 'N' },
|
|
36
|
+
]
|
|
37
|
+
},
|
|
26
38
|
]
|
|
27
39
|
}
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</view>
|
|
54
54
|
<view :style="[addCoMpStyle]" class="jfb-base-chose-company__body-add"
|
|
55
55
|
>{{ addTitle
|
|
56
|
-
}}<view @click="handleToAdd" :style="{color:mainColor}"
|
|
56
|
+
}}<view v-if="addCompanyPath" @click="handleToAdd" :style="{color:mainColor}"
|
|
57
57
|
>去添加<XdFontIcon
|
|
58
58
|
size="28"
|
|
59
59
|
icon="iconxiangyou_xian"
|
|
@@ -140,9 +140,9 @@ export default {
|
|
|
140
140
|
data: {},
|
|
141
141
|
}).then((res) => {
|
|
142
142
|
console.log(res, "resgetChoseCompanyList");
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
//如果只有一个企业,直接选择该企业
|
|
144
|
+
if(res.list.length === 1) {
|
|
145
|
+
this.handleChoseCompany(res.list[0]);
|
|
146
146
|
}
|
|
147
147
|
this.companyList = res.list;
|
|
148
148
|
});
|
|
@@ -266,6 +266,9 @@ export default {
|
|
|
266
266
|
).value;
|
|
267
267
|
},
|
|
268
268
|
handleChoseCompany(item) {
|
|
269
|
+
if(this.$configProject["isPreview"]){
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
269
272
|
jfbRootExec("switchChoseCompany", {
|
|
270
273
|
vm: this,
|
|
271
274
|
data: {
|
|
@@ -281,16 +284,16 @@ export default {
|
|
|
281
284
|
this.jfbAuthorize.removeAllCardToken();
|
|
282
285
|
}
|
|
283
286
|
//#endif
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
287
|
+
let real_index_url = '';
|
|
288
|
+
try {
|
|
289
|
+
let jsonData = JSON.parse(item.index_url);
|
|
290
|
+
real_index_url = jsonData['app']['frontPath'];
|
|
291
|
+
} catch (error) {
|
|
292
|
+
real_index_url = item.index_url;
|
|
293
|
+
}
|
|
294
|
+
this.$xdUniHelper.redirectTo({
|
|
295
|
+
url: this.redirect_url || real_index_url || this.settings.index,
|
|
296
|
+
});
|
|
294
297
|
});
|
|
295
298
|
},
|
|
296
299
|
handleToAdd() {
|
package/get.package.path.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 第三方库
|
|
5
|
-
* @param threePackagePath {String} 第三方库所在项目路径存放路径路
|
|
6
|
-
* @param packname {String} 包名字
|
|
7
|
-
* @returns {string|*}
|
|
8
|
-
*/
|
|
9
|
-
const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
|
|
10
|
-
if(packname === 'gxd-commands-bussiness') {
|
|
11
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (packname === 'gxd-uni-library-editx') {
|
|
15
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = {
|
|
21
|
-
getPackagePath
|
|
22
|
-
}
|