Commit 6f22be62 by zhangzhen

功能完善

parent d4f8883b
......@@ -201,10 +201,7 @@
}
},
onShow() {
this.onGetSysConfig();
uni.showLoading({
title:'加载中'
})
this.onGetSysConfig();
this.onLoading()
},
onReachBottom() {
......@@ -220,7 +217,7 @@
// 隐藏原生的tabbar
uni.hideTabBar();
this.$refs.loginPop.open();
this.onGetDicts()
this.onGetDicts();
},
methods: {
onGetSysConfig(){
......@@ -239,9 +236,13 @@
this.facilitieList = getDictItem(dicts, "indoor_facilities");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
this.roomStatusEnum = getDictItem(dicts, "store_room_status");
this.onGetListStore();
})
},
onLoading() {
uni.showLoading({
title:'加载中'
})
uni.getLocation({
type: "gcj02",
complete: (res) => {
......@@ -250,13 +251,11 @@
this.longitude = res.longitude;
uni.setStorageSync("latitude", res.latitude)
uni.setStorageSync("longitude", res.longitude)
this.onGetListStore()
} else{
this.$refs.popup.open()
uni.hideLoading()
}
// uni.removeStorage({
// key: 'storeId'
// })
this.onGetListStore()
}
})
},
......@@ -264,9 +263,10 @@
let that = this;
getListStore({
...this.queryParams,
nowLatitude: this.latitude||'',
nowLongitude: this.longitude||''
nowLatitude: this.latitude,
nowLongitude: this.longitude
}).then(res => {
uni.hideLoading()
if (res.data.code == 200 && res.data.data.length) {
this.storeList = res.data.data;
let obj = {}
......@@ -274,24 +274,19 @@
obj = this.storeList.find(item=>item.id === uni.getStorageSync("storeId"))
}else{
obj = res.data.data[0];
}
new Promise((resolve,reject)=>{
that.storeInfo = {
...obj,
distance:obj.distance? Number(obj.distance.substr(0,8)).toFixed(2):0,
roomVoList:obj.roomVoList && obj.roomVoList.length? obj.roomVoList.map(item => {
return {
...item,
facilities: item.facilities ? item.facilities.split(",") : [],
images: item.images ? item.images
.split(",").map(val => this.hostUrl + val) : []
}
}):[]
}
resolve()
}).then(()=>{
uni.hideLoading()
})
}
that.storeInfo = {
...obj,
distance:obj.distance? Number(obj.distance.substr(0,8)).toFixed(2):0,
roomVoList:obj.roomVoList && obj.roomVoList.length? obj.roomVoList.map(item => {
return {
...item,
facilities: item.facilities ? item.facilities.split(",") : [],
images: item.images ? item.images
.split(",").map(val => this.hostUrl + val) : []
}
}):[]
}
}
})
},
......
......@@ -868,6 +868,7 @@
title: "选择时段有重复"
})
}
this.onComputePrice();
},
onDurationChange(i) {
if (i >= this.distanceMode.length - 1) {
......
......@@ -91,6 +91,10 @@
<text class="text-gray">结束时间:</text>
<text class="text-title">{{item.endDate}}</text>
</view>
<view v-if="item.refundReasonTime" class="flex-between part-1">
<text class="text-gray">取消时间:</text>
<text class="text-title">{{item.refundReasonTime}}</text>
</view>
<!-- <view class="flex-between part-1">
<text class="text-gray">订单总计:</text>
<text class="text-pink text-bold">{{item.totalPrice}}</text>
......@@ -275,14 +279,14 @@ import NoLogin from "@/components/noLogin/noLogin"
align-items: center;
.list-item{
width: 94%;
padding: 30upx 20upx;
padding: 24upx 20upx 12upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
padding:0 10upx 20upx;
.store-name{
align-items: center;
}
......
......@@ -79,6 +79,10 @@
<text style="margin-left: 4upx;"></text>
</view>
</view>
<view v-if="orderInfo.refundReasonTime" class="flex-between">
<text class="text-gray">取消时间</text>
<text class="text-title">{{orderInfo.refundReasonTime}}</text>
</view>
</view>
<view v-if="orderInfo.status <= 1" class="part-2">
......
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