拆分admin分包,修复会员卡支付bug

This commit is contained in:
2024-07-16 00:14:30 +08:00
parent f3c18408d3
commit 8d682fbe81
13 changed files with 475 additions and 434 deletions
+6 -2
View File
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="cn.fjdmy.uniapp.UniappProjectDataService"> <component name="cn.fjdmy.uniapp.UniappProjectDataService">
<option name="basePath" value="$PROJECT_DIR$/src" />
<option name="generalBasePath" value="$PROJECT_DIR$" /> <option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" /> <option name="manifestPath" value="$PROJECT_DIR$/src/manifest.json" />
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" /> <option name="pagesPath" value="$PROJECT_DIR$/src/pages.json" />
<option name="scanNum" value="1" /> <option name="scanNum" value="1" />
<option name="type" value="store" /> <option name="type" value="store" />
<option name="uniapp" value="true" />
<option name="uniappCli" value="true" />
<option name="vueVersion" value="3" />
</component> </component>
</project> </project>
+4 -3
View File
@@ -180,7 +180,7 @@ import { useCarStore } from '@/store/modules/car';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore(); const userStore = useUserStore();
const carStore = useCarStore(); const carStore = useCarStore();
const { merchantId, orderInfo, period, totalPrice, reducePrice, payPrice, childrenPrice, carNum, carNum2, merchant, type, dateTime } = storeToRefs(carStore); const { merchantId, merchantCode, orderInfo, period, totalPrice, reducePrice, payPrice, childrenPrice, carNum, carNum2, merchant, type, dateTime } = storeToRefs(carStore);
export default { export default {
data() { data() {
@@ -197,6 +197,7 @@ export default {
// 场馆信息 // 场馆信息
merchant, merchant,
merchantId, merchantId,
merchantCode,
orderInfo, orderInfo,
carNum, carNum,
carNum2: 0, carNum2: 0,
@@ -386,9 +387,9 @@ export default {
const app = this; const app = this;
const { payPrice } = this const { payPrice } = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const { merchantId } = this; const { merchantId,merchantCode } = this;
UserCardApi.findUseCard({ UserCardApi.findUseCard({
sid: merchantId, sid: merchantCode,
payPrice payPrice
}) })
.then((result) => { .then((result) => {
+5 -2
View File
@@ -3,7 +3,7 @@
<!-- 其他功能 --> <!-- 其他功能 -->
<block v-for="(item, index) in list" :key="index"> <block v-for="(item, index) in list" :key="index">
<uni-card :border="false" :is-shadow="false" :padding="0"> <uni-card :border="false" :is-shadow="false" :padding="0">
<uv-cell :title="item.comments" :label="item.createTime" :value="`${item.price}`" :cellStyle="{ padding: '10px 0' }" :border="false"></uv-cell> <uv-cell :title="item.comments" :label="item.createTime" :value="`¥${item.price}`" :cellStyle="{ padding: '10px 0' }" :border="false"></uv-cell>
</uni-card> </uni-card>
</block> </block>
<!-- 登录组件 --> <!-- 登录组件 -->
@@ -48,7 +48,10 @@ export default {
// 获取会员卡使用记录 // 获取会员卡使用记录
Api.pageUserCardLog({cardId}).then((res) => { Api.pageUserCardLog({cardId}).then((res) => {
app.list = res.list; app.list = res.list.map(d => {
d.createTime = uni.$uv.date(d.createTime,'yyyy-mm-dd hh:MM:ss')
return d;
});
}); });
}, },
navTo(item) { navTo(item) {
+19 -19
View File
@@ -31,25 +31,25 @@
</template> </template>
</uv-cell> </uv-cell>
</uv-form-item> </uv-form-item>
<uv-form-item prop="form.idCard" borderBottom> <!-- <uv-form-item prop="form.idCard" borderBottom>-->
<uv-cell title="上传证件"> <!-- <uv-cell title="上传证件">-->
<template v-slot:right-icon> <!-- <template v-slot:right-icon>-->
<uv-icon size="40rpx" name="camera" @click="onIdCard(item)"></uv-icon> <!-- <uv-icon size="40rpx" name="camera" @click="onIdCard(item)"></uv-icon>-->
</template> <!-- </template>-->
</uv-cell> <!-- </uv-cell>-->
</uv-form-item> <!-- </uv-form-item>-->
<uv-form-item prop="form.idCard" borderBottom> <!-- <uv-form-item prop="form.idCard" borderBottom>-->
<uv-cell> <!-- <uv-cell>-->
<template v-slot:label> <!-- <template v-slot:label>-->
<image src="https://oss.wsdns.cn/20240502/ec8c13037e7d4d40931b49fd45b23c61.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90" style="width: 80rpx" mode="widthFix" /> <!-- <image src="https://oss.wsdns.cn/20240502/ec8c13037e7d4d40931b49fd45b23c61.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90" style="width: 80rpx" mode="widthFix" />-->
</template> <!-- </template>-->
</uv-cell> <!-- </uv-cell>-->
<uv-cell> <!-- <uv-cell>-->
<template v-slot:label> <!-- <template v-slot:label>-->
<image src="https://oss.wsdns.cn/20240502/ec8c13037e7d4d40931b49fd45b23c61.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90" style="width: 80rpx" mode="widthFix" /> <!-- <image src="https://oss.wsdns.cn/20240502/ec8c13037e7d4d40931b49fd45b23c61.png?x-oss-process=image/resize,m_fixed,w_100,h_100/quality,Q_90" style="width: 80rpx" mode="widthFix" />-->
</template> <!-- </template>-->
</uv-cell> <!-- </uv-cell>-->
</uv-form-item> <!-- </uv-form-item>-->
</uv-form> </uv-form>
</view> </view>
</uni-card> </uni-card>
@@ -1,11 +1,11 @@
<template> <template>
<view class="page"> <view class="page">
<uv-gap height="20"></uv-gap> <!-- <uv-gap height="20"></uv-gap>-->
<!-- <uni-nav-bar dark :fixed="true" shadow background-color="#2ba91c" status-bar left-icon="left" left-text="返回" title="场地管理" @clickLeft="goBack" /> --> <!-- <uni-nav-bar dark :fixed="true" shadow background-color="#2ba91c" status-bar left-icon="left" left-text="返回" title="场地管理" @clickLeft="goBack" /> -->
<!-- 顶部距离 --> <!-- 顶部距离 -->
<!-- <view class="header" :style="'margin-top: ' + statusBarHeight + 'px'"></view> --> <!-- <view class="header" :style="'margin-top: ' + statusBarHeight + 'px'"></view> -->
<!-- 用户信息 --> <!-- 用户信息 -->
<ws-admin-card :merchantList="merchantList" :merchantId="merchantId" :data="userInfo" :is-login="isLogin" @openLogin="openLogin" /> <!-- <ws-admin-card :merchantList="merchantList" :merchantId="merchantId" :data="userInfo" :is-login="isLogin" @openLogin="openLogin" />-->
<block v-if="hideTools"> <block v-if="hideTools">
<uni-card :border="false" :padding="'18px 8px'"> <uni-card :border="false" :padding="'18px 8px'">
<uv-skeleton rows="2" :loading="hideTools" :title="false"></uv-skeleton> <uv-skeleton rows="2" :loading="hideTools" :title="false"></uv-skeleton>
@@ -55,7 +55,7 @@
<script> <script>
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import * as UserApi from '@/api/booking/users'; import * as UserApi from '@/api/booking/users';
import * as MpMenuApi from '@/api/cms/mp-menu/index'; import * as MpMenuApi from '@/api/cms/mp-menu';
import * as MerchantApi from '@/api/shop/merchant'; import * as MerchantApi from '@/api/shop/merchant';
import { updateUsers } from '@/api/shop/users'; import { updateUsers } from '@/api/shop/users';
import { openUrl } from '@/utils/common'; import { openUrl } from '@/utils/common';
+108 -82
View File
@@ -1,5 +1,6 @@
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@@ -30,27 +31,32 @@
} }
} }
], ],
"subPackages": [{ "subPackages": [
{
"root": "package", "root": "package",
"pages": [{ "pages": [
{
"path": "user/personal", "path": "user/personal",
"style": { "style": {
"navigationBarTitleText": "个人资料", "navigationBarTitleText": "个人资料",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/emergency", "path": "user/emergency",
"style": { "style": {
"navigationBarTitleText": "紧急联系人", "navigationBarTitleText": "紧急联系人",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/coupon", "path": "user/coupon",
"style": { "style": {
"navigationBarTitleText": "我的券包", "navigationBarTitleText": "我的券包",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/integral", "path": "user/integral",
"style": { "style": {
"navigationBarTitleText": "我的积分", "navigationBarTitleText": "我的积分",
@@ -77,20 +83,22 @@
"navigationBarTitleText": "查看开票信息", "navigationBarTitleText": "查看开票信息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} },
,{ {
"path": "user/balance-log", "path": "user/balance-log",
"style": { "style": {
"navigationBarTitleText": "余额明细", "navigationBarTitleText": "余额明细",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/card", "path": "user/card",
"style": { "style": {
"navigationBarTitleText": "我的卡包", "navigationBarTitleText": "我的卡包",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/card-detail", "path": "user/card-detail",
"style": { "style": {
"navigationBarTitleText": "会员卡详情", "navigationBarTitleText": "会员卡详情",
@@ -124,26 +132,28 @@
"navigationBarTitleText": "设置支付密码", "navigationBarTitleText": "设置支付密码",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/address", "path": "user/address",
"style": { "style": {
"navigationBarTitleText": "收货地址", "navigationBarTitleText": "收货地址",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/ic-card", "path": "user/ic-card",
"style": { "style": {
"navigationBarTitleText": "IC卡激活", "navigationBarTitleText": "IC卡激活",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "user/ic-card-order", "path": "user/ic-card-order",
"style": { "style": {
"navigationBarTitleText": "支付卡订单", "navigationBarTitleText": "支付卡订单",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "order/index", "path": "order/index",
"style": { "style": {
@@ -203,7 +213,8 @@
"navigationBarTitleText": "文章详情", "navigationBarTitleText": "文章详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "booking/merchant", "path": "booking/merchant",
"style": { "style": {
"navigationBarTitleText": "订单核销", "navigationBarTitleText": "订单核销",
@@ -239,74 +250,42 @@
"style": { "style": {
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"
} }
}, { },
{
"path": "course/index", "path": "course/index",
"style": { "style": {
"navigationBarTitleText": "培训课程", "navigationBarTitleText": "培训课程",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "course/list", "path": "course/list",
"style": { "style": {
"navigationBarTitleText": "课程列表", "navigationBarTitleText": "课程列表",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "course/detail", "path": "course/detail",
"style": { "style": {
"navigationBarTitleText": "课程详情", "navigationBarTitleText": "课程详情",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },
{
"path": "course/checkout", "path": "course/checkout",
"style": { "style": {
"navigationBarTitleText": "订单确认", "navigationBarTitleText": "订单确认",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{ },
{
"path": "course/student", "path": "course/student",
"style": { "style": {
"navigationBarTitleText": "学员管理", "navigationBarTitleText": "学员管理",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "admin/index",
"style": {
"navigationBarTitleText": "管理中心"
}
}, {
"path": "admin/order-scan",
"style": {
"navigationBarTitleText": "订单核销",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "admin/field",
"style": {
"navigationBarTitleText": "场地管理",
"enablePullDownRefresh": false
}
},{
"path": "admin/order-detail",
"style": {
"navigationBarTitleText": "订单信息",
"enablePullDownRefresh": false
}
},{
"path": "admin/search",
"style": {
"navigationBarTitleText": "订单查询",
"enablePullDownRefresh": false
}
},{
"path": "admin/count",
"style": {
"navigationBarTitleText": "统计分析",
"enablePullDownRefresh": false
}
},
{ {
"path": "teacher/detail", "path": "teacher/detail",
"style": { "style": {
@@ -315,49 +294,93 @@
} }
}, },
{ {
"path" : "match/index", "path": "match/index",
"style" : "style": {
{ "navigationBarTitleText": "赛事活动"
"navigationBarTitleText" : "赛事活动"
} }
}, },
{ {
"path" : "match/detail", "path": "match/detail",
"style" : "style": {
{ "navigationBarTitleText": "活动详情"
"navigationBarTitleText" : "活动详情"
} }
}, },
{ {
"path" : "match/checkout", "path": "match/checkout",
"style" : "style": {
{ "navigationBarTitleText": "赛事活动报名"
"navigationBarTitleText" : "赛事活动报名"
} }
}, },
{ {
"path" : "cooperate/index", "path": "cooperate/index",
"style" : "style": {
{ "navigationBarTitleText": "商务合作"
"navigationBarTitleText" : "商务合作"
} }
}, },
{ {
"path" : "coupon/index", "path": "coupon/index",
"style" : "style": {
{ "navigationBarTitleText": "领劵中心"
"navigationBarTitleText" : "领劵中心"
} }
} }
] ]
}], },
{
"root": "packageAdmin",
"pages": [
{
"path": "/index",
"style": {
"navigationBarTitleText": "管理中心"
}
},
{
"path": "admin/order-scan",
"style": {
"navigationBarTitleText": "订单核销",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "admin/field",
"style": {
"navigationBarTitleText": "场地管理",
"enablePullDownRefresh": false
}
},
{
"path": "admin/order-detail",
"style": {
"navigationBarTitleText": "订单信息",
"enablePullDownRefresh": false
}
},
{
"path": "admin/search",
"style": {
"navigationBarTitleText": "订单查询",
"enablePullDownRefresh": false
}
},
{
"path": "admin/count",
"style": {
"navigationBarTitleText": "统计分析",
"enablePullDownRefresh": false
}
}
]
}
],
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",
"selectedColor": "#d81e06", "selectedColor": "#d81e06",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"fontSize": "14px", "fontSize": "14px",
"list": [{ "list": [
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tabbar/home.png", "iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png", "selectedIconPath": "static/tabbar/home-active.png",
@@ -390,9 +413,12 @@
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
// #ifdef H5 // #ifdef H5
"maxWidth": 750, "maxWidth": 750,
"rpxCalcMaxDeviceWidth": 750, // rpx 计算所支持的最大设备宽度,单位 px,默认值为 960 "rpxCalcMaxDeviceWidth": 750,
"rpxCalcBaseDeviceWidth": 560, // rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375 // rpx 计算所支持的最大设备宽度,单位 px,默认值为 960
"rpxCalcIncludeWidth": 9999 // rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750 "rpxCalcBaseDeviceWidth": 560,
// rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375
"rpxCalcIncludeWidth": 9999
// rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750
// #endif // #endif
}, },
"uniIdRouter": {}, "uniIdRouter": {},
+3
View File
@@ -13,6 +13,7 @@ export interface CarState {
merchantId: Number | null; merchantId: Number | null;
merchantName: String | null; merchantName: String | null;
merchantCode: Number | null; merchantCode: Number | null;
sid: String | null;
merchant: Merchant | null; merchant: Merchant | null;
order: Order | null; order: Order | null;
orderInfo: OrderInfo[] | null; orderInfo: OrderInfo[] | null;
@@ -37,6 +38,8 @@ export const useCarStore = defineStore({
merchantName: null, merchantName: null,
// 场馆编号 // 场馆编号
merchantCode: null, merchantCode: null,
// 场馆编号
sid: null,
// 场馆信息 // 场馆信息
merchant: null, merchant: null,
// 订单信息 // 订单信息
@@ -1,6 +1,6 @@
<template> <template>
<view class="user-card" @click="openLogin" v-if="form"> <view class="user-card" @click="openLogin">
<view class="userinfo" @click.stop="openPersonal"> <view class="userinfo" v-if="form">
<view class="avatar"> <view class="avatar">
<image v-if="isLogin" :src="form.avatarUrl" mode="aspectFill"></image> <image v-if="isLogin" :src="form.avatarUrl" mode="aspectFill"></image>
<!-- <uni-icons v-else type="contact-filled" color="#f3f3f3" size="100"></uni-icons> --> <!-- <uni-icons v-else type="contact-filled" color="#f3f3f3" size="100"></uni-icons> -->
@@ -114,7 +114,11 @@ export default {
}, },
methods: { methods: {
openLogin() { openLogin() {
if(this.isLogin){
this.$refs.personal.open('center');
}else{
this.$emit('openLogin'); this.$emit('openLogin');
}
}, },
openPersonal() { openPersonal() {
this.$refs.personal.open('center'); this.$refs.personal.open('center');