Browse Source

【券包提测】

release
Your goule 3 years ago
parent
commit
036865ae83
14 changed files with 792 additions and 228 deletions
  1. +18
    -3
      config/config.js
  2. +48
    -11
      pages/coupon/detail/index.js
  3. +17
    -5
      pages/coupon/detail/index.wxml
  4. +51
    -2
      pages/coupon/detail/index.wxss
  5. +197
    -55
      pages/fillIndent/fillIndent.js
  6. +4
    -4
      pages/fillIndent/fillIndent.wxml
  7. +14
    -0
      pages/getphoneInfo/index.js
  8. +14
    -2
      pages/getuserinfo/index.js
  9. +128
    -38
      pages/order/detail/index.js
  10. +50
    -14
      pages/order/detail/index.wxml
  11. +193
    -35
      pages/order/detail/index.wxss
  12. +30
    -3
      pages/order/index/index.js
  13. +25
    -56
      pages/order/index/index.wxml
  14. +3
    -0
      pages/siteAdd/siteAdd.js

+ 18
- 3
config/config.js View File

@@ -58,6 +58,10 @@ var config = {
* 优惠券详情 * 优惠券详情
*/ */
couponDetail: "/wxCoupon/detail", couponDetail: "/wxCoupon/detail",
/**
* 购物车订单详情
*/
goodsDetail:"/order/goodsDetail",
/** /**
* 优惠券图文混排详情 * 优惠券图文混排详情
*/ */
@@ -86,6 +90,10 @@ var config = {
* 下订单 * 下订单
*/ */
orderSave: "/order/save", orderSave: "/order/save",
/**
* 多少量下单
*/
goodsShopCartSave:"/order/goodsShopCartSave",
/** /**
* 支付订单 * 支付订单
*/ */
@@ -95,14 +103,17 @@ var config = {
*/ */
payOrderUpdate: "/pay/updatePayOrder", payOrderUpdate: "/pay/updatePayOrder",
/** /**
* 订单列表
* 订单列表 /order/list
*/ */
orderList: "/order/list",
orderList: "/order/listGoods",

getWeRunData: '/user/getWeRunData', getWeRunData: '/user/getWeRunData',
/** /**
* 订单详情 * 订单详情
*/ */
orderDetail: "/order/detail",
orderDetail: "/order/detail_v1",
// 券包详情
// orderDetailAll: "/order/detail_v1",
/** /**
* 券包 * 券包
*/ */
@@ -367,6 +378,10 @@ var config = {
siteCheck: "/userBasicInfoAddress/findById", siteCheck: "/userBasicInfoAddress/findById",
//删除收获地址 //删除收获地址
siteDel: "/userBasicInfoAddress/del", siteDel: "/userBasicInfoAddress/del",
//确认收货
verify:"/couponOrder/verify",
//全包下订单
couponPackageSave :"/order/couponPackageSave",
}, },
weapp: { weapp: {
AppId: weappId AppId: weappId


+ 48
- 11
pages/coupon/detail/index.js View File

@@ -203,11 +203,16 @@ Page({
gohome(e){ gohome(e){
console.log(e.currentTarget.dataset.id,"123") console.log(e.currentTarget.dataset.id,"123")
wx.navigateTo({ 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() { getUserInfo: function() {
let that = this; let that = this;
@@ -508,8 +513,16 @@ Page({
that.setData({ that.setData({
onshow: false 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) { getDetail: function(couponChannelId, flag) {
let that = this; let that = this;
let data={};
if (that.data.couponIds){
data.couponId = couponChannelId
}else{
data.couponChannelId = couponChannelId
}
var parmer = { var parmer = {
url: config.api.couponDetail, url: config.api.couponDetail,
data: {
couponChannelId: couponChannelId
}
data:data
}; };
Http.get(parmer) Http.get(parmer)
.then(res => { .then(res => {
@@ -719,7 +736,6 @@ Page({
* 支付订单更新 * 支付订单更新
*/ */
payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => { payOrderUpdate: (orderId, payOrderId, status, reason, type, _this, composeOrderType) => {
console.log("*-----------------")
let that = this; let that = this;
// 支付成功 // 支付成功
Http.post({ Http.post({
@@ -791,6 +807,8 @@ Page({
} }
}) })
}, },
// 券包支付
/** /**
* 发起支付 * 发起支付
*/ */
@@ -832,14 +850,32 @@ Page({
couponChannelId: "" + that.data.couponChannelId, couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId, couponId: "" + that.data.couponId,
formId: "" + that.data.formId, 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 下单 * orderSave 下单
*/ */
return Http.post({ return Http.post({
url: config.api.orderSave,
data: data
url: url,
data: that.data.data.type == 12 ? JSON.stringify(tempArr):data
}); });
}) })
.catch(err => { .catch(err => {
@@ -1056,6 +1092,7 @@ Page({
}).then(res => { }).then(res => {
that.setData({ that.setData({
disOrderNumber: res.data.orderNumber, disOrderNumber: res.data.orderNumber,
composeOrderType: res.data.composeOrderType
}) })
if (res.data && res.data.pressEndDate) { if (res.data && res.data.pressEndDate) {
that.setData({ that.setData({
@@ -1074,7 +1111,7 @@ Page({
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
wx.navigateTo({ wx.navigateTo({
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}`,
url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}&composeOrderType=${that.data.composeOrderType}`,
}) })
} }
} }


+ 17
- 5
pages/coupon/detail/index.wxml View File

@@ -105,7 +105,7 @@
<text class='txt01'>使用条件:</text> <text class='txt01'>使用条件:</text>
<text class='time'>满{{data.usePriceStr}}元可用</text> <text class='time'>满{{data.usePriceStr}}元可用</text>
</view> </view>
<view class='rest'>
<view class='rest' wx:if="{{data.sendType!=3}}">
<!-- <text class='txt01'>限购条件:</text> --> <!-- <text class='txt01'>限购条件:</text> -->
<view class='quan'></view> <view class='quan'></view>
<text class='time'>限购{{data.useLimitQuantity}}张</text> <text class='time'>限购{{data.useLimitQuantity}}张</text>
@@ -117,7 +117,17 @@
</view> </view>
</view> </view>
<!-- 适用门店 --> <!-- 适用门店 -->
<store merchantVoList="{{merchantVoList}}"></store>
<store merchantVoList="{{merchantVoList}}" wx:if="{{data.type!=12}}"></store>
<!-- 券包子券样式 -->
<view class="childText">购买须知</view>
<view class="childBox" >
<view class="childItem" wx:for="{{data.giftCouponList}}" bindtap="gochild" data-id="{{item.id}}" wx:key = "{{index}}">
<image class="childImg" mode='widthFix' src="{{item.coverImg}}"></image>
<view class="childName">{{item.title}}</view>
<view class="childMoney">¥{{item.priceStr}}</view>
</view>
</view>

<view class='notes'> <view class='notes'>
<view> <view>
<text>购买须知</text> <text>购买须知</text>
@@ -146,13 +156,15 @@
</button> </button>
<button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> <button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> <text class='txt'>{{data.salePriceStr}}元</text>马上购买</button>
<button wx:if="{{data.type==11}}" bindtap="gohome" data-id="{{couponChannelId}}" class="home">配送到家
<button wx:if="{{data.type==11}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}"
data-shippingtype="2" class="home">配送到家
</button> </button>
<button wx:if="{{data.type==11}}" form-type="submit" class="arrive">到店购买
<button wx:if="{{data.type==11}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}"
data-shippingtype="1" class="arrive">到店购买
</button> </button>
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> <button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button>
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> <button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button>
<button class='buy buyHr' disabled='true' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8}}">已售罄</button>
<button class='buy buyHr' disabled='true' wx:if="{{data.sendType!=3&&(data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8)}}">已售罄</button>
<button class='buy' disabled='true' wx:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button> <button class='buy' disabled='true' wx:if="{{data.remainInventory==0&&data.type==50||data.remainInventory==0&&data.type==51}}">已兑完</button>
<button class='buy' disabled='true' wx:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button> <button class='buy' disabled='true' wx:if="{{endtime=='活动已结束'&&data.activityStatus!=0}}">活动已结束</button>
<button class='buy' disabled='true' wx:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button> <button class='buy' disabled='true' wx:if="{{total_micro_second<=0&&data.activityStatus!=0}}">活动已结束</button>


+ 51
- 2
pages/coupon/detail/index.wxss View File

@@ -111,7 +111,8 @@ button::after {
border-radius: 8rpx; border-radius: 8rpx;
transition: all 0.6s; transition: all 0.6s;
} }
.home{

.home {
position: relative; position: relative;
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; height: 94rpx;
@@ -124,7 +125,8 @@ button::after {
line-height: 94rpx; line-height: 94rpx;
border-radius: 21rpx; border-radius: 21rpx;
} }
.arrive{

.arrive {
position: relative; position: relative;
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; height: 94rpx;
@@ -929,3 +931,50 @@ checkbox-group, radio-group {
.jifen { .jifen {
font-size: 30rpx; 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;
}

+ 197
- 55
pages/fillIndent/fillIndent.js View File

@@ -10,48 +10,52 @@ Page({
*/ */
data: { data: {
navigationBarHeight, 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({ wx.navigateTo({
url: '/pages/siteAdd/siteAdd?url=/pages/fillIndent/fillIndent', url: '/pages/siteAdd/siteAdd?url=/pages/fillIndent/fillIndent',
}) })
}, },
setSite(e){
setSite(e) {
let id = e.currentTarget.dataset.id let id = e.currentTarget.dataset.id
let arr = [] let arr = []
arr = this.data.seti.filter(item=>{
arr = this.data.seti.filter(item => {
return item.id == id return item.id == id
})[0] })[0]
console.log(arr)
this.setData({ this.setData({
thenArr: arr,
area: arr.regionStr, area: arr.regionStr,
address: arr.address, address: arr.address,
consignee: arr.consignee, consignee: arr.consignee,
mobile: arr.mobile, mobile: arr.mobile,
}) })
}, },
getSetiLsit(){
getSetiLsit() {
Http.get({ Http.get({
url: config.api.siteList, url: config.api.siteList,
data:{
data: {
pageNum: 1, pageNum: 1,
pageSize: 1000 pageSize: 1000
} }
}).then(res=>{
}).then(res => {
let temp = res.data.list let temp = res.data.list
if(temp.length>0){
if (temp.length > 0) {


temp.map(item => { temp.map(item => {
// let regionStr = "" // let regionStr = ""
@@ -68,17 +72,20 @@ Page({
}) })
let tempRegion = JSON.parse(temp[0].region) let tempRegion = JSON.parse(temp[0].region)
let str = "" let str = ""
tempRegion.map(item => { str += item })
tempRegion.map(item => {
str += item
})
this.setData({ this.setData({
thenArr: temp[0],
area: str, area: str,
address: temp[0].address, address: temp[0].address,
consignee: temp[0].consignee, consignee: temp[0].consignee,
mobile: temp[0].mobile mobile: temp[0].mobile
}) })
} }
}).catch(err => { }).catch(err => {
wx.showToast({ wx.showToast({
title: err.message ? err.message : err.data, title: err.message ? err.message : err.data,
@@ -88,75 +95,209 @@ Page({
}); });
}) })
}, },
addNum(){
addNum() {
let num = this.data.num let num = this.data.num
if (this.data.num >= this.data.remainInventory){
if (this.data.num >= this.data.remainInventory) {
wx.showToast({ wx.showToast({
title: '购买总数超库存', title: '购买总数超库存',
icon: 'none', icon: 'none',
duration: 2000, duration: 2000,
}) })
}else{
} else {
num = num + 1 num = num + 1
this.setData({ this.setData({
num: num num: num
}) })
} }
}, },
dleNum(){
dleNum() {
let num = this.data.num let num = this.data.num
if (this.data.num <=1){
if (this.data.num <= 1) {


wx.showToast({ wx.showToast({
title: '购买总数不能为0', title: '购买总数不能为0',
icon: 'none', icon: 'none',
duration: 2000, duration: 2000,
}) })
}else{
} else {
num = num - 1 num = num - 1
this.setData({ this.setData({
num: num
num: num
}) })
} }
}, },
hieShade(){
hieShade() {
this.setData({ this.setData({
showShade:false
showShade: false
}) })
}, },
showTShade(){
showTShade() {
this.setData({ this.setData({
showShade: true 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({ 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({ Http.get({
url: config.api.couponDetail, url: config.api.couponDetail,
data:{
couponChannelId:this.data.id
data: {
couponChannelId: this.data.couponChannelId
} }
}).then(res=>{
}).then(res => {
let temp = res.data let temp = res.data
this.setData({ this.setData({
coverImg: temp.coverImg, coverImg: temp.coverImg,
title: temp.title, title: temp.title,
salePriceStr: temp.salePriceStr, salePriceStr: temp.salePriceStr,
freightPriceStr: temp.freightPriceStr, freightPriceStr: temp.freightPriceStr,
remainInventory: temp.remainInventory
remainInventory: temp.remainInventory,
contentType: res.data.contentType

}) })
}).catch(err=>{
}).catch(err => {
wx.showToast({ wx.showToast({
title: err.message ? err.message : err.data, title: err.message ? err.message : err.data,
icon: 'none', 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() {


} }
}) })

+ 4
- 4
pages/fillIndent/fillIndent.wxml View File

@@ -1,7 +1,7 @@
<navbar back home text="填写订单" background='#FD832D' color="white"></navbar> <navbar back home text="填写订单" background='#FD832D' color="white"></navbar>
<view style="height:{{navigationBarHeight}} "></view> <view style="height:{{navigationBarHeight}} "></view>
<view class="box">
<view class="siteBox">
<view class="box" >
<view class="siteBox" wx:if="{{shippingtype==2}}">
<view wx:if="{{seti.length>0}}"> <view wx:if="{{seti.length>0}}">
<view class="siteTitle"> <view class="siteTitle">
<view class="text">{{area}}</view> <view class="text">{{area}}</view>
@@ -43,7 +43,7 @@
<view class="text">商品金额:</view> <view class="text">商品金额:</view>
<view class="num">¥{{salePriceStr*num}}</view> <view class="num">¥{{salePriceStr*num}}</view>
</view> </view>
<view class="costBox">
<view class="costBox" wx:if="{{shippingtype==2}}">
<view class="text">运费:</view> <view class="text">运费:</view>
<view class="num">¥{{freightPriceStr}}</view> <view class="num">¥{{freightPriceStr}}</view>
</view> </view>
@@ -55,7 +55,7 @@


<view class="payBox"> <view class="payBox">
<view class="moneyStr">¥{{(salePriceStr*num)+(freightPriceStr*1)}}</view> <view class="moneyStr">¥{{(salePriceStr*num)+(freightPriceStr*1)}}</view>
<view class="pay">支付</view>
<view class="pay" bindtap="pay">支付</view>
</view> </view>






+ 14
- 0
pages/getphoneInfo/index.js View File

@@ -12,6 +12,8 @@ Page({
signActivity: "", signActivity: "",
mineFlag: null, mineFlag: null,
skipUrl: 0, skipUrl: 0,
fillIndentId:"",
couponId:"",
// skip: app.globalData.skip // skip: app.globalData.skip
}, },
onLoad: function(options) { onLoad: function(options) {
@@ -27,6 +29,12 @@ Page({
that.setData({ that.setData({
paramData: options paramData: options
}) })
if (options && options.fillIndentId && options.couponId){
that.setData({
fillIndentId: options.fillIndentId,
couponId: options.couponId
})
}
if (options && options.couponChannelId) { if (options && options.couponChannelId) {
that.setData({ that.setData({
couponChannelId: options.couponChannelId couponChannelId: options.couponChannelId
@@ -108,6 +116,12 @@ Page({
return; 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"){ if (that.data.path =="wj"){
wx.redirectTo({ wx.redirectTo({


+ 14
- 2
pages/getuserinfo/index.js View File

@@ -16,6 +16,7 @@ Page({
couponChannelIdflag: '', couponChannelIdflag: '',
wjId: "", wjId: "",
composeOrderType:"", composeOrderType:"",
fillIndentId: "",
}, },
//是否授权手机号 //是否授权手机号
judgePhonelngo() { judgePhonelngo() {
@@ -63,7 +64,13 @@ Page({
composeOrderType: options.composeOrderType composeOrderType: options.composeOrderType
}) })
} }

//线上配送 填写订单
if (options && options.fillIndentId && couponId && options.couponId){
that.setData({
fillIndentId: options.fillIndentId,
couponId: options.couponId
})
}
// 来自优惠券列表券详情页面的 couponChannelId // 来自优惠券列表券详情页面的 couponChannelId
if (options && options.couponChannelIdflag) { if (options && options.couponChannelIdflag) {
that.setData({ that.setData({
@@ -597,7 +604,12 @@ Page({
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`,
app.globalData.skip = 'redirectTo' app.globalData.skip = 'redirectTo'
that.judgePhonelngo() 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.skipUrl = "/index/index",
app.globalData.skip = 'switchTab' app.globalData.skip = 'switchTab'
that.judgePhonelngo() that.judgePhonelngo()


+ 128
- 38
pages/order/detail/index.js View File

@@ -9,6 +9,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showFlag:false,
navigationBarHeight, navigationBarHeight,
succUrl: imgurl.succ.url, succUrl: imgurl.succ.url,
spcodeUrl: imgurl.spcode.url, spcodeUrl: imgurl.spcode.url,
@@ -31,8 +32,111 @@ Page({
supportTransfer:'', supportTransfer:'',
cardIf:false, cardIf:false,
contentType: 0, 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) { phone: function (e) {
let that = this; let that = this;
console.log(e); console.log(e);
@@ -150,12 +254,21 @@ Page({
console.log(err); console.log(err);
}) })
}, },




/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options.html)
let that = this; let that = this;
if (options.dingdan && options.dingdan =="order"){
that.setData({
orderFlag:true//判断是不是线上配送
})
}
that.setData({ that.setData({
orderId: options.orderId, orderId: options.orderId,
contentType: options.contentType, contentType: options.contentType,
@@ -170,40 +283,9 @@ Page({
wx.showLoading({ wx.showLoading({
title: "加载中" 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(){ onShow:function(){
let that = this; let that = this;
@@ -360,9 +442,17 @@ Page({
wx.hideLoading(); wx.hideLoading();
}, 1600); }, 1600);
setTimeout(() => { 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); }, 1600);
} }
}); });


+ 50
- 14
pages/order/detail/index.wxml View File

@@ -1,9 +1,9 @@
<navbar home back text="订单详情"></navbar> <navbar home back text="订单详情"></navbar>
<view style="height:{{navigationBarHeight}} "></view> <view style="height:{{navigationBarHeight}} "></view>
<view class='order' wx:if="{{showPage}}" >
<view class='order' wx:if="{{showPage}}">
<view wx:if="{{order.orderStatus==1}}" class='tips'> <view wx:if="{{order.orderStatus==1}}" class='tips'>
<image class='success' src='{{succUrl}}' mode='widthFix'></image> <image class='success' src='{{succUrl}}' mode='widthFix'></image>
<view wx:if="{{order.salePrice/100==0}}" class='msg' >
<view wx:if="{{order.salePrice/100==0}}" class='msg'>
<text>交易成功</text> <text>交易成功</text>
<!-- <text>请尽快到门店使用,有效期至{{}}</text> --> <!-- <text>请尽快到门店使用,有效期至{{}}</text> -->
</view> </view>
@@ -43,8 +43,9 @@
只有支付完成的时 只有支付完成的时
才显示兑换码 才显示兑换码
--> -->
<view wx:if="{{order.orderStatus==1&&order.type!=100&&order.type!=5&&order.type!=51}}" data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}" data-validstatus="{{order.validStatus}}" bindtap="powerDrawer" class='dhCode'>
<view style="width:86%;clear: both;" >
<view wx:if="{{order.orderStatus==1&&order.type!=100&&order.type!=5&&order.type!=51}}" data-couponOrderStatus="{{order.couponOrderStatus}}" data-title="{{order.title}}" data-subtitle="{{order.subTitle}}" data-remark="{{order.remark}}" data-quancode="{{order.couponOrderId}}"
data-validstatus="{{order.validStatus}}" bindtap="powerDrawer" class='dhCode'>
<view style="width:86%;clear: both;">
<text class="fl">兑换码:</text> <text class="fl">兑换码:</text>
<text class="fr" wx:if="{{order.validStatus!=0}}">{{order.couponOrderId}}</text> <text class="fr" wx:if="{{order.validStatus!=0}}">{{order.couponOrderId}}</text>
</view> </view>
@@ -61,30 +62,65 @@
<text class='bianhao'>订单编号:</text> <text class='bianhao'>订单编号:</text>
<text>{{order.orderNumber}}</text> <text>{{order.orderNumber}}</text>
</view> </view>
<view class='wuliu' wx:if="{{order.type==11}}">
<text class='left'>物流状态:</text>
<text class="right">{{(order.shippingStatus==10||order.shippingStatus==14)?"待自提":order.shippingStatus==15?"已自提":order.shippingStatus==20?"待发货":order.shippingStatus==24?"待收货":order.shippingStatus==25?"已收货":""}}</text>
</view>
<view class='wuliu' wx:if="{{order.shippingType==2&&order.deliveryInfo}}">
<text class='left'>物流信息:</text>
<text class="right">{{(order.deliveryInfo.courierInput+": "+order.deliveryInfo.expressageIdInput)}}</text>
</view>

<!-- <view> <!-- <view>
<text wx:if="{{order.type == 8}}">原价</text> <text wx:if="{{order.type == 8}}">原价</text>
<text wx:if="{{order.type != 8}}">面额</text> <text wx:if="{{order.type != 8}}">面额</text>
<text class="jine1" wx:if="{{order.unit==0}}">{{order.price/100}}元</text> <text class="jine1" wx:if="{{order.unit==0}}">{{order.price/100}}元</text>
<text class="jine1" wx:if="{{order.unit==1}}">{{order.price/100}}小时</text> <text class="jine1" wx:if="{{order.unit==1}}">{{order.price/100}}小时</text>
</view> --> </view> -->
<view>
<text class='left'>实付金额:</text>
<view class='right'>
<text class='RMB'>¥</text>
<text class='jine'>{{order.payment/100}}</text>
</view>
<view style="overflow: hidden; padding-left: 5%;padding-right: 5%;height: 96rpx;line-height: 96rpx;">
<text class='left'>实付金额:</text>
<view class='right'>
<text class='RMB'>¥</text>
<text class='jine'>{{order.payment/100}}</text>
</view> </view>
</view>
</view> </view>
<!-- 适用门店 --> <!-- 适用门店 -->
<store merchantVoList="{{order.merchantVoList}}"></store>
<store merchantVoList="{{order.merchantVoList}}" wx:if="{{order.type!=12}}"></store>
<!-- 子券列表 -->
<view class="childList" wx:if="{{order.type==12}}">
<view class="childTitle">礼券:</view>
<view class="childItme" wx:for="{{order.giftCouponList}}" wx:key="{{item}}">
<view class="chaildDetBox">
<image mode='aspectFill' class="chaildImg" src="{{item.coverImg}}"></image>
<view class="childDataBox">
<view class="orderName">{{item.title}}</view>
<view class="childPriceStr">面额:{{item.priceStr}}元</view>
</view>
</view>
</view>
</view>
<!-- 待付款 显示立即购买的按钮 --> <!-- 待付款 显示立即购买的按钮 -->
<view wx:if="{{(order.orderStatus==0&&order.salePrice!=0)||(order.orderStatus==7&&order.salePrice!=0)}}" class="buy-view app-border-top"> <view wx:if="{{(order.orderStatus==0&&order.salePrice!=0)||(order.orderStatus==7&&order.salePrice!=0)}}" class="buy-view app-border-top">
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button>
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{orderFlag?order.composeOrderId:order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button>
</view> </view>
<view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}"> <view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}">
<view class='game-entry'>
<view class='game-entry'>
<image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
</view> </view>
</view> </view>
<button type="primary" open-type="share" wx:if="{{order.type == 100 && supportTransfer==1&&cardIf}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button>
<button type="primary" open-type="share" wx:if="{{order.type == 100 && supportTransfer==1&&cardIf}}" class='support-tansfer'>
<image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button>
<view class="sign" wx:if="{{order.couponOrderStatus == 0 &&order.type == 11 && order.shippingType == 2 && order.shippingStatus== 24}}" bindtap="setShow">签收</view>
</view>
<view class="showT" wx:if="{{showFlag}}" bindtap="hieShow">
<view class="titleBxo" >
<view class="text">是否确认收到商品?</view>
<view class="p">签收后将完成订单</view>
<view class="btnBox">
<view class="le" bindtap="verify">确认签收</view>
<view class="ri" bindtap="hieShow">取消</view>
</view>
</view>
</view> </view>

+ 193
- 35
pages/order/detail/index.wxss View File

@@ -1,8 +1,12 @@
@import "../../../app.wxss"; @import "../../../app.wxss";
button::after{ border: none; }

button::after {
border: none;
}

page { page {
height: auto !important; height: auto !important;
background: #F4F5F9;
background: #f4f5f9;
} }


.order { .order {
@@ -20,18 +24,18 @@ page {
.tips { .tips {
width: 92%; width: 92%;
height: 70rpx; height: 70rpx;
background: #2C8DFF;
background: #2c8dff;
color: #fff; color: #fff;
padding: 20rpx 4% 0; padding: 20rpx 4% 0;
} }


.merchantName { .merchantName {
color: #3C3C3C!important;
color: #3c3c3c !important;
/* margin-left: 160rpx; */ /* margin-left: 160rpx; */
font-size: 28rpx; font-size: 28rpx;
float: left; float: left;
margin-left: 30rpx; margin-left: 30rpx;
height:100%;
height: 100%;
line-height: 90rpx; line-height: 90rpx;
} }


@@ -50,13 +54,14 @@ page {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
} }
.msg text:nth-child(1){

.msg text:nth-child(1) {
width: 90%; width: 90%;
font-size: 28rpx; font-size: 28rpx;
float: left; float: left;
} }


.msg text:nth-child(2){
.msg text:nth-child(2) {
font-size: 24rpx; font-size: 24rpx;
float: left; float: left;
margin-left: 35rpx; margin-left: 35rpx;
@@ -64,7 +69,7 @@ page {


.section { .section {
/* margin-top: 2%; */ /* margin-top: 2%; */
background: #FFFFFF;
background: #fff;
} }


.detail_msg { .detail_msg {
@@ -88,19 +93,21 @@ page {
height: 120rpx; height: 120rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
.sectionTit{

.sectionTit {
padding-top: 30rpx; padding-top: 30rpx;
width:92%;
margin:0 4%;
width: 92%;
margin: 0 4%;
font-size: 30rpx; font-size: 30rpx;
color: #3C3C3C;
color: #3c3c3c;
} }

.info view:nth-child(1) { .info view:nth-child(1) {
padding: 0 4%; padding: 0 4%;
width: 80%; width: 80%;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }


.info { .info {
@@ -152,19 +159,52 @@ page {
padding-left: 18rpx; padding-left: 18rpx;
text-decoration: line-through; text-decoration: line-through;
} }
.dhCode{

.dhCode {
position: relative; position: relative;
height: 96rpx; height: 96rpx;
line-height: 96rpx; line-height: 96rpx;
border-bottom: 1rpx solid #F4F5F9;
border-bottom: 1rpx solid #f4f5f9;
padding-left: 5%; padding-left: 5%;
padding-right: 5%; padding-right: 5%;
} }

.classif { .classif {
background: #FFFFFF;
background: #fff;
width: 100%; width: 100%;
margin-top: 20rpx; 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{ .classifShop{
background: #FFFFFF; background: #FFFFFF;
@@ -187,7 +227,7 @@ page {
line-height:94rpx; 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; position: relative;
height: 94rpx; height: 94rpx;
line-height: 94rpx; line-height: 94rpx;
@@ -197,19 +237,22 @@ page {
padding-right: 5%; padding-right: 5%;
/* border-bottom: 1rpx solid #eee; */ /* border-bottom: 1rpx solid #eee; */
} }

.classif > view text:nth-child(2) { .classif > view text:nth-child(2) {
font-size: 28rpx; font-size: 28rpx;
color: #3C3C3C;
color: #3c3c3c;
} }

.classif > view text:nth-child(1) { .classif > view text:nth-child(1) {
font-size: 28rpx; font-size: 28rpx;
color: #A6A6A6;
color: #a6a6a6;
float: left; float: left;
} }


.classif > view:nth-child(1) { .classif > view:nth-child(1) {
display: block; display: block;
} }

.classif > view:nth-child(6) text:nth-child(2) { .classif > view:nth-child(6) text:nth-child(2) {
color: #666; color: #666;
} }
@@ -223,10 +266,11 @@ page {
width: 50rpx; width: 50rpx;
z-index: 1; z-index: 1;
} }
.rArrow{

.rArrow {
position: absolute; position: absolute;
right: 26rpx; right: 26rpx;
height:20rpx;
height: 20rpx;
width: 20rpx; width: 20rpx;
margin: auto; margin: auto;
bottom: 30rpx; bottom: 30rpx;
@@ -342,7 +386,7 @@ radio {


.fl { .fl {
float: left; float: left;
color: #3C3C3C!important;
color: #3c3c3c !important;
} }


.fr { .fr {
@@ -416,19 +460,23 @@ radio {
width: 350rpx; width: 350rpx;
height: 350rpx; height: 350rpx;
} }
.left{

.left {
float: left; float: left;
} }
.right{
float:right;

.right {
float: right;
} }
.RMB{
color: #FD782D !important;

.RMB {
color: #fd782d !important;
font-size: 24rpx !important; font-size: 24rpx !important;
float: right; float: right;
} }

.jine { .jine {
color: #FD782D !important;
color: #fd782d !important;
font-size: 36rpx !important; font-size: 36rpx !important;
font-weight: 400 !important; font-weight: 400 !important;
float: right; float: right;
@@ -454,7 +502,7 @@ radio {
} }


.buy { .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; height: 94rpx;
width: 670rpx; width: 670rpx;
margin: 0 auto; margin: 0 auto;
@@ -479,6 +527,7 @@ radio {
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
} }

/* /*
.merchantVoList { .merchantVoList {
width: 100%; width: 100%;
@@ -502,6 +551,7 @@ radio {
line-height: 94rpx; line-height: 94rpx;
border-radius: 61rpx; border-radius: 61rpx;
} }

/* .merchantImgUrl{ /* .merchantImgUrl{
width: 90rpx; width: 90rpx;
float: left; float: left;
@@ -509,14 +559,122 @@ radio {
z-index: 10; z-index: 10;
margin: 0 auto; margin: 0 auto;
} */ } */
.support-tansfer{

.support-tansfer {
width: 690rpx; width: 690rpx;
border-radius: 50rpx; border-radius: 50rpx;
margin-top: 60rpx; 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; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 20rpx; margin-right: 20rpx;
}
}

.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;
}

+ 30
- 3
pages/order/index/index.js View File

@@ -54,9 +54,28 @@ Page({
}) })
}, },
gotopay: function (e) { 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) { gotopayAgain: function (e) {
@@ -131,6 +150,14 @@ Page({
tmpArr.push.apply(tmpArr, res.data.list); tmpArr.push.apply(tmpArr, res.data.list);
// 将砍价的状态过滤出来 // 将砍价的状态过滤出来
console.log(tmpArr) 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({ that.setData({
list: tmpArr list: tmpArr
}) })


+ 25
- 56
pages/order/index/index.wxml View File

@@ -11,7 +11,8 @@
<view> <view>
<!-- <image wx:if="{{item.orderStatus == 6 || item.orderStatus == 7 || item.orderStatus == 8 || item.orderStatus == 9}}" src="{{wmdiscount}}" class="discount" mode="widthFix"></image> --> <!-- <image wx:if="{{item.orderStatus == 6 || item.orderStatus == 7 || item.orderStatus == 8 || item.orderStatus == 9}}" src="{{wmdiscount}}" class="discount" mode="widthFix"></image> -->
<!-- <image wx:if="{{item.orderStatus == 1&& item.type == 8}}" src="{{wmdiscount}}" class="discount" mode="widthFix"></image> --> <!-- <image wx:if="{{item.orderStatus == 1&& item.type == 8}}" src="{{wmdiscount}}" class="discount" mode="widthFix"></image> -->
<text>{{item.title}}</text>
<text wx:if="{{item.level==0}}">{{item.title}}</text>
<text wx:if="{{item.level==1}}">订单id:{{item.composeOrderId}}</text>
<text class='wait' wx:if="{{item.orderStatus==0}}">等待付款</text> <text class='wait' wx:if="{{item.orderStatus==0}}">等待付款</text>
<text class='wait' wx:if="{{item.orderStatus==10}}">拼团中</text> <text class='wait' wx:if="{{item.orderStatus==10}}">拼团中</text>
<text class='sucess' wx:if="{{item.orderStatus==3}}">待退款</text> <text class='sucess' wx:if="{{item.orderStatus==3}}">待退款</text>
@@ -31,7 +32,8 @@
<text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text> <text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text>
</view> </view>
</view> </view>
<view class='detail_msg'>

<view class='detail_msg' wx:if="{{item.level==0}}">
<view class='logo'> <view class='logo'>
<image mode="aspectFill" src='{{item.coverImg}}'></image> <image mode="aspectFill" src='{{item.coverImg}}'></image>
</view> </view>
@@ -45,6 +47,18 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 购物车模式 -->
<view class="itemBox" wx:if="{{item.level==1}}" wx:for="{{item.orderCouponVoList}}" wx:for-item="child" wx:key="{{index}}">
<view class="itemImg">
<image mode="aspectFill" src='{{child.coverImg}}'></image>
</view>
<view class="itemContent">
<view class="sub">{{child.title}}</view>
<view class="face">价格:<text>{{(child.salePrice)/100}}元 x {{child.couponNumber}}</text></view>
<view class="date">下单时间:<text>{{child.createDate}}</text></view>
</view>
</view>
<!-- 购物车模式 -->
<view class='payment'> <view class='payment'>
<view> <view>
<text>实付金额:</text><text>{{item.payment/100}}元</text> <text>实付金额:</text><text>{{item.payment/100}}元</text>
@@ -55,13 +69,14 @@
1完成 1完成
2取消 2取消
--> -->
<view wx:if="{{item.orderStatus==1||item.orderStatus==11}}" class="btnZf" data-id="{{item.id}}" bindtap="gotopay">
<!-- item.composeOrderId=='0'?item.id:item.composeOrderId -->
<view wx:if="{{item.orderStatus==1||item.orderStatus==11}}" class="btnZf" data-level="{{item.level}}" data-id="{{item.id}}" data-shipping="{{item.shippingType}}" bindtap="gotopay">
<text>去查看</text> <text>去查看</text>
</view> </view>
<view wx:if="{{item.orderStatus == 6}}" class="btn" data-id="{{item.id}}" bindtap="gotoDiscount"> <view wx:if="{{item.orderStatus == 6}}" class="btn" data-id="{{item.id}}" bindtap="gotoDiscount">
<text>砍价详情</text> <text>砍价详情</text>
</view> </view>
<view wx:if="{{item.orderStatus==0 || item.orderStatus==7}}" class="btn" data-id="{{item.id}}" bindtap="gotopay">
<view wx:if="{{item.orderStatus==0 || item.orderStatus==7}}" class="btn" data-level="{{item.level}}" data-id="{{item.level==0?item.id:item.composeOrderId}}" bindtap="gotopay">
<text>去支付</text> <text>去支付</text>
</view> </view>
<!-- <view wx:if="{{item.orderStatus==15&&item.type==9}}" data-data="{{item}}" class="btn" data-id="{{item.id}}" bindtap="gotoSpellPay"> <!-- <view wx:if="{{item.orderStatus==15&&item.type==9}}" data-data="{{item}}" class="btn" data-id="{{item.id}}" bindtap="gotoSpellPay">
@@ -78,58 +93,12 @@


<!-- 券包样式 --> <!-- 券包样式 -->
<!-- <view class="section"> <!-- <view class="section">
<view class='detail_top'>
<view>
<text>全包名称</text>
<text class='wait' >等待付款</text>
<text class='wait' wx:if="{{item.orderStatus==10}}">拼团中</text>
<text class='sucess' wx:if="{{item.orderStatus==3}}">待退款</text>
<text class='close' wx:if="{{item.orderStatus==2}}">交易关闭</text>
<text class='close' wx:if="{{item.orderStatus==6}}">砍价中</text>
<text class='sucess' wx:if="{{item.orderStatus==7}}">砍价成功</text>
<text class='close' wx:if="{{item.orderStatus==8}}">砍价失败</text>
<text class='close' wx:if="{{item.orderStatus==9}}">砍价取消</text>
<text class='close' wx:if="{{item.orderStatus==12}}">拼团已过期</text>
<text class='close' wx:if="{{item.orderStatus==12}}">拼团失败</text>
<text class='close' wx:if="{{item.orderStatus==8}}">砍价失败</text>
<text class='close' wx:if="{{item.orderStatus==4}}">已退款</text>
<text class='wait' wx:if="{{item.orderStatus==5}}">退款失败</text>
<text class='sucess' wx:if="{{item.orderStatus==11}}">拼团成功</text>
<text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice==0&&item.type!=50&&item.type!=51}}">免费领取</text>
<text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice==0&&(item.type==50||item.type==51)}}">积分兑换</text>
<text class='sucess' wx:if="{{item.orderStatus==1&&item.salePrice!=0}}">付款成功</text>
</view>
</view>
<view class="itemBox">
<view class="itemImg">
<image mode="aspectFill" src='https://formall.oss-accelerate.aliyuncs.com/789/737c56bd-066e-4592-bbda-bcbbc8faf409.jpg'></image>
</view>
<view class="itemContent">
<view class="sub">一面</view>
<view class="face">面额:<text>100元</text></view>
<view class="date">下单时间:<text>2021:07:20 15:00:00</text></view>
</view>
</view>
<view class="itemBox">
<view class="itemImg">
<image mode="aspectFill" src='https://formall.oss-accelerate.aliyuncs.com/789/737c56bd-066e-4592-bbda-bcbbc8faf409.jpg'></image>
</view>
<view class="itemContent">
<view class="sub">一面</view>
<view class="face">面额:<text>100元</text></view>
<view class="date">下单时间:<text>2021:07:20 15:00:00</text></view>
</view>
</view>
<view class="itemBox">
<view class="itemImg">
<image mode="aspectFill" src='https://formall.oss-accelerate.aliyuncs.com/789/737c56bd-066e-4592-bbda-bcbbc8faf409.jpg'></image>
</view>
<view class="itemContent">
<view class="sub">一面</view>
<view class="face">面额:<text>100元</text></view>
<view class="date">下单时间:<text>2021:07:20 15:00:00</text></view>
</view>
</view>


<view class='payment'> <view class='payment'>
<view> <view>
<text>实付金额:</text><text>{{item.payment/100}}元</text> <text>实付金额:</text><text>{{item.payment/100}}元</text>


+ 3
- 0
pages/siteAdd/siteAdd.js View File

@@ -17,6 +17,7 @@ Page({
switch1Checked: false, switch1Checked: false,
region: ['北京市', '北京市', '东城区'], region: ['北京市', '北京市', '东城区'],
id: "", id: "",
url:"",
}, },
go(e) { go(e) {
let url = e.currentTarget.dataset.url let url = e.currentTarget.dataset.url
@@ -121,6 +122,7 @@ Page({
icon: 'none', icon: 'none',
duration: 2000, duration: 2000,
}) })
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}) })
@@ -143,6 +145,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {

if (options.id) { if (options.id) {
this.setData({ this.setData({
id: options.id id: options.id


Loading…
Cancel
Save