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

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

View File

@ -1,78 +1,94 @@
<template>
<view class="tabs">
<text @click="currentTab=1" :class="{actText:currentTab==1}">开通行业会员</text>
<text @click="currentTab=2" :class="{actText:currentTab==2}"> 已开通列表</text>
<view class="lines" :class="{actLine:currentTab==2}" />
<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>
<!-- tabs1 -->
<block v-if='currentTab==1'>
<view class="card card1">
<view class="card1-tit">
行业会员开通报备
</view>
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
<up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item>
<up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.mobile" border="none" prefixIcon="account" placeholder="请输入电话号码"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item>
<up-form-item label="" prop="userInfo.name">
<view @click="showPop=true" style="width: 100%;">
<up-input style="pointer-events: none" v-model="formData.address" border="none"
prefixIcon="account" readonly placeholder="请选择地址" :customStyle="{background:'#F3F3F3',padding:'20rpx',
'border-radius':'30rpx'
}" :placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"
suffixIcon='arrow-down'></up-input>
</view>
</up-form-item>
</up-form>
<view class="store-info">
报备人:{{STORE_INFO.detailed_address}}
</view>
</view>
<view class="submit-btn">
<up-button text="完成并收款" @click="submit" shape="circle" color="#50C758"></up-button>
</view>
</block>
<!-- tabs2 -->
<block v-else>
<view class="vip-card">
<text>当前已开通</text>
<up-count-to :startVal="0" :endVal="count"></up-count-to>
<text>位行业会员</text>
<view v-else>
<view class="tabs">
<text @click="currentTab=1" :class="{actText:currentTab==1}">开通行业会员</text>
<text @click="currentTab=2" :class="{actText:currentTab==2}"> 已开通列表</text>
<view class="lines" :class="{actLine:currentTab==2}" />
</view>
<view class="table">
<uni-table stripe emptyText="暂无更多数据" width="100%">
<!-- 表头行 -->
<uni-tr>
<uni-th width="10" align="center">序号</uni-th>
<uni-th width="25" align="center">行业会员</uni-th>
<uni-th width="25" align="center">经营资金</uni-th>
<uni-th width="30" align="center">开通时间</uni-th>
<uni-th width="20" align="center">状态</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item,index) in lists" :key="index">
<uni-td align="center">{{index+1}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.real_name}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.price}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.create_time}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">
<view v-if="item.paid ==1">已开通</view>
<view v-else @click="upadtaStatus(item)" style="color:#33B83A ;">未开通,查询</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</block>
<!-- tabs1 -->
<block v-if='currentTab==1'>
<view class="card card1">
<view class="card1-tit">
行业会员开通报备
</view>
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
<up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}"
:prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item>
<up-form-item label="" prop="userInfo.name">
<up-input v-model="formData.mobile" border="none" prefixIcon="account" placeholder="请输入电话号码"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}"
:placeholderStyle="{color:'#444444'}"
:prefixIconStyle="{'margin-right':'40rpx'}"></up-input>
</up-form-item>
<up-form-item label="" prop="userInfo.name">
<view @click="showPop=true" style="width: 100%;">
<up-input style="pointer-events: none" v-model="formData.address" border="none"
prefixIcon="account" readonly placeholder="请选择地址" :customStyle="{background:'#F3F3F3',padding:'20rpx',
'border-radius':'30rpx'
}" :placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"
suffixIcon='arrow-down'></up-input>
</view>
</up-form-item>
</up-form>
<view class="store-info">
报备人:{{STORE_INFO.detailed_address}}
</view>
</view>
<view class="submit-btn">
<up-button text="完成并收款" @click="submit" shape="circle" color="#50C758"></up-button>
</view>
</block>
<!-- tabs2 -->
<block v-else>
<view class="vip-card">
<text>当前已开通</text>
<up-count-to :startVal="0" :endVal="count"></up-count-to>
<text>位行业会员</text>
</view>
<view class="table">
<uni-table stripe emptyText="暂无更多数据" width="100%">
<!-- 表头行 -->
<uni-tr>
<uni-th width="10" align="center">序号</uni-th>
<uni-th width="25" align="center">行业会员</uni-th>
<uni-th width="25" align="center">经营资金</uni-th>
<uni-th width="30" align="center">开通时间</uni-th>
<uni-th width="20" align="center">状态</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item,index) in lists" :key="index">
<uni-td align="center">{{index+1}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.real_name}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.price}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{item.create_time}}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">
<view v-if="item.paid ==1">已开通</view>
<view v-else @click="upadtaStatus(item)" style="color:#33B83A ;">未开通,查询</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</block>
</view>
<!-- 地址选择器 -->
@ -136,17 +152,36 @@
vipRechargeApi,
rechargeCountApi,
rechargeListsApi,
updataOrderApi
updataOrderApi,
getStoreByPhone
} from "@/api/user.js"
import {
onPullDownRefresh
} 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');
if (STORE_INFO)
STORE_INFO = JSON.parse(STORE_INFO)
let STORE_INFO = reactive({
id: ""
})
const currentTab = ref(1)
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"
color="#fff" size="28"></up-icon></up-button>
</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">
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
size="28"></up-icon></up-button>
@ -285,6 +289,11 @@
return true;
} else uni.navigateBack();
}
const navgo = (url) => {
uni.navigateTo({
url
})
}
</script>
<style lang="scss">

View File

@ -64,12 +64,19 @@
<view>运费</view>
<view><text>¥</text>0<text>.00</text></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_price }}</text>
</view>
</view>
</view> -->
</view>
<view class="m-card good-info">
<view class="head-title">支付方式</view>
@ -182,6 +189,8 @@
const userInfo = useUserStore().userInfo;
console.log(userInfo)
//
let STORE_INFO = uni.getStorageSync('STORE_INFO');
if (STORE_INFO)