diff --git a/src/api/booking/userCard/index.ts b/src/api/booking/userCard/index.ts index 0295516..02a4110 100644 --- a/src/api/booking/userCard/index.ts +++ b/src/api/booking/userCard/index.ts @@ -1,14 +1,14 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { UserCard, UserCardParam } from './model'; -import type { OrderParam } from '@/shop/order/model'; +import type { OrderParam } from '@/api/shop/order/model'; import { MODULES_API_URL } from '@/config/setting'; /** * 查询可用的会员卡 - * @param {UserCardParam} params - * @return - */ + * @param {UserCardParam} params + * @return + */ export async function findUseCard(params: OrderParam) { const res = await request.get>>( MODULES_API_URL + '/booking/user-card/findUseCard', diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index e8f4621..9700cee 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -167,7 +167,7 @@ export async function updateUserStatus(userId?: number, status?: number) { /** * 修改推荐状态 */ -export async function updateUserRecommend(form) { +export async function updateUserRecommend(form: User) { const res = await request.put>( SERVER_API_URL + '/system/user/recommend', form diff --git a/src/package/admin/count.vue b/src/package/admin/count.vue new file mode 100644 index 0000000..0225f00 --- /dev/null +++ b/src/package/admin/count.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/package/admin/field.vue b/src/package/admin/field.vue index 5452bd4..bea18a3 100644 --- a/src/package/admin/field.vue +++ b/src/package/admin/field.vue @@ -1,6 +1,6 @@ @@ -120,6 +120,7 @@ import { getWeek, getKey } from '@/utils/common'; const carStore = useCarStore(); const { orderInfo, totalPrice, carNum, merchant, type, dateTime, childrenPrice } = storeToRefs(carStore); +const value = uni.getStorageSync('currentId') export default { data() { return { @@ -161,7 +162,8 @@ export default { // 是否同意协议 disabled: false, // 购物车信息 - showCarInfo: false + showCarInfo: false, + value }; }, onLoad() { @@ -331,7 +333,8 @@ export default { isStatus: 0, week, dateTime: `${this.dateTime}`, - half: this.isHalf + half: this.isHalf, + admin: true }) .then((list) => { this.periodList = list; @@ -344,13 +347,13 @@ export default { icon: 'none' }); uni.hideLoading(); - if (err.message === '您还有未支付订单,请先支付') { - setTimeout(() => { - return uni.switchTab({ - url: '/pages/order/order' - }); - }, 1000); - } + // if (err.message === '您还有未支付订单,请先支付') { + // setTimeout(() => { + // return uni.switchTab({ + // url: '/pages/order/order' + // }); + // }, 1000); + // } }); }, callPhone(phone) { @@ -358,6 +361,11 @@ export default { phoneNumber: phone }); }, + change(index) { + console.log('index>>: ',index); + uni.setStorageSync('currentId', index); + this.reload() + }, openCarInfo() { // this.showCarInfo = !this.showCarInfo; // 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] @@ -386,6 +394,7 @@ export default { onField(item, period) { // 已被预定 if (item.sold) { + uni.navigateTo({url: `/package/admin/order-detail?id=${item.orderInfoList[0].orderId}`}) return; } const app = this; @@ -568,7 +577,7 @@ page { .uni-padding-wrap { width: 180rpx; - margin: 20rpx auto; + margin: 20rpx; } .uni-badge-wrap { @@ -657,7 +666,7 @@ page { justify-content: center; align-items: center; border-radius: 16rpx; - line-height: 1.3rem; + line-height: 1rem; position: relative; color: #333333; background-color: #ffffff; diff --git a/src/package/admin/order-detail.vue b/src/package/admin/order-detail.vue new file mode 100644 index 0000000..7015325 --- /dev/null +++ b/src/package/admin/order-detail.vue @@ -0,0 +1,454 @@ + + + + + diff --git a/src/package/admin/order-scan.vue b/src/package/admin/order-scan.vue index 6551a27..84654ee 100644 --- a/src/package/admin/order-scan.vue +++ b/src/package/admin/order-scan.vue @@ -1,5 +1,6 @@ @@ -31,15 +31,11 @@ useUserStore } from '@/store/modules/user'; import * as Api from '@/api/booking/integral'; - import { - getWxOpenId - } from '@/api/passport/login'; + import * as UserApi from '@/api/booking/users'; import { openUrl } from '@/utils/common'; - import * as UserApi from '@/api/system/user' - import { useTenantStore } from '@/store/modules/tenant'; @@ -93,6 +89,16 @@ if (Object.keys(userInfo).length > 0) { app.isLogin = true app.userInfo = userInfo + // 获取用户副表信息 + UserApi.getByPhone({ + phone: userInfo.phone + }).then((data) => { + if (data) { + app.userInfo.users = data; + app.userInfo.ouid = data.uid; + uni.setStorageSync('ouid',data.uid); + } + }); } else { app.isLogin = false } @@ -102,7 +108,7 @@ dateTime }).then(res => { uni.hideLoading() - if (res.message == '您今天已经签到过了') { + if (res.message === '您今天已经签到过了') { app.todaySign = true } app.selected = [] @@ -132,9 +138,11 @@ const app = this app.openLogin() app.todaySign = true - Api.addIntegral({}).then(res => { - UserApi.updatePointsBySign() - app.userInfo.points++ + Api.addIntegral({ + id: app.userInfo.users.id + }).then(res => { + // UserApi.updatePointsBySign() + // app.userInfo.points++ uni.showToast({ title: '签到成功', icon: 'success' @@ -168,7 +176,7 @@ } \ No newline at end of file + diff --git a/src/package/user/personal.vue b/src/package/user/personal.vue index 918ab9b..2d455c9 100644 --- a/src/package/user/personal.vue +++ b/src/package/user/personal.vue @@ -1,10 +1,10 @@