diff --git a/app.json b/app.json
index 3ecb17f..670bd45 100644
--- a/app.json
+++ b/app.json
@@ -1,6 +1,7 @@
{
"pages": [
"pages/index/index",
+ "pages/complete/index",
"pages/login/index",
"pages/bargain/bargainDatail/bargainDatail",
"pages/bargain/bargain",
diff --git a/config/config.js b/config/config.js
index 6dce31a..4fde48d 100755
--- a/config/config.js
+++ b/config/config.js
@@ -1,11 +1,11 @@
var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {};
var appId = extConfig.appId;
var config = {
- url: "https://ciformall.youlane.cn/C/api",
+ // url: "https://ciformall.youlane.cn/C/api",
// url:"https://c.malls.iformall.com/C/api",
// url:'https://ctest.malls.iformall.com/C/api',
// url: 'http://10.100.33.70:7000/C/api',
- // url:'http://10.100.35.202:7000/C/api',
+ url:'http://10.100.35.202:7000/C/api',
// url: 'http://202.165.179.86:4000/C/api',
api: {
/**
diff --git a/pages/ConsumeDetail/ConsumeDetail.js b/pages/ConsumeDetail/ConsumeDetail.js
index 0cf79bd..d2c8242 100644
--- a/pages/ConsumeDetail/ConsumeDetail.js
+++ b/pages/ConsumeDetail/ConsumeDetail.js
@@ -54,7 +54,8 @@ Page({
height: "",
more: "点击查看更多",
showMore: true,
- supportTransfer:1
+ supportTransfer:1,
+ showIndexReuturn:false
},
phone: function(e) {
let that = this;
@@ -62,6 +63,11 @@ Page({
phoneNumber: e.target.dataset.merchantlinkphone
});
},
+ gotoIndex(){
+ wx.navigateTo({
+ url: '/pages/index/index',
+ })
+ },
goToTranser(){
this.onShareAppMessage();
// wx.navigateTo({
@@ -72,7 +78,7 @@ Page({
let _this = this;
return {
title: '领取卡',
- path: '/pages/index/index?couponChannelId=' + this.data.cardDetail.couponChannelId + '&cuserId=' + this.data.cardDetail.cuserId + '&couponId=' + this.data.cardDetail.couponId + '&coverImg=' + this.data.cardDetail.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.cardDetail.id,
+ path: '/pages/index/index?couponChannelId=' + this.data.cardDetail.couponChannelId + '&cuserId=' + this.data.cardDetail.ownerId + '&couponId=' + this.data.cardDetail.couponId + '&coverImg=' + this.data.cardDetail.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.cardDetail.id,
imageUrl: this.data.cardDetail.coverImg,
success: function (res) {
// 转发成功
@@ -107,6 +113,11 @@ Page({
console.log(options.cardId)
that.cardpayList(options.cardId);
that.cardDetail(options.cardId);
+ if (options.from){
+ this.setData({
+ showIndexReuturn:true
+ })
+ }
},
cardpayList: function(cardId) {
let that = this;
diff --git a/pages/ConsumeDetail/ConsumeDetail.wxml b/pages/ConsumeDetail/ConsumeDetail.wxml
index d17d19c..181ed88 100644
--- a/pages/ConsumeDetail/ConsumeDetail.wxml
+++ b/pages/ConsumeDetail/ConsumeDetail.wxml
@@ -37,4 +37,5 @@
暂无交易明细
+
\ No newline at end of file
diff --git a/pages/complete/index.js b/pages/complete/index.js
new file mode 100644
index 0000000..fb1d5dc
--- /dev/null
+++ b/pages/complete/index.js
@@ -0,0 +1,75 @@
+// pages/complete/index.js
+const imgurl = require("../../utils/imgurl");
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ success01: imgurl.success01.url,
+ couponOrderId:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ couponOrderId: options.couponOrderId
+ })
+ },
+ //跳转
+ closeAlert(){
+ wx.navigateTo({
+ url: '/pages/ConsumeDetail/ConsumeDetail?cardId=' + this.data.couponOrderId+'&from=zhuanzeng',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/complete/index.json b/pages/complete/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/complete/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/complete/index.wxml b/pages/complete/index.wxml
new file mode 100644
index 0000000..409a315
--- /dev/null
+++ b/pages/complete/index.wxml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+ 领取成功
+ 消费卡已放入卡包
+
+
+
+
+
diff --git a/pages/complete/index.wxss b/pages/complete/index.wxss
new file mode 100644
index 0000000..2f6adac
--- /dev/null
+++ b/pages/complete/index.wxss
@@ -0,0 +1,59 @@
+/* pages/complete/index.wxss */
+page {
+ background-color: #f4f4f4;
+}
+.container{
+
+}
+.c-top-top{
+ margin: 60rpx auto 0;
+ width:657rpx;
+ height:11rpx;
+ background:rgba(2,192,255,1);
+ border-radius:6px;
+}
+.c-top-center{
+ display: flex;
+ margin: -4rpx auto 0;
+ width:636rpx;
+ height:328rpx;
+ background:rgba(255,255,255,1);
+ box-shadow:0px 8px 25px 2px rgba(165,165,165,0.1);
+ border-radius:0px 0px 20px 20px;
+}
+.content-left{
+ position: relative;
+ width: 240rpx;
+ align-self: left;
+}
+.content-left image{
+ display: block;
+ position: absolute;
+ top: 129rpx;
+ /* margin-top: -35rpx; */
+ right: 60rpx;
+ width: 70rpx;
+ height: 70rpx;
+ align-self: left;
+}
+.title{
+ margin-top: 108rpx;
+ font-size:40rpx;
+ font-family:PingFang-SC-Bold;
+ font-weight:bold;
+ color:rgba(51,51,51,1);
+ line-height:50rpx;
+}
+.text{
+font-size:28rpx;
+font-family:PingFang-SC-Regular;
+font-weight:400;
+color:rgba(51,51,51,1);
+line-height:50rpx;
+}
+.support-tansfer{
+ width: 636rpx;
+ border-radius: 50rpx;
+ margin-top: 30rpx;
+ background: #02C0FF!important;
+}
\ No newline at end of file
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 7dd713b..fa74734 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -52,7 +52,8 @@ Page({
showCardOffer:false,
isSamePeople:true,
statusText:'',
- isReceived:false
+ isReceived:false,
+ receivedDisabled:false
},
phone: function (e) {
let that = this;
@@ -103,10 +104,14 @@ Page({
},
receiveCard(){
+ let that=this;
let param = {
id: this.data.cardData.couponOrderId,
cUserId: this.data.cardData.cuserId
}
+ this.setData({
+ receivedDisabled:true
+ })
Http.post({
url: config.api.cardAccept,
data: param
@@ -119,7 +124,21 @@ Page({
duration: 2000,
mask: false
});
+ wx.navigateTo({
+ url: '/pages/complete/index?couponOrderId=' + this.data.cardData.couponOrderId,
+ })
})
+ .catch(err => {
+ wx.showToast({
+ title: err.message,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ that.setData({
+ receivedDisabled: false
+ })
+ })
},
closeAlert(){
this.setData({
@@ -449,12 +468,12 @@ Page({
*
*/
wx.redirectTo({
- url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl,
+ url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId,
});
} else if (err.code == 11006) {
// 用户手机已加密
wx.redirectTo({
- url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl,
+ url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&couponId=" + that.data.cardData.couponId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId,
});
} else {
wx.showToast({
diff --git a/pages/coupon/detail/index.json b/pages/coupon/detail/index.json
index 96c4fcf..fa43619 100644
--- a/pages/coupon/detail/index.json
+++ b/pages/coupon/detail/index.json
@@ -1,3 +1,4 @@
{
- "navigationBarTitleText": "券详情"
+ "navigationBarTitleText": "券详情",
+ "backgroundColor":"#f4f4f4"
}
\ No newline at end of file
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 9252447..29fb524 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -141,7 +141,7 @@
{{statusText}}
-
+
\ No newline at end of file
diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss
index d76fc03..b7d0c33 100644
--- a/pages/coupon/detail/index.wxss
+++ b/pages/coupon/detail/index.wxss
@@ -572,16 +572,17 @@ button::after{ border: none; }
.close{
position: absolute;
z-index: 300;
- right: 26rpx;
- top: 26rpx;
- width: 26rpx;
- height: 26rpx;
+ right: 0;
+ top: 0;
+ width: 100rpx;
+ height: 100rpx;
overflow: hidden;
}
.close image{
display: block;
width: 26rpx;
height: 26rpx;
+ margin: 20rpx 0 0 52rpx;
}
.a-title{
text-align: center;
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index e92a531..3b223a6 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -70,7 +70,7 @@ Page({
})
} else if (that.path == 'index' && that.data.paramData.cuserId){
wx.reLaunch({
- url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId='+that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' +that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' +that.data.paramData.userName
+ url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId
})
} else {
wx.showToast({
diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js
index d7eb2ef..e347bce 100755
--- a/pages/getuserinfo/index.js
+++ b/pages/getuserinfo/index.js
@@ -8,7 +8,8 @@ Page({
couponChannelId: null,
couponId:null,
cuserId:null,
- coverImg:null
+ coverImg:null,
+ couponOrderId:null
},
onLoad: function(options) {
var that = this;
@@ -23,7 +24,7 @@ Page({
* 来自转赠
*/
if (options.couponChannelId && options.cuserId){
- console.log(1231231231)
+ console.log(1231231231,options)
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId,
@@ -89,7 +90,7 @@ Page({
* 来自转赠
*/
wx.reLaunch({
- url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}couponOrderId=${that.data.couponOrderId}`
+ url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}`
});
} else if (that.data.orderId) {
wx.navigateTo({
diff --git a/pages/phoneinput/phoneinput.js b/pages/phoneinput/phoneinput.js
index 52e1704..5905f4d 100644
--- a/pages/phoneinput/phoneinput.js
+++ b/pages/phoneinput/phoneinput.js
@@ -55,7 +55,7 @@ Page({
*/
if (this.data.paramData.cuserId){
wx.reLaunch({
- url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + + that.data.paramData.couponChannelId + '&couponId=' + + that.data.paramData.couponId + '&coverImg=' + + that.data.paramData.coverImg + '&avatarUrl=' + + that.data.paramData.avatarUrl + '&userName=' + + that.data.paramData.userName
+ url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&couponId=' + that.data.paramData.couponId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId
})
}else{
wx.redirectTo({
diff --git a/utils/imgurl.js b/utils/imgurl.js
index c340791..bdebe91 100644
--- a/utils/imgurl.js
+++ b/utils/imgurl.js
@@ -352,4 +352,8 @@ module.exports = {
'url': baseUrl + 'close02.png',
'name': '关闭图标'
},
+ 'success01': {
+ 'url': baseUrl + 'success01.png',
+ 'name': '卡领取成功图标'
+ },
}
\ No newline at end of file