Compare commits

...

9 Commits

Author SHA1 Message Date
zmj ecf2da62cf add 2024-07-06 13:51:24 +08:00
zmj c03a38e1bc add 2024-07-06 13:48:13 +08:00
zmj 8863dba81d add 2024-07-05 19:37:27 +08:00
zmj f15573e557 add 2024-07-05 18:18:02 +08:00
zmj 001fdd05d8 add 2024-07-05 12:00:21 +08:00
zmj 6a1bdddf37 add 2024-07-04 18:00:16 +08:00
zmj a14cf624da add 2024-07-04 11:26:44 +08:00
zmj e21a81ebd2 add 2024-07-03 17:37:41 +08:00
zmj eb885777f0 add 2024-07-03 16:50:12 +08:00
8 changed files with 894 additions and 793 deletions

View File

@ -158,3 +158,11 @@ export const getVipInfoByPhone = (data) => {
export const checkInventoryApi = (data) => { export const checkInventoryApi = (data) => {
return request.post('/order/order/checkInventory', data); return request.post('/order/order/checkInventory', data);
} }
export const isUserShipApi = (data) => {
return request.post('/user_ship/UserShip/is_user_ship', data);
}
export const getRechargeListApi = (data) => {
return request.get('/user/UserRecharge/recharge_list', data);
}

View File

@ -32,7 +32,7 @@
<view class="content" v-if='type==4'> <view class="content" v-if='type==4'>
<view class="li" v-for="(item,index) in lists" :key="index"> <view class="li" v-for="(item,index) in lists" :key="index">
<view class="li-top"> <view class="li-top">
<text>{{item.order_sn}}</text> <text>{{item.title}}</text>
<text style="font-weight: bold;" :style="{color:!item.status?'#50C758':'red' <text style="font-weight: bold;" :style="{color:!item.status?'#50C758':'red'
}">{{ !item.status?'+':'-' }}{{item.number}}</text> }">{{ !item.status?'+':'-' }}{{item.number}}</text>
</view> </view>

View File

@ -0,0 +1,11 @@
<template>
<image style="width: 100vw" mode='widthFix'
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/8d49820240705171635925.png">
</image>
</template>
<script>
</script>
<style>
</style>

View File

@ -10,8 +10,7 @@
<up-form labelPosition="left" label-width="100rpx"> <up-form labelPosition="left" label-width="100rpx">
<up-form-item label="身份" borderBottom> <up-form-item label="身份" borderBottom>
<up-radio-group v-model="Role" placement="row"> <up-radio-group v-model="Role" placement="row">
<up-radio activeColor="#20b128" label="行业会员" :name="1" <up-radio activeColor="#20b128" label="行业会员" :name="1" style="margin-right: 10rpx;"></up-radio>
style="margin-right: 10rpx;"></up-radio>
<up-radio activeColor="#20b128" label="商户" :name="4"></up-radio> <up-radio activeColor="#20b128" label="商户" :name="4"></up-radio>
</up-radio-group> </up-radio-group>
</up-form-item> </up-form-item>
@ -22,8 +21,8 @@
<view v-else> <view v-else>
<up-sticky bgColor="#fff" style="padding: 20rpx;"> <up-sticky bgColor="#fff" style="padding: 20rpx;">
<up-tabs v-if="Role==1" :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}" <up-tabs v-if="Role == 1" :list="tabsLst" :itemStyle="{ width: '33vw', paddingBottom: '20rpx' }" lineColor='#50C758'
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs> :current='currentTab' @change="tabsChange"></up-tabs>
<up-tabs v-else :list="tabsLst2" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758' <up-tabs v-else :list="tabsLst2" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758'
:current='currentTab' @change="tabsChange1"></up-tabs> :current='currentTab' @change="tabsChange1"></up-tabs>
</up-sticky> </up-sticky>
@ -31,8 +30,10 @@
<block v-if='currentTab == 0'> <block v-if='currentTab == 0'>
<view class="card card1"> <view class="card card1">
<view class="card1-tit"> <view class="card1-tit">
行业会员开通报备 购买采购包
<!-- <up-input v-model='formData.auth_code'> </up-input> --> </view>
<view class="store-info">
报备人{{ STORE_INFO.name }}
</view> </view>
<up-form labelPosition="left" :model="formData" :borderBottom='false'> <up-form labelPosition="left" :model="formData" :borderBottom='false'>
<up-form-item label=""> <up-form-item label="">
@ -50,8 +51,8 @@
</up-form-item> </up-form-item>
<up-form-item label=""> <up-form-item label="">
<view @click="showPop = true" style="width: 100%;"> <view @click="showPop = true" style="width: 100%;">
<up-input style="pointer-events: none" v-model="formData.address" border="none" <up-input style="pointer-events: none" v-model="formData.address" border="none" prefixIcon="map"
prefixIcon="map" readonly placeholder="点击选择地址" :customStyle="{ readonly placeholder="点击选择地址" :customStyle="{
background: '#F3F3F3', padding: '20rpx', background: '#F3F3F3', padding: '20rpx',
'border-radius': '30rpx' 'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }" }" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
@ -82,23 +83,20 @@
</view> </view>
</up-form-item> </up-form-item>
</up-form> </up-form>
<view class="store-info"> <view class="link" @click="navgo('/pageQuota/vipUser/activePage')">
报备人:{{ STORE_INFO.name }} 点击查看礼品包内容
</view> </view>
<view class="gift-pack">
<view class="store-info" v-if="Role==1"> <view class="gift-pack-li" :class="index == giftIndex && 'act-gift'" v-for="(item, index) in rechargeList"
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;"> :key="index" @click="choseGift(index)">
<up-input inputAlign='center' type='digit' placeholder="请输入金额" @focus="formData.price=''" <view class="gift-pack-li-top" :class="index == giftIndex && 'act-gift-top'">
color='#FF6B00' :placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none" <text style="font-size: 40rpx;">{{ item.money }}</text><text>元采购包</text>
v-model="formData.price" @blur='tofixedPrice'></up-input> </view>
<view class="">
{{ item.send }}{{ item.send_string }}
</view> </view>
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
v-if="formData.label_limit&&formData.price<formData.label_limit">
{{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元且最高金额不能超过10000.00
</view> </view>
</view> </view>
</view> </view>
<view class="submit-btn" @click="submit"> <view class="submit-btn" @click="submit">
<view <view
@ -127,12 +125,11 @@
<up-input v-model="formData2.real_name" disabled border="none" prefixIcon="account" <up-input v-model="formData2.real_name" disabled border="none" prefixIcon="account"
placeholder="系统自动获取" color='grey' placeholder="系统自动获取" color='grey'
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }" :customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
:placeholderStyle="{ color: 'grey' }" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
</up-form-item> </up-form-item>
<up-form-item label=""> <up-form-item label="">
<up-input style="pointer-events: none" v-model="formData2.address" border="none" <up-input style="pointer-events: none" v-model="formData2.address" border="none" prefixIcon="map"
prefixIcon="map" readonly color='grey' placeholder="系统自动获取" :customStyle="{ readonly color='grey' placeholder="系统自动获取" :customStyle="{
background: '#F3F3F3', padding: '20rpx', background: '#F3F3F3', padding: '20rpx',
'border-radius': '30rpx' 'border-radius': '30rpx'
}" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input> }" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
@ -152,17 +149,17 @@
<view class="store-info"> <view class="store-info">
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;"> <view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price = ''" color='#FF6B00' <up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price = ''" color='#FF6B00'
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none" :placeholderStyle="{ fontSize: '28rpx' }" fontSize='20px' border="none" v-model="formData2.price"
v-model="formData2.price" type='digit' @blur='tofixedPrice(2)'></up-input> type='digit' @blur='tofixedPrice(2)'></up-input>
</view> </view>
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;" <view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
v-if="formData2.label_limit && formData2.price < formData2.label_limit"> v-if="formData2.label_limit && formData2.price < formData2.label_limit">
<view class=""> <view class="">
{{ formData2.label_name }}会员最低金额不能低于{{ formData2.label_limit }} {{ formData2.label_name }}会员最低金额不能低于{{ formData2.label_limit }}
</view> </view>
<view class=""> <!-- <view class="">
最高金额不能超过10000.00 最高金额不能超过10000.00
</view> </view> -->
<view class=""> <view class="">
可单次多笔累计操作 可单次多笔累计操作
</view> </view>
@ -180,6 +177,8 @@
</view> </view>
</block> </block>
<!-- tabs2 --> <!-- tabs2 -->
<block v-if="currentTab == 2 && Role == 1"> <block v-if="currentTab == 2 && Role == 1">
<view class="vip-card"> <view class="vip-card">
@ -272,8 +271,8 @@
:activeStyle="{ color: '#20B128' }"></up-tabs> :activeStyle="{ color: '#20B128' }"></up-tabs>
<up-line style="margin-top:20rpx "></up-line> <up-line style="margin-top:20rpx "></up-line>
<view class="address-content" v-if='currentAddressIndex == 0'> <view class="address-content" v-if='currentAddressIndex == 0'>
<view class="address-li" :class='{ act: item.city_code == formData.city }' <view class="address-li" :class='{ act: item.city_code == formData.city }' v-for="item in addressList.city"
v-for="item in addressList.city" :key="item.city_code" @click="addressLiClick(0, item)"> :key="item.city_code" @click="addressLiClick(0, item)">
<text>{{ item.city_name }}</text> <text>{{ item.city_name }}</text>
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" /> <up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
</view> </view>
@ -296,13 +295,12 @@
<view class="address-li" v-for="item in addressList.village" @click="addressLiClick(3, item)" <view class="address-li" v-for="item in addressList.village" @click="addressLiClick(3, item)"
:key="item.village_code" :class='{ act: item.village_code == formData.village }'> :key="item.village_code" :class='{ act: item.village_code == formData.village }'>
<text>{{ item.village_name }}</text> <text>{{ item.village_name }}</text>
<up-icon name="arrow-right" <up-icon name="arrow-right" :color="item.village_code == formData.village ? '#20B128' : '#777777'" />
:color="item.village_code == formData.village ? '#20B128' : '#777777'" />
</view> </view>
</view> </view>
<view class="address-content" v-else-if='currentAddressIndex == 4'> <view class="address-content" v-else-if='currentAddressIndex == 4'>
<view class="address-li" :class='{ act: item.id == formData.brigade }' <view class="address-li" :class='{ act: item.id == formData.brigade }' v-for="item in addressList.brigade"
v-for="item in addressList.brigade" :key="item.id" @click="addressLiClick(4, item)"> :key="item.id" @click="addressLiClick(4, item)">
<text>{{ item.brigade_name }}</text> <text>{{ item.brigade_name }}</text>
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" /> <up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
</view> </view>
@ -311,15 +309,12 @@
</up-popup> </up-popup>
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false' <up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker> @close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true" <up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
confirmColor='#33B83A' @confirm='showModal = false' @close="showModal = false"> confirmColor='#33B83A' @confirm='showModal = false' @close="showModal = false">
<view class="slot-content"> <view class="slot-content">
{{ popPhone }} {{ popPhone }}
</view> </view>
</up-modal> </up-modal>
</template> </template>
<script setup> <script setup>
import { import {
@ -337,6 +332,8 @@
} from "@/api/address.js" } from "@/api/address.js"
import { import {
vipRechargeApi, vipRechargeApi,
getRechargeListApi,
isUserShipApi,
rechargeCountApi, rechargeCountApi,
reVipRechargeApi, reVipRechargeApi,
rechargeListsApi, rechargeListsApi,
@ -442,6 +439,7 @@
// //
// //
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
const cutDown = ref(0) const cutDown = ref(0)
const flag = ref(true) const flag = ref(true)
const code = ref('') const code = ref('')
@ -578,10 +576,10 @@
} = await getVipInfoByPhone({ } = await getVipInfoByPhone({
mobile: formData2.mobile mobile: formData2.mobile
}) })
// if (data.user_ship != 4) { if (!vipList.includes(data.user_ship)) {
// uni.hideLoading() uni.hideLoading()
// return uni.$u.toast(''); return uni.$u.toast('查询失败');
// } }
if (formData.mobile) { if (formData.mobile) {
formData2.mobile = formData.mobile formData2.mobile = formData.mobile
} }
@ -596,14 +594,9 @@
} }
const tofixedPrice = (type = 1) => {
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
formData.price = (+formData.price).toFixed(2)
}
const resetFormData = () => { const resetFormData = () => {
for (let key in formData) { for (let key in formData) {
formData[key] = '' (key != 'price') && (formData[key] = '')
} }
for (let key in formData2) { for (let key in formData2) {
formData2[key] = '' formData2[key] = ''
@ -620,8 +613,6 @@
const conformRole = (e) => { const conformRole = (e) => {
formData.label_name = e.value[0].title formData.label_name = e.value[0].title
formData.label_id = e.value[0].id formData.label_id = e.value[0].id
formData.price = (+e.value[0].limit).toFixed(2)
formData.label_limit = e.value[0].limit
showPop1.value = false showPop1.value = false
} }
@ -723,6 +714,7 @@
]); ]);
let timerInvol = null let timerInvol = null
let paySuccess;
// scoket // scoket
const userInfo = useUserStore().userInfo; const userInfo = useUserStore().userInfo;
const connection = new Push({ const connection = new Push({
@ -732,13 +724,34 @@
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`); const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
user_channel.on('message', function (data) { user_channel.on('message', function (data) {
try { try {
uni.hideLoading({}); paySuccess = true
uni.hideLoading();
clearTimeout(timerInvol); clearTimeout(timerInvol);
paySuccessToTabs2() paySuccessToTabs2()
} catch (error) { } } catch (error) { }
}); });
// //
const navgo = (url) => {
uni.navigateTo({
url
})
}
//
const giftIndex = ref(0)
const rechargeList = ref([])
const getRechargeList = async () => {
let res = await getRechargeListApi()
rechargeList.value = res.data
formData.price = rechargeList.value[0].money
}
const choseGift = (index) => {
giftIndex.value = index
formData.price = rechargeList.value[index].money
}
// //
const submit = async (type = 1) => { const submit = async (type = 1) => {
@ -786,10 +799,12 @@
formData2.recharge_type = 'INDUSTRYMEMBERS' formData2.recharge_type = 'INDUSTRYMEMBERS'
formData2.user_ship = formData2.label_id formData2.user_ship = formData2.label_id
vipRechargeApi(formData2).then(res => { vipRechargeApi(formData2).then(res => {
paySuccess = false;
timerInvol = setTimeout(() => { timerInvol = setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
if (currentTab.value == 2) return; if (!paySuccess) {
uni.$u.toast('支付超时'); uni.$u.toast('支付超时');
}
}, 30000) }, 30000)
}) })
} }
@ -800,13 +815,9 @@
if (!formData.code) return uni.$u.toast('请输入短信验证码'); if (!formData.code) return uni.$u.toast('请输入短信验证码');
if (!formData.address) return uni.$u.toast('请选择地址'); if (!formData.address) return uni.$u.toast('请选择地址');
if (!formData.label_id) return uni.$u.toast('请选择用户身份'); if (!formData.label_id) return uni.$u.toast('请选择用户身份');
if (Number(formData.price) < Number(formData.label_limit)) {
return uni.$u.toast(
`${formData.label_name}角色最低金额不能低于${formData.label_limit}`);
formData.store_id = STORE_INFO.id formData.store_id = STORE_INFO.id
formData.user_ship = formData.label_id
} formData.recharge_type = 'INDUSTRYMEMBERS'
if (Role.value == 1) { if (Role.value == 1) {
// formData.recharge_type = 'INDUSTRYMEMBERS' // formData.recharge_type = 'INDUSTRYMEMBERS'
// formData.user_ship = formData.label_id // formData.user_ship = formData.label_id
@ -821,6 +832,12 @@
// }, 10000) // }, 10000)
// }) // })
// return // return
// formData.user_ship = formData.label_id
// await isUserShipApi({
// user_ship: formData.user_ship,
// village: formData.village,
// brigade: formData.brigade
// })
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整'); if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
@ -828,13 +845,13 @@
title: '支付中...' title: '支付中...'
}); });
formData.auth_code = res.result formData.auth_code = res.result
formData.recharge_type = 'INDUSTRYMEMBERS'
formData.user_ship = formData.label_id
vipRechargeApi(formData).then(res => { vipRechargeApi(formData).then(res => {
paySuccess = false;
timerInvol = setTimeout(() => { timerInvol = setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
if (currentTab.value == 2) return; if (!paySuccess) {
uni.$u.toast('支付超时'); uni.$u.toast('支付超时');
}
}, 30000) }, 30000)
}) })
} }
@ -856,13 +873,19 @@
}).then(res => { }).then(res => {
timerInvol = setTimeout(() => { timerInvol = setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
if (!paySuccess) {
uni.$u.toast('支付超时'); uni.$u.toast('支付超时');
}
}, 30000) }, 30000)
}) })
} }
}); });
} }
const tofixedPrice = (type = 1) => {
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
}
// formDatatabs2 // formDatatabs2
const paySuccessToTabs2 = () => { const paySuccessToTabs2 = () => {
uni.hideLoading() uni.hideLoading()
@ -933,19 +956,12 @@
} }
onLoad(() => { onLoad(() => {
// getUserShip().then(res => {
// range.value = res.data.lists.map(item => {
// return {
// value: item.id,
// text: item.title
// }
// })f
// })
getUserShip().then(res => { getUserShip().then(res => {
columns.value = [res.data.lists] columns.value = [res.data.lists]
}) })
getPhoneOneDay() getPhoneOneDay()
getCityList() getCityList()
getRechargeList()
}) })
onPullDownRefresh(() => { onPullDownRefresh(() => {
@ -1025,20 +1041,20 @@
} }
.card1 { .card1 {
padding: 52rpx 30rpx; padding: 30rpx;
.card1-tit { .card1-tit {
font-size: 32rpx; font-size: 32rpx;
color: #444444; color: #444444;
text-align: center; text-align: center;
margin-bottom: 90rpx; margin-bottom: 20rpx;
} }
.store-info { .store-info {
font-size: 28rpx; font-size: 28rpx;
color: #20B128; color: #20B128;
text-align: center; text-align: center;
margin-top: 30rpx; margin-top: 20rpx;
} }
} }
@ -1084,7 +1100,7 @@
.address-content { .address-content {
padding: 20rpx; padding: 20rpx;
height: 50vh; height: 60vh;
overflow-y: auto; overflow-y: auto;
.address-li { .address-li {
@ -1120,5 +1136,65 @@
.btn-text { .btn-text {
color: #20B128; color: #20B128;
}
.link {
padding-left: 20rpx;
color: #2F6BF2;
font-size: 28rpx;
margin-bottom: 30rpx;
position: relative;
text-decoration: underline;
text-underline-offset: 10rpx;
cursor: pointer;
}
.link::after {
content: '';
width: 12rpx;
height: 12rpx;
background-color: #2F6BF2;
position: absolute;
top: 50%;
transform: translateY(-50%);
border-radius: 12rpx;
left: 0;
}
.gift-pack {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.gift-pack-li {
padding: 20rpx 40rpx;
border: #20B128 1px solid;
border-radius: 24rpx 24rpx 24rpx 24rpx;
background-color: #F6F6F6;
margin-bottom: 20rpx;
font-size: 26rpx;
color: #777777;
width: 310rpx;
box-sizing: border-box;
text-align: center;
.gift-pack-li-top {
margin-bottom: 10rpx;
color: #20B128;
}
.act-gift-top {
color: white;
}
}
.act-gift {
background-color: #38BE41;
color: white;
}
} }
</style> </style>

View File

@ -235,6 +235,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "vipUser/activePage",
"style": {
"navigationBarTitleText": "采购礼包",
"enablePullDownRefresh": false
}
},
{ {
"path": "asset/index", "path": "asset/index",
"style": { "style": {

View File

@ -23,9 +23,9 @@
<template #left> <template #left>
<view class="store-info"> <view class="store-info">
<view style="display: flex;font-size: 30rpx;font-weight: bold;"> <view style="display: flex;font-size: 30rpx;font-weight: bold;">
<text v-if="userStore.userInfo.user_ship == 1 || shareInfo.store_id" <text v-if=" vipList.includes(userStore.userInfo.user_ship) || shareInfo.store_id"
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<text v-if="userStore.userInfo.user_ship == 1"> <text v-if="vipList.includes(userStore.userInfo.user_ship)">
{{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店' }}</text> {{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店' }}</text>
<text v-else> <text v-else>
{{(shareInfo.real_name || (userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text> {{(shareInfo.real_name || (userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
@ -162,8 +162,8 @@
{{ item.store_name }} {{ item.store_name }}
</view> </view>
<view class="shop-content-li" v-if="priceKey.off_activity==1"> <view class="shop-content-li" v-if="priceKey.off_activity==1">
<view class="shop-content-li-l" style="color: #FC452F;"> <view class="shop-content-li-l">
活动
</view> </view>
<view class="shop-content-li-r" style="color:#FC452F ;"><text <view class="shop-content-li-r" style="color:#FC452F ;"><text
style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }} style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }}
@ -173,10 +173,10 @@
赠10%品牌礼品券 赠10%品牌礼品券
</view> </view>
</view> </view>
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1"> <!-- <view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
<view class="shop-content-li-l">原价</view> <view class="shop-content-li-l">原价</view>
<view class="shop-content-li-r line-through">{{item[priceKey.op_price]}}</view> <view class="shop-content-li-r line-through">{{item[priceKey.op_price]}}</view>
</view> </view> -->
<view class="shop-content-li" v-else> <view class="shop-content-li" v-else>
<view class="shop-content-li-l">售价</view> <view class="shop-content-li-l">售价</view>
@ -293,14 +293,12 @@
} from "@/api/multipleShop.js"; } from "@/api/multipleShop.js";
import useUserStore from "@/store/user"; import useUserStore from "@/store/user";
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
const userStore = useUserStore(); const userStore = useUserStore();
const STORE_INFO = reactive({ const STORE_INFO = reactive({
id: '', id: '',
store_name: "" store_name: ""
}) })
const priceKey = reactive({ const priceKey = reactive({
off_activity: "", off_activity: "",
op_price: "", op_price: "",
@ -330,7 +328,7 @@
// //
onShareAppMessage(() => { onShareAppMessage(() => {
let shareStr = '?id=' + STORE_INFO.id; let shareStr = '?id=' + STORE_INFO.id;
if (userStore.userInfo.user_ship == 1) { if (vipList.includes(userStore.userInfo.user_ship)) {
shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo shareStr = shareStr + '&spread_uid=' + userStore.userInfo.id + '&real_name=' + (userStore.userInfo
.real_name || userStore.userInfo.nickname) .real_name || userStore.userInfo.nickname)
} }
@ -705,6 +703,7 @@
getShareInfo() getShareInfo()
onLoad(async (opt) => { onLoad(async (opt) => {
console.log('opt', opt)
if (opt.id) { if (opt.id) {
where.value.store_id = (opt.id == 'undefined' ? STORE_INFO.id : opt.id); where.value.store_id = (opt.id == 'undefined' ? STORE_INFO.id : opt.id);
} else { } else {

View File

@ -211,7 +211,7 @@
}).then(res => { }).then(res => {
// token // token
userStore.setUserInfo(res.data); userStore.setUserInfo(res.data);
userStore.setToken(res.data.token); res.data.token && userStore.setToken(res.data.token);
// //
if (res.is_staff == 1) { if (res.is_staff == 1) {
userStore.setUserInfo(res.data); userStore.setUserInfo(res.data);

View File

@ -37,7 +37,7 @@
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'> style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'>
<view class="top" style="align-items: flex-start;"> <view class="top" style="align-items: flex-start;">
<view style="color: #333;width: 200rpx;"> <view style="color: #333;width: 200rpx;">
<view style="margin: 0 10rpx;color:#20B128;">推荐自提点</view> <view style="margin: 0 10rpx;color:#20B128;width: 150rpx;">推荐自提点</view>
<view class="isreser"> {{reservation?"次日可提":"当日可提" }} <view class="isreser"> {{reservation?"次日可提":"当日可提" }}
</view> </view>
</view> </view>