diff --git a/config/config.js b/config/config.js index e18d385..2bb59ce 100755 --- a/config/config.js +++ b/config/config.js @@ -58,6 +58,10 @@ var config = { * 优惠券详情 */ couponDetail: "/wxCoupon/detail", + /** + * 购物车订单详情 + */ + goodsDetail:"/order/goodsDetail", /** * 优惠券图文混排详情 */ @@ -86,6 +90,10 @@ var config = { * 下订单 */ orderSave: "/order/save", + /** + * 多少量下单 + */ + goodsShopCartSave:"/order/goodsShopCartSave", /** * 支付订单 */ @@ -95,14 +103,17 @@ var config = { */ payOrderUpdate: "/pay/updatePayOrder", /** - * 订单列表 + * 订单列表 /order/list */ - orderList: "/order/list", + orderList: "/order/listGoods", + getWeRunData: '/user/getWeRunData', /** * 订单详情 */ - orderDetail: "/order/detail", + orderDetail: "/order/detail_v1", + // 券包详情 + // orderDetailAll: "/order/detail_v1", /** * 券包 */ @@ -367,6 +378,10 @@ var config = { siteCheck: "/userBasicInfoAddress/findById", //删除收获地址 siteDel: "/userBasicInfoAddress/del", + //确认收货 + verify:"/couponOrder/verify", + //全包下订单 + couponPackageSave :"/order/couponPackageSave", }, weapp: { AppId: weappId diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 3705577..78fe302 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -203,11 +203,16 @@ Page({ gohome(e){ console.log(e.currentTarget.dataset.id,"123") wx.navigateTo({ - url: `/pages/fillIndent/fillIndent?id=${e.currentTarget.dataset.id}`, + url: `/pages/fillIndent/fillIndent?couponChannelId=${e.currentTarget.dataset.couponchannelid}&couponId=${e.currentTarget.dataset.couponid}&shippingtype=${e.currentTarget.dataset.shippingtype}`, }) }, - + gochild(e){ + let id = e.currentTarget.dataset.id + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponIds=${id}`, + }) + }, //获取当前登录用户信息 getUserInfo: function() { let that = this; @@ -508,8 +513,16 @@ Page({ that.setData({ onshow: false }) - if (options && options.couponChannelId) { - that.getDetail(options.couponChannelId, 'notendclock'); + if (options && (options.couponChannelId || options.couponIds)) { + if (options.couponIds){ + this.setData({ + couponIds: options.couponIds + }) + that.getDetail(options.couponIds, 'notendclock'); + }else{ + that.getDetail(options.couponChannelId, 'notendclock'); + } + } /** @@ -551,11 +564,15 @@ Page({ }, getDetail: function(couponChannelId, flag) { let that = this; + let data={}; + if (that.data.couponIds){ + data.couponId = couponChannelId + }else{ + data.couponChannelId = couponChannelId + } var parmer = { url: config.api.couponDetail, - data: { - couponChannelId: couponChannelId - } + data:data }; Http.get(parmer) .then(res => { @@ -719,7 +736,6 @@ Page({ * 支付订单更新 */ payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => { - console.log("*-----------------") let that = this; // 支付成功 Http.post({ @@ -791,6 +807,8 @@ Page({ } }) }, + // 券包支付 + /** * 发起支付 */ @@ -832,14 +850,32 @@ Page({ couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId, formId: "" + that.data.formId, + } + } + console.log(data,"data") + let url = "" + let tempObj; + let tempArr = [] + if(that.data.data.type==12){ + url = config.api.couponPackageSave + tempObj={ + signleOrder:{ + couponChannelId: "" + that.data.couponChannelId, + couponId: "" + that.data.couponId, + formId: "" + that.data.formId, + }, + count:"1" } + tempArr.push(tempObj) + }else{ + url = config.api.orderSave } /** * orderSave 下单 */ return Http.post({ - url: config.api.orderSave, - data: data + url: url, + data: that.data.data.type == 12 ? JSON.stringify(tempArr):data }); }) .catch(err => { @@ -1056,6 +1092,7 @@ Page({ }).then(res => { that.setData({ disOrderNumber: res.data.orderNumber, + composeOrderType: res.data.composeOrderType }) if (res.data && res.data.pressEndDate) { that.setData({ @@ -1074,7 +1111,7 @@ Page({ success: function(res) { if (res.confirm) { wx.navigateTo({ - url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}`, + url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}&composeOrderType=${that.data.composeOrderType}`, }) } } diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 3432f22..d58d3e4 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -105,7 +105,7 @@ 使用条件: 满{{data.usePriceStr}}元可用 - + 限购{{data.useLimitQuantity}}张 @@ -117,7 +117,17 @@ - + + + 购买须知 + + + + {{item.title}} + ¥{{item.priceStr}} + + + 购买须知 @@ -146,13 +156,15 @@ - - - + diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index b3ff2df..d335604 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -111,7 +111,8 @@ button::after { border-radius: 8rpx; transition: all 0.6s; } -.home{ + +.home { position: relative; background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); height: 94rpx; @@ -124,7 +125,8 @@ button::after { line-height: 94rpx; border-radius: 21rpx; } -.arrive{ + +.arrive { position: relative; background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); height: 94rpx; @@ -929,3 +931,50 @@ checkbox-group, radio-group { .jifen { font-size: 30rpx; } + +.childText { + color: #333; + letter-spacing: 0; + font-size: 30rpx; + height: 70rpx; + line-height: 70rpx; + background-color: #fff; + width: 92%; + padding: 0 4%; +} + +.childBox { + width: 92%; + padding: 0 4%; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.childItem { + width: 48%; + background-color: #fff; + border-radius: 10rpx; + overflow: hidden; + margin: 20rpx 0; +} + +.childImg { + width: 90%; + margin: 10px auto; + display: block; +} + +.childName { + margin-top: 10rpx; + margin: 10px; + font-size: 24rpx; + color: #919191; +} + +.childMoney { + color: #fd782d; + font-size: 24rpx; + margin: 10px; + text-decoration: line-through; +} diff --git a/pages/fillIndent/fillIndent.js b/pages/fillIndent/fillIndent.js index d0eb470..6085d64 100644 --- a/pages/fillIndent/fillIndent.js +++ b/pages/fillIndent/fillIndent.js @@ -10,48 +10,52 @@ Page({ */ data: { navigationBarHeight, - num:1, - showShade:false, - coverImg:"", - title:"", - salePriceStr:"",//单价 - freightPriceStr:"",//运费 - remainInventory: "",//库存 - seti:[], - area:"", - address:"", - consignee:"", - mobile:"", - }, - goAddStie(){ + num: 1, + showShade: false, + coverImg: "", + title: "", + salePriceStr: "", //单价 + freightPriceStr: "", //运费 + remainInventory: "", //库存 + seti: [], + area: "", + address: "", + consignee: "", + mobile: "", + couponChannelId: "", + thenArr: {}, //选中的地址对象 + contentType:0, + shippingtype:1,//1是自提 2配送 + }, + goAddStie() { wx.navigateTo({ url: '/pages/siteAdd/siteAdd?url=/pages/fillIndent/fillIndent', }) }, - setSite(e){ + setSite(e) { let id = e.currentTarget.dataset.id let arr = [] - arr = this.data.seti.filter(item=>{ + arr = this.data.seti.filter(item => { return item.id == id })[0] - console.log(arr) this.setData({ + thenArr: arr, area: arr.regionStr, address: arr.address, consignee: arr.consignee, mobile: arr.mobile, }) }, - getSetiLsit(){ + getSetiLsit() { Http.get({ url: config.api.siteList, - data:{ + data: { pageNum: 1, pageSize: 1000 } - }).then(res=>{ + }).then(res => { let temp = res.data.list - if(temp.length>0){ + if (temp.length > 0) { temp.map(item => { // let regionStr = "" @@ -68,17 +72,20 @@ Page({ }) let tempRegion = JSON.parse(temp[0].region) let str = "" - tempRegion.map(item => { str += item }) + tempRegion.map(item => { + str += item + }) this.setData({ + thenArr: temp[0], area: str, address: temp[0].address, consignee: temp[0].consignee, mobile: temp[0].mobile }) } - - - + + + }).catch(err => { wx.showToast({ title: err.message ? err.message : err.data, @@ -88,75 +95,209 @@ Page({ }); }) }, - addNum(){ + addNum() { let num = this.data.num - if (this.data.num >= this.data.remainInventory){ + if (this.data.num >= this.data.remainInventory) { wx.showToast({ title: '购买总数超库存', icon: 'none', duration: 2000, }) - }else{ + } else { num = num + 1 this.setData({ num: num }) } - + }, - dleNum(){ + dleNum() { let num = this.data.num - if (this.data.num <=1){ + if (this.data.num <= 1) { wx.showToast({ title: '购买总数不能为0', icon: 'none', duration: 2000, }) - }else{ - + } else { + num = num - 1 this.setData({ - num: num + num: num }) } }, - hieShade(){ + hieShade() { this.setData({ - showShade:false + showShade: false }) }, - showTShade(){ + showTShade() { this.setData({ showShade: true }) }, + /** + * 支付订单更新 + */ + payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => { + // 支付成功 + Http.post({ + url: config.api.payOrderUpdate, + data: { + payOrderId: payOrderId, + composeOrderId: orderId, + status: status, + reason: reason + } + }).then(res => { + //订单详情 + wx.hideLoading() + wx.navigateTo({ + url: `/pages/order/detail/index?orderId=${orderId}&contentType=${_this.data.contentType}&composeOrderType=${composeOrderType}&dingdan=order` + }); + }) + .catch(err => { + console.log(err); + if (!type) { + setTimeout(function () { + _this.payOrderUpdate(orderId, payOrderId, status, reason, type, _this, composeOrderType); + }, 2000) + } + }) + }, + pay() { + if (this.data.area == "") { + wx.showToast({ + title: "请选择地址", + icon: 'none', + duration: 2000, + + }); + return + } + let data = [] + let tempObj = { + signleOrder: { + couponChannelId: this.data.couponChannelId, + couponId: this.data.couponId, + formId: "" + }, + count: this.data.num, + shippingType: this.data.shippingtype, //1自提 2配送 + } + if (this.data.shippingtype==2){ + tempObj.address = this.data.thenArr + } + + data.push(tempObj) + Http.post({ + url: config.api.goodsShopCartSave, + data: JSON.stringify(data) + }).then(res => { + let {mainOrderId,composeOrderType} = { ...res.data} + console.log(mainOrderId, composeOrderType) + Http.post({ + url: config.api.payOrderCreate, + data: { + orderId: mainOrderId, + composeOrderType: composeOrderType + } + }).then(res => { + var payOrderId = "" + res.data.payOrderId; + let that = this + wx.requestPayment({ + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.package, + signType: (res.data.signType) ? res.data.signType : "MD5", + paySign: res.data.paySign, + success: res => { + wx.showLoading({ + title: '订单正在处理中...', + }) + that.payOrderUpdate(mainOrderId, payOrderId, 1, "", "", that, composeOrderType) + + }, + fail: res => { + wx.showToast({ + title: '支付已取消', + icon: 'none', + duration: 2000, + }) + } + }) + }).catch(err => { + wx.showToast({ + title: err.message ? err.message : err.data, + icon: 'none', + duration: 2000, + }); + }) + }).catch(err => { + wx.showToast({ + title: err.message ? err.message : err.data, + icon: 'none', + duration: 2000, + }); + }) + }, /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: function(options) { + this.setData({ - id:options.id + couponChannelId: options.couponChannelId, + couponId: options.couponId, + shippingtype: options.shippingtype }) - this.getCouponDetail() - this.getSetiLsit() + Http.get({ + url: config.api.checkUserStatus, + data: { + token: app.globalData.token + } + }).then(res => { + + + Http.get({ + url: config.api.checkPhoneStatus, + data: {} + }).then(res => { + //授权完成 开始支付 + }).catch(err => { + wx.redirectTo({ + url: `/pages/getphoneInfo/index?path=fi&fillIndentId=${this.data.couponChannelId}&couponId${this.data.couponId}` + }); + }) + }).catch(err => { + wx.navigateTo({ + url: `/pages/getuserinfo/index?fromflag=fillIndent&fillIndentId=${this.data.couponChannelId}&couponId${this.data.couponId}`, + }) + }) + + + }, - getCouponDetail(){ + getCouponDetail() { Http.get({ url: config.api.couponDetail, - data:{ - couponChannelId:this.data.id + data: { + couponChannelId: this.data.couponChannelId } - }).then(res=>{ + }).then(res => { let temp = res.data this.setData({ coverImg: temp.coverImg, title: temp.title, salePriceStr: temp.salePriceStr, freightPriceStr: temp.freightPriceStr, - remainInventory: temp.remainInventory + remainInventory: temp.remainInventory, + contentType: res.data.contentType + }) - }).catch(err=>{ + }).catch(err => { wx.showToast({ title: err.message ? err.message : err.data, icon: 'none', @@ -169,49 +310,50 @@ Page({ /** * 生命周期函数--监听页面初次渲染完成 */ - onReady: function () { + onReady: function() { }, /** * 生命周期函数--监听页面显示 */ - onShow: function () { - + onShow: function() { + this.getCouponDetail() + this.getSetiLsit() }, /** * 生命周期函数--监听页面隐藏 */ - onHide: function () { + onHide: function() { }, /** * 生命周期函数--监听页面卸载 */ - onUnload: function () { + onUnload: function() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ - onPullDownRefresh: function () { + onPullDownRefresh: function() { }, /** * 页面上拉触底事件的处理函数 */ - onReachBottom: function () { + onReachBottom: function() { }, /** * 用户点击右上角分享 */ - onShareAppMessage: function () { + onShareAppMessage: function() { } }) \ No newline at end of file diff --git a/pages/fillIndent/fillIndent.wxml b/pages/fillIndent/fillIndent.wxml index b54e307..356ff9e 100644 --- a/pages/fillIndent/fillIndent.wxml +++ b/pages/fillIndent/fillIndent.wxml @@ -1,7 +1,7 @@ - - + + {{area}} @@ -43,7 +43,7 @@ 商品金额: ¥{{salePriceStr*num}} - + 运费: ¥{{freightPriceStr}} @@ -55,7 +55,7 @@ ¥{{(salePriceStr*num)+(freightPriceStr*1)}} - 支付 + 支付 diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index ae73e61..9cc5609 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -12,6 +12,8 @@ Page({ signActivity: "", mineFlag: null, skipUrl: 0, + fillIndentId:"", + couponId:"", // skip: app.globalData.skip }, onLoad: function(options) { @@ -27,6 +29,12 @@ Page({ that.setData({ paramData: options }) + if (options && options.fillIndentId && options.couponId){ + that.setData({ + fillIndentId: options.fillIndentId, + couponId: options.couponId + }) + } if (options && options.couponChannelId) { that.setData({ couponChannelId: options.couponChannelId @@ -108,6 +116,12 @@ Page({ return; } } + //线上配送 + if(that.data.path == "fi"){ + wx.redirectTo({ + url: `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}` + }) + } // 来着问卷 if (that.data.path =="wj"){ wx.redirectTo({ diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js index d26cd12..6263ce6 100755 --- a/pages/getuserinfo/index.js +++ b/pages/getuserinfo/index.js @@ -16,6 +16,7 @@ Page({ couponChannelIdflag: '', wjId: "", composeOrderType:"", + fillIndentId: "", }, //是否授权手机号 judgePhonelngo() { @@ -63,7 +64,13 @@ Page({ composeOrderType: options.composeOrderType }) } - + //线上配送 填写订单 + if (options && options.fillIndentId && couponId && options.couponId){ + that.setData({ + fillIndentId: options.fillIndentId, + couponId: options.couponId + }) + } // 来自优惠券列表券详情页面的 couponChannelId if (options && options.couponChannelIdflag) { that.setData({ @@ -597,7 +604,12 @@ Page({ app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, app.globalData.skip = 'redirectTo' that.judgePhonelngo() - } else { + } else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId){ + //线上配送 填写订单 + app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, + app.globalData.skip = 'redirectTo' + that.judgePhonelngo() + }else { app.globalData.skipUrl = "/index/index", app.globalData.skip = 'switchTab' that.judgePhonelngo() diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 4cb0a51..5cf3e17 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -9,6 +9,7 @@ Page({ * 页面的初始数据 */ data: { + showFlag:false, navigationBarHeight, succUrl: imgurl.succ.url, spcodeUrl: imgurl.spcode.url, @@ -31,8 +32,111 @@ Page({ supportTransfer:'', cardIf:false, contentType: 0, + orderFlag: false,//判断是不是线上配送 }, + setShow(){ + this.setData({ + showFlag:true + }) + }, + hieShow() { + this.setData({ + showFlag: false + }) + }, + //刷新订单 + updetail(){ + let that = this + let url = config.api.orderDetail + // let data = {} + + // if (that.data.orderFlag) { + // url = config.api.goodsDetail + // data = { + // mainOrderId: this.data.orderId + // } + // } else { + // data = { + // orderId: this.data.orderId + // } + // } + + Http.get({ + url: url, + data: { orderId: this.data.orderId} + }) + .then(res => { + wx.hideLoading(); + if (res.data.level==0){//单券 + if (res.code == 200) { + that.getUserInfo() + that.setData({ + showPage: true, + composeOrderType: res.data.composeOrderType + }) + } + let tempData = res.data + if (tempData.deliveryInfo) tempData.deliveryInfo = JSON.parse(tempData.deliveryInfo) + + that.setData({ + order: res.data, + supportTransfer: res.data.supportTransfer + }); + that.getStaticGame() + //createDate 创建时间 + var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss"); + that.setData({ + createDate: createDate + }); + }else{ + + // if (that.data.orderFlag) { + var createDate = util.formatTime(res.data.orderCouponVoList[0].createDate, "yyyy-MM-dd hh:mm:ss"); + let tempData = res.data.orderCouponVoList[0] + tempData.deliveryInfo = tempData.deliveryInfo ? JSON.parse(tempData.deliveryInfo) : "" + that.setData({ + order: tempData, + showPage: true, + createDate: createDate, + composeOrderType: tempData.composeOrderType + }) + console.log(that.data.order) + // } + } + + + }) + .catch(error => { + wx.hideLoading(); + wx.showModal({ + title: '提示', + content: error.errMsg, + showCancel: false + }) + }) + }, + //确认收货 + verify(){ + Http.post({ + url: config.api.verify, + data:{ + couponOrderId: this.data.order.couponOrderId + } + }).then(res=>{ + wx.showToast({ + title: '签收成功', + icon:"none" + }) + this.updetail() + }).catch(err=>{ + wx.showModal({ + title: '提示', + content: error.errMsg, + showCancel: false + }) + }) + }, phone: function (e) { let that = this; console.log(e); @@ -150,12 +254,21 @@ Page({ console.log(err); }) }, + + + + /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options.html) + let that = this; + if (options.dingdan && options.dingdan =="order"){ + that.setData({ + orderFlag:true//判断是不是线上配送 + }) + } that.setData({ orderId: options.orderId, contentType: options.contentType, @@ -170,40 +283,9 @@ Page({ wx.showLoading({ title: "加载中" }); - Http.get({ - url: config.api.orderDetail, - data: { - orderId: options.orderId - } - }) - .then(res => { - wx.hideLoading(); - if(res.code == 200){ - that.getUserInfo() - that.setData({ - showPage:true, - composeOrderType: res.data.composeOrderType - }) - } - that.setData({ - order: res.data, - supportTransfer: res.data.supportTransfer - }); - that.getStaticGame() - //createDate 创建时间 - var createDate = util.formatTime(res.data.createDate, "yyyy-MM-dd hh:mm:ss"); - that.setData({ - createDate: createDate - }); - }) - .catch(error=>{ - wx.hideLoading(); - wx.showModal({ - title: '提示', - content: error.errMsg, - showCancel:false - }) - }) + + that.updetail() + }, onShow:function(){ let that = this; @@ -360,9 +442,17 @@ Page({ wx.hideLoading(); }, 1600); setTimeout(() => { - wx.redirectTo({ - url: `/pages/order/detail/index?orderId=${orderId}` - }); + let url = "" + if (_this.data.orderFlag){ + wx.redirectTo({ + url: `/pages/order/detail/index?orderId=${orderId}&dingdan=order` + }); + }else{ + wx.redirectTo({ + url: `/pages/order/detail/index?orderId=${orderId}` + }); + } + }, 1600); } }); diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 81c978f..993b5c3 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -1,9 +1,9 @@ - + - + 交易成功 @@ -43,8 +43,9 @@ 只有支付完成的时 才显示兑换码 --> - - + + 兑换码: {{order.couponOrderId}} @@ -61,30 +62,65 @@ 订单编号: {{order.orderNumber}} + + 物流状态: + {{(order.shippingStatus==10||order.shippingStatus==14)?"待自提":order.shippingStatus==15?"已自提":order.shippingStatus==20?"待发货":order.shippingStatus==24?"待收货":order.shippingStatus==25?"已收货":""}} + + + 物流信息: + {{(order.deliveryInfo.courierInput+": "+order.deliveryInfo.expressageIdInput)}} + + - - 实付金额: - - ¥ - {{order.payment/100}} - + + 实付金额: + + ¥ + {{order.payment/100}} + - + + + + 礼券: + + + + + + {{item.title}} + 面额:{{item.priceStr}}元 + + + + - + - + - + + 签收 + + + + 是否确认收到商品? + 签收后将完成订单 + + 确认签收 + 取消 + + \ No newline at end of file diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss index 227d1e8..e9f5e9f 100644 --- a/pages/order/detail/index.wxss +++ b/pages/order/detail/index.wxss @@ -1,8 +1,12 @@ @import "../../../app.wxss"; -button::after{ border: none; } + +button::after { + border: none; +} + page { height: auto !important; - background: #F4F5F9; + background: #f4f5f9; } .order { @@ -20,18 +24,18 @@ page { .tips { width: 92%; height: 70rpx; - background: #2C8DFF; + background: #2c8dff; color: #fff; padding: 20rpx 4% 0; } .merchantName { - color: #3C3C3C!important; + color: #3c3c3c !important; /* margin-left: 160rpx; */ font-size: 28rpx; float: left; margin-left: 30rpx; - height:100%; + height: 100%; line-height: 90rpx; } @@ -50,13 +54,14 @@ page { text-align: center; font-size: 28rpx; } -.msg text:nth-child(1){ + +.msg text:nth-child(1) { width: 90%; font-size: 28rpx; float: left; } -.msg text:nth-child(2){ +.msg text:nth-child(2) { font-size: 24rpx; float: left; margin-left: 35rpx; @@ -64,7 +69,7 @@ page { .section { /* margin-top: 2%; */ - background: #FFFFFF; + background: #fff; } .detail_msg { @@ -88,19 +93,21 @@ page { height: 120rpx; border-radius: 16rpx; } -.sectionTit{ + +.sectionTit { padding-top: 30rpx; - width:92%; - margin:0 4%; + width: 92%; + margin: 0 4%; font-size: 30rpx; - color: #3C3C3C; + color: #3c3c3c; } + .info view:nth-child(1) { padding: 0 4%; width: 80%; - overflow:hidden; - text-overflow:ellipsis; - white-space:nowrap; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .info { @@ -152,19 +159,52 @@ page { padding-left: 18rpx; text-decoration: line-through; } -.dhCode{ + +.dhCode { position: relative; height: 96rpx; line-height: 96rpx; - border-bottom: 1rpx solid #F4F5F9; + border-bottom: 1rpx solid #f4f5f9; padding-left: 5%; padding-right: 5%; } + .classif { - background: #FFFFFF; + background: #fff; width: 100%; margin-top: 20rpx; } + +.wuliu { + height: 96rpx; + line-height: 96rpx; + border-bottom: 1rpx solid #f4f5f9; + padding-left: 5%; + padding-right: 5%; + overflow: hidden; +} + +.left { + float: left; +} + +.sign { + width: 160rpx; + height: 60rpx; + line-height: 60rpx; + text-align: center; + background-color: #00c0ff; + color: #fff; + border-radius: 12rpx; + margin: 40rpx auto; + padding: 12rpx 20rpx; + font-size: 28rpx; +} + +.right { + float: right; +} + /* .classifShop{ background: #FFFFFF; @@ -187,7 +227,7 @@ page { line-height:94rpx; } */ -.classif > view:nth-child(2),.classif > view:nth-child(3){ +.classif > view:nth-child(2), .classif > view:nth-child(3) { position: relative; height: 94rpx; line-height: 94rpx; @@ -197,19 +237,22 @@ page { padding-right: 5%; /* border-bottom: 1rpx solid #eee; */ } + .classif > view text:nth-child(2) { font-size: 28rpx; - color: #3C3C3C; + color: #3c3c3c; } + .classif > view text:nth-child(1) { font-size: 28rpx; - color: #A6A6A6; + color: #a6a6a6; float: left; } .classif > view:nth-child(1) { display: block; } + .classif > view:nth-child(6) text:nth-child(2) { color: #666; } @@ -223,10 +266,11 @@ page { width: 50rpx; z-index: 1; } -.rArrow{ + +.rArrow { position: absolute; right: 26rpx; - height:20rpx; + height: 20rpx; width: 20rpx; margin: auto; bottom: 30rpx; @@ -342,7 +386,7 @@ radio { .fl { float: left; - color: #3C3C3C!important; + color: #3c3c3c !important; } .fr { @@ -416,19 +460,23 @@ radio { width: 350rpx; height: 350rpx; } -.left{ + +.left { float: left; } -.right{ - float:right; + +.right { + float: right; } -.RMB{ - color: #FD782D !important; + +.RMB { + color: #fd782d !important; font-size: 24rpx !important; float: right; } + .jine { - color: #FD782D !important; + color: #fd782d !important; font-size: 36rpx !important; font-weight: 400 !important; float: right; @@ -454,7 +502,7 @@ radio { } .buy { - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); + background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); height: 94rpx; width: 670rpx; margin: 0 auto; @@ -479,6 +527,7 @@ radio { width: 100%; height: 140rpx; } + /* .merchantVoList { width: 100%; @@ -502,6 +551,7 @@ radio { line-height: 94rpx; border-radius: 61rpx; } + /* .merchantImgUrl{ width: 90rpx; float: left; @@ -509,14 +559,122 @@ radio { z-index: 10; margin: 0 auto; } */ -.support-tansfer{ + +.support-tansfer { width: 690rpx; border-radius: 50rpx; margin-top: 60rpx; - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)!important; + background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%) !important; } -.share{ + +.share { width: 40rpx; height: 40rpx; margin-right: 20rpx; -} \ No newline at end of file +} + +.showT { + width: 100%; + height: 100vh; + background-color: rgba(0, 0, 0, 0.1); + position: fixed; + top: 0; + left: 0; + overflow: hidden; +} + +.titleBxo { + width: 70%; + margin: 300rpx auto; + background-color: #fff; + border-radius: 12rpx; + overflow: hidden; +} + +.titleBxo .text { + margin: 40rpx auto 20rpx auto; + text-align: center; + font-size: 36rpx; +} + +.titleBxo .p { + margin-top: 10rpx auto 30rpx auto; + font-size: 22rpx; + text-align: center; +} + +.btnBox { + overflow: hidden; + margin-top: 40rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-around; +} + +.le { + width: 40%; + height: 60rpx; + line-height: 60rpx; + border-radius: 10rpx; + background-color: #00c0ff; + text-align: center; + color: #fff; +} + +.ri { + width: 40%; + height: 60rpx; + line-height: 60rpx; + border-radius: 10rpx; + text-align: center; + border: 1rpx solid #919191; +} + +.childList { + padding-left: 5%; + padding-right: 5%; + overflow: hidden; +} + +.childTitle { + font-size: 28rpx; + color: #a6a6a6; + margin-top: 20rpx; +} + +.childItme { + border-radius: 12rpx; + overflow: hidden; + background-color: #fff; + margin: 20rpx; +} + +.orderName { + margin: 20rpx; + font-size: 26rpx; +} + +.chaildDetBox { + margin: 20rpx; + overflow: hidden; +} + +.chaildImg { + float: left; + width: 100rpx; + height: 100rpx; + border-radius: 10rpx; +} + +.childDataBox { + float: left; + width: 50%; + margin-left: 20rpx; +} + +.childPriceStr { + font-size: 24rpx; + color: #919191; + letter-spacing: 0; + margin-left: 20rpx; +} diff --git a/pages/order/index/index.js b/pages/order/index/index.js index dc1d53b..c8b2dad 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -54,9 +54,28 @@ Page({ }) }, gotopay: function (e) { - wx.navigateTo({ - url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'` - }) + let level = e.currentTarget.dataset.level + + // if (e.currentTarget.dataset.shipping == 1 || e.currentTarget.dataset.shipping == 2){//线上购物 + // wx.navigateTo({ + // url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&dingdan=order&flag='pay'` + // }) + // }else{ + // wx.navigateTo({ + // url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'` + // }) + // } + if (level == 0) { + wx.navigateTo({ + url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'` + }) + }else{ + wx.navigateTo({ + url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&dingdan=order&flag='pay'` + }) + } + + }, //再次购买 gotopayAgain: function (e) { @@ -131,6 +150,14 @@ Page({ tmpArr.push.apply(tmpArr, res.data.list); // 将砍价的状态过滤出来 console.log(tmpArr) + tmpArr.map(item=>{ + if(item.level==1){ + item.orderCouponVoList.map(itemChild=>{ + itemChild.createDate = util.formatTime(itemChild.createDate, "yyyy-MM-dd hh:mm:ss"); + }) + } + }) + that.setData({ list: tmpArr }) diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml index b4bc40d..bc7118b 100644 --- a/pages/order/index/index.wxml +++ b/pages/order/index/index.wxml @@ -11,7 +11,8 @@ - {{item.title}} + {{item.title}} + 订单id:{{item.composeOrderId}} 等待付款 拼团中 待退款 @@ -31,7 +32,8 @@ 付款成功 - + + @@ -45,6 +47,18 @@ + + + + + + + {{child.title}} + 价格:{{(child.salePrice)/100}}元 x {{child.couponNumber}} + 下单时间:{{child.createDate}} + + + 实付金额:{{item.payment/100}}元 @@ -55,13 +69,14 @@ 1完成 2取消 --> - + + 去查看 砍价详情 - + 去支付