jufubao-third 1.0.23-beta3 → 1.0.23-beta4
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(node -e ' *)",
|
|
5
|
+
"Bash(npx esbuild *)",
|
|
6
|
+
"Bash(npx vue-template-compiler *)",
|
|
7
|
+
"Bash(node -e \"const fs=require\\('fs'\\);const compiler=require\\('/Users/zxd/Workspaces/jufubao-third/node_modules/@vue/compiler-sfc'\\);const {parse,compileTemplate}=compiler;const r=parse\\(fs.readFileSync\\('/Users/zxd/Workspaces/jufubao-third/src/components/JfbThirdRideLand/JfbThirdRideLand.vue','utf8'\\)\\);const t=compileTemplate\\({source:r.descriptor.template.content,filename:'x.vue'}\\);console.log\\(t.errors.length===0?'Vue template OK':'ERR '+JSON.stringify\\(t.errors\\)\\)\")",
|
|
8
|
+
"Bash(node *)",
|
|
9
|
+
"Bash(grep -i \"^vue$\")"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -22,20 +22,17 @@ export default {
|
|
|
22
22
|
ele: 'xd-site-select-list',
|
|
23
23
|
labelInline: true,
|
|
24
24
|
valueKey: 'channelApi',
|
|
25
|
-
value: dataVal({data, key:'channelApi', dValue:'
|
|
25
|
+
value: dataVal({data, key:'channelApi', dValue:'', gValue}),
|
|
26
26
|
placeholder: '请选择渠道配置',
|
|
27
27
|
multiple: false,
|
|
28
28
|
className: 'input100',
|
|
29
29
|
groupKey:'content',
|
|
30
30
|
handleCustom({action, data}) {
|
|
31
31
|
XdBus.getParentApi('getOptionsSettingList')({
|
|
32
|
-
setting_id: '
|
|
32
|
+
setting_id: 'third_channels_webhook',
|
|
33
33
|
key: Date.now()
|
|
34
34
|
})
|
|
35
35
|
.then(res => {
|
|
36
|
-
res.list = res.list.filter(item=>{
|
|
37
|
-
return item.label !== '无';
|
|
38
|
-
});
|
|
39
36
|
data.cb(res.list)
|
|
40
37
|
})
|
|
41
38
|
.catch(error => {
|
|
@@ -46,25 +43,7 @@ export default {
|
|
|
46
43
|
{
|
|
47
44
|
required: false,
|
|
48
45
|
validator: (rule, value, callback) => {
|
|
49
|
-
|
|
50
|
-
if(setTpl === 'itemCenterBig') {
|
|
51
|
-
if(value && value.length === 0) callback('请设置菜单');
|
|
52
|
-
else {
|
|
53
|
-
let errorStr = '';
|
|
54
|
-
if(value && value.length > 0) {
|
|
55
|
-
let len = value.length;
|
|
56
|
-
for(let i = 0; i < len; i++) {
|
|
57
|
-
if(value[i].name.length > 5) {
|
|
58
|
-
errorStr = `菜单${i}最大长度不能超过5个汉字`;
|
|
59
|
-
break
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if(errorStr) {
|
|
64
|
-
callback(errorStr)
|
|
65
|
-
}else callback();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
46
|
+
if(!value) callback('请选择渠道配置')
|
|
68
47
|
else callback()
|
|
69
48
|
},
|
|
70
49
|
trigger: 'blur'
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</view>
|
|
17
17
|
<!-- #endif -->
|
|
18
18
|
<view class="jfb-third-open-embedded-mp__body">
|
|
19
|
-
<view class="pop" :style="[noDataStyleComp]"
|
|
19
|
+
<view class="pop" :style="[noDataStyleComp]">开启半屏小程序中转组件便编辑(占位),在线上此模块不显</view>
|
|
20
20
|
</view>
|
|
21
21
|
</view>
|
|
22
22
|
</template>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { gCPVal } from "@/utils/xd.base";
|
|
28
28
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
29
29
|
import extsMixins from "@/mixins/extsMixins";
|
|
30
|
-
import {mapState} from "vuex";
|
|
30
|
+
import {mapState,mapMutations} from "vuex";
|
|
31
31
|
import {getNoUrl} from "@/utils/nourl";
|
|
32
32
|
import Color from "color";
|
|
33
33
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
...mapState(['extraData']),
|
|
57
57
|
|
|
58
58
|
noDataStyleComp(){
|
|
59
|
-
let height = '
|
|
59
|
+
let height = '66rpx';
|
|
60
60
|
if(!this.isPreview) height = 0;
|
|
61
61
|
return {
|
|
62
62
|
backgroundColor:this.backgroundColor,
|
|
@@ -69,6 +69,13 @@
|
|
|
69
69
|
overflow: 'hidden'
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
+
|
|
73
|
+
apiUrlComp(){
|
|
74
|
+
let urlObj = this.channelApi.split('@@');
|
|
75
|
+
let url = urlObj[0];
|
|
76
|
+
let method = urlObj[1] || 'get';
|
|
77
|
+
return {url,method}
|
|
78
|
+
}
|
|
72
79
|
},
|
|
73
80
|
watch: {
|
|
74
81
|
container(value, oldValue) {
|
|
@@ -89,17 +96,30 @@
|
|
|
89
96
|
this.init(this.container);
|
|
90
97
|
},
|
|
91
98
|
methods: {
|
|
99
|
+
...mapMutations(['setExtraData']),
|
|
100
|
+
|
|
92
101
|
/**
|
|
93
102
|
* @description 请求三方接口
|
|
94
103
|
*/
|
|
95
104
|
requestApi(params){
|
|
105
|
+
//if(this.isPreview ) return;
|
|
96
106
|
this.$xdShowLoading({});
|
|
107
|
+
let {url ,method} = this.apiUrlComp;
|
|
108
|
+
let apiParams = { url };
|
|
109
|
+
if(method === 'get') apiParams.params = params;
|
|
110
|
+
else apiParams.data = params;
|
|
111
|
+
|
|
97
112
|
//打包模式
|
|
98
|
-
getNoUrl(
|
|
113
|
+
getNoUrl(apiParams)
|
|
99
114
|
.then(res => {
|
|
100
|
-
|
|
115
|
+
//处理返回数据
|
|
116
|
+
// debugger
|
|
117
|
+
this.$xdUniHelper.navigateTo({
|
|
118
|
+
url: this.cashierURL + `?main_order_id=${res.main_order_id}`
|
|
119
|
+
})
|
|
101
120
|
})
|
|
102
121
|
.catch(error => {
|
|
122
|
+
debugger
|
|
103
123
|
console.log(error)
|
|
104
124
|
});
|
|
105
125
|
|
|
@@ -114,6 +134,12 @@
|
|
|
114
134
|
this.cashierURL = gCPVal(container, 'cashierURL', {value: 'cashierURL'}).value;
|
|
115
135
|
},
|
|
116
136
|
|
|
137
|
+
onJfbLoad(){
|
|
138
|
+
// setTimeout(()=>{
|
|
139
|
+
// this.setExtraData({a:1,b:2});
|
|
140
|
+
// }, 2000)
|
|
141
|
+
}
|
|
142
|
+
|
|
117
143
|
}
|
|
118
144
|
}
|
|
119
145
|
|