add
This commit is contained in:
commit
10664005c9
|
@ -7,3 +7,9 @@ export const goodListApi = (data) => {
|
||||||
export const goodClassListApi = (data) => {
|
export const goodClassListApi = (data) => {
|
||||||
return request.get('/goods/goodsclass/lists', data);
|
return request.get('/goods/goodsclass/lists', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const getPush = (data) => {
|
||||||
|
return request.get('/push', data);
|
||||||
|
}
|
|
@ -150,3 +150,7 @@ export const getReportingSms = (data) => {
|
||||||
export const uploadImg = (data) => {
|
export const uploadImg = (data) => {
|
||||||
return request.post('/Upload/image', data);
|
return request.post('/Upload/image', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getVipInfoByPhone = (data) => {
|
||||||
|
return request.get('/user/user/other_user_info', data);
|
||||||
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li-top" style="margin-bottom: 0;">
|
<view class="li-top" style="margin-bottom: 0;">
|
||||||
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
|
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
|
||||||
<text style="font-size: 24rpx;color: grey;">余额 {{item.before_balance}}</text>
|
<text style="font-size: 24rpx;color: grey;">余额 {{item.balance}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
<view class="li" v-for="(item,index) in lists" :key="index">
|
<view class="li" v-for="(item,index) in lists" :key="index">
|
||||||
<view class="li-top">
|
<view class="li-top">
|
||||||
<text>{{item.title}}</text>
|
<text>{{item.title}}</text>
|
||||||
<text style="font-weight: bold;" :style="{color:!item.financial_pm?'#50C758':'red'
|
<text style="font-weight: bold;" :style="{color:item.financial_pm?'#50C758':'red'
|
||||||
}">{{ !item.financial_pm?'+':'-' }}{{item.number}}</text>
|
}">{{ item.financial_pm?'+':'-' }}{{item.number}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li-top" style="margin-bottom: 0;">
|
<view class="li-top" style="margin-bottom: 0;">
|
||||||
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
|
<text style="font-size: 24rpx;color: grey;">{{item.create_time}}</text>
|
||||||
|
|
|
@ -6,26 +6,28 @@
|
||||||
<up-form-item label="手机号" borderBottom>
|
<up-form-item label="手机号" borderBottom>
|
||||||
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<!-- <up-form-item label="角色" borderBottom>
|
|
||||||
<uni-data-select v-model="Role" :localdata="range" :clear='false'></uni-data-select>
|
|
||||||
</up-form-item> -->
|
|
||||||
</up-form>
|
</up-form>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="tabs">
|
<!-- <view class="tabs">
|
||||||
<text @click="currentTab = 1" :class="{ actText: currentTab == 1 }">开通{{ Role == 1 ? '行业会员' : '商户' }}
|
<text @click="currentTab = 1" :class="{ actText: currentTab == 1 }">开通{{ Role == 1 ? '行业会员' : '商户' }}
|
||||||
</text>
|
</text>
|
||||||
<text @click="currentTab = 2, getCount(), getLists()" :class="{ actText: currentTab == 2 }"> 已开通列表</text>
|
<text @click="currentTab = 2, getCount(), getLists()" :class="{ actText: currentTab == 2 }"> 已开通列表</text>
|
||||||
<view class="lines" :class="{ actLine: currentTab == 2 }" />
|
<view class="lines" :class="{ actLine: currentTab == 2 }" />
|
||||||
</view>
|
</view> -->
|
||||||
<!-- tabs1 -->
|
<up-sticky bgColor="#fff" style="padding: 20rpx;">
|
||||||
<block v-if='currentTab == 1'>
|
<up-tabs :list="tabsLst" :itemStyle="{width:'33vw',paddingBottom:'20rpx'}" lineColor='#50C758'
|
||||||
|
:current='currentTab' @change="tabsChange"></up-tabs>
|
||||||
|
</up-sticky>
|
||||||
|
|
||||||
|
<!-- tabs0 -->
|
||||||
|
<block v-if='currentTab == 0'>
|
||||||
<view class="card card1">
|
<view class="card card1">
|
||||||
<view class="card1-tit">
|
<view class="card1-tit">
|
||||||
{{ Role == 1 ? '行业会员' : '商户' }}开通报备
|
行业会员开通报备
|
||||||
<!-- <up-input v-model='formData.auth_code'> </up-input> -->
|
<!-- <up-input v-model='formData.auth_code'> </up-input> -->
|
||||||
</view>
|
</view>
|
||||||
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
||||||
|
@ -51,7 +53,7 @@
|
||||||
suffixIcon='arrow-down'></up-input>
|
suffixIcon='arrow-down'></up-input>
|
||||||
</view>
|
</view>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="" v-if='Role == 1'>
|
<up-form-item label="">
|
||||||
<view @click="showPop1 = true" style="width: 100%;">
|
<view @click="showPop1 = true" style="width: 100%;">
|
||||||
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
<up-input style="pointer-events: none" v-model="formData.label_name" border="none"
|
||||||
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
prefixIcon="man-add" readonly placeholder="点击选择用户身份" :customStyle="{
|
||||||
|
@ -61,15 +63,6 @@
|
||||||
suffixIcon='arrow-down'></up-input>
|
suffixIcon='arrow-down'></up-input>
|
||||||
</view>
|
</view>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<!-- <up-form-item label="" v-if='Role == 1'>
|
|
||||||
<view style="width: 100%;">
|
|
||||||
<up-input v-model="formData.price" border="none" prefixIcon="rmb-circle" placeholder="请输入金额"
|
|
||||||
:customStyle="{
|
|
||||||
background: '#F3F3F3', padding: '20rpx',
|
|
||||||
'border-radius': '30rpx'
|
|
||||||
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
|
|
||||||
</view>
|
|
||||||
</up-form-item> -->
|
|
||||||
<up-form-item label="">
|
<up-form-item label="">
|
||||||
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
|
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
|
||||||
<view class="">
|
<view class="">
|
||||||
|
@ -88,15 +81,15 @@
|
||||||
报备人:{{ STORE_INFO.name }}
|
报备人:{{ STORE_INFO.name }}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="store-info" v-if="Role==1">
|
<view class="store-info">
|
||||||
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
||||||
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData.price=''" color='#FF6B00'
|
<up-input inputAlign='center' type='digit' placeholder="请输入金额" @focus="formData.price=''"
|
||||||
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
color='#FF6B00' :placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
||||||
v-model="formData.price" @blur='tofixedPrice'></up-input>
|
v-model="formData.price" @blur='tofixedPrice'></up-input>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
||||||
v-if="formData.label_limit&&formData.price<formData.label_limit">
|
v-if="formData.label_limit&&formData.price<formData.label_limit">
|
||||||
{{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元
|
{{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元且最高金额不能超过10000.00元
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -105,14 +98,85 @@
|
||||||
<view class="submit-btn" @click="submit">
|
<view class="submit-btn" @click="submit">
|
||||||
<view
|
<view
|
||||||
style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'>
|
style='width: 710rpx;height: 100rpx;text-align: center;line-height: 100rpx;text-align: center;color: white;background-color: #33B83A;border-radius: 50rpx;font-size:40rpx ;'>
|
||||||
{{ Role == 1 ? '完成并收款' : '完成' }}
|
完成并收款
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
<block v-if="currentTab==1">
|
||||||
|
<view class="card card1">
|
||||||
|
<view class="card1-tit">
|
||||||
|
行业会员追加经营资金
|
||||||
|
<!-- <up-input v-model='formData.auth_code'> </up-input> -->
|
||||||
|
</view>
|
||||||
|
<up-form labelPosition="left" :model="formData2" :borderBottom='false'>
|
||||||
|
<up-form-item label="">
|
||||||
|
<up-input @change="phoneChnge" v-model="formData2.mobile" border="none" prefixIcon="phone"
|
||||||
|
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' }"
|
||||||
|
: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.address" border="none"
|
||||||
|
prefixIcon="map" readonly color='grey' placeholder="系统自动获取" :customStyle="{
|
||||||
|
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;">
|
||||||
|
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price=''" color='#FF6B00'
|
||||||
|
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
||||||
|
v-model="formData2.price" type='digit' @blur='tofixedPrice(2)'></up-input>
|
||||||
|
</view>
|
||||||
|
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
||||||
|
v-if="formData2.label_limit&&formData2.price<formData2.label_limit">
|
||||||
|
<view class="">
|
||||||
|
{{formData2.label_name}}会员最低金额不能低于{{formData2.label_limit}}元
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
最高金额不能超过10000.00元
|
||||||
|
</view>
|
||||||
|
<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>
|
||||||
<!-- tabs2 -->
|
<!-- tabs2 -->
|
||||||
<block v-else>
|
<block v-if="currentTab == 2">
|
||||||
<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>
|
||||||
|
@ -123,25 +187,22 @@
|
||||||
<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="20" align="center">序号</uni-th> -->
|
||||||
<uni-th width="50" align="center" v-if='Role == 1'>行业会员</uni-th>
|
<uni-th width="50" align="center">行业会员</uni-th>
|
||||||
<uni-th width="50" align="center" v-if='Role == 1'>经营资金</uni-th>
|
<uni-th width="50" align="center">经营资金</uni-th>
|
||||||
<uni-th width="50" align="center" v-if='Role == 4'>开通时间</uni-th>
|
<uni-th width="50" align="center">开通时间</uni-th>
|
||||||
<uni-th width="50" align="center" v-if='Role == 4'>商户</uni-th>
|
<uni-th width="50" align="center">角色</uni-th>
|
||||||
<uni-th width="50" align="center" v-if='Role == 1'>角色</uni-th>
|
|
||||||
<uni-th width="50" align="center">状态</uni-th>
|
<uni-th width="50" align="center">状态</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<!-- 表格数据行 -->
|
<!-- 表格数据行 -->
|
||||||
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
|
||||||
<uni-td align="center">{{index+1}}</uni-td>
|
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.real_name }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.real_name }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.price }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.price }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center"
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
|
||||||
v-if='Role == 4'>{{ item.create_time }}</uni-td>
|
<uni-td style="font-size: 20rpx;" align="center">{{ item.label_name }}</uni-td>
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 4'>{{ item.nickname }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center" v-if='Role == 1'>{{ item.label_name }}</uni-td>
|
|
||||||
<uni-td style="font-size: 20rpx;" align="center">
|
<uni-td style="font-size: 20rpx;" align="center">
|
||||||
<view v-if="item.paid == 1 || Role == 4">已开通</view>
|
<view v-if="item.paid == 1 ">已开通</view>
|
||||||
<view v-else style="color:#33B83A ;">
|
<view v-else style="color:#33B83A ;">
|
||||||
<view @click="upadtaStatus(item)">
|
<view @click="upadtaStatus(item)">
|
||||||
未开通,查询
|
未开通,查询
|
||||||
|
@ -229,7 +290,8 @@
|
||||||
getUserLabel,
|
getUserLabel,
|
||||||
getUserShip,
|
getUserShip,
|
||||||
getCreateLists,
|
getCreateLists,
|
||||||
getReportingSms
|
getReportingSms,
|
||||||
|
getVipInfoByPhone
|
||||||
} from "@/api/user.js"
|
} from "@/api/user.js"
|
||||||
import Push from "@/utils/push.js"
|
import Push from "@/utils/push.js"
|
||||||
import {
|
import {
|
||||||
|
@ -247,6 +309,28 @@
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
const showModa = ref(true)
|
const showModa = ref(true)
|
||||||
const storePhone = ref('')
|
const storePhone = ref('')
|
||||||
|
const tabsLst = reactive([{
|
||||||
|
name: '开通行业会员'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '追加经营资金'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '已开通列表'
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
const tabsChange = (e) => {
|
||||||
|
currentTab.value = e.index
|
||||||
|
if (e.index == 2) {
|
||||||
|
getCount()
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
// getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const confirmStore = () => {
|
const confirmStore = () => {
|
||||||
getStoreByPhone({
|
getStoreByPhone({
|
||||||
phone: storePhone.value
|
phone: storePhone.value
|
||||||
|
@ -294,7 +378,7 @@
|
||||||
const code = ref('')
|
const code = ref('')
|
||||||
const checkPhone = (phone) => {
|
const checkPhone = (phone) => {
|
||||||
const regex = /^1[3-9]\d{9}$/;
|
const regex = /^1[3-9]\d{9}$/;
|
||||||
return regex.test(formData.mobile) ? true : false
|
return regex.test(phone) ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCode = async () => {
|
const getCode = async () => {
|
||||||
|
@ -315,7 +399,7 @@
|
||||||
// 验证码结束
|
// 验证码结束
|
||||||
|
|
||||||
|
|
||||||
const currentTab = ref(1)
|
const currentTab = ref(0)
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
store_id: STORE_INFO.id,
|
store_id: STORE_INFO.id,
|
||||||
mobile: "",
|
mobile: "",
|
||||||
|
@ -347,10 +431,65 @@
|
||||||
// label_name: "",
|
// label_name: "",
|
||||||
// label_id: "4",
|
// label_id: "4",
|
||||||
// user_ship: '1',
|
// user_ship: '1',
|
||||||
// code: ''
|
// price: 0.02,
|
||||||
|
// code: '12'
|
||||||
})
|
})
|
||||||
|
|
||||||
const tofixedPrice = () => {
|
|
||||||
|
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: "",
|
||||||
|
})
|
||||||
|
|
||||||
|
const phoneChnge = async () => {
|
||||||
|
if (formData2.mobile.length == 0) resetFormData();
|
||||||
|
if (!checkPhone(formData2.mobile)) return
|
||||||
|
uni.showLoading({
|
||||||
|
title: '查询用户中'
|
||||||
|
})
|
||||||
|
let {
|
||||||
|
data
|
||||||
|
} = await getVipInfoByPhone({
|
||||||
|
mobile: formData2.mobile
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
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.label_id
|
||||||
|
// formData2.label_limit = data.label_id
|
||||||
|
formData2.user_ship = data.user_ship
|
||||||
|
formData2.brigade = data.address_info?.brigade
|
||||||
|
columns.value[0].forEach(item => {
|
||||||
|
if (item.label_id == data.label_id) {
|
||||||
|
formData2.label_name = item.label_name
|
||||||
|
formData2.label_limit = item.limit
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const tofixedPrice = (type = 1) => {
|
||||||
|
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
||||||
formData.price = (+formData.price).toFixed(2)
|
formData.price = (+formData.price).toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,10 +497,16 @@
|
||||||
for (let key in formData) {
|
for (let key in formData) {
|
||||||
formData[key] = ''
|
formData[key] = ''
|
||||||
}
|
}
|
||||||
|
for (let key in formData2) {
|
||||||
|
formData2[key] = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tabsList.forEach(item => {
|
tabsList.forEach(item => {
|
||||||
item.name = '请选择'
|
item.name = '请选择'
|
||||||
})
|
})
|
||||||
formData.province = 510000
|
formData.province = 510000
|
||||||
|
formData2.province = 510000
|
||||||
cutDown.value = 0
|
cutDown.value = 0
|
||||||
currentAddressIndex.value = 0
|
currentAddressIndex.value = 0
|
||||||
}
|
}
|
||||||
|
@ -481,7 +626,10 @@
|
||||||
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 {
|
||||||
|
uni.hideLoading({});
|
||||||
|
console.log(timerInvol)
|
||||||
clearTimeout(timerInvol);
|
clearTimeout(timerInvol);
|
||||||
|
console.log("清除" + timerInvol)
|
||||||
paySuccessToTabs2()
|
paySuccessToTabs2()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
});
|
});
|
||||||
|
@ -489,30 +637,22 @@
|
||||||
|
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async () => {
|
const submit = async (type = 1) => {
|
||||||
if (!formData.real_name) return uni.$u.toast('请填写真实姓名');
|
if (type == 2) {
|
||||||
if (!formData.mobile) return uni.$u.toast('请填写电话号码');
|
if (!formData2.mobile) return uni.$u.toast('请填写电话号码');
|
||||||
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
if (formData2.price < formData2.label_limit) return uni.$u.toast(
|
||||||
if (!formData.address) return uni.$u.toast('请选择地址');
|
`${formData2.label_name}角色最低金额不能低于${formData2.label_limit}元`);
|
||||||
if (!formData.label_id) return uni.$u.toast('请选择用户身份');
|
formData2.store_id = STORE_INFO.id
|
||||||
if (formData.price < formData.label_limit) return uni.$u.toast(
|
|
||||||
`${formData.label_name}角色最低金额不能低于${formData.label_limit}元`);
|
|
||||||
formData.store_id = STORE_INFO.id
|
|
||||||
if (Role.value == 1) {
|
|
||||||
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
||||||
// formData.user_ship = 1
|
|
||||||
// vipRechargeApi(formData).then(res => {})
|
|
||||||
// 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: '支付中...'
|
||||||
});
|
});
|
||||||
formData.auth_code = res.result
|
formData2.auth_code = res.result
|
||||||
formData.recharge_type = 'INDUSTRYMEMBERS'
|
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
formData.user_ship = 1
|
formData2.user_ship = 1
|
||||||
vipRechargeApi(formData).then(res => {
|
vipRechargeApi(formData2).then(res => {
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (currentTab.value == 2) return;
|
if (currentTab.value == 2) return;
|
||||||
|
@ -522,7 +662,52 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} 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('请选择用户身份');
|
||||||
|
if (formData.price < formData.label_limit) return uni.$u.toast(
|
||||||
|
`${formData.label_name}角色最低金额不能低于${formData.label_limit}元`);
|
||||||
|
formData.store_id = STORE_INFO.id
|
||||||
|
if (Role.value == 1) {
|
||||||
|
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
|
// formData.user_ship = 1
|
||||||
|
// vipRechargeApi(formData).then(res => {
|
||||||
|
// uni.showLoading({
|
||||||
|
// title: '支付中...'
|
||||||
|
// });
|
||||||
|
// timerInvol = setTimeout(() => {
|
||||||
|
// uni.hideLoading();
|
||||||
|
// uni.$u.toast('支付超时');
|
||||||
|
// console.log("支付超时")
|
||||||
|
// }, 10000)
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
uni.scanCode({
|
||||||
|
success: function(res) {
|
||||||
|
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
|
||||||
|
uni.showLoading({
|
||||||
|
title: '支付中...'
|
||||||
|
});
|
||||||
|
formData.auth_code = res.result
|
||||||
|
formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
|
formData.user_ship = 1
|
||||||
|
vipRechargeApi(formData).then(res => {
|
||||||
|
timerInvol = setTimeout(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
if (currentTab.value == 2) return;
|
||||||
|
uni.$u.toast('支付超时');
|
||||||
|
}, 30000)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const rePay = (item) => {
|
const rePay = (item) => {
|
||||||
|
@ -538,7 +723,6 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (currentTab.value == 2) return;
|
|
||||||
uni.$u.toast('支付超时');
|
uni.$u.toast('支付超时');
|
||||||
}, 30000)
|
}, 30000)
|
||||||
})
|
})
|
||||||
|
@ -595,8 +779,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCount()
|
|
||||||
getLists()
|
|
||||||
|
|
||||||
const upadtaStatus = (item) => {
|
const upadtaStatus = (item) => {
|
||||||
updataOrderApi({
|
updataOrderApi({
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人中心",
|
"navigationBarTitleText": "个人中心",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarBackgroundColor": "#D3FDCA"
|
"navigationBarBackgroundColor": "#CDFBBC"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/charge/charge_record",
|
"path": "pages/charge/charge_record",
|
||||||
|
|
|
@ -24,9 +24,12 @@
|
||||||
<view class="store-info">
|
<view class="store-info">
|
||||||
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
<view style="display: flex;font-size: 30rpx;font-weight: bold;">
|
||||||
<text v-if="userStore.userInfo.user_ship == 1 || shareInfo.store_id"
|
<text v-if="userStore.userInfo.user_ship == 1 || shareInfo.store_id"
|
||||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
|
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
(shareInfo.real_name || (
|
<text v-if="userStore.userInfo.user_ship == 1">
|
||||||
userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
|
{{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店' }}</text>
|
||||||
|
<text v-else>
|
||||||
|
{{(shareInfo.real_name || (userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }}</text>
|
||||||
|
</text>
|
||||||
<text v-else
|
<text v-else
|
||||||
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
|
style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{
|
||||||
STORE_INFO.store_name }}</text>
|
STORE_INFO.store_name }}</text>
|
||||||
|
|
|
@ -16,13 +16,25 @@
|
||||||
<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">
|
||||||
|
<up-button @click="navgo('/pages/login/test')" color="#20B128" size="large"><up-icon
|
||||||
|
name="account-fill" color="#fff" size="28"></up-icon>手机号快捷登录</up-button>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="btn">
|
||||||
|
<up-button @click="officialCode" color="#20B128" size="large"><up-icon name="weixin-fill" color="#fff"
|
||||||
|
size="28"></up-icon>公众号授权</up-button>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="btn">
|
||||||
|
<up-button color="#ECFFEE" @click="showWeixin=false" size="large"><text
|
||||||
|
style="color: #20B128;">使用短信验证登录</text></up-button>
|
||||||
|
</view> -->
|
||||||
</up-transition>
|
</up-transition>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<up-transition :show="!showWeixin">
|
<up-transition :show="!showWeixin">
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<up-input :customStyle="{height: '100%'}" v-model="loginForm.phone" placeholderClass="place"
|
<up-input :customStyle="{ height: '100%' }" v-model="loginForm.phone" placeholderClass="place"
|
||||||
border="none" placeholder="请输入手机号" type="number">
|
border="none" placeholder="请输入手机号" type="number">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
||||||
|
@ -32,7 +44,7 @@
|
||||||
</up-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<up-input :customStyle="{height: '100%'}" v-model="loginForm.code" :maxlength="4"
|
<up-input :customStyle="{ height: '100%' }" v-model="loginForm.code" :maxlength="4"
|
||||||
placeholderClass="place" border="none" placeholder="请输入验证码" type="number">
|
placeholderClass="place" border="none" placeholder="请输入验证码" type="number">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
<image style="height: 40rpx;width: 40rpx;margin-top: 6rpx;"
|
||||||
|
@ -41,7 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<up-code :seconds="seconds" ref="uCodeRef" @change="codeChange"></up-code>
|
<up-code :seconds="seconds" ref="uCodeRef" @change="codeChange"></up-code>
|
||||||
<view style="color: #20B128;" @click="getCode">{{tips}}</view>
|
<view style="color: #20B128;" @click="getCode">{{ tips }}</view>
|
||||||
</template>
|
</template>
|
||||||
</up-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
|
@ -55,8 +67,8 @@
|
||||||
微信登录
|
微信登录
|
||||||
</view>
|
</view>
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
<image v-if="!isAgree" @click="isAgree=true" src="@/static/icon/n-check.png"></image>
|
<image v-if="!isAgree" @click="isAgree = true" src="@/static/icon/n-check.png"></image>
|
||||||
<image v-else @click="isAgree=false" src="@/static/icon/check.png"></image>
|
<image v-else @click="isAgree = false" src="@/static/icon/check.png"></image>
|
||||||
<view>
|
<view>
|
||||||
我已同意<text>《用户协议》</text>与<text>《隐私政策》</text>
|
我已同意<text>《用户协议》</text>与<text>《隐私政策》</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -69,318 +81,318 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
onBackPress
|
onBackPress
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
import {
|
import {
|
||||||
ref
|
ref
|
||||||
} from "vue"
|
} from "vue"
|
||||||
import {
|
import {
|
||||||
userLoginApi,
|
userLoginApi,
|
||||||
userLoginWeixinApi,
|
userLoginWeixinApi,
|
||||||
getMobileByMnpApi,
|
getMobileByMnpApi,
|
||||||
getStoreInfo
|
getStoreInfo
|
||||||
} from "@/api/user.js";
|
} from "@/api/user.js";
|
||||||
import useUserStore from "@/store/user.js"
|
import useUserStore from "@/store/user.js"
|
||||||
import bindPhone from "@/components/bindPhone.vue"
|
import bindPhone from "@/components/bindPhone.vue"
|
||||||
import modal from "@/components/modal.vue"
|
import modal from "@/components/modal.vue"
|
||||||
import {
|
import {
|
||||||
config
|
config
|
||||||
} from "@/config/app.js"
|
} from "@/config/app.js"
|
||||||
|
|
||||||
|
|
||||||
const showOfficial = ref(false);
|
const showOfficial = ref(false);
|
||||||
const navToIndex = () => {
|
const navToIndex = () => {
|
||||||
if (userStore.userInfo && userStore.token) uni.reLaunch({
|
if (userStore.userInfo && userStore.token) uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
// if (!userStore.userInfo.supplier) uni.reLaunch({
|
// if (!userStore.userInfo.supplier) uni.reLaunch({
|
||||||
// url: '/pages/index/index'
|
// url: '/pages/index/index'
|
||||||
// })
|
// })
|
||||||
// else if (userStore.userInfo.supplier && !userStore.userInfo.supplier.openid) {
|
// else if (userStore.userInfo.supplier && !userStore.userInfo.supplier.openid) {
|
||||||
// return showOfficial.value = true;
|
// return showOfficial.value = true;
|
||||||
// } else {
|
// } else {
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url: '/pageQuota/quotation/index'
|
// url: '/pageQuota/quotation/index'
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 微信公众号绑定
|
// 微信公众号绑定
|
||||||
const officialCode = () => {
|
const officialCode = () => {
|
||||||
console.log("jinfas")
|
console.log("jinfas")
|
||||||
return
|
return
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/code/code?id=${userStore.userInfo.id}`,
|
url: `/pages/code/code?id=${userStore.userInfo.id}`,
|
||||||
success: () => {
|
success: () => {
|
||||||
let user = userStore.userInfo;
|
let user = userStore.userInfo;
|
||||||
user.supplier ? user.supplier.openid = 1 : user.supplier = {};
|
user.supplier ? user.supplier.openid = 1 : user.supplier = {};
|
||||||
userStore.setUserInfo(user);
|
userStore.setUserInfo(user);
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const userStore = useUserStore(); //使用pinia进行状态管理
|
|
||||||
if (userStore.userInfo && userStore.userInfo.mobile) {
|
|
||||||
navToIndex();
|
|
||||||
} else {
|
|
||||||
userStore.setToken('');
|
|
||||||
userStore.setUserInfo({});
|
|
||||||
}
|
|
||||||
|
|
||||||
const showWeixin = ref(true); //是否显示微信登录
|
|
||||||
const isAgree = ref(false); //是否同意协议
|
|
||||||
|
|
||||||
const weixinLogin = () => {
|
|
||||||
if (!isAgree.value) {
|
|
||||||
uni.$u.sleep(1000).then(res => {
|
|
||||||
isAgree.value = true;
|
|
||||||
})
|
|
||||||
return uni.$u.toast('请先阅读并同意协议');
|
|
||||||
}
|
}
|
||||||
uni.showLoading({
|
})
|
||||||
title: '登录中'
|
}
|
||||||
})
|
|
||||||
uni.login({
|
|
||||||
provider: 'weixin',
|
|
||||||
success: (res) => {
|
|
||||||
userLoginWeixinApi({
|
|
||||||
code: res.code
|
|
||||||
}).then(res => {
|
|
||||||
uni.hideLoading();
|
|
||||||
userStore.setToken(res.data.token);
|
|
||||||
getStoreInfo().then(res => {
|
|
||||||
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data))
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!res.data.mobile) { //未绑定手机号
|
const userStore = useUserStore(); //使用pinia进行状态管理
|
||||||
return showBind.value = true;
|
if (userStore.userInfo && userStore.userInfo.mobile) {
|
||||||
} else {
|
navToIndex();
|
||||||
|
} else {
|
||||||
|
userStore.setToken('');
|
||||||
|
userStore.setUserInfo({});
|
||||||
|
}
|
||||||
|
|
||||||
|
const showWeixin = ref(true); //是否显示微信登录
|
||||||
|
const isAgree = ref(false); //是否同意协议
|
||||||
|
|
||||||
|
const weixinLogin = () => {
|
||||||
|
if (!isAgree.value) {
|
||||||
|
uni.$u.sleep(1000).then(res => {
|
||||||
|
isAgree.value = true;
|
||||||
|
})
|
||||||
|
return uni.$u.toast('请先阅读并同意协议');
|
||||||
|
}
|
||||||
|
uni.showLoading({
|
||||||
|
title: '登录中'
|
||||||
|
})
|
||||||
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (res) => {
|
||||||
|
userLoginWeixinApi({
|
||||||
|
code: res.code
|
||||||
|
}).then(res => {
|
||||||
|
uni.hideLoading();
|
||||||
|
userStore.setToken(res.data.token);
|
||||||
|
getStoreInfo().then(res => {
|
||||||
|
uni.setStorageSync("STORE_INFO", JSON.stringify(res.data))
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!res.data.mobile) { //未绑定手机号
|
||||||
|
return showBind.value = true;
|
||||||
|
} else {
|
||||||
|
userStore.setUserInfo(res.data);
|
||||||
|
//再次登录 已有手机号 判断是否员工
|
||||||
|
//身份授权成功 核销人员
|
||||||
|
if (res.data.is_staff == 1) {
|
||||||
userStore.setUserInfo(res.data);
|
userStore.setUserInfo(res.data);
|
||||||
//再次登录 已有手机号 判断是否员工
|
uni.reLaunch({
|
||||||
//身份授权成功 核销人员
|
url: "/multipleShop/verificationOrder/index"
|
||||||
if (res.data.is_staff == 1) {
|
})
|
||||||
userStore.setUserInfo(res.data);
|
} else {
|
||||||
|
// 授权成功 是否是通过分享进来的,如果是缓存有门店信息
|
||||||
|
let storeInfo = uni.getStorageSync('STORE_INFO');
|
||||||
|
if (storeInfo) {
|
||||||
|
storeInfo = JSON.parse(storeInfo);
|
||||||
|
// 直接选择门店
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/multipleShop/verificationOrder/index"
|
url: "/pages/index/index?id=" + storeInfo.id
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 授权成功 是否是通过分享进来的,如果是缓存有门店信息
|
// 直接选择门店
|
||||||
let storeInfo = uni.getStorageSync('STORE_INFO');
|
uni.reLaunch({
|
||||||
if (storeInfo) {
|
url: "/pages/index/index?id=" + storeInfo.id
|
||||||
storeInfo = JSON.parse(storeInfo);
|
})
|
||||||
// 直接选择门店
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pages/index/index?id=" + storeInfo.id
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 直接选择门店
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pages/index/index?id=" + storeInfo.id
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
console.log(err);
|
|
||||||
uni.$u.toast('登录失败');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const showBind = ref(false); //是否显示绑定手机号弹窗
|
|
||||||
const getPhoneNumber = (e) => {
|
|
||||||
if (e.detail?.errMsg == 'getPhoneNumber:ok') {
|
|
||||||
getMobileByMnpApi({
|
|
||||||
code: e.detail.code
|
|
||||||
}).then(res => {
|
|
||||||
//手机号获取成功 可以本地缓存用户信息以及token
|
|
||||||
userStore.setUserInfo(res.data);
|
|
||||||
userStore.setToken(res.data.token);
|
|
||||||
//身份授权成功 核销人员
|
|
||||||
if (res.is_staff == 1) {
|
|
||||||
userStore.setUserInfo(res.data);
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/multipleShop/verificationOrder/index"
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 授权成功 是否是通过分享进来的,如果是缓存有门店信息
|
|
||||||
let storeInfo = uni.getStorageSync('STORE_INFO');
|
|
||||||
if (storeInfo) {
|
|
||||||
storeInfo = JSON.parse(storeInfo);
|
|
||||||
// 直接选择门店
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pages/index/index?id=" + storeInfo.id
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 直接选择门店
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/multipleShop/index/index"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
},
|
||||||
console.log("用户拒绝授权");
|
fail: (err) => {
|
||||||
return uni.$u.toast('您拒绝了授权');
|
console.log(err);
|
||||||
|
uni.$u.toast('登录失败');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const loginForm = ref({
|
|
||||||
phone: '15366662222',
|
|
||||||
code: ''
|
|
||||||
})
|
})
|
||||||
const isPhone = () => { //检验手机号是否正确
|
}
|
||||||
loginForm.value.phone = loginForm.value.phone.replace(/\s*/g, ""); //去除空格
|
|
||||||
return !/^1[3456789]\d{9}$/.test(loginForm.value.phone);
|
const showBind = ref(false); //是否显示绑定手机号弹窗
|
||||||
}
|
const getPhoneNumber = (e) => {
|
||||||
const codeLogin = () => {
|
if (e.detail?.errMsg == 'getPhoneNumber:ok') {
|
||||||
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
|
getMobileByMnpApi({
|
||||||
// 验证码登录
|
code: e.detail.code
|
||||||
if (isPhone()) return uni.$u.toast('请输入正确的手机号码');
|
|
||||||
console.log('登录');
|
|
||||||
userLoginApi({
|
|
||||||
account: '17811111111',
|
|
||||||
password: '1111',
|
|
||||||
terminal: 3,
|
|
||||||
scene: 1
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
//手机号获取成功 可以本地缓存用户信息以及token
|
||||||
|
userStore.setUserInfo(res.data);
|
||||||
|
userStore.setToken(res.data.token);
|
||||||
|
//身份授权成功 核销人员
|
||||||
|
if (res.is_staff == 1) {
|
||||||
|
userStore.setUserInfo(res.data);
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/multipleShop/verificationOrder/index"
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 授权成功 是否是通过分享进来的,如果是缓存有门店信息
|
||||||
|
let storeInfo = uni.getStorageSync('STORE_INFO');
|
||||||
|
if (storeInfo) {
|
||||||
|
storeInfo = JSON.parse(storeInfo);
|
||||||
|
// 直接选择门店
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/index/index?id=" + storeInfo.id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 直接选择门店
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/multipleShop/index/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
console.log("用户拒绝授权");
|
||||||
|
return uni.$u.toast('您拒绝了授权');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const tips = ref('');
|
const loginForm = ref({
|
||||||
const seconds = ref(60);
|
phone: '15366662222',
|
||||||
const uCodeRef = ref(null);
|
code: ''
|
||||||
|
})
|
||||||
|
const isPhone = () => { //检验手机号是否正确
|
||||||
|
loginForm.value.phone = loginForm.value.phone.replace(/\s*/g, ""); //去除空格
|
||||||
|
return !/^1[3456789]\d{9}$/.test(loginForm.value.phone);
|
||||||
|
}
|
||||||
|
const codeLogin = () => {
|
||||||
|
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
|
||||||
|
// 验证码登录
|
||||||
|
if (isPhone()) return uni.$u.toast('请输入正确的手机号码');
|
||||||
|
console.log('登录');
|
||||||
|
userLoginApi({
|
||||||
|
account: '17811111111',
|
||||||
|
password: '1111',
|
||||||
|
terminal: 3,
|
||||||
|
scene: 1
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const codeChange = (text) => {
|
const tips = ref('');
|
||||||
tips.value = text;
|
const seconds = ref(60);
|
||||||
};
|
const uCodeRef = ref(null);
|
||||||
|
|
||||||
const getCode = () => {
|
const codeChange = (text) => {
|
||||||
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
|
tips.value = text;
|
||||||
if (uCodeRef.value.canGetCode) {
|
};
|
||||||
if (isPhone()) return uni.$u.toast('请输入正确的手机号码');
|
|
||||||
// 模拟向后端请求验证码
|
|
||||||
uni.showLoading({
|
|
||||||
title: '正在获取验证码',
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.hideLoading();
|
|
||||||
// 这里此提示会被start()方法中的提示覆盖
|
|
||||||
uni.$u.toast('验证码已发送');
|
|
||||||
// 通知验证码组件内部开始倒计时
|
|
||||||
uCodeRef.value.start();
|
|
||||||
}, 2000);
|
|
||||||
} else {
|
|
||||||
uni.$u.toast('倒计时结束后再发送');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 微信小程序无法拦截原生返回按钮,所以使用自定义导航拦截返回
|
const getCode = () => {
|
||||||
const navBack = () => {
|
if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
|
||||||
if (showWeixin.value == false) {
|
if (uCodeRef.value.canGetCode) {
|
||||||
showWeixin.value = true;
|
if (isPhone()) return uni.$u.toast('请输入正确的手机号码');
|
||||||
return true;
|
// 模拟向后端请求验证码
|
||||||
} else uni.navigateBack();
|
uni.showLoading({
|
||||||
}
|
title: '正在获取验证码',
|
||||||
const navgo = (url) => {
|
});
|
||||||
uni.navigateTo({
|
setTimeout(() => {
|
||||||
url
|
uni.hideLoading();
|
||||||
})
|
// 这里此提示会被start()方法中的提示覆盖
|
||||||
|
uni.$u.toast('验证码已发送');
|
||||||
|
// 通知验证码组件内部开始倒计时
|
||||||
|
uCodeRef.value.start();
|
||||||
|
}, 2000);
|
||||||
|
} else {
|
||||||
|
uni.$u.toast('倒计时结束后再发送');
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 微信小程序无法拦截原生返回按钮,所以使用自定义导航拦截返回
|
||||||
|
const navBack = () => {
|
||||||
|
if (showWeixin.value == false) {
|
||||||
|
showWeixin.value = true;
|
||||||
|
return true;
|
||||||
|
} else uni.navigateBack();
|
||||||
|
}
|
||||||
|
const navgo = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-box {
|
||||||
|
width: 700rpx;
|
||||||
|
height: 80vh;
|
||||||
|
margin: 0 auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 10vh;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
height: 152rpx;
|
||||||
|
width: 152rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-box {
|
.tips {
|
||||||
width: 700rpx;
|
color: #444444;
|
||||||
height: 80vh;
|
font-size: 28rpx;
|
||||||
margin: 0 auto;
|
margin: 30rpx 0;
|
||||||
box-sizing: border-box;
|
}
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
padding-top: 10vh;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.logo {
|
.btn {
|
||||||
height: 152rpx;
|
width: 600rpx;
|
||||||
width: 152rpx;
|
margin-top: 40rpx;
|
||||||
}
|
font-size: 32rpx !important;
|
||||||
|
}
|
||||||
|
|
||||||
.tips {
|
.form {
|
||||||
color: #444444;
|
.input {
|
||||||
font-size: 28rpx;
|
|
||||||
margin: 30rpx 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
width: 600rpx;
|
|
||||||
margin-top: 40rpx;
|
|
||||||
font-size: 32rpx !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form {
|
|
||||||
.input {
|
|
||||||
background-color: #ECFFEE;
|
|
||||||
width: 600rpx;
|
|
||||||
height: 90rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 20rpx;
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
|
|
||||||
.place {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.customStyle {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.wx-login {
|
|
||||||
width: 200rpx;
|
|
||||||
text-align: center;
|
|
||||||
padding: 20rpx;
|
|
||||||
border-radius: 100rpx;
|
|
||||||
background-color: #EFEFEF;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 80rpx;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wx-login:active {
|
|
||||||
background-color: #ECFFEE;
|
background-color: #ECFFEE;
|
||||||
}
|
width: 600rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
.agreement {
|
.place {
|
||||||
position: absolute;
|
color: #333;
|
||||||
bottom: 0rpx;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
color: #444;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
margin-right: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text {
|
.customStyle {
|
||||||
color: #20B128;
|
color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wx-login {
|
||||||
|
width: 200rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-radius: 100rpx;
|
||||||
|
background-color: #EFEFEF;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 80rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wx-login:active {
|
||||||
|
background-color: #ECFFEE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #444;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
text {
|
||||||
|
color: #20B128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
180
pages/my/my.vue
180
pages/my/my.vue
|
@ -20,71 +20,66 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance {
|
|
||||||
position: absolute;
|
|
||||||
top: 160rpx;
|
|
||||||
z-index: 999;
|
|
||||||
left: 80rpx;
|
|
||||||
font-size: 50rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 620rpx;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view style="flex-grow: 1;overflow-y: auto;">
|
||||||
<!-- <up-navbar title="我的" :autoBack="true" bgColor="transparent" :fixed="true">
|
<view class="user-info"
|
||||||
</up-navbar> -->
|
:style="{backgroundImage: userInfo.user_ship!=1?'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp)':'url(https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/a8055202406281609236596.png)' }">
|
||||||
<view class="user-info">
|
|
||||||
<image class="bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e3a7b202404261113002322.webp"
|
|
||||||
mode="widthFix"></image>
|
|
||||||
<view class="u-card">
|
<view class="u-card">
|
||||||
<view style="display: flex;" @click="updataInfp">
|
<view style="display: flex;" @click="updataInfp">
|
||||||
<up-avatar :src="userInfo.avatar" size="56"></up-avatar>
|
<up-image :src="userInfo.avatar" mode="aspectFill" width="112rpx" height="112rpx"
|
||||||
|
shape="circle"></up-image>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="u-phone">{{userInfo.nickname}}</view>
|
<view style="font-size: 32rpx;">{{userInfo.nickname}}</view>
|
||||||
<view class="u-id">ID: {{userInfo.id}}</view>
|
<view class="uid">
|
||||||
|
<text>ID:</text>
|
||||||
|
<view style="margin:0 20rpx;">
|
||||||
|
{{userInfo.id}}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="display: flex;align-items: center;background-color: #F6EECD;padding: 4rpx 10rpx;border-radius: 20rpx;">
|
||||||
|
<view style="margin-right: 10rpx;">
|
||||||
|
<up-icon
|
||||||
|
name="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/e8621202406281618363287.png"></up-icon>
|
||||||
|
</view>
|
||||||
|
{{userInfo.label_name}}会员
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="to-vip-btn" @click="navgo('/pageQuota/vipUser/index')">
|
<view class="to-vip-btn" @click="navgo('/pageQuota/vipUser/index')">
|
||||||
会员报备
|
会员报备
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
||||||
|
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
||||||
|
余额:
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 50rpx;">
|
||||||
|
{{userInfo.now_money||"0.00"}}<text style="font-size: 28rpx;"> (元)</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="balance" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
|
||||||
<view class="" style="font-size: 28rpx;transform: translateY(10rpx);">
|
|
||||||
余额:
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
{{userInfo.now_money||"0.00"}}<text style="font-size: 28rpx;"> (元)</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="rest">
|
<view class="rest">
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=2')">
|
|
||||||
<view class="rest-item-num">{{userInfo.now_money||"0.00"}}</view>
|
|
||||||
<view class="rest-item-txt">余额</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=1')">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=1')">
|
||||||
<view class="rest-item-num">{{userInfo.purchase_funds||'0.00'}}</view>
|
<view class="rest-item-num">{{userInfo.purchase_funds||'0.00'}}</view>
|
||||||
<view class="rest-item-txt">采购款</view>
|
<view class="rest-item-txt">采购款</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rest-item">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=4')">
|
||||||
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
|
<view class="rest-item-num">{{userInfo.return_money||'0.00'}}</view>
|
||||||
<view class="rest-item-txt">返还金</view>
|
<view class="rest-item-txt">返还金</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
||||||
|
|
||||||
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
<!-- <view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')"> -->
|
||||||
<view class="rest-item">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')">
|
||||||
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
|
<view class="rest-item-num">{{userInfo.GetNumber ||"0.00"}}</view>
|
||||||
<view class="rest-item-txt">礼品券</view>
|
<view class="rest-item-txt">礼品券</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rest-item">
|
<view class="rest-item" @click="navgo('/pageQuota/balanceDetail/index?type=3')">
|
||||||
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
|
<view class="rest-item-num">{{userInfo.number ||"0.00"}}</view>
|
||||||
<view class="rest-item-txt">冻结券</view>
|
<view class="rest-item-txt">冻结券</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -141,13 +136,14 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true">
|
<up-popup :show="showPop" @close="showPop=false" @open="showPop=true">
|
||||||
<view class="popContent">
|
<view class="popContent" :style="{paddingBottom:isFoucs?'500rpx':'50rpx'}">
|
||||||
<view style="text-align: center;font-size: 30rpx;font-weight: bold;">
|
<view style="text-align: center;font-size: 30rpx;font-weight: bold;">
|
||||||
修改个人信息
|
修改个人信息
|
||||||
</view>
|
</view>
|
||||||
<up-form labelPosition="left">
|
<up-form labelPosition="left">
|
||||||
<up-form-item label="呢称" prop="userInfo.name" borderBottom ref="item1">
|
<up-form-item label="呢称" prop="userInfo.name" borderBottom ref="item1" @tap="isFoucs=true">
|
||||||
<up-input v-model="formData.nick_name" border="none" placeholder="请输入个人呢称"></up-input>
|
<up-input :adjustPosition="false" @blur="isFoucs=false" v-model="formData.nick_name" border="none"
|
||||||
|
placeholder="请输入个人呢称"></up-input>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
<up-form-item label="头像" prop="userInfo.sex" borderBottom ref="item1">
|
<up-form-item label="头像" prop="userInfo.sex" borderBottom ref="item1">
|
||||||
<up-image :src="formData.avatar" width="80px" height="80px" @click="uploadAvatar"></up-image>
|
<up-image :src="formData.avatar" width="80px" height="80px" @click="uploadAvatar"></up-image>
|
||||||
|
@ -190,7 +186,7 @@
|
||||||
config
|
config
|
||||||
} from "@/config/app.js"
|
} from "@/config/app.js"
|
||||||
|
|
||||||
|
let isFoucs = ref(false);
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = ref({});
|
const userInfo = ref({});
|
||||||
let token = uni.getStorageSync('token') || ''
|
let token = uni.getStorageSync('token') || ''
|
||||||
|
@ -263,6 +259,7 @@
|
||||||
title: '上传中...'
|
title: '上传中...'
|
||||||
});
|
});
|
||||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||||
|
console.log('ewser', config.HTTP_REQUEST_URL)
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: config.HTTP_REQUEST_URL + '/api/Upload/image', //仅为示例,非真实的接口地址
|
url: config.HTTP_REQUEST_URL + '/api/Upload/image', //仅为示例,非真实的接口地址
|
||||||
filePath: tempFilePaths[0],
|
filePath: tempFilePaths[0],
|
||||||
|
@ -297,7 +294,12 @@
|
||||||
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 (res.data.user_ship == 1) {
|
||||||
|
uni.setNavigationBarColor({
|
||||||
|
frontColor: "#000000",
|
||||||
|
backgroundColor: "#F3FCF2"
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
getOrderCount();
|
getOrderCount();
|
||||||
})
|
})
|
||||||
|
@ -312,84 +314,48 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.user-info {
|
.user-info {
|
||||||
overflow: hidden;
|
// background-color: red;
|
||||||
position: relative;
|
width: 100vw;
|
||||||
width: 750rpx;
|
height: 300rpx;
|
||||||
height: 250rpx;
|
background-size: 100% 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
.bg {
|
padding: 70rpx 50rpx 0 50rpx;
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-card {
|
.u-card {
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 50rpx 0 50rpx 50rpx;
|
|
||||||
position: absolute;
|
|
||||||
top: -10rpx;
|
|
||||||
left: 0;
|
|
||||||
z-index: 2;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
|
|
||||||
.to-vip-btn {
|
|
||||||
color: white;
|
|
||||||
padding: 10rpx 20rpx;
|
|
||||||
background-color: #39BE40;
|
|
||||||
border-radius: 30rpx;
|
|
||||||
margin-right: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
// width: 500rpx;
|
|
||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.u-phone {
|
.uid {
|
||||||
font-size: 32rpx;
|
margin-top: 15rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.u-id {
|
|
||||||
font-size: 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-card-level {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
|
|
||||||
.u-level-item {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
font-size: 22rpx;
|
||||||
|
|
||||||
&:not(:nth-last-child(1)) {
|
|
||||||
margin-right: 100rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-level-item-num {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.u-level-item-txt {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #444444;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.to-vip-btn {
|
||||||
|
color: white;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
height: 34rpx;
|
||||||
|
background-color: #39BE40;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.balance {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 35rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,36 @@
|
||||||
<view class="count_down" v-if="datas.paid==0&&countDown">
|
<view class="count_down" v-if="datas.paid==0&&countDown">
|
||||||
还剩<text>{{countDown}}</text>订单自动取消
|
还剩<text>{{countDown}}</text>订单自动取消
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;">
|
<view class="m-card m-address" style="margin-top: 20rpx;" v-if="datas.is_writeoff==1">
|
||||||
|
<view class="address-info"
|
||||||
|
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
||||||
|
@click="callPhone(store_info.phone)">
|
||||||
|
<view class="top" style="align-items: flex-start;">
|
||||||
|
<view style="color: #333;display: flex;align-items: center;flex-shrink: 0;">
|
||||||
|
<text style="margin: 0 10rpx;color:#20B128">核销门店</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view style="color: #333;">
|
||||||
|
{{store_info.name}}
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 24rpx;color: #333;">
|
||||||
|
{{store_info.detailed_address}}
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view v-if="store_info.phone">
|
||||||
|
<text style="margin-right: 10rpx;">{{store_info.name||store_info.mer_real_name}}</text>
|
||||||
|
<text>{{store_info.phone}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view @click.stop="navgo('/multipleShop/index/index')"
|
||||||
|
style="padding: 20rpx;background-color:#20B128;color: white;border-radius: 40rpx;flex-shrink: 0;">
|
||||||
|
所有提货点
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="m-card m-address" style="margin-top: 20rpx;" v-else>
|
||||||
<view class="address-info"
|
<view class="address-info"
|
||||||
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
style='display: flex;justify-content: space-between;width: 690rpx;align-items: center;'
|
||||||
@click="callPhone(shopInfo.phone)">
|
@click="callPhone(shopInfo.phone)">
|
||||||
|
@ -32,7 +61,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
|
||||||
|
<!-- <view class="m-card m-address" style="margin-top: 20rpx;" v-if="addressInfo && addressInfo.address_id">
|
||||||
<view class="address-info">
|
<view class="address-info">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<up-icon name="account"></up-icon>
|
<up-icon name="account"></up-icon>
|
||||||
|
@ -47,8 +77,8 @@
|
||||||
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
|
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
|
||||||
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="m-card m-address" style="margin-top: 20rpx;" v-else>
|
<!-- <view class="m-card m-address" style="margin-top: 20rpx;" v-else>
|
||||||
<view class="address-info">
|
<view class="address-info">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<up-icon name="account"></up-icon>
|
<up-icon name="account"></up-icon>
|
||||||
|
@ -59,7 +89,7 @@
|
||||||
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
|
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
|
||||||
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="m-card m-good" v-for="(item,index) in datas.goods_list" :key="index">
|
<view class="m-card m-good" v-for="(item,index) in datas.goods_list" :key="index">
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<up-image :src="item.image" width="120rpx" height="120rpx"></up-image>
|
<up-image :src="item.image" width="120rpx" height="120rpx"></up-image>
|
||||||
|
@ -231,6 +261,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const store_info = ref({})
|
||||||
const datas = ref({})
|
const datas = ref({})
|
||||||
const getDetails = () => {
|
const getDetails = () => {
|
||||||
orderDetailApi({
|
orderDetailApi({
|
||||||
|
@ -240,6 +271,7 @@
|
||||||
datas.value = res.data;
|
datas.value = res.data;
|
||||||
options.code = datas.value.verify_code; // 生成条形码的值
|
options.code = datas.value.verify_code; // 生成条形码的值
|
||||||
shopInfo.value = res.data.near_store;
|
shopInfo.value = res.data.near_store;
|
||||||
|
store_info.value = res.data.store_info || {};
|
||||||
if (addressList.value.length > 0 && res.data.paid) {
|
if (addressList.value.length > 0 && res.data.paid) {
|
||||||
addressInfo.value = addressList.value.find(item => item.address_id == res.data.address_id);
|
addressInfo.value = addressList.value.find(item => item.address_id == res.data.address_id);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue