This commit is contained in:
zmj 2024-06-17 17:16:09 +08:00
parent 837e1319ca
commit f11a088409
5 changed files with 135 additions and 85 deletions

View File

@ -110,3 +110,9 @@ export const rechargeListsApi = (data) => {
export const updataOrderApi = (data) => { export const updataOrderApi = (data) => {
return request.get('/pay/wechatQuery', data); return request.get('/pay/wechatQuery', data);
} }
export const getStoreByPhone = (data) => {
return request.get('/store/Store/detail', data);
}

View File

@ -1,4 +1,16 @@
<template> <template>
<view class="" v-if="!STORE_INFO.id">
<up-modal :show="showModa" title="选择门店" @confirm="confirmStore" confirmColor='#20B128'>
<view class="slot-content">
<up-input v-model="storePhone" border="none" prefixIcon="phone" placeholder="请输入门店手机号"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</view>
</up-modal>
</view>
<view v-else>
<view class="tabs"> <view class="tabs">
<text @click="currentTab=1" :class="{actText:currentTab==1}">开通行业会员</text> <text @click="currentTab=1" :class="{actText:currentTab==1}">开通行业会员</text>
<text @click="currentTab=2" :class="{actText:currentTab==2}"> 已开通列表</text> <text @click="currentTab=2" :class="{actText:currentTab==2}"> 已开通列表</text>
@ -15,12 +27,14 @@
<up-form-item label="" prop="userInfo.name"> <up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名" <up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}" :customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input> :placeholderStyle="{color:'#444444'}"
:prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item> </up-form-item>
<up-form-item label="" prop="userInfo.name"> <up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.mobile" border="none" prefixIcon="account" placeholder="请输入电话号码" <up-input v-model="formData.mobile" border="none" prefixIcon="account" placeholder="请输入电话号码"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}" :customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input> :placeholderStyle="{color:'#444444'}"
:prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item> </up-form-item>
<up-form-item label="" prop="userInfo.name"> <up-form-item label="" prop="userInfo.name">
<view @click="showPop=true" style="width: 100%;"> <view @click="showPop=true" style="width: 100%;">
@ -73,6 +87,8 @@
</uni-table> </uni-table>
</view> </view>
</block> </block>
</view>
<!-- 地址选择器 --> <!-- 地址选择器 -->
@ -136,17 +152,36 @@
vipRechargeApi, vipRechargeApi,
rechargeCountApi, rechargeCountApi,
rechargeListsApi, rechargeListsApi,
updataOrderApi updataOrderApi,
getStoreByPhone
} from "@/api/user.js" } from "@/api/user.js"
import { import {
onPullDownRefresh onPullDownRefresh
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
const showModa = ref(true)
const storePhone = ref('')
const confirmStore = () => {
getStoreByPhone({
phone: storePhone.value
}).then(res => {
for (let key in res.data) {
STORE_INFO[key] = res.data[key]
}
}).catch(err => {
uni.$u.toast('未查到店铺信息,请检查手机号码')
})
}
// //
let STORE_INFO = uni.getStorageSync('STORE_INFO'); let STORE_INFO = reactive({
if (STORE_INFO) id: ""
STORE_INFO = JSON.parse(STORE_INFO) })
const currentTab = ref(1) const currentTab = ref(1)
const formData = reactive({ const formData = reactive({

View File

@ -434,15 +434,6 @@
} }
} }
.shop-item:last-child {
margin-bottom: 100px;
background-color: red;
}
} }
} }

View File

@ -16,6 +16,10 @@
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill" <up-button @click="weixinLogin" color="#20B128" size="large"><up-icon name="weixin-fill"
color="#fff" size="28"></up-icon></up-button> color="#fff" size="28"></up-icon></up-button>
</view> </view>
<view class="btn">
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
name="weixin-fill" color="#fff" size="28"></up-icon></up-button>
</view>
<!-- <view class="btn"> <!-- <view class="btn">
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff" <up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
size="28"></up-icon></up-button> size="28"></up-icon></up-button>
@ -285,6 +289,11 @@
return true; return true;
} else uni.navigateBack(); } else uni.navigateBack();
} }
const navgo = (url) => {
uni.navigateTo({
url
})
}
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -64,12 +64,19 @@
<view>运费</view> <view>运费</view>
<view><text>¥</text>0<text>.00</text></view> <view><text>¥</text>0<text>.00</text></view>
</view> </view>
<view class="row" v-if="orderInfo.activities == 1" style="color: red;"> <view class="row" v-if="[4,5,6].includes(userInfo.user_ship) ">
<view>优惠减免</view>
<view>
<text>-¥</text>{{ c_price(orderInfo.preferential_amount, 0) }}<text>.{{ c_price(orderInfo.preferential_amount, 1) }}</text>
</view>
</view>
<!-- <view class="row" v-if="orderInfo.activities == 1" style="color: red;">
<view>活动折扣 <text>{{ orderInfo.activity }}</text></view> <view>活动折扣 <text>{{ orderInfo.activity }}</text></view>
<view> <view>
-¥<text>{{ orderInfo.activity_price }}</text> -¥<text>{{ orderInfo.activity_price }}</text>
</view> </view>
</view> </view> -->
</view> </view>
<view class="m-card good-info"> <view class="m-card good-info">
<view class="head-title">支付方式</view> <view class="head-title">支付方式</view>
@ -182,6 +189,8 @@
const userInfo = useUserStore().userInfo; const userInfo = useUserStore().userInfo;
console.log(userInfo)
// //
let STORE_INFO = uni.getStorageSync('STORE_INFO'); let STORE_INFO = uni.getStorageSync('STORE_INFO');
if (STORE_INFO) if (STORE_INFO)