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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/components/{JfbTakeorderQuotedDetail → JfbTakeorderFilterOrderList}/Api.js +9 -9
  3. package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetail.vue → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue} +9 -9
  4. package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetailLess.less → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListLess.less} +2 -2
  5. package/src/components/{JfbTakeorderUnquotedDetail/JfbTakeorderUnquotedDetailMixin.js → JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListMixin.js} +1 -1
  6. package/src/components/JfbTakeorderFilterOrderList/Mock.js +13 -0
  7. package/src/components/JfbTakeorderIndex/Api.js +9 -41
  8. package/src/components/JfbTakeorderIndex/Attr.js +9 -41
  9. package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +681 -85
  10. package/src/components/JfbTakeorderIndex/components/cityPicker.vue +299 -0
  11. package/src/components/JfbTakeorderIndex/components/order.vue +273 -0
  12. package/src/components/JfbTakeorderIndex/cusAttr/advanced.js +26 -0
  13. package/src/components/JfbTakeorderIndex/cusAttr/content.js +9 -0
  14. package/src/components/JfbTakeorderIndex/cusAttr/style.js +11 -0
  15. package/src/components/{JfbTakeorderQuotedList → JfbTakeorderOrderDetail}/Api.js +9 -9
  16. package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedList.vue → JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue} +9 -9
  17. package/src/components/{JfbTakeorderUnquotedList/JfbTakeorderUnquotedListLess.less → JfbTakeorderOrderDetail/JfbTakeorderOrderDetailLess.less} +2 -2
  18. package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetailMixin.js → JfbTakeorderOrderDetail/JfbTakeorderOrderDetailMixin.js} +1 -1
  19. package/src/components/JfbTakeorderOrderDetail/Mock.js +13 -0
  20. package/src/components/{JfbTakeorderUnquotedDetail → JfbTakeorderOrderList}/Api.js +9 -9
  21. package/src/components/JfbTakeorderOrderList/Attr.js +16 -0
  22. package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +168 -0
  23. package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedListLess.less → JfbTakeorderOrderList/JfbTakeorderOrderListLess.less} +2 -2
  24. package/src/components/{JfbTakeorderQuotedList/JfbTakeorderQuotedListMixin.js → JfbTakeorderOrderList/JfbTakeorderOrderListMixin.js} +1 -1
  25. package/src/components/JfbTakeorderOrderList/Mock.js +13 -0
  26. package/src/components/JfbTakeorderOrderList/components/order.vue +273 -0
  27. package/src/components/JfbTakeorderOrderList/cusAttr/advanced.js +26 -0
  28. package/src/components/JfbTakeorderOrderList/cusAttr/content.js +9 -0
  29. package/src/components/JfbTakeorderOrderList/cusAttr/style.js +11 -0
  30. package/src/components/{JfbTakeorderUnquotedList → JfbTakeorderVoiceSwitch}/Api.js +9 -9
  31. package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetail.vue → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue} +9 -9
  32. package/src/components/{JfbTakeorderQuotedDetail/JfbTakeorderQuotedDetailLess.less → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchLess.less} +2 -2
  33. package/src/components/{JfbTakeorderUnquotedList/JfbTakeorderUnquotedListMixin.js → JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchMixin.js} +1 -1
  34. package/src/components/JfbTakeorderVoiceSwitch/Mock.js +13 -0
  35. package/src/components/JfbTakeorderQuotedDetail/Mock.js +0 -13
  36. package/src/components/JfbTakeorderQuotedList/Mock.js +0 -13
  37. package/src/components/JfbTakeorderUnquotedDetail/Mock.js +0 -13
  38. package/src/components/JfbTakeorderUnquotedList/Attr.js +0 -48
  39. package/src/components/JfbTakeorderUnquotedList/JfbTakeorderUnquotedList.vue +0 -113
  40. package/src/components/JfbTakeorderUnquotedList/Mock.js +0 -13
  41. /package/src/components/{JfbTakeorderQuotedDetail → JfbTakeorderFilterOrderList}/Attr.js +0 -0
  42. /package/src/components/{JfbTakeorderQuotedList → JfbTakeorderOrderDetail}/Attr.js +0 -0
  43. /package/src/components/{JfbTakeorderUnquotedDetail → JfbTakeorderVoiceSwitch}/Attr.js +0 -0
@@ -1,21 +1,21 @@
1
1
  <template>
2
2
  <view
3
- class="jfb-takeorder-quoted-list"
3
+ class="jfb-takeorder-order-detail"
4
4
  @click="handleEditxSelect"
5
5
  :class="{ editx : isEditx && active }"
6
6
  >
7
7
  <!--#ifdef H5-->
8
8
  <view
9
- class="jfb-takeorder-quoted-list__edit"
9
+ class="jfb-takeorder-order-detail__edit"
10
10
  :class="{ editx : isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-takeorder-quoted-list__edit-icon" @click.stop="delEdit">
13
+ <view class="jfb-takeorder-order-detail__edit-icon" @click.stop="delEdit">
14
14
  <xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
15
15
  </view>
16
16
  </view>
17
17
  <!-- #endif -->
18
- <view class="jfb-takeorder-quoted-list__body">
18
+ <view class="jfb-takeorder-order-detail__body">
19
19
  <view>测试插件( {{containerId}} )</view>
20
20
  </view>
21
21
  </view>
@@ -24,17 +24,17 @@
24
24
  <script>
25
25
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
26
26
  import { jfbRootExec } from "@/utils/xd.event";
27
- import JfbTakeorderQuotedListMixin from "./JfbTakeorderQuotedListMixin";
27
+ import JfbTakeorderOrderDetailMixin from "./JfbTakeorderOrderDetailMixin";
28
28
  import { getContainerPropsValue } from "@/utils/xd.base";
29
29
  import componentsMixins from "@/mixins/componentsMixins";
30
30
  import extsMixins from "@/mixins/extsMixins";
31
31
  export default {
32
- name: "JfbTakeorderQuotedList",
32
+ name: "JfbTakeorderOrderDetail",
33
33
  components: {
34
34
  XdFontIcon
35
35
  },
36
36
  mixins: [
37
- componentsMixins, extsMixins, JfbTakeorderQuotedListMixin
37
+ componentsMixins, extsMixins, JfbTakeorderOrderDetailMixin
38
38
  ],
39
39
  data() {
40
40
  return {
@@ -103,9 +103,9 @@
103
103
  </script>
104
104
 
105
105
  <style scoped lang="less">
106
- @import "./JfbTakeorderQuotedListLess.less";
106
+ @import "./JfbTakeorderOrderDetailLess.less";
107
107
 
108
- .jfb-takeorder-quoted-list {
108
+ .jfb-takeorder-order-detail {
109
109
  &__body{
110
110
 
111
111
  }
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  //start
15
- .jfb-takeorder-unquoted-list {
15
+ .jfb-takeorder-order-detail {
16
16
  box-sizing: border-box;
17
17
 
18
18
  &__body{
@@ -71,7 +71,7 @@
71
71
 
72
72
 
73
73
  /**notPreview**/
74
- .jfb-takeorder-unquoted-list {
74
+ .jfb-takeorder-order-detail {
75
75
  //&:before {
76
76
  //content: " ";
77
77
  //display: table;
@@ -16,7 +16,7 @@ export default {
16
16
  //@EndAttrData
17
17
 
18
18
  // #endif
19
- cssRoot: 'jfb-takeorder-quoted-detail'
19
+ cssRoot: 'jfb-takeorder-order-detail'
20
20
  }
21
21
  },
22
22
  created() {
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ getOrderByIdFilmSquate:{},
6
+
7
+ updateOrderFilmPaiqiDate:{},
8
+
9
+ removeOrderFilmAddress:{},
10
+
11
+ addOrderFilmcart:{},
12
+
13
+ }
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
  /**
3
3
  * @description 接口配置,
4
- * 在设置方法名字当时候,别忘记加上【模块名字】:Unquoted
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Order
5
5
  * @type {*[]}
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- //设置方法名字当别忘记加上【模块名字】:Unquoted
10
- mapFnName: 'getUnquotedByIdFilmSquate',
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
- //设置方法名字当别忘记加上【模块名字】:Unquoted
23
- mapFnName: 'updateUnquotedFilmPaiqiDate',
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
- //设置方法名字当别忘记加上【模块名字】:Unquoted
36
- mapFnName: 'removeUnquotedFilmAddress',
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
- //设置方法名字当别忘记加上【模块名字】:Unquoted
48
- mapFnName: 'addUnquotedFilmcart',
47
+ //设置方法名字当别忘记加上【模块名字】:Order
48
+ mapFnName: 'addOrderFilmcart',
49
49
  title: '添加购物车',
50
50
  path: '/api/account/film/paiqi-date',
51
51
  isRule: false,
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+ import Style from './cusAttr/style'
3
+ import Advanced from './cusAttr/advanced'
4
+ import Content from './cusAttr/content'
5
+
6
+ export default {
7
+ style: [],
8
+ content: (data, gValue, gColor, oldData) => {
9
+ return [
10
+ ...Content(data, gValue, gColor, oldData),
11
+ ...Style(data, gValue, gColor, oldData),
12
+ ...Advanced(data, gValue, gColor, oldData),
13
+ ].filter(i => i)
14
+ },
15
+ advanced: [],
16
+ }
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <view
3
+ class="jfb-takeorder-order-list"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-takeorder-order-list__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-takeorder-order-list__edit-icon" @click.stop="delEdit">
14
+ <xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
15
+ </view>
16
+ </view>
17
+ <!-- #endif -->
18
+ <view class="jfb-takeorder-order-list__body">
19
+ <view
20
+ v-if="showNew"
21
+ @click="handleRefresh"
22
+ :style="{ color: warningColor, background: newBackgroundColor }"
23
+ class="jfb-takeorder-quoted-list__body-new"
24
+ ><XdFontIcon size="24" icon="iconIM"></XdFontIcon>
25
+ <view>新的订单来了,点我立即刷新</view></view
26
+ >
27
+ <view v-for="(item, index) in orderList" :key="index">
28
+ <Order
29
+ :item="item"
30
+ :mainColor="mainColor"
31
+ @expire="handleOrderExpire"
32
+ @btnEvent="handleBtnEvent"
33
+ ></Order>
34
+ </view>
35
+ </view>
36
+ </view>
37
+ </template>
38
+
39
+ <script>
40
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
41
+ import { jfbRootExec } from "@/utils/xd.event";
42
+ import JfbTakeorderOrderListMixin from "./JfbTakeorderOrderListMixin";
43
+ import { getContainerPropsValue } from "@/utils/xd.base";
44
+ import componentsMixins from "@/mixins/componentsMixins";
45
+ import extsMixins from "@/mixins/extsMixins";
46
+ import Order from "./components/order.vue";
47
+ const Color = require("color");
48
+ export default {
49
+ name: "JfbTakeorderOrderList",
50
+ components: {
51
+ XdFontIcon,
52
+ Order,
53
+ },
54
+ mixins: [
55
+ componentsMixins, extsMixins, JfbTakeorderOrderListMixin
56
+ ],
57
+ data() {
58
+ return {
59
+ newBackgroundColor: "",
60
+ showNew: false,
61
+ orderList: [
62
+ {
63
+ id: 1,
64
+ num: 15,
65
+ people: 30,
66
+ remainingTime: 10,
67
+ shop_name: "味多美(北京西单大悦城店)",
68
+ brand_name: "味多美",
69
+ city: "北京市",
70
+ products: [
71
+ {
72
+ product_thumb:
73
+ "https://img.js.design/assets/img/68b554c9c3a1ea02642d7d2f.png#afa2b9b9d50bcd2f1394619ecc488a99",
74
+ product_name:
75
+ "贝欧宝 BIOBOR贝欧宝维生素C+叶黄素酯软糖118g多重营养3D小熊造型糖果Q弹维生素C+叶黄素酯软糖",
76
+ product_sku: "118g",
77
+ minPrice: 132,
78
+ maxPrice: 1232,
79
+ num: 15,
80
+ },
81
+ {
82
+ product_thumb:
83
+ "https://img.js.design/assets/img/68b554c9c3a1ea02642d7d2f.png#afa2b9b9d50bcd2f1394619ecc488a99",
84
+ product_name:
85
+ "贝欧宝 BIOBOR贝欧宝维生素C+叶黄素酯软糖118g多重营养3D小熊造型糖果Q弹维生素C+叶黄素酯软糖",
86
+ product_sku: "450g",
87
+ minPrice: 456,
88
+ maxPrice: 1546,
89
+ num: 16,
90
+ },
91
+ ],
92
+ market_price: 4000,
93
+ minPrice: 456,
94
+ maxPrice: 1546,
95
+ order_status: 1,
96
+ },
97
+ ],
98
+ }
99
+ },
100
+ watch: {
101
+ container(value, oldValue) {
102
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
103
+ if (this.$configProject['isPreview']) this.init(value)
104
+ },
105
+ },
106
+ created() {
107
+ this.init(this.container);
108
+
109
+ //todo
110
+ },
111
+ methods: {
112
+ onJfbLoad(options) {
113
+
114
+ // jfbRootExec('baiduUserLogin', {
115
+
116
+ // vm: this,// data: {
117
+
118
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
119
+
120
+ // }
121
+
122
+ // }).then().catch()
123
+ },
124
+ /**
125
+ * @description 监听事件变化
126
+ * @param container {object} 业务组件对象自己
127
+ */
128
+ init(container) {
129
+ this.newBackgroundColor = Color(this.warningColor).alpha(0.15).toString();
130
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
131
+
132
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
133
+ },
134
+ onJfbScroll(options) {
135
+ console.log('event.onJfbScroll', options)
136
+ },
137
+ onJfbReachBottom(options) {
138
+ console.log('event.onJfbReachBottom', options)
139
+ },
140
+ onJfbShow(options) {
141
+ console.log('event.onJfbShow', options)
142
+ },
143
+ onJfbHide(options) {
144
+ console.log('event.onJfbHide', options)
145
+ },
146
+ onJfbBack(options) {
147
+ console.log('event.onJfbBack', options)
148
+ },
149
+ onJfbUpdate(...data) {
150
+ console.log('event.onJfbUpdate', data)
151
+ },
152
+ onJfbCustomEvent(options) {
153
+ console.log('event.onJfbReachBottom', options)
154
+ },
155
+ }
156
+ }
157
+
158
+ </script>
159
+
160
+ <style scoped lang="less">
161
+ @import "./JfbTakeorderOrderListLess.less";
162
+
163
+ .jfb-takeorder-order-list {
164
+ &__body{
165
+
166
+ }
167
+ }
168
+ </style>
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  //start
15
- .jfb-takeorder-quoted-list {
15
+ .jfb-takeorder-order-list {
16
16
  box-sizing: border-box;
17
17
 
18
18
  &__body{
@@ -71,7 +71,7 @@
71
71
 
72
72
 
73
73
  /**notPreview**/
74
- .jfb-takeorder-quoted-list {
74
+ .jfb-takeorder-order-list {
75
75
  //&:before {
76
76
  //content: " ";
77
77
  //display: table;
@@ -16,7 +16,7 @@ export default {
16
16
  //@EndAttrData
17
17
 
18
18
  // #endif
19
- cssRoot: 'jfb-takeorder-quoted-list'
19
+ cssRoot: 'jfb-takeorder-order-list'
20
20
  }
21
21
  },
22
22
  created() {
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ getOrderByIdFilmSquate:{},
6
+
7
+ updateOrderFilmPaiqiDate:{},
8
+
9
+ removeOrderFilmAddress:{},
10
+
11
+ addOrderFilmcart:{},
12
+
13
+ }
@@ -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
+
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ import { customVal, dataVal } from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData = {}) => {
6
+ return [
7
+ ].filter(i => i)
8
+ }
9
+