250323
This commit is contained in:
@@ -12,3 +12,7 @@ export async function authUser(data: User) {
|
|||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
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: {
|
methods: {
|
||||||
async reload() {
|
async reload(resetDate = true) {
|
||||||
// 请求数据
|
// 请求数据
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '数据读取中.'
|
title: '数据读取中.'
|
||||||
})
|
})
|
||||||
this.setDateList()
|
this.setDateList(resetDate)
|
||||||
await this.getMerchant()
|
await this.getMerchant()
|
||||||
await this.getTimeList()
|
await this.getTimeList()
|
||||||
await this.getFieldList()
|
await this.getFieldList()
|
||||||
@@ -260,7 +260,7 @@ export default {
|
|||||||
// uni.hideLoading()
|
// uni.hideLoading()
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
setDateList() {
|
setDateList(resetDate = true) {
|
||||||
this.next7day = []
|
this.next7day = []
|
||||||
let day = 7
|
let day = 7
|
||||||
if (this.merchantId === 37) day = 1
|
if (this.merchantId === 37) day = 1
|
||||||
@@ -273,7 +273,7 @@ export default {
|
|||||||
value: day.format('MM月DD日')
|
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')
|
this.week = dayjs().format('d') === '0' ? '7' : dayjs().format('d')
|
||||||
},
|
},
|
||||||
async getTimeList() {
|
async getTimeList() {
|
||||||
@@ -328,6 +328,7 @@ export default {
|
|||||||
this.disabled = !this.disabled;
|
this.disabled = !this.disabled;
|
||||||
},
|
},
|
||||||
onDateTime(e) {
|
onDateTime(e) {
|
||||||
|
this.selection = []
|
||||||
this.periodList = []
|
this.periodList = []
|
||||||
if (![37, 44, 32].includes(this.merchantId)) {
|
if (![37, 44, 32].includes(this.merchantId)) {
|
||||||
const date = dayjs().format('d')
|
const date = dayjs().format('d')
|
||||||
@@ -371,6 +372,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onType(e) {
|
onType(e) {
|
||||||
const index = e.currentIndex
|
const index = e.currentIndex
|
||||||
|
this.selection = []
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
this.isHalf = 0;
|
this.isHalf = 0;
|
||||||
@@ -379,7 +381,7 @@ export default {
|
|||||||
this.type = 2;
|
this.type = 2;
|
||||||
this.isHalf = 1;
|
this.isHalf = 1;
|
||||||
}
|
}
|
||||||
this.reload()
|
this.reload(false)
|
||||||
},
|
},
|
||||||
async getMerchant() {
|
async getMerchant() {
|
||||||
this.merchant = await getThinkSite(this.merchantId)
|
this.merchant = await getThinkSite(this.merchantId)
|
||||||
@@ -444,6 +446,8 @@ export default {
|
|||||||
const siteTime = field.periodVoList.find(d => d.period === item.timePeriod)
|
const siteTime = field.periodVoList.find(d => d.period === item.timePeriod)
|
||||||
// 添加到购物车
|
// 添加到购物车
|
||||||
const week = parseInt(this.week) === 7 ? 0 : this.week
|
const week = parseInt(this.week) === 7 ? 0 : this.week
|
||||||
|
console.log(item)
|
||||||
|
console.log('this.type', this.type)
|
||||||
app.selection.push({
|
app.selection.push({
|
||||||
key,
|
key,
|
||||||
sid: this.merchantId,
|
sid: this.merchantId,
|
||||||
@@ -466,8 +470,9 @@ export default {
|
|||||||
siteTimeId: siteTime.id,
|
siteTimeId: siteTime.id,
|
||||||
dateTime: `${this.dateTime}`,
|
dateTime: `${this.dateTime}`,
|
||||||
comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
|
comments: `${this.dateTime}(${getWeek(week)})${item.timePeriod}`,
|
||||||
|
week
|
||||||
})
|
})
|
||||||
// console.log(app.selection);
|
console.log(app.selection);
|
||||||
// console.log('period: ', period);
|
// console.log('period: ', period);
|
||||||
// 是否支持儿童票
|
// 是否支持儿童票
|
||||||
// console.log('item.isChildren: ', item.isChildren);
|
// console.log('item.isChildren: ', item.isChildren);
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
<block v-for="(item, index) in list" :key="index">
|
<block v-for="(item, index) in list" :key="index">
|
||||||
<uv-cell
|
<uv-cell
|
||||||
:title="`${item.fieldName}`"
|
:title="`${item.fieldName}`"
|
||||||
:label="`${item.dateTime} ${getWeek(this.week)} ${item.timePeriod}`"
|
:label="`${item.dateTime} ${getWeek(item.week)} ${item.timePeriod}`"
|
||||||
:value="form.sid === 37 ? '' : `¥${item.type === 1 ? item.price :item.halfPrice}`"
|
:value="form.sid === 37 ? '' : `¥${item.type === 0 ? item.price :item.halfPrice}`"
|
||||||
:cellStyle="{ padding: '10px 5px' }"
|
:cellStyle="{ padding: '10px 5px' }"
|
||||||
/>
|
/>
|
||||||
<!-- <uv-cell iconStyle="checkbox-mark" :cellStyle="{ padding: '10px 0' }" :border="false" v-if="childrenPrice > 0">
|
<!-- <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)
|
else _this.payPrice = data.reduce((a, b) => a + parseFloat(b.price), 0)
|
||||||
|
|
||||||
_this.originPrice = JSON.parse(JSON.stringify(_this.payPrice))
|
_this.originPrice = JSON.parse(JSON.stringify(_this.payPrice))
|
||||||
|
console.log(_this.list)
|
||||||
const thinkOrderInfos = []
|
const thinkOrderInfos = []
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
const [startTime, endTime] = item.timePeriod.split(' - ')
|
const [startTime, endTime] = item.timePeriod.split(' - ')
|
||||||
@@ -751,11 +752,11 @@ export default {
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
|
uni.hideLoading();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message || '请检查您的网络.',
|
title: res.message || '请检查您的网络.',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
uni.hideLoading();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectVipCard(card) {
|
selectVipCard(card) {
|
||||||
|
|||||||
@@ -53,14 +53,14 @@
|
|||||||
<uv-cell :title="`下单时间`" :value="`${timeFormat(form.createTime,'yyyy-mm-dd hh:MM:ss')}`"
|
<uv-cell :title="`下单时间`" :value="`${timeFormat(form.createTime,'yyyy-mm-dd hh:MM:ss')}`"
|
||||||
:cellStyle="{ padding: '8px' }"/>
|
:cellStyle="{ padding: '8px' }"/>
|
||||||
<uv-cell :title="`支付方式`" :value="`${payType[form.payType]}`" :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"/>
|
:border="false"/>
|
||||||
</uv-cell-group>
|
</uv-cell-group>
|
||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</block>
|
</block>
|
||||||
<uv-gap height="20"></uv-gap>
|
<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">
|
<view class="car-total">
|
||||||
<text style="color: #ebcf00">¥</text>
|
<text style="color: #ebcf00">¥</text>
|
||||||
<uv-count-to decimals="2" duration="30" color="#ebcf00" bold :endVal="form.totalPrice"></uv-count-to>
|
<uv-count-to decimals="2" duration="30" color="#ebcf00" bold :endVal="form.totalPrice"></uv-count-to>
|
||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
loadMore: 'more',
|
loadMore: 'more',
|
||||||
logo: '',
|
logo: '',
|
||||||
items: ['全部订单', '未支付', '已支付', '已完成', '押金'],
|
items: ['全部订单', '未支付', '已支付', '已完成', '押金'],
|
||||||
orderStatus: ['未使用', '已完成', '已取消', '取消中', '退款申请中', '退款被拒绝', '退款成功', '客户端申请退款'],
|
orderStatus: ['', '已完成', '未使用', '已取消', '退款申请中', '退款被拒绝', '退款成功', '客户端申请退款'],
|
||||||
payType: [
|
payType: [
|
||||||
'余额支付',
|
'余额支付',
|
||||||
'微信支付',
|
'微信支付',
|
||||||
|
|||||||
@@ -1,16 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
<!-- 其他功能 -->
|
<!-- 其他功能 -->
|
||||||
<uni-card :border="false" :is-shadow="false" :padding="0">
|
<view class="card m-20" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
|
||||||
<uv-cell-group>
|
<view class="flex justify-between items-center text-25 pb-15 border-bottom">
|
||||||
<uv-cell :title="item.date" v-for="(item, index) in list" :key="index">
|
<view class="web-cell web-cell-content">
|
||||||
<template #value>
|
<text class="merchant-name">订单号: {{ item.orderNum }}</text>
|
||||||
<text v-if="item.order" class="text-green">已使用</text>
|
</view>
|
||||||
<text v-else class="text-gray">未使用</text>
|
<block v-if="item.orderStatus === 3">
|
||||||
</template>
|
<text class=" web-text-secondary">已取消</text>
|
||||||
</uv-cell>
|
</block>
|
||||||
</uv-cell-group>
|
<block v-else-if="item.orderStatus === 1">
|
||||||
</uni-card>
|
<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"/>
|
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||||
</view>
|
</view>
|
||||||
@@ -18,41 +41,38 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {openUrl} from '@/utils/common';
|
import {openUrl} from '@/utils/common';
|
||||||
import {useUserStore} from '@/store/modules/user';
|
import {listThinkOrder, pageThinkOrder} from "@/api/think/thinkOrder";
|
||||||
import {thinkUsersVipLog} from "@/api/think/thinkUsersVip";
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cardId: 0,
|
vid: 0,
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
list: [],
|
list: [],
|
||||||
isLogin: false,
|
isLogin: false,
|
||||||
logo: uni.getStorageSync('app_logo'),
|
logo: uni.getStorageSync('app_logo'),
|
||||||
|
total: 0,
|
||||||
|
pageNum: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.cardId = o.id;
|
this.vid = o.vid;
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async reload(e) {
|
async reload() {
|
||||||
const app = this;
|
await uni.showLoading({title: '加载中'})
|
||||||
const {cardId} = this;
|
const res = await pageThinkOrder({
|
||||||
// 当前登录用户信息
|
vid: this.vid,
|
||||||
const userInfo = await userStore.fetchUserInfo();
|
page: this.page,
|
||||||
if (Object.keys(userInfo).length > 0) {
|
limit: this.limit
|
||||||
app.isLogin = true;
|
})
|
||||||
app.userInfo = userInfo;
|
uni.hideLoading()
|
||||||
} else {
|
this.total = res.count;
|
||||||
app.isLogin = false; v
|
this.pageNum = Math.ceil(res.count / this.limit)
|
||||||
app.$refs.login.open('bottom');
|
this.list = [...this.list, ...res.list]
|
||||||
return false;
|
console.log(this.list)
|
||||||
}
|
|
||||||
|
|
||||||
// 获取会员卡使用记录
|
|
||||||
this.list = await thinkUsersVipLog(this.cardId)
|
|
||||||
},
|
},
|
||||||
navTo(item) {
|
navTo(item) {
|
||||||
if (!this.isLogin) {
|
if (!this.isLogin) {
|
||||||
@@ -60,8 +80,18 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
openUrl(item);
|
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>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@@ -72,6 +102,4 @@ page {
|
|||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
|
||||||
</style>
|
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</uni-list-item>
|
</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>
|
<template v-slot:header>
|
||||||
<view class="slot-box">
|
<view class="slot-box">
|
||||||
<text class="slot-text" :style="{ color: '#333333' }">使用记录</text>
|
<text class="slot-text" :style="{ color: '#333333' }">使用记录</text>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<uv-tabs :list="list" :current="cardType" :scrollable="false" @click="changeCardType"></uv-tabs>
|
||||||
<view class="card-list">
|
<view class="card-list">
|
||||||
<block v-if="!hideTools || cardList.length > 0">
|
<block v-if="!hideTools || cardList.length > 0">
|
||||||
<view
|
<view
|
||||||
class="container"
|
class="container"
|
||||||
v-for="(item, index) in cardList"
|
v-for="(item, index) in cardList"
|
||||||
:key="index"
|
: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' }"
|
: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">
|
<view class="content web-cell">
|
||||||
@@ -34,7 +34,8 @@
|
|||||||
item.remainingMoney
|
item.remainingMoney
|
||||||
}}
|
}}
|
||||||
</view>
|
</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') }}过期
|
{{ dayjs(item.expireTime * 1000).format('YYYY-MM-DD HH:mm') }}过期
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -78,6 +79,8 @@
|
|||||||
import * as Api from '@/api/think/thinkUsersVip';
|
import * as Api from '@/api/think/thinkUsersVip';
|
||||||
import {getWeek, getKey} from '@/utils/common';
|
import {getWeek, getKey} from '@/utils/common';
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import {listThinkUsersVip, pageThinkUsersVip} from "@/api/think/thinkUsersVip";
|
||||||
|
import {listThinkCard, listUserThinkCard, pageThinkCard} from "@/api/think/thinkCard";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
@@ -86,12 +89,14 @@ export default {
|
|||||||
isRefresh: false,
|
isRefresh: false,
|
||||||
isLogin: false,
|
isLogin: false,
|
||||||
userId: 0,
|
userId: 0,
|
||||||
|
cardType: 0,
|
||||||
where: {
|
where: {
|
||||||
page: 1
|
page: 1
|
||||||
},
|
},
|
||||||
canReset: false,
|
canReset: false,
|
||||||
loadMore: 'more',
|
loadMore: 'more',
|
||||||
logo: '',
|
logo: '',
|
||||||
|
list: [{name: 'VIP卡'}, {name: 'IC卡'}],
|
||||||
items: ['月/年卡', '次卡', '充值卡'],
|
items: ['月/年卡', '次卡', '充值卡'],
|
||||||
cardList: [],
|
cardList: [],
|
||||||
styles: [
|
styles: [
|
||||||
@@ -129,9 +134,11 @@ export default {
|
|||||||
console.log('判断是否刷新: ', e);
|
console.log('判断是否刷新: ', e);
|
||||||
// 判断是否登录
|
// 判断是否登录
|
||||||
this.openLogin();
|
this.openLogin();
|
||||||
if (this.isRefresh) {
|
// if (this.isRefresh) {
|
||||||
this.reload();
|
// this.reload();
|
||||||
}
|
// }
|
||||||
|
this.cardType = 0
|
||||||
|
this.getVipCardList()
|
||||||
},
|
},
|
||||||
// 触底函数
|
// 触底函数
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -144,6 +151,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dayjs,
|
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() {
|
reload() {
|
||||||
const app = this;
|
const app = this;
|
||||||
const {where, userId} = this;
|
const {where, userId} = this;
|
||||||
@@ -251,6 +274,12 @@ export default {
|
|||||||
this.$refs.login.open('bottom');
|
this.$refs.login.open('bottom');
|
||||||
return false;
|
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
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "user/ic-card-detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "IC卡详情",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "user/card-detail-merchant",
|
"path": "user/card-detail-merchant",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -148,6 +155,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "user/ic-card-detail-record",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "使用记录",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "user/pay-password",
|
"path": "user/pay-password",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
+14
-2
@@ -380,8 +380,20 @@ export default {
|
|||||||
if (item.sid === 37) {
|
if (item.sid === 37) {
|
||||||
if (item.orderStatus === 2) item.canRefund = true
|
if (item.orderStatus === 2) item.canRefund = true
|
||||||
} else {
|
} 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
|
item.disabled = false
|
||||||
return item
|
return item
|
||||||
|
|||||||
+43
-106
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<layout class="page" @done="onLayout">
|
<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"/>
|
<ws-user-card :data="userInfo" :users="users" :isLogin="isLogin" @openLogin="openLogin" @done="reload"/>
|
||||||
<block v-if="hideTools">
|
<block v-if="hideTools">
|
||||||
@@ -42,41 +42,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<uv-icon name="arrow-right" size="24rpx"/>
|
<uv-icon name="arrow-right" size="24rpx"/>
|
||||||
</view>
|
</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>
|
||||||
<!-- <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>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<!-- 普通会员菜单 -->
|
<!-- 普通会员菜单 -->
|
||||||
@@ -93,78 +59,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</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>
|
</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>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</uni-card>
|
</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"/>
|
<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 Layout from "@/components/layout.vue";
|
||||||
|
|
||||||
import {useTenantStore} from '@/store/modules/tenant';
|
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 UvAvatar from "@/uni_modules/uv-avatar/components/uv-avatar/uv-avatar.vue";
|
||||||
import {getThinkOrderByCode, thinkOrderCheckCode} from "@/api/think/thinkOrder";
|
import {getThinkOrderByCode, thinkOrderCheckCode} from "@/api/think/thinkOrder";
|
||||||
|
|
||||||
@@ -225,7 +123,8 @@ export default {
|
|||||||
// 是否拥有场馆职员权限
|
// 是否拥有场馆职员权限
|
||||||
hasMerchantClerkRole: false,
|
hasMerchantClerkRole: false,
|
||||||
// 是否拥有超级管理员权限
|
// 是否拥有超级管理员权限
|
||||||
hasSuperAdminRole: false
|
hasSuperAdminRole: false,
|
||||||
|
loginCount: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
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>
|
</script>
|
||||||
|
|||||||
@@ -77,6 +77,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {uploadOssByPath} from "@/api/system/file";
|
import {uploadOssByPath} from "@/api/system/file";
|
||||||
import * as UserApi from "@/api/think/thinkUsers";
|
import * as UserApi from "@/api/think/thinkUsers";
|
||||||
|
import {loginByPhoneReq} from "@/api/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ws-user-card',
|
name: 'ws-user-card',
|
||||||
@@ -98,7 +99,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
nickname: ''
|
nickname: '',
|
||||||
|
loginCount: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -187,7 +189,8 @@ export default {
|
|||||||
uni.navigateTo({url: `/package/goods/orderDetailForSelfTake?id=${res.result}`})
|
uni.navigateTo({url: `/package/goods/orderDetailForSelfTake?id=${res.result}`})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user