jufubao-takeorder 1.0.1

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 (50) hide show
  1. package/README.md +27 -0
  2. package/commands.js +84 -0
  3. package/commands.update.change.js +176 -0
  4. package/file.config.js +16 -0
  5. package/get.package.path.js +22 -0
  6. package/get.package.path.js.tpl +22 -0
  7. package/package.json +122 -0
  8. package/src/CreateClientID.js +16 -0
  9. package/src/ICONS.js +1148 -0
  10. package/src/appParams.js +1 -0
  11. package/src/common/authorize.js +261 -0
  12. package/src/common/getBusinessImageUrl.js +39 -0
  13. package/src/common/getServiceUrl.js +38 -0
  14. package/src/common/paysdk/jweixin.js +98 -0
  15. package/src/components/CusCouponChose/CusCouponChose.vue +1024 -0
  16. package/src/components/CusCouponItem/CusCouponItem.vue +298 -0
  17. package/src/components/CusEnter/CusEnter.vue +368 -0
  18. package/src/components/CusListItem/CusListItem.vue +141 -0
  19. package/src/components/CusPoster/CusPoster.vue +167 -0
  20. package/src/components/CusPoster/CusSwiperDot.vue +234 -0
  21. package/src/components/CusPrice/CusPrice.vue +383 -0
  22. package/src/components/CusProduct/CusProduct.vue +763 -0
  23. package/src/components/CusShops/CusShops.vue +717 -0
  24. package/src/components/CusSwiperDot/CusSwiperDot.vue +234 -0
  25. package/src/components/CusTab/CusTab.vue +544 -0
  26. package/src/components/CusVideo/CusVideo.vue +170 -0
  27. package/src/components/CusVipList/CusVipList.vue +169 -0
  28. package/src/config.app.plus.js +6 -0
  29. package/src/config.h5.js +13 -0
  30. package/src/config.mp.weixin.js +13 -0
  31. package/src/config.project.js +15 -0
  32. package/src/get.package.path.js +22 -0
  33. package/src/mixins/cardListMixins.js +187 -0
  34. package/src/mixins/colorCardMixins.js +122 -0
  35. package/src/mixins/componentsMixins.js +900 -0
  36. package/src/mixins/extsMixins.js +3 -0
  37. package/src/mixins/locationMixins.js +119 -0
  38. package/src/mixins/newLocaltionMixins.js +754 -0
  39. package/src/mixins/openDebuggerMixins.js +74 -0
  40. package/src/mixins/pageEditx.js +347 -0
  41. package/src/mixins/pageEvent.js +311 -0
  42. package/src/mixins/pageMain.js +120 -0
  43. package/src/mixins/pageUitls.js +738 -0
  44. package/src/mixins/posterMixins.js +122 -0
  45. package/src/mixins/scrollListFixedHeigthMixins.js +174 -0
  46. package/src/mocks.js +4 -0
  47. package/src/oss.config.js +17 -0
  48. package/src/settings.js +244 -0
  49. package/src/staticVersion.js +3 -0
  50. package/src/xd.less +196 -0
@@ -0,0 +1,383 @@
1
+ <template>
2
+ <view class="price-box" :style="[priceMLComp]">
3
+ <view :class="{ schedule: type === 'schedule' }">
4
+ <view v-for="(item, index) in uiShowPrice" :key="index">
5
+ <!--售价价格(普通价格)-->
6
+ <view class="price-group">
7
+ <template v-if="item.t === 'S'">
8
+ <view class="price-group-price">
9
+ <xd-unit
10
+ :isShowIcon="isShowIcon"
11
+ :range="item.a || range"
12
+ :colorNew="salePriceColor"
13
+ :iconSize="iconSize"
14
+ :fontSize="salePriceSizeStyle"
15
+ :price="item.p"
16
+ :isOld="false"
17
+ ></xd-unit>
18
+ </view>
19
+ <!--节省显示-->
20
+ <view class="save-price price-group-save" v-if="savePrice">
21
+ <text v-if="savePrice.n">{{ savePrice.n }}</text>
22
+ <text>¥</text>
23
+ <text>{{ divisionPrice(savePrice.p) }}</text>
24
+ </view>
25
+ <!--节省显示-->
26
+ </template>
27
+ <!--文本显示-->
28
+ <view
29
+ class="save-price price-group-text"
30
+ :class="{noPrice: !isPrice, hasPrice:isPrice}"
31
+ v-if="['S','CUS'].includes(item.t) && textInfo && textInfo.length > 0 "
32
+ >
33
+ <view
34
+ class="price-group-item"
35
+ v-for="text in textInfo"
36
+ :key="text.n"
37
+ :class="{textTag:text.s === 't'}"
38
+ >
39
+ <view>{{ text.n }}</view>
40
+ <view v-if="text.a">{{ text.a}}</view>
41
+ </view>
42
+ </view>
43
+ <!--文本显示-->
44
+ </view>
45
+ <!--售价价格(普通价格)-->
46
+ <!--在线选择(排期)-->
47
+ <!--节省显示-->
48
+ <view class="save-price" style="margin: 4rpx 0;" v-if="item.t === 'E' && type==='schedule'">
49
+ <text v-if="item.n">{{ item.n }}</text>
50
+ <text>¥</text>
51
+ <text>{{ divisionPrice(item.p) }}</text>
52
+ </view>
53
+ <!--节省显示-->
54
+ <!--在线选择(排期)-->
55
+ <!--划线价格 活动价格与划线价格二选一-->
56
+ <view
57
+ v-if="item.t === 'U'"
58
+ class="line_one_delete"
59
+ :class="{ threeFontSize: type === 'three' }"
60
+ :style="[originalPriceSizeStyle]"
61
+ >
62
+ <text v-if="item.n">{{ item.n }}:</text>
63
+ <text>¥</text>
64
+ <text>{{ divisionPrice(item.p) }}</text>
65
+ </view>
66
+ <!--划线价格-->
67
+ <!--活动价格(plus,秒杀)-->
68
+ <view
69
+ v-if="item.t === 'D' && isPlus"
70
+ class="price-box-vip"
71
+ :class="{ three: type === 'three' }"
72
+ >
73
+ <view :style="[vipPriceSizeStyle]" class="price-box-vip-name">{{item.n }}</view>
74
+ <view :style="[vipPriceSizeStyle]" class="price-box-vip-price">{{divisionPrice(item.p)}}</view>
75
+ </view>
76
+ <view
77
+ :style="[activityStyle]"
78
+ v-if="item.t === 'D' && !isPlus && type === 'info' "
79
+ class="price-box-activity"
80
+ >{{ item.n }} <text v-if="item.n">:</text>{{ divisionPrice(item.p) }}</view>
81
+ <!--活动价格-->
82
+ </view>
83
+ </view>
84
+ </view>
85
+ </template>
86
+ <script>
87
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
88
+ import XdUnit from "@/components/XdUnit/XdUnit.vue";
89
+ import Color from "color";
90
+
91
+ export default {
92
+ name: "CusPrice",
93
+ components: {
94
+ XdFontIcon,
95
+ XdUnit,
96
+ },
97
+ props: {
98
+ //1列(one)、2列(two)、3列(three)、商品详情(info)、订单(order)、在线选座排期(schedule),普通模式(normal)
99
+ type: {
100
+ type: String,
101
+ default: "one",
102
+ },
103
+ iconSize: {
104
+ type: Number | String,
105
+ default: "0.3",
106
+ },
107
+ //原价颜色
108
+ originalPriceColor: {
109
+ type: String,
110
+ default: "#999",
111
+ },
112
+ //原价字体大小
113
+ originalPriceFontSize: {
114
+ type: String,
115
+ default: "",
116
+ },
117
+ //售价颜色
118
+ salePriceColor: {
119
+ type: String,
120
+ default: "",
121
+ },
122
+ salePriceFontSize: {
123
+ type: String,
124
+ default: "",
125
+ },
126
+ //活动售价颜色
127
+ activitySalePriceColor: {
128
+ type: String,
129
+ default: "#fff",
130
+ },
131
+ //活动售价字体大小
132
+ activitySalePriceSize: {
133
+ type: String,
134
+ default: "",
135
+ },
136
+ //是否是plus站点
137
+ isPlus: {
138
+ type: Boolean,
139
+ default: false,
140
+ },
141
+ showPrice: {
142
+ type: Array,
143
+ default: [],
144
+ },
145
+ range: {
146
+ type: String,
147
+ default: "",
148
+ },
149
+ isShowIcon: {
150
+ type: Boolean | String,
151
+ default: "",
152
+ },
153
+ textFontSize:{
154
+ type: String|Number,
155
+ default: "24",
156
+ },
157
+ normalPriceFontSize:{
158
+ type: String|Number,
159
+ default: "22",
160
+ },
161
+ },
162
+ data() {
163
+ return {
164
+ isPrice: false,
165
+ savePrice: null,
166
+ textInfo: null,
167
+ uiShowPrice: null,
168
+
169
+ };
170
+ },
171
+ watch: {},
172
+ computed: {
173
+ vipPriceSizeStyle() {
174
+ let fontSize = this.type === "info" ? "24rpx" : "20rpx";
175
+ let minWidth = this.type === "info" ? "60rpx" : "59rpx";
176
+ return {
177
+ fontSize,
178
+ minWidth,
179
+ };
180
+ },
181
+ salePriceSizeStyle() {
182
+ let fontSize = "40";
183
+ switch (this.type) {
184
+ case "one":
185
+ fontSize = "40";
186
+ break;
187
+ case "two":
188
+ fontSize = "40";
189
+ break;
190
+ case "three":
191
+ fontSize = "24";
192
+ break;
193
+ case "normal":
194
+ fontSize = this.normalPriceFontSize;
195
+ break;
196
+ case "info":
197
+ fontSize = "48";
198
+ break;
199
+ case "order":
200
+ fontSize = "40";
201
+ break;
202
+ case "schedule":
203
+ fontSize = "32";
204
+ break;
205
+ }
206
+ if (this.salePriceFontSize) fontSize = this.salePriceFontSize;
207
+ return fontSize;
208
+ },
209
+ priceMLComp(){
210
+ return {
211
+ '--price-unit-style-ml': this.salePriceSizeStyle * .5 * this.$rpxNum + 'px',
212
+ "--price-unit-style-c":`rgba(${Color('#FF2C18').alpha(0.2).array().join(',')})`,
213
+ "--price-unit-style-ts": this.textFontSize * this.$rpxNum + 'px'
214
+ }
215
+ },
216
+ originalPriceSizeStyle() {
217
+ let fontSize =
218
+ this.type === "info" || this.type === "order" ? "28rpx" : "24rpx";
219
+ if (this.type === "three") fontSize = "20rpx";
220
+ if (this.originalPriceFontSize)
221
+ fontSize = `${this.originalPriceFontSize}rpx`;
222
+ return {
223
+ fontSize,
224
+ color: this.originalPriceColor,
225
+ };
226
+ },
227
+ activityStyle() {
228
+ let fontSize = "24rpx";
229
+ if (this.activitySalePriceSize) fontSize = `${this.activitySalePriceSize}rpx`;
230
+ return {
231
+ color: this.activitySalePriceColor,
232
+ fontSize,
233
+ };
234
+ },
235
+ },
236
+ created() {
237
+ let showPrice = this.$xdUniHelper.cloneDeep(this.showPrice);
238
+
239
+
240
+ //三列(不显示文本信息和省信息), 排期(上下排列信息)
241
+ if(!['three', 'schedule'].includes(this.type)) {
242
+ this.savePrice = showPrice.find(item => item.t === 'E');
243
+ this.textInfo = showPrice.filter(item => item.t === 'T');
244
+ this.isPrice = !!(showPrice.find(item => item.t === 'S'));
245
+ //过滤掉T和E模式
246
+ this.uiShowPrice = showPrice.filter(item=>{
247
+ return !(item.t === 'T' || item.t === 'E')
248
+ });
249
+
250
+ //不显示价格时候,需要创建一字符串对象(因为T模式已经被过滤掉了)
251
+ if(this.textInfo.length > 0 && !this.isPrice) {
252
+ this.uiShowPrice = [{t: 'CUS'}]
253
+ }
254
+
255
+ }
256
+ else this.uiShowPrice = showPrice;
257
+
258
+ },
259
+ methods: {
260
+ divisionPrice(price) {
261
+ return this.$xdUniHelper.divisionFloatNumber(price, 100);
262
+ },
263
+ },
264
+ };
265
+ </script>
266
+
267
+
268
+
269
+ <style scoped lang="less">
270
+ .schedule {
271
+ display: flex;
272
+ flex-direction: column;
273
+ align-items: center;
274
+ justify-content: center;
275
+ }
276
+ .price-group{
277
+ display: flex;
278
+ align-items: center;
279
+ flex-flow: wrap;
280
+ justify-content: flex-start;
281
+
282
+ &-item {
283
+ margin-right: var(--price-unit-style-ml);
284
+ height: 40rpx;
285
+ line-height: 40rpx;
286
+ box-sizing: border-box;
287
+ font-size: var(--price-unit-style-ts);
288
+ display: flex;
289
+ justify-content: flex-start;
290
+ align-items: center;
291
+
292
+ & > view {
293
+ color: #FF2C18;
294
+ }
295
+
296
+ &.textTag {
297
+ border: 2rpx solid var(--price-unit-style-c);
298
+ border-radius: 6rpx;
299
+ padding: 0 8rpx;
300
+ }
301
+ }
302
+ &-save {
303
+ font-size: var(--price-unit-style-ts);
304
+ margin-left: var(--price-unit-style-ml);
305
+ color: #FF2C18;
306
+ }
307
+ &-text {
308
+ &.noPrice {
309
+ & > view:last-child {
310
+ margin-right: 0!important;
311
+ }
312
+ }
313
+ &.hasPrice {
314
+ margin-left: var(--price-unit-style-ml);
315
+ & > view:last-child {
316
+ margin-right: 0!important;
317
+ }
318
+ }
319
+ }
320
+ }
321
+ .price-box {
322
+ position: relative;
323
+
324
+
325
+ &-activity {
326
+ font-size: 24rpx;
327
+ font-weight: 500;
328
+ // position: relative;
329
+ // bottom: 5px;
330
+ }
331
+
332
+ &-vip {
333
+ display: flex;
334
+ justify-content: flex-start;
335
+
336
+ &-name {
337
+ background: linear-gradient(
338
+ 90deg,
339
+ rgba(102, 86, 70, 1) 0%,
340
+ rgba(71, 61, 52, 1) 52.05%,
341
+ rgba(43, 38, 35, 1) 100%
342
+ );
343
+ color: #efd5c3;
344
+ text-align: center;
345
+ flex-wrap: nowrap;
346
+ padding: 8rpx 12rpx;
347
+ border-radius: 80rpx 0 0 80rpx;
348
+ }
349
+
350
+ &-price {
351
+ background: linear-gradient(270deg, #fcd6b8 0%, #fcedd7 100%);
352
+ color: #615850;
353
+ font-weight: 700;
354
+ flex-wrap: nowrap;
355
+ text-align: center;
356
+ padding: 8rpx 12rpx;
357
+ border-radius: 0 80rpx 80rpx 0;
358
+ }
359
+ }
360
+
361
+ &-vip.three {
362
+ & .price-box-vip-name {
363
+ padding: 0 4rpx 0 8rpx !important;
364
+ border-radius: 15rpx 0 0 15rpx;
365
+ line-height: 30rpx;
366
+ }
367
+ & .price-box-vip-price {
368
+ padding: 0 8rpx 0 4rpx !important;
369
+ border-radius: 0 15rpx 15rpx 0;
370
+ line-height: 30rpx;
371
+ }
372
+ }
373
+ }
374
+
375
+ .line_one_delete {
376
+ text-decoration: line-through;
377
+ font-weight: normal;
378
+ }
379
+
380
+ .threeFontSize {
381
+ font-size: 20rpx;
382
+ }
383
+ </style>