瀏覽代碼

[优惠券生成码规则的修改,个人码的修改]

tags/同保楼3.3.1
meo 6 年之前
父節點
當前提交
465c4fb1a6
共有 13 個檔案被更改,包括 50 行新增29 行删除
  1. +16
    -10
      pages/bargain/bargainDatail/bargainDatail.js
  2. +2
    -2
      pages/bargain/bargainDatail/bargainDatail.wxml
  3. +3
    -3
      pages/cardorder/index/index.js
  4. +5
    -3
      pages/coupon/detail/index.js
  5. +1
    -1
      pages/coupon/detail/index.wxml
  6. +2
    -2
      pages/couponorder/detail/index.wxml
  7. +1
    -1
      pages/couponorder/detail/index.wxss
  8. +5
    -1
      pages/index/index.js
  9. +1
    -0
      pages/order/detail/index.js
  10. +1
    -1
      pages/order/index/index.wxml
  11. +2
    -1
      pages/orderquanma/index.js
  12. +5
    -1
      pages/user/index.js
  13. +6
    -3
      pages/user/index.wxss

+ 16
- 10
pages/bargain/bargainDatail/bargainDatail.js 查看文件

@@ -16,7 +16,8 @@ Page({
min: null,
sec: null,
showPage: false,
discountStatus:null
discountStatus:null,
disabled:false
},

/**
@@ -39,6 +40,14 @@ Page({
that.pressOrderDetail(options.orderId);
}
},
onShow: function () {
let that = this;
console.log("--------------------------------onShow-------------------------------")
var todayDate = new Date().getTime();
that.setData({
todayDate: todayDate,
})
},
/**
* 更多砍价商品
*/
@@ -59,6 +68,8 @@ Page({
}
})
.then(res => {
console.log(res)
console.log("--------------------------status------------------------------------")
if (res.data.status == 1) {
that.setData({
discountStatus: 1
@@ -75,9 +86,10 @@ Page({
wx.stopPullDownRefresh();
})
.catch(err => {
console.log(err)
wx.stopPullDownRefresh();
wx.showToast({
title: err.message,
title: err.errMsg,
icon: "none"
})
})
@@ -119,7 +131,6 @@ Page({
})
.then(res => {
console.log(res);
that.getPressOrderStatus(orderId);
res.data.orderPressList.map(file => {
file.createDate = diffTime(file.createDate)
})
@@ -130,6 +141,7 @@ Page({
remain: (res.data.pressCurrentValue / 100).toFixed(2),
showPage: true
})
that.getPressOrderStatus(orderId);
})
.catch(err => {
wx.showToast({
@@ -139,13 +151,7 @@ Page({
wx.stopPullDownRefresh();
})
},
onShow: function() {
let that = this;
var todayDate = new Date().getTime();
that.setData({
todayDate: todayDate,
})
},
countdown(end_time) {
let that = this;
var EndTime = end_time;


+ 2
- 2
pages/bargain/bargainDatail/bargainDatail.wxml 查看文件

@@ -53,7 +53,7 @@
</view>
</view>

<view wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false">
<view wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false">
<view class="fl" bindtap='orderFunc' data-orderId="{{data.id}}" data-price="{{data.price/100}}">
<text>{{data.price/100}}元</text>
<text>立即购买</text>
@@ -61,6 +61,6 @@
<button class='share user-motto fr' data-orderId='{{data.id}}' id="shareBtn" open-type="share" hover-class="other-button-hover">邀请好友继续砍价</button>
</view>
<view wx:if="{{data.orderStatus == 7&&discountStatus == 1}}" class="btns01 clearfix" hover-class="none" hover-stop-propagation="false">
<button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover">{{data.salePrice/100}}元 底价购买</button>
<button bindtap='orderFunc' data-orderId="{{data.id}}" data-salePrice="{{data.salePrice/100}}" hover-class="other-button-hover" disabled="{{disabled}}">{{data.salePrice/100}}元 底价购买 </button>
</view>
</view>

+ 3
- 3
pages/cardorder/index/index.js 查看文件

@@ -54,12 +54,12 @@ Page({
let that = this;
wx.scanCode({
success: (res) => {
console.log(res.result.indexOf('merchant_id_scan'))
if(res.result.indexOf('merchant_id_scan')!=-1){
let value = JSON.parse(res.result);
if (value.END == 'B' && value.TYPE == 'merchant' && value.ID){
Http.get({
url: config.api.findByCode,
data: {
merchantCode: JSON.parse(res.result).merchant_id_scan,
merchantCode:value.ID,
}
})
.then(res => {


+ 5
- 3
pages/coupon/detail/index.js 查看文件

@@ -118,8 +118,9 @@ Page({
/**
* gotopay
*/
gotopay: function () {
gotopay: function (e) {
let that = this;
var discount = e.currentTarget.dataset.discount;
that.setData({
queueData: null,
showbutton: true
@@ -133,7 +134,7 @@ Page({
.then(res => {
console.log(res);
if (res.data == undefined) {
that.orderFunc();
that.orderFunc(discount);
that.setData({
flag: false
})
@@ -338,13 +339,14 @@ Page({
* 发起支付
*/
orderFunc(discount) {
console.log(discount)
var that = this;
Http.post({
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
if (discount == 'discount') {
if (discount == 'discount' || discount == 'discount1') {
var data = {
couponChannelId: "" + that.data.couponChannelId,
couponId: "" + that.data.couponId,


+ 1
- 1
pages/coupon/detail/index.wxml 查看文件

@@ -94,7 +94,7 @@
</view>
</view>
<view wx:if="{{data.type==8}}" class="btns clearfix" hover-class="none" hover-stop-propagation="false">
<button class="fl" bindtap='gotopay' disabled='{{showbutton}}'>
<button class="fl" bindtap='gotopay' data-discount='discount1' disabled='{{showbutton}}'>
<text>{{data.priceStr}}元</text>
<text>立即购买</text>
</button>


+ 2
- 2
pages/couponorder/detail/index.wxml 查看文件

@@ -24,9 +24,9 @@
<image wx:if="{{data.couponOrderStatus==2}}" src="{{wm02Url}}" mode='widthFix'></image>
<image wx:if="{{data.couponOrderStatus==3}}" src="{{wm03Url}}" mode='widthFix'></image>
<view class="panel" wx:if="{{data.couponOrderStatus==0}}">
<view class="barcode">
<!-- <view class="barcode">
<canvas canvas-id="barcode" />
</view>
</view> -->
<view class="qrcode">
<canvas canvas-id="qrcode" />
</view>


+ 1
- 1
pages/couponorder/detail/index.wxss 查看文件

@@ -16,7 +16,7 @@ page {
width: 600rpx;
display: block;
border-radius: 10rpx;
margin: 38rpx auto 0;
margin: 0 auto;
padding: 0;
z-index: 10000000000;
}


+ 5
- 1
pages/index/index.js 查看文件

@@ -72,7 +72,11 @@ Page({
var st = setTimeout(function () {
wx.hideToast()
var size = that.setCanvasSize();
var url = JSON.stringify({ flagid: that.data.memberId });
var url = JSON.stringify({
END: "C",
TYPE: "memberCode",
ID: that.data.memberId,
});
that.createQrCode(url, "mycanvas2", size.w, size.h);
that.setData({
maskHidden: true


+ 1
- 0
pages/order/detail/index.js 查看文件

@@ -33,6 +33,7 @@ Page({
},
powerDrawer: function (e) {
let that = this;
console.log(e)
// couponOrderStatus
// 0 未使用
// 1 已使用


+ 1
- 1
pages/order/index/index.wxml 查看文件

@@ -48,7 +48,7 @@
<text>查看详情</text>
</view>
<view wx:if="{{item.orderStatus == 6}}" class="btn" data-id="{{item.id}}" bindtap="gotoDiscount">
<text>查看详情</text>
<text>砍价详情</text>
</view>
<view wx:if="{{item.orderStatus==0 || item.orderStatus==7}}" class="btn" data-id="{{item.id}}" bindtap="gotopay">
<text>去支付</text>


+ 2
- 1
pages/orderquanma/index.js 查看文件

@@ -50,7 +50,8 @@ Page({
},
onLoad: function (options) {
let that = this;
util.barcode("barcode", options.quancode, 500, 100);
let value = JSON.stringify({ END: "C", TYPE: "couponorder", ID: options.quancode})
util.barcode("barcode", value.ID, 500, 100);
util.qrcode("qrcode", options.quancode, 350, 350);
that.setData({
code: options.quancode,


+ 5
- 1
pages/user/index.js 查看文件

@@ -224,7 +224,11 @@ Page({
var st = setTimeout(function () {
wx.hideToast()
var size = that.setCanvasSize();
var url = JSON.stringify({ flagid:that.data.memberId});
var url = JSON.stringify({
END:"C",
TYPE:"memberCode",
ID: that.data.memberId,
})
that.createQrCode(url, "mycanvas1", size.w, size.h);
that.setData({
maskHidden: true


+ 6
- 3
pages/user/index.wxss 查看文件

@@ -105,7 +105,8 @@ page{
position: absolute;
right: 0;
bottom: 0;
top: 24rpx;
top: 0;
margin: auto;
text-align: center;
}

@@ -251,14 +252,16 @@ page{
width: 26rpx;
vertical-align: middle;
}

.qrcode{
display: none;
}
.qrcode image {
width: 70rpx;
margin-right: 20rpx;
}

.edits {
margin-top: -20rpx;
margin-top: 44rpx;
}

.showQrcode {


Loading…
取消
儲存