gxd-uni-library-editx 1.0.8-beta15 → 1.0.8-beta151

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 (164) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -2
  3. package/src/XdAppClass.js +28 -3
  4. package/src/components/XdBar/XdBar.vue +16 -2
  5. package/src/components/XdButton/XdButton.vue +33 -7
  6. package/src/components/XdCardPay/XdCardPay.vue +305 -42
  7. package/src/components/XdCity/XdCity.vue +0 -1
  8. package/src/{components.tpl/XdCity/XdCity.vue → components/XdCityApi/XdCityApi.vue} +48 -51
  9. package/src/components/XdCityLocation/XdCityLocation.vue +26 -16
  10. package/src/components/XdCityShowApi/XdCityShowApi.vue +201 -0
  11. package/src/components/XdConfirm/XdConfirm.vue +13 -2
  12. package/src/components/XdContentXss/XdContentXss.vue +39 -2
  13. package/src/components/XdDailog/XdDailog.vue +13 -3
  14. package/src/components/XdFontIcon/XdFontIcon.vue +7 -1
  15. package/src/components/XdFontIcon/css/icon.less +152 -204
  16. package/src/components/XdFooterBar/XdFooterBar.vue +21 -9
  17. package/src/components/XdFooterTabbar/XdFooterTabbar.vue +5 -5
  18. package/src/components/XdFormCheckbox/XdFormCheckbox.vue +3 -1
  19. package/src/components/XdJfbImage/XdJfbImage.vue +153 -0
  20. package/src/components/XdLayout/XdLayout.vue +78 -40
  21. package/src/components/XdMore/XdMore.vue +7 -13
  22. package/src/components/XdNoticeBar/XdNoticeBar.vue +7 -1
  23. package/src/components/XdNumber/XdNumber.vue +2 -0
  24. package/src/components/XdProductStatus/XdProductStatus.vue +94 -0
  25. package/src/components/XdSearchHistory/XdSearchHistory.vue +149 -0
  26. package/src/components/XdTab/XdTab.vue +48 -11
  27. package/src/components/XdTips/XdTips.vue +7 -1
  28. package/src/components/XdUnit/XdUnit.vue +54 -15
  29. package/src/dome/components/XdTitleTab/XdTitleTab.vue +4 -6
  30. package/src/dome/dome/icon.js +39 -52
  31. package/src/dome/dome/index.vue +69 -4
  32. package/src/project.js +2 -0
  33. package/src/utils/Runtime.js +2 -2
  34. package/src/utils/StyleForm.js +350 -0
  35. package/src/utils/helper.js +141 -43
  36. package/src/utils/xd.base.js +210 -3
  37. package/src/utils/xd.common.js +148 -34
  38. package/src/utils/xd.event.js +3 -2
  39. package/src/utils/xd.frame.js +2 -2
  40. package/src/utils/xdWxLog.js +1 -1
  41. package/src/utils/xdh5log.js +141 -241
  42. package/src/components.tpl/XdAddress/XdAddress.vue +0 -587
  43. package/src/components.tpl/XdAddressSelect/XdAddressSelect.vue +0 -251
  44. package/src/components.tpl/XdBaiduMap/XdBaiduMap.vue +0 -204
  45. package/src/components.tpl/XdBaiduOverlay/XdBaiduOverlay.vue +0 -345
  46. package/src/components.tpl/XdBaiduSearch/XdBaiduSearch.vue +0 -354
  47. package/src/components.tpl/XdBar/XdBar.vue +0 -339
  48. package/src/components.tpl/XdButton/XdButton.vue +0 -288
  49. package/src/components.tpl/XdCardPay/XdCardPay.vue +0 -547
  50. package/src/components.tpl/XdCartList/XdCartList.vue +0 -791
  51. package/src/components.tpl/XdCartNoStoreList/XdCartNoStoreList.vue +0 -747
  52. package/src/components.tpl/XdCity/city.js +0 -93
  53. package/src/components.tpl/XdCity/testData.js +0 -124
  54. package/src/components.tpl/XdCityLocation/XdCityLocation.vue +0 -314
  55. package/src/components.tpl/XdCityLocation/jweixin.js +0 -72
  56. package/src/components.tpl/XdCityShow/XdCityShow.vue +0 -354
  57. package/src/components.tpl/XdClipImage/XdClipImage.vue +0 -879
  58. package/src/components.tpl/XdCoins/XdCoins.vue +0 -90
  59. package/src/components.tpl/XdConfirm/XdConfirm.vue +0 -240
  60. package/src/components.tpl/XdContentXss/XdContentXss.vue +0 -71
  61. package/src/components.tpl/XdDailog/XdDailog.vue +0 -258
  62. package/src/components.tpl/XdDate/XdDataItemOne.vue +0 -236
  63. package/src/components.tpl/XdDate/XdDate.vue +0 -1081
  64. package/src/components.tpl/XdDate/XdDateItem.vue +0 -316
  65. package/src/components.tpl/XdDate/XdDateTime.vue +0 -929
  66. package/src/components.tpl/XdDate/i18n/en.json +0 -19
  67. package/src/components.tpl/XdDate/i18n/index.js +0 -8
  68. package/src/components.tpl/XdDate/i18n/zh-Hans.json +0 -19
  69. package/src/components.tpl/XdDate/i18n/zh-Hant.json +0 -19
  70. package/src/components.tpl/XdDate/keypress.js +0 -45
  71. package/src/components.tpl/XdDate/util.js +0 -418
  72. package/src/components.tpl/XdDownDrawer/XdDownDrawer.vue +0 -176
  73. package/src/components.tpl/XdEditPwd/XdEditPwd.vue +0 -299
  74. package/src/components.tpl/XdEnterOrderList/XdEnterOrderList.vue +0 -413
  75. package/src/components.tpl/XdExpressTimeLine/XdExpressTimeLine.vue +0 -280
  76. package/src/components.tpl/XdFilter/XdFilter.vue +0 -541
  77. package/src/components.tpl/XdFontIcon/XdFontIcon.vue +0 -165
  78. package/src/components.tpl/XdFontIcon/css/icon.less +0 -702
  79. package/src/components.tpl/XdFooterBar/XdFooterBar.vue +0 -291
  80. package/src/components.tpl/XdFooterTabbar/XdFooterTabbar.vue +0 -284
  81. package/src/components.tpl/XdForm/XdForm.vue +0 -481
  82. package/src/components.tpl/XdForm/validate.js +0 -486
  83. package/src/components.tpl/XdFormCheckbox/XdFormCheckbox.vue +0 -858
  84. package/src/components.tpl/XdFormDate.vue +0 -187
  85. package/src/components.tpl/XdFormInput/XdFormInput.vue +0 -535
  86. package/src/components.tpl/XdFormInput/common.js +0 -56
  87. package/src/components.tpl/XdFormItem/XdFormItem.vue +0 -583
  88. package/src/components.tpl/XdFormSelect/XdFormSelect.vue +0 -119
  89. package/src/components.tpl/XdImage/XdImage.vue +0 -113
  90. package/src/components.tpl/XdItemCardUser/XdItemCardUser.vue +0 -238
  91. package/src/components.tpl/XdItemFilmImage/XdItemFilmImage.vue +0 -157
  92. package/src/components.tpl/XdItemFilmText/XdItemFilmText.vue +0 -96
  93. package/src/components.tpl/XdItemPhysical/XdItemPhysical.vue +0 -415
  94. package/src/components.tpl/XdItemPhysicalPack/XdItemPhysicalPack.vue +0 -247
  95. package/src/components.tpl/XdItemStore/XdItemStore.vue +0 -240
  96. package/src/components.tpl/XdItemUserInfo/XdItemUserInfo.vue +0 -181
  97. package/src/components.tpl/XdJson/XdJson.vue +0 -398
  98. package/src/components.tpl/XdKeyValue/XdKeyValue.vue +0 -150
  99. package/src/components.tpl/XdLabelNew/XdLabelNew.vue +0 -193
  100. package/src/components.tpl/XdLayout/XdLayout.vue +0 -646
  101. package/src/components.tpl/XdLoading/XdLoading.vue +0 -165
  102. package/src/components.tpl/XdMore/XdMore.vue +0 -66
  103. package/src/components.tpl/XdMpHtml/XdMpHtml.vue +0 -458
  104. package/src/components.tpl/XdMpHtml/node/node.vue +0 -536
  105. package/src/components.tpl/XdMpHtml/parser.js +0 -1260
  106. package/src/components.tpl/XdMpHtml/static/js/handler.js +0 -1
  107. package/src/components.tpl/XdMpHtml/static/js/uni.webview.min.js +0 -1
  108. package/src/components.tpl/XdMpHtml/static/local.html +0 -1
  109. package/src/components.tpl/XdMy/XdMy.vue +0 -300
  110. package/src/components.tpl/XdMySuccess/XdMySuccess.vue +0 -603
  111. package/src/components.tpl/XdNavTab/XdNavTab.vue +0 -154
  112. package/src/components.tpl/XdNoData/XdNoData.vue +0 -87
  113. package/src/components.tpl/XdNoticeBar/XdNoticeBar.vue +0 -514
  114. package/src/components.tpl/XdNumber/XdNumber.vue +0 -210
  115. package/src/components.tpl/XdNumberUni/XdNumberUni.vue +0 -270
  116. package/src/components.tpl/XdNumberUni/readme.md +0 -42
  117. package/src/components.tpl/XdOnlineConfirm/XdOnlineConfirm.vue +0 -391
  118. package/src/components.tpl/XdOnlineDetail/XdOnlineDetail.vue +0 -338
  119. package/src/components.tpl/XdOnlinePay/XdOnlinePay.vue +0 -356
  120. package/src/components.tpl/XdOnlineSchedule/XdOnlineSchedule.vue +0 -459
  121. package/src/components.tpl/XdOnlineSeat/XdOnlineSeat.vue +0 -820
  122. package/src/components.tpl/XdOnlineSeatMove/XdOnlineSeatMove.vue +0 -1012
  123. package/src/components.tpl/XdPayCombo/XdPayCombo.vue +0 -118
  124. package/src/components.tpl/XdPreviewImage/XdPreviewImage.vue +0 -372
  125. package/src/components.tpl/XdPwPay/XdPwPay.vue +0 -214
  126. package/src/components.tpl/XdRadio/XdRadio.vue +0 -201
  127. package/src/components.tpl/XdRangeSlider/XdRangeSlider.vue +0 -361
  128. package/src/components.tpl/XdRedName/XdRedName.vue +0 -35
  129. package/src/components.tpl/XdSearchBar/XdSearchBar.vue +0 -292
  130. package/src/components.tpl/XdSelect/XdSelect.vue +0 -388
  131. package/src/components.tpl/XdSelectCity/XdSelectCity.vue +0 -277
  132. package/src/components.tpl/XdSelectTime/XdSelectTime.vue +0 -342
  133. package/src/components.tpl/XdStar/XdStar.vue +0 -261
  134. package/src/components.tpl/XdStoreCashier/XdStoreCashier.vue +0 -531
  135. package/src/components.tpl/XdStoreItem/XdStoreItem.vue +0 -400
  136. package/src/components.tpl/XdStoreOrderDetail/XdStoreOrderDetail.vue +0 -1578
  137. package/src/components.tpl/XdStoreOrderList/XdStoreOrderList.vue +0 -450
  138. package/src/components.tpl/XdStoreProductInfo/XdStoreProductInfo.vue +0 -960
  139. package/src/components.tpl/XdStoreProductType/XdStoreProductType.vue +0 -307
  140. package/src/components.tpl/XdSuccess/XdSuccess.vue +0 -533
  141. package/src/components.tpl/XdSwipeSelect/XdSwipeSelect.vue +0 -99
  142. package/src/components.tpl/XdSwiper/XdSwiper.vue +0 -124
  143. package/src/components.tpl/XdSwitch/XdSwitch.vue +0 -211
  144. package/src/components.tpl/XdTab/XdTab.vue +0 -228
  145. package/src/components.tpl/XdTabScroll/XdTabScroll.vue +0 -212
  146. package/src/components.tpl/XdTag/XdTag.vue +0 -427
  147. package/src/components.tpl/XdTimeLine/XdTimeLine.vue +0 -126
  148. package/src/components.tpl/XdTips/XdTips.vue +0 -212
  149. package/src/components.tpl/XdTipsBlock/XdTipsBlock.vue +0 -152
  150. package/src/components.tpl/XdTitleSection/XdTitleSection.vue +0 -159
  151. package/src/components.tpl/XdTitleTab/XdTitleTab.vue +0 -233
  152. package/src/components.tpl/XdUnit/XdUnit.vue +0 -204
  153. package/src/components.tpl/XdUpload/XdUpload.vue +0 -197
  154. package/src/components.tpl/XdUploadImage/XdUploadImage.vue +0 -145
  155. package/src/components.tpl/Xdlogs/XdLogs.vue +0 -144
  156. package/src/components.tpl/autoload.js +0 -211
  157. package/src/components.tpl/swipeAction/UniSwipeAction.vue +0 -43
  158. package/src/components.tpl/swipeActionItem/UniSwipeActionItem.vue +0 -386
  159. package/src/components.tpl/swipeActionItem/bindingx.js +0 -298
  160. package/src/components.tpl/swipeActionItem/index.wxs +0 -321
  161. package/src/components.tpl/swipeActionItem/isPC.js +0 -18
  162. package/src/components.tpl/swipeActionItem/mpalipay.js +0 -210
  163. package/src/components.tpl/swipeActionItem/mpother.js +0 -252
  164. package/src/components.tpl/swipeActionItem/mpwxs.js +0 -140
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # gxd-uni-new
1
+ # gxd-uni-library-editx
2
2
 
3
3
  ```text
4
4
  1、自定义uni-app组件功能,支持h5,mp-weixin平台已自测(竖屏),(文档尚未完善),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gxd-uni-library-editx",
3
- "version": "1.0.8-beta15",
3
+ "version": "1.0.8-beta151",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -33,6 +33,7 @@
33
33
  "@dcloudio/uni-quickapp-webview": "^2.0.1-33920220208001",
34
34
  "@dcloudio/uni-stat": "^2.0.1-33920220208001",
35
35
  "@vue/shared": "^3.0.0",
36
+ "alife-logger": "^1.8.30",
36
37
  "color": "^3.1.3",
37
38
  "core-js": "^2.6.5",
38
39
  "dompurify": "^2.3.4",
@@ -101,4 +102,4 @@
101
102
  "uni-app": {
102
103
  "scripts": {}
103
104
  }
104
- }
105
+ }
package/src/XdAppClass.js CHANGED
@@ -41,14 +41,40 @@ class XdAppClass {
41
41
  //当前网站配置静态变量对象
42
42
  this.brandInfo = {};
43
43
 
44
+ //餐饮模式
45
+ if ($mv.$configProject.type === 'food') {
46
+ this.use('all', 'getFoodBrand', (app, next) => {
47
+ this.$store['dispatch']('getFoodBrand')
48
+ .then((config) => {
49
+ this.brandInfo = Object.assign({}, this.brandInfo, config)
50
+ next();
51
+ })
52
+ .catch(res => {
53
+ console.error(res)
54
+ throw new Error(`获取(getBrand)配置失败, result:${JSON.stringify(runtime().getErrorInfo(res))}`);
55
+ })
56
+ });
57
+ }
58
+
44
59
  /***
45
60
  * @description 设置公共获取brandInfo参数
46
61
  */
47
62
  this.use('all', 'getBrand', (app, next) => {
48
63
  this.$store['dispatch']('getBrand')
49
64
  .then((brandInfo) => {
50
- console.log('111')
51
- this.brandInfo = brandInfo;
65
+ if ($mv.$configProject.type === 'food' && brandInfo['api_host'] ) {
66
+ delete brandInfo['api_host'];
67
+ }
68
+ this.brandInfo = Object.assign({}, this.brandInfo, brandInfo);
69
+
70
+ //#ifdef H5
71
+ //设置部署目录
72
+ window['JfbBaseDir'] = '';
73
+ if(this.$vm.$configProject.NODE_ENV === 'production') {
74
+ window['JfbBaseDir'] = brandInfo['deploy_dir'] || '';
75
+ }
76
+ //#endif
77
+
52
78
  next();
53
79
  })
54
80
  .catch(res => {
@@ -57,7 +83,6 @@ class XdAppClass {
57
83
  })
58
84
  });
59
85
  }
60
-
61
86
  /**
62
87
  * @description 获取加盟上网站风格数据
63
88
  */
@@ -4,7 +4,7 @@
4
4
  class="xd-custom-bar__fixed"
5
5
  :style="{
6
6
  backgroundColor: uiBgImage ? '': uiBgColor,
7
- backgroundImage: 'url('+ uiBgImage +')',
7
+ backgroundImage: getBackgroundImage,
8
8
  height: barNavHeight + barStatusHeight + 'rpx'
9
9
  }"
10
10
  >
@@ -143,6 +143,20 @@
143
143
  uiFontSize: 34,
144
144
  };
145
145
  },
146
+ computed:{
147
+ getBackgroundImage(){
148
+ let isGradient = this.bgColor.indexOf('linear-gradient') !== -1;
149
+ let bgc = `url(${this.bgImage})`;
150
+ // #ifdef H5
151
+ if ((this.bgImage === 'none'|| this.bgImage === '') && isGradient) {
152
+ bgc = this.uiBgImage = this.bgColor;
153
+ }
154
+ // #endif
155
+
156
+ return bgc;
157
+
158
+ },
159
+ },
146
160
  created(){
147
161
  this.noPrevToIndex = this.$settings['noPrevPageToIndex'] === undefined ?
148
162
  false : this.$settings['noPrevPageToIndex'];
@@ -151,7 +165,7 @@
151
165
  this.uiBgColor = this.bgColor || this.$mainColor;
152
166
  if(this.color) this.uiTextColor = this.color;
153
167
  this.uiBgImage = this.bgImage;
154
-
168
+
155
169
  /**
156
170
  * @description 设置样式
157
171
  */
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <button
3
3
  :disabled="disabled"
4
+ v-if="status"
4
5
  @click.stop="handleClick"
5
6
  :style="{
6
7
  opacity: disabled ? 0.4 : 1,
@@ -12,13 +13,14 @@
12
13
  color: getTextColor,
13
14
  width: width ? width : 'auto',
14
15
  boxShadow: getBoxShadow,
15
- border: uiType === 'default'? '2rpx solid #dcdfe6!important': 0,
16
+ border: uiType === 'default'? '2rpx solid #dcdfe6': 0,
16
17
  padding: '0 ' + btnPaddingtList[uiSize] + 'rpx'
17
18
  }"
18
19
  :class="getClassName"
19
20
  type="default"
20
21
  plain="true"
21
- ><slot>按钮</slot></button>
22
+ ><slot>按钮</slot>
23
+ </button>
22
24
  </template>
23
25
 
24
26
  <script>
@@ -54,6 +56,11 @@
54
56
  type: String,
55
57
  default: ''
56
58
  },
59
+
60
+ systemStyle: {
61
+ type: Object|null,
62
+ default: null
63
+ },
57
64
 
58
65
  color: {
59
66
  type: String,
@@ -114,8 +121,13 @@
114
121
  //135deg 左上到右下(角度)
115
122
  //45deg 左下到右上(角度)
116
123
  default: 'to bottom',
117
- }
124
+ },
118
125
  /**仅支持线性渐变******/
126
+
127
+ isBoxShadow:{
128
+ type: Boolean,
129
+ default: false,
130
+ }
119
131
  },
120
132
  data(){
121
133
  return {
@@ -123,6 +135,7 @@
123
135
  uiSize: 'default',
124
136
  btnTypeList: ['primary','default', 'subPrimary', 'danger', 'info', 'warning', 'success', 'text'],
125
137
  btnSizeList: ['default', 'large' ,'medium', 'small', 'mini'],
138
+ status: false,
126
139
  btnHeightList: {
127
140
  default: 100,
128
141
  large: 110,
@@ -186,6 +199,7 @@
186
199
  },
187
200
 
188
201
  getBoxShadow(){
202
+ if(!this.isBoxShadow) return `0 0 0 rgba(0,0,0,0)`
189
203
  if(this.uiType === 'default' || this.uiType === 'text'|| this.boxShadow === null) return `0 0 0 rgba(0,0,0,0)`
190
204
  let color = this.$color(this.getColor(this.uiType)).alpha(0.4).toString();
191
205
  if(this.boxShadow) return this.boxShadow;
@@ -193,7 +207,10 @@
193
207
  },
194
208
  },
195
209
  async created(){
210
+ let pageStyle = this.systemStyle || {};
196
211
  let style = await getParentsStyles(this.$parent);
212
+ style = Object.assign({}, JSON.parse(JSON.stringify(style)) , pageStyle);
213
+ console.log('getPageStyles.created', style, pageStyle)
197
214
  this.btnBtnColor = {
198
215
  subPrimary: style.$subMainColor,
199
216
  primary: style.$mainColor,
@@ -202,21 +219,23 @@
202
219
  info: style.$infoColor,
203
220
  warning: style.$warningColor,
204
221
  success: style.$successColor,
222
+ mainGradient: style.$mainGradient,
223
+ subGradient: style.$subGradient,
205
224
  text: '#333'
206
225
  };
207
-
208
-
209
226
  this.uiType = this.existKey(this.type);
210
227
  this.uiSize = this.existKey(this.size, 'btnSizeList');
211
228
  this.$set(this.btnBtnColor, 'primary', style.$mainColor);
212
229
  this.$set(this.btnBtnColor, 'subPrimary', this.$color(this.btnBtnColor.primary).alpha(0.4).lighten(0.35).hex());
230
+ this.status = true;
213
231
  },
214
232
  methods:{
233
+
215
234
  handleClick(e){
216
235
  this.$emit('click',e);
217
236
  this.$emit('tap', e);
218
237
  },
219
-
238
+
220
239
  getInfo(type, dataKey, list='btnHeightList'){
221
240
  if (this[dataKey]) {
222
241
  let temp = this[dataKey];
@@ -255,6 +274,13 @@
255
274
  },
256
275
 
257
276
  getBgColor(){
277
+ if(this.uiType === 'primary') {
278
+ return this.btnBtnColor.mainGradient || this.getColor();
279
+ }
280
+ if (this.uiType === 'subPrimary') {
281
+ return this.btnBtnColor.subGradient || this.getColor();
282
+ }
283
+
258
284
  let bgc = this.getColor();
259
285
  if (this.isGradual && this.gradualColor && this.gradualType) {
260
286
  bgc =`linear-gradient(${this.gradualType}, ${this.gradualColor})`;
@@ -274,7 +300,7 @@
274
300
  .xd-button {
275
301
  z-index: 0;
276
302
  padding: 0 unit(50, rpx);
277
- border: 0 !important;
303
+ border: 0;
278
304
  opacity: 1;
279
305
  transition: opacity .1s;
280
306
  box-sizing: border-box;