Commit d8d64b5b by 李嘉林

优化

parent 7a8fba9e
...@@ -89,27 +89,7 @@ export default { ...@@ -89,27 +89,7 @@ export default {
wx.getLocation({ wx.getLocation({
type: 'wgs84', type: 'wgs84',
success: function (res) { success: function (res) {
const query = { _this.getList(res);
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',
// })
}
})
}, },
fail: function (err) { fail: function (err) {
_this.isLoading = false; _this.isLoading = false;
...@@ -124,12 +104,35 @@ export default { ...@@ -124,12 +104,35 @@ export default {
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
} }
_this.getList({
longitude: "",
latitude: ""
});
} }
}) })
} }
}) })
}, },
methods: { 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() { viewMore() {
let url = "/pages/wxArticle/main?link=" + encodeURIComponent(process.env.WLY_PROD_MARKETING+"/#/pages/restaurantList/index"); let url = "/pages/wxArticle/main?link=" + encodeURIComponent(process.env.WLY_PROD_MARKETING+"/#/pages/restaurantList/index");
app.$themeToLink({ app.$themeToLink({
......
...@@ -184,7 +184,9 @@ const componentOptions = { ...@@ -184,7 +184,9 @@ const componentOptions = {
// this.setData({ isLoading: true }); // this.setData({ isLoading: true });
// }, 100); // }, 100);
// }, 100); // }, 100);
this.setData({ isLoading: false }); if (copyData.goodsItems && copyData.goodsItems.length > 0) {
this.setData({ isLoading: false });
}
copyData.goodsItems.forEach((item, index) => { copyData.goodsItems.forEach((item, index) => {
item.productImgUrl = DFSImg(item.imgUrl); item.productImgUrl = DFSImg(item.imgUrl);
item.productImgUrl1 = DFSImg(item.imgUrl); item.productImgUrl1 = DFSImg(item.imgUrl);
...@@ -309,7 +311,7 @@ const componentOptions = { ...@@ -309,7 +311,7 @@ const componentOptions = {
type: 1, type: 1,
link: `/goods/${productId}?limitedLime=true&endTime=${ link: `/goods/${productId}?limitedLime=true&endTime=${
this.data.datas.componentData.endTime this.data.datas.componentData.endTime
}&terminalProductId=${terminalProductId}&terminalGoodsMixId=${terminalGoodsMixId}` }&terminalProductId=${terminalProductId? terminalProductId: ''}&terminalGoodsMixId=${terminalGoodsMixId}`
}); });
}, },
onclickOrder(e) { onclickOrder(e) {
......
...@@ -14,12 +14,13 @@ ...@@ -14,12 +14,13 @@
class="countDown" class="countDown"
bind:change="onChange" bind:change="onChange"
> >
<text class="endTimedot">距离活动结束</text>
<text class="endTime days">{{ timeData.days }}</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="endTime hours">{{ timeData.hours }}</text>
<text class="endTimedot">:</text> <text class="endTimedot"></text>
<text class="endTime minute">{{ timeData.minutes }}</text> <text class="endTime minute">{{ timeData.minutes }}</text>
<text class="endTimedot">:</text> <text class="endTimedot"></text>
<text class="endTime second">{{ timeData.seconds }}</text> <text class="endTime second">{{ timeData.seconds }}</text>
</van-count-down> </van-count-down>
</view> </view>
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
background: #6a6b6b; background: #6a6b6b;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
font-size: 13px;
-webkit-border-radius: 6rpx; -webkit-border-radius: 6rpx;
-moz-border-radius: 6rpx; -moz-border-radius: 6rpx;
-ms-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