From 125da454eb291c7df40567101a2be9cde0b91039 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Tue, 4 Jan 2022 18:35:56 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E4=BB=A3=E7=90=86=E5=95=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=91=E6=8D=A2=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utils/Api.js | 7 +- pages.json | 1 - .../coupons-info-details.vue | 457 ++++++------ pages/goods/goods-list/goods-list.vue | 105 +-- pages/login/login.vue | 4 +- pages/tabBar/category/category.vue | 39 +- pages/user/agentCoupons/agentCoupons.vue | 668 +++++++++--------- pages/user/minePromotion/minePromotion.vue | 538 ++++++++------ static/css/login.scss | 3 +- uni.scss | 4 + 10 files changed, 983 insertions(+), 843 deletions(-) diff --git a/Utils/Api.js b/Utils/Api.js index 6a2d23c..a5a7d9d 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -337,7 +337,12 @@ export const getCodeListByAgentCoupon = params => { // 生成二维码 export const generateCode = params => { return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data); -} +} +// 兑换码填写备注 +export const highremark = params => { + return POSTBREST('POST', `${brestBase}/highCouponAgent/remark`, params).then(res => res.data); +} + // 查看二维码 export const getCodeById = params => { return POSTBREST('GET', `${brestBase}/highCouponAgent/getCodeById`, params).then(res => res.data); diff --git a/pages.json b/pages.json index 14925eb..2e2af72 100644 --- a/pages.json +++ b/pages.json @@ -130,7 +130,6 @@ "navigationBarTitleText": "分类", "navigationBarBackgroundColor": "#0083f5", "backgroundColorTop": "#0083f5", - "navigationBarTextStyle": "white", "app-plus": { "titleNView": false, //禁用原生导航栏 "bounce": "none" diff --git a/pages/goods/coupons-info-details/coupons-info-details.vue b/pages/goods/coupons-info-details/coupons-info-details.vue index 6b06dad..c6c92b5 100644 --- a/pages/goods/coupons-info-details/coupons-info-details.vue +++ b/pages/goods/coupons-info-details/coupons-info-details.vue @@ -1,228 +1,237 @@ - - - - - diff --git a/pages/goods/goods-list/goods-list.vue b/pages/goods/goods-list/goods-list.vue index 49aad80..a57e57f 100644 --- a/pages/goods/goods-list/goods-list.vue +++ b/pages/goods/goods-list/goods-list.vue @@ -34,13 +34,16 @@ {{ row.discountPrice*100}} - ¥ {{ row.discountPrice*100}} + ¥ {{ row.discountPrice}} - - {{ row.salesPrice*100}} + + + {{ row.salesPrice*100}} + + ¥{{ row.salesPrice}} @@ -80,15 +83,15 @@ pageSize: 10, isNoMoreData: false, typeId: '', - couponName: '', - brandid : '', + couponName: '', + brandid: '', goodtyid: '' }; }, onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数 - this.typeId = option.id; - this.brandid = option.brandId; + this.typeId = option.id; + this.brandid = option.brandId; this.goodtyid = option.goodsId; if (option.id == 1) { uni.setNavigationBarTitle({ @@ -108,19 +111,19 @@ uni.setNavigationBarTitle({ title: '优选商品' }); - this.getCmsContent('CMS_PRE_LIST'); - this.getBrandCouponList(); + this.getCmsContent('CMS_PRE_LIST'); + this.getBrandCouponList(); } }, onPageScroll(e) { }, //上拉加载,需要自己在page.json文件中配置"onReachBottomDistance" - onReachBottom() { - if(this.typeId == 3){ - this.getBrandCouponList(); - }else{ - this.getCouponListArea(); + onReachBottom() { + if (this.typeId == 3) { + this.getBrandCouponList(); + } else { + this.getCouponListArea(); } }, methods: { @@ -170,48 +173,48 @@ this.goodsList = []; } }) - }, - //优选商品列表 - getBrandCouponList() { - uni.showLoading({ - title: '加载中...' - }) - if (this.isNoMoreData) { - uni.hideLoading() - return false; - } - let pagenum = this.pageNum; - let params = { - regionId: app.globalData.cityId, - pageNum: pagenum, - pageSize: this.pageSize, - brandId: this.brandid, - goodsTypeId: this.goodtyid, - couponName: this.couponName - } - getBrandCouponList(params).then(res => { - uni.hideLoading(); - if (res.return_code == '000000') { - this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; - this.goodsList = this.goodsList.concat(res.return_data.list); - if (res.return_data.total == (this.pageNum * this.pageSize)) { - this.isNoMoreData = true; - } - this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; - } else { - this.goodsList = []; - } - }) + }, + //优选商品列表 + getBrandCouponList() { + uni.showLoading({ + title: '加载中...' + }) + if (this.isNoMoreData) { + uni.hideLoading() + return false; + } + let pagenum = this.pageNum; + let params = { + regionId: app.globalData.cityId, + pageNum: pagenum, + pageSize: this.pageSize, + brandId: this.brandid, + goodsTypeId: this.goodtyid, + couponName: this.couponName + } + getBrandCouponList(params).then(res => { + uni.hideLoading(); + if (res.return_code == '000000') { + this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; + this.goodsList = this.goodsList.concat(res.return_data.list); + if (res.return_data.total == (this.pageNum * this.pageSize)) { + this.isNoMoreData = true; + } + this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; + } else { + this.goodsList = []; + } + }) }, toSearch() { this.pageNum = 1; this.pageSize = 10; this.isNoMoreData = false; this.goodsList = []; - if(this.typeId == 3){ - this.getBrandCouponList(); - }else{ - this.getCouponListArea(); + if (this.typeId == 3) { + this.getBrandCouponList(); + } else { + this.getCouponListArea(); } }, //商品跳转 diff --git a/pages/login/login.vue b/pages/login/login.vue index 291068a..eb0334c 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -10,11 +10,11 @@ + placeholder="请输入账号" v-model="phoneNumber" placeholder-style="color: #333333;" /> + placeholder="请输入密码" v-model="passwd" password=true placeholder-style="color: #333333;" /> 登 录 diff --git a/pages/tabBar/category/category.vue b/pages/tabBar/category/category.vue index aef54a5..2797422 100644 --- a/pages/tabBar/category/category.vue +++ b/pages/tabBar/category/category.vue @@ -18,15 +18,14 @@ - {{showCategoryIndex}} + + + {{showCategoryIndex}} - {{showCategoryIndex}} - - --> + @@ -53,7 +52,7 @@ - + @@ -82,14 +81,14 @@ data() { return { showCategoryIndex: '', - showCategoryIndexId: '', + showCategoryIndexId: '', headerPosition: "fixed", imagewxUrl: app.globalData.imageWxImg, imgadres: 'jt.png', imgadres2: 'xiala.png', imgadres1: 'noorder.png', imgadres4: 'dh.png', - imgadres3: 'noorder.png', + imgadres3: 'noorder.png', imgadres5: 'cusservice.png', city: "", imageUrl: app.globalData.imgUrl, @@ -99,7 +98,7 @@ pageNum: 1, pageSize: 10, isNoMoreData: false - // loadingText: '点击加载更多' + // loadingText: '点击加载更多' } }, onPageScroll(e) { @@ -186,7 +185,7 @@ } getMerchantList(params).then(res => { if (res.return_code == '000000' && res.return_data != '') { - this.MerchantList = res.return_data; + this.MerchantList = res.return_data; this.showCategoryIndex = res.return_data[0].merchantName; this.showCategoryIndexId = res.return_data[0].id; this.getStoreListByMerchant(); @@ -242,10 +241,9 @@ }, //分类切换显示 - showCategory(index, item) { - this.showCategoryIndex = index; - this.$refs.popup.hide(); - this.showCategoryIndexId = item; + showCategory(e) { + this.showCategoryIndex = this.MerchantList[e.target.value].merchantName; + this.showCategoryIndexId = this.MerchantList[e.target.value].id; this.pageNum = 1; this.pageSize = 10; this.isNoMoreData = false; @@ -340,11 +338,10 @@ font-size: 14px; margin-top: 10px; color: #333333; - - .stuimg { - width: 10px; - vertical-align: middle; - } + } + .stuimg { + width: 10px; + vertical-align: middle; } .loading-text { diff --git a/pages/user/agentCoupons/agentCoupons.vue b/pages/user/agentCoupons/agentCoupons.vue index 98d9103..e23bd9f 100644 --- a/pages/user/agentCoupons/agentCoupons.vue +++ b/pages/user/agentCoupons/agentCoupons.vue @@ -1,318 +1,352 @@ - - - - - diff --git a/pages/user/minePromotion/minePromotion.vue b/pages/user/minePromotion/minePromotion.vue index 6b9dc48..deeba7b 100644 --- a/pages/user/minePromotion/minePromotion.vue +++ b/pages/user/minePromotion/minePromotion.vue @@ -1,226 +1,314 @@ - - - - - diff --git a/static/css/login.scss b/static/css/login.scss index eddecf0..4c3f4e7 100644 --- a/static/css/login.scss +++ b/static/css/login.scss @@ -48,7 +48,8 @@ page { height: 50upx; font-size: 16px; color: #333333; - font-weight: blod; + font-weight: blod; + padding-left: 10px; } } diff --git a/uni.scss b/uni.scss index 5462e4d..0a178fb 100644 --- a/uni.scss +++ b/uni.scss @@ -422,6 +422,10 @@ $uni-font-size-paragraph:30upx; .height120{ height: 120px; } + +.height130{ + height: 130px; +} .height150{ height: 150px;