From 7d4fb24cba5108bcb9669597c2a99b3702b20128 Mon Sep 17 00:00:00 2001 From: nige Date: Thu, 9 Feb 2023 17:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/component/TitleHeader.js | 10 +++- pages/info/postProductInfo/index.js | 18 +++--- pages/list/activitynew/index.js | 16 +++-- pages/list/activitynew/index.wxml | 17 +++++- pages/list/activitynew/index.wxss | 23 +++++--- pages/map/index.wxml | 4 +- pages/order/components/address/index.js | 20 ++++++- pages/order/postOrder/index.js | 65 ++++++++++----------- pages/user/address/add/index.wxml | 2 +- pages/user/order/museumOrderInfo/index.wxml | 7 ++- 11 files changed, 118 insertions(+), 66 deletions(-) diff --git a/app.js b/app.js index 4d36d15..981ebb5 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest53? true : false; + data.isTest = data.isTest54? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/pages/component/TitleHeader.js b/pages/component/TitleHeader.js index 3791421..7c384b3 100644 --- a/pages/component/TitleHeader.js +++ b/pages/component/TitleHeader.js @@ -73,7 +73,15 @@ Component({ // wx.switchTab({ // url: '/pages/user/user' // }) - // } + // } + else if (pages[pages.length-1].route.indexOf('pages/order/pay/index') != -1){ + console.log(pages[pages.length-1]); + wx.redirectTo({ + url:'/pages/user/order/list' + }) + } + + else if (pages[pages.length-1].route.indexOf('orderList') != -1){ console.log(11111); wx.navigateTo({ diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 5135dbe..ba80c6e 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -72,15 +72,15 @@ Page({ }) // 获取补贴 - commonApi.user_post("product/getProductAllowancePrice", { - product_code: res.data.product_code - }).then(resTwo => { - if (resTwo && resTwo.code == 1) { - this.setData({ - allowance_data: resTwo.data - }) - } - }) + // commonApi.user_post("product/getProductAllowancePrice", { + // product_code: res.data.product_code + // }).then(resTwo => { + // if (resTwo && resTwo.code == 1) { + // this.setData({ + // allowance_data: resTwo.data + // }) + // } + // }) this.BroswerRecord() }) // 获取评价列表 diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js index 0ba8d01..acb4921 100644 --- a/pages/list/activitynew/index.js +++ b/pages/list/activitynew/index.js @@ -10,7 +10,7 @@ Page({ data: { isYL: false, selectDay: new Date().getTime(), - days: ['日', '一', '二', '三', '四', '五', '六'], + days: [ '日','一', '二', '三', '四', '五', '六'], types: [null, 'show', 'exhibition', 'scene', 'movie', 'lecture', 'other'], weeks: [], pageNo: 1, @@ -20,7 +20,7 @@ Page({ total: 1, areas: ['姑苏', '吴江', '苏州'], area: 0, - type: 2, + type: 9, movieType: 1, moreFlag: true, lat: "", @@ -80,9 +80,10 @@ Page({ total: 1, pageNo: 1, moreFlag: true, - keywords: "", - realKeywords: "" + // keywords: "", + // realKeywords: "" }) + console.log(this.data.type); this.getList(); }, changeArea: function (e) { @@ -110,6 +111,7 @@ Page({ date: putDate, isSelect: i == myDate }; + reslist.push(item); } this.setData({ @@ -353,7 +355,11 @@ Page({ list: [], pageNo: 1, total: 1, - moreFlag: true + moreFlag: true, + date:null, + isYL: true, + selectDay: null + }) this.getList(); }, diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 1de916c..9d75834 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -15,6 +15,10 @@ + + + 全部 + 展览 @@ -42,14 +46,21 @@ diff --git a/pages/list/activitynew/index.wxss b/pages/list/activitynew/index.wxss index aa2624a..c53c97a 100644 --- a/pages/list/activitynew/index.wxss +++ b/pages/list/activitynew/index.wxss @@ -65,18 +65,18 @@ border-radius: 3rpx; .yulan { flex-shrink: 0; width: 60rpx; - padding-right: 20rpx; - line-height: 80rpx; text-align: right; background: #fff; border-radius: 0px 30rpx 30rpx 0px; - color: #0B898E; + color: #333333; white-space: nowrap; font-size: 26rpx; + display: flex; + flex-direction: column; + } .yulan.active { - background:#0B898E; - color:#fff; + color: #0B898E; } .date-item { font-size: 26rpx; @@ -85,10 +85,17 @@ border-radius: 3rpx; display: flex; flex-direction: column; justify-content: center; + width: 79rpx; +height:100%; + + + } .date-item.active { font-weight:500; color: #0B898E; + +background: rgba(11, 137, 142, .1); } .calendar-img { width: 70rpx; @@ -101,12 +108,12 @@ border-radius: 3rpx; border-radius: 30rpx 0px 0px 30rpx; } .calendar-img image { - width: 56rpx; - height: 60rpx; + width: 50rpx; + height: 50rpx; display: block; } .calendar-img.active { - background-color: #0B898E; + } .top-fixed-activity { background: #f7f7f7; diff --git a/pages/map/index.wxml b/pages/map/index.wxml index fb97d33..639b2c4 100644 --- a/pages/map/index.wxml +++ b/pages/map/index.wxml @@ -31,10 +31,10 @@ 文保单位 - + 运河十景 diff --git a/pages/order/components/address/index.js b/pages/order/components/address/index.js index 28fcdb0..8be68f1 100644 --- a/pages/order/components/address/index.js +++ b/pages/order/components/address/index.js @@ -85,7 +85,7 @@ Component({ else { commonApi.user_post("token/check").then(res=>{ if(res.code==1){ - this.getLinkmanList() + this.getDefault() } }) } @@ -227,6 +227,24 @@ Component({ showMask:false }) this.triggerEvent("setAddress",item) + }, + getDefault:function(e){ + commonApi.user_post("token/check").then(res=>{ + if(res.code==1){ + userApi.user_post("user/getDefaultContact",{ + contactType:"CONSIGNEE" + }).then(res=>{ + console.log(res) + this.setData({ + selectLinkman:res.data + }) + if(res.data){ + this.triggerEvent("setAddress",res.data) + } + this.getLinkmanList() + }) + } + }) } } }) diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js index 16edcbe..5248ae4 100644 --- a/pages/order/postOrder/index.js +++ b/pages/order/postOrder/index.js @@ -28,7 +28,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.setData({ from: options.from, kjId: app.globalData.kjId, @@ -269,38 +268,38 @@ Page({ coupon: app.globalData.couponInfo }) // 获取补贴 - if (this.data.product.length == 1) { - commonApi.user_post("product/getProductAllowancePrice", { - product_code: this.data.product[0].product.product_code - }).then(resTwo => { - console.log(resTwo) - if (resTwo && resTwo.code == 1) { - this.setData({ - allowance_data: resTwo.data - }) - let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price) - let sInfo = this.data.product[0].sku - console.log(9999, this.data.allowance_data.discount_rate / 100 * sInfo.price) - console.log(9999, spread_price) - if (spread_price > 0) { - if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) { - this.setData({ - allowance_price: spread_price - }) - } else { - this.setData({ - allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price - }) - } - this.changePrice() - } else { - this.setData({ - allowance_price: 0 - }) - } - } - }) - } + // if (this.data.product.length == 1) { + // commonApi.user_post("product/getProductAllowancePrice", { + // product_code: this.data.product[0].product.product_code + // }).then(resTwo => { + // console.log(resTwo) + // if (resTwo && resTwo.code == 1) { + // this.setData({ + // allowance_data: resTwo.data + // }) + // let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price) + // let sInfo = this.data.product[0].sku + // console.log(9999, this.data.allowance_data.discount_rate / 100 * sInfo.price) + // console.log(9999, spread_price) + // if (spread_price > 0) { + // if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) { + // this.setData({ + // allowance_price: spread_price + // }) + // } else { + // this.setData({ + // allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price + // }) + // } + // this.changePrice() + // } else { + // this.setData({ + // allowance_price: 0 + // }) + // } + // } + // }) + // } }, /** diff --git a/pages/user/address/add/index.wxml b/pages/user/address/add/index.wxml index 42336f3..48a27e6 100644 --- a/pages/user/address/add/index.wxml +++ b/pages/user/address/add/index.wxml @@ -24,7 +24,7 @@ 设为默认 - + 保存 diff --git a/pages/user/order/museumOrderInfo/index.wxml b/pages/user/order/museumOrderInfo/index.wxml index df360d4..04d9025 100644 --- a/pages/user/order/museumOrderInfo/index.wxml +++ b/pages/user/order/museumOrderInfo/index.wxml @@ -32,11 +32,11 @@ 商品总价 ¥{{info.total_money/100}} - + 运费 ¥{{info.total_post_fee/100}} - + 优惠券抵扣 -¥{{info.preference_money/100}} @@ -78,6 +78,9 @@ {{item.title}}:{{item.id_number}} + + 手机号:{{item.tel}} +