gxd-uni-library-editx 1.0.0
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/.editorconfig +14 -0
- package/README.md +447 -0
- package/index.js +3 -0
- package/package.json +104 -0
- package/postcss.config.js +22 -0
- package/settings.js.tpl +68 -0
- package/src/XdAppClass.1.0.js +257 -0
- package/src/XdAppClass.js +150 -0
- package/src/components/XdAddress/XdAddress.vue +579 -0
- package/src/components/XdAddressSelect/XdAddressSelect.vue +243 -0
- package/src/components/XdBaiduMap/XdBaiduMap.vue +204 -0
- package/src/components/XdBaiduOverlay/XdBaiduOverlay.vue +345 -0
- package/src/components/XdBaiduSearch/XdBaiduSearch.vue +354 -0
- package/src/components/XdBar/XdBar.vue +339 -0
- package/src/components/XdButton/XdButton.vue +288 -0
- package/src/components/XdCartList/XdCartList.vue +791 -0
- package/src/components/XdCartNoStoreList/XdCartNoStoreList.vue +747 -0
- package/src/components/XdCity/XdCity.vue +620 -0
- package/src/components/XdCity/city.js +93 -0
- package/src/components/XdCity/testData.js +124 -0
- package/src/components/XdCityLocation/XdCityLocation.vue +314 -0
- package/src/components/XdCityLocation/jweixin.js +72 -0
- package/src/components/XdCityShow/XdCityShow.vue +354 -0
- package/src/components/XdClipImage/XdClipImage.vue +879 -0
- package/src/components/XdCoins/XdCoins.vue +66 -0
- package/src/components/XdConfirm/XdConfirm.vue +240 -0
- package/src/components/XdContentXss/XdContentXss.vue +71 -0
- package/src/components/XdDailog/XdDailog.vue +258 -0
- package/src/components/XdDate/XdDataItemOne.vue +236 -0
- package/src/components/XdDate/XdDate.vue +1081 -0
- package/src/components/XdDate/XdDateItem.vue +316 -0
- package/src/components/XdDate/XdDateTime.vue +929 -0
- package/src/components/XdDate/i18n/en.json +19 -0
- package/src/components/XdDate/i18n/index.js +8 -0
- package/src/components/XdDate/i18n/zh-Hans.json +19 -0
- package/src/components/XdDate/i18n/zh-Hant.json +19 -0
- package/src/components/XdDate/keypress.js +45 -0
- package/src/components/XdDate/util.js +418 -0
- package/src/components/XdDownDrawer/XdDownDrawer.vue +176 -0
- package/src/components/XdEditPwd/XdEditPwd.vue +305 -0
- package/src/components/XdEnterOrderList/XdEnterOrderList.vue +413 -0
- package/src/components/XdExpressTimeLine/XdExpressTimeLine.vue +280 -0
- package/src/components/XdFilter/XdFilter.vue +541 -0
- package/src/components/XdFontIcon/XdFontIcon.vue +165 -0
- package/src/components/XdFontIcon/css/icon.less +498 -0
- package/src/components/XdFooterBar/XdFooterBar.vue +291 -0
- package/src/components/XdFooterTabbar/XdFooterTabbar.vue +284 -0
- package/src/components/XdForm/XdForm.vue +481 -0
- package/src/components/XdForm/validate.js +486 -0
- package/src/components/XdFormCheckbox/XdFormCheckbox.vue +858 -0
- package/src/components/XdFormDate.vue +187 -0
- package/src/components/XdFormInput/XdFormInput.vue +535 -0
- package/src/components/XdFormInput/common.js +56 -0
- package/src/components/XdFormItem/XdFormItem.vue +583 -0
- package/src/components/XdFormSelect/XdFormSelect.vue +119 -0
- package/src/components/XdImage/XdImage.vue +113 -0
- package/src/components/XdItemCardUser/XdItemCardUser.vue +232 -0
- package/src/components/XdItemFilmImage/XdItemFilmImage.vue +146 -0
- package/src/components/XdItemFilmText/XdItemFilmText.vue +83 -0
- package/src/components/XdItemPhysical/XdItemPhysical.vue +410 -0
- package/src/components/XdItemPhysicalPack/XdItemPhysicalPack.vue +240 -0
- package/src/components/XdItemStore/XdItemStore.vue +236 -0
- package/src/components/XdItemUserInfo/XdItemUserInfo.vue +175 -0
- package/src/components/XdJson/XdJson.vue +398 -0
- package/src/components/XdKeyValue/XdKeyValue.vue +150 -0
- package/src/components/XdLabelNew/XdLabelNew.vue +193 -0
- package/src/components/XdLayout/XdLayout.vue +634 -0
- package/src/components/XdLoading/XdLoading.vue +165 -0
- package/src/components/XdMore/XdMore.vue +66 -0
- package/src/components/XdMpHtml/XdMpHtml.vue +458 -0
- package/src/components/XdMpHtml/node/node.vue +536 -0
- package/src/components/XdMpHtml/parser.js +1260 -0
- package/src/components/XdMpHtml/static/js/handler.js +1 -0
- package/src/components/XdMpHtml/static/js/uni.webview.min.js +1 -0
- package/src/components/XdMpHtml/static/local.html +1 -0
- package/src/components/XdMy/XdMy.vue +294 -0
- package/src/components/XdMySuccess/XdMySuccess.vue +603 -0
- package/src/components/XdNavTab/XdNavTab.vue +147 -0
- package/src/components/XdNoData/XdNoData.vue +87 -0
- package/src/components/XdNoticeBar/XdNoticeBar.vue +501 -0
- package/src/components/XdNumber/XdNumber.vue +210 -0
- package/src/components/XdNumberUni/XdNumberUni.vue +270 -0
- package/src/components/XdNumberUni/readme.md +42 -0
- package/src/components/XdOnlineConfirm/XdOnlineConfirm.vue +385 -0
- package/src/components/XdOnlineDetail/XdOnlineDetail.vue +332 -0
- package/src/components/XdOnlinePay/XdOnlinePay.vue +349 -0
- package/src/components/XdOnlineSchedule/XdOnlineSchedule.vue +453 -0
- package/src/components/XdOnlineSeat/XdOnlineSeat.vue +796 -0
- package/src/components/XdOnlineSeatMove/XdOnlineSeatMove.vue +1012 -0
- package/src/components/XdPayCombo/XdPayCombo.vue +118 -0
- package/src/components/XdPreviewImage/XdPreviewImage.vue +372 -0
- package/src/components/XdPwPay/XdPwPay.vue +214 -0
- package/src/components/XdRadio/XdRadio.vue +151 -0
- package/src/components/XdRangeSlider/XdRangeSlider.vue +355 -0
- package/src/components/XdRedName/XdRedName.vue +35 -0
- package/src/components/XdSearchBar/XdSearchBar.vue +286 -0
- package/src/components/XdSelect/XdSelect.vue +382 -0
- package/src/components/XdSelectCity/XdSelectCity.vue +270 -0
- package/src/components/XdSelectTime/XdSelectTime.vue +342 -0
- package/src/components/XdStar/XdStar.vue +261 -0
- package/src/components/XdStoreCashier/XdStoreCashier.vue +526 -0
- package/src/components/XdStoreItem/XdStoreItem.vue +400 -0
- package/src/components/XdStoreOrderDetail/XdStoreOrderDetail.vue +1571 -0
- package/src/components/XdStoreOrderList/XdStoreOrderList.vue +450 -0
- package/src/components/XdStoreProductInfo/XdStoreProductInfo.vue +940 -0
- package/src/components/XdStoreProductType/XdStoreProductType.vue +307 -0
- package/src/components/XdSuccess/XdSuccess.vue +527 -0
- package/src/components/XdSwipeSelect/XdSwipeSelect.vue +99 -0
- package/src/components/XdSwiper/XdSwiper.vue +124 -0
- package/src/components/XdSwitch/XdSwitch.vue +204 -0
- package/src/components/XdTab/XdTab.vue +220 -0
- package/src/components/XdTabScroll/XdTabScroll.vue +212 -0
- package/src/components/XdTag/XdTag.vue +423 -0
- package/src/components/XdTimeLine/XdTimeLine.vue +121 -0
- package/src/components/XdTips/XdTips.vue +212 -0
- package/src/components/XdTipsBlock/XdTipsBlock.vue +141 -0
- package/src/components/XdTitleSection/XdTitleSection.vue +152 -0
- package/src/components/XdTitleTab/XdTitleTab.vue +227 -0
- package/src/components/XdUnit/XdUnit.vue +206 -0
- package/src/components/XdUpload/XdUpload.vue +197 -0
- package/src/components/XdUploadImage/XdUploadImage.vue +145 -0
- package/src/components/Xdlogs/XdLogs.vue +144 -0
- package/src/components/autoload.js +211 -0
- package/src/components/swipeAction/UniSwipeAction.vue +43 -0
- package/src/components/swipeActionItem/UniSwipeActionItem.vue +386 -0
- package/src/components/swipeActionItem/bindingx.js +298 -0
- package/src/components/swipeActionItem/index.wxs +321 -0
- package/src/components/swipeActionItem/isPC.js +18 -0
- package/src/components/swipeActionItem/mpalipay.js +210 -0
- package/src/components/swipeActionItem/mpother.js +252 -0
- package/src/components/swipeActionItem/mpwxs.js +140 -0
- package/src/dome/dome/address.vue +415 -0
- package/src/dome/dome/auth/login.vue +166 -0
- package/src/dome/dome/baidu_show.vue +20 -0
- package/src/dome/dome/cake.vue +186 -0
- package/src/dome/dome/cart.vue +205 -0
- package/src/dome/dome/cart_store.vue +149 -0
- package/src/dome/dome/cashier/cashier.vue +73 -0
- package/src/dome/dome/cashier/check_cashier.vue +469 -0
- package/src/dome/dome/cashier/success.vue +127 -0
- package/src/dome/dome/city.vue +148 -0
- package/src/dome/dome/cityData.js +9 -0
- package/src/dome/dome/clip.vue +82 -0
- package/src/dome/dome/date/date.vue +273 -0
- package/src/dome/dome/date/selected.js +315 -0
- package/src/dome/dome/dcom/app1.vue +13 -0
- package/src/dome/dome/dcom/app2.vue +13 -0
- package/src/dome/dome/dcom/app3.vue +13 -0
- package/src/dome/dome/dcom/app4.vue +13 -0
- package/src/dome/dome/dcom/app5.vue +13 -0
- package/src/dome/dome/dcom/index.vue +1 -0
- package/src/dome/dome/debug/debug.vue +95 -0
- package/src/dome/dome/docache/docache.vue +88 -0
- package/src/dome/dome/express.vue +269 -0
- package/src/dome/dome/form.vue +312 -0
- package/src/dome/dome/icon.js +125 -0
- package/src/dome/dome/icon.vue +93 -0
- package/src/dome/dome/index.vue +725 -0
- package/src/dome/dome/item.vue +236 -0
- package/src/dome/dome/json/json.vue +88 -0
- package/src/dome/dome/layout.vue +105 -0
- package/src/dome/dome/line.vue +113 -0
- package/src/dome/dome/map/search.vue +70 -0
- package/src/dome/dome/my.vue +171 -0
- package/src/dome/dome/notice.vue +93 -0
- package/src/dome/dome/online/confirm.vue +92 -0
- package/src/dome/dome/online/detail.vue +80 -0
- package/src/dome/dome/online/pay.vue +78 -0
- package/src/dome/dome/online/schedule.vue +73 -0
- package/src/dome/dome/online/seat.vue +98 -0
- package/src/dome/dome/order/detail.vue +166 -0
- package/src/dome/dome/order/enter_order.vue +294 -0
- package/src/dome/dome/order/list.vue +219 -0
- package/src/dome/dome/order/order.js +18 -0
- package/src/dome/dome/order/success.vue +68 -0
- package/src/dome/dome/product.vue +179 -0
- package/src/dome/dome/store_cashier.vue +67 -0
- package/src/dome/dome/swiper.vue +32 -0
- package/src/dome/dome/webview.vue +61 -0
- package/src/install.js +183 -0
- package/src/main/address/address.vue +251 -0
- package/src/main/cart/cart.vue +149 -0
- package/src/main/cashier/cashier.vue +72 -0
- package/src/main/cashier/check_cashier.vue +483 -0
- package/src/main/city/city.vue +149 -0
- package/src/main/date/date.vue +260 -0
- package/src/main/order/order.js +19 -0
- package/src/main/order/order.vue +222 -0
- package/src/main/product/detail.vue +121 -0
- package/src/main/product/type.vue +108 -0
- package/src/main/search/search.vue +501 -0
- package/src/pages.json +337 -0
- package/src/plugins/CreatedComponentsPlugin.js +19 -0
- package/src/plugins/JsonRename.js +72 -0
- package/src/plugins/SetAppParams.js +171 -0
- package/src/project.js +18 -0
- package/src/utils/Cookie.js +68 -0
- package/src/utils/Runtime.js +105 -0
- package/src/utils/Storage.js +104 -0
- package/src/utils/XdNetwork.js +133 -0
- package/src/utils/helper.js +1321 -0
- package/src/utils/nourl.js +95 -0
- package/src/utils/project.js +17 -0
- package/src/utils/xd.auth.js +61 -0
- package/src/utils/xd.base.js +474 -0
- package/src/utils/xd.common.js +240 -0
- package/src/utils/xd.event.js +99 -0
- package/src/utils/xd.frame.js +96 -0
- package/src/utils/xd.path.js +96 -0
- package/src/utils/xdAppLog.js +170 -0
- package/src/utils/xdWxLog.js +302 -0
- package/src/utils/xdh5log.js +307 -0
- package/src/websetting.js +64 -0
- package/tsconfig.json +9 -0
- package/xd.less +180 -0
package/src/pages.json
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
|
3
|
+
{
|
|
4
|
+
"path": "pages/index/index",
|
|
5
|
+
"style": {
|
|
6
|
+
"navigationStyle": "custom",
|
|
7
|
+
"navigationBarTextStyle": "white",
|
|
8
|
+
"navigationBarTitleText": ""
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"subPackages": [
|
|
13
|
+
//用户配置路径
|
|
14
|
+
{
|
|
15
|
+
"root": "main",
|
|
16
|
+
"pages": [
|
|
17
|
+
{
|
|
18
|
+
//购物车
|
|
19
|
+
"path": "cashier/check_cashier",
|
|
20
|
+
"style": {
|
|
21
|
+
"navigationStyle": "custom",
|
|
22
|
+
"navigationBarTextStyle": "white",
|
|
23
|
+
"navigationBarTitleText": ""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
//购物车
|
|
28
|
+
"path": "cashier/cashier",
|
|
29
|
+
"style": {
|
|
30
|
+
"navigationStyle": "custom",
|
|
31
|
+
"navigationBarTextStyle": "white",
|
|
32
|
+
"navigationBarTitleText": ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
//产品分类列表
|
|
37
|
+
"path": "product/type",
|
|
38
|
+
"style": {
|
|
39
|
+
"navigationStyle": "custom",
|
|
40
|
+
"navigationBarTextStyle": "white",
|
|
41
|
+
"navigationBarTitleText": ""
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
//测试地址
|
|
47
|
+
{
|
|
48
|
+
"root": "dome",
|
|
49
|
+
"pages": [
|
|
50
|
+
{
|
|
51
|
+
"path": "dome/index",
|
|
52
|
+
"style": {
|
|
53
|
+
"navigationStyle": "custom",
|
|
54
|
+
"navigationBarTextStyle": "white",
|
|
55
|
+
"navigationBarTitleText": ""
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"path": "dome/json/json",
|
|
60
|
+
"style": {
|
|
61
|
+
"navigationStyle": "custom",
|
|
62
|
+
"navigationBarTextStyle": "white",
|
|
63
|
+
"navigationBarTitleText": ""
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "dome/icon",
|
|
68
|
+
"style": {
|
|
69
|
+
"navigationStyle": "custom",
|
|
70
|
+
"navigationBarTextStyle": "white",
|
|
71
|
+
"navigationBarTitleText": ""
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "dome/dcom/index",
|
|
76
|
+
"style": {
|
|
77
|
+
"navigationStyle": "custom",
|
|
78
|
+
"navigationBarTextStyle": "white",
|
|
79
|
+
"navigationBarTitleText": ""
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"path": "dome/form",
|
|
84
|
+
"style": {
|
|
85
|
+
"navigationStyle": "custom",
|
|
86
|
+
"navigationBarTextStyle": "white",
|
|
87
|
+
"navigationBarTitleText": ""
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"path": "dome/map/search",
|
|
92
|
+
"style": {
|
|
93
|
+
"navigationStyle": "custom",
|
|
94
|
+
"navigationBarTextStyle": "white",
|
|
95
|
+
"navigationBarTitleText": ""
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "dome/debug/debug",
|
|
100
|
+
"style": {
|
|
101
|
+
"navigationStyle": "custom",
|
|
102
|
+
"navigationBarTextStyle": "white",
|
|
103
|
+
"navigationBarTitleText": ""
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "dome/baidu_show",
|
|
108
|
+
"style": {
|
|
109
|
+
"navigationStyle": "custom",
|
|
110
|
+
"navigationBarTextStyle": "white",
|
|
111
|
+
"navigationBarTitleText": ""
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"path": "dome/my",
|
|
116
|
+
"style": {
|
|
117
|
+
"navigationStyle": "custom",
|
|
118
|
+
"navigationBarTextStyle": "white",
|
|
119
|
+
"navigationBarTitleText": ""
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "dome/order/success",
|
|
124
|
+
"style": {
|
|
125
|
+
"navigationStyle": "custom",
|
|
126
|
+
"navigationBarTextStyle": "white",
|
|
127
|
+
"navigationBarTitleText": ""
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"path": "dome/order/enter_order",
|
|
132
|
+
"style": {
|
|
133
|
+
"navigationStyle": "custom",
|
|
134
|
+
"navigationBarTextStyle": "white",
|
|
135
|
+
"navigationBarTitleText": ""
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"path": "dome/order/detail",
|
|
140
|
+
"style": {
|
|
141
|
+
"navigationStyle": "custom",
|
|
142
|
+
"navigationBarTextStyle": "white",
|
|
143
|
+
"navigationBarTitleText": ""
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"path": "dome/order/list",
|
|
148
|
+
"style": {
|
|
149
|
+
"navigationStyle": "custom",
|
|
150
|
+
"navigationBarTextStyle": "white",
|
|
151
|
+
"navigationBarTitleText": ""
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"path": "dome/express",
|
|
156
|
+
"style": {
|
|
157
|
+
"navigationStyle": "custom",
|
|
158
|
+
"navigationBarTextStyle": "white",
|
|
159
|
+
"navigationBarTitleText": ""
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"path": "dome/notice",
|
|
164
|
+
"style": {
|
|
165
|
+
"navigationStyle": "custom",
|
|
166
|
+
"navigationBarTextStyle": "white",
|
|
167
|
+
"navigationBarTitleText": ""
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"path": "dome/cart",
|
|
172
|
+
"style": {
|
|
173
|
+
"navigationStyle": "custom",
|
|
174
|
+
"navigationBarTextStyle": "white",
|
|
175
|
+
"navigationBarTitleText": ""
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"path": "dome/cart_store",
|
|
180
|
+
"style": {
|
|
181
|
+
"navigationStyle": "custom",
|
|
182
|
+
"navigationBarTextStyle": "white",
|
|
183
|
+
"navigationBarTitleText": ""
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"path": "dome/address",
|
|
188
|
+
"style": {
|
|
189
|
+
"navigationStyle": "custom",
|
|
190
|
+
"navigationBarTextStyle": "white",
|
|
191
|
+
"navigationBarTitleText": ""
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"path": "dome/item",
|
|
196
|
+
"style": {
|
|
197
|
+
"navigationStyle": "custom",
|
|
198
|
+
"navigationBarTextStyle": "white",
|
|
199
|
+
"navigationBarTitleText": ""
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"path": "dome/swiper",
|
|
204
|
+
"style": {
|
|
205
|
+
"navigationStyle": "custom",
|
|
206
|
+
"navigationBarTextStyle": "white",
|
|
207
|
+
"navigationBarTitleText": ""
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"path": "dome/clip",
|
|
212
|
+
"style": {
|
|
213
|
+
"navigationStyle": "custom",
|
|
214
|
+
"navigationBarTextStyle": "white",
|
|
215
|
+
"navigationBarTitleText": ""
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"path": "dome/line",
|
|
220
|
+
"style": {
|
|
221
|
+
"navigationStyle": "custom",
|
|
222
|
+
"navigationBarTextStyle": "white",
|
|
223
|
+
"navigationBarTitleText": ""
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"path": "dome/product",
|
|
228
|
+
"style": {
|
|
229
|
+
"navigationStyle": "custom",
|
|
230
|
+
"navigationBarTextStyle": "white",
|
|
231
|
+
"navigationBarTitleText": ""
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"path": "dome/cake",
|
|
236
|
+
"style": {
|
|
237
|
+
"navigationStyle": "custom",
|
|
238
|
+
"navigationBarTextStyle": "white",
|
|
239
|
+
"navigationBarTitleText": ""
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"path": "dome/layout",
|
|
244
|
+
"style": {
|
|
245
|
+
"navigationStyle": "custom",
|
|
246
|
+
"navigationBarTextStyle": "white",
|
|
247
|
+
"navigationBarTitleText": ""
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"path": "dome/webview",
|
|
252
|
+
"style": {
|
|
253
|
+
"navigationStyle": "custom",
|
|
254
|
+
"navigationBarTextStyle": "white",
|
|
255
|
+
"navigationBarTitleText": ""
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"path": "dome/city",
|
|
260
|
+
"style": {
|
|
261
|
+
"navigationStyle": "custom",
|
|
262
|
+
"navigationBarTextStyle": "white",
|
|
263
|
+
"navigationBarTitleText": ""
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"path": "dome/online/schedule",
|
|
268
|
+
"style": {
|
|
269
|
+
"navigationStyle": "custom",
|
|
270
|
+
"navigationBarTextStyle": "white",
|
|
271
|
+
"navigationBarTitleText": ""
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"path": "dome/online/seat",
|
|
276
|
+
"style": {
|
|
277
|
+
"navigationStyle": "custom",
|
|
278
|
+
"navigationBarTextStyle": "white",
|
|
279
|
+
"navigationBarTitleText": ""
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"path": "dome/online/confirm",
|
|
284
|
+
"style": {
|
|
285
|
+
"navigationStyle": "custom",
|
|
286
|
+
"navigationBarTextStyle": "white",
|
|
287
|
+
"navigationBarTitleText": ""
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"path": "dome/online/pay",
|
|
292
|
+
"style": {
|
|
293
|
+
"navigationStyle": "custom",
|
|
294
|
+
"navigationBarTextStyle": "white",
|
|
295
|
+
"navigationBarTitleText": ""
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"path": "dome/online/detail",
|
|
300
|
+
"style": {
|
|
301
|
+
"navigationStyle": "custom",
|
|
302
|
+
"navigationBarTextStyle": "white",
|
|
303
|
+
"navigationBarTitleText": ""
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"path": "dome/date/date",
|
|
308
|
+
"style": {
|
|
309
|
+
"navigationStyle": "custom",
|
|
310
|
+
"navigationBarTextStyle": "white",
|
|
311
|
+
"navigationBarTitleText": ""
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
|
|
318
|
+
//分包预加载
|
|
319
|
+
"preloadRule": {
|
|
320
|
+
"pages/index/index": {
|
|
321
|
+
"network": "all",
|
|
322
|
+
"packages": [
|
|
323
|
+
"main",
|
|
324
|
+
"dome"
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"globalStyle": {
|
|
329
|
+
"navigationBarTextStyle": "black",
|
|
330
|
+
"navigationBarTitleText": "",
|
|
331
|
+
"navigationBarBackgroundColor": "#F8F8F8",
|
|
332
|
+
"backgroundColor": "#fff",
|
|
333
|
+
"rpxCalcMaxDeviceWidth": 960,
|
|
334
|
+
"rpxCalcBaseDeviceWidth": 375,
|
|
335
|
+
"rpxCalcIncludeWidth": 750
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const autoload = require('./../autoload');
|
|
3
|
+
const basePath = require('./../path');
|
|
4
|
+
let time = null;
|
|
5
|
+
|
|
6
|
+
class CreatedComponentsPlugin {
|
|
7
|
+
constructor() {}
|
|
8
|
+
apply(compiler) {
|
|
9
|
+
if (time) {
|
|
10
|
+
clearTimeout(time);
|
|
11
|
+
time = null;
|
|
12
|
+
}
|
|
13
|
+
time = setTimeout(() => {
|
|
14
|
+
autoload.createAutoload(basePath.buildComponentsDirectory, ['vue'], 'object', 'Components');
|
|
15
|
+
}, 30);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = CreatedComponentsPlugin;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fileHepler = require('./../fileHepler');
|
|
4
|
+
const basePath = require('./../path');
|
|
5
|
+
const clog = require('./../clog');
|
|
6
|
+
|
|
7
|
+
class AJsonRename {
|
|
8
|
+
|
|
9
|
+
constructor() {
|
|
10
|
+
this.files = [];
|
|
11
|
+
this.count = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
rename(file, done){
|
|
15
|
+
let oldPath = `${basePath.devComponents}/${file['fullName']}`;
|
|
16
|
+
let newPath = `${basePath.devComponents}/${file['fullName'].replace('.bak','')}`;
|
|
17
|
+
fileHepler.renameFile(oldPath, newPath)
|
|
18
|
+
.then(()=>{
|
|
19
|
+
done()
|
|
20
|
+
})
|
|
21
|
+
.catch(res=>{
|
|
22
|
+
clog(`重命名失败,当前文件:${file['fullName']}`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description 异步轮询
|
|
28
|
+
*/
|
|
29
|
+
execute() {
|
|
30
|
+
if (this.files.length > 0) {
|
|
31
|
+
let {handle, file} = this.files.shift();
|
|
32
|
+
this.count++;
|
|
33
|
+
handle(() => {
|
|
34
|
+
this.rename(file, ()=>{
|
|
35
|
+
this.execute(file);
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
this.done();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
done(){
|
|
44
|
+
clog(`---执行完成,修改文件的个数:${this.count}--------------`, 'green');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
apply(compiler) {
|
|
48
|
+
compiler.hooks.done.tap("DonePlugins", (stats)=> {
|
|
49
|
+
clog('\n');
|
|
50
|
+
clog('---开始处理开发环境下面的bak.json--------------', 'green');
|
|
51
|
+
clog('\n');
|
|
52
|
+
|
|
53
|
+
let json = fileHepler.getDirFiles(basePath.devComponents, ['json']);
|
|
54
|
+
Object.keys(json).map((item) => {
|
|
55
|
+
let reg = /^(.*)(\.bak)$/;
|
|
56
|
+
if (reg.test(item)) {
|
|
57
|
+
this.files.push({
|
|
58
|
+
handle: (next)=>{
|
|
59
|
+
next()
|
|
60
|
+
},
|
|
61
|
+
file: json[item]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
this.execute()
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = AJsonRename;
|
|
72
|
+
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const clog = require('./../clog');
|
|
4
|
+
const fileHepler = require('./../fileHepler');
|
|
5
|
+
const basePath = require('./../path');
|
|
6
|
+
const color = require('color');
|
|
7
|
+
let mamifest = require('../../src/manifest');
|
|
8
|
+
let pagesPath = require('../../src/router');
|
|
9
|
+
|
|
10
|
+
/**合并测试路由**/
|
|
11
|
+
const routerDome = require('./../../src/routerDome');
|
|
12
|
+
function mergeDomeRouter() {
|
|
13
|
+
let srcSubPackagesRouter = pagesPath['subPackages'];
|
|
14
|
+
let srcDome = []; //当前已有测试路由
|
|
15
|
+
let srcDomeIndex = null;
|
|
16
|
+
let mergeDomeRouter = [];
|
|
17
|
+
srcSubPackagesRouter.map((item, index) => {
|
|
18
|
+
if (item.root === 'dome') {
|
|
19
|
+
srcDome = item['pages'];
|
|
20
|
+
srcDomeIndex = index;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
routerDome.map(k=>{
|
|
25
|
+
let isExist = false;
|
|
26
|
+
srcDome.map(i=>{
|
|
27
|
+
if(k.path === i.path) {
|
|
28
|
+
isExist = true;
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
if(!isExist) mergeDomeRouter.push(k);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
srcDome = srcDome.concat(mergeDomeRouter);
|
|
35
|
+
|
|
36
|
+
if(srcDomeIndex !== null) {
|
|
37
|
+
pagesPath['subPackages'].splice(srcDomeIndex, 1, {
|
|
38
|
+
root: 'dome',
|
|
39
|
+
pages: srcDome,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
pagesPath['subPackages'].push({
|
|
44
|
+
root: 'dome',
|
|
45
|
+
pages: srcDome,
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return pagesPath;
|
|
50
|
+
}
|
|
51
|
+
let pages = mergeDomeRouter();
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class SetAppParams {
|
|
55
|
+
constructor() {
|
|
56
|
+
this.appid = process.env.APP_ID;
|
|
57
|
+
this.host = process.env.HOST;
|
|
58
|
+
this.platform = process.env.UNI_PLATFORM;
|
|
59
|
+
this.color = process.env.COLOR || '#f60';
|
|
60
|
+
this.platformFile = basePath.buildRoot + 'appParams.js';
|
|
61
|
+
this.mainfest = basePath.buildRoot + 'src/manifest.json';
|
|
62
|
+
this.pages = basePath.buildRoot + 'src/pages.json';
|
|
63
|
+
this.subColor = color(this.color).alpha(0.4).lighten(0.35).hex();
|
|
64
|
+
this.appName = process.env.APP_NAME;
|
|
65
|
+
this.is_cake = process.env.IS_CAKE || 'false';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
apply(compiler) {
|
|
69
|
+
|
|
70
|
+
//开始环境变量时刻
|
|
71
|
+
compiler.hooks.environment.tap('setAppParamsPlugins', (stats)=>{
|
|
72
|
+
let platformFile = {
|
|
73
|
+
appid: this.appid,
|
|
74
|
+
host: this.host,
|
|
75
|
+
platform: this.platform,
|
|
76
|
+
color: this.color,
|
|
77
|
+
subColor: this.subColor
|
|
78
|
+
};
|
|
79
|
+
clog('\n');
|
|
80
|
+
clog(`--setAppParamsPluginskai 开始(${JSON.stringify(platformFile)}) --------------`, 'green');
|
|
81
|
+
clog('\n');
|
|
82
|
+
|
|
83
|
+
//微信小程序
|
|
84
|
+
if(this.platform === 'mp-weixin') {
|
|
85
|
+
if((this.appid === null || this.host === null)){
|
|
86
|
+
throw new Error('错误');
|
|
87
|
+
}
|
|
88
|
+
let oldAppId = mamifest['mp-weixin']['appid'];
|
|
89
|
+
if (oldAppId !== this.appid) {
|
|
90
|
+
//设置APPID
|
|
91
|
+
mamifest['mp-weixin']['appid'] = this.appid;
|
|
92
|
+
//设置tabbar背景颜色
|
|
93
|
+
pages['globalStyle']['navigationBarBackgroundColor'] = this.color;
|
|
94
|
+
|
|
95
|
+
clog(`--setAppParamsPluginskai AppId(${this.appid})AppName(${this.appName})更换成功 --------------`, 'green');
|
|
96
|
+
} else {
|
|
97
|
+
clog(`--setAppParamsPluginskai AppId(${this.appid})相同不处理 --------------`, 'green');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else{
|
|
101
|
+
platformFile = {
|
|
102
|
+
platform: this.platform,
|
|
103
|
+
is_cake: this.is_cake === 'true'
|
|
104
|
+
};
|
|
105
|
+
mamifest['mp-weixin']['appid'] = '';
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//生成环境(去除dome测试路由)
|
|
109
|
+
if(process.env.NODE_ENV === 'production') {
|
|
110
|
+
let temp = [];
|
|
111
|
+
|
|
112
|
+
//测试路由
|
|
113
|
+
if(pages['subPackages'].length > 0) {
|
|
114
|
+
pages['subPackages'].map((item)=>{
|
|
115
|
+
if(item['root'] !== 'dome') {
|
|
116
|
+
temp.push(item)
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
pages['subPackages'] = temp;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//preloadRule
|
|
123
|
+
if(pages['preloadRule']
|
|
124
|
+
&& pages['preloadRule']['pages/loading/loading']
|
|
125
|
+
&& pages['preloadRule']['pages/loading/loading']['packages']
|
|
126
|
+
&& pages['preloadRule']['pages/loading/loading']['packages'].length > 0
|
|
127
|
+
) {
|
|
128
|
+
let preload = [];
|
|
129
|
+
pages['preloadRule']['pages/loading/loading']['packages'].map(item=>{
|
|
130
|
+
if(item !== 'dome') {
|
|
131
|
+
preload.push(item)
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
pages['preloadRule']['pages/loading/loading']['packages'] = preload;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
let str = `module.exports = ${JSON.stringify(platformFile)};`;
|
|
141
|
+
|
|
142
|
+
try{
|
|
143
|
+
let platformP = fileHepler.writeFile(this.platformFile, str);
|
|
144
|
+
let m = JSON.stringify(mamifest, null, 2);
|
|
145
|
+
let p = JSON.stringify(pages, null, 2);
|
|
146
|
+
let mamifestP = fileHepler.writeFile(this.mainfest, m);
|
|
147
|
+
let pagesP = fileHepler.writeFile(this.pages, p);
|
|
148
|
+
Promise.all([mamifestP, pagesP, platformP])
|
|
149
|
+
.then(res => {
|
|
150
|
+
clog('--setAppParamsPluginskai 成功--------------', 'green');
|
|
151
|
+
})
|
|
152
|
+
.catch(res => {
|
|
153
|
+
clog('--setAppParamsPluginskai 失败--------------', 'red');
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
throw new Error('写入文件错误');
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
//编译完成时刻
|
|
162
|
+
compiler.hooks.done.tap('xdDone', (stats) => {
|
|
163
|
+
clog(`-- 编译完成 --------`, 'green');
|
|
164
|
+
clog('\n');
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
module.exports = SetAppParams;
|
|
171
|
+
|
package/src/project.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 平台参数配置
|
|
5
|
+
* @type {{EVENT_PARAM_NAM: *}}
|
|
6
|
+
*/
|
|
7
|
+
export const PLATFORM_PARAM_SETTING = {
|
|
8
|
+
EVENT_PARAM_NAME: 'event_id', //地址栏活动参数名
|
|
9
|
+
EVENT_PARAM_SAVE_KEY: 'XD_EVENT_KEY', //保存本地键名
|
|
10
|
+
IS_ClOSE_REDIRECT: true, //路由是否添加 xdRedirect
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/***
|
|
14
|
+
* @description 项目入口页面
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
export const ROOT_ENTRY = 'pages/index/index';
|
|
18
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by shiyonggao on 2019/11/28.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
class Cookie {
|
|
6
|
+
/**
|
|
7
|
+
* 读取cookie值
|
|
8
|
+
* @param key
|
|
9
|
+
* @param options
|
|
10
|
+
*/
|
|
11
|
+
get(key, options) {
|
|
12
|
+
options = options || {};
|
|
13
|
+
let result, decode = options.raw ? function (s) {
|
|
14
|
+
return s;
|
|
15
|
+
} : decodeURIComponent;
|
|
16
|
+
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 删除指定键值所对应的cookie值
|
|
21
|
+
* @param key
|
|
22
|
+
* @param options
|
|
23
|
+
*/
|
|
24
|
+
remove(key, options) {
|
|
25
|
+
this.set(key, null, options ? options : {});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 添加指定名称cookie值 , 过期时间小时制
|
|
31
|
+
* @param key
|
|
32
|
+
* @param value
|
|
33
|
+
* @param options
|
|
34
|
+
*/
|
|
35
|
+
set(key, value, options) {
|
|
36
|
+
options = Object.assign({}, {
|
|
37
|
+
domain: '',
|
|
38
|
+
path: '/'
|
|
39
|
+
}, options);
|
|
40
|
+
|
|
41
|
+
//删除cookie操作处理
|
|
42
|
+
if (value === null) {
|
|
43
|
+
options.expires = -1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//设置过期时间
|
|
47
|
+
if (typeof options.expires === 'number') {
|
|
48
|
+
let seconds = options.expires, t = options.expires = new Date();
|
|
49
|
+
t.setTime(t.getTime() + seconds * 1000 * 60 * 60);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//强制转换为字符串格式
|
|
53
|
+
value = '' + value;
|
|
54
|
+
|
|
55
|
+
//设置cookie信息
|
|
56
|
+
return (document.cookie = [
|
|
57
|
+
encodeURIComponent(key), '=',
|
|
58
|
+
options.raw ? value : encodeURIComponent(value),
|
|
59
|
+
options.expires ? '; expires=' + options.expires.toUTCString() : '',
|
|
60
|
+
options.path ? '; path=' + options.path : '',
|
|
61
|
+
options.domain ? '; domain=' + options.domain : '',
|
|
62
|
+
options['secure'] ? '; secure' : ''
|
|
63
|
+
].join(''));
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default Cookie;
|