Parcourir la source

[将login改成main,将首页coupon去掉,授权手机号和授权个人信息传的参数couponId去掉]

tags/富茂链客4.1.0
meo il y a 6 ans
Parent
révision
5b92cf77b5
33 fichiers modifiés avec 78 ajouts et 193 suppressions
  1. +3
    -3
      app.json
  2. +5
    -36
      ext.json
  3. +1
    -1
      pages/bargain/bargainDatail/bargainDatail.js
  4. +1
    -1
      pages/cardorder/index/index.wxml
  5. +2
    -1
      pages/complete/index.json
  6. +10
    -89
      pages/coupon/detail/index.js
  7. +1
    -1
      pages/couponorder/index/index.wxml
  8. +1
    -1
      pages/discountCardList/discountCardList.wxml
  9. +5
    -11
      pages/getphoneInfo/index.js
  10. +6
    -9
      pages/getuserinfo/index.js
  11. +31
    -24
      pages/index/index.js
  12. +0
    -0
      pages/main/coupons/index.js
  13. +0
    -0
      pages/main/coupons/index.json
  14. +0
    -0
      pages/main/coupons/index.wxml
  15. +0
    -0
      pages/main/coupons/index.wxss
  16. +0
    -0
      pages/main/gameentry/gentry.js
  17. +0
    -0
      pages/main/gameentry/gentry.json
  18. +0
    -0
      pages/main/gameentry/gentry.wxml
  19. +0
    -0
      pages/main/gameentry/gentry.wxss
  20. +5
    -5
      pages/main/index.js
  21. +0
    -0
      pages/main/index.json
  22. +0
    -0
      pages/main/index.wxml
  23. +0
    -0
      pages/main/index.wxss
  24. +0
    -0
      pages/main/rushToBuy/index.js
  25. +0
    -0
      pages/main/rushToBuy/index.json
  26. +0
    -0
      pages/main/rushToBuy/index.wxml
  27. +0
    -0
      pages/main/rushToBuy/index.wxss
  28. +1
    -1
      pages/passCar/choicecoupon/choicecoupon.wxml
  29. +1
    -5
      pages/passCar/couponDetail/couponDetail.js
  30. +1
    -1
      pages/passCar/couponList/couponList.wxml
  31. +1
    -1
      pages/user/index.js
  32. +2
    -2
      pages/user/index.wxml
  33. +1
    -1
      project.config.json

+ 3
- 3
app.json Voir le fichier

@@ -2,7 +2,7 @@
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/complete/index", "pages/complete/index",
"pages/login/index",
"pages/main/index",
"pages/bargain/bargainDatail/bargainDatail", "pages/bargain/bargainDatail/bargainDatail",
"pages/bargain/bargain", "pages/bargain/bargain",
"pages/cardorder/index/index", "pages/cardorder/index/index",
@@ -37,7 +37,7 @@
"pages/payrule/payrule", "pages/payrule/payrule",
"pages/grade/grade", "pages/grade/grade",
"pages/game/index", "pages/game/index",
"pages/login/gameentry/gentry",
"pages/main/gameentry/gentry",
"pages/index/gameentry/gentry", "pages/index/gameentry/gentry",
"pages/specialcourtesy/specialcourtesy", "pages/specialcourtesy/specialcourtesy",
"pages/discountCardList/discountCardList", "pages/discountCardList/discountCardList",
@@ -63,7 +63,7 @@
"selectedColor": "#00C0FF", "selectedColor": "#00C0FF",
"list": [ "list": [
{ {
"pagePath": "pages/login/index",
"pagePath": "pages/main/index",
"iconPath": "assets/images/home-n.png", "iconPath": "assets/images/home-n.png",
"selectedIconPath": "assets/images/home-y.png", "selectedIconPath": "assets/images/home-y.png",
"text": "首页" "text": "首页"


+ 5
- 36
ext.json Voir le fichier

@@ -5,42 +5,11 @@
"weappId": "wxea71200db93d756b", "weappId": "wxea71200db93d756b",
"name": "富茂客官开发", "name": "富茂客官开发",
"attr": { "attr": {
"appFlag":"0",
"ifHaveCarModular":"1", "ifHaveCarModular":"1",
"configUrl":[
{
"url01":"https://ciformall.youlane.cn/C/api"
},
{
"url02": "https://ctest.malls.iformall.com/C/api"
},
{
"url03": "https://c.malls.iformall.com/C/api"
}
],
"passCarAppId": [
{"releaseAppId":"wxc07f9d67923d676d"},
{"developAppId":"wx192b7d2e8dcbefd0"}
],
"passCarPath": [
{
"haveCarModular": "pages/passCar/passCar"
},
{
"nothaveCarModular": "pages/cartest/cartest"
}
],
"passCarreturnUrl":[
{
"returnUrl1": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback"
},
{
"returnUrl2": "https://c.malls.iformall.com/api/carCallback/etcpPaidCallback"
},
{
"returnUrl3": "https://ctest.malls.iformall.com/api/carCallback/etcpPaidCallback"
}
]
"configUrl":"https://ciformall.youlane.cn/C/api",
"passCarAppId":"wx192b7d2e8dcbefd0",
"passCarPath":"pages/passCar/passCar",
"passCarreturnUrl":"https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback"
} }
}, },
"directCommit": false, "directCommit": false,
@@ -49,7 +18,7 @@
"selectedColor": "#00C0FF", "selectedColor": "#00C0FF",
"list": [ "list": [
{ {
"pagePath": "pages/login/index",
"pagePath": "pages/main/index",
"iconPath": "assets/images/home-n.png", "iconPath": "assets/images/home-n.png",
"selectedIconPath": "assets/images/home-y.png", "selectedIconPath": "assets/images/home-y.png",
"text": "首页" "text": "首页"


+ 1
- 1
pages/bargain/bargainDatail/bargainDatail.js Voir le fichier

@@ -53,7 +53,7 @@ Page({
}, },
goback:function(){ goback:function(){
wx.switchTab({ wx.switchTab({
url: '/pages/login/index',
url: '/pages/main/index',
}) })
}, },
/** /**


+ 1
- 1
pages/cardorder/index/index.wxml Voir le fichier

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" /> <image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</text> <text class="txt001">请您敬请期待</text>
<text class='txt002'>我们正在筹备一大波优惠活动</text> <text class='txt002'>我们正在筹备一大波优惠活动</text>
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover">
<navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover">
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>


+ 2
- 1
pages/complete/index.json Voir le fichier

@@ -1,3 +1,4 @@
{ {
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "领取成功"
} }

+ 10
- 89
pages/coupon/detail/index.js Voir le fichier

@@ -21,7 +21,6 @@ Page({
questions2: null, questions2: null,
carList: [], carList: [],
couponChannelId: null, couponChannelId: null,
couponId: null,
orderId: "", orderId: "",
hour: null, hour: null,
minute: "", minute: "",
@@ -83,7 +82,6 @@ Page({
//获取卡转赠状态 //获取卡转赠状态
getQueryCardStatus(){ getQueryCardStatus(){
let that = this; let that = this;
// console.log(util.formatTime(Number(that.data.cardData.updateDate), "yyyy-MM-dd hh:mm:ss"),44444444444)
let param={ let param={
id: this.data.cardData.couponOrderId, id: this.data.cardData.couponOrderId,
cUserId: this.data.cardData.cuserId, cUserId: this.data.cardData.cuserId,
@@ -119,7 +117,6 @@ Page({
data: param data: param
}) })
.then(res => { .then(res => {
console.log(res, 333333333333)
wx.showToast({ wx.showToast({
title: '领取成功!', title: '领取成功!',
icon: 'none', icon: 'none',
@@ -149,7 +146,7 @@ Page({
}, },
goback: function () { goback: function () {
wx.switchTab({ wx.switchTab({
url: '/pages/login/index',
url: '/pages/main/index',
}) })
}, },
/** /**
@@ -328,12 +325,10 @@ Page({
showCardOffer:true, showCardOffer:true,
cardData:options cardData:options
}) })
console.log(options,22222222222)
this.getUserInfo() this.getUserInfo()
} }
that.setData({ that.setData({
couponChannelId: options.couponChannelId, couponChannelId: options.couponChannelId,
couponId: options.couponId,
title: that.data.data.title ? that.data.data.title : '', title: that.data.data.title ? that.data.data.title : '',
}); });
if (options.cardType) { if (options.cardType) {
@@ -349,6 +344,9 @@ Page({
}; };
Http.get(parmer) Http.get(parmer)
.then(res => { .then(res => {
that.setData({
couponId: res.data.couponId
})
if (res.code == 200) { if (res.code == 200) {
that.setData({ that.setData({
showPage: true showPage: true
@@ -470,12 +468,12 @@ Page({
* *
*/ */
wx.redirectTo({ 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 + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate,
url: "/pages/getphoneInfo/index?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate,
}); });
} else if (err.code == 11006) { } else if (err.code == 11006) {
// 用户手机已加密 // 用户手机已加密
wx.redirectTo({ 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 + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate,
url: "/pages/phoneinput/phoneinput?path=index&cuserId=" + that.data.cardData.cuserId + "&couponChannelId=" + that.data.cardData.couponChannelId + "&userName=" + that.data.cardData.userName + "&coverImg=" + that.data.cardData.coverImg + "&avatarUrl=" + that.data.cardData.avatarUrl + "&couponOrderId=" + that.data.cardData.couponOrderId + "&updateDate=" + that.data.cardData.updateDate,
}); });
} else { } else {
wx.showToast({ wx.showToast({
@@ -597,17 +595,13 @@ Page({
*/ */
wx.redirectTo({ wx.redirectTo({
url: "/pages/getphoneInfo/index?couponChannelId=" + url: "/pages/getphoneInfo/index?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId
that.data.couponChannelId
}); });
} else if (err.code == 11006) { } else if (err.code == 11006) {
// 用户手机已加密 // 用户手机已加密
wx.redirectTo({ wx.redirectTo({
url: "/pages/phoneinput/phoneinput?couponChannelId=" + url: "/pages/phoneinput/phoneinput?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId
that.data.couponChannelId
}); });
} else { } else {
wx.showToast({ wx.showToast({
@@ -731,7 +725,7 @@ Page({
var that = this; var that = this;
var shareObj = { var shareObj = {
title: that.data.data.title, title: that.data.data.title,
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`,
path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}`,
success: function (res) { success: function (res) {
if (res.errMsg == 'shareAppMessage:ok') {} if (res.errMsg == 'shareAppMessage:ok') {}
}, },
@@ -742,82 +736,9 @@ Page({
// 来自页面内的按钮的转发 // 来自页面内的按钮的转发
if (options.from == 'button') { if (options.from == 'button') {
var eData = options.target.dataset.id; var eData = options.target.dataset.id;
var couponId = options.target.dataset.couponid;
shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${couponId}`;
shareObj.path = `/pages/index/index?couponChannelId=${eData}`;
} }
// 返回shareObj // 返回shareObj
return shareObj; return shareObj;
}, },
/**
* 用户登录
*/
userLogin: function (couponChannelId, couponId, orderId) {
var that = this;
// 登录
wx.login({
success: ({
code
}) => {
wx.getSystemInfo({
success: function (res) {
that.setData({
systemInfo: JSON.stringify(res)
})
}
})
var usrdata = {
appId: config.weapp.AppId,
code: code,
sceneAddress: app.globalData.sceneAddress,
scene: that.data.scene,
systemInfo: that.data.systemInfo
};
if (app.globalData.locationInfo) {
usrdata = {
appId: config.weapp.AppId,
code: code,
sceneAddress: app.globalData.sceneAddress,
latitude: "" + app.globalData.locationInfo.latitude,
longitude: "" + app.globalData.locationInfo.longitude,
scene: that.data.scene,
systemInfo: that.data.systemInfo
};
}
Http.post({
url: config.api.login,
data: usrdata
})
.then(res => {
that.setData({
showPages: true
})
app.globalData.token = res.data.token;
Http.setToken(res.data.token);
if (couponChannelId && couponId || orderId) {
that.checkuerstatus(couponChannelId, couponId, orderId);
} else {
that.checkuerstatus();
}
})
.catch(err => {
wx.showModal({
title: '提示',
showCancel: false,
content: '登录失败,请重新尝试',
success: function (res) {
if (res.cancel) {
//点击取消,默认隐藏弹框
} else {
//点击确定
wx.reLaunch({
url: '/pages/index/index',
})
}
}
})
});
}
});
},
}); });

+ 1
- 1
pages/couponorder/index/index.wxml Voir le fichier

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" /> <image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</text> <text class="txt001">请您敬请期待</text>
<text class='txt002'>我们正在筹备一大波优惠活动</text> <text class='txt002'>我们正在筹备一大波优惠活动</text>
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover">
<navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover">
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>


+ 1
- 1
pages/discountCardList/discountCardList.wxml Voir le fichier

@@ -9,7 +9,7 @@
<image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" /> <image src="{{couponUrl}}" mode="aspectFill" lazy-load="true" />
<text class="txt001">请您敬请期待</text> <text class="txt001">请您敬请期待</text>
<text class='txt002'>我们正在筹备一大波优惠活动</text> <text class='txt002'>我们正在筹备一大波优惠活动</text>
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover">
<navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover">
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>


+ 5
- 11
pages/getphoneInfo/index.js Voir le fichier

@@ -5,7 +5,6 @@ Page({
data: { data: {
canIUse: wx.canIUse("button.open-type.getPhoneNumber"), canIUse: wx.canIUse("button.open-type.getPhoneNumber"),
couponChannelId: "", couponChannelId: "",
couponId: "",
path:null, path:null,
paramData:null paramData:null
}, },
@@ -17,10 +16,9 @@ Page({
paramData: options paramData: options
}) })
var that = this; var that = this;
if (options.couponChannelId && options.couponId) {
if (options.couponChannelId) {
that.setData({ that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
couponChannelId: options.couponChannelId
}); });
} }


@@ -70,20 +68,16 @@ Page({
}) })
} else if (that.path == 'index' && that.data.paramData.cuserId){ } else if (that.path == 'index' && that.data.paramData.cuserId){
wx.reLaunch({ 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 + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate
url: "/pages/coupon/detail/index?cuserId=" + that.data.paramData.cuserId + '&couponChannelId=' + that.data.paramData.couponChannelId + '&coverImg=' + that.data.paramData.coverImg + '&avatarUrl=' + that.data.paramData.avatarUrl + '&userName=' + that.data.paramData.userName + '&couponOrderId=' + that.data.paramData.couponOrderId + "&updateDate=" + that.data.paramData.updateDate
}) })
} else { } else {
wx.showToast({ wx.showToast({
title: res.data.msg, title: res.data.msg,
icon: "success", icon: "success",
success: function (res) { success: function (res) {
if (that.data.couponChannelId && that.data.couponId) {
if (that.data.couponChannelId) {
wx.redirectTo({ wx.redirectTo({
url: "/pages/coupon/detail/index?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId +
"&flag=pay"
url: "/pages/coupon/detail/index?couponChannelId=" +that.data.couponChannelId +"&flag=pay"
}) })
} else { } else {
wx.switchTab({ wx.switchTab({


+ 6
- 9
pages/getuserinfo/index.js Voir le fichier

@@ -6,17 +6,15 @@ Page({
canIUse: wx.canIUse("button.open-type.getUserInfo"), canIUse: wx.canIUse("button.open-type.getUserInfo"),
path:null, path:null,
couponChannelId: null, couponChannelId: null,
couponId:null,
cuserId:null, cuserId:null,
coverImg:null, coverImg:null,
couponOrderId:null couponOrderId:null
}, },
onLoad: function(options) { onLoad: function(options) {
var that = this; var that = this;
if (options.couponChannelId && options.couponId && !options.cuserId||options.orderId) {
if (options.couponChannelId && !options.cuserId||options.orderId) {
that.setData({ that.setData({
couponChannelId: options.couponChannelId, couponChannelId: options.couponChannelId,
couponId: options.couponId,
orderId:options.orderId orderId:options.orderId
}) })
} }
@@ -27,7 +25,6 @@ Page({
console.log(1231231231,options) console.log(1231231231,options)
that.setData({ that.setData({
couponChannelId: options.couponChannelId, couponChannelId: options.couponChannelId,
couponId: options.couponId,
cuserId: options.cuserId, cuserId: options.cuserId,
coverImg: options.coverImg, coverImg: options.coverImg,
userName: options.userName, userName: options.userName,
@@ -81,16 +78,16 @@ Page({
}); });
} else { } else {
//返回主页 //返回主页
if (that.data.couponChannelId && that.data.couponId && !that.data.cuserId) {
if (that.data.couponChannelId && !that.data.cuserId) {
wx.navigateTo({ wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.couponId}`
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}}`
}); });
} else if (that.data.couponChannelId && that.data.couponId && that.data.cuserId) {
} else if (that.data.couponChannelId && that.data.cuserId) {
/** /**
* 来自转赠 * 来自转赠
*/ */
wx.reLaunch({ 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}&updateDate=${that.data.updateDate}`
url: `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}&cuserId=${that.data.cuserId}&coverImg=${that.data.coverImg}&userName=${that.data.userName}&avatarUrl=${that.data.avatarUrl}&couponOrderId=${that.data.couponOrderId}&updateDate=${that.data.updateDate}`
}); });
} else if (that.data.orderId) { } else if (that.data.orderId) {
wx.navigateTo({ wx.navigateTo({
@@ -98,7 +95,7 @@ Page({
}); });
} else { } else {
wx.switchTab({ wx.switchTab({
url: "/pages/login/index"
url: "/pages/main/index"
}); });
} }
} }


+ 31
- 24
pages/index/index.js Voir le fichier

@@ -13,15 +13,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function(options) {
console.log(options)
let that = this; let that = this;
wx.showToast({
title: '加载中',
icon: "loading",
duration: 2000
})
wx.setStorageSync('options', JSON.stringify(options))
wx.setStorageSync('imgurl', imgurl)
if (decodeURIComponent(options.scene) == "undefined") { if (decodeURIComponent(options.scene) == "undefined") {
that.setData({ that.setData({
scene: 0 scene: 0
@@ -30,38 +22,53 @@ Page({
that.setData({ that.setData({
scene: decodeURIComponent(options.scene) scene: decodeURIComponent(options.scene)
}); });
that.setData({
newArr: this.data.scene.split(':')
})
console.log(this.data.newArr)
if (this.data.newArr[0]=='JC'){
options.couponChannelId = this.data.newArr[1];
}
} }
console.log(options.couponChannelId)
wx.showToast({
title: '加载中',
icon: "loading",
duration: 2000
})
wx.setStorageSync('options', JSON.stringify(options))
wx.setStorageSync('imgurl', imgurl)
app.getLocation(); app.getLocation();
if (options.couponChannelId && options.couponId || options.orderId) {
if (options.couponChannelId || options.orderId) {
if (options.cuserId){ if (options.cuserId){
/** /**
* 转赠判断 * 转赠判断
*/ */
that.userLogin(options.couponChannelId, options.couponId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId, options.updateDate);
that.userLogin(options.couponChannelId, null, options.cuserId, options.coverImg, options.userName, options.avatarUrl, options.couponOrderId, options.updateDate);
}else{ }else{
that.userLogin(options.couponChannelId, options.couponId, options.orderId);
that.userLogin(options.couponChannelId, options.orderId);
} }
} else { } else {
that.userLogin() that.userLogin()
} }
}, },
checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) {
checkuerstatus(couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) {
let that = this; let that = this;
Http.post({ Http.post({
url: config.api.checkUserStatus, url: config.api.checkUserStatus,
data: {} data: {}
}) })
.then(res => { .then(res => {
if (couponChannelId && couponId && !cuserId) {
if (couponChannelId && !cuserId) {
wx.redirectTo({ wx.redirectTo({
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`,
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}`,
}) })
} else if (couponChannelId && couponId && cuserId){
} else if (couponChannelId && cuserId){
/** /**
* 转赠判断 * 转赠判断
*/ */
wx.redirectTo({ wx.redirectTo({
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`,
url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`,
}) })
} else if (orderId) { } else if (orderId) {
wx.redirectTo({ wx.redirectTo({
@@ -69,23 +76,23 @@ Page({
}) })
}else{ }else{
wx.switchTab({ wx.switchTab({
url: '/pages/login/index'
url: '/pages/main/index'
}); });
} }
}) })
.catch(err => { .catch(err => {
if (err.code == 11004) { if (err.code == 11004) {
// 用户昵称未授权 // 用户昵称未授权
if (couponChannelId && couponId && !cuserId) {
if (couponChannelId && !cuserId) {
wx.redirectTo({ wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}`
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}`
}); });
} else if (couponChannelId && couponId && cuserId){
} else if (couponChannelId && cuserId){
/** /**
* 转赠判断 * 转赠判断
*/ */
wx.redirectTo({ wx.redirectTo({
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`
url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&cuserId=${cuserId}&coverImg=${coverImg}&userName=${userName}&avatarUrl=${avatarUrl}&couponOrderId=${couponOrderId}&updateDate=${updateDate}`
}); });
} else if (orderId) { } else if (orderId) {
wx.redirectTo({ wx.redirectTo({
@@ -102,7 +109,7 @@ Page({
/** /**
* 用户登录 * 用户登录
*/ */
userLogin: function (couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) {
userLogin: function (couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate) {
var that = this; var that = this;
// 登录 // 登录
wx.login({ wx.login({
@@ -144,8 +151,8 @@ Page({
}) })
app.globalData.token = res.data.token; app.globalData.token = res.data.token;
Http.setToken(res.data.token); Http.setToken(res.data.token);
if (couponChannelId&&couponId || orderId){
that.checkuerstatus(couponChannelId, couponId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate);
if (couponChannelId || orderId){
that.checkuerstatus(couponChannelId, orderId, cuserId, coverImg, userName, avatarUrl, couponOrderId, updateDate);
}else{ }else{
that.checkuerstatus(); that.checkuerstatus();
} }


pages/login/coupons/index.js → pages/main/coupons/index.js Voir le fichier


pages/login/coupons/index.json → pages/main/coupons/index.json Voir le fichier


pages/login/coupons/index.wxml → pages/main/coupons/index.wxml Voir le fichier


pages/login/coupons/index.wxss → pages/main/coupons/index.wxss Voir le fichier


pages/login/gameentry/gentry.js → pages/main/gameentry/gentry.js Voir le fichier


pages/login/gameentry/gentry.json → pages/main/gameentry/gentry.json Voir le fichier


pages/login/gameentry/gentry.wxml → pages/main/gameentry/gentry.wxml Voir le fichier


pages/login/gameentry/gentry.wxss → pages/main/gameentry/gentry.wxss Voir le fichier


pages/login/index.js → pages/main/index.js Voir le fichier

@@ -160,11 +160,11 @@ Page({
played: true played: true
}) })
} }
// if (optionss.couponChannelId && optionss.couponId || optionss.orderId) {
// that.userLogin(optionss.couponChannelId, optionss.couponId, optionss.orderId);
// } else {
// that.userLogin()
// }
if (optionss.couponChannelId|| optionss.orderId) {
that.userLogin(optionss.couponChannelId, optionss.orderId);
} else {
that.userLogin()
}
}, },
onShow: function() { onShow: function() {
this.setData({ this.setData({

pages/login/index.json → pages/main/index.json Voir le fichier


pages/login/index.wxml → pages/main/index.wxml Voir le fichier


pages/login/index.wxss → pages/main/index.wxss Voir le fichier


pages/login/rushToBuy/index.js → pages/main/rushToBuy/index.js Voir le fichier


pages/login/rushToBuy/index.json → pages/main/rushToBuy/index.json Voir le fichier


pages/login/rushToBuy/index.wxml → pages/main/rushToBuy/index.wxml Voir le fichier


pages/login/rushToBuy/index.wxss → pages/main/rushToBuy/index.wxss Voir le fichier


+ 1
- 1
pages/passCar/choicecoupon/choicecoupon.wxml Voir le fichier

@@ -4,7 +4,7 @@
<image src="{{couponUrl}}" mode="widthFix" /> <image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</text> <text class="txt001">请您敬请期待</text>
<text class='txt002'>我们正在筹备一大波优惠活动</text> <text class='txt002'>我们正在筹备一大波优惠活动</text>
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover">
<navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover">
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>


+ 1
- 5
pages/passCar/couponDetail/couponDetail.js Voir le fichier

@@ -5,7 +5,6 @@ const Http = require("../../../utils/HttpBasics");
//券详情页面 //券详情页面
Page({ Page({
data: { data: {
code: "",
data: {}, data: {},
createDate: "", createDate: "",
expiredTime: "", expiredTime: "",
@@ -24,10 +23,7 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
let that = this; let that = this;
that.setData({
code: options.quancode
});

console.log(options.quancode)
Http.get({ Http.get({
url: config.api.couponOrderDetail, url: config.api.couponOrderDetail,
data: { data: {


+ 1
- 1
pages/passCar/couponList/couponList.wxml Voir le fichier

@@ -8,7 +8,7 @@
<image src="{{couponUrl}}" mode="widthFix" /> <image src="{{couponUrl}}" mode="widthFix" />
<text class="txt001">请您敬请期待</text> <text class="txt001">请您敬请期待</text>
<text class='txt002'>我们正在筹备一大波优惠活动</text> <text class='txt002'>我们正在筹备一大波优惠活动</text>
<navigator class='nav' url="/pages/login/index" open-type="switchTab" hover-class="other-navigator-hover">
<navigator class='nav' url="/pages/main/index" open-type="switchTab" hover-class="other-navigator-hover">
<button hover-class='active'>前往首页看看</button> <button hover-class='active'>前往首页看看</button>
</navigator> </navigator>
</view> </view>


+ 1
- 1
pages/user/index.js Voir le fichier

@@ -73,7 +73,7 @@ Page({
// }, // },
navigateTo() { navigateTo() {
wx.navigateTo({ wx.navigateTo({
url: `/pages/login/index`
url: `/pages/main/index`
}); });
}, },
showVersion: function() { showVersion: function() {


+ 2
- 2
pages/user/index.wxml Voir le fichier

@@ -75,7 +75,7 @@
</view> </view>
<view class="margin"></view> <view class="margin"></view>
<view bindlongtap='showVersion' class='version'> <view bindlongtap='showVersion' class='version'>
<view wx:if="{{flag=='show'}}">版本�:3.4.1</view>
<view wx:if="{{flag=='show'}}">版本�:C.3.4.7</view>
<view wx:if="{{flag=='hidden'}}"></view> <view wx:if="{{flag=='hidden'}}"></view>
</view> </view>
</view> </view>
@@ -86,6 +86,6 @@
<view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}"> <view class='showQrcode' bindtap='hideQrcode' wx:if="{{showQrcode}}">
<view class="canvas-box"> <view class="canvas-box">
<canvas hidden="{{canvasHidden}}" style="height:500rpx;background:0 0 0 .6;margin-top:10rpx;" canvas-id="mycanvas1" /> <canvas hidden="{{canvasHidden}}" style="height:500rpx;background:0 0 0 .6;margin-top:10rpx;" canvas-id="mycanvas1" />
<text class='memberIds'>会员�:{{memberId}}</text>
<text class='memberIds'>会员å�{{memberId}}</text>
</view> </view>
</view> </view>

+ 1
- 1
project.config.json Voir le fichier

@@ -4,7 +4,7 @@
"ignore": [] "ignore": []
}, },
"setting": { "setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true, "es6": true,
"postcss": true, "postcss": true,
"minified": true, "minified": true,


Chargement…
Annuler
Enregistrer