Commit 968d0f58 by zhangzhen

细节优化

parent 044767d9
......@@ -83,7 +83,7 @@
this.orderNo = res.data.data[0].orderNo;
this.onOpenDoor()
}else if(res.data.data&&res.data.data.length > 1){
uni.navigateTo({
uni.switchTab({
url:"/pages/orderRecord/orderRecord"
})
}else{
......
......@@ -24,7 +24,7 @@
<text class="cuIcon-titles text-pink text-xl"></text>
<text class="text-black text-xl text-bold">{{orderInfo.storeName || '门店名称'}}</text>
</view>
<button class="cu-btn line-pink">
<button class="cu-btn line-pink" @tap="onNavToMap">
<text>导航</text>
<image :src="assetsPath+'/map_icon.png'" mode="heightFix"></image>
</button>
......@@ -142,15 +142,29 @@
})
},
onOpenDoor(){
uni.showLoading({
title:"开门中..."
})
openDoor(this.orderNo).then(res=>{
uni.hideLoading()
uni.showToast({
icon:"none",
title:res.data.msg
if(this.orderInfo.status <=1){
uni.showLoading({
title:"开门中..."
})
openDoor(this.orderNo).then(res=>{
uni.hideLoading()
uni.showToast({
icon:"none",
title:res.data.msg
})
})
}
},
onNavToMap() {
uni.openLocation({
latitude: Number(this.orderInfo.latitude),
longitude: Number(this.orderInfo.longitude),
scale: 18,
name: this.orderInfo.address,
complete: (res) => {
console.log(res)
}
})
}
}
......@@ -167,7 +181,7 @@
flex-direction: column;
.order-time{
width: 100%;
padding: 20upx 10%;
padding: 20upx 8%;
height: 420upx;
border-radius: 0 0 80upx 80upx;
background-color: #e40583;
......@@ -189,7 +203,7 @@
display: flex;
flex: 1;
height: 80%;
margin: 0 40upx;
margin: 0 6%;
border-bottom: 1px dashed #ffffff;
>text{
letter-spacing: 3upx;
......
......@@ -18,7 +18,7 @@
<button class="cu-btn block round bg-white lg" @tap="onOpenDoor">进店开门</button>
</view>
<view class="part">
<button class="cu-btn block round line-white lg">门店导航</button>
<button class="cu-btn block round line-white lg" @tap="onNavToMap">门店导航</button>
</view>
</view>
......@@ -104,6 +104,17 @@
title:res.data.msg
})
})
},
onNavToMap() {
uni.openLocation({
latitude: Number(this.orderInfo.latitude),
longitude: Number(this.orderInfo.longitude),
scale: 18,
name: this.orderInfo.address,
complete: (res) => {
console.log(res)
}
})
}
}
}
......
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