diff --git a/pages.json b/pages.json index 16f2f6b..ed4a4f4 100644 --- a/pages.json +++ b/pages.json @@ -431,6 +431,12 @@ "navigationBarTitleText" : "进群抽奖" } }, + { + "path": "activity/xinjiang", + "style": { + "navigationBarTitleText" : "新疆馆" + } + }, { "path": "user/comment", "style": { diff --git a/static/css/base.css b/static/css/base.css index d758ad4..327118f 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -108,6 +108,26 @@ view { width: 347.33rpx; height: 320.67rpx; } + .header-left-line{ + width: 8rpx; + height: 27rpx; + background: #363636; + border-radius: 13rpx 13rpx 13rpx 13rpx; + margin-right: 8rpx; + } + +.fixPrice{ + font-weight: 500; + font-size: 32rpx; + color: #FA0005; +} +.fixPrice .fixNum{ + font-size: 24rpx; +} +.fixPrice:before{ + content: "¥"; + font-size: 24rpx; +} .hover-use-type{ position: absolute; diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 9175416..4f79c9a 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -50,6 +50,19 @@ Vue.prototype.formateRichText = str => { return str; } +// 格式化价格 +Vue.prototype.formatePrice = str => { + try { + str = str.toFixed(2) + let priceObj = {allPrice: str, iNum: str.split('.')[0], fNum: str.split('.')[1]} + + return `
${priceObj.iNum}.${priceObj.fNum}
` + } catch(e) { + console.log(e) + return str + } +} + // 获取路径参数 Vue.prototype.getUrlPara = url => { let arrUrl = url.split("?"); diff --git a/subPackages/activity/dzxConSeason.vue b/subPackages/activity/dzxConSeason.vue index d717bd1..b48d34a 100644 --- a/subPackages/activity/dzxConSeason.vue +++ b/subPackages/activity/dzxConSeason.vue @@ -6,10 +6,14 @@ - - + + + + + 一键领取 + @@ -195,6 +199,30 @@ }) }, + getAllCoupon() { + if (!this.isReceive) { + uni.showToast({ + title: "短时间内请勿重复点击!", + icon: 'none' + }) + return; + } + this.isReceive = false + setTimeout(() => {this.isReceive = true}, 3000) + let ids = this.couponList.map(x=>x.id).join(',') + this.Post({ + ids: ids, + is_all: 1, + },"/api/coupon/getNewCouponsByActivitiesIds").then(res => { + if (res) { + uni.showToast({ + title: res.data, + icon: 'none' + }) + } + }) + }, + viewDetail(item) { this.gotoDetailByType(item) @@ -452,4 +480,18 @@ bottom: 66rpx; right: 26rpx; } + + .getAllCoupon{ + width: 347rpx; + height: 67rpx; + background: linear-gradient( 92deg, #FFB86C 0%, #FE9D09 100%); + border-radius: 13rpx 13rpx 13rpx 13rpx; + font-family: Alibaba PuHuiTi, Alibaba PuHuiTi; + font-weight: 500; + font-size: 32rpx; + color: #FFFFFF; + text-align: center; + line-height: 67rpx; + margin: 24rpx auto 30rpx; + } \ No newline at end of file diff --git a/subPackages/activity/xinjiang.vue b/subPackages/activity/xinjiang.vue new file mode 100644 index 0000000..fe6a4af --- /dev/null +++ b/subPackages/activity/xinjiang.vue @@ -0,0 +1,271 @@ + + + + + \ No newline at end of file diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue index ce8778f..e18c16c 100644 --- a/subPackages/techan/order.vue +++ b/subPackages/techan/order.vue @@ -345,11 +345,11 @@ export default { uni.$off("updateDataByConnect",this.getDataByConnect) }, onReady () { - // this.$nextTick(()=>{ - // setTimeout(()=>{ - // this.getMaxCouponData() - // },1000) - // }) + this.$nextTick(()=>{ + setTimeout(()=>{ + this.getMaxCouponData() + },1000) + }) }, methods: { submitAgreeAdress (val) { @@ -889,13 +889,14 @@ export default { // 获取最大优惠券 async getMaxCouponData () { + console.log("enter") let allPrice =0 let skuIds = [] - if (this.info && Array.isArray(this.info.goods)) { - this.info.goods.forEach(v=>{ - allPrice += v.skuInfo.money*v.skuInfo.buyNum - if (v.skuInfo.buyNum>0) { - skuIds.push(v.skuInfo.id) + if (this.orderList && Array.isArray(this.orderList)) { + this.orderList.forEach(v=>{ + allPrice += v.sInfo.price*v.sInfo.buyNum + if (v.sInfo.buyNum>0) { + skuIds.push(v.sInfo.id) } }) }