Commit d8d64b5b by 李嘉林

优化

parent 7a8fba9e
......@@ -89,27 +89,7 @@ export default {
wx.getLocation({
type: 'wgs84',
success: function (res) {
const query = {
longitude: res.longitude, // 经度
latitude: res.latitude // 纬度
}
console.log('定位数据', res)
goods.getWlyList(query).then((res) => {
console.log(res,'---res')
_this.isLoading = false;
if (res.data.code == 200 && res.data.data) {
_this.showList = true;
_this.sourceData = res.data.data;
_this.sourceData.restaurantLogo = DFSImg(res.data.data.restaurantLogo);
console.log(_this.sourceData,DFSImg(res.data.data.restaurantLogo), "商家数据");
} else {
_this.showList = false;
// wx.showToast({
// title: '附近暂无餐厅',
// icon: 'none',
// })
}
})
_this.getList(res);
},
fail: function (err) {
_this.isLoading = false;
......@@ -124,12 +104,35 @@ export default {
} else if (res.cancel) {
console.log('用户点击取消')
}
_this.getList({
longitude: "",
latitude: ""
});
}
})
}
})
},
methods: {
getList(res) {
let query = {
longitude: res.longitude, // 经度
latitude: res.latitude // 纬度
}
console.log('定位数据', res)
goods.getWlyList(query).then((res) => {
console.log(res,'---res')
this.isLoading = false;
if (res.data.code == 200 && res.data.data) {
this.showList = true;
this.sourceData = res.data.data;
this.sourceData.restaurantLogo = DFSImg(res.data.data.restaurantLogo);
console.log(this.sourceData,DFSImg(res.data.data.restaurantLogo), "商家数据");
} else {
this.showList = false;
}
})
},
viewMore() {
let url = "/pages/wxArticle/main?link=" + encodeURIComponent(process.env.WLY_PROD_MARKETING+"/#/pages/restaurantList/index");
app.$themeToLink({
......
......@@ -184,7 +184,9 @@ const componentOptions = {
// this.setData({ isLoading: true });
// }, 100);
// }, 100);
if (copyData.goodsItems && copyData.goodsItems.length > 0) {
this.setData({ isLoading: false });
}
copyData.goodsItems.forEach((item, index) => {
item.productImgUrl = DFSImg(item.imgUrl);
item.productImgUrl1 = DFSImg(item.imgUrl);
......@@ -309,7 +311,7 @@ const componentOptions = {
type: 1,
link: `/goods/${productId}?limitedLime=true&endTime=${
this.data.datas.componentData.endTime
}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}`
}&terminalProductId=${terminalProductId? terminalProductId: ''}&terminalGoodsMixId=${terminalGoodsMixId}`
});
},
onclickOrder(e) {
......
......@@ -14,12 +14,13 @@
class="countDown"
bind:change="onChange"
>
<text class="endTimedot">距离活动结束</text>
<text class="endTime days">{{ timeData.days }}</text>
<text class="endTimedot"></text>
<text class="endTimedot"></text>
<text class="endTime hours">{{ timeData.hours }}</text>
<text class="endTimedot">:</text>
<text class="endTimedot"></text>
<text class="endTime minute">{{ timeData.minutes }}</text>
<text class="endTimedot">:</text>
<text class="endTimedot"></text>
<text class="endTime second">{{ timeData.seconds }}</text>
</van-count-down>
</view>
......
......@@ -50,6 +50,7 @@
background: #6a6b6b;
color: #fff;
font-weight: bold;
font-size: 13px;
-webkit-border-radius: 6rpx;
-moz-border-radius: 6rpx;
-ms-border-radius: 6rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment