add
This commit is contained in:
commit
76daf934b1
|
@ -75,3 +75,7 @@ export const refundReasonListApi = (data) => {
|
||||||
export const applyRefundApi = (data) => {
|
export const applyRefundApi = (data) => {
|
||||||
return request.post('/order/order/apply_refund', data);
|
return request.post('/order/order/apply_refund', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const UserProductStorageLogApi = (data) => {
|
||||||
|
return request.get('/user_product_storage_log/UserProductStorageLog/lists', data);
|
||||||
|
}
|
|
@ -63,14 +63,7 @@
|
||||||
computed,
|
computed,
|
||||||
nextTick,
|
nextTick,
|
||||||
ref,
|
ref,
|
||||||
|
|
||||||
} from "vue"
|
} from "vue"
|
||||||
import {
|
|
||||||
toast
|
|
||||||
} from "../uni_modules/uview-plus";
|
|
||||||
import {
|
|
||||||
onShow
|
|
||||||
} from '@dcloudio/uni-app';
|
|
||||||
|
|
||||||
const foucs1 = ref(null)
|
const foucs1 = ref(null)
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -78,20 +71,17 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
priceKey: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const valChange = () => {
|
const valChange = () => {
|
||||||
uni.vibrateShort();
|
uni.vibrateShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
let priceKey = ref({})
|
|
||||||
if (uni.getStorageSync('PRICE_KEY')) {
|
|
||||||
priceKey.value = JSON.parse(uni.getStorageSync('PRICE_KEY'));
|
|
||||||
} else {
|
|
||||||
priceKey.value = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const datas = ref({
|
const datas = ref({
|
||||||
cart_num: ''
|
cart_num: ''
|
||||||
});
|
});
|
||||||
|
@ -121,7 +111,9 @@
|
||||||
|
|
||||||
const subtotal = computed(() => {
|
const subtotal = computed(() => {
|
||||||
let num = +datas.value.cart_num || 1;
|
let num = +datas.value.cart_num || 1;
|
||||||
let sell = +datas.value[priceKey.value.off_activity == 1 ? priceKey.value.price : priceKey.value.op_price];
|
let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props
|
||||||
|
.priceKey
|
||||||
|
.op_price];
|
||||||
return Number(num * sell * 100 / 100).toFixed(2)
|
return Number(num * sell * 100 / 100).toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<block v-if="lists.length">
|
||||||
<view class="m-card m-good" v-for="(item, index) in lists" :key="index">
|
<view class="m-card m-good" v-for="(item, index) in lists" :key="index">
|
||||||
<view class="shop-check" @click="item.check=!item.check">
|
<view class="shop-check" @click="item.check=!item.check">
|
||||||
<image v-if="!item.check" src="@/static/icon/n-check.png"></image>
|
<image v-if="!item.check" src="@/static/icon/n-check.png"></image>
|
||||||
|
@ -22,6 +23,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
|
||||||
|
</up-empty>
|
||||||
<view style="height: 200rpx;" />
|
<view style="height: 200rpx;" />
|
||||||
|
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
<template>
|
||||||
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||||
|
<up-tabs :list="tabsLst" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758'
|
||||||
|
:current='currentTab' @change="tabsChange"></up-tabs>
|
||||||
|
</up-sticky>
|
||||||
|
<view class="content" v-if="lists.length">
|
||||||
|
<view class="card" v-for="(item,index) in lists" :key="item.id">
|
||||||
|
<view class="head">
|
||||||
|
<view class="">
|
||||||
|
{{item.system_store_name}}
|
||||||
|
</view>
|
||||||
|
<view v-if="currentTab==0" style="text-decoration: underline;text-underline-offset: 5rpx;"
|
||||||
|
@click="hdClick(item)">
|
||||||
|
提货码
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-li" v-if="currentTab==0">
|
||||||
|
<text class="lab">预约时间:</text>{{item.times}}
|
||||||
|
</view>
|
||||||
|
<view class="card-li" v-if="currentTab==1">
|
||||||
|
<text class="lab">提货时间:</text>{{item.update_time}}
|
||||||
|
</view>
|
||||||
|
<view class="card-li" style="display: flex;justify-content: space-between;">
|
||||||
|
<view class="">
|
||||||
|
<text class="lab">商品信息:</text>{{item.store_name}}
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
x{{item.nums}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
|
||||||
|
</up-empty>
|
||||||
|
|
||||||
|
<view class="mask" v-if='showVerifyPop' @click="showVerifyPop=false">
|
||||||
|
<view
|
||||||
|
style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: white;padding: 20rpx;">
|
||||||
|
<up-image :src="orderData.verify_img" width="710rpx" height="105rpx"></up-image>
|
||||||
|
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;margin-top: 20rpx;">
|
||||||
|
提货码 {{orderData.verify_code}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive
|
||||||
|
} from "vue"
|
||||||
|
import {
|
||||||
|
UserProductStorageLogApi
|
||||||
|
} from "@/api/order.js"
|
||||||
|
import useUserStore from "@/store/user";
|
||||||
|
|
||||||
|
const userStore = useUserStore().userInfo;
|
||||||
|
const currentTab = ref(0)
|
||||||
|
const showVerifyPop = ref(false)
|
||||||
|
const orderData = reactive({})
|
||||||
|
const tabsLst = reactive([{
|
||||||
|
name: '已预约'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已提货'
|
||||||
|
},
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const tabsChange = (e) => {
|
||||||
|
currentTab.value = e.index
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const lists = ref([{}])
|
||||||
|
const getLists = async () => {
|
||||||
|
let res = await UserProductStorageLogApi({
|
||||||
|
uid: userStore.id,
|
||||||
|
status: currentTab.value
|
||||||
|
})
|
||||||
|
lists.value = res.data.lists
|
||||||
|
}
|
||||||
|
|
||||||
|
const hdClick = (item) => {
|
||||||
|
orderData.verify_code = item.verify_code
|
||||||
|
orderData.verify_img = item.verify_img
|
||||||
|
showVerifyPop.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.content {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
// padding: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
|
||||||
|
.head {
|
||||||
|
background-color: #50C758;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
color: white;
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-li {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
|
||||||
|
.lab {
|
||||||
|
color: #989898;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, .5);
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 99999 !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<!-- 门店及身份选择 -->
|
||||||
<view class="" v-if="!STORE_INFO.id">
|
<view class="" v-if="!STORE_INFO.id">
|
||||||
<up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
|
<up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
|
||||||
<view class="slot-content">
|
<view class="slot-content">
|
||||||
|
@ -7,7 +8,7 @@
|
||||||
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</up-form>
|
</up-form>
|
||||||
<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"
|
||||||
|
@ -15,10 +16,11 @@
|
||||||
<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>
|
||||||
</up-form>
|
</up-form> -->
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 门店及身份选择结束 -->
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||||
|
@ -27,7 +29,8 @@
|
||||||
<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>
|
||||||
<!-- tabs0 -->
|
|
||||||
|
<!-- 开通行业会员 -->
|
||||||
<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">
|
||||||
|
@ -52,8 +55,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' }"
|
||||||
|
@ -107,7 +110,9 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 开通行业会员结束 -->
|
||||||
|
|
||||||
|
<!-- 追加经营资金 -->
|
||||||
<block v-if="currentTab == 1 && Role == 1">
|
<block v-if="currentTab == 1 && Role == 1">
|
||||||
<view class="card card1">
|
<view class="card card1">
|
||||||
<view class="card1-tit">
|
<view class="card1-tit">
|
||||||
|
@ -126,12 +131,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>
|
||||||
|
@ -179,30 +183,29 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 追加经营资金结束 -->
|
||||||
|
|
||||||
|
<<<<<<< HEAD <!-- tabs2 -->
|
||||||
<!-- tabs2 -->
|
=======
|
||||||
|
<!-- 开通列表-会员 -->
|
||||||
|
>>>>>>> ae7660e239bd4c38b57ca2035f3e2b16b578f714
|
||||||
<block v-if="currentTab == 2 && Role == 1">
|
<block v-if="currentTab == 2 && Role == 1">
|
||||||
<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>位行业会员 </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="table">
|
<view class="table">
|
||||||
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
||||||
<!-- 表头行 -->
|
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<!-- <uni-th width="20" 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>
|
<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>
|
<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-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 style="font-size: 20rpx;" align="center">
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
<view>
|
<view>
|
||||||
{{ item.real_name }}
|
{{ item.real_name }}
|
||||||
|
@ -229,21 +232,20 @@
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 开通列表-会员结束 -->
|
||||||
|
|
||||||
|
<<<<<<< HEAD=======<!-- 开通列表-商户 -->
|
||||||
|
>>>>>>> ae7660e239bd4c38b57ca2035f3e2b16b578f714
|
||||||
<block v-if="currentTab == 1 && Role == 4">
|
<block v-if="currentTab == 1 && Role == 4">
|
||||||
<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>位商户</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="table">
|
<view class="table">
|
||||||
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
<uni-table stripe emptyText="暂无更多数据" width="100%">
|
||||||
<!-- 表头行 -->
|
|
||||||
<uni-tr>
|
<uni-tr>
|
||||||
<!-- <uni-th width="20" 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>
|
<uni-th width="50" align="center">查看号码</uni-th>
|
||||||
<uni-th width="50" align="center">开通时间</uni-th>
|
<uni-th width="50" align="center">开通时间</uni-th>
|
||||||
|
@ -251,21 +253,20 @@
|
||||||
</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 style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.mobile }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.mobile }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center">
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
<view>已开通</view>
|
<view>已开通</view>
|
||||||
|
|
||||||
</uni-td>
|
</uni-td>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
</uni-table>
|
</uni-table>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<!-- 开通列表-商户结束 -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<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;">
|
||||||
|
@ -273,8 +274,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>
|
||||||
|
@ -297,21 +298,22 @@
|
||||||
<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>
|
||||||
</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" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
||||||
|
<!-- 会员号码查看modal -->
|
||||||
<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">
|
||||||
|
@ -320,20 +322,20 @@
|
||||||
</up-modal>
|
</up-modal>
|
||||||
</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,
|
||||||
getRechargeListApi,
|
getRechargeListApi,
|
||||||
isUserShipApi,
|
isUserShipApi,
|
||||||
|
@ -347,60 +349,62 @@
|
||||||
getCreateLists,
|
getCreateLists,
|
||||||
getReportingSms,
|
getReportingSms,
|
||||||
getVipInfoByPhone
|
getVipInfoByPhone
|
||||||
} 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,
|
||||||
onReachBottom
|
onReachBottom
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
config
|
config
|
||||||
} from "@/config/app.js"
|
} from "@/config/app.js"
|
||||||
|
|
||||||
const showModal = ref(false)
|
const currentTab = ref(0)
|
||||||
const showPop1 = ref(false)
|
const showModal = ref(false)
|
||||||
const Role = ref(1)
|
const showPop1 = ref(false)
|
||||||
const popPhone = ref('')
|
const Role = ref(1)
|
||||||
// const range = ref({})
|
const popPhone = ref('')
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
const showModa = ref(true)
|
const showModa = ref(true)
|
||||||
const storePhone = ref('')
|
const tabsLst = reactive([{
|
||||||
const tabsLst = reactive([{
|
|
||||||
name: '开通行业会员'
|
name: '开通行业会员'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '追加经营资金'
|
name: '追加经营资金'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已开通列表'
|
name: '已开通列表'
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const tabsLst2 = reactive([{
|
||||||
const tabsLst2 = reactive([{
|
|
||||||
name: '开通商户'
|
name: '开通商户'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已开通列表'
|
name: '已开通列表'
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const vipList = reactive([1, 2, 3, 4, 5, 6, 7, 8])
|
||||||
|
|
||||||
|
const tabsChange = (e) => {
|
||||||
|
|
||||||
const tabsChange = (e) => {
|
|
||||||
currentTab.value = e.index
|
currentTab.value = e.index
|
||||||
if (e.index == 2) {
|
if (e.index == 2) {
|
||||||
getCount()
|
getCount()
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
// getLists()
|
}
|
||||||
}
|
|
||||||
const tabsChange1 = (e) => {
|
const tabsChange1 = (e) => {
|
||||||
currentTab.value = (e.index)
|
currentTab.value = (e.index)
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirmStore = () => {
|
// 用户选择的门店信息
|
||||||
|
const storePhone = ref('')
|
||||||
|
let STORE_INFO = reactive({
|
||||||
|
id: "",
|
||||||
|
})
|
||||||
|
const confirmStore = () => {
|
||||||
getStoreByPhone({
|
getStoreByPhone({
|
||||||
phone: storePhone.value
|
phone: storePhone.value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
@ -411,15 +415,10 @@
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.$u.toast('未查到店铺信息,请检查手机号码')
|
uni.$u.toast('未查到店铺信息,请检查手机号码')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 用户选择的门店信息
|
|
||||||
let STORE_INFO = reactive({
|
|
||||||
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);
|
||||||
|
@ -428,30 +427,28 @@
|
||||||
time: nextDay,
|
time: nextDay,
|
||||||
phone: storePhone.value
|
phone: storePhone.value
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
const getPhoneOneDay = () => {
|
const getPhoneOneDay = () => {
|
||||||
if (uni.getStorageSync('VIP_PHONE')) {
|
if (!uni.getStorageSync('VIP_PHONE')) return;
|
||||||
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) {
|
||||||
uni.removeStorageSync('VIP_PHONE');
|
uni.removeStorageSync('VIP_PHONE');
|
||||||
} else {
|
} else {
|
||||||
storePhone.value = data.phone
|
storePhone.value = data.phone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// 手机保留一天结束
|
||||||
// 手机保留一天结束
|
|
||||||
|
|
||||||
// 验证码
|
// 验证码
|
||||||
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('')
|
const checkPhone = (phone) => {
|
||||||
const checkPhone = (phone) => {
|
|
||||||
const regex = /^1[3-9]\d{9}$/;
|
const regex = /^1[3-9]\d{9}$/;
|
||||||
return regex.test(phone) ? true : false
|
return regex.test(phone) ? 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
|
||||||
|
@ -465,12 +462,9 @@
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
// 验证码结束
|
// 验证码结束
|
||||||
|
const formData = reactive({
|
||||||
|
|
||||||
const currentTab = ref(0)
|
|
||||||
const formData = reactive({
|
|
||||||
store_id: STORE_INFO.id,
|
store_id: STORE_INFO.id,
|
||||||
mobile: "",
|
mobile: "",
|
||||||
province: 510000,
|
province: 510000,
|
||||||
|
@ -488,25 +482,10 @@
|
||||||
code: '',
|
code: '',
|
||||||
brigade: "",
|
brigade: "",
|
||||||
price: "",
|
price: "",
|
||||||
// store_id: STORE_INFO.id,
|
})
|
||||||
// mobile: "19130550023",
|
|
||||||
// province: 510000,
|
|
||||||
// city: '510500',
|
|
||||||
// area: "510503",
|
|
||||||
// street: "510503102",
|
|
||||||
// village: "510503102201",
|
|
||||||
// real_name: "赵明军",
|
|
||||||
// auth_code: "131197337173621549",
|
|
||||||
// address: "",
|
|
||||||
// label_name: "",
|
|
||||||
// label_id: "4",
|
|
||||||
// user_ship: '1',
|
|
||||||
// price: 0.02,
|
|
||||||
// code: '12'
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
const formData2 = reactive({
|
const formData2 = reactive({
|
||||||
store_id: STORE_INFO.id,
|
store_id: STORE_INFO.id,
|
||||||
mobile: "",
|
mobile: "",
|
||||||
province: 510000,
|
province: 510000,
|
||||||
|
@ -523,10 +502,10 @@
|
||||||
user_ship: '',
|
user_ship: '',
|
||||||
brigade: "",
|
brigade: "",
|
||||||
price: "",
|
price: "",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const getFormData2 = (data) => {
|
const getFormData2 = (data) => {
|
||||||
formData2.city = data.address_info?.city
|
formData2.city = data.address_info?.city
|
||||||
formData2.area = data.address_info?.area
|
formData2.area = data.address_info?.area
|
||||||
formData2.province = data.address_info?.province
|
formData2.province = data.address_info?.province
|
||||||
|
@ -543,10 +522,10 @@
|
||||||
formData2.label_limit = item.limit
|
formData2.label_limit = item.limit
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const phoneChnge = async (type) => {
|
const phoneChnge = async (type) => {
|
||||||
// typewhite 1 行业会员 2 经营资金
|
// typewhite 1 行业会员 2 经营资金
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
if (!checkPhone(formData.mobile)) return
|
if (!checkPhone(formData.mobile)) return
|
||||||
|
@ -557,7 +536,7 @@
|
||||||
mobile: formData.mobile
|
mobile: formData.mobile
|
||||||
})
|
})
|
||||||
formData2.mobile = formData.mobile
|
formData2.mobile = formData.mobile
|
||||||
if (data.user_ship == 4 || data.user_ship == 0) return;
|
if (data.user_ship == 0) return;
|
||||||
if (Role.value == 1) {
|
if (Role.value == 1) {
|
||||||
uni.$u.toast('该用户已是会员请使用追加经营资金进行收款')
|
uni.$u.toast('该用户已是会员请使用追加经营资金进行收款')
|
||||||
currentTab.value = 1
|
currentTab.value = 1
|
||||||
|
@ -566,7 +545,7 @@
|
||||||
return uni.$u.toast('该用户已是会员,无法进行商户报备')
|
return uni.$u.toast('该用户已是会员,无法进行商户报备')
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
} else {
|
} else {
|
||||||
if (formData2.mobile.length == 0) resetFormData();
|
if (formData2.mobile.length == 0) resetFormData();
|
||||||
if (!checkPhone(formData2.mobile)) return
|
if (!checkPhone(formData2.mobile)) return
|
||||||
|
@ -594,10 +573,10 @@
|
||||||
uni.$u.toast('查询失败');
|
uni.$u.toast('查询失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const resetFormData = () => {
|
const resetFormData = () => {
|
||||||
for (let key in formData) {
|
for (let key in formData) {
|
||||||
(key != 'price') && (formData[key] = '')
|
(key != 'price') && (formData[key] = '')
|
||||||
}
|
}
|
||||||
|
@ -611,38 +590,37 @@
|
||||||
formData2.province = 510000
|
formData2.province = 510000
|
||||||
cutDown.value = 0
|
cutDown.value = 0
|
||||||
currentAddressIndex.value = 0
|
currentAddressIndex.value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
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
|
||||||
|
@ -687,14 +665,14 @@
|
||||||
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
|
||||||
}
|
}
|
||||||
const tabsList = reactive(
|
const tabsList = reactive(
|
||||||
[{
|
[{
|
||||||
name: "请选择"
|
name: "请选择"
|
||||||
},
|
},
|
||||||
|
@ -716,48 +694,48 @@
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let timerInvol = null
|
let timerInvol = null
|
||||||
let paySuccess;
|
let paySuccess;
|
||||||
// 开起一个scoket监听用户知否支付成功
|
// 开起一个scoket监听用户知否支付成功
|
||||||
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',
|
||||||
});
|
});
|
||||||
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 {
|
||||||
paySuccess = true
|
paySuccess = true
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
clearTimeout(timerInvol);
|
clearTimeout(timerInvol);
|
||||||
paySuccessToTabs2()
|
paySuccessToTabs2()
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
});
|
});
|
||||||
// 结束
|
// 结束
|
||||||
|
|
||||||
const navgo = (url) => {
|
const navgo = (url) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择采购包
|
// 选择采购包
|
||||||
const giftIndex = ref(0)
|
const giftIndex = ref(0)
|
||||||
const rechargeList = ref([])
|
const rechargeList = ref([])
|
||||||
const getRechargeList = async () => {
|
const getRechargeList = async () => {
|
||||||
let res = await getRechargeListApi()
|
let res = await getRechargeListApi()
|
||||||
rechargeList.value = res.data
|
rechargeList.value = res.data
|
||||||
formData.price = rechargeList.value[0].money
|
formData.price = rechargeList.value[0].money
|
||||||
}
|
}
|
||||||
|
|
||||||
const choseGift = (index) => {
|
const choseGift = (index) => {
|
||||||
giftIndex.value = index
|
giftIndex.value = index
|
||||||
formData.price = rechargeList.value[index].money
|
formData.price = rechargeList.value[index].money
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async (type = 1) => {
|
const submit = async (type = 1) => {
|
||||||
if (Role.value == 4) {
|
if (Role.value == 4) {
|
||||||
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('请填写电话号码');
|
||||||
|
@ -793,7 +771,7 @@
|
||||||
// })
|
// })
|
||||||
// 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: '支付中...'
|
||||||
|
@ -845,7 +823,7 @@
|
||||||
// brigade: formData.brigade
|
// 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('二维码未扫描完整');
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '支付中...'
|
title: '支付中...'
|
||||||
|
@ -864,11 +842,11 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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: '等待用户支付'
|
||||||
|
@ -886,14 +864,14 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const tofixedPrice = (type = 1) => {
|
const tofixedPrice = (type = 1) => {
|
||||||
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 支付成功后清除formData并且切换tabs2
|
// 支付成功后清除formData并且切换tabs2
|
||||||
const paySuccessToTabs2 = () => {
|
const paySuccessToTabs2 = () => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
|
@ -907,27 +885,27 @@
|
||||||
}, 500); // 延迟1秒执行
|
}, 500); // 延迟1秒执行
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 邀请用户数
|
// 邀请用户数
|
||||||
let where = {
|
let where = {
|
||||||
page_no: 1,
|
page_no: 1,
|
||||||
page_size: 25,
|
page_size: 25,
|
||||||
loadingOver: false
|
loadingOver: false
|
||||||
}
|
}
|
||||||
|
|
||||||
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 () => {
|
||||||
where.loadingOver = false
|
where.loadingOver = false
|
||||||
where.page_no = 1
|
where.page_no = 1
|
||||||
where.page_size = 25
|
where.page_size = 25
|
||||||
|
@ -947,10 +925,10 @@
|
||||||
count.value = res.data.count
|
count.value = res.data.count
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const upadtaStatus = (item) => {
|
const upadtaStatus = (item) => {
|
||||||
updataOrderApi({
|
updataOrderApi({
|
||||||
order_no: item.order_id,
|
order_no: item.order_id,
|
||||||
recharge: 1
|
recharge: 1
|
||||||
|
@ -959,27 +937,27 @@
|
||||||
getLists()
|
getLists()
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getUserShip().then(res => {
|
getUserShip().then(res => {
|
||||||
columns.value = [res.data.lists]
|
columns.value = [res.data.lists]
|
||||||
})
|
})
|
||||||
getPhoneOneDay()
|
getPhoneOneDay()
|
||||||
getCityList()
|
getCityList()
|
||||||
getRechargeList()
|
getRechargeList()
|
||||||
})
|
})
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
getCount()
|
getCount()
|
||||||
getLists()
|
getLists()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
onReachBottom(async () => {
|
onReachBottom(async () => {
|
||||||
if (where.loadingOver) return;
|
if (where.loadingOver) return;
|
||||||
where.page_no++;
|
where.page_no++;
|
||||||
if (Role.value == 1) {
|
if (Role.value == 1) {
|
||||||
|
@ -1002,11 +980,11 @@
|
||||||
}
|
}
|
||||||
lists.value.push(...res.data.lists)
|
lists.value.push(...res.data.lists)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</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;
|
||||||
|
@ -1036,17 +1014,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: 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
.card1-tit {
|
.card1-tit {
|
||||||
|
@ -1062,9 +1040,9 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
/* height: 200rpx; */
|
/* height: 200rpx; */
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 50rpx;
|
bottom: 50rpx;
|
||||||
|
@ -1072,10 +1050,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');
|
||||||
|
@ -1094,17 +1072,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: 60vh;
|
height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -1121,30 +1099,30 @@
|
||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
color: #2F6BF2;
|
color: #2F6BF2;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -1153,9 +1131,9 @@
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-underline-offset: 10rpx;
|
text-underline-offset: 10rpx;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link::after {
|
.link::after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 12rpx;
|
width: 12rpx;
|
||||||
height: 12rpx;
|
height: 12rpx;
|
||||||
|
@ -1165,9 +1143,9 @@
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gift-pack {
|
.gift-pack {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -1202,5 +1180,5 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -245,10 +245,17 @@
|
||||||
{
|
{
|
||||||
"path": "asset/index",
|
"path": "asset/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "会员资产",
|
"navigationBarTitleText": "用户资产",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "asset/lists",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "预约记录",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "Gifts/index",
|
"path": "Gifts/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -168,15 +168,15 @@
|
||||||
<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 }}
|
||||||
</view>
|
</view>
|
||||||
<view class="tag">
|
<view class="tag" v-if="item.tag">
|
||||||
<view class="icon" />
|
<view class="icon" />
|
||||||
赠10%品牌礼品券
|
{{item.tag}}
|
||||||
</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>
|
||||||
|
@ -231,7 +231,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<goodPopup ref="goodRef" :show="showGoodPopup" @close="showGoodPopup = false" @change="changeGood" />
|
<goodPopup ref="goodRef" :priceKey='priceKey' :show="showGoodPopup" @close="showGoodPopup = false"
|
||||||
|
@change="changeGood" />
|
||||||
|
|
||||||
<u-overlay :show="showOverlay" @click="showOverlay = false">
|
<u-overlay :show="showOverlay" @click="showOverlay = false">
|
||||||
<view class="warp">
|
<view class="warp">
|
||||||
|
@ -293,7 +294,7 @@
|
||||||
} 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 vipList = reactive([1, 2, 3, 4, 5, 6, 7, 8])
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const STORE_INFO = reactive({
|
const STORE_INFO = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon color="#fff"
|
<up-button @click="weixinLogin" color="#20B128" size="large"><up-icon color="#fff"
|
||||||
size="28"></up-icon>手机号快捷登录</up-button>
|
size="28"></up-icon>手机号快捷登录</up-button>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="btn">
|
<view class="btn" v-if="config.ENV !='prod'">
|
||||||
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
||||||
name="account-fill" color="#fff" size="28"></up-icon>真-手机号快捷登录</up-button>
|
name="account-fill" color="#fff" size="28"></up-icon>真-手机号快捷登录</up-button>
|
||||||
</view> -->
|
</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>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view style="flex-grow: 1;overflow-y: auto;">
|
<view style="flex-grow: 1;overflow-y: auto;">
|
||||||
<view class="user-info"
|
<view class="user-info"
|
||||||
:style="{backgroundImage: [0,4].includes(userInfo.user_ship)?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/aace1202407021022357574.png)' }">
|
:style="{backgroundImage: [0].includes(userInfo.user_ship)?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/aace1202407021022357574.png)' }">
|
||||||
<view class="u-card">
|
<view class="u-card">
|
||||||
<view style="display: flex;" @click="updataInfp">
|
<view style="display: flex;" @click="updataInfp">
|
||||||
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<view style="margin:0 20rpx;">
|
<view style="margin:0 20rpx;">
|
||||||
{{userInfo.id}}
|
{{userInfo.id}}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="![0,4].includes(userInfo.user_ship)"
|
<view v-if="![0].includes(userInfo.user_ship)"
|
||||||
style="display: flex;align-items: center;background-color: #F6EECD;padding: 4rpx 10rpx;border-radius: 20rpx;">
|
style="display: flex;align-items: center;background-color: #F6EECD;padding: 4rpx 10rpx;border-radius: 20rpx;">
|
||||||
<view style="margin-right: 10rpx;">
|
<view style="margin-right: 10rpx;">
|
||||||
<up-icon
|
<up-icon
|
||||||
|
@ -116,8 +116,9 @@
|
||||||
|
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<up-cell-group>
|
<up-cell-group>
|
||||||
<!-- <up-cell v-if="userInfo.user_ship==1" title="赠品区" :isLink="true" url="/pageQuota/Gifts/index"></up-cell>
|
<!-- <up-cell v-if="userInfo.user_ship==1" title="赠品区" :isLink="true" url="/pageQuota/Gifts/index"></up-cell> -->
|
||||||
<up-cell title="我的资产" :isLink="true" url="/pageQuota/asset/index"></up-cell> -->
|
<!-- <up-cell title="我的资产" :isLink="true" url="/pageQuota/asset/index"></up-cell>
|
||||||
|
<up-cell title="预约记录" :isLink="true" url="/pageQuota/asset/lists"></up-cell> -->
|
||||||
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
|
||||||
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
|
||||||
</up-cell-group>
|
</up-cell-group>
|
||||||
|
@ -226,7 +227,6 @@
|
||||||
const showPop = ref(false)
|
const showPop = ref(false)
|
||||||
|
|
||||||
const updataInfp = () => {
|
const updataInfp = () => {
|
||||||
console.log(5454)
|
|
||||||
showPop.value = true
|
showPop.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
userInfo.value = res.data;
|
userInfo.value = res.data;
|
||||||
formData.avatar = res.data.avatar
|
formData.avatar = res.data.avatar
|
||||||
formData.nick_name = res.data.nickname
|
formData.nick_name = res.data.nickname
|
||||||
if (![0, 4].includes(res.data.user_ship)) {
|
if (![0].includes(res.data.user_ship)) {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
frontColor: "#000000",
|
frontColor: "#000000",
|
||||||
backgroundColor: "#EAFFE1"
|
backgroundColor: "#EAFFE1"
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<view class="row" v-if="[4,5,6].includes(userInfo.user_ship)" style="color: red;">
|
<view class="row" v-if="[4,5,6].includes(userInfo.user_ship)" style="color: red;">
|
||||||
<view>优惠减免</view>
|
<view>优惠减免</view>
|
||||||
<view>
|
<view>
|
||||||
<text>-¥</text>{{ c_price(orderInfo.activity_price, 0) }}<text>.{{ c_price(orderInfo.activity_price, 1) }}</text>
|
<text>-¥</text>{{ c_price(orderInfo.frozen_money, 0) }}<text>.{{ c_price(orderInfo.frozen_money, 1) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="row" v-if="userInfo.user_ship==1 ">
|
<view class="row" v-if="userInfo.user_ship==1 ">
|
||||||
|
|
Loading…
Reference in New Issue