From ccf30cb0182c269ef1d91ffeed4839f3422b087b Mon Sep 17 00:00:00 2001
From: chenshengle <954534408@qq.com>
Date: Mon, 6 Dec 2021 14:28:37 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=A6=96=E9=A1=B5=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E3=80=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/hot/index.js | 2 +-
config/config.js | 8 +++
index/index.js | 49 +++++++++++++-
index/index.wxml | 21 +++---
index/index.wxss | 2 +-
pages/activityCalendar/activityCalendar.js | 12 ++--
pages/canvas/index.js | 8 ++-
pages/coupon/detail/index.js | 17 +++--
pages/coupon/detail/index.wxml | 4 +-
pages/coupon/detail/index.wxss | 3 +-
pages/couponorder/detail/index.js | 77 +++++++++++++++++++---
pages/couponorder/detail/index.wxml | 12 +++-
pages/couponorder/detail/index.wxss | 49 ++++++++++++--
pages/fillIndent/fillIndent.js | 1 +
pages/fillIndent/fillIndent.wxml | 4 +-
pages/fillIndent/fillIndent.wxss | 9 +++
pages/order/detail/index.js | 21 +++++-
pages/order/detail/index.wxml | 12 +++-
pages/order/detail/index.wxss | 34 +++++++++-
pages/order/index/index.js | 3 +
pages/order/index/index.wxml | 31 +++++++--
pages/order/index/index.wxss | 21 +++++-
pages/orderquanma/index.js | 73 ++++++++++++++++++--
pages/orderquanma/index.wxml | 10 ++-
pages/orderquanma/index.wxss | 42 +++++++++++-
pages/siteUser/siteUser.wxml | 4 +-
utils/imgurl.js | 8 +++
utils/memberqrcode.js | 1 +
28 files changed, 472 insertions(+), 66 deletions(-)
diff --git a/components/hot/index.js b/components/hot/index.js
index 7ed9f76..74dd11c 100644
--- a/components/hot/index.js
+++ b/components/hot/index.js
@@ -17,7 +17,7 @@ Component({
sql: bgColor.colorFirst.main.sql,
txt: bgColor.colorFirst.main.txt,
change: imgurl.change.url,
- None: imgurl.None.url,
+ None: imgurl.None.url,
jianUrl: imgurl.jian.url,
barginicon: imgurl.barginicon.url,
wangmeimeibargin: imgurl.wangmeimeibargin.url,
diff --git a/config/config.js b/config/config.js
index 2bb59ce..51376c8 100755
--- a/config/config.js
+++ b/config/config.js
@@ -16,6 +16,10 @@ var config = {
userSign:"/userSign/signIn",//签到
signRule:"/credit/credit_rules",//签到规则
wxMsg: '/user/updateMsg',
+ /**
+ * 获取首页按钮
+ */
+ wxCustomizeModule:"/wxCustomizeModule/list",
/**
* 微信消息推送获取模板id
*/
@@ -382,6 +386,10 @@ var config = {
verify:"/couponOrder/verify",
//全包下订单
couponPackageSave :"/order/couponPackageSave",
+
+
+ //获取动态核销码
+ dynamicId:"/couponOrder/dynamicId"
},
weapp: {
AppId: weappId
diff --git a/index/index.js b/index/index.js
index 3dcfbd2..d2a6138 100644
--- a/index/index.js
+++ b/index/index.js
@@ -91,7 +91,53 @@ Page({
liveFlag: 0, //直播按钮显隐标志位
squareName: "", //当前广场
isShowSqare: false,
+ moduleList:[],//按钮列表
+ },
+ goPage(e){
+ let obj = e.currentTarget.dataset.obj
+ console.log(obj,"obj")
+ if (obj.linkType==1){
+ if (obj.linkUrl =="/pages/game/index"){
+ this.gotogame()
+ }else{
+
+ wx.navigateTo({
+ url: obj.linkUrl,
+
+ })
+ }
+ //小程序内部跳转
+ }else if(obj.linkType==2){
+ //跳转到外部小程序
+ wx.navigateToMiniProgram({
+ appId: obj.outLinkAppid,
+ path: obj.linkUrl ? obj.linkUrl : '',
+ fail:err=>{
+ wx.showModal({
+ title: '提示',
+ content: err,
+ showCancel: false
+ })
+ }
+ })
+ }
+ },
+ //获取按钮列表
+ getModule(){
+ Http.get({
+ url: config.api.wxCustomizeModule
+ }).then(res=>{
+ this.setData({
+ moduleList: res.data,
+ })
+ }).catch(err=>{
+ wx.showModal({
+ title: '提示',
+ content: err.message ? err.message:err.data,
+ showCancel: false
+ })
+ })
},
//判断用户是否授权
uesrInfo(){
@@ -313,7 +359,8 @@ Page({
let that = this;
let optionss;
-
+ //获取首页按钮
+ that.getModule()
let openId = wx.getStorageSync('openId')
if (wx.getStorageSync('options')) {
optionss = JSON.parse(wx.getStorageSync('options'));
diff --git a/index/index.wxml b/index/index.wxml
index 80da12a..39739be 100644
--- a/index/index.wxml
+++ b/index/index.wxml
@@ -38,7 +38,14 @@
-
+
+
+
+ {{item.name}}
+
+
+
+
每日签到
@@ -75,15 +78,15 @@
积分商城
-
直播厅
-
-
-
+
+ -->
+
+
diff --git a/index/index.wxss b/index/index.wxss
index 5bb2447..13e2372 100644
--- a/index/index.wxss
+++ b/index/index.wxss
@@ -421,7 +421,7 @@ progress{
margin:20rpx auto;
display: flex;
flex-wrap:wrap;
- justify-content: space-between;
+ /* justify-content: space-between; */
background: #F4F5F9;
}
diff --git a/pages/activityCalendar/activityCalendar.js b/pages/activityCalendar/activityCalendar.js
index 0a3863a..94833d2 100644
--- a/pages/activityCalendar/activityCalendar.js
+++ b/pages/activityCalendar/activityCalendar.js
@@ -13,7 +13,7 @@ Page({
hideFlag: false, //遮罩成
childUrl: config.api.signDey,
continueSign: '', //连续签到天数
- signInDay: '', //0能签到 1是不能签到
+ signInDay: 1, //0能签到 1是不能签到
rules: [], //积分规则
rewardPoints: "", //记录签到后的奖励积分
},
@@ -33,11 +33,11 @@ Page({
}
})
- if (tempArr[0].score == 0 && tempArr[1].score == 0 && tempArr[2].score == 0 && tempArr[3].score == 0) {
- this.setData({
- signInDay: 1
- })
- }
+ // if (tempArr[0].score == 0 && tempArr[1].score == 0 && tempArr[2].score == 0 && tempArr[3].score == 0) {
+ // this.setData({
+ // signInDay: 1
+ // })
+ // }
if (this.data.continueSign >= 7) {
tempArr[1].activity = 1
if (this.data.continueSign >= 14) {
diff --git a/pages/canvas/index.js b/pages/canvas/index.js
index 159ec25..22706ba 100644
--- a/pages/canvas/index.js
+++ b/pages/canvas/index.js
@@ -9,7 +9,7 @@ Page({
* 页面的初始数据
*/
data: {
- navigationBarHeight,
+ navigationBarHeight,
poterbg: imgurl.poterbg.url,
windowWidth: wx.getSystemInfoSync().windowWidth,
windowHeight: wx.getSystemInfoSync().screenHeight,
@@ -18,7 +18,8 @@ Page({
mallname: '', //商场名字
qrCodeL: "", //小程序码
couponList: [], //活动劵列表
- canvasScale: 1.0 // 画布放大的倍数,因为如果保存的是一倍的分享图片的话,分享图会有点虚。所以保存的时候,canvasScale设置为2.0,wxss 里面的left: 500%;打开注释。就可保存两倍的分享图
+ canvasScale: 1.0 ,// 画布放大的倍数,因为如果保存的是一倍的分享图片的话,分享图会有点虚。所以保存的时候,canvasScale设置为2.0,wxss 里面的left: 500%;打开注释。就可保存两倍的分享图
+ qrCode:"",
},
/**
@@ -213,6 +214,7 @@ Page({
let coImageHeight = parseInt(120 * scale);
let src1 = "";
let src2 = "";
+ console.log(this.data.qrCode, this.data.data.qrCode,"qrCode")
if (this.data.qrCode) {
src1 =
this.data.qrCode + `?imageView/2/w/${coImageWidth}/h/${coImageHeight}`;
@@ -342,7 +344,7 @@ Page({
let that = this;
let data;
data = {
- status: 0,
+ status: 0,
merchantId: id,
pageNum: 1,
pageSize: 15
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index f486506..a2db500 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -1094,6 +1094,7 @@ Page({
disOrderNumber: res.data.orderNumber,
composeOrderType: res.data.composeOrderType
})
+
if (res.data && res.data.pressEndDate) {
that.setData({
dispressEndDate: true
@@ -1121,11 +1122,19 @@ Page({
title: '提示',
content: '您有未支付订单,请先进行支付',
confirmText: "去支付",
- success: function(res) {
- if (res.confirm) {
- wx.navigateTo({
- url: `/pages/order/detail/index?orderId=${that.data.disOrderNumber}&contentType=${that.data.contentType}&composeOrderType=${that.data.composeOrderType}`,
+ success: function(res1) {
+ if (res1.confirm) {
+
+ if (that.data.composeOrderType>0){//券包
+ wx.navigateTo({
+ url: `/pages/order/detail/index?orderId=${res.data.composeOrderId}&contentType=${that.data.contentType}&composeOrderType=${that.data.composeOrderType}`,
})
+ }else{
+ wx.navigateTo({
+ url: `/pages/order/detail/index?orderId=${that.data.disOrderNumber}&contentType=${that.data.contentType}&composeOrderType=${that.data.composeOrderType}`,
+ })
+ }
+
}
}
})
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 533d204..896461e 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -122,7 +122,7 @@
-
+
{{item.title}}
¥{{item.priceStr}}
@@ -160,7 +160,7 @@
data-shippingtype="2" class="home">配送到家
diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss
index d335604..382ec9d 100644
--- a/pages/coupon/detail/index.wxss
+++ b/pages/coupon/detail/index.wxss
@@ -960,7 +960,8 @@ checkbox-group, radio-group {
}
.childImg {
- width: 90%;
+ width: 300rpx;
+ height: 176rpx;
margin: 10px auto;
display: block;
}
diff --git a/pages/couponorder/detail/index.js b/pages/couponorder/detail/index.js
index c35b0a8..5324120 100644
--- a/pages/couponorder/detail/index.js
+++ b/pages/couponorder/detail/index.js
@@ -16,6 +16,8 @@ Page({
wm01Url: imgurl.wm01.url,
wm02Url: imgurl.wm02.url,
wm03Url: imgurl.wm03.url,
+ upDataRqUrl: imgurl.upDataRq.url,
+ upDataRqUrlF: imgurl.upDataRqF.url,
wm04Url: imgurl.wm04.url,
teljpgUrl: imgurl.teljpg.url,
newUrl: imgurl.new1.url,
@@ -34,14 +36,20 @@ Page({
staticGamedata: {},
showIf: false,
curHtml: '',
+ showhieRq:false,
+ dynamicRq:"",
+ expiredSeconds:0,
+ templTiem:""
},
onUnload:function(){
let that = this;
clearInterval(that.data.setInter);
+ clearInterval(that.data.templTiem);
},
onHide:function(){
let that = this;
clearInterval(that.data.setInter);
+ clearInterval(that.data.templTiem);
},
gotogame: function () {
let that = this;
@@ -83,17 +91,71 @@ Page({
// })
// }, 200)
// },
+ setRq(){
+ let _this = this
+ _this.setData({
+ showhieRq: false,
+ })
+ Http.get({//获取动态二维码
+ url: config.api.dynamicId,
+ data: {
+ couponOrderId: _this.data.code
+ }
+ }).then(res => {
+ console.log(res, "res")
+ _this.setData({
+ dynamicRq: res.data.dynamicId,
+ expiredSeconds: res.data.expiredSeconds
+ })
+
+ let url = JSON.stringify({
+ END: "C",
+ TYPE: "couponorder",
+ ID: _this.data.dynamicRq
+ })
+
+ let inre = setInterval(()=>{
+ if(_this.data.expiredSeconds>1){
+ _this.setData({
+ expiredSeconds: _this.data.expiredSeconds-1
+ })
+ console.log("有效",_this.data.expiredSeconds)
+ }else{
+ console.log("无效", _this.data.expiredSeconds)
+ clearInterval(_this.data.templTiem)
+ _this.setData({
+ showhieRq:true
+ })
+ }
+ },1000)
+ _this.setData({
+ templTiem:inre
+ })
+ // util.qrcode("qrcode", url, 350, 350);
+ _this.createQrCode(url, "qrcode", 350, 350);
+ }).catch(err=>{
+ wx.showToast({
+ title: err.message,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ })
+ },
+
onLoad: function (options) {
let that = this;
that.setData({
code: options.quancode,
couponorderstatus: options.couponorderstatus
});
+
if (
options.quancode &&
that.data.couponorderstatus == 0
) {
//aaa
+ that.setRq()//动态二维码 //这个方法必须在拿到 options.quancode 后调用
that.getHtml(options.quancode);
}
//获得优惠券的详情
@@ -159,7 +221,7 @@ Page({
url: config.api.couponOrderDetail,
data: {
couponOrderId: options.quancode
- }
+ }
}).then(res => {
that.setData({
couponorderstatus: res.data.couponOrderStatus,
@@ -176,13 +238,7 @@ Page({
validEndDate: util.formatTime(that.data.data.validEndDate, "yyyy-MM-dd hh:mm:ss")
})
}
- let url = JSON.stringify({
- END:"C",
- TYPE:"couponorder",
- ID: options.quancode
- })
- // util.qrcode("qrcode", url, 350, 350);
- that.createQrCode(url, "qrcode", 350, 350);
+
})
.catch(err => {
wx.showToast({
@@ -208,10 +264,13 @@ Page({
}
})
},
+ upDataRq(){
+ console.log(1123)
+ },
createQrCode: function (url, canvasId, cavW, cavH) {
//调用插件中的draw方法,绘制二维码图片
let that = this;
- QR.api.draw(url, canvasId, cavW, cavH, function (res) {
+ QR.api.draw(url, canvasId, cavW, cavH, function (res) {
that.setData({
tempFilePath: res
})
diff --git a/pages/couponorder/detail/index.wxml b/pages/couponorder/detail/index.wxml
index ce564f1..5e513cf 100644
--- a/pages/couponorder/detail/index.wxml
+++ b/pages/couponorder/detail/index.wxml
@@ -12,7 +12,7 @@
¥{{data.couponPrice/100}}
¥{{data.salePrice/100}}
- ¥{{data.salePrice/100}}
+ ¥{{data.couponPrice/100}}
¥{{data.price/100}}
过期不退款
@@ -47,6 +47,16 @@
+
+
+ 点一点刷新二维码
+
+
+ 二维码在
+ {{expiredSeconds}}s
+ 后失效
+
+
优惠券码:{{code}}
diff --git a/pages/couponorder/detail/index.wxss b/pages/couponorder/detail/index.wxss
index 677d4ec..01b12d1 100644
--- a/pages/couponorder/detail/index.wxss
+++ b/pages/couponorder/detail/index.wxss
@@ -10,12 +10,18 @@
border-radius: 16rpx;
}
+.coedTiem{
+ text-align: center;
+ color: rgba(253,131,45,1);
+ margin-bottom: 10rpx;
+}
page {
background: linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%);
height: auto !important;
}
.zhuangtai{
margin-bottom: 20rpx;
+
}
.panel, .zhuangtai image {
position: relative;
@@ -26,7 +32,9 @@ page {
padding: 0;
z-index: 10000;
}
-
+.panel{
+ position: relative;
+}
.pane2 {
background: #fff;
opacity: 0.6;
@@ -299,6 +307,39 @@ page {
border: 1px solid red;
padding: 3rpx;
}
-rich-text img{
- max-width: 100%;
-}
\ No newline at end of file
+
+.closeRq{
+ position: absolute;
+ width: 420rpx;
+ height: 420rpx;
+ line-height: 420rpx;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.8);
+ left: 50%; top: 42%;
+ transform: translate(-50%, -50%); /* 50%为自身尺寸的一半 */
+ z-index: 10000000;
+ color: #fff;
+ font-size: 38rpx;
+}
+.updataRqCode{
+ width: 80rpx !important;
+ height: 80rpx;
+ margin-top: calc(50%-80rpx) !important;
+ margin-left: calc(50%-80rpx) !important;
+ display: inline-block !important;
+}
+.upDataRq{
+ position: absolute;
+ width: 100%;
+ text-align: center;
+ height: 80rpx;
+ color: #fff ;
+ top: 20%;
+ left: 0;
+}
+/* .upDataRqImg{
+ width: 40rpx !important;
+ height: 40rpx;
+ float: left;
+ margin: 20rpx 0 0 20rpx !important;
+} */
diff --git a/pages/fillIndent/fillIndent.js b/pages/fillIndent/fillIndent.js
index 6592563..78e625d 100644
--- a/pages/fillIndent/fillIndent.js
+++ b/pages/fillIndent/fillIndent.js
@@ -28,6 +28,7 @@ Page({
shippingtype:1,//1是自提 2配送
total:0,//合计
},
+
goAddStie() {
wx.navigateTo({
url: '/pages/siteAdd/siteAdd?url=/pages/fillIndent/fillIndent',
diff --git a/pages/fillIndent/fillIndent.wxml b/pages/fillIndent/fillIndent.wxml
index 75e8971..86ce03e 100644
--- a/pages/fillIndent/fillIndent.wxml
+++ b/pages/fillIndent/fillIndent.wxml
@@ -81,10 +81,12 @@
{{item.address}}
- 默认
+ 默认
+
+ 添加收货地址
\ No newline at end of file
diff --git a/pages/fillIndent/fillIndent.wxss b/pages/fillIndent/fillIndent.wxss
index 3e00d2d..1f517ca 100644
--- a/pages/fillIndent/fillIndent.wxss
+++ b/pages/fillIndent/fillIndent.wxss
@@ -217,4 +217,13 @@
color: #fff;
font-size: 24rpx;
border-radius: 10rpx;
+}
+.addStie{
+ width: 80%;
+ margin: 40rpx auto;
+ background-color: #FD832D;
+ color: #fff;
+ border-radius: 50rpx;
+ padding: 10rpx 0;
+ text-align: center;
}
\ No newline at end of file
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 5cf3e17..78b1b70 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -34,6 +34,25 @@ Page({
contentType: 0,
orderFlag: false,//判断是不是线上配送
},
+ copeCode(e){
+ let code = e.currentTarget.dataset.text
+ wx.setClipboardData({
+ data: code,
+ success:function(){
+ wx.showToast({
+ title: '复制成功',
+ icon:"none"
+ })
+ }
+ })
+ },
+ gokuaidi(e){
+ let nu = e.currentTarget.dataset.nu
+ wx.navigateToMiniProgram({
+ appId: 'wx6885acbedba59c14',
+ path: `pages/result/result?nu=${nu}&com=&querysource=third_xcx`
+ })
+ },
setShow(){
this.setData({
@@ -132,7 +151,7 @@ Page({
}).catch(err=>{
wx.showModal({
title: '提示',
- content: error.errMsg,
+ content: err.message ? err.message:err.data,
showCancel: false
})
})
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 993b5c3..0f98db8 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -67,8 +67,16 @@
{{(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.deliveryInfo.courierInput}}
+
+
+ 快递单号:
+
+ {{order.deliveryInfo.expressageIdInput}}
+
+ 复制
+ 查询物流
@@ -33,7 +33,7 @@
-
+
@@ -47,18 +47,37 @@
-
-
+
+
+
+
+
+
+
+ 价格:{{(item.salePrice)/100}}元 x {{item.couponNumber}}
+
+ 运费:{{item.freightPriceStr}}
+ 下单时间:{{item.createDate}}
+
+
+
+
+
+
+
+
{{child.title}}
价格:{{(child.salePrice)/100}}元 x {{child.couponNumber}}
- 下单时间:{{child.createDate}}
+ 运费:{{child.freightPriceStr}}
+ 下单时间:{{child.createDate}}
+
-
+
实付金额:{{item.payment/100}}元
diff --git a/pages/order/index/index.wxss b/pages/order/index/index.wxss
index 3ab9cb9..7de34fc 100644
--- a/pages/order/index/index.wxss
+++ b/pages/order/index/index.wxss
@@ -359,12 +359,27 @@ button::after{ border: none; }
}
.date{
- margin-top: 16rpx;
+ /* margin-top: 16rpx; */
font-size: 24rpx;
color: #999;
letter-spacing: 0;
padding-left: 4%;
- line-height: 33rpx;
+ line-height: 26rpx;
}
-
+.yunfe{
+ font-size: 24rpx;
+ color: #999;
+ letter-spacing: 0;
+ padding-left: 4%;
+ height: 33rpx;
+ line-height: 33rpx;
+}
+.yunfeK{
+ font-size: 24rpx;
+ color: #999;
+ letter-spacing: 0;
+ padding-left: 4%;
+ height: 25rpx;
+ line-height: 33rpx;
+}
\ No newline at end of file
diff --git a/pages/orderquanma/index.js b/pages/orderquanma/index.js
index 7f36447..f4e9324 100644
--- a/pages/orderquanma/index.js
+++ b/pages/orderquanma/index.js
@@ -15,6 +15,8 @@ Page({
wm02Url: imgurl.wm02.url,
wm03Url: imgurl.wm03.url,
wm04Url: imgurl.wm04.url,
+ upDataRqUrl: imgurl.upDataRq.url,
+ upDataRqUrlF: imgurl.upDataRqF.url,
code: "",
//存储计时器
setInter: "",
@@ -22,6 +24,10 @@ Page({
showIf: false,
curHtml: '',
contentType: 0,
+ showhieRq: false,
+ dynamicRq: "",
+ expiredSeconds: 0,
+ templTiem: ""
},
gotogame: function () {
let that = this;
@@ -56,12 +62,65 @@ Page({
});
})
},
- onLoad: function (options) {
+
+ setRq() {
+ let _this = this
+ _this.setData({
+ showhieRq: false,
+ })
+ Http.get({//获取动态二维码
+ url: config.api.dynamicId,
+ data: {
+ couponOrderId: _this.data.code
+ }
+ }).then(res => {
+ console.log(res, "res")
+ _this.setData({
+ dynamicRq: res.data.dynamicId,
+ expiredSeconds: res.data.expiredSeconds
+ })
+
+ let url = JSON.stringify({
+ END: "C",
+ TYPE: "couponorder",
+ ID: _this.data.dynamicRq
+ })
+
+ let inre = setInterval(() => {
+ if (_this.data.expiredSeconds > 1) {
+ _this.setData({
+ expiredSeconds: _this.data.expiredSeconds - 1
+ })
+ console.log("有效", _this.data.expiredSeconds)
+ } else {
+ console.log("无效", _this.data.expiredSeconds)
+ clearInterval(_this.data.templTiem)
+ _this.setData({
+ showhieRq: true
+ })
+ }
+ }, 1000)
+ _this.setData({
+ templTiem: inre
+ })
+ // util.qrcode("qrcode", url, 350, 350);
+ _this.createQrCode(url, "qrcode", 350, 350);
+ }).catch(err => {
+ wx.showToast({
+ title: err.message,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ })
+ },
+
+ onLoad: function (options) { //quancode
console.log(options)
console.log(app.globalData.curHtml)
let that = this;
- let value = JSON.stringify({ END: "C", TYPE: "couponorder", ID: options.quancode})
- that.createQrCode(value, "qrcode", 350, 350);
+ // let value = JSON.stringify({ END: "C", TYPE: "couponorder", ID: options.quancode})
+ // that.createQrCode(value, "qrcode", 350, 350);
that.setData({
code: options.quancode,
title: options.title,
@@ -71,6 +130,10 @@ Page({
validStatus: options.validstatus,
contentType: options.contentType
});
+ if (options.couponorderstatus==0){
+ that.setRq()//动态获取二维码 这个方法必须在拿到 options.quancode 后调用
+ }
+
if (options.contentType != undefined && options.contentType==1) {
this.setData({
curHtml: app.globalData.curHtml
@@ -141,7 +204,7 @@ Page({
}
/**
* couponorderstatus
- * 0 没有核销
+ * 0 没有核销
* 1 已经核销成功
*/
},
@@ -157,10 +220,12 @@ Page({
onUnload: function () {
let that = this;
clearInterval(that.data.setInter);
+ clearInterval(that.data.templTiem);
},
onHide: function () {
let that = this;
clearInterval(that.data.setInter);
+ clearInterval(that.data.templTiem);
},
// onHide:function(){
// console.log(app.globalData.sight)
diff --git a/pages/orderquanma/index.wxml b/pages/orderquanma/index.wxml
index 45211de..66774fd 100644
--- a/pages/orderquanma/index.wxml
+++ b/pages/orderquanma/index.wxml
@@ -14,7 +14,7 @@
3 已经退款
-->
-
+
@@ -24,6 +24,14 @@
+
+
+ 点一点刷新二维码
+
+ 二维码在
+ {{expiredSeconds}}s
+ 后失效
+
兑换码:{{code}}
diff --git a/pages/orderquanma/index.wxss b/pages/orderquanma/index.wxss
index 8feb8b4..824a331 100644
--- a/pages/orderquanma/index.wxss
+++ b/pages/orderquanma/index.wxss
@@ -18,6 +18,11 @@ page {
border-radius: 16rpx;
padding-bottom: 20rpx;
}
+.coedTiem{
+ text-align: center;
+ color: rgba(253,131,45,1);
+ margin-bottom: 10rpx;
+}
.title {
line-height: 36rpx;
@@ -51,6 +56,9 @@ page {
padding:0;
z-index:10000;
}
+.panel{
+ position: relative;
+}
.pane2 {
background: #fff;
@@ -222,4 +230,36 @@ page {
color: #919191;
letter-spacing: 0;
line-height: 42rpx;
-}
\ No newline at end of file
+}
+.closeRq{
+ position: absolute;
+ width: 420rpx;
+ height: 420rpx;
+ line-height: 420rpx;
+ text-align: center;
+ background-color: rgba(0, 0, 0, 0.8);
+ left: 50%; top: 42%;
+ transform: translate(-50%, -50%); /* 50%为自身尺寸的一半 */
+ z-index: 10000000;
+ color: #fff;
+ font-size: 38rpx;
+}
+.updataRqCode{
+ width: 80rpx !important;
+ height: 80rpx;
+ margin-top: calc(50%-80rpx) !important;
+ margin-left: calc(50%-80rpx) !important;
+ display: inline-block !important;
+}
+.upDataRq{
+ position: absolute;
+ width: 100%;
+ text-align: center;
+ height: 80rpx;
+ color: #fff ;
+ top: 20%;
+ left: 0;
+}
+/* rich-text img{
+ max-width: 100%;
+} */
diff --git a/pages/siteUser/siteUser.wxml b/pages/siteUser/siteUser.wxml
index 90a8569..0b58abc 100644
--- a/pages/siteUser/siteUser.wxml
+++ b/pages/siteUser/siteUser.wxml
@@ -1,10 +1,10 @@
-
+
- 默认
+ 默认
{{item.consignee}} {{item.mobile}}
diff --git a/utils/imgurl.js b/utils/imgurl.js
index da39c32..324c831 100644
--- a/utils/imgurl.js
+++ b/utils/imgurl.js
@@ -1,5 +1,13 @@
const baseUrl = 'https://formall.oss-accelerate.aliyuncs.com/cimg/'
module.exports = {
+ 'upDataRq':{
+ 'url': baseUrl + "upDataRq.png",
+ "name":""
+ },
+ 'upDataRqF': {
+ 'url': baseUrl + "upDataRqF.png",
+ "name": ""
+ },
'xiangshang':{
'url': baseUrl +"xiangshang.png",
"name":""
diff --git a/utils/memberqrcode.js b/utils/memberqrcode.js
index fc40a75..cbbe908 100644
--- a/utils/memberqrcode.js
+++ b/utils/memberqrcode.js
@@ -824,6 +824,7 @@
console.log(res)
},
success: function (res) {
+
if (cb) {
cb(res.tempFilePath);
};