From d731f72890272a64de8b18349d8483f16ec42872 Mon Sep 17 00:00:00 2001 From: zhouzhenyuan Date: Thu, 1 Feb 2024 15:02:05 +0800 Subject: [PATCH] goods --- api/member/index.js | 25 +++++++++----- pages.json | 1 - pages/goods/detail.vue | 47 ++++++++++++++++++------- pages/member/index.vue | 7 ++-- pages/memberInfo/index.vue | 69 +++++++++++++++++++------------------ pages/news1/help.vue | 68 +++++++++++++++++++++++++++++++----- pages/user/index.vue | 16 ++++----- static/user/hygl.png | Bin 0 -> 828 bytes static/user/jq.png | Bin 0 -> 568 bytes static/user/sj.png | Bin 0 -> 1188 bytes 10 files changed, 156 insertions(+), 77 deletions(-) create mode 100644 static/user/hygl.png create mode 100644 static/user/jq.png create mode 100644 static/user/sj.png diff --git a/api/member/index.js b/api/member/index.js index 71be294..8ebf8b2 100644 --- a/api/member/index.js +++ b/api/member/index.js @@ -2,26 +2,33 @@ import request from '@/utils/request' // api地址 const api = { - info: 'identity/userPriceList', - submit:'identity/submit', - dealerPriceList:'identity/dealerPriceList', - userOpenCardLog:'identity/userOpenCardLog' + info: 'identity/userPriceList', + submit: 'identity/submit', + dealerPriceList: 'identity/dealerPriceList', + userOpenCardLog: 'identity/userOpenCardLog', + dealerOpenCardLog: 'identity/dealerOpenCardLog' } // 会员信息 export const info = (param) => { - return request.post(api.info, param) + return request.post(api.info, param) } // 分销会员信息 export const dealerPriceList = (param) => { - return request.post(api.dealerPriceList, param) + return request.post(api.dealerPriceList, param) } // 会员信息 export const submit = (param) => { - return request.post(api.submit, param) + return request.post(api.submit, param) } -// +// 会员开卡记录 export const userOpenCardLog = (param) => { - return request.post(api.userOpenCardLog, param) + return request.post(api.userOpenCardLog, param) +} + + +// 分销开卡记录 +export const dealerOpenCardLog = (param) => { + return request.post(api.dealerOpenCardLog, param) } \ No newline at end of file diff --git a/pages.json b/pages.json index 75d5809..82da8fb 100644 --- a/pages.json +++ b/pages.json @@ -881,7 +881,6 @@ "navigationBarTitleText": "商家入驻" } } - ] }, { diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index 7bacac3..ac7dbd0 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -4,7 +4,6 @@ - @@ -68,8 +67,8 @@ {{goods.goods_name}} - - 100999080000 + + {{item.skuList[0].goods_sku_id}} @@ -134,15 +133,15 @@ - + - + - - 夏普4T-M70H7DA 70 + + {{item.goods_name}} - ¥2220 + ¥{{item.goods_price_min}} @@ -294,25 +293,39 @@ setPrice: false, openDialog: false, goodsId: '', - goods:{}, + goods: {}, + suggestGoodsList: [] } }, onLoad(options) { this.isPre = options.isPre this.getGoodsDetail(options.goodsId) }, + onShow() { + this.getSuggestGoods() + }, methods: { // 获取商品信息 - getGoodsDetail(val) { + getGoodsDetail() { const that = this return new Promise((resolve, reject) => { - GoodsApi.detail(val) + GoodsApi.detail('10001') .then(result => { that.goods = result.data.detail }) .catch(reject) }) }, + getSuggestGoods() { + // 获取推荐商品列表 + const that = this + GoodsApi.recommended() + .then(result => { + console.log(result, '获取推荐商品列表') + that.suggestGoodsList = result.data.goodsList + }) + .catch(reject) + }, goHome() { uni.navigateTo({ url: '/pages/index/index' @@ -610,6 +623,7 @@ color: #000000; line-height: 33rpx; margin: 28rpx 0 0 28rpx; + } .goodsOpera { @@ -786,7 +800,7 @@ .about { width: 720rpx; - height: 730rpx; + // height: 730rpx; background: #FFFFFF; border-radius: 6rpx 6rpx 6rpx 6rpx; opacity: 1; @@ -854,7 +868,14 @@ font-weight: 400; color: #000000; line-height: 33rpx; - + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + white-space: normal !important; + word-wrap: break-word; + -webkit-box-orient: vertical; + -webkit-box-align: start; + -webkit-box-pack: center; } .price { diff --git a/pages/member/index.vue b/pages/member/index.vue index a4f5986..c454778 100644 --- a/pages/member/index.vue +++ b/pages/member/index.vue @@ -103,7 +103,8 @@ 限时活动价 - + + {{item.month}}个月 @@ -138,7 +139,7 @@ - + 已省 ¥{{choseItem.cheap_price}} @@ -220,7 +221,7 @@ }, goBuyInfo() { uni.navigateTo({ - url: '/pages/memberInfo/index' + url: '/pages/memberInfo/index?userInfo=' + JSON.stringify(this.userInfo) }) }, chosePayType(item, index) { diff --git a/pages/memberInfo/index.vue b/pages/memberInfo/index.vue index f14abc1..8ea9ad0 100644 --- a/pages/memberInfo/index.vue +++ b/pages/memberInfo/index.vue @@ -9,14 +9,14 @@ - Deioio + {{userInfo.nick_name}} - v月卡会员 + {{userInfo.user_type_text}} - 有效期至2024.01.21 + 有效期至{{userInfo.effective_time}} @@ -24,43 +24,26 @@ 月卡订单记录 - + - 生效中 + 生效中 + 已过期 - 省钱月卡1个月 - - - 活动赠送 + {{item.name}} - 2023.12.22-2024.01.21 + {{item.start_time}}-{{item.end_time}} - - 已展示近18个月省钱月卡订单 - - - - - - 已省 ¥3.2 - - - 原价 ¥30 - - - - ¥36开卡3个月 - + @@ -70,6 +53,7 @@ export default { data() { return { + userInfo:{}, payTypeChose:true, isChose: 0, isVip: false, @@ -77,21 +61,37 @@ background: 'url(' + img + ') center top no-repeat', backgroundSize: '100% auto', }, + list:[], } }, onLoad(options){ + this.userInfo = JSON.parse(options.userInfo) + }, + onShow(){ this.getListInfo() }, methods:{ getListInfo(){ const that = this - member.info() - .then(res => { - if (res.status == 200) { - - } - }) - .finally(() => that.isLoading = false) + that.list = [] + if(that.userInfo.user_type==30){ + member.dealerOpenCardLog() + .then(res => { + if (res.status == 200) { + that.list = res.data + } + }) + .finally(() => that.isLoading = false) + }else if(that.userInfo.user_type==20){ + member.userOpenCardLog() + .then(res => { + if (res.status == 200) { + that.list = res.data + } + }) + .finally(() => that.isLoading = false) + } + }, }, } @@ -121,6 +121,7 @@ height: 114rpx; margin-right: 30rpx; margin-top: 12rpx; + border-radius: 50%; } .meInfo { @@ -206,7 +207,7 @@ background: #FFF4F4; border-radius: 8rpx 8rpx 8rpx 8rpx; opacity: 1; - margin: 26rpx 0 0 38rpx; + margin: 26rpx 0 16rpx 38rpx; display: flex; .tp { diff --git a/pages/news1/help.vue b/pages/news1/help.vue index 27bc1e9..26df32d 100644 --- a/pages/news1/help.vue +++ b/pages/news1/help.vue @@ -12,14 +12,22 @@ - {{p.title}} + {{p.title}} + - - 在线客服(9:00-22:00) + + + + + + + @@ -31,7 +39,8 @@ data() { return { itemList: [], - + strings: '', + dialog: false, } }, onShow() { @@ -49,6 +58,10 @@ }) .finally(() => that.isLoading = false) }, + openContent(item) { + this.strings = item.content + this.dialog = true + }, } } @@ -135,21 +148,23 @@ height: 90upx; line-height: 90upx; padding: 0 10upx; + border-bottom: 1px solid #dfdbdb; + } + + :first-child { + border-right: 1px solid #dfdbdb; } :nth-child(2n) { - // border-bottom:1px solid #dfdbdb; border-left: 1px solid #dfdbdb; - // border-right:1px solid #dfdbdb; } :last-child { - border-top: 1px solid #dfdbdb; - // border-left:1px solid #dfdbdb; + border-left: 1px solid #dfdbdb; } :nth-child(3) { - border-top: 1px solid #dfdbdb; + border-right: 1px solid #dfdbdb; } } } @@ -186,7 +201,42 @@ margin-left: 100upx; } + .infoBtn{ + image { + width: 54upx; + height: auto; + } + text-align: center; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + background: #FE6048; + border-radius: 28px 28px 28px 28px; + color: #FFFFFF; + } } } } + + .dialog { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.8); + color: #fff; + + .content { + height: 60%; + width: 80%; + overflow: auto; + } + } + \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index f8ed790..d6b651b 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -84,7 +84,7 @@ - + 商品管理 查看全部 @@ -385,26 +385,26 @@ - + 我要找货 - - + + 数据统计 - - + + 会员管理 - + v-if="userInfo.user_type!=10&&userInfo.user_type!=20&&userInfo.user_type!=30"> + 进群有礼 diff --git a/static/user/hygl.png b/static/user/hygl.png new file mode 100644 index 0000000000000000000000000000000000000000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