浏览代码

【首页按钮自定义】

release
chenshengle 3 年前
父节点
当前提交
ccf30cb018
共有 28 个文件被更改,包括 472 次插入66 次删除
  1. +1
    -1
      components/hot/index.js
  2. +8
    -0
      config/config.js
  3. +48
    -1
      index/index.js
  4. +12
    -9
      index/index.wxml
  5. +1
    -1
      index/index.wxss
  6. +6
    -6
      pages/activityCalendar/activityCalendar.js
  7. +5
    -3
      pages/canvas/index.js
  8. +13
    -4
      pages/coupon/detail/index.js
  9. +2
    -2
      pages/coupon/detail/index.wxml
  10. +2
    -1
      pages/coupon/detail/index.wxss
  11. +68
    -9
      pages/couponorder/detail/index.js
  12. +11
    -1
      pages/couponorder/detail/index.wxml
  13. +45
    -4
      pages/couponorder/detail/index.wxss
  14. +1
    -0
      pages/fillIndent/fillIndent.js
  15. +3
    -1
      pages/fillIndent/fillIndent.wxml
  16. +9
    -0
      pages/fillIndent/fillIndent.wxss
  17. +20
    -1
      pages/order/detail/index.js
  18. +10
    -2
      pages/order/detail/index.wxml
  19. +31
    -3
      pages/order/detail/index.wxss
  20. +3
    -0
      pages/order/index/index.js
  21. +25
    -6
      pages/order/index/index.wxml
  22. +18
    -3
      pages/order/index/index.wxss
  23. +69
    -4
      pages/orderquanma/index.js
  24. +9
    -1
      pages/orderquanma/index.wxml
  25. +41
    -1
      pages/orderquanma/index.wxss
  26. +2
    -2
      pages/siteUser/siteUser.wxml
  27. +8
    -0
      utils/imgurl.js
  28. +1
    -0
      utils/memberqrcode.js

+ 1
- 1
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,


+ 8
- 0
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


+ 48
- 1
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'));


+ 12
- 9
index/index.wxml 查看文件

@@ -38,7 +38,14 @@
<!-- banner -->
<c-banner wx:key="unique" list="{{list}}" />
<!-- 频道 -->
<view class='channelBox' wx:if="{{ifStoreApp!=1}}" style="{{typeLsit.sy_mbg.styleClass}}">
<view class="channelBox" wx:if="{{ifStoreApp!=1&&moduleList.length>0}}" style="{{typeLsit.sy_mbg.styleClass}}">
<view class='kjBox' bindtap='goPage' data-obj="{{item}}" wx:for="{{moduleList}}" wx:key="{{index}}">
<image src='{{item.icon}}' mode='aspectFill'></image>
<view class="text">{{item.name}}</view>
</view>
</view>

<!-- <view class='channelBox' wx:if="{{ifStoreApp!=1}}" style="{{typeLsit.sy_mbg.styleClass}}">
<view class='kjBox' bindtap='gotoBargain'>
<image src='{{typeLsit.sy_kj.icon}}' mode='aspectFill'></image>
<view class="text">砍价</view>
@@ -59,10 +66,6 @@
</view>

<!-- <view class='kjBox' bindtap='gotogame'>
<image src='{{xingyun}}' mode='aspectFill' bindtap=''></image>
<view>游戏频道</view>
</view> -->
<view class='kjBox' bindtap='goSign'>
<image src='{{typeLsit.sy_qd.icon}}' mode='aspectFill'></image>
<view class="text">每日签到</view>
@@ -75,15 +78,15 @@
<image src='{{typeLsit.sy_jfsc.icon}}' mode='aspectFill'></image>
<view class="text">积分商城</view>
</view>
<!-- wx:if="{{liveFlag}}"否配置直播条件预览 -->
<view class='kjBox' bindtap='goLive' wx:if="{{liveFlag}}">
<image src='{{typeLsit.sy_zbt.icon}}' mode='aspectFill'></image>
<view class="text">直播厅</view>
</view>
<view class="kjBox" wx:if="{{!liveFlag}}"></view>
</view>
</view> -->
<!-- 频道 -->


<view class='channelBox' wx:if="{{ifStoreApp==1}}" style="width:525rpx;">
<view class='kjBox' bindtap='gotoBargain'>
<image src='{{kanjia}}' mode='aspectFill'></image>


+ 1
- 1
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;
}


+ 6
- 6
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) {


+ 5
- 3
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


+ 13
- 4
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}`,
})
}
}
}
})


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

@@ -122,7 +122,7 @@
<!-- <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>
<image class="childImg" mode='aspectFill' src="{{item.coverImg}}"></image>
<view class="childName">{{item.title}}</view>
<view class="childMoney">¥{{item.priceStr}}</view>
</view>
@@ -160,7 +160,7 @@
data-shippingtype="2" class="home">配送到家
</button>
<button wx:if="{{data.type==11&&data.remainInventory!=0}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}"
data-shippingtype="1" class="arrive">到店购买
data-shippingtype="1" class="arrive">到店自提
</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>


+ 2
- 1
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;
}


+ 68
- 9
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
})


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

@@ -12,7 +12,7 @@
<view class="money">
<text wx:if="{{data.type == 8&&data.price == data.couponPrice}}">¥{{data.couponPrice/100}}</text>
<text wx:if="{{data.type == 8&&data.price != data.couponPrice}}">¥{{data.salePrice/100}}</text>
<text wx:if="{{data.type != 8}}">¥{{data.salePrice/100}}</text>
<text wx:if="{{data.type != 8}}">¥{{data.couponPrice/100}}</text>
<del>¥{{data.price/100}}</del>
<text class="refund" wx:if="{{data.autoRefund == 1}}">
<text>过期不退款</text>
@@ -47,6 +47,16 @@
<canvas canvas-id="qrcode" style="width: 1200rpx; height: 800rpx;" />
</view>
<image src="{{tempFilePath}}" mode="aspectFit" />
<view class="closeRq" wx:if="{{showhieRq}}" bindtap="setRq">
<image class="updataRqCode" mode='widthFix' src="{{upDataRqUrlF}}"></image>
<view class="upDataRq">点一点刷新二维码</view>
</view>
<view class="coedTiem" wx:if="{{!showhieRq&&expiredSeconds>1}}">二维码在
<text style="color:red">{{expiredSeconds}}s</text>
后失效
</view>
<view class="barnum buy">
<text>优惠券码:</text>{{code}}</view>
</view>


+ 45
- 4
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%;
}

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

+ 1
- 0
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',


+ 3
- 1
pages/fillIndent/fillIndent.wxml 查看文件

@@ -81,10 +81,12 @@
</view>
<view class="siteTitle siteText" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">{{item.address}}</view>
<view class="ditText" wx:if="{{index==0}}">默认</view>
<view class="ditText" wx:if="{{item.isDefault==1}}">默认</view>
</view>

</view>
<view class="addStie" bindtap="goAddStie">添加收货地址</view>

</view>
</view>

+ 9
- 0
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;
}

+ 20
- 1
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
})
})


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

@@ -67,8 +67,16 @@
<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>
<text class='left'>物流公司:</text>
<text class="right">{{order.deliveryInfo.courierInput}}</text>
</view>
<view class='wuliu' wx:if="{{order.shippingType==2&&order.deliveryInfo}}">
<text class='left'>快递单号:</text>
<view class="left">{{order.deliveryInfo.expressageIdInput}}</view>
<view class="copeCode" bindtap="copeCode" data-text="{{order.deliveryInfo.expressageIdInput}}">复制</view>
<text class="goInquire" bindtap="gokuaidi" data-nu="{{order.deliveryInfo.expressageIdInput}}">查询物流</text>
</view>

<!-- <view>


+ 31
- 3
pages/order/detail/index.wxss 查看文件

@@ -201,8 +201,36 @@ page {
font-size: 28rpx;
}

.right {
float: right;
.left {
float: left;
font-size: 26rpx;
color: #a6a6a6;
}

.copeCode {
float: left;
margin: 20rpx 10rpx;
padding: 10rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 8rpx;
color: #df3502;
border:1rpx #a6a6a6 solid;
font-size: 28rpx;

}

.goInquire {
float: left;
margin: 20rpx 10rpx;
padding: 10rpx;
height: 30rpx;
line-height: 30rpx;
border:1rpx #a6a6a6 solid;
border-radius: 8rpx;
color: #3cc51f;
font-size: 28rpx;

}

/*
@@ -240,7 +268,7 @@ page {

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

.classif > view text:nth-child(1) {


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

@@ -44,6 +44,9 @@ Page({
current_scroll: e.id
});
},
onShow(){
this.getList('all',1)
},
/**
* 砍价中的状态
* 跳转到砍价详情页面


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

@@ -6,7 +6,7 @@
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab>
</i-tabs>
<view style='padding-top:90rpx;'>
<view wx:for='{{list}}' wx:if="{{list.length!=0}}" class='section' wx:key='{{index}}' >
<view wx:for='{{list}}' wx:if="{{list.length!=0}}" class='section' wx:key='index' >
<view class='detail_top'>
<view>
<!-- <image wx:if="{{item.orderStatus == 6 || item.orderStatus == 7 || item.orderStatus == 8 || item.orderStatus == 9}}" src="{{wmdiscount}}" class="discount" mode="widthFix"></image> -->
@@ -33,7 +33,7 @@
</view>
</view>

<view class='detail_msg' wx:if="{{item.level==0}}">
<view class='detail_msg' wx:if="{{item.type&&(item.type!=11&&item.type!=12)}}">
<view class='logo'>
<image mode="aspectFill" src='{{item.coverImg}}'></image>
</view>
@@ -47,18 +47,37 @@
</view>
</view>
</view>
<!-- 购物车模式 -->
<view class="itemBox" wx:if="{{item.level==1}}" wx:for="{{item.orderCouponVoList}}" wx:for-item="child" wx:key="{{index}}">
<!-- 商品全包购买完成 -->
<view class='detail_msg' wx:if="{{item.type&&(item.type==11||item.type==12)}}">
<view class="itemImg">
<image mode="aspectFill" src='{{item.coverImg}}'></image>
</view>
<view class="itemContent">
<view class="sub"></view>
<view class="face">价格:<text>{{(item.salePrice)/100}}元 x {{item.couponNumber}}</text></view>
<view class="yunfeK" wx:if="{{!(item.type==11&&item.shippingType==2)}}"></view>
<view class="yunfe" wx:if="{{item.type==11&&item.shippingType==2}}">运费:{{item.freightPriceStr}}</view>
<view class="date" >下单时间:<text>{{item.createDate}}</text></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="yunfeK" wx:if="{{!(child.type==11&&child.shippingType==2)}}"></view>
<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 class="yunfe" wx:if="{{child.type==11&&child.shippingType==2}}">运费:{{child.freightPriceStr}}</view>
<view class="date">下单时间:<text>{{child.createDate}}</text></view>
</view>
</view>
<!-- 购物车模式 -->
<!-- 购物车模式 -->
<view class='payment'>
<view>
<text>实付金额:</text><text>{{item.payment/100}}元</text>


+ 18
- 3
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;
}

+ 69
- 4
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)


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

@@ -14,7 +14,7 @@
3 已经退款
-->

<view class="zhuangtai">
<view class="zhuangtai">
<image wx:if="{{couponorderstatus==1}}" src="{{wm01Url}}" mode='widthFix'></image>
<image wx:if="{{couponorderstatus==2}}" src="{{wm02Url}}" mode='widthFix'></image>
<image wx:if="{{couponorderstatus==3}}" src="{{wm03Url}}" mode='widthFix'></image>
@@ -24,6 +24,14 @@
<canvas canvas-id="qrcode" style="width: 1200rpx; height: 800rpx;" />
</view>
<image src="{{tempFilePath}}" mode="aspectFit" />
<view class="closeRq" wx:if="{{showhieRq}}" bindtap="setRq">
<image class="updataRqCode" mode='widthFix' src="{{upDataRqUrlF}}"></image>
<view class="upDataRq">点一点刷新二维码</view>
</view>
<view class="coedTiem" wx:if="{{!showhieRq&&expiredSeconds>1}}">二维码在
<text style="color:red">{{expiredSeconds}}s</text>
后失效
</view>
<view class="barnum buy"><text>兑换码:</text>{{code}}</view>
</view>
</view>


+ 41
- 1
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;
}
}
.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%;
} */

+ 2
- 2
pages/siteUser/siteUser.wxml 查看文件

@@ -1,10 +1,10 @@
<navbar back home text="我的收货地址" background='#FD832D' color="white"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class="siteItem" wx:for="{{list}}" >
<view class="siteItem" wx:for="{{list}}" wx:key="{{index}}">
<view class="siteBox">
<view class="titleBox">
<view class="moTxet" wx:if="{{index==0}}">默认</view>
<view class="moTxet" wx:if="{{item.isDefault==1}}">默认</view>
<view class="{{index==0?'regionT':'region'}}">{{item.consignee}} {{item.mobile}}</view>
</view>


+ 8
- 0
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":""


+ 1
- 0
utils/memberqrcode.js 查看文件

@@ -824,6 +824,7 @@
console.log(res)
},
success: function (res) {
if (cb) {
cb(res.tempFilePath);
};


正在加载...
取消
保存