Browse Source

优惠券

master
nige 3 years ago
parent
commit
fe3d8f20a7
  1. 3
      pages/info/postProductInfo/index.js
  2. 9
      pages/list/museum/index.js
  3. 8
      pages/order/card/index.js
  4. 2
      pages/order/card/index.wxml
  5. 2
      pages/order/postOrder/index.js
  6. 3
      pages/order/scene/index.js
  7. 2
      pages/order/scene/index.wxml
  8. 22
      pages/user/user.js
  9. 19
      pages/user/user.wxml
  10. 78
      pages/user/user.wxss

3
pages/info/postProductInfo/index.js

@ -303,7 +303,7 @@ Page({
})
},
order: function () {
app.globalData.postProduct = null
app.globalData.postProduct = []
app.globalData.list = []
commonApi.user_post("/product/checkStock", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
@ -669,6 +669,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
app.globalData.postProduct = []
if (!wx.getStorageSync('jstrip_token')) {
return;
}

9
pages/list/museum/index.js

@ -20,6 +20,15 @@ Page({
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
console.log(item);
if (item.id==5461) {
wx.navigateToMiniProgram({
appId: 'wxfef80ee1ab7e58a2',
path: 'pages/inners/main'
})
return;
}
util.gotoDetail(item,1);
},
gotoDetailOther: function(e) {

8
pages/order/card/index.js

@ -76,7 +76,7 @@ Page({
setLinkman:function(e){
let linkmanList = e.detail;
this.setData({
productNum:linkmanList.length==0?1:linkmanList.length,
// productNum:linkmanList.length==0?1:linkmanList.length,
linkmanList:linkmanList
})
},
@ -195,6 +195,12 @@ Page({
}).then(res=>{
console.log(res)
})
},
//获取最高优惠券
getNewCoupon(e){
this.setData({
coupon:e.detail
})
},
/**

2
pages/order/card/index.wxml

@ -32,7 +32,7 @@
<view wx:if="{{product.sku.sku_model.fetch_type!='selffetch'}}" class="fill-item{{type==1?' active':''}}" bindtap="changeType" data-type="1">邮寄</view>
</view>
</view>
<coupon id="coupon" money="{{productNum *(product.sku.price + 1 * (product.sku.sku_model.recharge[skuIndex] || 0)) + 1 *postFee}}" sku="{{product.sku.id}}"></coupon>
<coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" money="{{productNum *(product.sku.price + 1 * (product.sku.sku_model.recharge[skuIndex] || 0)) + 1 *postFee}}" sku="{{product.sku.id}}"></coupon>
<view class="box" wx:if="{{type==1}}">
<view class="box-title">

2
pages/order/postOrder/index.js

@ -315,8 +315,6 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
console.log(12312312321);
},
/**

3
pages/order/scene/index.js

@ -36,6 +36,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
product: app.globalData.product,
type: options.type,
@ -47,7 +48,7 @@ Page({
ticket_type:app.globalData.product.sku.ticket_type || 1,
isCar:options.isCar
})
console.log(app.globalData);
if (!app.globalData.product) {
util.back();
return;

2
pages/order/scene/index.wxml

@ -35,7 +35,7 @@
</view>
</view>
<coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single'}}" id="coupon"
<coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single' && type!='museum'}}" id="coupon"
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon>
<view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}">

22
pages/user/user.js

@ -16,7 +16,8 @@ Page({
orderList: [],//订单列表
timeList: [],//倒计时
timerOut: null,//定时器
formatTime:[]
formatTime:[],
showModel:false
},
/**
@ -60,6 +61,11 @@ Page({
}
})
},
closeModel(){
this.setData({
showModel:false
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -85,18 +91,8 @@ Page({
util.pagePoint(e)
},
phoneCall:function(){
wx.showModal({
title:'呼叫人工客服',
content:'0512-66555111\n客服服务时间:08:30-17:30',
success:function(res){
if (res.cancel) {
return
}else{
wx.makePhoneCall({
phoneNumber:'0512-66555111',
})
}
}
this.setData({
showModel:true
})
},
getList:function(){

19
pages/user/user.wxml

@ -73,7 +73,7 @@
在线客服
</navigator> -->
<view class="user-box-line" bindtap="phoneCall">
呼叫人工客服
人工客服
</view>
<navigator url="coupon/index" class="user-box-line" catchtap="pagePoint" data-event="mine_card">
我的卡券
@ -121,4 +121,21 @@
</navigator>
</view>
</view>
<view class="mask" wx:if="{{showModel}}">
<view class="model">
<view class="model-content">
<view>即将跳转人工客服</view>
<view style="margin-top: 40rpx;">客服服务时间:08:30-17:30</view>
</view>
<view class="btn-list">
<button class="model-btn" bindtap="closeModel">
取消
</button>
<button class="model-btn" style="color:#0B898E;border-left:#D8D8D8 solid 1rpx;" open-type="contact">
确定
</button>
</view>
</view>
</view>
<view style="height:20rpx"></view>

78
pages/user/user.wxss

@ -145,3 +145,81 @@ font-weight: 400;
color: #666666;
margin-top: 10rpx;
}
.mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.model{
width: 561rpx;
min-height: 449rpx;
background: #FFFFFF;
border-radius: 13rpx;
position: absolute;
box-sizing: border-box;
}
.model-title{
text-align: center;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin-top: 32rpx;
box-sizing: border-box;
}
.model-content{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-wrap: wrap;
margin-top: 100rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
.btn-list{
height: 106rpx;
width: 100%;
position: absolute;
bottom: 0;
border-top: 1rpx solid rgba(216, 216, 216, .99);
padding: 10rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
}
.model-btn{
width: 50%;
text-align: center;
height: 86rpx;
line-height: 86rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
button{
margin:0;
padding:0;
border-radius:0;
border:none;
background-color:transparent;
}
button::after{
border: none;
}
Loading…
Cancel
Save