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.
- package/README.md +27 -0
- package/commands.js +84 -0
- package/commands.update.change.js +176 -0
- package/file.config.js +16 -0
- package/get.package.path.js +22 -0
- package/get.package.path.js.tpl +22 -0
- package/package.json +122 -0
- package/src/CreateClientID.js +16 -0
- package/src/ICONS.js +1148 -0
- package/src/appParams.js +1 -0
- package/src/common/authorize.js +261 -0
- package/src/common/getBusinessImageUrl.js +39 -0
- package/src/common/getServiceUrl.js +38 -0
- package/src/common/paysdk/jweixin.js +98 -0
- package/src/components/CusCouponChose/CusCouponChose.vue +1024 -0
- package/src/components/CusCouponItem/CusCouponItem.vue +298 -0
- package/src/components/CusEnter/CusEnter.vue +368 -0
- package/src/components/CusListItem/CusListItem.vue +141 -0
- package/src/components/CusPoster/CusPoster.vue +167 -0
- package/src/components/CusPoster/CusSwiperDot.vue +234 -0
- package/src/components/CusPrice/CusPrice.vue +383 -0
- package/src/components/CusProduct/CusProduct.vue +763 -0
- package/src/components/CusShops/CusShops.vue +717 -0
- package/src/components/CusSwiperDot/CusSwiperDot.vue +234 -0
- package/src/components/CusTab/CusTab.vue +544 -0
- package/src/components/CusVideo/CusVideo.vue +170 -0
- package/src/components/CusVipList/CusVipList.vue +169 -0
- package/src/config.app.plus.js +6 -0
- package/src/config.h5.js +13 -0
- package/src/config.mp.weixin.js +13 -0
- package/src/config.project.js +15 -0
- package/src/get.package.path.js +22 -0
- package/src/mixins/cardListMixins.js +187 -0
- package/src/mixins/colorCardMixins.js +122 -0
- package/src/mixins/componentsMixins.js +900 -0
- package/src/mixins/extsMixins.js +3 -0
- package/src/mixins/locationMixins.js +119 -0
- package/src/mixins/newLocaltionMixins.js +754 -0
- package/src/mixins/openDebuggerMixins.js +74 -0
- package/src/mixins/pageEditx.js +347 -0
- package/src/mixins/pageEvent.js +311 -0
- package/src/mixins/pageMain.js +120 -0
- package/src/mixins/pageUitls.js +738 -0
- package/src/mixins/posterMixins.js +122 -0
- package/src/mixins/scrollListFixedHeigthMixins.js +174 -0
- package/src/mocks.js +4 -0
- package/src/oss.config.js +17 -0
- package/src/settings.js +244 -0
- package/src/staticVersion.js +3 -0
- package/src/xd.less +196 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {mapActions, mapMutations} from 'vuex';
|
|
3
|
+
import storage from "@/common/storage";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
data() {
|
|
7
|
+
return {
|
|
8
|
+
locationStatus: false,
|
|
9
|
+
currentLocationCity: 'jfb_current_ajax_location_city',
|
|
10
|
+
useSelectCity: 'xd_user_current_access_city',
|
|
11
|
+
timeoutLocationTime: null,
|
|
12
|
+
timeoutLocationStatus: false,
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
destroyed() {
|
|
17
|
+
if(this.timeoutLocationTime) {
|
|
18
|
+
clearTimeout(this.timeoutLocationTime)
|
|
19
|
+
this.timeoutLocationTime = null;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
methods: {
|
|
24
|
+
...mapActions(['getAllCityList']),
|
|
25
|
+
...mapActions('wxAuthorize', [
|
|
26
|
+
'getLoadingCityInfoByLocationLv4'
|
|
27
|
+
]),
|
|
28
|
+
...mapMutations(['setCityInfo']),
|
|
29
|
+
|
|
30
|
+
async getCityInfoByLocation(options, cb) {
|
|
31
|
+
try {
|
|
32
|
+
this.$xdLog.setProject('Layout.getCity.start.open.in', {
|
|
33
|
+
time: new Date().getTime(),
|
|
34
|
+
timeString: new Date().toLocaleString(),
|
|
35
|
+
...options
|
|
36
|
+
});
|
|
37
|
+
let locationInfo = await this.getLoadingCityInfoByLocationLv4(options);
|
|
38
|
+
storage.set('console_Layout.getCity.done',locationInfo)
|
|
39
|
+
this.$xdLog.setProject('Layout.getCity.done', {
|
|
40
|
+
time: new Date().getTime(),
|
|
41
|
+
timeString: new Date().toLocaleString(),
|
|
42
|
+
...locationInfo
|
|
43
|
+
});
|
|
44
|
+
cb(locationInfo);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
storage.set('aaa_Layout.getCity.fail',1)
|
|
47
|
+
this.$xdLog.setProject('Layout.getCity.fail', {
|
|
48
|
+
time: new Date().getTime(),
|
|
49
|
+
timeString: new Date().toLocaleString(),
|
|
50
|
+
...this.$settings.defaultCity
|
|
51
|
+
});
|
|
52
|
+
cb({data: this.$settings.defaultCity})
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
setDefaultCityData(defaultCity, local){
|
|
57
|
+
if(!defaultCity.isDefault){
|
|
58
|
+
storage.set(this.currentLocationCity, defaultCity, .5);
|
|
59
|
+
}
|
|
60
|
+
//用户首次定位成功设置系统自动给用户选中一个城市
|
|
61
|
+
if (!storage.get(this.useSelectCity)) {
|
|
62
|
+
this.setCityInfo(defaultCity)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
timeoutLocation(location){
|
|
67
|
+
this.timeoutLocationTime = setTimeout(()=>{
|
|
68
|
+
this.setDefaultCityData(this.$settings.defaultCity);
|
|
69
|
+
this.$xdLog.setProject('Layout.getCity.timeout.5s', {
|
|
70
|
+
time: new Date().getTime(),
|
|
71
|
+
timeString: new Date().toLocaleString(),
|
|
72
|
+
...this.$settings.defaultCity,
|
|
73
|
+
...location
|
|
74
|
+
});
|
|
75
|
+
this.locationStatus = true;
|
|
76
|
+
this.timeoutLocationStatus = true;
|
|
77
|
+
}, 3000)
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
handleLocationDone(location) {
|
|
81
|
+
this.$xdLog.setProject('Layout.getCity.start', {
|
|
82
|
+
time: new Date().getTime(),
|
|
83
|
+
timeString: new Date().toLocaleString(),
|
|
84
|
+
statue:this.locationStatus,
|
|
85
|
+
...location
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
//从缓存定位到的城市
|
|
89
|
+
if(storage.get(this.currentLocationCity)) {
|
|
90
|
+
this.locationStatus = true;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//通过接口获取定位城市信息
|
|
95
|
+
this.$xdLog.setProject('Layout.getCity.start.send', {
|
|
96
|
+
time: new Date().getTime(),
|
|
97
|
+
timeString: new Date().toLocaleString(),
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
this.getCityInfoByLocation(location, (res)=>{
|
|
101
|
+
if (this.timeoutLocationStatus) return;
|
|
102
|
+
this.setDefaultCityData(res.data);
|
|
103
|
+
this.$xdLog.setProject('Layout.location.done', {
|
|
104
|
+
time: new Date().getTime(),
|
|
105
|
+
timeString: new Date().toLocaleString(),
|
|
106
|
+
});
|
|
107
|
+
if(this.timeoutLocationTime) {
|
|
108
|
+
clearTimeout(this.timeoutLocationTime);
|
|
109
|
+
this.timeoutLocationTime = null;
|
|
110
|
+
this.timeoutLocationStatus = false;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
this.locationStatus = true;
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
this.timeoutLocation(location);
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
}
|