Browse Source

upload

newCard
HolyKnightIX 2 years ago
parent
commit
e04ce544f1
6 changed files with 39 additions and 16 deletions
  1. +3
    -0
      config/config.js
  2. +1
    -7
      pages/ConsumeDetail/ConsumeDetail.js
  3. +3
    -0
      pages/cardorder/cardUse/cardUse.js
  4. +30
    -6
      pages/coupon/detail/index.js
  5. +1
    -1
      pages/index/index.js
  6. +1
    -2
      pages/theme/index1/index.js

+ 3
- 0
config/config.js View File

@@ -77,6 +77,9 @@ var config = {
* 获取券价格与库存
*/
couponPriceAndStock: "/wxCoupon/couponPriceAndStock",

couponInfo: "/wxCoupon/couponInfo",

/**
* 获取券适用门店List
*/


+ 1
- 7
pages/ConsumeDetail/ConsumeDetail.js View File

@@ -95,17 +95,11 @@ Page({
if (res.from === 'button') {
console.log(this.data.cardDetail)
// 来自页面内转发按钮
const restData = JSON.stringify({
coverImg: _this.data.cardDetail.coverImg,
avatarUrl: _this.data.avatarUrl,
couponOrderId: _this.data.cardDetail.id,
updateDate: _this.data.cardDetail.updateDate
})

return {
title: _this.data.userName + '赠送您一张' + _this.data.cardDetail.title,
imageUrl: _this.data.cardDetail.coverImg,
path: `/pages/index/index?couponChannelId=${_this.data.cardDetail.couponChannelId}&avatarUrl=${_this.data.cardDetail.avatarUrl}&cuserId=${_this.data.cardDetail.ownerId}&userName=${_this.data.userName}&couponId=${_this.data.cardDetail.couponId}&couponOrderId=${_this.data.cardDetail.id}&updateDate=${_this.data.cardDetail.updateDate}&coverImg=${_this.data.cardDetail.coverImg}`,
path: `/pages/index/index?couponChannelId=${_this.data.cardDetail.couponChannelId}&avatarUrl=${_this.data.cardDetail.avatarUrl}&cuserId=${_this.data.cardDetail.ownerId}&userName=${_this.data.userName}&couponId=${_this.data.cardDetail.couponId}&couponOrderId=${_this.data.cardDetail.id}&updateDate=${_this.data.cardDetail.updateDate}&coverImg=${_this.data.cardDetail.coverImg}&tenantId=${_this.data.cardDetail.tenantId}`,

success: function (res) {
// 转发成功


+ 3
- 0
pages/cardorder/cardUse/cardUse.js View File

@@ -120,6 +120,9 @@ Page({
let timer
let expiredSeconds = res.data.expiredSeconds
if (expiredSeconds) {
this.setData({
expiredSeconds: expiredSeconds
})
timer = setInterval(() => {
if (expiredSeconds != 0) {
this.setData({


+ 30
- 6
pages/coupon/detail/index.js View File

@@ -95,7 +95,8 @@ Page({
contentType: 0,
page: 1,//查询商户优惠券page
idList: [],
mallList: ""
mallList: "",
jumpToIndex: false
},
/**
* 显示分享弹框
@@ -298,9 +299,16 @@ Page({
})
},
closeAlert() {
this.setData({
showCardOffer: false
})
if (this.data.jumpToIndex) {
wx.switchTab({
url: '/pages/theme/index1/index',
})
} else {
this.setData({
showCardOffer: false
})
}

},
goback: function () {
let this_ = this
@@ -530,12 +538,16 @@ Page({
that.setData({
onshow: false
})


if (dealOptions && (dealOptions.couponChannelId || dealOptions.couponIds)) {
if (dealOptions.couponIds) {
if (dealOptions.couponChannelId == "undefined") {
this.setData({
couponIds: dealOptions.couponIds
couponIds: dealOptions.couponIds,
jumpToIndex: true
})
that.getDetail(dealOptions.couponIds, 'notendclock');
// that.getCouponInfo(dealOptions.couponIds, dealOptions.tenantId)
} else {
that.getDetail(dealOptions.couponChannelId, 'notendclock');
}
@@ -581,6 +593,18 @@ Page({
})
},

// getCouponInfo(couponId, mallTenantId) {
// Http.get({
// url: config.api.couponInfo,
// data: {
// couponId: couponId,
// mallTenantId: mallTenantId
// }
// }).then(res => { }).catch(err => {

// })

// },

getCouponPriceAndStock(couponChannelId) {//获取券价格与库存
Http.get({


+ 1
- 1
pages/index/index.js View File

@@ -174,7 +174,7 @@ Page({
// 转赠判断
if (options.cuserId) {
wx.redirectTo({
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}`,
url: `/pages/coupon/detail/index?couponChannelId=${options.couponChannelId}&cuserId=${options.cuserId}&coverImg=${options.coverImg}&userName=${options.userName}&avatarUrl=${options.avatarUrl}&couponOrderId=${options.couponOrderId}&updateDate=${options.updateDate}&couponIds=${options.couponId}&tenantId=${options.tenantId}`,
})
} else {
// 跳转普通券/消费卡/限时秒杀/砍价详情


+ 1
- 2
pages/theme/index1/index.js View File

@@ -659,8 +659,7 @@ Page({
})
}
}
console.log(JSON.stringify(app.globalData.styleLsit), "styleLsit")

// console.log(JSON.stringify(app.globalData.styleLsit), "styleLsit")

this.ifShowSqare();
if (wx.getStorageSync("squareList") && wx.getStorageSync("selectedMall")) {


Loading…
Cancel
Save