Bläddra i källkod

[banner详情页面l 优惠券,支付图标修改,订单详情页戳修改][修改]:banner详情页面l 优惠券,支付图标修改,订单详情页戳修改

tags/2.2.4
meo 6 år sedan
förälder
incheckning
81c1ae26fb
23 ändrade filer med 108 tillägg och 173 borttagningar
  1. Binär
      assets/img/fail.png
  2. Binär
      assets/img/guoqi.jpg
  3. Binär
      assets/img/guoqi.png
  4. Binär
      assets/img/shiyong.jpg
  5. Binär
      assets/img/tui.jpg
  6. Binär
      assets/img/wm01.jpg
  7. Binär
      assets/img/wm02.jpg
  8. Binär
      assets/img/wm03.jpg
  9. +11
    -13
      components/banner/index.js
  10. +1
    -5
      config/config.js
  11. +1
    -1
      pages/bannerdetail/index.wxml
  12. +15
    -48
      pages/coupon/detail/index.js
  13. +2
    -2
      pages/couponorder/detail/index.js
  14. +20
    -1
      pages/couponorder/detail/index.wxml
  15. +33
    -38
      pages/couponorder/detail/index.wxss
  16. +2
    -2
      pages/index/coupons/index.js
  17. +1
    -1
      pages/index/coupons/index.wxss
  18. +0
    -2
      pages/index/index.js
  19. +0
    -21
      pages/order/detail/index.js
  20. +1
    -1
      pages/order/detail/index.wxml
  21. +3
    -13
      pages/order/index/index.js
  22. +14
    -10
      pages/youhuiquanma/index.wxml
  23. +4
    -15
      pages/youhuiquanma/index.wxss

Binär
assets/img/fail.png Visa fil

Före Efter
Bredd: 200  |  Höjd: 200  |  Storlek: 6.7 KiB Bredd: 200  |  Höjd: 200  |  Storlek: 8.3 KiB

Binär
assets/img/guoqi.jpg Visa fil

Före Efter
Bredd: 510  |  Höjd: 581  |  Storlek: 28 KiB

Binär
assets/img/guoqi.png Visa fil

Före Efter
Bredd: 200  |  Höjd: 200  |  Storlek: 34 KiB

Binär
assets/img/shiyong.jpg Visa fil

Före Efter
Bredd: 510  |  Höjd: 581  |  Storlek: 30 KiB

Binär
assets/img/tui.jpg Visa fil

Före Efter
Bredd: 510  |  Höjd: 581  |  Storlek: 27 KiB

Binär
assets/img/wm01.jpg Visa fil

Före Efter
Bredd: 200  |  Höjd: 200  |  Storlek: 20 KiB Bredd: 510  |  Höjd: 581  |  Storlek: 32 KiB

Binär
assets/img/wm02.jpg Visa fil

Före Efter
Bredd: 200  |  Höjd: 200  |  Storlek: 21 KiB Bredd: 510  |  Höjd: 581  |  Storlek: 32 KiB

Binär
assets/img/wm03.jpg Visa fil

Före Efter
Bredd: 200  |  Höjd: 200  |  Storlek: 23 KiB Bredd: 510  |  Höjd: 581  |  Storlek: 34 KiB

+ 11
- 13
components/banner/index.js Visa fil

@@ -6,35 +6,33 @@ Component({
properties: {
list: {
value: [],
type: Array,
},
type: Array
}
},

/**
* 组件的初始数据
*/
data: {
swiperCurrent: 0,
swiperCurrent: 0
},


/**
* 组件的方法列表
*/
ready(){
},
ready() {},
methods: {
swiperChange: function (e) {
swiperChange: function(e) {
this.setData({
swiperCurrent: e.detail.current
})
});
},
gotobannerdetail:function(e){
console.log("我要点击进入banner详情页面")
gotobannerdetail: function(e) {
console.log("我要点击进入banner详情页面");
console.log(e.currentTarget.dataset.id);
wx.navigateTo({
url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`,
})
url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`
});
}
}
})
});

+ 1
- 5
config/config.js Visa fil

@@ -31,11 +31,7 @@ var config = {
* 优惠券详情
*/
couponDetail: "/wxCoupon/detail",

/**
* bannerlist优惠券的详情页面
*/
bannercoupondetai:"/wxCoupon/detailC",
/**
* 业态查询
*/


+ 1
- 1
pages/bannerdetail/index.wxml Visa fil

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

<!-- 优惠券 -->
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId=iambannercoupon&couponId={{item.id}}">
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}">
<!-- 首页优惠券列表页面 -->
<view class="coupons1">
<view class="coupons1-img">


+ 15
- 48
pages/coupon/detail/index.js Visa fil

@@ -24,9 +24,9 @@ Page({
onLoad(options) {
let that = this;
console.log(options);
console.log(options.couponChannelId);
console.log(options.couponId);
console.log("传的变量的名字叫Id");
console.log("couponChannelId" + options.couponChannelId);
console.log("couponId" + options.couponId);
console.log("传的变量的名字叫couponId");
/**
* 首页banner detail couponlist传过来的值
* iambannercoupon
@@ -43,32 +43,17 @@ Page({
// // this.orderFunc();
// }
// else {
if (options.couponChannelId == "iambannercoupon") {
that.setData({
couponId: options.couponId
});
/**
* 待解决
*/
var parmer = {
url: config.api.bannercoupondetai,
data: {
couponId: options.couponId
}
};
} else {
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
});
var parmer = {
url: config.api.couponDetail,
data: {
couponChannelId: options.couponChannelId
}
};
}

// }
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
});
var parmer = {
url: config.api.couponDetail,
data: {
couponChannelId: options.couponChannelId
}
};
Http.get(parmer).then(res => {
console.log(res);
console.log("details");
@@ -234,14 +219,11 @@ Page({
if (res.errMsg == "requestPayment:ok") {
wx.showToast({
title: "购买成功",
duration: 2500
duration: 2500,
});
/**
* 用户支付成功以后跳转到券包列表
*/
wx.redirectTo({
url: '/pages/couponorder/index/index',
})
}
},

@@ -256,21 +238,6 @@ Page({
// var url = res.data.url;
// console.log("get url", url);
if (res.errMsg == "requestPayment:ok") {
wx.showModal({
title: "提示",
content: "支付成功"
});
// if (url) {
// setTimeout(function () {
// wx.redirectTo({
// url: "/pages" + url
// });
// }, 2000);
// } else {
// setTimeout(() => {
// wx.navigateBack();
// }, 2000);
// }
} else {
wx.showToast({
title: "支付失败",


+ 2
- 2
pages/couponorder/detail/index.js Visa fil

@@ -40,8 +40,8 @@ Page({
});
});
}
util.barcode("barcode", options.quancode, 680, 100);
util.qrcode("qrcode", options.quancode, 400, 400);
util.barcode("barcode", options.quancode, 510, 100);
util.qrcode("qrcode", options.quancode,350, 350);
},
phone: function() {
let that = this;


+ 20
- 1
pages/couponorder/detail/index.wxml Visa fil

@@ -16,7 +16,7 @@
<text>有效期至:</text>
<text>{{expiredTime}}</text>
</view>
<view class="panel">
<!-- <view class="panel">
<view class="barcode">
<canvas canvas-id="barcode" />
</view>
@@ -27,8 +27,27 @@
<canvas canvas-id="qrcode" />
</view>
<view class="barnum"><text>兑换码:</text>{{code}}</view>
</view> -->


<view class="zhuangtai">
<image wx:if="{{data.couponOrderStatus==1}}" src="./../../../assets/img/wm01.jpg"></image>
<image wx:if="{{data.couponOrderStatus==2}}" src="./../../../assets/img/wm02.jpg"></image>
<image wx:if="{{data.couponOrderStatus==3}}" src="./../../../assets/img/wm03.jpg"></image>
<view class="panel" wx:if="{{data.couponOrderStatus==0}}">
<view class="barcode">
<canvas canvas-id="barcode" />
</view>
<view class="qrcode">
<canvas canvas-id="qrcode" />
</view>
<view class="barnum buy"><text>兑换码:</text>{{code}}</view>
</view>
</view>




<view class="posi">
<view class="tit">
适用门店


+ 33
- 38
pages/couponorder/detail/index.wxss Visa fil

@@ -2,17 +2,16 @@
padding-bottom: 10rpx;
}

.panel {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: stretch;
box-sizing: border-box;
width: 710rpx;
margin-top: 40rpx;
.panel,.zhuangtai image{
width: 510rpx;
height: 581rpx;
display: block;
border-radius: 10rpx;
background-color: #fff;
margin: 30rpx auto 0;
margin: 22rpx auto 0;
padding: 30rpx 0;
position: relative;
z-index: 10000000000;
}
.pane2{
background: #fff;
@@ -24,58 +23,55 @@
margin: 40rpx auto 0;
}

.buy {
background: #fff;
height: 88rpx;
width: 98%;
margin: 30rpx auto 0;
color: #7e7e7e;
line-height: 88rpx;
border-radius: 16rpx;
border: 1px solid #eee;
}

.barcode {
display: flex;
height: 100rpx;
flex-direction: column;
justify-content: center;
align-items: center;
width: 510rpx;
margin: 0 auto;
}

.barnum {
width: 670rpx;
height: 46rpx;
line-height: 46rpx;
font-size: 30rpx;
font-size: 24rpx;
text-align: center;
letter-spacing: 2rpx;
white-space: nowrap;
color: #999;
color: #7f7f7f;
}

.barnum text {
color: #333;
color: #767676;
}

.barcode > canvas {
width: 680rpx;
width: 510rpx;
height: 100rpx;
}

.qrcode {
height: 370rpx;
position: relative;
height: 350rpx;
width: 350rpx;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
margin: 0 auto;
}
.qrcode image{
position: absolute;
width: 160rpx;
height: 160rpx;
right:0;
bottom: 0;
top: 0;
left: 0;
margin: auto;
z-index: 1000000000;
border-radius:50%;
}

.qrcode > canvas {
position: relative;
width: 400rpx;
height: 400rpx;
width: 350rpx;
height: 350rpx;
}

.coupon_detail {
padding: 0 20rpx;
}
@@ -152,7 +148,6 @@
width: 100%;
display: flex;
flex-direction: column;
margin-top: 50rpx;
background: #fff;
border-bottom: 20rpx solid #f5f5f5;
border-top: 20rpx solid #f5f5f5;


+ 2
- 2
pages/index/coupons/index.js Visa fil

@@ -75,13 +75,13 @@ Component({
if (key == 0) {
var param = {
pageNum: pageNum,
pageSize: 8,
pageSize: 16,
targetAd: 1
};
} else {
var param = {
pageNum: pageNum,
pageSize: 8,
pageSize: 16,
business: key,
targetAd: 1
};


+ 1
- 1
pages/index/coupons/index.wxss Visa fil

@@ -1,3 +1,3 @@
.index-coupons{
height:2036rpx;
height:820rpx;
}

+ 0
- 2
pages/index/index.js Visa fil

@@ -22,8 +22,6 @@ Page({
var scene = decodeURIComponent(options.scene);
if (app.globalData.token && app.globalData.token != null) {
} else {
// 由于是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
wx.login({
success: ({ code }) => {
console.log(code);


+ 0
- 21
pages/order/detail/index.js Visa fil

@@ -106,9 +106,6 @@ Page({
duration: 2500
});
}
wx.navigateBack({
delta: 2
});
},
fail: res => {
that.payOrderUpdate(that.data.orderId, payOrderId, 2); // 支付失败
@@ -117,25 +114,7 @@ Page({
},
complete: res => {
console.log(res);
console.log("支付完成");
// var url = res.data.url;
// console.log("get url", url);
if (res.errMsg == "requestPayment:ok") {
wx.showModal({
title: "提示",
content: "支付成功"
});
// if (url) {
// setTimeout(function () {
// wx.redirectTo({
// url: "/pages" + url
// });
// }, 2000);
// } else {
// setTimeout(() => {
// wx.navigateBack();
// }, 2000);
// }
} else {
wx.showToast({
title: "支付失败",


+ 1
- 1
pages/order/detail/index.wxml Visa fil

@@ -38,7 +38,7 @@
-->
<!--
orderStatus
0
1
只有支付完成的时
才显示兑换码
-->


+ 3
- 13
pages/order/index/index.js Visa fil

@@ -35,17 +35,7 @@ Page({
gotopay:function(e){
console.log("orderId"+e.currentTarget.dataset.id);
wx.navigateTo({
url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'`,
success: function(res){
// success
},
fail: function() {
// fail
},
complete: function() {
// complete
}
})
url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'`})
},
getList(key, pageNum) {
let that = this;
@@ -59,13 +49,13 @@ Page({
if (key == 'all') {
var variable = {
pageNum: pageNum,
pageSize: 5,
pageSize: 15,
paymentType:0
};
} else {
var variable = {
pageNum: pageNum,
pageSize: 5,
pageSize: 15,
orderStatus: key,
paymentType:0
};


+ 14
- 10
pages/youhuiquanma/index.wxml Visa fil

@@ -9,18 +9,22 @@
2 已过期
3 已经退款
-->
<view class="panel">
<view class="barcode">
<canvas canvas-id="barcode" />

<view class="zhuangtai">
<image wx:if="{{couponorderstatus==1}}" src="./../../assets/img/wm01.jpg"></image>
<image wx:if="{{couponorderstatus==2}}" src="./../../assets/img/wm02.jpg"></image>
<image wx:if="{{couponorderstatus==3}}" src="./../../assets/img/wm03.jpg"></image>
<view class="panel" wx:if="{{couponorderstatus==0}}">
<view class="barcode">
<canvas canvas-id="barcode" />
</view>
<view class="qrcode">
<canvas canvas-id="qrcode" />
</view>
<view class="barnum buy"><text>兑换码:</text>{{code}}</view>
</view>
<view class="qrcode">
<canvas canvas-id="qrcode" />
<image wx:if="{{couponorderstatus==1}}" src="./../../assets/img/wm01.jpg"></image>
<image wx:if="{{couponorderstatus==2}}" src="./../../assets/img/wm02.jpg"></image>
<image wx:if="{{couponorderstatus==3}}" src="./../../assets/img/wm03.jpg"></image>
</view>
<view class="barnum buy"><text>兑换码:</text>{{code}}</view>
</view>

<view class="gou">
<view class="mai">购买须知:</view>
<view class="remark">{{remark}}</view>


+ 4
- 15
pages/youhuiquanma/index.wxss Visa fil

@@ -32,8 +32,9 @@ page {
margin-top: 16rpx;
text-align: center;
}
.panel {
width: 600rpx;
.panel,.zhuangtai image{
width: 510rpx;
height: 581rpx;
border-radius: 10rpx;
background-color: #fff;
margin: 22rpx auto 0;
@@ -41,6 +42,7 @@ page {
position: relative;
z-index: 10000000000;
}

.pane2 {
background: #fff;
opacity: 0.6;
@@ -84,18 +86,6 @@ page {
justify-content: flex-end;
align-items: center;
}
.qrcode image{
position: absolute;
width: 160rpx;
height: 160rpx;
right:0;
bottom: 0;
top: 0;
left: 0;
margin: auto;
z-index: 1000000000;
border-radius:50%;
}

.qrcode > canvas {
width: 350rpx;
@@ -125,7 +115,6 @@ page {
line-height: 88rpx;
border-radius: 16rpx;
border: 1px solid #eee;
margin-top:40rpx;
}
.gou{
width: 87%;


Laddar…
Avbryt
Spara