wangfukang 3 weeks ago
parent
commit
e309368bfe
  1. 10
      components/tab-bar/delivery.vue
  2. 40
      pages/index/index.vue
  3. BIN
      static/images/img/loading.gif
  4. BIN
      static/images/tabbar/fabu1.png
  5. BIN
      static/images/tabbar/fabu222.png

10
components/tab-bar/delivery.vue

@ -129,7 +129,7 @@
</view> --> </view> -->
</view> </view>
<view style="display: flex;border-radius: 20rpx;margin-top: 32rpx;border: 1px solid rgba(166, 255, 234, 0.78);padding: 10px;"> <view style="display: flex;border-radius: 20rpx;margin-top: 32rpx;border: 1px solid rgba(166, 255, 234, 0.78);padding: 10px;">
<view class="goods-content"> <view class="goods-content" @tap="productDetail(item)">
<view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;"> <view class="goods-name" style="font-size: 24rpx;line-height: 50rpx;display: flex;">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png" <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1f77398a73454a6595c12a3c18731599.png"
alt="" style="width: 50rpx;height: 50rpx;" /> alt="" style="width: 50rpx;height: 50rpx;" />
@ -138,17 +138,13 @@
{{item.shopName}} {{item.shopName}}
</view> </view>
<view class="shop-address-row"> <view class="shop-address-row">
<view @tap="productDetail(item)" v-if="item.deliveryType == 1"
class="detail-tag">
</view>
<view class="shop-address"> <view class="shop-address">
{{item.shopAddress}} {{item.shopAddress}}
</view> </view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<img @tap="makeCall(item.shopPhone)" <img @tap.stop="makeCall(item.shopPhone)"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
alt="" style="width: 60rpx;height: 60rpx;" /> alt="" style="width: 60rpx;height: 60rpx;" />
</view> </view>
@ -166,7 +162,7 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<img @tap="makeCall(item.receiverPhone)" <img @tap.stop="makeCall(item.receiverPhone)"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/869a7af6a1c24bf3a0d523c4a18b55c6.png"
alt="" style="width: 60rpx;height: 60rpx;" /> alt="" style="width: 60rpx;height: 60rpx;" />
</view> </view>

40
pages/index/index.vue

@ -805,8 +805,6 @@
// //
// this.getUserLocation(); // this.getUserLocation();
this.getUserOrders(); this.getUserOrders();
// WebSocket
this.getDeliveryLocation();
if (!uni.getStorageSync('area')) { if (!uni.getStorageSync('area')) {
this.checkArea() this.checkArea()
} else { } else {
@ -1303,44 +1301,6 @@
phoneNumber: phone phoneNumber: phone
}); });
}, },
// 使WebSocket
getDeliveryLocation() {
// WebSocket
// uni.connectSocket({
// url: "wss://www.example.com/socket",
// header: {
// "content-type": "application/json",
// },
// protocols: ["protocol1"],
// method: "GET",
// });
// WebSocketsetInterval
// this.deliveryTimer = setInterval(() => {
// WebSocketAPI
//
const deliveryLat = this.latitude;
const deliveryLng = this.longitude;
//
// id1
this.markers = this.markers.filter(marker => marker.id !== 1);
//
this.markers.push({
id: 1,
latitude: deliveryLat,
longitude: deliveryLng,
title: '张三',
iconPath: '/static/images/tabbar/fabu1.png', //
width: 30,
height: 30
});
//
this.latitude = deliveryLat;
this.longitude = deliveryLng;
// }, 5000);
},
// //
onUnload() { onUnload() {
if (this.deliveryTimer) { if (this.deliveryTimer) {

BIN
static/images/img/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

BIN
static/images/tabbar/fabu1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

BIN
static/images/tabbar/fabu222.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Loading…
Cancel
Save