jufubao-takeorder 1.0.2-beta1 → 1.0.2-beta3
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/{JfbTakeorderQuotedDetail → JfbTakeorderFilterOrderList}/Api.js +9 -9
- package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetail.vue → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue} +9 -9
- package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetailLess.less → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListLess.less} +2 -2
- package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetailMixin.js → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListMixin.js} +1 -1
- package/src/components/JfbTakeorderFilterOrderList/Mock.js +13 -0
- package/src/components/JfbTakeorderIndex/Api.js +9 -41
- package/src/components/JfbTakeorderIndex/Attr.js +9 -41
- package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +681 -85
- package/src/components/JfbTakeorderIndex/components/cityPicker.vue +299 -0
- package/src/components/JfbTakeorderIndex/components/order.vue +273 -0
- package/src/components/JfbTakeorderIndex/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderIndex/cusAttr/content.js +9 -0
- package/src/components/JfbTakeorderIndex/cusAttr/style.js +11 -0
- package/src/components/{JfbTakeorderQuotedList → JfbTakeorderOrderDetail}/Api.js +9 -9
- package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedList.vue → JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue} +9 -9
- package/src/components/{JfbTakeorderUnquotedList/JfbTakeorderUnquotedListLess.less → JfbTakeorderOrderDetail/JfbTakeorderOrderDetailLess.less} +2 -2
- package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetailMixin.js → JfbTakeorderOrderDetail/JfbTakeorderOrderDetailMixin.js} +1 -1
- package/src/components/JfbTakeorderOrderDetail/Mock.js +13 -0
- package/src/components/{JfbTakeorderUnquotedDetail → JfbTakeorderOrderList}/Api.js +9 -9
- package/src/components/JfbTakeorderOrderList/Attr.js +16 -0
- package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +168 -0
- package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedListLess.less → JfbTakeorderOrderList/JfbTakeorderOrderListLess.less} +2 -2
- package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedListMixin.js → JfbTakeorderOrderList/JfbTakeorderOrderListMixin.js} +1 -1
- package/src/components/JfbTakeorderOrderList/Mock.js +13 -0
- package/src/components/JfbTakeorderOrderList/components/order.vue +273 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/content.js +9 -0
- package/src/components/JfbTakeorderOrderList/cusAttr/style.js +11 -0
- package/src/components/{JfbTakeorderUnquotedList → JfbTakeorderVoiceSwitch}/Api.js +9 -9
- package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetail.vue → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue} +9 -9
- package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetailLess.less → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchLess.less} +2 -2
- package/src/components/{JfbTakeorderUnquotedList/JfbTakeorderUnquotedListMixin.js → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchMixin.js} +1 -1
- package/src/components/JfbTakeorderVoiceSwitch/Mock.js +13 -0
- package/src/components/JfbTakeorderQuotedDetail/Mock.js +0 -13
- package/src/components/JfbTakeorderQuotedList/Mock.js +0 -13
- package/src/components/JfbTakeorderUnquotedDetail/Mock.js +0 -13
- package/src/components/JfbTakeorderUnquotedList/Attr.js +0 -48
- package/src/components/JfbTakeorderUnquotedList/JfbTakeorderUnquotedList.vue +0 -113
- package/src/components/JfbTakeorderUnquotedList/Mock.js +0 -13
- /package/src/components/{JfbTakeorderQuotedDetail → JfbTakeorderFilterOrderList}/Attr.js +0 -0
- /package/src/components/{JfbTakeorderQuotedList → JfbTakeorderOrderDetail}/Attr.js +0 -0
- /package/src/components/{JfbTakeorderUnquotedDetail → JfbTakeorderVoiceSwitch}/Attr.js +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="wrap">
|
|
3
|
+
<view class="city-picker">
|
|
4
|
+
<!-- 热门城市 -->
|
|
5
|
+
<view class="hot-cities" v-if="hotCities.length > 0">
|
|
6
|
+
<view class="city-grid">
|
|
7
|
+
<view
|
|
8
|
+
class="city-item"
|
|
9
|
+
v-for="city in hotCities"
|
|
10
|
+
:key="city.city_code"
|
|
11
|
+
:style="{
|
|
12
|
+
color: isOptionSelected(city) ? mainColor : '',
|
|
13
|
+
border: isOptionSelected(city)
|
|
14
|
+
? `1px solid ${filterBorderColor}`
|
|
15
|
+
: '',
|
|
16
|
+
backgroundColor: isOptionSelected(city) ? filterBackground : '',
|
|
17
|
+
}"
|
|
18
|
+
@click="handleCityClick(city)"
|
|
19
|
+
>
|
|
20
|
+
{{ city.city_name }}
|
|
21
|
+
</view>
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
|
|
25
|
+
<!-- 主要内容区:城市列表和字母索引 -->
|
|
26
|
+
<view class="content">
|
|
27
|
+
<!-- 城市列表 -->
|
|
28
|
+
<scroll-view
|
|
29
|
+
class="city-list"
|
|
30
|
+
scroll-y
|
|
31
|
+
:scroll-with-animation="true"
|
|
32
|
+
:scroll-into-view="scrollToView"
|
|
33
|
+
@scroll="onScroll"
|
|
34
|
+
>
|
|
35
|
+
<view
|
|
36
|
+
v-for="group in cityGroups"
|
|
37
|
+
:key="group.letter"
|
|
38
|
+
:id="'group-' + group.letter"
|
|
39
|
+
class="city-group"
|
|
40
|
+
>
|
|
41
|
+
<view class="group-letter">{{ group.letter }}</view>
|
|
42
|
+
<view class="city-items">
|
|
43
|
+
<view
|
|
44
|
+
class="city-item"
|
|
45
|
+
v-for="city in group.cities"
|
|
46
|
+
:key="city.city_code"
|
|
47
|
+
:style="{
|
|
48
|
+
color: isOptionSelected(city) ? mainColor : '',
|
|
49
|
+
border: isOptionSelected(city)
|
|
50
|
+
? `1px solid ${filterBorderColor}`
|
|
51
|
+
: '',
|
|
52
|
+
backgroundColor: isOptionSelected(city)
|
|
53
|
+
? filterBackground
|
|
54
|
+
: '',
|
|
55
|
+
}"
|
|
56
|
+
@click="handleCityClick(city)"
|
|
57
|
+
>
|
|
58
|
+
{{ city.city_name }}
|
|
59
|
+
</view>
|
|
60
|
+
</view>
|
|
61
|
+
</view>
|
|
62
|
+
</scroll-view>
|
|
63
|
+
</view>
|
|
64
|
+
</view>
|
|
65
|
+
|
|
66
|
+
<!-- 右侧字母索引 -->
|
|
67
|
+
<view class="letter-index">
|
|
68
|
+
<view
|
|
69
|
+
class="letter-item"
|
|
70
|
+
v-for="letter in letters"
|
|
71
|
+
:key="letter"
|
|
72
|
+
@click="scrollToLetter(letter)"
|
|
73
|
+
:style="{ background: currentLetter === letter ? mainColor : '', color: currentLetter === letter ? '#fff' : ''}"
|
|
74
|
+
>
|
|
75
|
+
{{ letter }}
|
|
76
|
+
</view>
|
|
77
|
+
</view>
|
|
78
|
+
</view>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
export default {
|
|
83
|
+
// 接收父组件传递的属性
|
|
84
|
+
props: {
|
|
85
|
+
// 热门城市数据
|
|
86
|
+
hotCities: {
|
|
87
|
+
type: Array,
|
|
88
|
+
default: () => [],
|
|
89
|
+
},
|
|
90
|
+
// 按字母分组的城市数据
|
|
91
|
+
cityGroups: {
|
|
92
|
+
type: Array,
|
|
93
|
+
default: () => [],
|
|
94
|
+
},
|
|
95
|
+
// 字母列表
|
|
96
|
+
letters: {
|
|
97
|
+
type: Array,
|
|
98
|
+
default: () => [],
|
|
99
|
+
},
|
|
100
|
+
// 当前选中的城市,由父组件控制
|
|
101
|
+
selectedCity: {
|
|
102
|
+
type: Array,
|
|
103
|
+
default: [],
|
|
104
|
+
},
|
|
105
|
+
// 主色调
|
|
106
|
+
mainColor: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "#ff6600",
|
|
109
|
+
},
|
|
110
|
+
// 过滤框边框颜色
|
|
111
|
+
filterBorderColor: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: "#ff6600",
|
|
114
|
+
},
|
|
115
|
+
// 过滤框背景颜色
|
|
116
|
+
filterBackground: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: "#ff6600",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
data() {
|
|
122
|
+
return {
|
|
123
|
+
// 滚动相关
|
|
124
|
+
scrollToView: "",
|
|
125
|
+
currentLetter: "",
|
|
126
|
+
// 用于计算滚动位置的分组高度
|
|
127
|
+
groupHeights: {},
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
// 当城市分组数据变化时,重新计算高度
|
|
132
|
+
cityGroups() {
|
|
133
|
+
this.$nextTick(() => {
|
|
134
|
+
this.calculateGroupHeights();
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
mounted() {
|
|
139
|
+
// 初始化时计算分组高度
|
|
140
|
+
this.$nextTick(() => {
|
|
141
|
+
this.calculateGroupHeights();
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
methods: {
|
|
145
|
+
// 计算每个字母分组的高度,用于滚动定位
|
|
146
|
+
calculateGroupHeights() {
|
|
147
|
+
this.groupHeights = {};
|
|
148
|
+
this.cityGroups.forEach((group) => {
|
|
149
|
+
const query = uni.createSelectorQuery().in(this);
|
|
150
|
+
query
|
|
151
|
+
.select(`#group-${group.letter}`)
|
|
152
|
+
.boundingClientRect((data) => {
|
|
153
|
+
if (data) {
|
|
154
|
+
this.groupHeights[group.letter] = {
|
|
155
|
+
top: data.top,
|
|
156
|
+
bottom: data.bottom,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
})
|
|
160
|
+
.exec();
|
|
161
|
+
});
|
|
162
|
+
},
|
|
163
|
+
isOptionSelected(city) {
|
|
164
|
+
return this.selectedCity && this.selectedCity.includes(city.city_code);
|
|
165
|
+
},
|
|
166
|
+
// 处理城市点击事件
|
|
167
|
+
handleCityClick(city) {
|
|
168
|
+
// 向父组件发射城市选中事件
|
|
169
|
+
this.$emit("citySelect", city);
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
// 滚动到指定字母分组
|
|
173
|
+
scrollToLetter(letter) {
|
|
174
|
+
// 检查是否存在该字母的城市分组
|
|
175
|
+
const hasGroup = this.cityGroups.some((group) => group.letter === letter);
|
|
176
|
+
if (hasGroup) {
|
|
177
|
+
this.scrollToView = `group-${letter}`;
|
|
178
|
+
this.currentLetter = letter;
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
// 监听滚动事件,更新当前字母
|
|
183
|
+
onScroll(e) {
|
|
184
|
+
const scrollTop = e.detail.scrollTop + 100; // 加一个偏移量
|
|
185
|
+
|
|
186
|
+
// 遍历所有分组高度,找到当前可见的分组
|
|
187
|
+
for (const letter in this.groupHeights) {
|
|
188
|
+
const { top, bottom } = this.groupHeights[letter];
|
|
189
|
+
if (scrollTop >= top && scrollTop < bottom) {
|
|
190
|
+
this.currentLetter = letter;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
</script>
|
|
198
|
+
|
|
199
|
+
<style scoped lang="less">
|
|
200
|
+
.city-picker {
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
height: 100%;
|
|
204
|
+
background-color: #fff;
|
|
205
|
+
padding-right: 40rpx;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.wrap {
|
|
209
|
+
display: flex;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.hot-cities {
|
|
213
|
+
background-color: #fff;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.section-title {
|
|
217
|
+
font-size: 28rpx;
|
|
218
|
+
color: #666;
|
|
219
|
+
margin-bottom: 24rpx;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.city-grid {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-wrap: wrap;
|
|
225
|
+
gap: 24rpx;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.content {
|
|
229
|
+
display: flex;
|
|
230
|
+
flex: 1;
|
|
231
|
+
position: relative;
|
|
232
|
+
overflow: hidden;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.city-list {
|
|
236
|
+
flex: 1;
|
|
237
|
+
height: 100%;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.city-group {
|
|
241
|
+
padding: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.group-letter {
|
|
245
|
+
font-size: 28rpx;
|
|
246
|
+
color: #999999;
|
|
247
|
+
background-color: #fff;
|
|
248
|
+
padding-left: 20rpx;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.city-items {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-wrap: wrap;
|
|
254
|
+
gap: 24rpx;
|
|
255
|
+
padding: 24rpx 0 0 0;
|
|
256
|
+
background-color: #fff;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.city-item {
|
|
260
|
+
border-radius: 4rpx;
|
|
261
|
+
background: #fafafa;
|
|
262
|
+
display: flex;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
align-items: center;
|
|
265
|
+
padding: 16rpx 0;
|
|
266
|
+
color: #666666;
|
|
267
|
+
font-size: 24rpx;
|
|
268
|
+
flex: 0 0 calc((100% - 3 * 24rpx) / 4); /* flex-grow: 0, flex-shrink: 0, flex-basis: ... */
|
|
269
|
+
box-sizing: border-box;
|
|
270
|
+
/* 强制文本在一行内显示 */
|
|
271
|
+
white-space: nowrap;
|
|
272
|
+
/* 超出容器部分隐藏 */
|
|
273
|
+
overflow: hidden;
|
|
274
|
+
/* 用省略号表示超出部分 */
|
|
275
|
+
text-overflow: ellipsis;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.letter-index {
|
|
279
|
+
width: 60rpx;
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
align-items: baseline;
|
|
283
|
+
justify-content: flex-start;
|
|
284
|
+
background-color: transparent;
|
|
285
|
+
padding-right: 10rpx;
|
|
286
|
+
position: fixed;
|
|
287
|
+
right: -20rpx;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.letter-item {
|
|
291
|
+
width: 35rpx;
|
|
292
|
+
height: 35rpx;
|
|
293
|
+
line-height: 35rpx;
|
|
294
|
+
text-align: center;
|
|
295
|
+
font-size: 20rpx;
|
|
296
|
+
color: #333;
|
|
297
|
+
border-radius: 50%;
|
|
298
|
+
}
|
|
299
|
+
</style>
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="order-wrap">
|
|
3
|
+
<view :style="{ background: mainColor }" class="order-time">
|
|
4
|
+
<XdFontIcon
|
|
5
|
+
style="margin: 0 24rpx 0 36rpx"
|
|
6
|
+
icon="iconshijian-01"
|
|
7
|
+
size="30"
|
|
8
|
+
></XdFontIcon>
|
|
9
|
+
剩余报价时间:<text v-if="item.remainingTime > 0">{{
|
|
10
|
+
formatCountdown(item.remainingTime)
|
|
11
|
+
}}</text
|
|
12
|
+
>,参与报价<text style="color: #ffeb3b">{{ item.people }}</text
|
|
13
|
+
>人</view
|
|
14
|
+
>
|
|
15
|
+
<view class="order-title">
|
|
16
|
+
<view class="order-title-left">
|
|
17
|
+
<view>{{ item.shop_name }}</view>
|
|
18
|
+
<text>|</text>
|
|
19
|
+
<view>{{ item.brand_name }}</view>
|
|
20
|
+
</view>
|
|
21
|
+
<view class="order-title-right">{{ item.city }}</view>
|
|
22
|
+
</view>
|
|
23
|
+
<view
|
|
24
|
+
v-for="(Pitem, Pindex) in item.products"
|
|
25
|
+
:key="Pindex"
|
|
26
|
+
class="order-product"
|
|
27
|
+
>
|
|
28
|
+
<image :src="Pitem.product_thumb"></image>
|
|
29
|
+
<view class="order-product-info">
|
|
30
|
+
<view class="order-product-info-name">{{ Pitem.product_name }}</view>
|
|
31
|
+
<view class="order-product-info-sku"
|
|
32
|
+
>规格:{{ Pitem.product_sku }}</view
|
|
33
|
+
>
|
|
34
|
+
<view class="order-product-info-price">
|
|
35
|
+
<view class="order-product-info-price-left"
|
|
36
|
+
><text>¥ </text>{{ Pitem.minPrice }}<text class="range">~</text
|
|
37
|
+
><text>¥ </text>{{ Pitem.maxPrice }}</view
|
|
38
|
+
>
|
|
39
|
+
<view class="order-product-info-price-right"
|
|
40
|
+
><XdFontIcon
|
|
41
|
+
icon="icondanchuangguanbi_xian"
|
|
42
|
+
color="#999"
|
|
43
|
+
size="14"
|
|
44
|
+
></XdFontIcon
|
|
45
|
+
><view>{{ Pitem.num }}</view></view
|
|
46
|
+
>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
<view class="order-price">
|
|
51
|
+
<view class="order-price-left">
|
|
52
|
+
<view class="order-price-left-market"
|
|
53
|
+
>市场原价:¥{{ item.market_price }}(仅供参考)</view
|
|
54
|
+
>
|
|
55
|
+
<view class="order-price-left-settle"
|
|
56
|
+
>结算价格:<view
|
|
57
|
+
><text>¥ </text>{{ item.minPrice }}<text class="range">~</text
|
|
58
|
+
><text>¥ </text>{{ item.maxPrice }}</view
|
|
59
|
+
></view
|
|
60
|
+
>
|
|
61
|
+
</view>
|
|
62
|
+
<view>
|
|
63
|
+
<XdButton @click="handleClick" type="primary" size="small"
|
|
64
|
+
>报价</XdButton
|
|
65
|
+
>
|
|
66
|
+
</view>
|
|
67
|
+
</view>
|
|
68
|
+
</view>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
73
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
74
|
+
|
|
75
|
+
export default {
|
|
76
|
+
name: "order",
|
|
77
|
+
components: {
|
|
78
|
+
XdFontIcon,
|
|
79
|
+
XdButton,
|
|
80
|
+
},
|
|
81
|
+
data() {
|
|
82
|
+
return {
|
|
83
|
+
isUpdating: false,
|
|
84
|
+
countdownTimer: null,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
props: {
|
|
88
|
+
mainColor: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "",
|
|
91
|
+
},
|
|
92
|
+
item: {
|
|
93
|
+
type: Object,
|
|
94
|
+
default: () => {},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
computed: {},
|
|
98
|
+
watch: {
|
|
99
|
+
// 当父组件更新了 order.status 时,停止倒计时
|
|
100
|
+
'item.status'(newVal) {
|
|
101
|
+
if (newVal !== 'pending') {
|
|
102
|
+
this.clearCountdownTimer();
|
|
103
|
+
this.isUpdating = false; // 重置更新状态
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
// 当父组件更新了 order.remainingTime 时(例如页面重新显示时的校准),重启倒计时
|
|
107
|
+
'item.remainingTime'(newVal) {
|
|
108
|
+
if (this.item.status === 'pending' && newVal > 0) {
|
|
109
|
+
this.startCountdown();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
created() {
|
|
114
|
+
// 组件创建时,如果是待支付状态,就启动倒计时
|
|
115
|
+
if (this.item.remainingTime > 0) {
|
|
116
|
+
this.startCountdown();
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
destroyed() {
|
|
120
|
+
// 组件销毁时,清理定时器
|
|
121
|
+
this.clearCountdownTimer();
|
|
122
|
+
},
|
|
123
|
+
methods: {
|
|
124
|
+
formatCountdown(seconds) {
|
|
125
|
+
const mins = Math.floor(seconds / 60);
|
|
126
|
+
const secs = seconds % 60;
|
|
127
|
+
return `${mins.toString().padStart(2, "0")}:${secs
|
|
128
|
+
.toString()
|
|
129
|
+
.padStart(2, "0")}`;
|
|
130
|
+
},
|
|
131
|
+
// 数字补零(小于10补前导零)
|
|
132
|
+
padZero(num) {
|
|
133
|
+
return num < 10 ? `0${num}` : num;
|
|
134
|
+
},
|
|
135
|
+
startCountdown() {
|
|
136
|
+
this.clearCountdownTimer();
|
|
137
|
+
this.countdownTimer = setInterval(() => {
|
|
138
|
+
// 这里我们不直接修改 props,而是在倒计时结束时通知父组件
|
|
139
|
+
if (this.item.remainingTime <= 1) {
|
|
140
|
+
// 当倒计时即将结束时
|
|
141
|
+
this.clearCountdownTimer();
|
|
142
|
+
this.isUpdating = true; // 显示“更新中”状态
|
|
143
|
+
this.$emit("expire", this.item.id); // 通知父组件:我过期了!
|
|
144
|
+
} else {
|
|
145
|
+
// 为了UI流畅,可以在这里更新本地倒计时显示,但最终数据以父组件为准
|
|
146
|
+
// 注意:这是一个小技巧,避免每秒都向父组件发送事件
|
|
147
|
+
this.$set(this.item, "remainingTime", this.item.remainingTime - 1);
|
|
148
|
+
}
|
|
149
|
+
}, 1000);
|
|
150
|
+
},
|
|
151
|
+
clearCountdownTimer() {
|
|
152
|
+
if (this.countdownTimer) {
|
|
153
|
+
clearInterval(this.countdownTimer);
|
|
154
|
+
this.countdownTimer = null;
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
handleClick() {
|
|
158
|
+
this.$emit("btnEvent", this.item);
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<style lang="less" scoped>
|
|
165
|
+
.order {
|
|
166
|
+
&-wrap {
|
|
167
|
+
background: #fff;
|
|
168
|
+
color: #333;
|
|
169
|
+
margin: 16rpx;
|
|
170
|
+
border-radius: 20rpx;
|
|
171
|
+
}
|
|
172
|
+
&-time {
|
|
173
|
+
color: #fff;
|
|
174
|
+
font-size: 24rpx;
|
|
175
|
+
padding: 20rpx 0;
|
|
176
|
+
border-radius: 20rpx 20rpx 0 0;
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
}
|
|
180
|
+
&-title {
|
|
181
|
+
display: flex;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
padding: 24rpx 32rpx;
|
|
184
|
+
border-bottom: 1px solid #f4f4f4;
|
|
185
|
+
&-left {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
}
|
|
189
|
+
&-right {
|
|
190
|
+
font-weight: 500;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
&-product {
|
|
194
|
+
display: flex;
|
|
195
|
+
padding: 16rpx 32rpx;
|
|
196
|
+
border-bottom: 1px solid #f4f4f4;
|
|
197
|
+
& > image {
|
|
198
|
+
width: 180rpx;
|
|
199
|
+
height: 180rpx;
|
|
200
|
+
flex-shrink: 0;
|
|
201
|
+
border: 10rpx;
|
|
202
|
+
}
|
|
203
|
+
&-info {
|
|
204
|
+
margin-left: 24rpx;
|
|
205
|
+
&-name {
|
|
206
|
+
.uni-max-cut(2,80);
|
|
207
|
+
margin-bottom: 10rpx;
|
|
208
|
+
}
|
|
209
|
+
&-sku {
|
|
210
|
+
font-size: 24rpx;
|
|
211
|
+
color: #999;
|
|
212
|
+
}
|
|
213
|
+
&-price {
|
|
214
|
+
margin-top: 10rpx;
|
|
215
|
+
display: flex;
|
|
216
|
+
justify-content: space-between;
|
|
217
|
+
align-items: center;
|
|
218
|
+
&-left {
|
|
219
|
+
color: #ff2c18;
|
|
220
|
+
font-size: 32rpx;
|
|
221
|
+
font-weight: 500;
|
|
222
|
+
& > text {
|
|
223
|
+
font-size: 24rpx;
|
|
224
|
+
margin-right: 10rpx;
|
|
225
|
+
}
|
|
226
|
+
.range {
|
|
227
|
+
margin: 0 10rpx;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
&-right {
|
|
231
|
+
color: #999;
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: baseline;
|
|
234
|
+
& > view {
|
|
235
|
+
margin-left: 10rpx;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
&-price {
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: space-between;
|
|
244
|
+
align-items: center;
|
|
245
|
+
padding: 24rpx 32rpx;
|
|
246
|
+
border-radius: 0 0 20rpx 20rpx;
|
|
247
|
+
&-left {
|
|
248
|
+
&-market {
|
|
249
|
+
font-size: 24rpx;
|
|
250
|
+
color: #999;
|
|
251
|
+
margin-bottom: 10rpx;
|
|
252
|
+
}
|
|
253
|
+
&-settle {
|
|
254
|
+
font-size: 24rpx;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
& > view {
|
|
258
|
+
color: #ff2c18;
|
|
259
|
+
font-size: 32rpx;
|
|
260
|
+
font-weight: 500;
|
|
261
|
+
& > text {
|
|
262
|
+
font-size: 24rpx;
|
|
263
|
+
margin-right: 10rpx;
|
|
264
|
+
}
|
|
265
|
+
.range {
|
|
266
|
+
margin: 0 10rpx;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {
|
|
3
|
+
dataVal,
|
|
4
|
+
statusDataVal,
|
|
5
|
+
statusShow
|
|
6
|
+
} from "@/utils/AttrTools";
|
|
7
|
+
export default (data, gValue, gColor, oldData = {}) => {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
label: '订单详情',
|
|
11
|
+
ele: 'xd-select-pages-path',
|
|
12
|
+
labelInline: true,
|
|
13
|
+
valueKey: 'order_detail_path',
|
|
14
|
+
placeholder: '请选择订单详情页面',
|
|
15
|
+
className: 'input100',
|
|
16
|
+
value: dataVal({ data, key: 'order_detail_path', dValue: null, gValue }),
|
|
17
|
+
groupKey: 'advanced',
|
|
18
|
+
inline: false,
|
|
19
|
+
setting: {
|
|
20
|
+
mode: 'new',
|
|
21
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
].filter(i => i)
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
3
|
* @description 接口配置,
|
|
4
|
-
* 在设置方法名字当时候,别忘记加上【模块名字】:
|
|
4
|
+
* 在设置方法名字当时候,别忘记加上【模块名字】:Order
|
|
5
5
|
* @type {*[]}
|
|
6
6
|
*/
|
|
7
7
|
module.exports = [
|
|
8
8
|
{
|
|
9
|
-
//设置方法名字当别忘记加上【模块名字】:
|
|
10
|
-
mapFnName: '
|
|
9
|
+
//设置方法名字当别忘记加上【模块名字】:Order
|
|
10
|
+
mapFnName: 'getOrderByIdFilmSquate',
|
|
11
11
|
title: '获取电影广场列表',
|
|
12
12
|
path: '/api/account/film/list-film-square',
|
|
13
13
|
isRule: false,
|
|
@@ -19,8 +19,8 @@ module.exports = [
|
|
|
19
19
|
disabled: true,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
//设置方法名字当别忘记加上【模块名字】:
|
|
23
|
-
mapFnName: '
|
|
22
|
+
//设置方法名字当别忘记加上【模块名字】:Order
|
|
23
|
+
mapFnName: 'updateOrderFilmPaiqiDate',
|
|
24
24
|
title: '更新排期',
|
|
25
25
|
path: '/api/account/film/paiqi-date',
|
|
26
26
|
isRule: false,
|
|
@@ -32,8 +32,8 @@ module.exports = [
|
|
|
32
32
|
disabled: true,
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
//设置方法名字当别忘记加上【模块名字】:
|
|
36
|
-
mapFnName: '
|
|
35
|
+
//设置方法名字当别忘记加上【模块名字】:Order
|
|
36
|
+
mapFnName: 'removeOrderFilmAddress',
|
|
37
37
|
title: '删除我的配送地址',
|
|
38
38
|
path: '/api/account/film/paiqi-date',
|
|
39
39
|
isRule: false,
|
|
@@ -44,8 +44,8 @@ module.exports = [
|
|
|
44
44
|
disabled: true,
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
//设置方法名字当别忘记加上【模块名字】:
|
|
48
|
-
mapFnName: '
|
|
47
|
+
//设置方法名字当别忘记加上【模块名字】:Order
|
|
48
|
+
mapFnName: 'addOrderFilmcart',
|
|
49
49
|
title: '添加购物车',
|
|
50
50
|
path: '/api/account/film/paiqi-date',
|
|
51
51
|
isRule: false,
|