Commit 968d0f58 by zhangzhen

细节优化

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