diff --git a/common/api/request.js b/common/api/request.js index d17feb8..42d51ee 100644 --- a/common/api/request.js +++ b/common/api/request.js @@ -5,8 +5,9 @@ export default (params) => { let type = params.type || 1; let toast = params.toast || true; let token=uni.cache.get('token') || ''; + const shopId=uni.cache.get('shopId')*1; // #ifdef H5 - token="b152112b96e24feb8aa47062136c043b" + token="21f0a0b10e1d40ce9c6464037fedb792" // #endif let header = { version: uni.conf.version, @@ -25,7 +26,7 @@ export default (params) => { // #endif token, id: uni.cache.get('userInfo').id || '', - shopId: uni.cache.get('shopId') || '', + shopId:shopId || '', userId: uni.cache.get('userInfo').id || '', } if (toast) { diff --git a/common/css/common.scss b/common/css/common.scss index 301ee95..cc011bf 100644 --- a/common/css/common.scss +++ b/common/css/common.scss @@ -52,4 +52,37 @@ page, } .bg-main{ background-color: $my-main-color; + } + .color-666{ + color: #666; + } + .text-center{ + text-align: center; + } + .color-333{ + color: #333; + } + .color-000{ + color: #000; + } + .color-999{ + color: #999; + } + .font-16 { + font-size: 16px; + } + .font-700{ + font-weight: 700; + } + .font-14{ + font-size: 14px; + } + .font-10{ + font-size: 10px; + } + .font-12 { + font-size: 12px; + } + .no-wrap{ + white-space: nowrap; } \ No newline at end of file diff --git a/pages.json b/pages.json index 235d5d2..ab037fa 100644 --- a/pages.json +++ b/pages.json @@ -189,6 +189,21 @@ } } ], + "subPackages": [ + { + "root": "user", + "pages": [{ + "path" : "vip/vip", + "style" : + { + "navigationBarTitleText" : "", + "navigationStyle": "custom" + } + } + + ] + } + ], "uniIdRouter": {}, "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/user/user.vue b/pages/user/user.vue index 9a09f01..aba3f93 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -17,35 +17,78 @@ + 我的资产 - - - - - 储值 - {{userInfo.amount || '0'}} + + + + + + 储值 + + + 3家店 + + - - - - 积分 - {{userInfo.accountPoints || 0}} - - - - - 优惠券 - {{userInfo.couponNum ||'0'}} + + + + + + + ¥ + 9999.99 + + 这里是店铺名称 + + + + + 查看全部 + - + + + + + + 会员 + + + 3家店 + + + + + + + + + + ¥ + 9999.99 + + 这里是店铺名称 + + + + + 查看全部 + + + + + - - 我的功能 + + @@ -53,8 +96,11 @@ {{item.name}} - - + + {{userInfo.accountPoints || 0}} + {{userInfo.couponNum || 0}} + 查看 + @@ -82,26 +128,31 @@ } from '@/stores/user.js'; const store = productStore(); const myFunList = ref([{ - name: "我的优惠券", + name: "积分", + type: "score", + icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png" + }, + { + name: "优惠券", type: "my_coupon", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png" }, - { - name: "我的订单", - type: "my_order", - icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png" - }, + // { + // name: "我的订单", + // type: "my_order", + // icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png" + // }, // { name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"}, // { // name: "个人资料", // type: "myself", // icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png" // }, - { - name: "我的会员卡", - type: "my_member", - icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png" - }, + // { + // name: "我的会员卡", + // type: "my_member", + // icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png" + // }, // { name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"}, ]) @@ -218,13 +269,12 @@ .myContent { position: relative; z-index: 1; - padding: 298rpx 20rpx 0 20rpx; + padding: 298rpx 0 0 0; .my_info { - height: 172rpx; align-items: center; background-color: #fff; - padding: 0 32rpx; + padding: 32rpx 32rpx; border-radius: 18rpx; .my_info_left { @@ -272,9 +322,8 @@ .my_item { background-color: #fff; - padding: 22rpx 32rpx; + padding: 0 32rpx; border-radius: 18rpx; - margin-top: 16rpx; .my_item_title { font-weight: bold; @@ -362,4 +411,22 @@ } } } + + + + + .card-list { + display: grid; + grid-template-columns: repeat(4, 1fr); + column-gap: 40rpx; + margin-top: 20rpx; + .card-list-item{ + max-width: 182rpx; + box-shadow: 8rpx 8rpx 32rpx 0 #0b18390f; + .info{ + padding-bottom: 16rpx; + overflow: hidden; + } + } + } \ No newline at end of file diff --git a/static/icon/vip.png b/static/icon/vip.png new file mode 100644 index 0000000..f520b60 Binary files /dev/null and b/static/icon/vip.png differ diff --git a/user/images/Frame_220.png b/user/images/Frame_220.png new file mode 100644 index 0000000..ca255fe Binary files /dev/null and b/user/images/Frame_220.png differ diff --git a/user/images/Frame_221.png b/user/images/Frame_221.png new file mode 100644 index 0000000..bd51059 Binary files /dev/null and b/user/images/Frame_221.png differ diff --git a/user/images/Frame_222.png b/user/images/Frame_222.png new file mode 100644 index 0000000..29b30b8 Binary files /dev/null and b/user/images/Frame_222.png differ diff --git a/user/images/Frame_223.png b/user/images/Frame_223.png new file mode 100644 index 0000000..2284e30 Binary files /dev/null and b/user/images/Frame_223.png differ diff --git a/user/images/Frame_224.png b/user/images/Frame_224.png new file mode 100644 index 0000000..a20c0fc Binary files /dev/null and b/user/images/Frame_224.png differ diff --git a/user/images/Frame_225.png b/user/images/Frame_225.png new file mode 100644 index 0000000..677485a Binary files /dev/null and b/user/images/Frame_225.png differ diff --git a/user/images/Rectangle_25.png b/user/images/Rectangle_25.png new file mode 100644 index 0000000..01472bd Binary files /dev/null and b/user/images/Rectangle_25.png differ diff --git a/user/images/image_21.png b/user/images/image_21.png new file mode 100644 index 0000000..1ec462a Binary files /dev/null and b/user/images/image_21.png differ diff --git a/user/vip/vip.vue b/user/vip/vip.vue new file mode 100644 index 0000000..0b03860 --- /dev/null +++ b/user/vip/vip.vue @@ -0,0 +1,326 @@ + + + + + + + + \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index cf024ff..ffeaa31 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,7 @@ export default defineConfig({ hmr: true, proxy: { '/api': { - target: 'http://192.168.1.31', + target: 'http://192.168.0.71', changeOrigin: true, rewrite: path => path.replace(/^\/api/, ''), secure: false