add
This commit is contained in:
parent
ca9c5bfbf1
commit
8c33ae1516
|
@ -10,7 +10,7 @@ switch (env) {
|
|||
BASE_URL = 'https://test-multi-store.lihaink.cn';
|
||||
break;
|
||||
case 'liu':
|
||||
BASE_URL = 'http://192.168.1.22:8545';
|
||||
BASE_URL = 'http://192.168.1.201:8545';
|
||||
break;
|
||||
default:
|
||||
BASE_URL = 'https://multi-store.lihaink.cn';
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
|
||||
// 门店选择
|
||||
const onChooseShop = (item) => {
|
||||
return
|
||||
currShop.value = item.id;
|
||||
uni.setStorageSync('STORE_INFO', JSON.stringify(item));
|
||||
// 如果选择了新店铺,删除之前的分享信息
|
||||
|
@ -161,10 +162,8 @@
|
|||
const getLocation = () => {
|
||||
let location = uni.getStorageSync('location');
|
||||
if (location) {
|
||||
let [lng, lat] = location.split(',');
|
||||
queryParams.longitude = lng;
|
||||
queryParams.latitude = lat;
|
||||
|
||||
queryParams.longitude = location.lat
|
||||
queryParams.latitude = location.long
|
||||
// 加载店铺列表
|
||||
getShopList();
|
||||
} else {
|
||||
|
@ -178,7 +177,10 @@
|
|||
getShopList();
|
||||
|
||||
// 避免下次再获取
|
||||
uni.setStorageSync('location', `${res.longitude},${res.latitude}`)
|
||||
uni.setStorageSync('location', {
|
||||
lat: queryParams.latitude,
|
||||
long: queryParams.longitude
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<view class="store-info">
|
||||
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
||||
<text v-if="userStore.userInfo.user_ship==1 || shareInfo.store_id"
|
||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{(shareInfo.real_name||userStore.userInfo.nickname) + '的供销个人门店' }}</text>
|
||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{(shareInfo.real_name||( userStore.userInfo.real_name|| userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
|
||||
<text v-else
|
||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{STORE_INFO.store_name}}</text>
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
|
@ -222,8 +222,8 @@
|
|||
import useUserStore from "@/store/user";
|
||||
const userStore = useUserStore();
|
||||
const STORE_INFO = reactive({
|
||||
id: 5,
|
||||
store_name: "测试"
|
||||
id: 4,
|
||||
store_name: "农(特)产品直营店"
|
||||
})
|
||||
|
||||
const getStoreInfoFn = () => {
|
||||
|
@ -246,10 +246,10 @@
|
|||
let shareStr = '?id=' + STORE_INFO.id;
|
||||
if (userStore.userInfo.user_ship == 1) {
|
||||
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
|
||||
.nickname)
|
||||
.real_name || userStore.userInfo.nickname)
|
||||
}
|
||||
let shareInfo = {
|
||||
title: userStore.userInfo.nickname,
|
||||
title: (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店',
|
||||
path: '/pages/index/index' + shareStr,
|
||||
imageUrl: STORE_INFO.image || '',
|
||||
success() {
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
还剩<text>{{countDown}}</text>订单自动取消
|
||||
</view>
|
||||
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||
<view class="address-info" @click="callPhone(shopInfo.phone)">
|
||||
<view class="address-info"
|
||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
||||
@click="callPhone(shopInfo.phone)">
|
||||
<view class="top" style="align-items: flex-start;">
|
||||
<view style="color: #333;display: flex;align-items: center;">
|
||||
<up-icon name="map"></up-icon>
|
||||
|
@ -13,8 +15,6 @@
|
|||
<view v-if="shopInfo.id">
|
||||
<view style="color: #333;">
|
||||
{{shopInfo.name}}
|
||||
<!-- <text v-if="shopInfo.recommend"
|
||||
style="font-size: 20rpx;color: #fff;background-color: #20b128;padding: 2rpx 5rpx;padding: 1rpx 4rpx;">推荐</text> -->
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #333;">
|
||||
{{shopInfo.detailed_address}}
|
||||
|
@ -24,16 +24,14 @@
|
|||
<text style="margin-right: 10rpx;">{{shopInfo.name||shopInfo.mer_real_name}}</text>
|
||||
<text>{{shopInfo.phone}}</text>
|
||||
</view>
|
||||
<!-- <text v-if="shopInfo.distance"
|
||||
style="color: #20b128;font-size: 22rpx;border: 1px solid #20b128;border-radius: 4rpx;">{{shopInfo.distance}}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view @click.stop="navgo('/multipleShop/index/index')"
|
||||
style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;">
|
||||
所有提货点
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="address-btn" v-if="datas.paid==0">
|
||||
<view style="width: 80px;"><up-button @click="shopListShow=true" size="small" shape="circle"
|
||||
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
||||
<view class="address-info">
|
||||
|
@ -237,11 +235,12 @@
|
|||
const datas = ref({})
|
||||
const getDetails = () => {
|
||||
orderDetailApi({
|
||||
order_id: datas.value.id
|
||||
order_id: datas.value.id,
|
||||
...location
|
||||
}).then(res => {
|
||||
datas.value = res.data;
|
||||
options.code = datas.value.verify_code; // 生成条形码的值
|
||||
shopInfo.value = res.data.store_info;
|
||||
shopInfo.value = res.data.near_store;
|
||||
if (addressList.value.length > 0 && res.data.paid) {
|
||||
addressInfo.value = addressList.value.find(item => item.address_id == res.data.address_id);
|
||||
} else {
|
||||
|
@ -456,13 +455,37 @@
|
|||
})
|
||||
}
|
||||
|
||||
// 获取位置
|
||||
let location = {
|
||||
lat: "",
|
||||
long: "",
|
||||
}
|
||||
|
||||
const getLocation = () => {
|
||||
if (uni.getStorageSync('location')) {
|
||||
location = uni.getStorageSync('location')
|
||||
} else {
|
||||
uni.getLocation({
|
||||
type: "gcj02",
|
||||
success(res) {
|
||||
location.lat = res.latitude;
|
||||
location.long = res.longitude;
|
||||
uni.setStorageSync('location', location)
|
||||
return getDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
getDetails()
|
||||
}
|
||||
|
||||
|
||||
onLoad((option) => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: option.type == 0 ? '等待付款' : '订单详情'
|
||||
});
|
||||
if (option.id) {
|
||||
datas.value.id = option.id;
|
||||
getDetails()
|
||||
getLocation()
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -470,6 +493,12 @@
|
|||
clearInterval(timer);
|
||||
console.log("清除");
|
||||
})
|
||||
|
||||
const navgo = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<view class="m-card m-address">
|
||||
<!-- <view class="m-card m-address">
|
||||
<view class="address-info" @click="showAddress = true" v-if='orderInfo.shipping_type == 1'>
|
||||
<view class="top">
|
||||
<up-icon name="account"></up-icon>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="m-card m-good" v-for="(item, index) in cartList" :key="index">
|
||||
<view class="image">
|
||||
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
||||
|
@ -72,8 +72,8 @@
|
|||
</view>
|
||||
<view class="row" v-if="userInfo.user_ship==1 ">
|
||||
<view>消费返利</view>
|
||||
<view style="color: red;">
|
||||
<text>-¥</text>{{ c_price(orderInfo.activities, 0) }}<text>.{{ c_price(orderInfo.activities, 1) }}</text>
|
||||
<view>
|
||||
<text>¥</text>{{ c_price(orderInfo.activity_price, 0) }}<text>.{{ c_price(orderInfo.activity_price, 1) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue