ソースを参照

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

tags/2.2.4
meo 6年前
コミット
81c1ae26fb
23個のファイルの変更108行の追加173行の削除
  1. バイナリ
      assets/img/fail.png
  2. バイナリ
      assets/img/guoqi.jpg
  3. バイナリ
      assets/img/guoqi.png
  4. バイナリ
      assets/img/shiyong.jpg
  5. バイナリ
      assets/img/tui.jpg
  6. バイナリ
      assets/img/wm01.jpg
  7. バイナリ
      assets/img/wm02.jpg
  8. バイナリ
      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

バイナリ
assets/img/fail.png ファイルの表示

変更前 変更後
幅: 200  |  高さ: 200  |  サイズ: 6.7 KiB 幅: 200  |  高さ: 200  |  サイズ: 8.3 KiB

バイナリ
assets/img/guoqi.jpg ファイルの表示

変更前 変更後
幅: 510  |  高さ: 581  |  サイズ: 28 KiB

バイナリ
assets/img/guoqi.png ファイルの表示

変更前 変更後
幅: 200  |  高さ: 200  |  サイズ: 34 KiB

バイナリ
assets/img/shiyong.jpg ファイルの表示

変更前 変更後
幅: 510  |  高さ: 581  |  サイズ: 30 KiB

バイナリ
assets/img/tui.jpg ファイルの表示

変更前 変更後
幅: 510  |  高さ: 581  |  サイズ: 27 KiB

バイナリ
assets/img/wm01.jpg ファイルの表示

変更前 変更後
幅: 200  |  高さ: 200  |  サイズ: 20 KiB 幅: 510  |  高さ: 581  |  サイズ: 32 KiB

バイナリ
assets/img/wm02.jpg ファイルの表示

変更前 変更後
幅: 200  |  高さ: 200  |  サイズ: 21 KiB 幅: 510  |  高さ: 581  |  サイズ: 32 KiB

バイナリ
assets/img/wm03.jpg ファイルの表示

変更前 変更後
幅: 200  |  高さ: 200  |  サイズ: 23 KiB 幅: 510  |  高さ: 581  |  サイズ: 34 KiB

+ 11
- 13
components/banner/index.js ファイルの表示

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


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



/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
ready(){
},
ready() {},
methods: { methods: {
swiperChange: function (e) {
swiperChange: function(e) {
this.setData({ this.setData({
swiperCurrent: e.detail.current swiperCurrent: e.detail.current
})
});
}, },
gotobannerdetail:function(e){
console.log("我要点击进入banner详情页面")
gotobannerdetail: function(e) {
console.log("我要点击进入banner详情页面");
console.log(e.currentTarget.dataset.id); console.log(e.currentTarget.dataset.id);
wx.navigateTo({ 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 ファイルの表示

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

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


+ 1
- 1
pages/bannerdetail/index.wxml ファイルの表示

@@ -37,7 +37,7 @@
</view> --> </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">
<view class="coupons1-img"> <view class="coupons1-img">


+ 15
- 48
pages/coupon/detail/index.js ファイルの表示

@@ -24,9 +24,9 @@ Page({
onLoad(options) { onLoad(options) {
let that = this; let that = this;
console.log(options); 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传过来的值 * 首页banner detail couponlist传过来的值
* iambannercoupon * iambannercoupon
@@ -43,32 +43,17 @@ Page({
// // this.orderFunc(); // // this.orderFunc();
// } // }
// else { // 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 => { Http.get(parmer).then(res => {
console.log(res); console.log(res);
console.log("details"); console.log("details");
@@ -234,14 +219,11 @@ Page({
if (res.errMsg == "requestPayment:ok") { if (res.errMsg == "requestPayment:ok") {
wx.showToast({ wx.showToast({
title: "购买成功", title: "购买成功",
duration: 2500
duration: 2500,
}); });
/** /**
* 用户支付成功以后跳转到券包列表 * 用户支付成功以后跳转到券包列表
*/ */
wx.redirectTo({
url: '/pages/couponorder/index/index',
})
} }
}, },


@@ -256,21 +238,6 @@ Page({
// var url = res.data.url; // var url = res.data.url;
// console.log("get url", url); // console.log("get url", url);
if (res.errMsg == "requestPayment:ok") { 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 { } else {
wx.showToast({ wx.showToast({
title: "支付失败", title: "支付失败",


+ 2
- 2
pages/couponorder/detail/index.js ファイルの表示

@@ -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() { phone: function() {
let that = this; let that = this;


+ 20
- 1
pages/couponorder/detail/index.wxml ファイルの表示

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





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


+ 33
- 38
pages/couponorder/detail/index.wxss ファイルの表示

@@ -2,17 +2,16 @@
padding-bottom: 10rpx; 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; border-radius: 10rpx;
background-color: #fff; background-color: #fff;
margin: 30rpx auto 0;
margin: 22rpx auto 0;
padding: 30rpx 0;
position: relative;
z-index: 10000000000;
} }
.pane2{ .pane2{
background: #fff; background: #fff;
@@ -24,58 +23,55 @@
margin: 40rpx auto 0; 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 { .barcode {
display: flex;
height: 100rpx; height: 100rpx;
flex-direction: column;
justify-content: center;
align-items: center;
width: 510rpx;
margin: 0 auto;
} }


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


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


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


.qrcode { .qrcode {
height: 370rpx;
position: relative;
height: 350rpx;
width: 350rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
align-items: center; 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 { .qrcode > canvas {
position: relative;
width: 400rpx;
height: 400rpx;
width: 350rpx;
height: 350rpx;
} }

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


+ 2
- 2
pages/index/coupons/index.js ファイルの表示

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


+ 1
- 1
pages/index/coupons/index.wxss ファイルの表示

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

+ 0
- 2
pages/index/index.js ファイルの表示

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


+ 0
- 21
pages/order/detail/index.js ファイルの表示

@@ -106,9 +106,6 @@ Page({
duration: 2500 duration: 2500
}); });
} }
wx.navigateBack({
delta: 2
});
}, },
fail: res => { fail: res => {
that.payOrderUpdate(that.data.orderId, payOrderId, 2); // 支付失败 that.payOrderUpdate(that.data.orderId, payOrderId, 2); // 支付失败
@@ -117,25 +114,7 @@ Page({
}, },
complete: res => { complete: res => {
console.log(res); console.log(res);
console.log("支付完成");
// var url = res.data.url;
// console.log("get url", url);
if (res.errMsg == "requestPayment:ok") { 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 { } else {
wx.showToast({ wx.showToast({
title: "支付失败", title: "支付失败",


+ 1
- 1
pages/order/detail/index.wxml ファイルの表示

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


+ 3
- 13
pages/order/index/index.js ファイルの表示

@@ -35,17 +35,7 @@ Page({
gotopay:function(e){ gotopay:function(e){
console.log("orderId"+e.currentTarget.dataset.id); console.log("orderId"+e.currentTarget.dataset.id);
wx.navigateTo({ 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) { getList(key, pageNum) {
let that = this; let that = this;
@@ -59,13 +49,13 @@ Page({
if (key == 'all') { if (key == 'all') {
var variable = { var variable = {
pageNum: pageNum, pageNum: pageNum,
pageSize: 5,
pageSize: 15,
paymentType:0 paymentType:0
}; };
} else { } else {
var variable = { var variable = {
pageNum: pageNum, pageNum: pageNum,
pageSize: 5,
pageSize: 15,
orderStatus: key, orderStatus: key,
paymentType:0 paymentType:0
}; };


+ 14
- 10
pages/youhuiquanma/index.wxml ファイルの表示

@@ -9,18 +9,22 @@
2 已过期 2 已过期
3 已经退款 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>
<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>

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


+ 4
- 15
pages/youhuiquanma/index.wxss ファイルの表示

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

.pane2 { .pane2 {
background: #fff; background: #fff;
opacity: 0.6; opacity: 0.6;
@@ -84,18 +86,6 @@ page {
justify-content: flex-end; justify-content: flex-end;
align-items: center; 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 { .qrcode > canvas {
width: 350rpx; width: 350rpx;
@@ -125,7 +115,6 @@ page {
line-height: 88rpx; line-height: 88rpx;
border-radius: 16rpx; border-radius: 16rpx;
border: 1px solid #eee; border: 1px solid #eee;
margin-top:40rpx;
} }
.gou{ .gou{
width: 87%; width: 87%;


読み込み中…
キャンセル
保存