2024-06-17 08:38:39 +08:00
|
|
|
|
<template>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 门店及身份选择 -->
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<view class="" v-if="!STORE_INFO.id">
|
2024-06-27 17:39:25 +08:00
|
|
|
|
<up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<view class="slot-content">
|
2024-06-22 18:52:03 +08:00
|
|
|
|
<up-form labelPosition="left" label-width="100rpx">
|
|
|
|
|
<up-form-item label="手机号" borderBottom>
|
|
|
|
|
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
|
|
|
|
</up-form-item>
|
|
|
|
|
</up-form>
|
2024-07-11 16:46:19 +08:00
|
|
|
|
<!-- <up-form labelPosition="left" label-width="100rpx">
|
2024-06-29 18:25:37 +08:00
|
|
|
|
<up-form-item label="身份" borderBottom>
|
|
|
|
|
<up-radio-group v-model="Role" placement="row">
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<up-radio activeColor="#20b128" label="行业会员" :name="1"
|
|
|
|
|
style="margin-right: 10rpx;"></up-radio>
|
2024-06-29 18:25:37 +08:00
|
|
|
|
<up-radio activeColor="#20b128" label="商户" :name="4"></up-radio>
|
|
|
|
|
</up-radio-group>
|
|
|
|
|
</up-form-item>
|
2024-07-11 16:46:19 +08:00
|
|
|
|
</up-form> -->
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
</up-modal>
|
2024-06-17 08:38:39 +08:00
|
|
|
|
</view>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 门店及身份选择结束 -->
|
2024-06-17 08:38:39 +08:00
|
|
|
|
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<view v-else>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<up-tabs v-if="Role == 1" :list="tabsLst" :itemStyle="{ width: '33vw', paddingBottom: '20rpx' }"
|
|
|
|
|
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs>
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<up-tabs v-else :list="tabsLst2" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758'
|
2024-06-29 18:25:37 +08:00
|
|
|
|
:current='currentTab' @change="tabsChange1"></up-tabs>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
</up-sticky>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
<!-- 开通行业会员 -->
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<block v-if='currentTab == 0'>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<view class="card card1">
|
|
|
|
|
<view class="card1-tit">
|
2024-07-05 18:18:02 +08:00
|
|
|
|
购买采购包
|
|
|
|
|
</view>
|
|
|
|
|
<view class="store-info">
|
|
|
|
|
报备人:{{ STORE_INFO.name }}
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
2024-06-24 18:40:03 +08:00
|
|
|
|
<up-form-item label="">
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<up-input @change="phoneChnge(1)" v-model="formData.mobile" border="none" prefixIcon="phone"
|
|
|
|
|
placeholder="请输入电话号码"
|
2024-06-27 09:11:32 +08:00
|
|
|
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
2024-06-27 10:34:22 +08:00
|
|
|
|
:placeholderStyle="{ color: '#444444' }"
|
|
|
|
|
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</up-form-item>
|
2024-06-24 18:40:03 +08:00
|
|
|
|
<up-form-item label="">
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<up-input v-model="formData.real_name" border="none" prefixIcon="account" placeholder="请输入真实姓名"
|
2024-06-27 09:11:32 +08:00
|
|
|
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
2024-06-27 10:34:22 +08:00
|
|
|
|
:placeholderStyle="{ color: '#444444' }"
|
|
|
|
|
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</up-form-item>
|
2024-06-24 18:40:03 +08:00
|
|
|
|
<up-form-item label="">
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view @click="showPop = true" style="width: 100%;">
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<up-input style="pointer-events: none" v-model="formData.address" border="none"
|
|
|
|
|
prefixIcon="map" readonly placeholder="点击选择地址" :customStyle="{
|
2024-06-27 09:11:32 +08:00
|
|
|
|
background: '#F3F3F3', padding: '20rpx',
|
|
|
|
|
'border-radius': '30rpx'
|
|
|
|
|
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
|
2024-06-22 18:52:03 +08:00
|
|
|
|
suffixIcon='arrow-down'></up-input>
|
|
|
|
|
</view>
|
|
|
|
|
</up-form-item>
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<up-form-item label="" v-if="Role == 1">
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view @click="showPop1 = true" style="width: 100%;">
|
2024-06-22 18:52:03 +08:00
|
|
|
|
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
2024-06-27 09:11:32 +08:00
|
|
|
|
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
|
|
|
|
background: '#F3F3F3', padding: '20rpx',
|
|
|
|
|
'border-radius': '30rpx'
|
|
|
|
|
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
|
2024-06-17 17:16:09 +08:00
|
|
|
|
suffixIcon='arrow-down'></up-input>
|
|
|
|
|
</view>
|
|
|
|
|
</up-form-item>
|
2024-06-25 15:34:24 +08:00
|
|
|
|
<up-form-item label="">
|
|
|
|
|
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
|
|
|
|
|
<view class="">
|
|
|
|
|
<up-input v-model="formData.code" border="none" prefixIcon="tags" placeholder="请输入验证码"
|
2024-06-27 09:11:32 +08:00
|
|
|
|
:customStyle="{
|
|
|
|
|
background: '#F3F3F3', padding: '20rpx',
|
|
|
|
|
'border-radius': '30rpx'
|
|
|
|
|
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
2024-06-25 15:34:24 +08:00
|
|
|
|
</view>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<text class='btn-text' style="color: grey;" v-if='cutDown'>重新获取({{ cutDown }})</text>
|
|
|
|
|
<text @click="getCode" class='btn-text' v-else> {{ flag ? '获取验证码' : '重新获取' }} </text>
|
2024-06-25 15:34:24 +08:00
|
|
|
|
</view>
|
|
|
|
|
</up-form-item>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</up-form>
|
2024-07-05 18:18:02 +08:00
|
|
|
|
<view class="link" @click="navgo('/pageQuota/vipUser/activePage')">
|
|
|
|
|
点击查看礼品包内容
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</view>
|
2024-07-05 18:18:02 +08:00
|
|
|
|
<view class="gift-pack">
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<view class="gift-pack-li" :class="index == giftIndex && 'act-gift'"
|
|
|
|
|
v-for="(item, index) in rechargeList" :key="index" @click="choseGift(index)">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<view class="gift-pack-li-top" :class="index == giftIndex && 'act-gift-top'">
|
|
|
|
|
<text style="font-size: 40rpx;">{{ item.money }}</text><text>元采购包</text>
|
2024-07-05 18:18:02 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
送{{ item.send }}{{ item.send_string }}
|
2024-07-05 18:18:02 +08:00
|
|
|
|
</view>
|
2024-06-27 17:39:25 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-17 08:38:39 +08:00
|
|
|
|
</view>
|
2024-06-17 20:47:54 +08:00
|
|
|
|
<view class="submit-btn" @click="submit">
|
|
|
|
|
<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 ;'>
|
2024-07-06 16:20:28 +08:00
|
|
|
|
{{ Role == 1 ? '完成并收款' : "完成" }}
|
2024-06-17 20:47:54 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
2024-06-17 08:38:39 +08:00
|
|
|
|
</view>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</block>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 开通行业会员结束 -->
|
2024-06-17 17:16:09 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 追加经营资金 -->
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<block v-if="currentTab == 1 && Role == 1">
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<view class="card card1">
|
|
|
|
|
<view class="card1-tit">
|
|
|
|
|
行业会员追加经营资金
|
2024-07-01 18:36:12 +08:00
|
|
|
|
<!-- <up-input v-model='formData2.auth_code'> </up-input> -->
|
2024-06-28 19:53:27 +08:00
|
|
|
|
</view>
|
|
|
|
|
<up-form labelPosition="left" :model="formData2" :borderBottom='false'>
|
|
|
|
|
<up-form-item label="">
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<up-input @change="phoneChnge(2)" v-model="formData2.mobile" border="none" prefixIcon="phone"
|
2024-06-28 19:53:27 +08:00
|
|
|
|
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="">
|
|
|
|
|
<up-input v-model="formData2.real_name" disabled border="none" prefixIcon="account"
|
|
|
|
|
placeholder="系统自动获取" color='grey'
|
|
|
|
|
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
|
2024-07-10 16:03:34 +08:00
|
|
|
|
:placeholderStyle="{ color: 'grey' }"
|
|
|
|
|
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
</up-form-item>
|
|
|
|
|
<up-form-item label="">
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<up-input style="pointer-events: none" v-model="formData2.address" border="none"
|
|
|
|
|
prefixIcon="map" readonly color='grey' placeholder="系统自动获取" :customStyle="{
|
2024-06-28 19:53:27 +08:00
|
|
|
|
background: '#F3F3F3', padding: '20rpx',
|
|
|
|
|
'border-radius': '30rpx'
|
|
|
|
|
}" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
|
|
|
</up-form-item>
|
|
|
|
|
<up-form-item label="">
|
|
|
|
|
<up-input style="pointer-events: none" v-model="formData2.label_name" border="none" color='grey'
|
|
|
|
|
prefixIcon="man-add" readonly placeholder="系统自动获取" :customStyle="{
|
|
|
|
|
background: '#F3F3F3', padding: '20rpx',
|
|
|
|
|
'border-radius': '30rpx'
|
|
|
|
|
}" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
|
|
|
</up-form-item>
|
|
|
|
|
</up-form>
|
|
|
|
|
<view class="store-info">
|
|
|
|
|
报备人:{{ STORE_INFO.name }}
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="store-info">
|
|
|
|
|
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price = ''" color='#FF6B00'
|
2024-07-10 16:03:34 +08:00
|
|
|
|
:placeholderStyle="{ fontSize: '28rpx' }" fontSize='20px' border="none"
|
|
|
|
|
v-model="formData2.price" type='digit' @blur='tofixedPrice(2)'></up-input>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
2024-07-06 16:20:28 +08:00
|
|
|
|
v-if="formData2.label_limit && formData2.price < formData2.label_limit">
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<view class="">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
{{ formData2.label_name }}会员最低金额不能低于{{ formData2.label_limit }}元
|
2024-06-28 19:53:27 +08:00
|
|
|
|
</view>
|
2024-07-05 18:18:02 +08:00
|
|
|
|
<!-- <view class="">
|
2024-06-28 19:53:27 +08:00
|
|
|
|
最高金额不能超过10000.00元
|
2024-07-05 18:18:02 +08:00
|
|
|
|
</view> -->
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<view class="">
|
|
|
|
|
可单次多笔累计操作
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="submit-btn" @click="submit(2)">
|
|
|
|
|
<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 ;'>
|
|
|
|
|
完成并收款
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</block>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 追加经营资金结束 -->
|
2024-07-05 18:18:02 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 开通列表-会员 -->
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<block v-if="currentTab == 2 && Role == 1">
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<view class="vip-card">
|
|
|
|
|
<text>当前已开通:</text>
|
|
|
|
|
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<text>位行业会员 </text>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="table">
|
|
|
|
|
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
|
|
|
|
<uni-tr>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<uni-th width="50" align="center">行业会员</uni-th>
|
|
|
|
|
<uni-th width="50" align="center">经营资金</uni-th>
|
|
|
|
|
<uni-th width="50" align="center">开通时间</uni-th>
|
|
|
|
|
<uni-th width="50" align="center">角色</uni-th>
|
2024-06-17 18:47:06 +08:00
|
|
|
|
<uni-th width="50" align="center">状态</uni-th>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</uni-tr>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">
|
|
|
|
|
<view>
|
|
|
|
|
{{ item.real_name }}
|
|
|
|
|
</view>
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<view style="color: #33B83A;" @click="popPhone = item.mobile, showModal = true">
|
2024-07-01 18:36:12 +08:00
|
|
|
|
查看号码
|
2024-07-01 18:08:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
</uni-td>
|
2024-06-28 19:53:27 +08:00
|
|
|
|
<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>
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.ship_name }}</uni-td>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<view v-if="item.paid == 1">已开通</view>
|
2024-06-24 18:40:03 +08:00
|
|
|
|
<view v-else style="color:#33B83A ;">
|
|
|
|
|
<view @click="upadtaStatus(item)">
|
|
|
|
|
未开通,查询
|
|
|
|
|
</view>
|
|
|
|
|
<view @click="rePay(item)">
|
|
|
|
|
重新支付
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</uni-td>
|
|
|
|
|
</uni-tr>
|
|
|
|
|
</uni-table>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 开通列表-会员结束 -->
|
2024-06-29 18:25:37 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 开通列表-商户 -->
|
2024-07-06 16:20:28 +08:00
|
|
|
|
<block v-if="currentTab == 1 && Role == 4">
|
2024-06-29 18:25:37 +08:00
|
|
|
|
<view class="vip-card">
|
|
|
|
|
<text>当前已开通:</text>
|
|
|
|
|
<up-count-to :startVal="0" :endVal="count"></up-count-to>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<text>位商户</text>
|
2024-06-29 18:25:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="table">
|
|
|
|
|
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
|
|
|
|
<uni-tr>
|
|
|
|
|
<uni-th width="50" align="center">商户</uni-th>
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<uni-th width="50" align="center">查看号码</uni-th>
|
2024-06-29 18:25:37 +08:00
|
|
|
|
<uni-th width="50" align="center">开通时间</uni-th>
|
|
|
|
|
<uni-th width="50" align="center">状态</uni-th>
|
|
|
|
|
</uni-tr>
|
|
|
|
|
<!-- 表格数据行 -->
|
|
|
|
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.mobile }}</uni-td>
|
2024-06-29 18:25:37 +08:00
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
|
|
|
|
<uni-td style="font-size: 20rpx;" align="center">
|
|
|
|
|
<view>已开通</view>
|
|
|
|
|
</uni-td>
|
|
|
|
|
</uni-tr>
|
|
|
|
|
</uni-table>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 开通列表-商户结束 -->
|
|
|
|
|
|
2024-06-17 17:16:09 +08:00
|
|
|
|
</view>
|
2024-06-24 18:40:03 +08:00
|
|
|
|
<view style="height: 50rpx;" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
<!-- 地址选择器 -->
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<up-popup :show="showPop" @close="showPop = false" @open="showPop = true" :round="10">
|
2024-06-17 15:29:52 +08:00
|
|
|
|
<view style="padding: 20rpx;">
|
|
|
|
|
<up-tabs :list="tabsList" @change='addressTbasChange' :current='currentAddressIndex' lineColor='#20B128'
|
2024-06-27 09:11:32 +08:00
|
|
|
|
:activeStyle="{ color: '#20B128' }"></up-tabs>
|
2024-06-17 15:29:52 +08:00
|
|
|
|
<up-line style="margin-top:20rpx "></up-line>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view class="address-content" v-if='currentAddressIndex == 0'>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<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)">
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<text>{{ item.city_name }}</text>
|
|
|
|
|
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view class="address-content" v-else-if='currentAddressIndex == 1'>
|
|
|
|
|
<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 }'>
|
|
|
|
|
<text>{{ item.area_name }}</text>
|
|
|
|
|
<up-icon name="arrow-right" :color="item.area_code == formData.area ? '#20B128' : '#777777'" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view class="address-content" v-else-if='currentAddressIndex == 2'>
|
|
|
|
|
<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 }'>
|
|
|
|
|
<text>{{ item.street_name }}</text>
|
|
|
|
|
<up-icon name="arrow-right" :color="item.street_code == formData.street ? '#20B128' : '#777777'" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view class="address-content" v-else-if='currentAddressIndex == 3'>
|
|
|
|
|
<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 }'>
|
|
|
|
|
<text>{{ item.village_name }}</text>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<up-icon name="arrow-right"
|
|
|
|
|
:color="item.village_code == formData.village ? '#20B128' : '#777777'" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<view class="address-content" v-else-if='currentAddressIndex == 4'>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<view class="address-li" :class='{ act: item.id == formData.brigade }'
|
|
|
|
|
v-for="item in addressList.brigade" :key="item.id" @click="addressLiClick(4, item)">
|
2024-06-27 09:11:32 +08:00
|
|
|
|
<text>{{ item.brigade_name }}</text>
|
|
|
|
|
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
|
2024-06-17 15:29:52 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</up-popup>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 会员类型选择器 -->
|
2024-06-27 10:34:22 +08:00
|
|
|
|
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
2024-07-01 18:08:14 +08:00
|
|
|
|
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
<!-- 会员号码查看modal -->
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
|
2024-07-06 16:20:28 +08:00
|
|
|
|
confirmColor='#33B83A' @confirm='showModal = false' @close="showModal = false">
|
2024-07-01 18:08:14 +08:00
|
|
|
|
<view class="slot-content">
|
2024-07-06 16:20:28 +08:00
|
|
|
|
{{ popPhone }}
|
2024-07-01 18:08:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
</up-modal>
|
2024-07-13 18:00:01 +08:00
|
|
|
|
<!-- 加载中 -->
|
|
|
|
|
<!-- <view style="position: absolute; top: 34%; left: 42%;">
|
|
|
|
|
<up-loading-icon text="加载中" textSize="14" show="true" :vertical="true"></up-loading-icon>
|
|
|
|
|
</view> -->
|
|
|
|
|
|
2024-06-17 08:38:39 +08:00
|
|
|
|
</template>
|
|
|
|
|
<script setup>
|
2024-07-10 16:03:34 +08:00
|
|
|
|
import {
|
|
|
|
|
reactive,
|
|
|
|
|
ref
|
|
|
|
|
} from 'vue';
|
|
|
|
|
import useUserStore from "@/store/user";
|
|
|
|
|
import {
|
|
|
|
|
provinceListApi,
|
|
|
|
|
cityListApi,
|
|
|
|
|
areaListApi,
|
|
|
|
|
streetListApi,
|
|
|
|
|
villageListApi,
|
|
|
|
|
brigadeListApi
|
|
|
|
|
} from "@/api/address.js"
|
|
|
|
|
import {
|
|
|
|
|
vipRechargeApi,
|
|
|
|
|
getRechargeListApi,
|
|
|
|
|
isUserShipApi,
|
|
|
|
|
rechargeCountApi,
|
|
|
|
|
reVipRechargeApi,
|
|
|
|
|
rechargeListsApi,
|
|
|
|
|
updataOrderApi,
|
|
|
|
|
getStoreByPhone,
|
|
|
|
|
getUserLabel,
|
|
|
|
|
getUserShip,
|
|
|
|
|
getCreateLists,
|
|
|
|
|
getReportingSms,
|
|
|
|
|
getVipInfoByPhone
|
|
|
|
|
} from "@/api/user.js"
|
|
|
|
|
import Push from "@/utils/push.js"
|
|
|
|
|
import {
|
|
|
|
|
onPullDownRefresh,
|
|
|
|
|
onLoad,
|
|
|
|
|
onReachBottom
|
|
|
|
|
} from "@dcloudio/uni-app"
|
|
|
|
|
import {
|
|
|
|
|
config
|
|
|
|
|
} from "@/config/app.js"
|
|
|
|
|
|
|
|
|
|
const currentTab = ref(0)
|
|
|
|
|
const showModal = ref(false)
|
|
|
|
|
const showPop1 = ref(false)
|
|
|
|
|
const Role = ref(1)
|
|
|
|
|
const popPhone = ref('')
|
|
|
|
|
const columns = ref([])
|
|
|
|
|
const showModa = ref(true)
|
|
|
|
|
const tabsLst = reactive([{
|
|
|
|
|
name: '开通行业会员'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '追加经营资金'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '已开通列表'
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
const tabsLst2 = reactive([{
|
|
|
|
|
name: '开通商户'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '已开通列表'
|
|
|
|
|
},
|
|
|
|
|
]);
|
2024-07-11 16:46:19 +08:00
|
|
|
|
const vipList = reactive([1, 2, 3, 4, 5, 6, 7, 8])
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
const tabsChange = (e) => {
|
|
|
|
|
currentTab.value = e.index
|
|
|
|
|
if (e.index == 2) {
|
|
|
|
|
getCount()
|
|
|
|
|
getLists()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const tabsChange1 = (e) => {
|
|
|
|
|
currentTab.value = (e.index)
|
2024-06-29 18:25:37 +08:00
|
|
|
|
getLists()
|
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
// 用户选择的门店信息
|
|
|
|
|
const storePhone = ref('')
|
|
|
|
|
let STORE_INFO = reactive({
|
|
|
|
|
id: "",
|
2024-06-17 08:38:39 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const confirmStore = () => {
|
|
|
|
|
getStoreByPhone({
|
|
|
|
|
phone: storePhone.value
|
|
|
|
|
}).then(res => {
|
|
|
|
|
for (let key in res.data) {
|
|
|
|
|
STORE_INFO[key] = res.data[key]
|
|
|
|
|
}
|
|
|
|
|
setPhoneOneDay()
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
uni.$u.toast('未查到店铺信息,请检查手机号码')
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 门店手机号保留一天
|
|
|
|
|
const setPhoneOneDay = () => {
|
2024-07-22 17:59:27 +08:00
|
|
|
|
// if (uni.getStorageSync('VIP_PHONE')) return;
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
const nextDay = new Date(currentDate);
|
|
|
|
|
nextDay.setDate(currentDate.getDate() + 1);
|
|
|
|
|
uni.setStorageSync('VIP_PHONE', JSON.stringify({
|
|
|
|
|
time: nextDay,
|
|
|
|
|
phone: storePhone.value
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
const getPhoneOneDay = () => {
|
|
|
|
|
if (!uni.getStorageSync('VIP_PHONE')) return;
|
2024-07-06 16:20:28 +08:00
|
|
|
|
let data = JSON.parse(uni.getStorageSync('VIP_PHONE'))
|
|
|
|
|
if (new Date() > data.time) {
|
|
|
|
|
uni.removeStorageSync('VIP_PHONE');
|
|
|
|
|
} else {
|
|
|
|
|
storePhone.value = data.phone
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
// 手机保留一天结束
|
|
|
|
|
|
|
|
|
|
// 验证码
|
|
|
|
|
const cutDown = ref(0)
|
|
|
|
|
const flag = ref(true)
|
|
|
|
|
const code = ref('')
|
|
|
|
|
const checkPhone = (phone) => {
|
|
|
|
|
const regex = /^1[3-9]\d{9}$/;
|
|
|
|
|
return regex.test(phone) ? true : false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getCode = async () => {
|
|
|
|
|
if (!checkPhone(formData.mobile)) return uni.$u.toast('请输入正确的手机号')
|
|
|
|
|
await getReportingSms({
|
|
|
|
|
account: formData.mobile
|
|
|
|
|
})
|
|
|
|
|
flag.value = false
|
|
|
|
|
cutDown.value = 60
|
|
|
|
|
let timer = setInterval(() => {
|
|
|
|
|
cutDown.value--
|
|
|
|
|
if (cutDown.value <= 0) {
|
|
|
|
|
cutDown.value = 0;
|
|
|
|
|
clearInterval(timer);
|
|
|
|
|
}
|
|
|
|
|
}, 1000)
|
|
|
|
|
}
|
|
|
|
|
// 验证码结束
|
|
|
|
|
const formData = reactive({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
mobile: "",
|
|
|
|
|
province: 510000,
|
|
|
|
|
city: '',
|
|
|
|
|
area: "",
|
|
|
|
|
street: "",
|
|
|
|
|
village: "",
|
|
|
|
|
real_name: "",
|
|
|
|
|
auth_code: "",
|
|
|
|
|
address: "",
|
|
|
|
|
label_name: "",
|
|
|
|
|
label_id: "",
|
|
|
|
|
label_limit: "",
|
|
|
|
|
user_ship: '',
|
|
|
|
|
code: '',
|
|
|
|
|
brigade: "",
|
|
|
|
|
price: "",
|
2024-06-27 10:34:22 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const formData2 = reactive({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
mobile: "",
|
|
|
|
|
province: 510000,
|
|
|
|
|
city: '',
|
|
|
|
|
area: "",
|
|
|
|
|
street: "",
|
|
|
|
|
village: "",
|
|
|
|
|
real_name: "",
|
|
|
|
|
auth_code: "",
|
|
|
|
|
address: "",
|
|
|
|
|
label_name: "",
|
|
|
|
|
label_id: "",
|
|
|
|
|
label_limit: "",
|
|
|
|
|
user_ship: '',
|
|
|
|
|
brigade: "",
|
|
|
|
|
price: "",
|
2024-06-28 19:53:27 +08:00
|
|
|
|
})
|
|
|
|
|
|
2024-07-01 18:08:14 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const getFormData2 = (data) => {
|
|
|
|
|
formData2.city = data.address_info?.city
|
|
|
|
|
formData2.area = data.address_info?.area
|
|
|
|
|
formData2.province = data.address_info?.province
|
|
|
|
|
formData2.street = data.address_info?.street
|
|
|
|
|
formData2.village = data.address_info?.village
|
|
|
|
|
formData2.real_name = data.real_name
|
|
|
|
|
formData2.address = data.address_info?.address_like
|
|
|
|
|
formData2.label_id = data.user_ship
|
|
|
|
|
formData2.user_ship = data.user_ship
|
|
|
|
|
formData2.brigade = data.address_info?.brigade
|
|
|
|
|
columns.value[0].forEach(item => {
|
|
|
|
|
if (item.id == formData2.label_id) {
|
|
|
|
|
formData2.label_name = item.title
|
|
|
|
|
formData2.label_limit = item.limit
|
2024-07-06 16:20:28 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const phoneChnge = async (type) => {
|
|
|
|
|
// typewhite 1 行业会员 2 经营资金
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
if (!checkPhone(formData.mobile)) return
|
|
|
|
|
try {
|
|
|
|
|
let {
|
|
|
|
|
data
|
|
|
|
|
} = await getVipInfoByPhone({
|
|
|
|
|
mobile: formData.mobile
|
|
|
|
|
})
|
|
|
|
|
formData2.mobile = formData.mobile
|
2024-07-11 16:46:19 +08:00
|
|
|
|
if (data.user_ship == 0) return;
|
2024-07-10 16:03:34 +08:00
|
|
|
|
if (Role.value == 1) {
|
|
|
|
|
uni.$u.toast('该用户已是会员请使用追加经营资金进行收款')
|
|
|
|
|
currentTab.value = 1
|
|
|
|
|
return getFormData2(data)
|
|
|
|
|
} else {
|
|
|
|
|
return uni.$u.toast('该用户已是会员,无法进行商户报备')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
} else {
|
|
|
|
|
if (formData2.mobile.length == 0) resetFormData();
|
|
|
|
|
if (!checkPhone(formData2.mobile)) return
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '查询用户中'
|
2024-07-06 16:20:28 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
try {
|
|
|
|
|
let {
|
|
|
|
|
data
|
|
|
|
|
} = await getVipInfoByPhone({
|
|
|
|
|
mobile: formData2.mobile
|
|
|
|
|
})
|
|
|
|
|
if (!vipList.includes(data.user_ship)) {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
return uni.$u.toast('查询失败');
|
|
|
|
|
}
|
|
|
|
|
if (formData.mobile) {
|
|
|
|
|
formData2.mobile = formData.mobile
|
|
|
|
|
}
|
2024-07-01 18:08:14 +08:00
|
|
|
|
uni.hideLoading()
|
2024-07-10 16:03:34 +08:00
|
|
|
|
return getFormData2(data)
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
uni.hideLoading()
|
2024-07-13 18:00:01 +08:00
|
|
|
|
uni.$u.toast(error.msg ?? '查询失败');
|
2024-07-06 16:20:28 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-28 19:53:27 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
const resetFormData = () => {
|
|
|
|
|
for (let key in formData) {
|
|
|
|
|
(key != 'price') && (formData[key] = '')
|
|
|
|
|
}
|
|
|
|
|
for (let key in formData2) {
|
|
|
|
|
formData2[key] = ''
|
2024-06-28 19:53:27 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
tabsList.forEach(item => {
|
|
|
|
|
item.name = '请选择'
|
|
|
|
|
})
|
|
|
|
|
formData.province = 510000
|
|
|
|
|
formData2.province = 510000
|
|
|
|
|
cutDown.value = 0
|
|
|
|
|
currentAddressIndex.value = 0
|
2024-06-17 08:38:39 +08:00
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const conformRole = (e) => {
|
|
|
|
|
formData.label_name = e.value[0].title
|
|
|
|
|
formData.label_id = e.value[0].id
|
|
|
|
|
showPop1.value = false
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
// 地址选择
|
|
|
|
|
const showPop = ref(false)
|
|
|
|
|
const currentAddressIndex = ref(0)
|
|
|
|
|
const currentAddressList = () => {
|
|
|
|
|
if (!formData.city) return [0, 'city'];
|
|
|
|
|
else if (formData.area) return [1, 'area'];
|
|
|
|
|
else if (formData.street) return [2, 'street'];
|
|
|
|
|
else if (formData.village) return [3, 'village'];
|
|
|
|
|
else if (formData.brigade) return [4, 'brigade'];
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
const addressTbasChange = (e) => {
|
|
|
|
|
currentAddressIndex.value = e.index
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
const addressList = reactive({
|
|
|
|
|
city: [],
|
|
|
|
|
area: [],
|
|
|
|
|
street: [],
|
|
|
|
|
village: [],
|
|
|
|
|
brigade: []
|
2024-06-17 15:29:52 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const addressLiClick = async (i, item) => {
|
|
|
|
|
if (i == 0) {
|
|
|
|
|
formData.city = item.city_code
|
|
|
|
|
tabsList[0].name = item.city_name
|
|
|
|
|
let res = await areaListApi({
|
|
|
|
|
city_code: formData.city
|
|
|
|
|
})
|
|
|
|
|
addressList.area = res.data
|
|
|
|
|
}
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
formData.area = item.area_code
|
|
|
|
|
tabsList[1].name = item.area_name
|
|
|
|
|
let res = await streetListApi({
|
|
|
|
|
area_code: formData.area
|
|
|
|
|
})
|
|
|
|
|
addressList.street = res.data
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (i == 2) {
|
|
|
|
|
formData.street = item.street_code
|
|
|
|
|
tabsList[2].name = item.street_name
|
|
|
|
|
let res = await villageListApi({
|
|
|
|
|
street_code: formData.street
|
|
|
|
|
})
|
|
|
|
|
addressList.village = res.data
|
|
|
|
|
}
|
|
|
|
|
if (i == 3) {
|
|
|
|
|
formData.village = item.village_code
|
|
|
|
|
tabsList[3].name = item.village_name
|
|
|
|
|
let res = await brigadeListApi({
|
|
|
|
|
village_code: formData.village
|
|
|
|
|
})
|
|
|
|
|
addressList.brigade = res.data
|
|
|
|
|
}
|
|
|
|
|
if (i == 4) {
|
|
|
|
|
formData.brigade = item.id
|
|
|
|
|
tabsList[4].name = item.brigade_name
|
|
|
|
|
|
|
|
|
|
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name +
|
|
|
|
|
tabsList[4].name
|
|
|
|
|
return showPop.value = false
|
|
|
|
|
}
|
|
|
|
|
formData.address = tabsList[0].name + tabsList[1].name + tabsList[2].name + tabsList[3].name + tabsList[4]
|
|
|
|
|
.name
|
|
|
|
|
return currentAddressIndex.value++
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const getCityList = async () => {
|
|
|
|
|
let res = await cityListApi({
|
|
|
|
|
province_code: formData.province
|
2024-06-27 10:34:22 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
addressList.city = res.data
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const tabsList = reactive(
|
|
|
|
|
[{
|
|
|
|
|
name: "请选择"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '请选择',
|
|
|
|
|
disabled: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '请选择',
|
|
|
|
|
disabled: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '请选择',
|
|
|
|
|
disabled: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '请选择',
|
|
|
|
|
disabled: false
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
let timerInvol = null
|
|
|
|
|
let paySuccess;
|
|
|
|
|
// 开起一个scoket监听用户知否支付成功
|
|
|
|
|
const userInfo = useUserStore().userInfo;
|
|
|
|
|
const connection = new Push({
|
|
|
|
|
url: config.WSS_URL, // websocket地址
|
|
|
|
|
app_key: '2ce3ce22329517213caa7dad261f5695',
|
|
|
|
|
});
|
|
|
|
|
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
|
|
|
|
|
user_channel.on('message', function(data) {
|
|
|
|
|
try {
|
|
|
|
|
paySuccess = true
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
clearTimeout(timerInvol);
|
|
|
|
|
paySuccessToTabs2()
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
});
|
|
|
|
|
// 结束
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const navgo = (url) => {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url
|
2024-07-06 16:20:28 +08:00
|
|
|
|
})
|
2024-07-05 18:18:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
// 选择采购包
|
|
|
|
|
const giftIndex = ref(0)
|
|
|
|
|
const rechargeList = ref([])
|
|
|
|
|
const getRechargeList = async () => {
|
|
|
|
|
let res = await getRechargeListApi()
|
|
|
|
|
rechargeList.value = res.data
|
|
|
|
|
formData.price = rechargeList.value[0].money
|
2024-07-05 18:18:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const choseGift = (index) => {
|
|
|
|
|
giftIndex.value = index
|
|
|
|
|
formData.price = rechargeList.value[index].money
|
2024-07-06 16:20:28 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 提交
|
|
|
|
|
const submit = async (type = 1) => {
|
|
|
|
|
if (Role.value == 4) {
|
|
|
|
|
if (!formData.real_name) return uni.$u.toast('请填写真实姓名');
|
|
|
|
|
if (!formData.mobile) return uni.$u.toast('请填写电话号码');
|
|
|
|
|
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
|
|
|
|
if (!formData.address) return uni.$u.toast('请选择地址');
|
|
|
|
|
delete formData.recharge_type
|
|
|
|
|
delete formData.auth_code
|
|
|
|
|
formData.user_ship = 4
|
|
|
|
|
formData.store_id = STORE_INFO.id
|
|
|
|
|
vipRechargeApi(formData).then(res => {
|
|
|
|
|
resetFormData()
|
|
|
|
|
getLists()
|
|
|
|
|
currentTab.value = 1
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (type == 2) {
|
|
|
|
|
if (!formData2.mobile) return uni.$u.toast('请填写电话号码');
|
|
|
|
|
if (Number(formData2.price) < Number(formData2.label_limit)) return uni.$u.toast(
|
|
|
|
|
`${formData2.label_name}角色最低金额不能低于${formData2.label_limit}元`);
|
|
|
|
|
formData2.store_id = STORE_INFO.id
|
|
|
|
|
// formData2.recharge_type = 'INDUSTRYMEMBERS'
|
|
|
|
|
// formData2.user_ship = formData2.label_id
|
|
|
|
|
// vipRechargeApi(formData2).then(res => {
|
2024-07-01 18:36:12 +08:00
|
|
|
|
// uni.showLoading({
|
|
|
|
|
// title: '支付中...'
|
|
|
|
|
// });
|
|
|
|
|
// timerInvol = setTimeout(() => {
|
|
|
|
|
// uni.hideLoading();
|
|
|
|
|
// uni.$u.toast('支付超时');
|
|
|
|
|
// console.log("支付超时")
|
|
|
|
|
// }, 10000)
|
|
|
|
|
// })
|
|
|
|
|
// return
|
2024-06-27 10:34:22 +08:00
|
|
|
|
uni.scanCode({
|
2024-07-10 16:03:34 +08:00
|
|
|
|
success: function(res) {
|
2024-06-27 10:34:22 +08:00
|
|
|
|
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '支付中...'
|
|
|
|
|
});
|
2024-07-10 16:03:34 +08:00
|
|
|
|
formData2.auth_code = res.result
|
|
|
|
|
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
|
|
|
|
formData2.user_ship = formData2.label_id
|
|
|
|
|
vipRechargeApi({
|
|
|
|
|
...formData2,
|
|
|
|
|
type: 2
|
|
|
|
|
}).then(res => {
|
2024-07-05 18:18:02 +08:00
|
|
|
|
paySuccess = false;
|
2024-06-27 10:34:22 +08:00
|
|
|
|
timerInvol = setTimeout(() => {
|
|
|
|
|
uni.hideLoading();
|
2024-07-05 18:18:02 +08:00
|
|
|
|
if (!paySuccess) {
|
|
|
|
|
uni.$u.toast('支付超时');
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}, 30000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-07-10 16:03:34 +08:00
|
|
|
|
} else {
|
|
|
|
|
if (!formData.real_name) return uni.$u.toast('请填写真实姓名');
|
|
|
|
|
if (!formData.mobile) return uni.$u.toast('请填写电话号码');
|
|
|
|
|
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
|
|
|
|
if (!formData.address) return uni.$u.toast('请选择地址');
|
|
|
|
|
if (!formData.label_id) return uni.$u.toast('请选择用户身份');
|
|
|
|
|
formData.store_id = STORE_INFO.id
|
|
|
|
|
formData.user_ship = formData.label_id
|
|
|
|
|
formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
|
|
|
if (Role.value == 1) {
|
|
|
|
|
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
|
|
|
// formData.user_ship = formData.label_id
|
|
|
|
|
// vipRechargeApi(formData).then(res => {
|
|
|
|
|
// uni.showLoading({
|
|
|
|
|
// title: '支付中...'
|
|
|
|
|
// });
|
|
|
|
|
// timerInvol = setTimeout(() => {
|
|
|
|
|
// uni.hideLoading();
|
|
|
|
|
// uni.$u.toast('支付超时');
|
|
|
|
|
// console.log("支付超时")
|
|
|
|
|
// }, 10000)
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// formData.user_ship = formData.label_id
|
|
|
|
|
// await isUserShipApi({
|
|
|
|
|
// user_ship: formData.user_ship,
|
|
|
|
|
// village: formData.village,
|
|
|
|
|
// brigade: formData.brigade
|
|
|
|
|
// })
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '支付中...'
|
|
|
|
|
});
|
|
|
|
|
formData.auth_code = res.result
|
|
|
|
|
vipRechargeApi(formData).then(res => {
|
|
|
|
|
paySuccess = false;
|
|
|
|
|
timerInvol = setTimeout(() => {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
if (!paySuccess) {
|
|
|
|
|
uni.$u.toast('支付超时');
|
|
|
|
|
}
|
|
|
|
|
}, 30000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
const rePay = (item) => {
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '等待用户支付'
|
|
|
|
|
});
|
|
|
|
|
reVipRechargeApi({
|
|
|
|
|
id: item.id,
|
|
|
|
|
auth_code: res.result
|
|
|
|
|
}).then(res => {
|
|
|
|
|
timerInvol = setTimeout(() => {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
if (!paySuccess) {
|
|
|
|
|
uni.$u.toast('支付超时');
|
|
|
|
|
}
|
|
|
|
|
}, 30000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const tofixedPrice = (type = 1) => {
|
|
|
|
|
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 支付成功后清除formData并且切换tabs2
|
|
|
|
|
const paySuccessToTabs2 = () => {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: '支付成功',
|
|
|
|
|
duration: 2000,
|
|
|
|
|
success() {
|
|
|
|
|
currentTab.value = 2
|
|
|
|
|
resetFormData()
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
getLists()
|
|
|
|
|
getCount()
|
|
|
|
|
}, 500); // 延迟1秒执行
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 邀请用户数
|
|
|
|
|
let where = {
|
|
|
|
|
page_no: 1,
|
|
|
|
|
page_size: 25,
|
|
|
|
|
loadingOver: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const count = ref(0)
|
|
|
|
|
const getCount = async () => {
|
|
|
|
|
if (Role.value == 4) return;
|
|
|
|
|
let res = await rechargeCountApi({
|
|
|
|
|
store_id: STORE_INFO.id
|
2024-07-06 16:20:28 +08:00
|
|
|
|
})
|
|
|
|
|
count.value = res.data.count
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-06-22 18:52:03 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
// 邀请列表
|
|
|
|
|
const lists = ref([])
|
|
|
|
|
const getLists = async () => {
|
|
|
|
|
where.loadingOver = false
|
|
|
|
|
where.page_no = 1
|
|
|
|
|
where.page_size = 25
|
|
|
|
|
if (Role.value == 1) {
|
|
|
|
|
let res = await rechargeListsApi({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
recharge_type: "INDUSTRYMEMBERS",
|
|
|
|
|
page_no: 1,
|
|
|
|
|
page_size: 25
|
|
|
|
|
})
|
|
|
|
|
lists.value = res.data.lists
|
|
|
|
|
} else {
|
|
|
|
|
let res = await getCreateLists({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
})
|
|
|
|
|
lists.value = res.data.lists
|
|
|
|
|
count.value = res.data.count
|
|
|
|
|
}
|
2024-07-06 16:20:28 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const upadtaStatus = (item) => {
|
|
|
|
|
updataOrderApi({
|
|
|
|
|
order_no: item.order_id,
|
|
|
|
|
recharge: 1
|
|
|
|
|
}).then(res => {
|
|
|
|
|
getCount()
|
|
|
|
|
getLists()
|
2024-06-27 09:11:32 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onLoad(() => {
|
|
|
|
|
getUserShip().then(res => {
|
|
|
|
|
columns.value = [res.data.lists]
|
|
|
|
|
})
|
|
|
|
|
getPhoneOneDay()
|
|
|
|
|
getCityList()
|
|
|
|
|
getRechargeList()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onPullDownRefresh(() => {
|
2024-06-27 10:34:22 +08:00
|
|
|
|
getCount()
|
|
|
|
|
getLists()
|
2024-07-10 16:03:34 +08:00
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
|
}, 1000)
|
2024-06-27 17:39:25 +08:00
|
|
|
|
})
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
onReachBottom(async () => {
|
|
|
|
|
if (where.loadingOver) return;
|
|
|
|
|
where.page_no++;
|
|
|
|
|
if (Role.value == 1) {
|
|
|
|
|
let res = await rechargeListsApi({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
recharge_type: "INDUSTRYMEMBERS",
|
|
|
|
|
...where
|
|
|
|
|
})
|
|
|
|
|
if (res.data.lists.length <= 0) {
|
|
|
|
|
return where.loadingOver = true
|
|
|
|
|
}
|
|
|
|
|
lists.value.push(...res.data.lists)
|
|
|
|
|
} else {
|
|
|
|
|
let res = await getCreateLists({
|
|
|
|
|
store_id: STORE_INFO.id,
|
|
|
|
|
...where
|
|
|
|
|
})
|
|
|
|
|
if (res.data.lists.length <= 0) {
|
|
|
|
|
return where.loadingOver = true
|
|
|
|
|
}
|
|
|
|
|
lists.value.push(...res.data.lists)
|
|
|
|
|
}
|
2024-07-06 16:20:28 +08:00
|
|
|
|
})
|
2024-07-10 16:03:34 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
|
.tabs {
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
width: 100vw;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 30rpx 0;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #444444;
|
|
|
|
|
|
|
|
|
|
.actText {
|
|
|
|
|
color: #20B128;
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.lines {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 70rpx;
|
|
|
|
|
height: 7rpx;
|
|
|
|
|
border-radius: 8rpx;
|
|
|
|
|
background-color: #33B83A;
|
|
|
|
|
bottom: 15rpx;
|
|
|
|
|
transition: 300ms;
|
|
|
|
|
left: calc(25vw - 35rpx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actLine {
|
|
|
|
|
left: calc(75vw - 35rpx);
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-06-17 08:38:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.card {
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
border-radius: 10rpx;
|
2024-06-17 08:38:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.card1 {
|
|
|
|
|
padding: 30rpx;
|
2024-06-17 08:38:39 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.card1-tit {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #444444;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
}
|
2024-06-17 08:38:39 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.store-info {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #20B128;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
}
|
2024-06-17 08:38:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.submit-btn {
|
|
|
|
|
/* height: 200rpx; */
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 50rpx;
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translateX(-50%);
|
2024-06-17 08:38:39 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
.vip-card {
|
|
|
|
|
width: 690rpx;
|
|
|
|
|
height: 270rpx;
|
|
|
|
|
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/4a92b202406162207212332.png');
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
margin: 20rpx auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 0 30rpx;
|
2024-07-06 16:20:28 +08:00
|
|
|
|
color: #444444;
|
2024-07-10 16:03:34 +08:00
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
|
|
.num {
|
|
|
|
|
font-size: 72rpx;
|
|
|
|
|
color: #7B5232;
|
|
|
|
|
|
|
|
|
|
}
|
2024-06-17 08:38:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.table {
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
margin: 0 auto;
|
2024-06-17 15:29:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
|
|
|
|
|
.address-content {
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
height: 60vh;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
|
|
|
|
.address-li {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
color: #777777;
|
|
|
|
|
margin: 30rpx 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.act {
|
|
|
|
|
color: #20B128;
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
}
|
2024-06-17 15:29:52 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.uni-table-th {
|
|
|
|
|
padding: 10rpx 0 !important;
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.uni-table-td {
|
|
|
|
|
padding: 10rpx 0 !important;
|
|
|
|
|
}
|
2024-06-17 18:47:06 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.slot-content {
|
|
|
|
|
/* padding-bottom: 50rpx; */
|
|
|
|
|
}
|
2024-06-27 10:34:22 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.code-btn {
|
2024-06-27 10:34:22 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.btn-text {
|
2024-06-27 10:34:22 +08:00
|
|
|
|
color: #20B128;
|
2024-07-05 18:18:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.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;
|
|
|
|
|
}
|
2024-07-05 18:18:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
.act-gift {
|
|
|
|
|
background-color: #38BE41;
|
2024-07-05 18:18:02 +08:00
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-06 16:20:28 +08:00
|
|
|
|
|
2024-07-10 16:03:34 +08:00
|
|
|
|
}
|
2024-06-17 08:38:39 +08:00
|
|
|
|
</style>
|