diff --git a/src/api/booking/users/model/index.ts b/src/api/booking/users/model/index.ts index 8d9467f..2495d73 100644 --- a/src/api/booking/users/model/index.ts +++ b/src/api/booking/users/model/index.ts @@ -45,7 +45,7 @@ export interface Users { // 真实姓名 realName?: string; // 是否管理员:1是;2否 - isAdmin?: string; + isAdmin?: boolean; // 客户端ID clientId?: string; // 注册来源客户端 (APP、H5、小程序等) diff --git a/src/api/system/user/model/index.ts b/src/api/system/user/model/index.ts index 40f7e6d..0beb128 100644 --- a/src/api/system/user/model/index.ts +++ b/src/api/system/user/model/index.ts @@ -82,6 +82,8 @@ export interface User { recommend?: number; userProfile?: any; system?: any; + loginNum?: number; + openid?: string; } /** diff --git a/src/api/user/model/index.ts b/src/api/user/model/index.ts index 29b0280..0ef71e9 100644 --- a/src/api/user/model/index.ts +++ b/src/api/user/model/index.ts @@ -20,6 +20,11 @@ export interface User { phone?: string; // 邮箱 email?: string; + province?: string; + city?: string; + region?: string; + idCard?: string; + idCardNo?: string; // 出生日期 birthday?: string; // 手机号 @@ -36,6 +41,8 @@ export interface User { organizationName?: string; // 创建时间 createTime?: string; + // 登录次数 + loginNum?: number; } /** diff --git a/src/package/goods/checkout.vue b/src/package/goods/checkout.vue index b6703c4..c7fc613 100644 --- a/src/package/goods/checkout.vue +++ b/src/package/goods/checkout.vue @@ -7,7 +7,7 @@ - + + + + @@ -162,7 +169,7 @@ export default { Api.getUserCard(id).then((data) => { app.form = data; }); - + }, onDisabled() { diff --git a/src/package/user/invoice-type.vue b/src/package/user/invoice-type.vue new file mode 100644 index 0000000..9dfa8d3 --- /dev/null +++ b/src/package/user/invoice-type.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/src/pages.json b/src/pages.json index 2ad6957..8e1c2a8 100644 --- a/src/pages.json +++ b/src/pages.json @@ -63,10 +63,17 @@ "enablePullDownRefresh": false } }, + { + "path": "user/invoice-type", + "style": { + "navigationBarTitleText": "开票类型", + "enablePullDownRefresh": false + } + }, { "path": "user/invoice", "style": { - "navigationBarTitleText": "开票发票", + "navigationBarTitleText": "发票开具", "enablePullDownRefresh": false } }, @@ -84,6 +91,13 @@ "enablePullDownRefresh": false } }, + { + "path": "user/card-detail-invoice", + "style": { + "navigationBarTitleText": "发票开具", + "enablePullDownRefresh": false + } + }, { "path": "user/balance-log", "style": { @@ -168,6 +182,13 @@ "enablePullDownRefresh": false } }, + { + "path": "goods/index", + "style": { + "navigationBarTitleText": "商品列表", + "enablePullDownRefresh": false + } + }, { "path": "goods/detail", "style": { diff --git a/src/pages/order.vue b/src/pages/order.vue index c5c630b..fd59e11 100644 --- a/src/pages/order.vue +++ b/src/pages/order.vue @@ -1,413 +1,414 @@ diff --git a/src/pages/shop.vue b/src/pages/shop.vue index f86d6ab..923b1c0 100644 --- a/src/pages/shop.vue +++ b/src/pages/shop.vue @@ -12,7 +12,7 @@ - + @@ -193,6 +193,7 @@ export default { showSpecForm: false, sku: [], skuText: '', + keywords: '', disabled: false, // 支付密码是否正确 isPayPasswordCorrect: false, @@ -328,7 +329,7 @@ export default { }, search(){ uni.navigateTo({ - url: '/package/goods/index?keywords=' + this.goods.goodsId + url: '/package/goods/index?keywords=' + this.keywords }) }, save() { diff --git a/src/pages/user.vue b/src/pages/user.vue index f78711e..2fdfc2d 100644 --- a/src/pages/user.vue +++ b/src/pages/user.vue @@ -66,20 +66,39 @@ - - -
- -
- - {{ item.title }} -
-
-
- -
-
+ + + +
+ +
+ + {{ item.title }} +
+
+
+ +
+
+
+ + + +
+ +
+ + {{ item.title }} +
+
+
+ +
+
+
+
@@ -103,6 +122,7 @@ import {getWxOpenId} from '@/api/passport/login'; import Layout from "@/components/layout.vue"; import {useTenantStore} from '@/store/modules/tenant'; +import {authUser} from "@/api/user"; const tenantStore = useTenantStore(); const mpStore = useMpStore(); @@ -175,17 +195,26 @@ export default { app.hasSuperAdminRole = userInfo.roles.find((d) => d.roleCode === 'superAdmin'); // 获取用户副表信息 - UserApi.getByPhone({ - phone: userInfo.phone + await UserApi.getByPhone({ + openId: userInfo.openid }).then((data) => { if (data) { app.users = data; uni.setStorageSync('uid', data.id); - app.userInfo = Object.assign({}, app.userInfo, data); - if (!data.openId) { - data.openId = app.userInfo.openid - updateUsers(data); - } + data.points = data.integral + data.balance = data.money + data.isAdmin = 2 === data.isAdmin + data.idCardNo = data.idCard + data.nickname = data.username + data.avatar = data.avatarUrl + data.createTime = uni.$uv.date(data.createTime,'yyyy-mm-dd hh:MM:ss') + authUser(data) + + // app.userInfo = Object.assign({}, app.userInfo, data); + // if (!data.openId) { + // data.openId = app.userInfo.openid + // updateUsers(data); + // } } }); diff --git a/src/store/modules/mp.ts b/src/store/modules/mp.ts index bd3f028..64ab454 100644 --- a/src/store/modules/mp.ts +++ b/src/store/modules/mp.ts @@ -21,7 +21,10 @@ export const useMpStore = defineStore({ * 请求用户信息、权限、角色、菜单 */ async fetchMpInfo() { - const info = await getMpInfo().catch(() => void 0); + const info = await getMpInfo().catch((err => { + console.log(err.code,'fetchMpInfo()') + uni.clearStorageSync() + })); if (!info) { return {}; } diff --git a/src/uni_modules/ws-goods/components/ws-goods/ws-goods.vue b/src/uni_modules/ws-goods/components/ws-goods/ws-goods.vue index d17b2ff..e6a7c94 100644 --- a/src/uni_modules/ws-goods/components/ws-goods/ws-goods.vue +++ b/src/uni_modules/ws-goods/components/ws-goods/ws-goods.vue @@ -1,37 +1,26 @@