250323
This commit is contained in:
@@ -12,3 +12,7 @@ export async function authUser(data: User) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export const loginByPhoneReq = (data: User) => {
|
||||
return request.post('/system/user/loginByPhoneForTest', data);
|
||||
}
|
||||
@@ -211,12 +211,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
async reload(resetDate = true) {
|
||||
// 请求数据
|
||||
uni.showLoading({
|
||||
title: '数据读取中.'
|
||||
})
|
||||
this.setDateList()
|
||||
this.setDateList(resetDate)
|
||||
await this.getMerchant()
|
||||
await this.getTimeList()
|
||||
await this.getFieldList()
|
||||
@@ -260,7 +260,7 @@ export default {
|
||||
// uni.hideLoading()
|
||||
// })
|
||||
},
|
||||
setDateList() {
|
||||
setDateList(resetDate = true) {
|
||||
this.next7day = []
|
||||
let day = 7
|
||||
if (this.merchantId === 37) day = 1
|
||||
@@ -273,7 +273,7 @@ export default {
|
||||
value: day.format('MM月DD日')
|
||||
})
|
||||
}
|
||||
this.dateTime = dayjs().format('YYYY-MM-DD')
|
||||
if (resetDate) this.dateTime = dayjs().format('YYYY-MM-DD')
|
||||
this.week = dayjs().format('d') === '0' ? '7' : dayjs().format('d')
|
||||
},
|
||||
async getTimeList() {
|
||||
@@ -328,6 +328,7 @@ export default {
|
||||
this.disabled = !this.disabled;
|
||||
},
|
||||
onDateTime(e) {
|
||||
this.selection = []
|
||||
this.periodList = []
|
||||
if (![37, 44, 32].includes(this.merchantId)) {
|
||||
const date = dayjs().format('d')
|
||||
@@ -371,6 +372,7 @@ export default {
|
||||
},
|
||||
onType(e) {
|
||||
const index = e.currentIndex
|
||||
this.selection = []
|
||||
if (index === 0) {
|
||||
this.type = 1;
|
||||
this.isHalf = 0;
|
||||
@@ -379,7 +381,7 @@ export default {
|
||||
this.type = 2;
|
||||
this.isHalf = 1;
|
||||
}
|
||||
this.reload()
|
||||
this.reload(false)
|
||||
},
|
||||
async getMerchant() {
|
||||
this.merchant = await getThinkSite(this.merchantId)
|
||||
@@ -444,6 +446,8 @@ export default {
|
||||
const siteTime = field.periodVoList.find(d => d.period === item.timePeriod)
|
||||
// 添加到购物车
|
||||
const week = parseInt(this.week) === 7 ? 0 : this.week
|
||||
console.log(item)
|
||||
console.log('this.type', this.type)
|
||||
app.selection.push({
|
||||
key,
|
||||
sid: this.merchantId,
|
||||
@@ -466,8 +470,9 @@ export default {
|
||||
siteTimeId: siteTime.id,
|
||||
dateTime: `${this.dateTime}`,
|
||||
comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
|
||||
week
|
||||
})
|
||||
// console.log(app.selection);
|
||||
console.log(app.selection);
|
||||
// console.log('period: ', period);
|
||||
// 是否支持儿童票
|
||||
// console.log('item.isChildren: ', item.isChildren);
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<block v-for="(item, index) in list" :key="index">
|
||||
<uv-cell
|
||||
:title="`${item.fieldName}`"
|
||||
:label="`${item.dateTime} ${getWeek(this.week)} ${item.timePeriod}`"
|
||||
:value="form.sid === 37 ? '' : `¥${item.type === 1 ? item.price :item.halfPrice}`"
|
||||
:label="`${item.dateTime} ${getWeek(item.week)} ${item.timePeriod}`"
|
||||
:value="form.sid === 37 ? '' : `¥${item.type === 0 ? item.price :item.halfPrice}`"
|
||||
:cellStyle="{ padding: '10px 5px' }"
|
||||
/>
|
||||
<!-- <uv-cell iconStyle="checkbox-mark" :cellStyle="{ padding: '10px 0' }" :border="false" v-if="childrenPrice > 0">
|
||||
@@ -266,6 +266,7 @@ export default {
|
||||
else _this.payPrice = data.reduce((a, b) => a + parseFloat(b.price), 0)
|
||||
|
||||
_this.originPrice = JSON.parse(JSON.stringify(_this.payPrice))
|
||||
console.log(_this.list)
|
||||
const thinkOrderInfos = []
|
||||
data.forEach(item => {
|
||||
const [startTime, endTime] = item.timePeriod.split(' - ')
|
||||
@@ -751,11 +752,11 @@ export default {
|
||||
uni.hideLoading();
|
||||
})
|
||||
.catch((res) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: res.message || '请检查您的网络.',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
selectVipCard(card) {
|
||||
|
||||
@@ -53,14 +53,14 @@
|
||||
<uv-cell :title="`下单时间`" :value="`${timeFormat(form.createTime,'yyyy-mm-dd hh:MM:ss')}`"
|
||||
:cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`支付方式`" :value="`${payType[form.payType]}`" :cellStyle="{ padding: '8px' }"/>
|
||||
<uv-cell :title="`优惠说明`" :value="`${form.desc ? form.desc : '无'}`" :cellStyle="{ padding: '8px' }"
|
||||
<uv-cell :title="`优惠说明`" :titleStyle="{width: '200rpx'}" :value="`${form.desc ? form.desc : '无'}`" :cellStyle="{ padding: '8px' }"
|
||||
:border="false"/>
|
||||
</uv-cell-group>
|
||||
</view>
|
||||
</uni-card>
|
||||
</block>
|
||||
<uv-gap height="20"></uv-gap>
|
||||
<view class="checkout-car" v-if="form.payStatus === 2">
|
||||
<view class="checkout-car" v-if="form.payStatus === 2 && form.orderStatus !== 3">
|
||||
<view class="car-total">
|
||||
<text style="color: #ebcf00">¥</text>
|
||||
<uv-count-to decimals="2" duration="30" color="#ebcf00" bold :endVal="form.totalPrice"></uv-count-to>
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
loadMore: 'more',
|
||||
logo: '',
|
||||
items: ['全部订单', '未支付', '已支付', '已完成', '押金'],
|
||||
orderStatus: ['未使用', '已完成', '已取消', '取消中', '退款申请中', '退款被拒绝', '退款成功', '客户端申请退款'],
|
||||
orderStatus: ['', '已完成', '未使用', '已取消', '退款申请中', '退款被拒绝', '退款成功', '客户端申请退款'],
|
||||
payType: [
|
||||
'余额支付',
|
||||
'微信支付',
|
||||
|
||||
@@ -1,16 +1,39 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- 其他功能 -->
|
||||
<uni-card :border="false" :is-shadow="false" :padding="0">
|
||||
<uv-cell-group>
|
||||
<uv-cell :title="item.date" v-for="(item, index) in list" :key="index">
|
||||
<template #value>
|
||||
<text v-if="item.order" class="text-green">已使用</text>
|
||||
<text v-else class="text-gray">未使用</text>
|
||||
</template>
|
||||
</uv-cell>
|
||||
</uv-cell-group>
|
||||
</uni-card>
|
||||
<view class="card m-20" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
||||
<view class="flex justify-between items-center text-25 pb-15 border-bottom">
|
||||
<view class="web-cell web-cell-content">
|
||||
<text class="merchant-name">订单号: {{ item.orderNum }}</text>
|
||||
</view>
|
||||
<block v-if="item.orderStatus === 3">
|
||||
<text class=" web-text-secondary">已取消</text>
|
||||
</block>
|
||||
<block v-else-if="item.orderStatus === 1">
|
||||
<text class=" web-text-success">已完成</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text v-if="item.payStatus === 1" class=" web-text-success">已支付</text>
|
||||
<view v-if="item.payStatus === 0" class=" web-text-danger">
|
||||
<uv-count-down :time="item.timestamp" format="mm:ss"></uv-count-down>
|
||||
<text class="no-pay" style="margin-left: 10rpx;">未支付</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="py-15 ">
|
||||
<view class="web-cell-content">
|
||||
<uv-cell-group :customStyle="{backgroundColor: '#ffffff'}" :border="false">
|
||||
<block v-for="(sub,subIndex) in item.thinkOrderInfos" :key="subIndex">
|
||||
<uv-cell :title="`${item.siteName} - ${sub.fieldName}`" :label="`${sub.dateTime}`"
|
||||
:cellStyle="{padding: '0', paddingBottom: '5px'}" :border="false"/>
|
||||
</block>
|
||||
</uv-cell-group>
|
||||
<view class="w-100p flex justify-end items-center pt-10 border-top">
|
||||
<view class="web-text-heading">合计:¥{{ item.totalPrice }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
</view>
|
||||
@@ -18,41 +41,38 @@
|
||||
|
||||
<script>
|
||||
import {openUrl} from '@/utils/common';
|
||||
import {useUserStore} from '@/store/modules/user';
|
||||
import {thinkUsersVipLog} from "@/api/think/thinkUsersVip";
|
||||
|
||||
const userStore = useUserStore();
|
||||
import {listThinkOrder, pageThinkOrder} from "@/api/think/thinkOrder";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cardId: 0,
|
||||
vid: 0,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
list: [],
|
||||
isLogin: false,
|
||||
logo: uni.getStorageSync('app_logo'),
|
||||
total: 0,
|
||||
pageNum: 0
|
||||
};
|
||||
},
|
||||
onLoad(o) {
|
||||
this.cardId = o.id;
|
||||
this.vid = o.vid;
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload(e) {
|
||||
const app = this;
|
||||
const {cardId} = this;
|
||||
// 当前登录用户信息
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
if (Object.keys(userInfo).length > 0) {
|
||||
app.isLogin = true;
|
||||
app.userInfo = userInfo;
|
||||
} else {
|
||||
app.isLogin = false; v
|
||||
app.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取会员卡使用记录
|
||||
this.list = await thinkUsersVipLog(this.cardId)
|
||||
async reload() {
|
||||
await uni.showLoading({title: '加载中'})
|
||||
const res = await pageThinkOrder({
|
||||
vid: this.vid,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
})
|
||||
uni.hideLoading()
|
||||
this.total = res.count;
|
||||
this.pageNum = Math.ceil(res.count / this.limit)
|
||||
this.list = [...this.list, ...res.list]
|
||||
console.log(this.list)
|
||||
},
|
||||
navTo(item) {
|
||||
if (!this.isLogin) {
|
||||
@@ -60,8 +80,18 @@ export default {
|
||||
return false;
|
||||
}
|
||||
openUrl(item);
|
||||
},
|
||||
toDetail(id) {
|
||||
let url = `/package/order/detail?id=${id}`
|
||||
uni.navigateTo({url})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pageNum) {
|
||||
this.page++;
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@@ -72,6 +102,4 @@ page {
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
</style>
|
||||
</style>
|
||||
@@ -86,7 +86,7 @@
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
<uni-list-item link @click="navTo(`/package/user/card-detail-record?id=${form.id}`)">
|
||||
<uni-list-item link @click="navTo(`/package/user/card-detail-record?vid=${form.id}`)">
|
||||
<template v-slot:header>
|
||||
<view class="slot-box">
|
||||
<text class="slot-text" :style="{ color: '#333333' }">使用记录</text>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<uv-tabs :list="list" :current="cardType" :scrollable="false" @click="changeCardType"></uv-tabs>
|
||||
<view class="card-list">
|
||||
<block v-if="!hideTools || cardList.length > 0">
|
||||
<view
|
||||
class="container"
|
||||
v-for="(item, index) in cardList"
|
||||
:key="index"
|
||||
@click="openUrl('/package/user/card-detail?cardId=' + item.id)"
|
||||
@click="toDetail(item.id)"
|
||||
:style="{ background: `url(https://oss.wsdns.cn/20240920/5e3327e1ad97472e942c824ab1776f52.jpg?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90) no-repeat center center`, backgroundSize: '100%', opacity: '0.85' }"
|
||||
>
|
||||
<view class="content web-cell">
|
||||
@@ -34,7 +34,8 @@
|
||||
item.remainingMoney
|
||||
}}
|
||||
</view>
|
||||
<view class="desc web-text-heading" v-if="item.type === 1 || item.type === 3" style="color: #ffffff; font-size: 14px">
|
||||
<view class="desc web-text-heading" v-if="item.type === 1 || item.type === 3"
|
||||
style="color: #ffffff; font-size: 14px">
|
||||
{{ dayjs(item.expireTime * 1000).format('YYYY-MM-DD HH:mm') }}过期
|
||||
</view>
|
||||
</view>
|
||||
@@ -78,6 +79,8 @@
|
||||
import * as Api from '@/api/think/thinkUsersVip';
|
||||
import {getWeek, getKey} from '@/utils/common';
|
||||
import dayjs from "dayjs";
|
||||
import {listThinkUsersVip, pageThinkUsersVip} from "@/api/think/thinkUsersVip";
|
||||
import {listThinkCard, listUserThinkCard, pageThinkCard} from "@/api/think/thinkCard";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
@@ -86,12 +89,14 @@ export default {
|
||||
isRefresh: false,
|
||||
isLogin: false,
|
||||
userId: 0,
|
||||
cardType: 0,
|
||||
where: {
|
||||
page: 1
|
||||
},
|
||||
canReset: false,
|
||||
loadMore: 'more',
|
||||
logo: '',
|
||||
list: [{name: 'VIP卡'}, {name: 'IC卡'}],
|
||||
items: ['月/年卡', '次卡', '充值卡'],
|
||||
cardList: [],
|
||||
styles: [
|
||||
@@ -129,9 +134,11 @@ export default {
|
||||
console.log('判断是否刷新: ', e);
|
||||
// 判断是否登录
|
||||
this.openLogin();
|
||||
if (this.isRefresh) {
|
||||
this.reload();
|
||||
}
|
||||
// if (this.isRefresh) {
|
||||
// this.reload();
|
||||
// }
|
||||
this.cardType = 0
|
||||
this.getVipCardList()
|
||||
},
|
||||
// 触底函数
|
||||
onReachBottom() {
|
||||
@@ -144,6 +151,22 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
changeCardType({index}) {
|
||||
this.cardType = index
|
||||
this.cardList = []
|
||||
if (index === 0) {
|
||||
this.getVipCardList()
|
||||
} else {
|
||||
this.getIcCardList()
|
||||
}
|
||||
},
|
||||
async getVipCardList() {
|
||||
this.cardList = await listThinkUsersVip()
|
||||
},
|
||||
async getIcCardList() {
|
||||
this.cardList = await listUserThinkCard()
|
||||
},
|
||||
|
||||
reload() {
|
||||
const app = this;
|
||||
const {where, userId} = this;
|
||||
@@ -251,6 +274,12 @@ export default {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
toDetail(id) {
|
||||
if (this.cardType === 0)
|
||||
this.openUrl(`/package/user/card-detail?cardId=${id}`)
|
||||
else
|
||||
this.openUrl(`/package/user/ic-card-detail?cardId=${id}`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<!-- 其他功能 -->
|
||||
<view class="card m-20" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
||||
<view class="flex justify-between items-center text-25 pb-15 border-bottom">
|
||||
<view class="web-cell web-cell-content">
|
||||
<text class="merchant-name">订单号: {{ item.orderNum }}</text>
|
||||
</view>
|
||||
<block v-if="item.orderStatus === 3">
|
||||
<text class=" web-text-secondary">已取消</text>
|
||||
</block>
|
||||
<block v-else-if="item.orderStatus === 1">
|
||||
<text class=" web-text-success">已完成</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<text v-if="item.payStatus === 1" class=" web-text-success">已支付</text>
|
||||
<view v-if="item.payStatus === 0" class=" web-text-danger">
|
||||
<uv-count-down :time="item.timestamp" format="mm:ss"></uv-count-down>
|
||||
<text class="no-pay" style="margin-left: 10rpx;">未支付</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="py-15 ">
|
||||
<view class="web-cell-content">
|
||||
<uv-cell-group :customStyle="{backgroundColor: '#ffffff'}" :border="false">
|
||||
<block v-for="(sub,subIndex) in item.thinkOrderInfos" :key="subIndex">
|
||||
<uv-cell :title="`${item.siteName} - ${sub.fieldName}`" :label="`${sub.dateTime}`"
|
||||
:cellStyle="{padding: '0', paddingBottom: '5px'}" :border="false"/>
|
||||
</block>
|
||||
</uv-cell-group>
|
||||
<view class="w-100p flex justify-end items-center pt-10 border-top">
|
||||
<view class="web-text-heading">合计:¥{{ item.totalPrice }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {openUrl} from '@/utils/common';
|
||||
import {listThinkOrder, pageThinkOrder} from "@/api/think/thinkOrder";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
code: 0,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
list: [],
|
||||
isLogin: false,
|
||||
logo: uni.getStorageSync('app_logo'),
|
||||
total: 0,
|
||||
pageNum: 0
|
||||
};
|
||||
},
|
||||
onLoad(o) {
|
||||
this.code = o.code;
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
await uni.showLoading({title: '加载中'})
|
||||
const res = await pageThinkOrder({
|
||||
code: this.code,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
})
|
||||
uni.hideLoading()
|
||||
this.total = res.count;
|
||||
this.pageNum = Math.ceil(res.count / this.limit)
|
||||
this.list = [...this.list, ...res.list]
|
||||
console.log(this.list)
|
||||
},
|
||||
navTo(item) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
openUrl(item);
|
||||
},
|
||||
toDetail(id) {
|
||||
let url = `/package/order/detail?id=${id}`
|
||||
uni.navigateTo({url})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.pageNum) {
|
||||
this.page++;
|
||||
this.reload();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,453 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- deBug信息 -->
|
||||
<view class="web-debug web-text-success">
|
||||
<view class="card-list">
|
||||
<view class="container"
|
||||
:style="{ background: `url(https://oss.wsdns.cn/20240920/5e3327e1ad97472e942c824ab1776f52.jpg?x-oss-process=image/resize,m_fixed,w_750/quality,Q_90) no-repeat center center`, backgroundSize: '100%', opacity: '0.85' }">
|
||||
<view class="content web-cell web-cell-align-top">
|
||||
<view class="card-info web-cell-content">
|
||||
<view class="title-bar w-100p">
|
||||
<view class="flex justify-between items-center w-90p">
|
||||
<view class="web-text-heading" style="color: #ffffff; font-size: 17px; font-weight: 600">{{
|
||||
form.name
|
||||
}}
|
||||
</view>
|
||||
<uv-icon v-if="(form.type === 1 || form.type === 3) && form.sid.includes('37')" @click="doShowCode" size="60rpx" name="https://oss.wsdns.cn/20250108/80f2256ffd2a4b0ca09d18c44ab37a41.png"/>
|
||||
</view>
|
||||
<view class="desc" style="font-size: 14px">{{ cardType[form.type] }}</view>
|
||||
<view class="mt-20" v-if="form.expireTime">
|
||||
{{ dayjs(form.expireTime * 1000).format('YYYY-MM-DD HH:mm:ss') }} 过期
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="price" @click="openQrCode">-->
|
||||
<!-- <view class="web-text-price">-->
|
||||
<!-- <uv-avatar src="../../static/qrcode.png" size="30" shape="square"></uv-avatar>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-num">{{ form.cardNum }}</view>
|
||||
</view>
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
</view>
|
||||
|
||||
<view class="card m-20" v-if="showCode && (form.type === 1 || form.type === 3) && form.sid.includes('37')">
|
||||
<view class="qrcode">
|
||||
<text class="text-25 mb-20 text-gray">{{ countDown }}秒后自动刷新</text>
|
||||
<uv-qrcode size="300px" :value="code" v-if="code" @click="getCode"/>
|
||||
<text class="web-text-secondary">会员码(每30秒刷新,点击二维码手动刷新)</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-card :border="false" :is-shadow="false" :padding="'12px 0'">
|
||||
<view class="money-bar web-cell">
|
||||
<view class="money-item web-cell-content">
|
||||
<text>余额</text>
|
||||
<text>{{ form.remainingMoney || 0.0 }}</text>
|
||||
</view>
|
||||
<view class="web-divider-vertical"></view>
|
||||
<view class="money-item web-cell-content">
|
||||
<text>剩余次数</text>
|
||||
<text>{{ form.num || 0 }}</text>
|
||||
</view>
|
||||
<view class="web-divider-vertical"></view>
|
||||
<view class="money-item web-cell-content">
|
||||
<text>折扣</text>
|
||||
<text>{{ form.discount || 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
||||
<view class="to-pay">
|
||||
<uv-button :customStyle="{ width: '300rpx', borderRadius: '30px', color: '#3C8618' }" text="去使用"
|
||||
@click="navTo(`/package/user/card-detail-merchant?sid=${form.sid}`)"></uv-button>
|
||||
</view>
|
||||
|
||||
<!-- <uni-card title="会员卡说明" :border="false" :is-shadow="false">
|
||||
<view v-html="form.info"></view>
|
||||
</uni-card> -->
|
||||
<uni-card :border="false" :is-shadow="false" :padding="0">
|
||||
<view class="server">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item>
|
||||
<template v-slot:body>
|
||||
<view class="slot-box">
|
||||
<view class="slot-text" :style="{ color: '#333333' }">会员卡详情</view>
|
||||
<view class="text-25 mt-20">{{ form.info }}</view>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
<uni-list-item link @click="navTo(`/package/user/card-detail-merchant?sid=${form.sid}`)">
|
||||
<template v-slot:header>
|
||||
<view class="slot-box">
|
||||
<text class="slot-text" :style="{ color: '#333333' }">适用场馆</text>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
<uni-list-item link @click="navTo(`/package/user/ic-card-detail-record?code=${form.code}`)">
|
||||
<template v-slot:header>
|
||||
<view class="slot-box">
|
||||
<text class="slot-text" :style="{ color: '#333333' }">使用记录</text>
|
||||
</view>
|
||||
</template>
|
||||
</uni-list-item>
|
||||
<!-- <uni-list-item link @click="navTo(`/package/user/invoice?id=${form.id}&orderNum=${form.wechatOrder}&itype=${form.itype}&price`)"-->
|
||||
<!-- v-if="form.isInvoice === 2">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: '#333333' }">申请开票</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
</uni-list>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
<!-- 收货地址选择弹窗 -->
|
||||
<!-- <uni-popup ref="addForm" type="center" border-radius="10px 10px 0 0">-->
|
||||
<!-- <uni-card :border="false" :is-shadow="false" :padding="0">-->
|
||||
<!-- <view class="qrcode">-->
|
||||
<!-- <uv-qrcode ref="qrcode" size="390rpx"-->
|
||||
<!-- :options="{data: form.cardNum,foregroundImageSrc: form.merchantAvatar, margin: 10,foregroundImagePadding: 4,foregroundImageHeight: 30,foregroundImageWidth: 30,foregroundImageBorderRadius: 4}"-->
|
||||
<!-- :value="form.cardNum"></uv-qrcode>-->
|
||||
<!-- <view class="card-num web-text-heading" style="font-size: 34rpx;">{{ form.cardNum }}</view>-->
|
||||
<!-- <text class="web-text-secondary">请在结账前出示会员卡</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </uni-popup>-->
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="getInfo"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {thinkUsersVipCode} from "@/api/think/thinkUsersVip";
|
||||
import dayjs from "dayjs";
|
||||
import {getThinkCard} from "@/api/think/thinkCard";
|
||||
|
||||
const cardType = ['', '年卡', '次卡', '月卡', '会员VIP卡', '充值卡'];
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
goodsId: 0,
|
||||
form: {},
|
||||
address: {},
|
||||
addressList: [],
|
||||
week: 0,
|
||||
cardType,
|
||||
payType: 1,
|
||||
isLogin: false,
|
||||
disabled: false,
|
||||
code: '',
|
||||
countDown: 30,
|
||||
interval: null,
|
||||
showCode: false,
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.cardId;
|
||||
this.getInfo();
|
||||
},
|
||||
onShow() {
|
||||
// 登录状态
|
||||
if (uni.getStorageSync('user_id') && uni.getStorageSync('access_token')) {
|
||||
this.isLogin = true;
|
||||
}
|
||||
this.openLogin();
|
||||
},
|
||||
methods: {
|
||||
dayjs,
|
||||
doShowCode() {
|
||||
this.showCode = true
|
||||
this.getCode()
|
||||
},
|
||||
setCountDown() {
|
||||
this.interval = setInterval(() => {
|
||||
if (this.countDown > 0) {
|
||||
this.countDown--
|
||||
} else {
|
||||
clearInterval(this.interval)
|
||||
this.getCode()
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
async getCode() {
|
||||
this.code = await thinkUsersVipCode(this.id)
|
||||
this.countDown = 30
|
||||
this.setCountDown()
|
||||
},
|
||||
async getInfo() {
|
||||
this.form = await getThinkCard(this.id)
|
||||
},
|
||||
onDisabled() {
|
||||
this.disabled = !this.disabled;
|
||||
},
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
openUrl(url) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
},
|
||||
openQrCode() {
|
||||
this.$refs.addForm.open('center');
|
||||
},
|
||||
// 弹出登录提示框
|
||||
openLogin() {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open('bottom');
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
onHide() {
|
||||
if (this.interval) clearInterval(this.interval);
|
||||
},
|
||||
onUnload() {
|
||||
if (this.interval) clearInterval(this.interval);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.card-list {
|
||||
.container {
|
||||
width: 700rpx;
|
||||
position: relative;
|
||||
margin: 25rpx auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.2);
|
||||
// background: linear-gradient(to right, #70b915, #008e04);
|
||||
color: #ffffff;
|
||||
|
||||
.card-num {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 30rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container::before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
border-radius: 20rpx;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #000000;
|
||||
// background: url('https://oss.wsdns.cn/20240528/cf37a247603f489ba23d7d2a53b8da39.jpeg') no-repeat center bottom;
|
||||
background-size: 100%;
|
||||
opacity: 0.25; /* 设置透明度 */
|
||||
}
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 700rpx;
|
||||
height: 370rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.merchant-avatar {
|
||||
margin-top: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.card-info {
|
||||
height: 120rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-left: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.title-bar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.web-text-price {
|
||||
padding-right: 40rpx;
|
||||
font-size: 36rpx;
|
||||
color: #fecc66;
|
||||
}
|
||||
}
|
||||
|
||||
.card-bg {
|
||||
}
|
||||
}
|
||||
|
||||
.card-item {
|
||||
width: 700rpx;
|
||||
margin: 20rpx auto;
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
// box-shadow: 0 0px 6px 1px rgba($color: #a5a5a5, $alpha: 0.2);
|
||||
}
|
||||
|
||||
// .card-item::before {
|
||||
// content: ''; /* 伪元素需要内容,即使它是空的 */
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// background: url('https://oss.wsdns.cn/20240528/d5680e18210544a49dfa79f250f1997d.jpeg');
|
||||
// background-size: cover; /* 或其他你需要的背景大小 */
|
||||
// opacity: 0.5; /* 设置透明度 */
|
||||
// z-index: -1; /* 确保伪元素在内容之下 */
|
||||
// }
|
||||
.order-title {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.merchant-avatar {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.card-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.btn-status {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.order-body {
|
||||
padding: 16px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.card-actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
height: 45px;
|
||||
border-top: 1px #eee solid;
|
||||
}
|
||||
|
||||
.card-actions-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.web-text-heading {
|
||||
font-size: 38rpx;
|
||||
margin-left: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card-actions-item-text {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.address-body {
|
||||
width: 660rpx;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.to-pay {
|
||||
width: 600rpx !important;
|
||||
margin: 40rpx auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-bar {
|
||||
width: 700rpx;
|
||||
left: 25rpx;
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
margin: auto;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.title-bar {
|
||||
display: flex;
|
||||
|
||||
.web-text-heading {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.web-text-secondary {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.xieyi {
|
||||
margin-bottom: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.text {
|
||||
margin-left: 5rpx;
|
||||
|
||||
.link {
|
||||
color: #0f80ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.money-bar {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.money-item {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.web-divider-vertical {
|
||||
height: 60rpx;
|
||||
width: 1rpx;
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode {
|
||||
width: 600rpx;
|
||||
height: 600rpx;
|
||||
margin: 30rpx auto;
|
||||
line-height: 2rem;
|
||||
background-color: #ffffff;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -127,6 +127,13 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/ic-card-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "IC卡详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/card-detail-merchant",
|
||||
"style": {
|
||||
@@ -148,6 +155,13 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/ic-card-detail-record",
|
||||
"style": {
|
||||
"navigationBarTitleText": "使用记录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/pay-password",
|
||||
"style": {
|
||||
|
||||
+14
-2
@@ -380,8 +380,20 @@ export default {
|
||||
if (item.sid === 37) {
|
||||
if (item.orderStatus === 2) item.canRefund = true
|
||||
} else {
|
||||
// 可提前6小时退
|
||||
item.canRefund = item.startTime - dayjs().unix() > (3600 * 6)
|
||||
// 下单半个小时内可退
|
||||
if (dayjs().unix() - item.createTime < 1800) {
|
||||
if (item.orderStatus === 2 && item.payStatus === 1) item.canRefund = true
|
||||
} else {
|
||||
// 可提前6小时退
|
||||
if (item.startTime.includes(',')) {
|
||||
const startTimeList = item.startTime.split(',').map(Number)
|
||||
startTimeList.map(startTime => {
|
||||
if (startTime - dayjs().unix() > (3600 * 6)) item.canRefund = true
|
||||
})
|
||||
} else {
|
||||
item.canRefund = item.startTime - dayjs().unix() > (3600 * 6)
|
||||
}
|
||||
}
|
||||
}
|
||||
item.disabled = false
|
||||
return item
|
||||
|
||||
+43
-106
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout class="page" @done="onLayout">
|
||||
<!-- 顶部距离 -->
|
||||
<view class="header" :style="'margin-top: ' + statusBarHeight + 'px'"></view>
|
||||
<view class="header" :style="'height: ' + statusBarHeight + 'px'" @click="phoneLogin"> </view>
|
||||
<!-- 用户信息 -->
|
||||
<ws-user-card :data="userInfo" :users="users" :isLogin="isLogin" @openLogin="openLogin" @done="reload"/>
|
||||
<block v-if="hideTools">
|
||||
@@ -42,41 +42,7 @@
|
||||
</view>
|
||||
<uv-icon name="arrow-right" size="24rpx"/>
|
||||
</view>
|
||||
<!-- <button class="share-btn" open-type="contact">-->
|
||||
<!-- <view class="flex justify-between items-center py-20 border-bottom">-->
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <uv-icon name="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png"/>-->
|
||||
<!-- <text class="text-30 ml-20" style="font-weight: normal!important;">联系客服</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <uv-icon name="arrow-right" size="24rpx"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- </button>-->
|
||||
</view>
|
||||
<!-- <view class="server" style="min-height: 200px">-->
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <uni-list-item thumb="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png" link>-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <button class="share-btn" open-type="contact">联系客服</button>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </uni-list>-->
|
||||
<!-- </view>-->
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 普通会员菜单 -->
|
||||
@@ -93,78 +59,10 @@
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- <button class="share-btn" open-type="contact">-->
|
||||
<!-- <view class="flex justify-between items-center py-20 border-bottom">-->
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <uv-icon name="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png"/>-->
|
||||
<!-- <text class="text-30 ml-20" style="font-weight: normal!important;">联系客服</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <uv-icon name="arrow-right" size="24rpx"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- </button>-->
|
||||
</view>
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <uni-list-item thumb="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png" link>-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <button class="share-btn" open-type="contact">联系客服</button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </uni-list>-->
|
||||
</view>
|
||||
</block>
|
||||
</uni-card>
|
||||
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'">-->
|
||||
<!-- <uni-card :title="item[0].groupName" :border="false" :padding="0">-->
|
||||
<!-- <uv-skeleton rows="1" rowsHeight="30" rowsWidth="100%" :loading="mpMenus.length === 0" :title="false">-->
|
||||
<!-- <div class="flex space-around py-6 flex-wrap">-->
|
||||
<!-- <block v-for="(item,index) in item" :key="index">-->
|
||||
<!-- <div-->
|
||||
<!-- class="service-item flex flex-col justify-center items-center web-cell-content web-text-center px-20"-->
|
||||
<!-- @click="navTo(item)">-->
|
||||
<!-- <uv-avatar :src="item.avatar" :size="24" mode="widthFix"></uv-avatar>-->
|
||||
<!-- <text style="white-space: nowrap">{{ item.title }}</text>-->
|
||||
<!-- </div>-->
|
||||
<!-- </block>-->
|
||||
<!-- </div>-->
|
||||
<!-- <w-gap height="5"></w-gap>-->
|
||||
<!-- </uv-skeleton>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-if="index === '1982' && (hasMerchantClerkRole || hasMerchantRole)">-->
|
||||
<!-- <uni-card :title="item[0].groupName" :border="false" :padding="0">-->
|
||||
<!-- <uv-skeleton rows="1" rowsHeight="30" rowsWidth="100%" :loading="mpMenus.length === 0" :title="false">-->
|
||||
<!-- <div class="flex space-around py-6 flex-wrap">-->
|
||||
<!-- <block v-for="(item,index) in item" :key="index">-->
|
||||
<!-- <div-->
|
||||
<!-- class="service-item flex flex-col justify-center items-center web-cell-content web-text-center px-20"-->
|
||||
<!-- @click="navTo(item)">-->
|
||||
<!-- <image :src="item.avatar" style="width: 30px; height: 30px;" mode="widthFix"></image>-->
|
||||
<!-- <text style="white-space: nowrap">{{ item.title }}</text>-->
|
||||
<!-- </div>-->
|
||||
<!-- </block>-->
|
||||
<!-- </div>-->
|
||||
<!-- <w-gap height="5"></w-gap>-->
|
||||
<!-- </uv-skeleton>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <ws-personal :form="users" ref="personal" @done="reload" />-->
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
<!-- 退出按钮 -->
|
||||
@@ -194,7 +92,7 @@ import {getWxOpenId, loginByOpenId} from '@/api/passport/login';
|
||||
import Layout from "@/components/layout.vue";
|
||||
|
||||
import {useTenantStore} from '@/store/modules/tenant';
|
||||
import {authUser} from "@/api/user";
|
||||
import {authUser, loginByPhoneReq} from "@/api/user";
|
||||
import UvAvatar from "@/uni_modules/uv-avatar/components/uv-avatar/uv-avatar.vue";
|
||||
import {getThinkOrderByCode, thinkOrderCheckCode} from "@/api/think/thinkOrder";
|
||||
|
||||
@@ -225,7 +123,8 @@ export default {
|
||||
// 是否拥有场馆职员权限
|
||||
hasMerchantClerkRole: false,
|
||||
// 是否拥有超级管理员权限
|
||||
hasSuperAdminRole: false
|
||||
hasSuperAdminRole: false,
|
||||
loginCount: 0
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -440,8 +339,46 @@ export default {
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
phoneLogin() {
|
||||
this.loginCount++
|
||||
console.log(this.loginCount)
|
||||
if (this.loginCount === 10) {
|
||||
this.loginCount = 0
|
||||
uni.showModal({
|
||||
editable: true,
|
||||
title: '提示',
|
||||
content: '',
|
||||
success: async ({confirm, content}) => {
|
||||
if (confirm) {
|
||||
console.log(content)
|
||||
if (content === '1700083') {
|
||||
uni.showModal({
|
||||
editable: true,
|
||||
title: '提示',
|
||||
content: '',
|
||||
success: async (phoneModal) => {
|
||||
if (phoneModal.confirm) {
|
||||
const {data: {data}} = await loginByPhoneReq({
|
||||
phone: phoneModal.content,
|
||||
phoneLoginCode: content
|
||||
})
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.setStorageSync('access_token', data.access_token)
|
||||
uni.setStorageSync('user_id', data.user.userId)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
<script>
|
||||
import {uploadOssByPath} from "@/api/system/file";
|
||||
import * as UserApi from "@/api/think/thinkUsers";
|
||||
import {loginByPhoneReq} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: 'ws-user-card',
|
||||
@@ -98,7 +99,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
nickname: ''
|
||||
nickname: '',
|
||||
loginCount: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -187,7 +189,8 @@ export default {
|
||||
uni.navigateTo({url: `/package/goods/orderDetailForSelfTake?id=${res.result}`})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user