jufubao-mall 1.0.39 → 1.0.40-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 +1 -1
- package/src/components/JfbMallBrandWall/Attr.js +14 -0
- package/src/components/JfbMallBrandWall/JfbMallBrandWall.vue +29 -1
- package/src/components/JfbMallShop/Attr.js +56 -1
- package/src/components/JfbMallShop/JfbMallShop.vue +36 -3
- package/src/components/JfbMallShopList/Attr.js +24 -0
- package/src/components/JfbMallShopList/JfbMallShopList.vue +29 -8
package/package.json
CHANGED
|
@@ -7,6 +7,20 @@ export default {
|
|
|
7
7
|
style: [],
|
|
8
8
|
content: (data) => {
|
|
9
9
|
return [
|
|
10
|
+
{
|
|
11
|
+
label: '更改分类label(可排序):',
|
|
12
|
+
ele: 'xd-set-sort-label',
|
|
13
|
+
valueKey: 'newLabel',
|
|
14
|
+
value: data['newLabel'] || null,
|
|
15
|
+
disabled: false,
|
|
16
|
+
defaultValue: data['newLabel'],
|
|
17
|
+
list: [
|
|
18
|
+
{label: "全部", value: "all",sort:1},
|
|
19
|
+
{label: "线上", value: "stod",sort:2},
|
|
20
|
+
{label: "线下", value: "sell",sort:3},
|
|
21
|
+
{label: "电子码", value: "code",sort:4}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
10
24
|
{
|
|
11
25
|
label: "选择业务线",
|
|
12
26
|
ele: "xd-choose-namespace",
|
|
@@ -138,6 +138,7 @@
|
|
|
138
138
|
isTitleBorderW: '',
|
|
139
139
|
isTitleBorderColor:'',
|
|
140
140
|
titlePadding: '',
|
|
141
|
+
newLabel: []
|
|
141
142
|
}
|
|
142
143
|
},
|
|
143
144
|
computed: {
|
|
@@ -145,6 +146,16 @@
|
|
|
145
146
|
stateCity: state => state.cityLocation.city
|
|
146
147
|
}),
|
|
147
148
|
showTabs(){
|
|
149
|
+
this.tabs.forEach((item1, index) => {
|
|
150
|
+
const item2 = this.newLabel.find((item) => item.value === item1.value);
|
|
151
|
+
|
|
152
|
+
if (item2) {
|
|
153
|
+
item1.label = item2.newLabel||item1.label;
|
|
154
|
+
item1.sort = item2.sort
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
this.tabs.sort((a,b)=>a.sort - b.sort)
|
|
158
|
+
console.log(this.tabs,'amamamaam');
|
|
148
159
|
if(this.has_sell) return this.tabs;
|
|
149
160
|
else return this.tabs.filter(item => item.value !== 'sell');
|
|
150
161
|
},
|
|
@@ -191,6 +202,23 @@
|
|
|
191
202
|
watch: {
|
|
192
203
|
container(value) {
|
|
193
204
|
this.init(value)
|
|
205
|
+
},
|
|
206
|
+
newLabel: {
|
|
207
|
+
deep:true,
|
|
208
|
+
handler(n,o) {
|
|
209
|
+
if(this.isPreview) {
|
|
210
|
+
// 遍历tabs,找到newLabel中value与item1.value相同的项,将其赋值给item1.label
|
|
211
|
+
this.tabs.forEach((item1, index) => {
|
|
212
|
+
const item2 = this.newLabel.find((item) => item.value === item1.value);
|
|
213
|
+
|
|
214
|
+
if (item2) {
|
|
215
|
+
item1.label = item2.newLabel||item1.label;
|
|
216
|
+
item1.sort = item2.sort
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
this.tabs.sort((a,b)=>a.sort - b.sort)
|
|
220
|
+
}
|
|
221
|
+
}
|
|
194
222
|
}
|
|
195
223
|
},
|
|
196
224
|
created() {
|
|
@@ -240,7 +268,7 @@
|
|
|
240
268
|
this.isContBorderW = getContainerPropsValue(container, 'content.isContBorderW', 0);
|
|
241
269
|
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
242
270
|
this.contentBoxBgc = getContainerPropsValue(container, 'content.contentBoxBgc', 'rgba(0,0,0,0)');
|
|
243
|
-
|
|
271
|
+
this.newLabel = getContainerPropsValue(container, 'content.newLabel', []);
|
|
244
272
|
|
|
245
273
|
},
|
|
246
274
|
switchTab(i){
|
|
@@ -7,7 +7,62 @@ export default {
|
|
|
7
7
|
style: [],
|
|
8
8
|
content: (data) => {
|
|
9
9
|
return [
|
|
10
|
-
|
|
10
|
+
{
|
|
11
|
+
label: '是否展示随心兑:',
|
|
12
|
+
ele: 'xd-radio',
|
|
13
|
+
valueKey: 'isShowExchange',
|
|
14
|
+
value: data.isShowExchange || "Y",
|
|
15
|
+
rules: [
|
|
16
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
17
|
+
],
|
|
18
|
+
list: [
|
|
19
|
+
{"label": "显示", "value": "Y"},
|
|
20
|
+
{"label": "隐藏", "value": "N"},
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '名称:', //label
|
|
25
|
+
ele: 'el-input', //package 名称
|
|
26
|
+
type: 'text',
|
|
27
|
+
valueKey: 'name', //form[valueKey]
|
|
28
|
+
value: data.name || '', //v-model
|
|
29
|
+
placeholder: '请输入随心兑名称',
|
|
30
|
+
className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
31
|
+
rules: [
|
|
32
|
+
{
|
|
33
|
+
required: true,
|
|
34
|
+
message: '请输入随心兑名称',
|
|
35
|
+
trigger: 'blur'
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: '备注:', //label
|
|
41
|
+
ele: 'el-input', //package 名称
|
|
42
|
+
type: 'text',
|
|
43
|
+
valueKey: 'remark', //form[valueKey]
|
|
44
|
+
value: data.remark || '', //v-model
|
|
45
|
+
placeholder: '请输入随心兑备注',
|
|
46
|
+
className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
47
|
+
rules: [
|
|
48
|
+
{
|
|
49
|
+
required: true,
|
|
50
|
+
message: '请输入随心兑备注',
|
|
51
|
+
trigger: 'blur'
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: '随心兑跳转路径:',
|
|
57
|
+
ele: 'xd-select-pages-path',
|
|
58
|
+
valueKey: 'exchangePath',
|
|
59
|
+
placeholder: '请选择随心兑跳转路径',
|
|
60
|
+
value: data['exchangePath'] || null,
|
|
61
|
+
setting: {
|
|
62
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
63
|
+
},
|
|
64
|
+
inline: false,
|
|
65
|
+
},
|
|
11
66
|
].filter(i=>i)
|
|
12
67
|
},
|
|
13
68
|
advanced: [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</view>
|
|
32
32
|
<view class="shop_sub" v-if="0">
|
|
33
33
|
<view><xd-font-icon size="26" icon="icondianhuatubiao"></xd-font-icon></view>
|
|
34
|
-
<view>{{shopInfo.phone}}</view>
|
|
34
|
+
<view>{{shopInfo.phone}}</view></view>
|
|
35
35
|
</view>
|
|
36
36
|
</view>
|
|
37
37
|
</view>
|
|
@@ -44,7 +44,13 @@
|
|
|
44
44
|
</view>
|
|
45
45
|
</xd-button>
|
|
46
46
|
</view>
|
|
47
|
-
|
|
47
|
+
</view>
|
|
48
|
+
<view v-if="isShowExchange==='Y'" class="shop_wrap-exchange">
|
|
49
|
+
<view>
|
|
50
|
+
<view style="margin-bottom:10rpx">{{exchangeName}}</view>
|
|
51
|
+
<view>{{exchangeRemark}}</view>
|
|
52
|
+
</view>
|
|
53
|
+
<xd-button @click="handleToExchange" style="margin:0" type="primary" size="small">去兑换</xd-button>
|
|
48
54
|
</view>
|
|
49
55
|
<view class="shop_map" v-if="initBaidu">
|
|
50
56
|
<view class="_title">门店地图</view>
|
|
@@ -69,6 +75,7 @@
|
|
|
69
75
|
import XdBaiduMap from "./XdBaiduMap"
|
|
70
76
|
// #endif
|
|
71
77
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
78
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
72
79
|
import JfbMallShopMixin from "./JfbMallShopMixin";
|
|
73
80
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
74
81
|
import extsMixins from "@/mixins/extsMixins"
|
|
@@ -96,11 +103,16 @@
|
|
|
96
103
|
shopInfo: {},
|
|
97
104
|
options: {},
|
|
98
105
|
selfMask: true,
|
|
99
|
-
xnamespace: ""
|
|
106
|
+
xnamespace: "",
|
|
107
|
+
isShowExchange:'Y',
|
|
108
|
+
exchangeName: '',
|
|
109
|
+
exchangeRemark: '',
|
|
110
|
+
exchangePath: ''
|
|
100
111
|
}
|
|
101
112
|
},
|
|
102
113
|
watch: {
|
|
103
114
|
container(value) {
|
|
115
|
+
console.log('aaaa');
|
|
104
116
|
this.init(value)
|
|
105
117
|
}
|
|
106
118
|
},
|
|
@@ -157,11 +169,21 @@
|
|
|
157
169
|
this.$xdHideLoading();
|
|
158
170
|
})
|
|
159
171
|
},
|
|
172
|
+
handleToExchange() {
|
|
173
|
+
let params=Base64.encodeURI(`shop_id:${this.shopInfo.shop_id}`)
|
|
174
|
+
this.$xdUniHelper.navigateTo({
|
|
175
|
+
url: `${this.exchangePath}?x-params=${params}`
|
|
176
|
+
})
|
|
177
|
+
},
|
|
160
178
|
/**
|
|
161
179
|
* @description 监听事件变化
|
|
162
180
|
* @param container {object} 业务组件对象自己
|
|
163
181
|
*/
|
|
164
182
|
init(container) {
|
|
183
|
+
this.isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', 'N');
|
|
184
|
+
this.exchangeName = getContainerPropsValue(container, 'content.name', '随心兑');
|
|
185
|
+
this.exchangeRemark = getContainerPropsValue(container, 'content.remark', '到店消费任意金额可用');
|
|
186
|
+
this.exchangePath = getContainerPropsValue(container, 'content.exchangePath', {value: ""}).value;
|
|
165
187
|
},
|
|
166
188
|
|
|
167
189
|
toCallPhone(){
|
|
@@ -213,6 +235,17 @@
|
|
|
213
235
|
border-radius: unit(16, rpx);
|
|
214
236
|
padding: unit(24, rpx);
|
|
215
237
|
background: #FFFFFF;
|
|
238
|
+
|
|
239
|
+
&-exchange {
|
|
240
|
+
margin: unit(24, rpx) unit(42, rpx);
|
|
241
|
+
padding: unit(24, rpx);
|
|
242
|
+
background: #D8D8D8;
|
|
243
|
+
border-radius: unit(20,rpx);
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
justify-content: space-between;
|
|
247
|
+
color: #3D3D3D;
|
|
248
|
+
}
|
|
216
249
|
|
|
217
250
|
&-info {
|
|
218
251
|
display: flex;
|
|
@@ -45,6 +45,30 @@ export default {
|
|
|
45
45
|
},
|
|
46
46
|
inline: false,
|
|
47
47
|
},
|
|
48
|
+
{
|
|
49
|
+
label: '是否支持聚好兑:',
|
|
50
|
+
ele: 'xd-radio',
|
|
51
|
+
valueKey: 'isShowExchange',
|
|
52
|
+
value: data.isShowExchange || "Y",
|
|
53
|
+
rules: [
|
|
54
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
55
|
+
],
|
|
56
|
+
list: [
|
|
57
|
+
{"label": "支持", "value": "Y"},
|
|
58
|
+
{"label": "不支持", "value": "N"},
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: '兑换跳转路径:',
|
|
63
|
+
ele: 'xd-select-pages-path',
|
|
64
|
+
valueKey: 'exchangePath',
|
|
65
|
+
placeholder: '请选择兑换跳转路径',
|
|
66
|
+
value: data['exchangePath'] || null,
|
|
67
|
+
setting: {
|
|
68
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
69
|
+
},
|
|
70
|
+
inline: false,
|
|
71
|
+
},
|
|
48
72
|
...styleForm.getForm(data, '内容配置')
|
|
49
73
|
].filter(i=>i)
|
|
50
74
|
},
|
|
@@ -59,7 +59,8 @@
|
|
|
59
59
|
<view class="_name">{{item.resource_shop_name}}</view>
|
|
60
60
|
<view class="distance" v-if="item.distance">{{item.distance}}</view>
|
|
61
61
|
</view>
|
|
62
|
-
<view>
|
|
62
|
+
<view style="display:flex;justify-content:space-between">
|
|
63
|
+
<view>
|
|
63
64
|
<view class="shop_sub">
|
|
64
65
|
<view class="_icon"><xd-font-icon size="28" icon="icondizhitubiao"></xd-font-icon></view>
|
|
65
66
|
<view>{{getAddress(item)}}</view>
|
|
@@ -68,17 +69,25 @@
|
|
|
68
69
|
<view class="_icon"><xd-font-icon size="28" icon="icondianhuatubiao"></xd-font-icon></view>
|
|
69
70
|
<view>{{item.phone}}</view>
|
|
70
71
|
</view>
|
|
72
|
+
<view v-if="item.time_slot_name" class="shop_sub">
|
|
73
|
+
<view class="_icon"><xd-font-icon size="28" icon="iconshijian-01"></xd-font-icon></view>
|
|
74
|
+
<view>{{item.time_slot_name}}</view>
|
|
75
|
+
</view>
|
|
76
|
+
</view>
|
|
77
|
+
<xd-button @click="handleToExchange(item)" v-if="isShowExchange==='Y'" style="margin:0" type="primary" size="mini">去兑换</xd-button>
|
|
71
78
|
</view>
|
|
72
79
|
</view>
|
|
73
80
|
</view>
|
|
74
81
|
</view>
|
|
75
|
-
<view v-else-if="loaded" class="empty_data"
|
|
82
|
+
<view v-else-if="loaded" class="empty_data">当前地址暂无符合条件的店铺
|
|
83
|
+
换个地址看看吧~</view>
|
|
76
84
|
</view>
|
|
77
85
|
</view>
|
|
78
86
|
</template>
|
|
79
87
|
|
|
80
88
|
<script>
|
|
81
89
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
90
|
+
import XdButton from '@/components/XdButton/XdButton'
|
|
82
91
|
import { jfbRootExec } from "@/utils/xd.event";
|
|
83
92
|
import JfbMallShopListMixin from "./JfbMallShopListMixin";
|
|
84
93
|
import componentsMixins from "@/mixins/componentsMixins";
|
|
@@ -93,7 +102,8 @@
|
|
|
93
102
|
export default {
|
|
94
103
|
name: "JfbMallShopList",
|
|
95
104
|
components: {
|
|
96
|
-
XdFontIcon
|
|
105
|
+
XdFontIcon,
|
|
106
|
+
XdButton
|
|
97
107
|
},
|
|
98
108
|
mixins: [componentsMixins,extsMixins,JfbMallShopListMixin],
|
|
99
109
|
data() {
|
|
@@ -118,7 +128,9 @@
|
|
|
118
128
|
choseCityPath: "",
|
|
119
129
|
shopInfoPath: "",
|
|
120
130
|
...styleForm.getDataItem(),
|
|
121
|
-
selfMask: true
|
|
131
|
+
selfMask: true,
|
|
132
|
+
isShowExchange: 'Y',
|
|
133
|
+
exchangePath: ''
|
|
122
134
|
}
|
|
123
135
|
},
|
|
124
136
|
watch: {
|
|
@@ -169,8 +181,10 @@
|
|
|
169
181
|
* @param container {object} 业务组件对象自己
|
|
170
182
|
*/
|
|
171
183
|
init(container) {
|
|
184
|
+
this.isShowExchange = getContainerPropsValue(container, 'content.isShowExchange', 'Y');
|
|
172
185
|
this.choseCityPath = getContainerPropsValue(container, "content.choseCityPath", {value: ""}).value;
|
|
173
186
|
this.shopInfoPath = getContainerPropsValue(container, "content.shopInfoPath", {value: ""}).value;
|
|
187
|
+
this.exchangePath = getContainerPropsValue(container, "content.exchangePath", {value: ""}).value;
|
|
174
188
|
this.xnamespace = getContainerPropsValue(container, "content.xnamespace", this.projectAttr.business_code);
|
|
175
189
|
styleForm.getInitItem(this, container );
|
|
176
190
|
},
|
|
@@ -186,6 +200,12 @@
|
|
|
186
200
|
url: this.shopInfoPath + `?${params}`
|
|
187
201
|
})
|
|
188
202
|
},
|
|
203
|
+
handleToExchange(item) {
|
|
204
|
+
let params=Base64.encodeURI(`shop_id:${item.shop_id}`)
|
|
205
|
+
this.$xdUniHelper.navigateTo({
|
|
206
|
+
url: `${this.exchangePath}?x-params=${params}`
|
|
207
|
+
})
|
|
208
|
+
},
|
|
189
209
|
getList(){
|
|
190
210
|
this.loading = true;
|
|
191
211
|
this.$xdShowLoading({});
|
|
@@ -303,7 +323,7 @@
|
|
|
303
323
|
color: #666;
|
|
304
324
|
}
|
|
305
325
|
.shop_list{
|
|
306
|
-
padding: unit(24, rpx);
|
|
326
|
+
// padding: unit(24, rpx);
|
|
307
327
|
.shop_item{
|
|
308
328
|
display: flex;
|
|
309
329
|
justify-content: flex-start;
|
|
@@ -339,7 +359,7 @@
|
|
|
339
359
|
display: flex;
|
|
340
360
|
align-items: center;
|
|
341
361
|
justify-content: space-between;
|
|
342
|
-
font-size: unit(
|
|
362
|
+
font-size: unit(24, rpx);
|
|
343
363
|
line-height: unit(50, rpx);
|
|
344
364
|
color: #242424;
|
|
345
365
|
margin-bottom: unit(16, rpx);
|
|
@@ -365,9 +385,10 @@
|
|
|
365
385
|
.shop_sub{
|
|
366
386
|
display: flex;
|
|
367
387
|
color: #999;
|
|
368
|
-
font-size: unit(
|
|
369
|
-
margin-bottom: unit(
|
|
388
|
+
font-size: unit(18, rpx);
|
|
389
|
+
margin-bottom: unit(8, rpx);
|
|
370
390
|
line-height: unit(36, rpx);
|
|
391
|
+
max-width: unit(320,rpx);
|
|
371
392
|
._icon{
|
|
372
393
|
width: unit(40, rpx);
|
|
373
394
|
margin-right: unit(6, rpx);
|