Skip to content

Commit 1efb0fc

Browse files
committed
update
1 parent b2796ed commit 1efb0fc

28 files changed

+105
-106
lines changed

elm/static/js/food.6200c8da1ce2fe5c840c.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elm/static/js/food.c5f3f734f7d415694ff4.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

elm/static/js/manifest.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elm/static/js/msite.a81083d3331bf9f3b1e9.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elm/static/js/msite.b6395a7462e4f34f6256.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

elm/static/js/shop.02f0ad8d445c8752de66.min.js renamed to elm/static/js/shop.b7c79d574adf705e82da.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/common/shoplist.vue

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ export default {
9999
methods: {
100100
//到达底部加载更多数据
101101
async loaderMore(){
102-
//防止重复请求
103-
if (this.preventRepeatReuqest) {
104-
return
102+
//demo因为是获取模拟数据,同步过程不需要进行判断
103+
if (process.env.NODE_ENV == 'development') {
104+
//防止重复请求
105+
if (this.preventRepeatReuqest) {
106+
return
107+
}
105108
}
106109
107110
this.preventRepeatReuqest = true;
@@ -110,7 +113,7 @@ export default {
110113
this.showLoading = true;
111114
let res = await shopList(this.latitude, this.longitude, this.offset, this.restaurantCategoryId);
112115
this.shopListArr = [...this.shopListArr, ...res];
113-
this.showLoading = false;
116+
this.hideLoading();
114117
//当获取数据小于20,说明没有更多数据,不需要再次请求数据
115118
if (res.length < 20) {
116119
return
@@ -126,20 +129,15 @@ export default {
126129
this.offset = 0;
127130
this.showLoading = true;
128131
this.shopListArr = await shopList(this.latitude, this.longitude, this.offset, '', this.restaurantCategoryIds, this.sortByType, this.deliveryMode, this.supportIds);
129-
if (process.env.NODE_ENV !== 'development') {
130-
this.shopListArr = [...this.shopListArr.reverse()];
131-
this.hideLoading();
132-
}else{
133-
this.showLoading = false;
134-
}
132+
this.hideLoading();
135133
},
136134
hideLoading(){
137135
if (process.env.NODE_ENV !== 'development') {
138136
clearTimeout(this.timer);
139137
this.timer = setTimeout(() => {
140138
clearTimeout(this.timer);
141139
this.showLoading = false;
142-
}, 400)
140+
}, 600)
143141
}else{
144142
this.showLoading = false;
145143
}

src/page/city/city.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
</template>
2424

2525
<script>
26-
import headTop from '../../components/header/head'
27-
import {currentcity, searchplace} from '../../service/getData'
28-
import {getStore, setStore} from '../../config/mUtils'
26+
import headTop from 'src/components/header/head'
27+
import {currentcity, searchplace} from 'src/service/getData'
28+
import {getStore, setStore} from 'src/config/mUtils'
2929
3030
export default {
3131
data(){
@@ -102,7 +102,7 @@
102102
</script>
103103

104104
<style lang="scss" scoped>
105-
@import '../../style/mixin';
105+
@import 'src/style/mixin';
106106
.city_container{
107107
padding-top: 2.35rem;
108108
}

src/page/confirmOrder/children/children/addAddress.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
</template>
5757

5858
<script>
59-
import headTop from '../../../../components/header/head'
59+
import headTop from 'src/components/header/head'
6060
import {mapState, mapMutations} from 'vuex'
61-
import {getAddress, getUser, postAddAddress} from '../../../../service/getData'
62-
import alertTip from '../../../../components/common/alertTip'
61+
import {getAddress, getUser, postAddAddress} from 'src/service/getData'
62+
import alertTip from 'src/components/common/alertTip'
6363
6464
export default {
6565
data(){
@@ -128,7 +128,7 @@
128128
</script>
129129

130130
<style lang="scss" scoped>
131-
@import '../../../../style/mixin';
131+
@import 'src/style/mixin';
132132
133133
.address_page{
134134
position: fixed;

0 commit comments

Comments
 (0)