Compare commits

...

4 Commits

Author SHA1 Message Date
zmj 0f86686f8b add 2024-06-27 09:16:38 +08:00
zmj 3f7adfc342 add 2024-06-27 09:15:45 +08:00
zmj 25517afb79 add 2024-06-27 09:11:32 +08:00
zmj d64127c11c add 2024-06-24 15:09:24 +08:00
2 changed files with 612 additions and 615 deletions

View File

@ -2,16 +2,14 @@ let BASE_URL
let WSS_URL let WSS_URL
import store from "@/store/user.js" import store from "@/store/user.js"
// 环境 // 环境
// let env = "dev" let env = "dev"
let env = "prod" // let env = "prod"
// let env = "liu"; // let env = "liu";
switch (env) { switch (env) {
case 'dev': case 'dev':
// BASE_URL = 'https://test-multi-store.lihaink.cn'; BASE_URL = 'https://test-multi-store.lihaink.cn';
// WSS_URL = 'wss://test-multi-store.lihaink.cn/pull' WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break; break;
case 'liu': case 'liu':
BASE_URL = 'https://ceshi-multi-store.lihaink.cn'; BASE_URL = 'https://ceshi-multi-store.lihaink.cn';

View File

@ -17,45 +17,45 @@
<view v-else> <view v-else>
<view class="tabs"> <view class="tabs">
<text @click="currentTab=1" :class="{actText:currentTab==1}">开通{{Role==1?'行业会员':'商户'}} </text> <text @click="currentTab = 1" :class="{ actText: currentTab == 1 }">开通{{ Role == 1 ? '行业会员' : '商户' }} </text>
<text @click="currentTab=2,getCount(),getLists()" :class="{actText:currentTab==2}"> 已开通列表</text> <text @click="currentTab = 2, getCount(), getLists()" :class="{ actText: currentTab == 2 }"> 已开通列表</text>
<view class="lines" :class="{actLine:currentTab==2}" /> <view class="lines" :class="{ actLine: currentTab == 2 }" />
</view> </view>
<!-- tabs1 --> <!-- tabs1 -->
<block v-if='currentTab==1'> <block v-if='currentTab == 1'>
<view class="card card1"> <view class="card card1">
<view class="card1-tit"> <view class="card1-tit">
{{Role==1?'行业会员':'商户'}}开通报备 {{ Role == 1 ? '行业会员' : '商户' }}开通报备
</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="">
<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'}" :placeholderStyle="{ color: '#444444' }" :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 v-model="formData.mobile" border="none" prefixIcon="phone" placeholder="请输入电话号码" <up-input v-model="formData.mobile" border="none" prefixIcon="phone" placeholder="请输入电话号码"
:customStyle="{background:'#F3F3F3',padding:'20rpx','border-radius':'30rpx'}" :customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
:placeholderStyle="{color:'#444444'}" :placeholderStyle="{ color: '#444444' }" :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="">
<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="{background:'#F3F3F3',padding:'20rpx', readonly placeholder="点击选择地址" :customStyle="{
'border-radius':'30rpx' background: '#F3F3F3', padding: '20rpx',
}" :placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}" 'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
suffixIcon='arrow-down'></up-input> suffixIcon='arrow-down'></up-input>
</view> </view>
</up-form-item> </up-form-item>
<up-form-item label="" v-if='Role==1'> <up-form-item label="" v-if='Role == 1'>
<view @click="showPop1=true" style="width: 100%;"> <view @click="showPop1 = true" style="width: 100%;">
<up-input style="pointer-events: none" v-model="formData.label_name" border="none" <up-input style="pointer-events: none" v-model="formData.label_name" border="none"
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{background:'#F3F3F3',padding:'20rpx', prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
'border-radius':'30rpx' background: '#F3F3F3', padding: '20rpx',
}" :placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}" 'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
suffixIcon='arrow-down'></up-input> suffixIcon='arrow-down'></up-input>
</view> </view>
</up-form-item> </up-form-item>
@ -63,26 +63,27 @@
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;"> <view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<view class=""> <view class="">
<up-input v-model="formData.code" border="none" prefixIcon="tags" placeholder="请输入验证码" <up-input v-model="formData.code" border="none" prefixIcon="tags" placeholder="请输入验证码"
:customStyle="{background:'#F3F3F3',padding:'20rpx', :customStyle="{
'border-radius':'30rpx' background: '#F3F3F3', padding: '20rpx',
}" :placeholderStyle="{color:'#444444'}" :prefixIconStyle="{'margin-right':'40rpx'}"></up-input> 'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
</view> </view>
<text class='btn-text' style="color: grey;" v-if='cutDown'>重新获取({{cutDown}})</text> <text class='btn-text' style="color: grey;" v-if='cutDown'>重新获取({{ cutDown }})</text>
<text @click="getCode" class='btn-text' v-else> {{flag?'获取验证码':'重新获取' }} </text> <text @click="getCode" class='btn-text' v-else> {{ flag ? '获取验证码' : '重新获取' }} </text>
</view> </view>
</up-form-item> </up-form-item>
</up-form> </up-form>
<view class="store-info"> <view class="store-info">
报备人:{{STORE_INFO.name}} 报备人:{{ STORE_INFO.name }}
</view> </view>
</view> </view>
<view class="submit-btn" @click="submit"> <view class="submit-btn" @click="submit">
<view <view
style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'> style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'>
{{Role==1?'完成并收款':'完成'}} {{ Role == 1 ? '完成并收款' : '完成' }}
</view> </view>
</view> </view>
@ -93,7 +94,7 @@
<view class="vip-card"> <view class="vip-card">
<text>当前已开通</text> <text>当前已开通</text>
<up-count-to :startVal="0" :endVal="count"></up-count-to> <up-count-to :startVal="0" :endVal="count"></up-count-to>
<text>{{Role==1?'行业会员':'商户'}}</text> <text>{{ Role == 1 ? '行业会员' : '商户' }}</text>
</view> </view>
<view class="table"> <view class="table">
@ -101,23 +102,23 @@
<!-- 表头行 --> <!-- 表头行 -->
<uni-tr> <uni-tr>
<uni-th width="20" align="center">序号</uni-th> <uni-th width="20" align="center">序号</uni-th>
<uni-th width="50" align="center" v-if='Role==1'>行业会员</uni-th> <uni-th width="50" align="center" v-if='Role == 1'>行业会员</uni-th>
<uni-th width="50" align="center" v-if='Role==1'>经营资金</uni-th> <uni-th width="50" align="center" v-if='Role == 1'>经营资金</uni-th>
<uni-th width="50" align="center" v-if='Role==4'>开通时间</uni-th> <uni-th width="50" align="center" v-if='Role == 4'>开通时间</uni-th>
<uni-th width="50" align="center" v-if='Role==4'>商户</uni-th> <uni-th width="50" align="center" v-if='Role == 4'>商户</uni-th>
<uni-th width="50" align="center" v-if='Role==1'>角色</uni-th> <uni-th width="50" align="center" v-if='Role == 1'>角色</uni-th>
<uni-th width="50" align="center">状态</uni-th> <uni-th width="50" align="center">状态</uni-th>
</uni-tr> </uni-tr>
<!-- 表格数据行 --> <!-- 表格数据行 -->
<uni-tr v-for="(item,index) in lists" :key="item.order_id"> <uni-tr v-for="(item, index) in lists" :key="item.order_id">
<uni-td align="center">{{index+1}}</uni-td> <uni-td align="center">{{ index + 1 }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center" v-if='Role==1'>{{item.real_name}}</uni-td> <uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.real_name }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center" v-if='Role==1'>{{item.price}}</uni-td> <uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.price }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center" v-if='Role==4'>{{item.create_time}}</uni-td> <uni-td style="font-size: 20rpx;" align="center" v-if='Role == 4'>{{ item.create_time }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center" v-if='Role==4'>{{item.nickname}}</uni-td> <uni-td style="font-size: 20rpx;" align="center" v-if='Role == 4'>{{ item.nickname }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center" v-if='Role==1'>{{item.label_name}}</uni-td> <uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.label_name }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center"> <uni-td style="font-size: 20rpx;" align="center">
<view v-if="item.paid ==1 ||Role==4">已开通</view> <view v-if="item.paid == 1 || Role == 4">已开通</view>
<view v-else style="color:#33B83A ;"> <view v-else style="color:#33B83A ;">
<view @click="upadtaStatus(item)"> <view @click="upadtaStatus(item)">
未开通,查询 未开通,查询
@ -135,67 +136,66 @@
<view style="height: 50rpx;" /> <view style="height: 50rpx;" />
<!-- 地址选择器 --> <!-- 地址选择器 -->
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true" :round="10"> <up-popup :show="showPop" @close="showPop = false" @open="showPop = true" :round="10">
<view style="padding: 20rpx;"> <view style="padding: 20rpx;">
<up-tabs :list="tabsList" @change='addressTbasChange' :current='currentAddressIndex' lineColor='#20B128' <up-tabs :list="tabsList" @change='addressTbasChange' :current='currentAddressIndex' lineColor='#20B128'
: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}' v-for="item in addressList.city" <view class="address-li" :class='{ act: item.city_code == formData.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>
</view> </view>
<view class="address-content" v-else-if='currentAddressIndex==1'> <view class="address-content" v-else-if='currentAddressIndex == 1'>
<view class="address-li" v-for="item in addressList.area" @click="addressLiClick(1,item)" <view class="address-li" v-for="item in addressList.area" @click="addressLiClick(1, item)"
:key="item.area_code" :class='{act:item.area_code==formData.area}'> :key="item.area_code" :class='{ act: item.area_code == formData.area }'>
<text>{{item.area_name}}</text> <text>{{ item.area_name }}</text>
<up-icon name="arrow-right" :color="item.area_code==formData.area ?'#20B128':'#777777'" /> <up-icon name="arrow-right" :color="item.area_code == formData.area ? '#20B128' : '#777777'" />
</view> </view>
</view> </view>
<view class="address-content" v-else-if='currentAddressIndex==2'> <view class="address-content" v-else-if='currentAddressIndex == 2'>
<view class="address-li" v-for="item in addressList.street" @click="addressLiClick(2,item)" <view class="address-li" v-for="item in addressList.street" @click="addressLiClick(2, item)"
:key="item.street_code" :class='{act:item.street_code==formData.street}'> :key="item.street_code" :class='{ act: item.street_code == formData.street }'>
<text>{{item.street_name}}</text> <text>{{ item.street_name }}</text>
<up-icon name="arrow-right" :color="item.street_code==formData.street ?'#20B128':'#777777'" /> <up-icon name="arrow-right" :color="item.street_code == formData.street ? '#20B128' : '#777777'" />
</view> </view>
</view> </view>
<view class="address-content" v-else-if='currentAddressIndex==3'> <view class="address-content" v-else-if='currentAddressIndex == 3'>
<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" :color="item.village_code==formData.village ?'#20B128':'#777777'" /> <up-icon name="arrow-right" :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}' v-for="item in addressList.brigade" <view class="address-li" :class='{ act: item.id == formData.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>
</view> </view>
</view> </view>
</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"
@close="showPop1=false" @open="showPop1=true" keyName='label_name' confirmColor='#33B83A'></up-picker> @open="showPop1 = true" keyName='label_name' confirmColor='#33B83A'></up-picker>
</template> </template>
<script setup> <script setup>
import { import {
reactive, reactive,
ref ref
} from 'vue'; } from 'vue';
import useUserStore from "@/store/user"; import useUserStore from "@/store/user";
import { import {
provinceListApi, provinceListApi,
cityListApi, cityListApi,
areaListApi, areaListApi,
streetListApi, streetListApi,
villageListApi, villageListApi,
brigadeListApi brigadeListApi
} from "@/api/address.js" } from "@/api/address.js"
import { import {
vipRechargeApi, vipRechargeApi,
rechargeCountApi, rechargeCountApi,
reVipRechargeApi, reVipRechargeApi,
@ -206,23 +206,23 @@
getUserShip, getUserShip,
getCreateLists, getCreateLists,
getReportingSms getReportingSms
} from "@/api/user.js" } from "@/api/user.js"
import Push from "@/utils/push.js" import Push from "@/utils/push.js"
import { import {
onPullDownRefresh, onPullDownRefresh,
onLoad onLoad
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
import { import {
config config
} from "@/config/app.js" } from "@/config/app.js"
const showPop1 = ref(false) const showPop1 = ref(false)
const Role = ref('') const Role = ref('')
const range = ref({}) const range = ref({})
const columns = ref([]) const columns = ref([])
const showModa = ref(true) const showModa = ref(true)
const storePhone = ref('') const storePhone = ref('')
const confirmStore = () => { const confirmStore = () => {
getStoreByPhone({ getStoreByPhone({
phone: storePhone.value phone: storePhone.value
}).then(res => { }).then(res => {
@ -233,15 +233,15 @@
}).catch(err => { }).catch(err => {
uni.$u.toast('未查到店铺信息,请检查手机号码') uni.$u.toast('未查到店铺信息,请检查手机号码')
}) })
} }
// //
let STORE_INFO = reactive({ let STORE_INFO = reactive({
id: "" id: ""
}) })
// //
const setPhoneOneDay = () => { const setPhoneOneDay = () => {
if (uni.getStorageSync('VIP_PHONE')) return; if (uni.getStorageSync('VIP_PHONE')) return;
const currentDate = new Date(); const currentDate = new Date();
const nextDay = new Date(currentDate); const nextDay = new Date(currentDate);
@ -250,8 +250,8 @@
time: nextDay, time: nextDay,
phone: storePhone.value phone: storePhone.value
})); }));
} }
const getPhoneOneDay = () => { const getPhoneOneDay = () => {
if (uni.getStorageSync('VIP_PHONE')) { if (uni.getStorageSync('VIP_PHONE')) {
let data = JSON.parse(uni.getStorageSync('VIP_PHONE')) let data = JSON.parse(uni.getStorageSync('VIP_PHONE'))
if (new Date() > data.time) { if (new Date() > data.time) {
@ -260,19 +260,19 @@
storePhone.value = data.phone storePhone.value = data.phone
} }
} }
} }
// //
// //
const cutDown = ref(0) const cutDown = ref(0)
const flag = ref(true) const flag = ref(true)
const code = ref('') const code = ref('')
const checkPhone = (phone) => { const checkPhone = (phone) => {
const regex = /^1[3-9]\d{9}$/; const regex = /^1[3-9]\d{9}$/;
return regex.test(formData.mobile) ? true : false return regex.test(formData.mobile) ? true : false
} }
const getCode = async () => { const getCode = async () => {
if (!checkPhone(formData.mobile)) return uni.$u.toast('请输入正确的手机号') if (!checkPhone(formData.mobile)) return uni.$u.toast('请输入正确的手机号')
await getReportingSms({ await getReportingSms({
account: formData.mobile account: formData.mobile
@ -283,11 +283,11 @@
cutDown.value-- cutDown.value--
if (cutDown.value <= 0) clearInterval(timer) if (cutDown.value <= 0) clearInterval(timer)
}, 1000) }, 1000)
} }
// //
const currentTab = ref(1) const currentTab = ref(1)
const formData = reactive({ const formData = reactive({
store_id: STORE_INFO.id, store_id: STORE_INFO.id,
mobile: "", mobile: "",
province: 510000, province: 510000,
@ -317,36 +317,36 @@
// label_id: "4", // label_id: "4",
// user_ship: '1', // user_ship: '1',
// code: '' // code: ''
}) })
const conformRole = (e) => { const conformRole = (e) => {
formData.label_name = e.value[0].label_name formData.label_name = e.value[0].label_name
formData.label_id = e.value[0].label_id formData.label_id = e.value[0].label_id
showPop1.value = false showPop1.value = false
} }
// //
const showPop = ref(false) const showPop = ref(false)
const currentAddressIndex = ref(0) const currentAddressIndex = ref(0)
const currentAddressList = () => { const currentAddressList = () => {
if (!formData.city) return [0, 'city']; if (!formData.city) return [0, 'city'];
else if (formData.area) return [1, 'area']; else if (formData.area) return [1, 'area'];
else if (formData.street) return [2, 'street']; else if (formData.street) return [2, 'street'];
else if (formData.village) return [3, 'village']; else if (formData.village) return [3, 'village'];
else if (formData.brigade) return [4, 'brigade']; else if (formData.brigade) return [4, 'brigade'];
} }
const addressTbasChange = (e) => { const addressTbasChange = (e) => {
currentAddressIndex.value = e.index currentAddressIndex.value = e.index
} }
const addressList = reactive({ const addressList = reactive({
city: [], city: [],
area: [], area: [],
street: [], street: [],
village: [], village: [],
brigade: [] brigade: []
}) })
const addressLiClick = async (i, item) => { const addressLiClick = async (i, item) => {
if (i == 0) { if (i == 0) {
formData.city = item.city_code formData.city = item.city_code
tabsList[0].name = item.city_name tabsList[0].name = item.city_name
@ -391,15 +391,15 @@
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name + tabsList[4] formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name + tabsList[4]
.name .name
return currentAddressIndex.value++ return currentAddressIndex.value++
} }
const getCityList = async () => { const getCityList = async () => {
let res = await cityListApi({ let res = await cityListApi({
province_code: formData.province province_code: formData.province
}) })
addressList.city = res.data addressList.city = res.data
} }
getCityList() getCityList()
const tabsList = reactive( const tabsList = reactive(
[{ [{
name: "请选择" name: "请选择"
}, },
@ -423,24 +423,24 @@
// //
// scoket // scoket
let timerInvol = null let timerInvol = null
const userInfo = useUserStore().userInfo; const userInfo = useUserStore().userInfo;
const connection = new Push({ const connection = new Push({
url: config.WSS_URL, // websocket url: config.WSS_URL, // websocket
app_key: '2ce3ce22329517213caa7dad261f5695', app_key: '2ce3ce22329517213caa7dad261f5695',
}); });
// user-1 // user-1
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 {
clearTimeout(timerInvol); clearTimeout(timerInvol);
paySuccessToTabs2() paySuccessToTabs2()
} catch (error) {} } catch (error) { }
}); });
const submit = async () => { const submit = async () => {
if (!formData.real_name) return uni.$u.toast('请填写真实姓名'); if (!formData.real_name) return uni.$u.toast('请填写真实姓名');
if (!formData.mobile) return uni.$u.toast('请填写电话号码'); if (!formData.mobile) return uni.$u.toast('请填写电话号码');
if (!formData.code) return uni.$u.toast('请输入短信验证码'); if (!formData.code) return uni.$u.toast('请输入短信验证码');
@ -453,7 +453,7 @@
// vipRechargeApi(formData).then(res => {}) // vipRechargeApi(formData).then(res => {})
// return // return
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('二维码未扫描完整');
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
@ -467,8 +467,7 @@
uni.$u.toast('支付超时'); uni.$u.toast('支付超时');
}, 30000) }, 30000)
}) })
getCount()
getLists()
} }
}); });
} else { } else {
@ -497,11 +496,11 @@
getCount() getCount()
}) })
} }
} }
const rePay = (item) => { const rePay = (item) => {
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('二维码未扫描完整');
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
@ -517,10 +516,10 @@
}) })
} }
}); });
} }
// formDatatabs2 // formDatatabs2
const paySuccessToTabs2 = () => { const paySuccessToTabs2 = () => {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: '支付成功', title: '支付成功',
@ -548,21 +547,21 @@
}, 500); // 1 }, 500); // 1
} }
}); });
} }
// //
const count = ref(0) const count = ref(0)
const getCount = async () => { const getCount = async () => {
if (Role.value == 4) return; if (Role.value == 4) return;
let res = await rechargeCountApi({ let res = await rechargeCountApi({
store_id: STORE_INFO.id store_id: STORE_INFO.id
}) })
count.value = res.data.count count.value = res.data.count
} }
// //
const lists = ref([]) const lists = ref([])
const getLists = async () => { const getLists = async () => {
if (Role.value == 1) { if (Role.value == 1) {
let res = await rechargeListsApi({ let res = await rechargeListsApi({
store_id: STORE_INFO.id, store_id: STORE_INFO.id,
@ -577,13 +576,13 @@
count.value = res.data.count count.value = res.data.count
} }
} }
getCount() getCount()
getLists() getLists()
const upadtaStatus = (item) => { const upadtaStatus = (item) => {
updataOrderApi({ updataOrderApi({
order_no: item.order_id, order_no: item.order_id,
recharge: 1 recharge: 1
@ -592,9 +591,9 @@
getLists() getLists()
}) })
} }
onLoad(() => { onLoad(() => {
getUserShip().then(res => { getUserShip().then(res => {
range.value = res.data.lists.map(item => { range.value = res.data.lists.map(item => {
return { return {
@ -607,19 +606,19 @@
columns.value = [res.data.lists] columns.value = [res.data.lists]
}) })
getPhoneOneDay() getPhoneOneDay()
}) })
onPullDownRefresh(() => { onPullDownRefresh(() => {
getCount() getCount()
getLists() getLists()
setTimeout(() => { setTimeout(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, 500) }, 500)
}) })
</script> </script>
<style lang='scss'> <style lang='scss'>
.tabs { .tabs {
background-color: #fff; background-color: #fff;
width: 100vw; width: 100vw;
box-sizing: border-box; box-sizing: border-box;
@ -649,17 +648,17 @@
.actLine { .actLine {
left: calc(75vw - 35rpx); left: calc(75vw - 35rpx);
} }
} }
.card { .card {
width: 710rpx; width: 710rpx;
margin: 20rpx auto; margin: 20rpx auto;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
border-radius: 10rpx; border-radius: 10rpx;
} }
.card1 { .card1 {
padding: 52rpx 30rpx; padding: 52rpx 30rpx;
.card1-tit { .card1-tit {
@ -675,9 +674,9 @@
text-align: center; text-align: center;
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.submit-btn { .submit-btn {
/* height: 200rpx; */ /* height: 200rpx; */
position: fixed; position: fixed;
bottom: 50rpx; bottom: 50rpx;
@ -685,10 +684,10 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.vip-card { .vip-card {
width: 690rpx; width: 690rpx;
height: 270rpx; height: 270rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/4a92b202406162207212332.png'); background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/4a92b202406162207212332.png');
@ -707,17 +706,17 @@
color: #7B5232; color: #7B5232;
} }
} }
.table { .table {
width: 710rpx; width: 710rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: 30rpx; font-size: 30rpx;
margin: 0 auto; margin: 0 auto;
} }
.address-content { .address-content {
padding: 20rpx; padding: 20rpx;
height: 50vh; height: 50vh;
overflow-y: auto; overflow-y: auto;
@ -734,26 +733,26 @@
.act { .act {
color: #20B128; color: #20B128;
} }
} }
.uni-table-th { .uni-table-th {
padding: 10rpx 0 !important; padding: 10rpx 0 !important;
} }
.uni-table-td { .uni-table-td {
padding: 10rpx 0 !important; padding: 10rpx 0 !important;
} }
.slot-content { .slot-content {
padding-bottom: 50rpx; padding-bottom: 50rpx;
} }
.code-btn { .code-btn {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.btn-text { .btn-text {
color: #20B128; color: #20B128;
} }
</style> </style>