@@ -40,33 +40,36 @@ App({ | |||||
onShow: function(options) { | onShow: function(options) { | ||||
//自助积分 需要openId 且必须写在onshow里面 | //自助积分 需要openId 且必须写在onshow里面 | ||||
let _this = this | let _this = this | ||||
if (businessSwitch) { | |||||
wx.login({ | |||||
success: (res) => { | |||||
if (wx.getStorageSync('openId')) { | |||||
myPluginInterface.getLocation(wx.getStorageSync('openId')).then(res => {}) | |||||
} else { | |||||
if (res.code) { | |||||
let usrdata = { | |||||
appId: config.weapp.AppId, | |||||
code: res.code, | |||||
} | |||||
Http.post({ | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}).then(res => { | |||||
if (_this.data.businessSwitch) { | |||||
myPluginInterface.getLocation(res.data.openId).then(res => { | |||||
console.log(res, "我是地理位置") | |||||
}) | |||||
} | |||||
}) | |||||
} | |||||
} | |||||
} | |||||
}) | |||||
if (businessSwitch && wx.getStorageSync('openId')){ | |||||
myPluginInterface.getLocation(wx.getStorageSync('openId')).then(res => { console.log("商圈位置授权onS") }) | |||||
} | } | ||||
// if (businessSwitch) { | |||||
// wx.login({ | |||||
// success: (res) => { | |||||
// if (wx.getStorageSync('openId')) { | |||||
// myPluginInterface.getLocation(wx.getStorageSync('openId')).then(res => {}) | |||||
// } else { | |||||
// if (res.code) { | |||||
// let usrdata = { | |||||
// appId: config.weapp.AppId, | |||||
// code: res.code, | |||||
// } | |||||
// Http.post({ | |||||
// url: config.api.login, | |||||
// data: usrdata | |||||
// }).then(res => { | |||||
// if (_this.data.businessSwitch) { | |||||
// myPluginInterface.getLocation(res.data.openId).then(res => { | |||||
// console.log(res, "我是地理位置") | |||||
// }) | |||||
// } | |||||
// }) | |||||
// } | |||||
// } | |||||
// } | |||||
// }) | |||||
// } | |||||
}, | }, | ||||
@@ -78,7 +81,7 @@ App({ | |||||
let that = this; | let that = this; | ||||
// 登录 | // 登录 | ||||
wx.login({ | wx.login({ | ||||
success: ({ | |||||
success: ({ | |||||
code | code | ||||
}) => { | }) => { | ||||
let usrdata = { | let usrdata = { | ||||
@@ -99,8 +102,12 @@ App({ | |||||
if (res.data.mall){ | if (res.data.mall){ | ||||
that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" | that.globalData.marketName = res.data.mall.name ? res.data.mall.name : "" | ||||
} | } | ||||
wx.setStorageSync('openId', res.data.openId) | wx.setStorageSync('openId', res.data.openId) | ||||
if (businessSwitch && res.data.openId) { | |||||
myPluginInterface.getLocation(res.data.openId).then(res => { console.log("商圈位置授权onL") }).catch(err=>{ | |||||
console.log(err,"商圈位置授权onL err") | |||||
}) | |||||
} | |||||
that.globalData.mouldType = res.data.mouldType ? res.data.mouldType:0 | that.globalData.mouldType = res.data.mouldType ? res.data.mouldType:0 | ||||
if (res.data.subMalls) { | if (res.data.subMalls) { | ||||
const squareList = JSON.parse(res.data.subMalls) | const squareList = JSON.parse(res.data.subMalls) | ||||
@@ -30,7 +30,10 @@ | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="titleName">{{item.title}}</view> | |||||
<view class="titleNameBox"> | |||||
<view class="titleName">{{item.title}}</view> | |||||
</view> | |||||
<view class="priceBox"> | <view class="priceBox"> | ||||
<view class="sellingBox f"> | <view class="sellingBox f"> | ||||
<view class="fuhao">¥</view> | <view class="fuhao">¥</view> | ||||
@@ -1,94 +1,106 @@ | |||||
.commBox{ | |||||
.commBox { | |||||
width: 96%; | width: 96%; | ||||
margin: 27rpx auto; | margin: 27rpx auto; | ||||
background-color: #fff; | background-color: #fff; | ||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.titleBox{ | |||||
.titleBox { | |||||
width: 100%; | width: 100%; | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 140rpx; | height: 140rpx; | ||||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_d9qt.png"); | background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_d9qt.png"); | ||||
background-size: 100% 100%; | background-size: 100% 100%; | ||||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||||
} | } | ||||
.titleImg{ | |||||
.titleImg { | |||||
width: 180rpx; | width: 180rpx; | ||||
height: 40rpx; | height: 40rpx; | ||||
float: left; | float: left; | ||||
margin: 20rpx; | margin: 20rpx; | ||||
display: block; | display: block; | ||||
} | } | ||||
.specialTitle{ | |||||
.specialTitle { | |||||
float: left; | float: left; | ||||
margin: 10rpx 20rpx; | margin: 10rpx 20rpx; | ||||
font-size: 38rpx; | font-size: 38rpx; | ||||
font-family: YouSheBiaoTiHei; | font-family: YouSheBiaoTiHei; | ||||
font-weight: 600; | font-weight: 600; | ||||
color: #37332D; | |||||
color: #37332d; | |||||
} | } | ||||
.more{ | |||||
.more { | |||||
float: right; | float: right; | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: 500; | font-weight: 500; | ||||
color: #866741; | color: #866741; | ||||
margin: 16rpx 20rpx; | margin: 16rpx 20rpx; | ||||
} | } | ||||
.rup{ | |||||
.rup { | |||||
width: 13rpx; | width: 13rpx; | ||||
height: 20rpx; | height: 20rpx; | ||||
margin: 2rpx 0 0 6rpx | |||||
margin: 2rpx 0 0 6rpx; | |||||
} | } | ||||
.contBox{ | |||||
.contBox { | |||||
overflow: hidden; | overflow: hidden; | ||||
/* width: 96%; */ | /* width: 96%; */ | ||||
margin: -50rpx auto 0 auto; | margin: -50rpx auto 0 auto; | ||||
} | } | ||||
.topImg{ | |||||
.topImg { | |||||
width: 100%; | width: 100%; | ||||
height: 140rpx; | height: 140rpx; | ||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
margin-bottom: 40rpx; | margin-bottom: 40rpx; | ||||
/* background-color: chartreuse; */ | /* background-color: chartreuse; */ | ||||
} | } | ||||
.topImg image{ | |||||
.topImg image { | |||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
width: 100%; | width: 100%; | ||||
height: 100%; | height: 100%; | ||||
} | } | ||||
.itemBox{ | |||||
.itemBox { | |||||
overflow: hidden; | overflow: hidden; | ||||
display: -webkit-box; | display: -webkit-box; | ||||
overflow-x: scroll; | overflow-x: scroll; | ||||
-webkit-overflow-scrolling: touch; | -webkit-overflow-scrolling: touch; | ||||
margin: 20rpx auto; | margin: 20rpx auto; | ||||
width: 96% | |||||
width: 96%; | |||||
} | } | ||||
.itemBox::-webkit-scrollbar { | .itemBox::-webkit-scrollbar { | ||||
display: none; | |||||
display: none; | |||||
} | } | ||||
.item{ | |||||
.item { | |||||
width: 240rpx; | width: 240rpx; | ||||
/* background-color: antiquewhite; */ | /* background-color: antiquewhite; */ | ||||
margin-right: 20rpx; | margin-right: 20rpx; | ||||
} | } | ||||
.itemImg{ | |||||
.itemImg { | |||||
position: relative; | position: relative; | ||||
width: 240rpx; | width: 240rpx; | ||||
height: 240rpx; | height: 240rpx; | ||||
border-radius: 16rpx ; | |||||
border-radius: 16rpx; | |||||
/* background-color: aquamarine; */ | /* background-color: aquamarine; */ | ||||
} | } | ||||
.itemImg image{ | |||||
.itemImg image { | |||||
width: 100%; | width: 100%; | ||||
height: 100%; | height: 100%; | ||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
} | } | ||||
.sellout{ | |||||
.sellout { | |||||
position: absolute; | position: absolute; | ||||
top: 0; | top: 0; | ||||
left: 0; | left: 0; | ||||
@@ -98,66 +110,86 @@ | |||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
} | } | ||||
.selloutImg{ | |||||
.selloutImg { | |||||
width: 195rpx !important; | width: 195rpx !important; | ||||
height: 154rpx !important; | height: 154rpx !important; | ||||
margin: 18% auto; | margin: 18% auto; | ||||
display: block | |||||
display: block; | |||||
} | |||||
.titleNameBox { | |||||
/* font-size: 18px; */ | |||||
height: 80rpx; | |||||
line-height: 40rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
} | } | ||||
.titleName{ | |||||
width:100%; | |||||
.titleName { | |||||
width: 100%; | |||||
font-size: 28rpx; | font-size: 28rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: 500; | font-weight: 500; | ||||
color: #333333; | |||||
color: #333; | |||||
margin-top: 10rpx; | |||||
display: -webkit-box; | |||||
-webkit-line-clamp: 2; | |||||
-webkit-box-orient: vertical; | |||||
overflow: hidden; | overflow: hidden; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
white-space: nowrap; | |||||
margin-top: 10rpx | |||||
} | } | ||||
.priceBox{ | |||||
.priceBox { | |||||
overflow: hidden; | overflow: hidden; | ||||
margin: 10rpx 0; | margin: 10rpx 0; | ||||
} | } | ||||
.f{ | |||||
.f { | |||||
float: left; | float: left; | ||||
} | } | ||||
.r{ | |||||
float:right; | |||||
.r { | |||||
float: right; | |||||
} | } | ||||
.sellingBox{ | |||||
overflow: hidden | |||||
.sellingBox { | |||||
overflow: hidden; | |||||
} | } | ||||
.fuhao{ | |||||
color: #DF2D2D; | |||||
.fuhao { | |||||
color: #df2d2d; | |||||
font-size: 24rpx; | font-size: 24rpx; | ||||
float: left; | float: left; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
/* font-weight: bold; */ | /* font-weight: bold; */ | ||||
margin-top: 10rpx | |||||
margin-top: 10rpx; | |||||
} | } | ||||
.int{ | |||||
.int { | |||||
float: left; | float: left; | ||||
font-size: 36rpx; | font-size: 36rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: bold; | font-weight: bold; | ||||
color: #DF2D2D; | |||||
color: #df2d2d; | |||||
} | } | ||||
.originalBox{ | |||||
overflow: hidden | |||||
.originalBox { | |||||
overflow: hidden; | |||||
} | } | ||||
.origina{ | |||||
.origina { | |||||
text-align: right; | text-align: right; | ||||
font-size: 24rpx; | font-size: 24rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: 400; | font-weight: 400; | ||||
text-decoration: line-through; | text-decoration: line-through; | ||||
color: #999999; | |||||
color: #999; | |||||
margin-top: 10rpx; | margin-top: 10rpx; | ||||
margin-right: 10rpx; | margin-right: 10rpx; | ||||
} | } | ||||
.countBox{ | |||||
.countBox { | |||||
width: 100%; | width: 100%; | ||||
height: 46rpx; | height: 46rpx; | ||||
background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_bq.png"); | background-image: url("https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/home_icon_bq.png"); | ||||
@@ -167,57 +199,60 @@ | |||||
line-height: 46rpx; | line-height: 46rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.countText{ | |||||
.countText { | |||||
font-size: 22rpx; | font-size: 22rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: #999999; | |||||
background: linear-gradient(180deg, #DCB07D 0%, #F5E0BF 100%); | |||||
color: #999; | |||||
background: linear-gradient(180deg, #dcb07d 0%, #f5e0bf 100%); | |||||
-webkit-background-clip: text; | -webkit-background-clip: text; | ||||
-webkit-text-fill-color: transparent; | -webkit-text-fill-color: transparent; | ||||
margin-left: 8rpx; | margin-left: 8rpx; | ||||
} | } | ||||
.countDate{ | |||||
.countDate { | |||||
font-size: 24rpx; | font-size: 24rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: bold; | font-weight: bold; | ||||
color: #4C3820; | |||||
color: #4c3820; | |||||
margin-right: 8rpx; | margin-right: 8rpx; | ||||
} | } | ||||
.moreItem{ | |||||
background: #F7F7F7; | |||||
.moreItem { | |||||
background: #f7f7f7; | |||||
border-radius: 8px; | border-radius: 8px; | ||||
} | } | ||||
.noDataImg{ | |||||
.noDataImg { | |||||
width: 160rpx; | width: 160rpx; | ||||
height: 160rpx; | height: 160rpx; | ||||
margin: 25% auto 5% auto; | margin: 25% auto 5% auto; | ||||
} | } | ||||
.noDataImg image{ | |||||
.noDataImg image { | |||||
width: 100%; | width: 100%; | ||||
height: 100% | |||||
height: 100%; | |||||
} | } | ||||
.noDataText{ | |||||
.noDataText { | |||||
text-align: center; | text-align: center; | ||||
font-size: 22rpx; | font-size: 22rpx; | ||||
font-family: OPPOSans; | font-family: OPPOSans; | ||||
font-weight: 500; | font-weight: 500; | ||||
color: #999999; | |||||
color: #999; | |||||
} | } | ||||
.product{ | |||||
.product { | |||||
width: 96%; | width: 96%; | ||||
height: 140rpx; | height: 140rpx; | ||||
margin: 30rpx auto 10rpx; | margin: 30rpx auto 10rpx; | ||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
.product image{ | |||||
.product image { | |||||
height: 100%; | height: 100%; | ||||
display: block; | display: block; | ||||
width: 100%; | width: 100%; | ||||
} | |||||
} |
@@ -1,6 +1,7 @@ | |||||
// pages/index/sw/index.js | // pages/index/sw/index.js | ||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
let app = getApp(); | |||||
Component({ | Component({ | ||||
properties: { | properties: { | ||||
gamedata: { | gamedata: { | ||||
@@ -17,41 +18,62 @@ Component({ | |||||
gotogame: function (e) { | gotogame: function (e) { | ||||
let that=this; | let that=this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | |||||
var data = { | |||||
couponChannelId: "" + that.data.couponChannelId, | |||||
couponId: "" + that.data.couponId | |||||
}; | |||||
if (that.data.couponChannelId == null) { | |||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res1 => { | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}).then(res => { | |||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | |||||
couponId: "" + that.data.couponId | couponId: "" + that.data.couponId | ||||
}; | }; | ||||
} | |||||
wx.navigateTo({ | |||||
url: '/pages/game/index?url=' + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
}) | |||||
}) | |||||
.catch(err => { | |||||
if (err.code == 11005) { | |||||
// 用户手机未授权 | |||||
/** | |||||
* 将值传到用户手机号授权的页面 | |||||
* | |||||
*/ | |||||
if (that.data.couponChannelId == null) { | |||||
var data = { | |||||
couponId: "" + that.data.couponId | |||||
}; | |||||
} | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: "/pages/getphoneInfo/index?path=index&url=" + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId | |||||
}); | |||||
} else if (err.code == 11006){ | |||||
// 用户手机已加密 | |||||
url: '/pages/game/index?url=' + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
}) | |||||
}).catch(err => { | |||||
if (err.code == 11005) { | |||||
// 用户手机未授权 | |||||
/** | |||||
* 将值传到用户手机号授权的页面 | |||||
* | |||||
*/ | |||||
app.globalData.skipUrl = '/pages/game/index?url=' + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
app.globalData.skip = 'redirectTo' | |||||
wx.redirectTo({ | |||||
url: "/pages/getphoneInfo/index?path=index&url=" + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
}); | |||||
} else if (err.code == 11006) { | |||||
// 用户手机已加密 | |||||
wx.redirectTo({ | |||||
url: "/pages/phoneinput/phoneinput?path=index&url=" + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
}).catch(err => { | |||||
if (err.code == 11004) { //未授权微信 | |||||
app.globalData.type = 'gm' | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: "/pages/phoneinput/phoneinput?path=index&url=" + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId | |||||
url: "/pages/getuserinfo/index?path=index&url=" + e.target.dataset.data.url + "&id=" + e.target.dataset.data.id + "&gameId=" + e.target.dataset.data.gameId, | |||||
}); | }); | ||||
}else { | |||||
} else { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.errMsg, | |||||
title: err.message, | |||||
icon: 'none', | icon: 'none', | ||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
@@ -1,5 +1,6 @@ | |||||
.optimizationBox { | .optimizationBox { | ||||
overflow: hidden; | |||||
/* overflow: hidden; */ | |||||
margin-top: 20rpx; | |||||
} | } | ||||
.titleImg { | .titleImg { | ||||
@@ -86,15 +87,16 @@ | |||||
.contBox{ | .contBox{ | ||||
background: linear-gradient(0deg, #F5F5F5, #fff); | background: linear-gradient(0deg, #F5F5F5, #fff); | ||||
overflow: hidden; | |||||
height: 350rpx; | |||||
} | } | ||||
.contLsitBox{ | .contLsitBox{ | ||||
width: 96%; | width: 96%; | ||||
margin: 0 auto; | |||||
margin: 0 auto ; | |||||
display: flex; | display: flex; | ||||
overflow: hidden; | overflow: hidden; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
padding-bottom: 170rpx; | |||||
} | } | ||||
.item{ | .item{ | ||||
@@ -61,7 +61,7 @@ var config = { | |||||
/** | /** | ||||
* 商户优惠信息 | * 商户优惠信息 | ||||
*/ | */ | ||||
listByMerchant: "/wxCouponChannel/listByMerchant", | |||||
listByMerchant: "/wxCouponChannel/listByMerchant", | |||||
/** | /** | ||||
* 优惠券详情 | * 优惠券详情 | ||||
*/ | */ | ||||
@@ -89,7 +89,7 @@ var config = { | |||||
/** | /** | ||||
* 频道查询 | * 频道查询 | ||||
*/ | */ | ||||
couponChannelList: "/wxCouponChannel/list", | |||||
couponChannelList: "/wxCouponChannel/list", | |||||
/** | /** | ||||
* 换一换change | * 换一换change | ||||
*/ | */ | ||||
@@ -1,7 +1,14 @@ | |||||
{ | { | ||||
"ext": { | "ext": { | ||||
"attr": { | "attr": { | ||||
"mchId": "1602801645", | |||||
"car": { | |||||
"etcp": { | |||||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||||
"etcpVersion": "release", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
} | |||||
}, | |||||
"mchId": "1604439800", | |||||
"imgProxy": [ | "imgProxy": [ | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img", | "newUrl": "https://ctest.malls.iformall.com/img", | ||||
@@ -17,14 +24,12 @@ | |||||
} | } | ||||
], | ], | ||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | "configUrl": "https://ctest.malls.iformall.com/C/api", | ||||
"etcpAppId": "wx9f3a77763caa7c89", | |||||
"etcpVersion": "release", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||||
"businessSwitch": "1", | |||||
"ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
"ifHaveCarModular": "1" | "ifHaveCarModular": "1" | ||||
}, | }, | ||||
"name": "富茂望京测试版", | |||||
"weappId": "wx9f3a77763caa7c89", | |||||
"name": "金泸商务", | |||||
"weappId": "wx649b3be73c1afe47", | |||||
"appVersion": "C.test.5.2.0" | "appVersion": "C.test.5.2.0" | ||||
}, | }, | ||||
"debug": false, | "debug": false, | ||||
@@ -65,12 +70,16 @@ | |||||
"navigationBarBackgroundColor": "#FFFFFF" | "navigationBarBackgroundColor": "#FFFFFF" | ||||
}, | }, | ||||
"plugins": { | "plugins": { | ||||
"auto-points-plugin": { | |||||
"version": "1.3.0", | |||||
"provider": "wxfab2bf944bfc4da6" | |||||
}, | |||||
"live-player-plugin": { | "live-player-plugin": { | ||||
"version": "1.2.5", | "version": "1.2.5", | ||||
"provider": "wx2b03c6e691cd7370" | "provider": "wx2b03c6e691cd7370" | ||||
} | } | ||||
}, | }, | ||||
"extAppid": "wx9f3a77763caa7c89", | |||||
"extAppid": "wx649b3be73c1afe47", | |||||
"extEnable": true, | "extEnable": true, | ||||
"permission": { | "permission": { | ||||
"scope.userLocation": { | "scope.userLocation": { | ||||
@@ -2,7 +2,7 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||||
let ifStoreApp = extConfig.attr.ifStoreApp; | let ifStoreApp = extConfig.attr.ifStoreApp; | ||||
let businessSwitch = extConfig.attr.businessSwitch | let businessSwitch = extConfig.attr.businessSwitch | ||||
let mch_id = extConfig.attr.mchId | let mch_id = extConfig.attr.mchId | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44)+"px" | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + "px" | |||||
const Http = require("../utils/HttpBasics"); | const Http = require("../utils/HttpBasics"); | ||||
const imgurl = require("../utils/imgurl"); | const imgurl = require("../utils/imgurl"); | ||||
const config = require("../config/config"); | const config = require("../config/config"); | ||||
@@ -12,27 +12,28 @@ const bgColor = require("../utils/bgColor.js") | |||||
let app = getApp(); | let app = getApp(); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
aa: (app.statusBarHeight+ 34) + "rpx", | |||||
noDataFlag:false, | |||||
busineKye:0, | |||||
businePageNum:1, | |||||
businessList:[],//优选好物导航 | |||||
businessData: [],//优选好物数据 | |||||
topicObj2: null,//欢乐城首页限时抢购 | |||||
topicObj3: null,//欢乐城首页砍价 | |||||
topicObj4: null,//欢乐城首页拼团 | |||||
topicObj5: null,//欢乐城首页消费卡 | |||||
topicObj6: null,//欢乐城首页积分商城 | |||||
specialLsit:[],//欢乐城首页专题 | |||||
marketName:"",//商场名称 | |||||
mouldType:0, | |||||
aa: (app.statusBarHeight + 34) + "rpx", | |||||
noDataFlag: false, | |||||
busineKye: 0, | |||||
businePageNum: 1, | |||||
credit: 0, | |||||
businessList: [], //优选好物导航 | |||||
businessData: [], //优选好物数据 | |||||
topicObj2: null, //欢乐城首页限时抢购 | |||||
topicObj3: null, //欢乐城首页砍价 | |||||
topicObj4: null, //欢乐城首页拼团 | |||||
topicObj5: null, //欢乐城首页消费卡 | |||||
topicObj6: null, //欢乐城首页积分商城 | |||||
specialLsit: [], //欢乐城首页专题 | |||||
marketName: "", //商场名称 | |||||
mouldType: 0, | |||||
navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 44) + "px", | navLineHeight: ((app.statusBarHeight + app.statusBarHeight) + 44) + "px", | ||||
huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", | huanlechengImgurl: "https://formall.oss-accelerate.aliyuncs.com/cimg/v20211214/", | ||||
mch_id: mch_id, | mch_id: mch_id, | ||||
goUrl:"",//商圈跳转链接 | |||||
accreditFlag:1,//1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 | |||||
goUrl: "", //商圈跳转链接 | |||||
accreditFlag: 1, //1是未授权微信且未授权手机号 2授权了微信 没授权手机号 3微信和手机号都授权了 | |||||
businessSwitch: businessSwitch, | businessSwitch: businessSwitch, | ||||
typeLsit:{}, | |||||
typeLsit: {}, | |||||
showLocationIf: true, | showLocationIf: true, | ||||
ifStoreApp: ifStoreApp, | ifStoreApp: ifStoreApp, | ||||
navigationBarTitle: '首页', | navigationBarTitle: '首页', | ||||
@@ -107,17 +108,17 @@ Page({ | |||||
liveFlag: 0, //直播按钮显隐标志位 | liveFlag: 0, //直播按钮显隐标志位 | ||||
squareName: "", //当前广场 | squareName: "", //当前广场 | ||||
isShowSqare: false, | isShowSqare: false, | ||||
moduleList:[],//按钮列表 | |||||
moduleList: [], //按钮列表 | |||||
}, | }, | ||||
getBusineData(e){ | |||||
getBusineData(e) { | |||||
this.setData({ | this.setData({ | ||||
businePageNum:1, | |||||
businePageNum: 1, | |||||
busineKye: e.detail, | busineKye: e.detail, | ||||
noDataFlag:false, | |||||
noDataFlag: false, | |||||
}) | }) | ||||
this.getCouponChannelList(e.detail) | this.getCouponChannelList(e.detail) | ||||
}, | }, | ||||
getBusinessList(){//获取优选导航 | |||||
getBusinessList() { //获取优选导航 | |||||
Http.get({ | Http.get({ | ||||
url: config.api.businessList, | url: config.api.businessList, | ||||
data: { | data: { | ||||
@@ -125,31 +126,35 @@ Page({ | |||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
this.setData({ | this.setData({ | ||||
businessList: [{ id: 0, title: "全部", type: 1 }].concat(res.data) | |||||
businessList: [{ | |||||
id: 0, | |||||
title: "全部", | |||||
type: 1 | |||||
}].concat(res.data) | |||||
}); | }); | ||||
}).catch(err=>{ | |||||
}).catch(err => { | |||||
wx.showModal({ | wx.showModal({ | ||||
title: '提示', | title: '提示', | ||||
content: err.message ? err.message:err.data, | |||||
content: err.message ? err.message : err.data, | |||||
showCancel: false | showCancel: false | ||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
getCouponChannelList(key){ | |||||
getCouponChannelList(key) { | |||||
if (this.data.noDataFlag) { | if (this.data.noDataFlag) { | ||||
return | return | ||||
} | } | ||||
wx.showLoading({ | wx.showLoading({ | ||||
title: "加载中" | title: "加载中" | ||||
}); | }); | ||||
let param={} | |||||
if (key==0){ | |||||
let param = {} | |||||
if (key == 0) { | |||||
param = { | param = { | ||||
pageNum: this.data.businePageNum, | pageNum: this.data.businePageNum, | ||||
pageSize: 6, | pageSize: 6, | ||||
targetAd: 1 | targetAd: 1 | ||||
} | } | ||||
}else{ | |||||
} else { | |||||
param = { | param = { | ||||
pageNum: this.data.businePageNum, | pageNum: this.data.businePageNum, | ||||
pageSize: 6, | pageSize: 6, | ||||
@@ -158,39 +163,39 @@ Page({ | |||||
} | } | ||||
} | } | ||||
Http.get({ | Http.get({ | ||||
url: config.api.couponChannelList, | url: config.api.couponChannelList, | ||||
data: param | data: param | ||||
}).then(res=>{ | |||||
if (res.data.list.length==0){ | |||||
this.setData({ | |||||
noDataFlag:true | |||||
}).then(res => { | |||||
if (res.data.list&&res.data.list.length != 0) { | |||||
let tempLsit = this.data.businessData | |||||
let data = res.data.list | |||||
data.map(item => { | |||||
if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { | |||||
let str = item.salePriceStr.split('.') | |||||
item.salePriceStrQ = str[0] | |||||
item.salePriceStrH = str[1] | |||||
} | |||||
item.sale = item.inventory - item.remainInventory | |||||
}) | }) | ||||
} | |||||
let tempLsit = this.data.businessData | |||||
let data = res.data.list | |||||
data.map(item => { | |||||
if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { | |||||
let str = item.salePriceStr.split('.') | |||||
item.salePriceStrQ = str[0] | |||||
item.salePriceStrH = str[1] | |||||
} | |||||
item.sale = item.inventory - item.remainInventory | |||||
}) | |||||
if (this.data.businePageNum>1){ | |||||
this.setData({ | |||||
businessData: [...tempLsit, ...data] | |||||
}) | |||||
if (this.data.businePageNum > 1) { | |||||
this.setData({ | |||||
businessData: [...tempLsit, ...data] | |||||
}) | |||||
} else { | |||||
this.setData({ | |||||
businessData: data | |||||
}) | |||||
} | |||||
}else{ | }else{ | ||||
this.setData({ | this.setData({ | ||||
businessData: data | |||||
noDataFlag: true | |||||
}) | }) | ||||
} | } | ||||
wx.hideLoading(); | wx.hideLoading(); | ||||
}).catch(err => { | }).catch(err => { | ||||
wx.hideLoading(); | wx.hideLoading(); | ||||
wx.showModal({ | wx.showModal({ | ||||
@@ -200,27 +205,27 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
goPage(e){ | |||||
goPage(e) { | |||||
let obj = e.currentTarget.dataset.obj | let obj = e.currentTarget.dataset.obj | ||||
console.log(obj,"obj") | |||||
if (obj.linkType==1){ | |||||
if (obj.linkUrl =="/pages/game/index"){ | |||||
console.log(obj, "obj") | |||||
if (obj.linkType == 1) { | |||||
if (obj.linkUrl == "/pages/game/index") { | |||||
this.gotogame() | this.gotogame() | ||||
}else{ | |||||
} else { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: obj.linkUrl, | url: obj.linkUrl, | ||||
}) | }) | ||||
} | } | ||||
//小程序内部跳转 | //小程序内部跳转 | ||||
}else if(obj.linkType==2){ | |||||
} else if (obj.linkType == 2) { | |||||
//跳转到外部小程序 | //跳转到外部小程序 | ||||
wx.navigateToMiniProgram({ | wx.navigateToMiniProgram({ | ||||
appId: obj.outLinkAppid, | appId: obj.outLinkAppid, | ||||
path: obj.linkUrl ? obj.linkUrl : '', | path: obj.linkUrl ? obj.linkUrl : '', | ||||
fail:err=>{ | |||||
fail: err => { | |||||
wx.showModal({ | wx.showModal({ | ||||
title: '提示', | title: '提示', | ||||
content: err, | content: err, | ||||
@@ -231,87 +236,87 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
//获取按钮列表 | //获取按钮列表 | ||||
getModule(){ | |||||
getModule() { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.wxCustomizeModule | url: config.api.wxCustomizeModule | ||||
}).then(res=>{ | |||||
}).then(res => { | |||||
this.setData({ | this.setData({ | ||||
moduleList: res.data, | moduleList: res.data, | ||||
}) | }) | ||||
}).catch(err=>{ | |||||
if (err.status!=404) | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.message ? err.message:err.data, | |||||
showCancel: false | |||||
}) | |||||
}).catch(err => { | |||||
if (err.status != 404) | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.message ? err.message : err.data, | |||||
showCancel: false | |||||
}) | |||||
}) | }) | ||||
}, | }, | ||||
//判断用户是否授权 | //判断用户是否授权 | ||||
uesrInfo(){ | |||||
uesrInfo() { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
data: { | data: { | ||||
token: app.globalData.token | token: app.globalData.token | ||||
} | } | ||||
}).then(res => { | }).then(res => { | ||||
Http.get({ | |||||
url: config.api.checkPhoneStatus | |||||
}).then(res=>{//全部授权 | |||||
this.setData({ | |||||
accreditFlag: 3 | |||||
}) | |||||
}).catch(err => { | |||||
if(err.code==11005){//未授权手机号 | |||||
this.setData({ | |||||
accreditFlag: 2 | |||||
}) | |||||
}else{ | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
}).catch (err => { | |||||
if(err.code==11004){//未授权微信 | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus | |||||
}).then(res => { //全部授权 | |||||
this.setData({ | this.setData({ | ||||
accreditFlag:1 | |||||
accreditFlag: 3 | |||||
}) | }) | ||||
}else{ | |||||
}).catch(err => { | |||||
if (err.code == 11005) { //未授权手机号 | |||||
this.setData({ | |||||
accreditFlag: 2 | |||||
}) | |||||
} else { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | title: err.message, | ||||
icon: 'none', | icon: 'none', | ||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
}); | }); | ||||
} | |||||
} | |||||
}) | |||||
}).catch(err => { | |||||
if (err.code == 11004) { //未授权微信 | |||||
this.setData({ | |||||
accreditFlag: 1 | |||||
}) | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | }) | ||||
}, | }, | ||||
//获取当前广场名 | //获取当前广场名 | ||||
//跳转到每日签到 | //跳转到每日签到 | ||||
goSign(){ | |||||
goSign() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/activityCalendar/activityCalendar', | url: '/pages/activityCalendar/activityCalendar', | ||||
}) | }) | ||||
}, | }, | ||||
//活动日历 | //活动日历 | ||||
goCalendar(){ | |||||
goCalendar() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/dateLsit/dateLsit', | url: '/pages/dateLsit/dateLsit', | ||||
}) | }) | ||||
}, | }, | ||||
//跳转到其他广场列表 | //跳转到其他广场列表 | ||||
goSquareList() { | goSquareList() { | ||||
if (this.data.isShowSqare){ | |||||
if (this.data.isShowSqare) { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/location/location', | url: '/pages/location/location', | ||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
goLive() { | goLive() { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -373,7 +378,7 @@ Page({ | |||||
swiperCurrent: e.detail.current | swiperCurrent: e.detail.current | ||||
}); | }); | ||||
}, | }, | ||||
gotogame: function() { | |||||
gotogame: function() { | |||||
let that = this; | let that = this; | ||||
if (!that.data.showIf) { | if (!that.data.showIf) { | ||||
wx.showToast({ | wx.showToast({ | ||||
@@ -383,10 +388,16 @@ Page({ | |||||
}) | }) | ||||
} else { | } else { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.checkUserStatus, | |||||
data: { | |||||
token: app.globalData.token | |||||
} | |||||
}).then(res1 => { | |||||
app.globalData.type = 'gm' | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | url: config.api.checkPhoneStatus, | ||||
data: {} | data: {} | ||||
}) | |||||
.then(res => { | |||||
}).then(res => { | |||||
var data = { | var data = { | ||||
couponChannelId: "" + that.data.couponChannelId, | couponChannelId: "" + that.data.couponChannelId, | ||||
couponId: "" + that.data.couponId | couponId: "" + that.data.couponId | ||||
@@ -399,14 +410,15 @@ Page({ | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | ||||
}) | }) | ||||
}) | |||||
.catch(err => { | |||||
}).catch(err => { | |||||
if (err.code == 11005) { | if (err.code == 11005) { | ||||
// 用户手机未授权 | // 用户手机未授权 | ||||
/** | /** | ||||
* 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
* | * | ||||
*/ | */ | ||||
app.globalData.skipUrl = '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | |||||
app.globalData.skip = 'redirectTo' | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | ||||
}); | }); | ||||
@@ -424,6 +436,22 @@ Page({ | |||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
}).catch(err => { | |||||
if (err.code == 11004) { //未授权微信 | |||||
app.globalData.type = 'gm' | |||||
wx.redirectTo({ | |||||
url: "/pages/getuserinfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
} | } | ||||
}, | }, | ||||
@@ -451,13 +479,16 @@ Page({ | |||||
getType() { | getType() { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.setType, | url: config.api.setType, | ||||
data:{ | |||||
data: { | |||||
mouldType: app.globalData.mouldType | mouldType: app.globalData.mouldType | ||||
} | } | ||||
}).then(res=>{ | |||||
const{code ,data}=res | |||||
if(code==200){ | |||||
app.globalData.typeLsit=data | |||||
}).then(res => { | |||||
const { | |||||
code, | |||||
data | |||||
} = res | |||||
if (code == 200) { | |||||
app.globalData.typeLsit = data | |||||
this.setData({ | this.setData({ | ||||
typeLsit: data, | typeLsit: data, | ||||
}) | }) | ||||
@@ -497,7 +528,7 @@ Page({ | |||||
//获取条形码 | //获取条形码 | ||||
// util.barcode("barcode", optionss.quancode, 510, 100); | // util.barcode("barcode", optionss.quancode, 510, 100); | ||||
// console.log(Http.headers.token, "?") | // console.log(Http.headers.token, "?") | ||||
}, | }, | ||||
/** | /** | ||||
* 获得经纬度 | * 获得经纬度 | ||||
@@ -527,42 +558,50 @@ Page({ | |||||
}, | }, | ||||
onUnload() { | onUnload() { | ||||
// wx.removeStorageSync('squareList') | // wx.removeStorageSync('squareList') | ||||
}, | }, | ||||
// 初始换底部导航栏 | // 初始换底部导航栏 | ||||
setTabStyle: function () { | |||||
setTabStyle: function() { | |||||
this.getTabBar().setData({ | this.getTabBar().setData({ | ||||
selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | selectedColor: `${app.globalData.styleLsit.t_in_std.styleClass}`, | ||||
list: [{ | list: [{ | ||||
"pagePath": "/index/index", | |||||
"iconPath": `${app.globalData.styleLsit.t_in.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, | |||||
"text": "首页" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/searchbar", | |||||
"iconPath": `${app.globalData.styleLsit.t_md.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, | |||||
"text": "门店" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/passCar", | |||||
"iconPath": `${app.globalData.styleLsit.t_tc.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, | |||||
"text": "停车" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/user", | |||||
"iconPath": `${app.globalData.styleLsit.t_uc.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, | |||||
"text": "我的" | |||||
} | |||||
"pagePath": "/index/index", | |||||
"iconPath": `${app.globalData.styleLsit.t_in.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_in_std.icon}`, | |||||
"text": "首页" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/searchbar", | |||||
"iconPath": `${app.globalData.styleLsit.t_md.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_md_std.icon}`, | |||||
"text": "门店" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/passCar", | |||||
"iconPath": `${app.globalData.styleLsit.t_tc.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_tc_std.icon}`, | |||||
"text": "停车" | |||||
}, | |||||
{ | |||||
"pagePath": "/index/user", | |||||
"iconPath": `${app.globalData.styleLsit.t_uc.icon}`, | |||||
"selectedIconPath": `${app.globalData.styleLsit.t_uc_std.icon}`, | |||||
"text": "我的" | |||||
} | |||||
], | ], | ||||
}) | }) | ||||
}, | }, | ||||
onShow: function() { | onShow: function() { | ||||
console.log(app.globalData.mouldType,"mouldType") | |||||
console.log(app.globalData.mouldType, "mouldType") | |||||
if (app.globalData.token) { | |||||
this.getmemberId(app.globalData.token); | |||||
} else { | |||||
app.tokenCallback = token => { | |||||
this.getmemberId(app.globalData.token); | |||||
} | |||||
} | |||||
this.setData({ | this.setData({ | ||||
mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
marketName: app.globalData.marketName, | marketName: app.globalData.marketName, | ||||
@@ -575,11 +614,11 @@ Page({ | |||||
goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | goUrl: `plugin://auto-points-plugin/index?openid=${openId}&mch_id=${this.data.mch_id}` | ||||
}) | }) | ||||
} | } | ||||
if(JSON.stringify(app.globalData.styleLsit)!="{}"){ | |||||
if (JSON.stringify(app.globalData.styleLsit) != "{}") { | |||||
this.setTabStyle() | this.setTabStyle() | ||||
} | } | ||||
this.ifShowSqare(); | this.ifShowSqare(); | ||||
if (wx.getStorageSync("squareList") && wx.getStorageSync("selectedMall")) { | if (wx.getStorageSync("squareList") && wx.getStorageSync("selectedMall")) { | ||||
var temp = wx.getStorageSync("squareList").filter(item => item.tenantId == wx.getStorageSync("selectedMall"))[0].name | var temp = wx.getStorageSync("squareList").filter(item => item.tenantId == wx.getStorageSync("selectedMall"))[0].name | ||||
@@ -625,12 +664,14 @@ Page({ | |||||
setTimeout(function() { | setTimeout(function() { | ||||
that.alphaClick(); | that.alphaClick(); | ||||
}, 8000) | }, 8000) | ||||
// 如果有广告 | |||||
// 如果有广告 | |||||
setTimeout(function() { | setTimeout(function() { | ||||
// debugger | // debugger | ||||
that.alphaClick1(); | that.alphaClick1(); | ||||
}, 8000) | }, 8000) | ||||
}, | }, | ||||
getmemberId: function(token) { | getmemberId: function(token) { | ||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
@@ -644,6 +685,7 @@ Page({ | |||||
upgradePercent: res.data.upgradePercent, | upgradePercent: res.data.upgradePercent, | ||||
upgradeScore: res.data.upgradeScore, | upgradeScore: res.data.upgradeScore, | ||||
memberId: res.data.id, | memberId: res.data.id, | ||||
credit: res.data.credit, | |||||
}) | }) | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
@@ -659,7 +701,7 @@ Page({ | |||||
url: '/pages/czdetail/czdetail', | url: '/pages/czdetail/czdetail', | ||||
}) | }) | ||||
}, | }, | ||||
goIntegralmall(){ | |||||
goIntegralmall() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/integralmall/index', | url: '/pages/integralmall/index', | ||||
}) | }) | ||||
@@ -706,15 +748,15 @@ Page({ | |||||
getWeapNote: function(couponChannelId, couponId, orderId) { | getWeapNote: function(couponChannelId, couponId, orderId) { | ||||
var that = this; | var that = this; | ||||
if (app.globalData.token) { | |||||
if (app.globalData.token) { | |||||
// 登录 | // 登录 | ||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
that.getBannerlist(); | that.getBannerlist(); | ||||
if(that.data.mouldType==0){//富茂原版 | |||||
if (that.data.mouldType == 0) { //富茂原版 | |||||
that.topicShow(); | that.topicShow(); | ||||
that.getxsList(); | that.getxsList(); | ||||
} else if (that.data.mouldType == 1){//欢乐城模板 | |||||
} else if (that.data.mouldType == 1) { //欢乐城模板 | |||||
that.getShowList() | that.getShowList() | ||||
that.topicShowall(2); | that.topicShowall(2); | ||||
that.topicShowall(3); | that.topicShowall(3); | ||||
@@ -724,8 +766,8 @@ Page({ | |||||
that.getBusinessList(); | that.getBusinessList(); | ||||
that.getCouponChannelList(0) | that.getCouponChannelList(0) | ||||
} | } | ||||
that.getType() | that.getType() | ||||
// that.uesrInfo() | // that.uesrInfo() | ||||
that.getLocation(); | that.getLocation(); | ||||
@@ -777,10 +819,10 @@ Page({ | |||||
console.log(app.globalData.token) | console.log(app.globalData.token) | ||||
that.getmemberId(app.globalData.token); | that.getmemberId(app.globalData.token); | ||||
that.getBannerlist(); | that.getBannerlist(); | ||||
if (that.data.mouldType == 0) {//富茂原版 | |||||
if (that.data.mouldType == 0) { //富茂原版 | |||||
that.topicShow(); | that.topicShow(); | ||||
that.getxsList(); | that.getxsList(); | ||||
} else if (that.data.mouldType == 1) {//欢乐城模板 | |||||
} else if (that.data.mouldType == 1) { //欢乐城模板 | |||||
that.getShowList() | that.getShowList() | ||||
that.topicShowall(2); | that.topicShowall(2); | ||||
that.topicShowall(3); | that.topicShowall(3); | ||||
@@ -976,13 +1018,13 @@ Page({ | |||||
}); | }); | ||||
}, | }, | ||||
//获取欢乐城专题 | //获取欢乐城专题 | ||||
getShowList(){ | |||||
getShowList() { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.showList | url: config.api.showList | ||||
}).then(res=>{ | |||||
}).then(res => { | |||||
let tempData = res.data | let tempData = res.data | ||||
tempData.map(item1=>{ | |||||
if (item1.couponList){ | |||||
tempData.map(item1 => { | |||||
if (item1.couponList) { | |||||
item1.couponList.map(item2 => { | item1.couponList.map(item2 => { | ||||
if (item2.salePriceStr && item2.salePriceStr.indexOf('.') != -1) { | if (item2.salePriceStr && item2.salePriceStr.indexOf('.') != -1) { | ||||
let str = item2.salePriceStr.split('.') | let str = item2.salePriceStr.split('.') | ||||
@@ -991,11 +1033,11 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
this.setData({ | this.setData({ | ||||
specialLsit:res.data?res.data:[] | |||||
specialLsit: res.data ? res.data : [] | |||||
}) | }) | ||||
}).catch(err => { | }).catch(err => { | ||||
wx.showToast({ | wx.showToast({ | ||||
@@ -1013,17 +1055,17 @@ Page({ | |||||
* topicType=5 消费卡 | * topicType=5 消费卡 | ||||
* topicType=6 积分商城 | * topicType=6 积分商城 | ||||
*/ | */ | ||||
topicShowall(topicType){ | |||||
topicShowall(topicType) { | |||||
Http.get({ | Http.get({ | ||||
url: config.api.topicShow, | url: config.api.topicShow, | ||||
data:{ | |||||
data: { | |||||
topicType | topicType | ||||
} | } | ||||
}).then(res=>{ | |||||
}).then(res => { | |||||
let data = res.data | let data = res.data | ||||
if (data.couponList != null && data.couponList.length > 0){ | |||||
if (data.couponList != null && data.couponList.length > 0) { | |||||
data.couponList.map(item => { | data.couponList.map(item => { | ||||
if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { | if (item.salePriceStr && item.salePriceStr.indexOf('.') != -1) { | ||||
let str = item.salePriceStr.split('.') | let str = item.salePriceStr.split('.') | ||||
@@ -1032,13 +1074,13 @@ Page({ | |||||
} | } | ||||
}) | }) | ||||
} | } | ||||
if (topicType==2){ | |||||
if (topicType == 2) { | |||||
let tempData = data | let tempData = data | ||||
this.setData({ | this.setData({ | ||||
topicObj2:data | |||||
topicObj2: data | |||||
}) | }) | ||||
} else if (topicType == 3){ | |||||
} else if (topicType == 3) { | |||||
this.setData({ | this.setData({ | ||||
topicObj3: data | topicObj3: data | ||||
}) | }) | ||||
@@ -1056,9 +1098,9 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}).catch(err=>{ | |||||
}).catch(err => { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message ? err.message:err.data, | |||||
title: err.message ? err.message : err.data, | |||||
icon: 'none', | icon: 'none', | ||||
duration: 2000, | duration: 2000, | ||||
mask: false | mask: false | ||||
@@ -1168,7 +1210,7 @@ Page({ | |||||
}, | }, | ||||
//浮层广告 | //浮层广告 | ||||
getGg: function(token) { | getGg: function(token) { | ||||
let that = this | let that = this | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getGg, | url: config.api.getGg, | ||||
@@ -1208,14 +1250,14 @@ Page({ | |||||
*/ | */ | ||||
onPullDownRefresh: function(e) { | onPullDownRefresh: function(e) { | ||||
this.setData({ | this.setData({ | ||||
topicObj2: null,//欢乐城首页限时抢购 | |||||
topicObj3: null,//欢乐城首页砍价 | |||||
topicObj4: null,//欢乐城首页拼团 | |||||
topicObj5: null,//欢乐城首页消费卡 | |||||
topicObj6: null,//欢乐城首页积分商城 | |||||
topicObj2: null, //欢乐城首页限时抢购 | |||||
topicObj3: null, //欢乐城首页砍价 | |||||
topicObj4: null, //欢乐城首页拼团 | |||||
topicObj5: null, //欢乐城首页消费卡 | |||||
topicObj6: null, //欢乐城首页积分商城 | |||||
}) | }) | ||||
let that = this; | let that = this; | ||||
that.getWeapNote(); | |||||
// that.getWeapNote(); | |||||
that.setData({ | that.setData({ | ||||
page: 1 | page: 1 | ||||
}) | }) | ||||
@@ -1224,7 +1266,7 @@ Page({ | |||||
} else { | } else { | ||||
this.getWeapNote() | this.getWeapNote() | ||||
} | } | ||||
if (that.selectComponent("#lists")){ | |||||
if (that.selectComponent("#lists")) { | |||||
if (that.data.code == 0 || that.data.code == undefined) { | if (that.data.code == 0 || that.data.code == undefined) { | ||||
that.selectComponent("#lists").getList(0, 1, "refresh"); | that.selectComponent("#lists").getList(0, 1, "refresh"); | ||||
wx.stopPullDownRefresh(); | wx.stopPullDownRefresh(); | ||||
@@ -1234,14 +1276,14 @@ Page({ | |||||
}; | }; | ||||
that.selectComponent("#hot").getList(); | that.selectComponent("#hot").getList(); | ||||
} | } | ||||
// 砍价下拉刷新 | // 砍价下拉刷新 | ||||
// that.selectComponent("#bargain").getList(); | // that.selectComponent("#bargain").getList(); | ||||
// that.selectComponent("#spellGroup").getList(); | // that.selectComponent("#spellGroup").getList(); | ||||
// that.selectComponent("#rushtobyCard").getList(); | // that.selectComponent("#rushtobyCard").getList(); | ||||
wx.stopPullDownRefresh(); | wx.stopPullDownRefresh(); | ||||
//爆款专区下拉刷新 | //爆款专区下拉刷新 | ||||
that.getxsList(); | that.getxsList(); | ||||
that.topicShow(); | that.topicShow(); | ||||
}, | }, | ||||
@@ -1252,11 +1294,11 @@ Page({ | |||||
that.data.page++; | that.data.page++; | ||||
that.setData({ | that.setData({ | ||||
page: that.data.page, | page: that.data.page, | ||||
businePageNum: that.data.businePageNum+1 | |||||
businePageNum: that.data.businePageNum + 1 | |||||
}); | }); | ||||
console.log("加载更多页数" + that.data.page, ); | console.log("加载更多页数" + that.data.page, ); | ||||
console.log("加载更多key" + that.data.code); | console.log("加载更多key" + that.data.code); | ||||
if (that.data.mouldType==0){//富茂源模板 | |||||
if (that.data.mouldType == 0) { //富茂源模板 | |||||
//父组件获得子组件的方法 | //父组件获得子组件的方法 | ||||
//如果code == 0 | //如果code == 0 | ||||
if (that.data.code == 0 || that.data.code == undefined) { | if (that.data.code == 0 || that.data.code == undefined) { | ||||
@@ -1264,16 +1306,17 @@ Page({ | |||||
} else { | } else { | ||||
that.selectComponent("#lists").getList(that.data.code, that.data.page); | that.selectComponent("#lists").getList(that.data.code, that.data.page); | ||||
} | } | ||||
}else if(that.data.mouldType==1){ | |||||
} else if (that.data.mouldType == 1) { | |||||
this.getCouponChannelList(that.data.busineKye) | this.getCouponChannelList(that.data.busineKye) | ||||
} | } | ||||
}, | }, | ||||
// 用户点击右上角分享 | // 用户点击右上角分享 | ||||
onShareAppMessage: function() { | onShareAppMessage: function() { | ||||
app.globalData.previewFlag = true | app.globalData.previewFlag = true | ||||
return { | return { | ||||
path:"/pages/index/index", | |||||
path: "/pages/index/index", | |||||
title: this.data.weappShareTitle, | title: this.data.weappShareTitle, | ||||
imageUrl: this.data.weappShareCoverImg, | imageUrl: this.data.weappShareCoverImg, | ||||
success: function(res) { | success: function(res) { | ||||
@@ -142,7 +142,7 @@ | |||||
<open-data type="userNickName" style="font-size: 26rpx;color:#292723;"></open-data> | <open-data type="userNickName" style="font-size: 26rpx;color:#292723;"></open-data> | ||||
<!-- <image src="{{huanlechengImgurl+'home_ic_vip.png'}}" mode='widthFix'></image> --> | <!-- <image src="{{huanlechengImgurl+'home_ic_vip.png'}}" mode='widthFix'></image> --> | ||||
<view class="vgrade">{{levelName}}</view> | <view class="vgrade">{{levelName}}</view> | ||||
<view class="integralNum">积分:4554</view> | |||||
<view class="integralNum">积分:{{credit}}</view> | |||||
</view> | </view> | ||||
<view class="view" bindtap='gotoChengzhangzhi'> | <view class="view" bindtap='gotoChengzhangzhi'> | ||||
<progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | <progress percent="{{upgradePercent}}" stroke-width="6" activeColor="{{activeColor}}" /> | ||||
@@ -3,7 +3,11 @@ | |||||
page { | page { | ||||
background: #f4f5f9; | background: #f4f5f9; | ||||
} | } | ||||
.temp{ | |||||
width: 100rpx; | |||||
height: 100rpx; | |||||
background-color: darkcyan | |||||
} | |||||
.xia { | .xia { | ||||
width: 24rpx; | width: 24rpx; | ||||
height: 14rpx; | height: 14rpx; | ||||
@@ -1,4 +1,3 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | ||||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | ||||
let app = getApp(); | let app = getApp(); | ||||
@@ -20,7 +19,7 @@ Page({ | |||||
cheUrl: imgurl.che.url, | cheUrl: imgurl.che.url, | ||||
jiaofei: imgurl.jiaofei.url, | jiaofei: imgurl.jiaofei.url, | ||||
wentiHr: imgurl.wentiHr.url, | wentiHr: imgurl.wentiHr.url, | ||||
stopThat: imgurl.stopThat.url, | |||||
stopThat: imgurl.stopThat.url, | |||||
park: null, | park: null, | ||||
carList: [], | carList: [], | ||||
payList: [], | payList: [], | ||||
@@ -41,7 +40,7 @@ Page({ | |||||
canIUse: wx.canIUse("navigator"), | canIUse: wx.canIUse("navigator"), | ||||
showTicketModal: false, | showTicketModal: false, | ||||
ticketList: [], | ticketList: [], | ||||
noCoupon:imgurl.noCoupon.url, | |||||
noCoupon: imgurl.noCoupon.url, | |||||
loadingUrl: imgurl.loading.url, | loadingUrl: imgurl.loading.url, | ||||
allow_load: true, | allow_load: true, | ||||
curPageNum: 1, | curPageNum: 1, | ||||
@@ -51,21 +50,21 @@ Page({ | |||||
quanid: '', | quanid: '', | ||||
gouHr: imgurl.gouHr.url, | gouHr: imgurl.gouHr.url, | ||||
totalTicketNum: 0, | totalTicketNum: 0, | ||||
remark:'', | |||||
generalPayPath:'', | |||||
generalExtraData:{}, | |||||
remark: '', | |||||
generalPayPath: '', | |||||
generalExtraData: {}, | |||||
}, | }, | ||||
getMoreList(e) { | getMoreList(e) { | ||||
let totalNum = this.data.ticketList.length; | let totalNum = this.data.ticketList.length; | ||||
if (this.data.curPageNum < this.data.curTotalpageNum) { | if (this.data.curPageNum < this.data.curTotalpageNum) { | ||||
this.setData({ | this.setData({ | ||||
curPageNum: this.data.curPageNum+1 | |||||
curPageNum: this.data.curPageNum + 1 | |||||
}) | }) | ||||
this.getTicketList(0 ,this.data.curPageNum); | |||||
this.getTicketList(0, this.data.curPageNum); | |||||
} | } | ||||
}, | }, | ||||
/** | |||||
/** | |||||
* 选择使用的优惠券 | * 选择使用的优惠券 | ||||
*/ | */ | ||||
choicecoupon: function(e) { | choicecoupon: function(e) { | ||||
@@ -87,7 +86,7 @@ Page({ | |||||
} | } | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
/* | /* | ||||
*/ | */ | ||||
@@ -98,78 +97,77 @@ Page({ | |||||
title: "加载中" | title: "加载中" | ||||
}); | }); | ||||
Http.get({ | Http.get({ | ||||
url: config.api.couponOrderCarList, | |||||
data: { | |||||
pageNum: pageNum, | |||||
pageSize: 15, | |||||
couponOrderStatus: key | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
curTotalpageNum: res.data.pages, | |||||
curPageNum: res.data.pageNum, | |||||
totalTicketNum: res.data.total | |||||
}) | |||||
res.data.list.map(file => { | |||||
file.expiredTime = format.formatTime( | |||||
file.expiredTime, | |||||
"yyyy-MM-dd hh:mm:ss" | |||||
); | |||||
}); | |||||
setTimeout(function () { | |||||
wx.hideLoading(); | |||||
}, 1200); | |||||
if (pageNum >= res.data.pages) { | |||||
that.setData({ | |||||
allow_load: false | |||||
}); | |||||
} | |||||
/** | |||||
* 先赋值后渲染页面 | |||||
* concat 不会改变原数组值 | |||||
* push 会改变原数组值,但不会一条一条插入,而是整个数组插入 | |||||
*/ | |||||
if (pageNum == 1) { | |||||
that.setData({ | |||||
ticketList: res.data.list, | |||||
curPageNum: pageNum | |||||
}); | |||||
} else { | |||||
url: config.api.couponOrderCarList, | |||||
data: { | |||||
pageNum: pageNum, | |||||
pageSize: 15, | |||||
couponOrderStatus: key | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | that.setData({ | ||||
ticketList: that.data.ticketList.concat(res.data.list) | |||||
curTotalpageNum: res.data.pages, | |||||
curPageNum: res.data.pageNum, | |||||
totalTicketNum: res.data.total | |||||
}) | |||||
res.data.list.map(file => { | |||||
file.expiredTime = format.formatTime( | |||||
file.expiredTime, | |||||
"yyyy-MM-dd hh:mm:ss" | |||||
); | |||||
}); | }); | ||||
} | |||||
// that.data.ticketList = that.data.ticketList.concat(res.data.list); | |||||
wx.hideLoading(); | |||||
}) | |||||
.catch(err => { | |||||
setTimeout(function () { | |||||
setTimeout(function() { | |||||
wx.hideLoading(); | |||||
}, 1200); | |||||
if (pageNum >= res.data.pages) { | |||||
that.setData({ | |||||
allow_load: false | |||||
}); | |||||
} | |||||
/** | |||||
* 先赋值后渲染页面 | |||||
* concat 不会改变原数组值 | |||||
* push 会改变原数组值,但不会一条一条插入,而是整个数组插入 | |||||
*/ | |||||
if (pageNum == 1) { | |||||
that.setData({ | |||||
ticketList: res.data.list, | |||||
curPageNum: pageNum | |||||
}); | |||||
} else { | |||||
that.setData({ | |||||
ticketList: that.data.ticketList.concat(res.data.list) | |||||
}); | |||||
} | |||||
// that.data.ticketList = that.data.ticketList.concat(res.data.list); | |||||
wx.hideLoading(); | wx.hideLoading(); | ||||
}, 1200); | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} else { | |||||
} | |||||
}) | |||||
.catch(err => { | |||||
setTimeout(function() { | |||||
wx.hideLoading(); | |||||
}, 1200); | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
} else {} | |||||
}, | }, | ||||
//点击跳转到券详情页面 | //点击跳转到券详情页面 | ||||
gotouse: function (e) { | |||||
gotouse: function(e) { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/passCar/couponDetail/couponDetail?quancode=${ | url: `/pages/passCar/couponDetail/couponDetail?quancode=${ | ||||
e.currentTarget.dataset.quancode | e.currentTarget.dataset.quancode | ||||
}`, | }`, | ||||
success: function (res) { | |||||
success: function(res) { | |||||
// success | // success | ||||
}, | }, | ||||
fail: function () { | |||||
fail: function() { | |||||
// fail | // fail | ||||
}, | }, | ||||
complete: function () { | |||||
complete: function() { | |||||
// complete | // complete | ||||
} | } | ||||
}); | }); | ||||
@@ -177,7 +175,7 @@ Page({ | |||||
/** | /** | ||||
* 车牌轮播滑动 | * 车牌轮播滑动 | ||||
*/ | */ | ||||
onSlideChangeEnd: function (e) { | |||||
onSlideChangeEnd: function(e) { | |||||
var that = this; | var that = this; | ||||
/** | /** | ||||
* 获得当前的车牌号码 | * 获得当前的车牌号码 | ||||
@@ -195,7 +193,7 @@ Page({ | |||||
}, | }, | ||||
//停车费用为0 | //停车费用为0 | ||||
paySuccess: function () { | |||||
paySuccess: function() { | |||||
wx.showModal({ | wx.showModal({ | ||||
title: '支付成功', | title: '支付成功', | ||||
content: '请15分钟内离场', | content: '请15分钟内离场', | ||||
@@ -203,28 +201,28 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
gotomange: function () { | |||||
gotomange: function() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/managelicenseplate/managelicenseplate', | url: '/pages/managelicenseplate/managelicenseplate', | ||||
}) | }) | ||||
}, | }, | ||||
bindfail: function (res) { | |||||
bindfail: function(res) { | |||||
console.log(123) | console.log(123) | ||||
console.log(res) | console.log(res) | ||||
}, | }, | ||||
gotoCarMini: function (e) { | |||||
gotoCarMini: function(e) { | |||||
console.log(478) | console.log(478) | ||||
var that = this | var that = this | ||||
// etcp parkVendor1 | // etcp parkVendor1 | ||||
// 泊链停车 parkVendor5 | // 泊链停车 parkVendor5 | ||||
if (e.target.dataset.flag == 'parkVendor1'){ | |||||
if (e.target.dataset.flag == 'parkVendor1') { | |||||
wx.navigateToMiniProgram({ | wx.navigateToMiniProgram({ | ||||
appId: that.data.etcpAppId, | appId: that.data.etcpAppId, | ||||
extraData: that.data.extraData, | extraData: that.data.extraData, | ||||
envVersion: that.data.carMiniVersion, | envVersion: that.data.carMiniVersion, | ||||
path: that.data.payPath | path: that.data.payPath | ||||
}) | }) | ||||
} else if (e.target.dataset.flag == 'parkVendor5'){ | |||||
} else if (e.target.dataset.flag == 'parkVendor5') { | |||||
wx.navigateToMiniProgram({ | wx.navigateToMiniProgram({ | ||||
appId: that.data.bolinkAppId, | appId: that.data.bolinkAppId, | ||||
extraData: that.data.extraData, | extraData: that.data.extraData, | ||||
@@ -233,19 +231,19 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
showquan: function () { | |||||
showquan: function() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/passCar/couponList/couponList', | url: '/pages/passCar/couponList/couponList', | ||||
}) | }) | ||||
}, | }, | ||||
gotodetail: function (e) { | |||||
gotodetail: function(e) { | |||||
wx.showModal({ | wx.showModal({ | ||||
title: '缴费规则', | title: '缴费规则', | ||||
content: e.target.dataset.rule, | content: e.target.dataset.rule, | ||||
showCancel: false, | showCancel: false, | ||||
}) | }) | ||||
}, | }, | ||||
onShow: function (options) { | |||||
onShow: function(options) { | |||||
if (typeof this.getTabBar === 'function' && | if (typeof this.getTabBar === 'function' && | ||||
this.getTabBar()) { | this.getTabBar()) { | ||||
this.getTabBar().setData({ | this.getTabBar().setData({ | ||||
@@ -297,17 +295,17 @@ Page({ | |||||
addCar: null | addCar: null | ||||
}); | }); | ||||
} | } | ||||
this.getTicketList(0, 1); | this.getTicketList(0, 1); | ||||
}, | }, | ||||
cancelMove: function() { | cancelMove: function() { | ||||
console.log(111) | console.log(111) | ||||
return false; | return false; | ||||
}, | }, | ||||
onHide: function () { | |||||
onHide: function() { | |||||
this.setData({ | this.setData({ | ||||
allow_load: true, | allow_load: true, | ||||
showTicketModal: false, | showTicketModal: false, | ||||
@@ -315,7 +313,7 @@ Page({ | |||||
ticketList: [] | ticketList: [] | ||||
}) | }) | ||||
}, | }, | ||||
onLoad: function (options) { | |||||
onLoad: function(options) { | |||||
var that = this; | var that = this; | ||||
/** | /** | ||||
* 获得分享小程序的 | * 获得分享小程序的 | ||||
@@ -323,11 +321,11 @@ Page({ | |||||
* desc | * desc | ||||
*/ | */ | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
url: config.api.getWeapNote, | |||||
data: { | |||||
appId: config.weapp.AppId, | |||||
} | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
let weapNote = JSON.parse(res.data.weapNote); | let weapNote = JSON.parse(res.data.weapNote); | ||||
that.setData({ | that.setData({ | ||||
@@ -343,16 +341,16 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
scene: scene | scene: scene | ||||
}); | }); | ||||
if (app.globalData.token) { } else { | |||||
if (app.globalData.token) {} else { | |||||
// app.getLocation(); | // app.getLocation(); | ||||
that.userLogin() | that.userLogin() | ||||
} | } | ||||
}, | }, | ||||
/** | /** | ||||
* 用户登录 | * 用户登录 | ||||
*/ | */ | ||||
userLogin: function () { | |||||
userLogin: function() { | |||||
var that = this; | var that = this; | ||||
// 登录 | // 登录 | ||||
wx.login({ | wx.login({ | ||||
@@ -360,7 +358,7 @@ Page({ | |||||
code | code | ||||
}) => { | }) => { | ||||
wx.getSystemInfo({ | wx.getSystemInfo({ | ||||
success: function (res) { | |||||
success: function(res) { | |||||
that.setData({ | that.setData({ | ||||
systemInfo: JSON.stringify(res) | systemInfo: JSON.stringify(res) | ||||
}) | }) | ||||
@@ -385,9 +383,9 @@ Page({ | |||||
}; | }; | ||||
} | } | ||||
Http.post({ | Http.post({ | ||||
url: config.api.login, | |||||
data: usrdata | |||||
}) | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
app.globalData.token = res.data.token; | app.globalData.token = res.data.token; | ||||
Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
@@ -400,7 +398,7 @@ Page({ | |||||
data: {} | data: {} | ||||
}); | }); | ||||
}) | }) | ||||
.then(res => { }) | |||||
.then(res => {}) | |||||
.catch(err => { | .catch(err => { | ||||
if (err.code == 11004) { | if (err.code == 11004) { | ||||
// 用户昵称未授权 | // 用户昵称未授权 | ||||
@@ -421,33 +419,33 @@ Page({ | |||||
/** | /** | ||||
* 检查用户是否有车 | * 检查用户是否有车 | ||||
*/ | */ | ||||
checkUserCarStatus: function () { | |||||
checkUserCarStatus: function() { | |||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.userCarCount, | |||||
data: {} | |||||
}).then(res => { | |||||
if (res.data > 0) { | |||||
// 用户名下有车 | |||||
app.globalData.phone = res.data.phone; | |||||
app.globalData.supportCar = true; | |||||
// 共同登录 | |||||
that.userCarLogin(); | |||||
} | |||||
}) | |||||
.catch(err => { }) | |||||
url: config.api.userCarCount, | |||||
data: {} | |||||
}).then(res => { | |||||
if (res.data > 0) { | |||||
// 用户名下有车 | |||||
app.globalData.phone = res.data.phone; | |||||
app.globalData.supportCar = true; | |||||
// 共同登录 | |||||
that.userCarLogin(); | |||||
} | |||||
}) | |||||
.catch(err => {}) | |||||
}, | }, | ||||
jumpToAdd: function () { | |||||
jumpToAdd: function() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/addPark/addPark?flags=managepalte` | url: `/pages/addPark/addPark?flags=managepalte` | ||||
}); | }); | ||||
}, | }, | ||||
passc: function () { | |||||
passc: function() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/ques/ques', | url: '/pages/ques/ques', | ||||
}) | }) | ||||
}, | }, | ||||
goExplain: function () { | |||||
goExplain: function() { | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/tcExplain/tcExplain', | url: '/pages/tcExplain/tcExplain', | ||||
}) | }) | ||||
@@ -457,14 +455,14 @@ Page({ | |||||
/** | /** | ||||
* 券绑定车牌 | * 券绑定车牌 | ||||
*/ | */ | ||||
bindCoupon: function (quanid,quantitle) { | |||||
bindCoupon: function(quanid, quantitle) { | |||||
wx.showLoading({ | wx.showLoading({ | ||||
title: '使用中...', | title: '使用中...', | ||||
}) | }) | ||||
var that = this; | var that = this; | ||||
/** | /** | ||||
* etcp | * etcp | ||||
*/ | |||||
*/ | |||||
var postCouponData = { | var postCouponData = { | ||||
etcpToken: app.globalData.etcpToken, | etcpToken: app.globalData.etcpToken, | ||||
carNumber: that.data.listCardNum, | carNumber: that.data.listCardNum, | ||||
@@ -476,7 +474,7 @@ Page({ | |||||
carNumber: that.data.listCardNum | carNumber: that.data.listCardNum | ||||
} | } | ||||
} | } | ||||
if (app.globalData.parkVendor == 4){ | |||||
if (app.globalData.parkVendor == 4) { | |||||
// 尚安 | // 尚安 | ||||
postCouponData = { | postCouponData = { | ||||
carNumber: that.data.listCardNum, | carNumber: that.data.listCardNum, | ||||
@@ -491,7 +489,7 @@ Page({ | |||||
couponOrderId: quanid | couponOrderId: quanid | ||||
} | } | ||||
} | } | ||||
if (app.globalData.parkVendor>=6){ | |||||
if (app.globalData.parkVendor >= 6) { | |||||
console.log(123456789) | console.log(123456789) | ||||
postCouponData = { | postCouponData = { | ||||
carNumber: that.data.listCardNum, | carNumber: that.data.listCardNum, | ||||
@@ -501,30 +499,30 @@ Page({ | |||||
} | } | ||||
} | } | ||||
Http.post({ | Http.post({ | ||||
url: config.api.getCarCoupon, | |||||
data: postCouponData | |||||
}) | |||||
url: config.api.getCarCoupon, | |||||
data: postCouponData | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
wx.hideLoading() | wx.hideLoading() | ||||
// if(res.data){ | // if(res.data){ | ||||
that.getStopFee(that.data.listCardNum); | |||||
that.initUsrCarList(); | |||||
that.setData({ | |||||
quantitle: quantitle,//接口条用成功后在赋值 | |||||
}) | |||||
that.getStopFee(that.data.listCardNum); | |||||
that.initUsrCarList(); | |||||
that.setData({ | |||||
quantitle: quantitle, //接口条用成功后在赋值 | |||||
}) | |||||
// }else{ | // }else{ | ||||
// wx.showToast({ | |||||
// title: res.message, | |||||
// icon: 'none', | |||||
// duration: 3000, | |||||
// mask: false | |||||
// }); | |||||
// wx.showToast({ | |||||
// title: res.message, | |||||
// icon: 'none', | |||||
// duration: 3000, | |||||
// mask: false | |||||
// }); | |||||
// } | // } | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
wx.hideLoading() | wx.hideLoading() | ||||
if (err.message!=undefined) { | |||||
if (err.message != undefined) { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | title: err.message, | ||||
icon: 'none', | icon: 'none', | ||||
@@ -532,7 +530,7 @@ Page({ | |||||
mask: false | mask: false | ||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
@@ -551,7 +549,7 @@ Page({ | |||||
// } | // } | ||||
// }, | // }, | ||||
closeTicketModal: function () { | |||||
closeTicketModal: function() { | |||||
this.setData({ | this.setData({ | ||||
showTicketModal: false | showTicketModal: false | ||||
}) | }) | ||||
@@ -559,7 +557,7 @@ Page({ | |||||
/** | /** | ||||
* 停车券 弹框 | * 停车券 弹框 | ||||
*/ | */ | ||||
openTicketModal: function () { | |||||
openTicketModal: function() { | |||||
this.setData({ | this.setData({ | ||||
showTicketModal: true, | showTicketModal: true, | ||||
allow_load: true, | allow_load: true, | ||||
@@ -571,24 +569,24 @@ Page({ | |||||
/* if (!this.data.ticketList.length){ | /* if (!this.data.ticketList.length){ | ||||
this.getTicketList(0, 1); | this.getTicketList(0, 1); | ||||
} */ | } */ | ||||
}, | }, | ||||
//获取名下停车券列表 | //获取名下停车券列表 | ||||
getList() { | getList() { | ||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.couponOrderCarList + "?type=5&couponOrderStatus=0", | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 15, | |||||
couponOrderStatus: 0 | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
couponList: res.data.list | |||||
}); | |||||
}) | |||||
url: config.api.couponOrderCarList + "?type=5&couponOrderStatus=0", | |||||
data: { | |||||
pageNum: 1, | |||||
pageSize: 15, | |||||
couponOrderStatus: 0 | |||||
} | |||||
}).then(res => { | |||||
that.setData({ | |||||
couponList: res.data.list | |||||
}); | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
console.log(err) | console.log(err) | ||||
}) | }) | ||||
@@ -598,61 +596,83 @@ Page({ | |||||
/** | /** | ||||
* 共同登录 | * 共同登录 | ||||
*/ | */ | ||||
init: function (carNumber) { | |||||
init: function(carNumber) { | |||||
var that = this; | var that = this; | ||||
app.parkInitCallback = token => { | app.parkInitCallback = token => { | ||||
that.initPark(); | that.initPark(); | ||||
that.getParkStatus(); | that.getParkStatus(); | ||||
if (!app.globalData.carLogin) { | if (!app.globalData.carLogin) { | ||||
/** | |||||
* 判断是否授权手机号 | |||||
*/ | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | |||||
url: config.api.checkUserStatus, | |||||
data: {} | data: {} | ||||
}) | |||||
.then(res => { | |||||
Http.post({ | |||||
url: config.api.carInit, | |||||
data: { | |||||
phone: app.globalData.phone | |||||
} | |||||
}).then(res => { | |||||
app.globalData.carLogin = true; | |||||
app.globalData.parkVendor = res.data.vendor; | |||||
if (res.data.token) { | |||||
app.globalData.etcpToken = res.data.token; | |||||
}).then(res => { | |||||
app.globalData.type = 'pc' | |||||
/** | |||||
* 判断是否授权手机号 | |||||
*/ | |||||
Http.get({ | |||||
url: config.api.checkPhoneStatus, | |||||
data: {} | |||||
}) | |||||
.then(res => { | |||||
Http.post({ | |||||
url: config.api.carInit, | |||||
data: { | |||||
phone: app.globalData.phone | |||||
} | |||||
}).then(res => { | |||||
app.globalData.carLogin = true; | |||||
app.globalData.parkVendor = res.data.vendor; | |||||
if (res.data.token) { | |||||
app.globalData.etcpToken = res.data.token; | |||||
} | |||||
/** | |||||
* 获得停车费用 | |||||
*/ | |||||
that.initUsrCarList("flags"); | |||||
}); | |||||
}) | |||||
.catch(err => { | |||||
if (err.code == 11005) { | |||||
// 用户手机未授权 | |||||
/** | |||||
* 将值传到用户手机号授权的页面 | |||||
* | |||||
*/ | |||||
wx.redirectTo({ | |||||
url: "/pages/getphoneInfo/index" | |||||
}); | |||||
} else if (err.code == 11006) { | |||||
// 用户手机已加密 | |||||
wx.redirectTo({ | |||||
url: "/pages/phoneinput/phoneinput" | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | } | ||||
/** | |||||
* 获得停车费用 | |||||
*/ | |||||
that.initUsrCarList("flags"); | |||||
}) | |||||
}).catch(err => { | |||||
app.globalData.type = 'pc' | |||||
if (err.code == 11004) { | |||||
// 用户昵称未授权 | |||||
wx.redirectTo({ | |||||
url: "/pages/getuserinfo/index" | |||||
}); | }); | ||||
}) | |||||
.catch(err => { | |||||
if (err.code == 11005) { | |||||
// 用户手机未授权 | |||||
/** | |||||
* 将值传到用户手机号授权的页面 | |||||
* | |||||
*/ | |||||
wx.redirectTo({ | |||||
url: "/pages/getphoneInfo/index" | |||||
}); | |||||
} else if (err.code == 11006) { | |||||
// 用户手机已加密 | |||||
wx.redirectTo({ | |||||
url: "/pages/phoneinput/phoneinput" | |||||
}); | |||||
} else { | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | |||||
} else { | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.errMsg, | |||||
showCancel: false | |||||
}) | |||||
} | |||||
}); | |||||
} | } | ||||
}; | }; | ||||
if (app.globalData.token && app.globalData.token != null) { | if (app.globalData.token && app.globalData.token != null) { | ||||
@@ -660,7 +680,7 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
bindCar: function (carNum) { | |||||
bindCar: function(carNum) { | |||||
var that = this; | var that = this; | ||||
// ETCP | // ETCP | ||||
var etcpData = { | var etcpData = { | ||||
@@ -672,9 +692,9 @@ Page({ | |||||
}; | }; | ||||
var postData = app.globalData.parkVendor == 1 ? etcpData : otherData; | var postData = app.globalData.parkVendor == 1 ? etcpData : otherData; | ||||
Http.post({ | Http.post({ | ||||
url: config.api.bindCar, | |||||
data: postData | |||||
}) | |||||
url: config.api.bindCar, | |||||
data: postData | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
that.setData({ | that.setData({ | ||||
addCar: null | addCar: null | ||||
@@ -684,7 +704,7 @@ Page({ | |||||
title: "提示", | title: "提示", | ||||
showCancel: false, | showCancel: false, | ||||
content: "绑车牌成功!", | content: "绑车牌成功!", | ||||
success: function () { } | |||||
success: function() {} | |||||
}); | }); | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
@@ -692,24 +712,24 @@ Page({ | |||||
title: "提示", | title: "提示", | ||||
showCancel: false, | showCancel: false, | ||||
content: error.data.message, | content: error.data.message, | ||||
success: function () { } | |||||
success: function() {} | |||||
}); | }); | ||||
}); | }); | ||||
}, | }, | ||||
/** | /** | ||||
* 车场信息获取 | * 车场信息获取 | ||||
*/ | */ | ||||
initPark: function () { | |||||
initPark: function() { | |||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getParkInfo, | |||||
data: {} | |||||
}) | |||||
url: config.api.getParkInfo, | |||||
data: {} | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
that.setData({ | that.setData({ | ||||
park: res.data | park: res.data | ||||
}) | }) | ||||
if (res.data){ | |||||
if (res.data) { | |||||
app.globalData.parkVendor = res.data.vendorType; | app.globalData.parkVendor = res.data.vendorType; | ||||
if (app.globalData.parkVendor == 1) { | if (app.globalData.parkVendor == 1) { | ||||
console.log("payPath: " + extConfig.attr.car.etcp.payPath) | console.log("payPath: " + extConfig.attr.car.etcp.payPath) | ||||
@@ -759,11 +779,11 @@ Page({ | |||||
/** | /** | ||||
* 车场状态获取 | * 车场状态获取 | ||||
*/ | */ | ||||
getParkStatus: function () { | |||||
getParkStatus: function() { | |||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getParkStatus, | |||||
}) | |||||
url: config.api.getParkStatus, | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
console.log(res) | console.log(res) | ||||
}) | }) | ||||
@@ -780,30 +800,30 @@ Page({ | |||||
/** | /** | ||||
* 绑定车获取 | * 绑定车获取 | ||||
*/ | */ | ||||
initUsrCarList: function (flag) { | |||||
initUsrCarList: function(flag) { | |||||
var that = this; | var that = this; | ||||
Http.get({ | Http.get({ | ||||
url: config.api.getUserCarList, | |||||
data: {} | |||||
}).then(res => { | |||||
that.setData({ | |||||
carList: res.data | |||||
}); | |||||
/** | |||||
* flag ==flags | |||||
* 表示从首页onShow进来的 | |||||
*/ | |||||
if (flag == "flags" && res.data.length > 0) { | |||||
var listCardNum = res.data[0].carNumber; | |||||
url: config.api.getUserCarList, | |||||
data: {} | |||||
}).then(res => { | |||||
that.setData({ | that.setData({ | ||||
listCardNum: listCardNum | |||||
}) | |||||
carList: res.data | |||||
}); | |||||
/** | /** | ||||
* 获得停车费用 | |||||
* flag ==flags | |||||
* 表示从首页onShow进来的 | |||||
*/ | */ | ||||
that.getStopFee(listCardNum); | |||||
} | |||||
}) | |||||
if (flag == "flags" && res.data.length > 0) { | |||||
var listCardNum = res.data[0].carNumber; | |||||
that.setData({ | |||||
listCardNum: listCardNum | |||||
}) | |||||
/** | |||||
* 获得停车费用 | |||||
*/ | |||||
that.getStopFee(listCardNum); | |||||
} | |||||
}) | |||||
.catch(err => { | .catch(err => { | ||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | title: err.message, | ||||
@@ -817,22 +837,22 @@ Page({ | |||||
/** | /** | ||||
* 获得停车费用修改 | * 获得停车费用修改 | ||||
*/ | */ | ||||
getStopFee: function (carNumber) { | |||||
getStopFee: function(carNumber) { | |||||
let that = this; | let that = this; | ||||
let postData = | let postData = | ||||
app.globalData.parkVendor == 1 ? { | app.globalData.parkVendor == 1 ? { | ||||
etcpToken: app.globalData.etcpToken, | etcpToken: app.globalData.etcpToken, | ||||
carNumber: carNumber | carNumber: carNumber | ||||
} : { | } : { | ||||
carNumber: carNumber | |||||
}; | |||||
carNumber: carNumber | |||||
}; | |||||
Http.post({ | Http.post({ | ||||
url: config.api.getCarStopFee, | |||||
data: postData | |||||
}) | |||||
url: config.api.getCarStopFee, | |||||
data: postData | |||||
}) | |||||
.then(res => { | .then(res => { | ||||
console.log(res) | console.log(res) | ||||
if(app.globalData.parkVendor == 1){ // ETCP | |||||
if (app.globalData.parkVendor == 1) { // ETCP | |||||
var extraDataStr = { | var extraDataStr = { | ||||
params: { | params: { | ||||
token: app.globalData.etcpToken, | token: app.globalData.etcpToken, | ||||
@@ -887,7 +907,7 @@ Page({ | |||||
}, | }, | ||||
timecha: res.data.duration | timecha: res.data.duration | ||||
}); | }); | ||||
}else{ | |||||
} else { | |||||
// var extraDataStr = { | // var extraDataStr = { | ||||
// params: { | // params: { | ||||
// token: app.globalData.etcpToken, | // token: app.globalData.etcpToken, | ||||
@@ -897,7 +917,7 @@ Page({ | |||||
// returnUrl: that.data.etcpCallbackUrl, | // returnUrl: that.data.etcpCallbackUrl, | ||||
// source: "FUMAO-001", | // source: "FUMAO-001", | ||||
// actionId: "1",//操作ID,1:小程序支付 | // actionId: "1",//操作ID,1:小程序支付 | ||||
// }, | // }, | ||||
// } | // } | ||||
that.setData({ | that.setData({ | ||||
@@ -906,13 +926,13 @@ Page({ | |||||
stopFees: res.data, | stopFees: res.data, | ||||
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime), | timecha: Util.timecha(res.data.exitTime, res.data.entranceTime), | ||||
remark: res.data.remark, | remark: res.data.remark, | ||||
generalAppId:res.data.appId, | |||||
generalAppId: res.data.appId, | |||||
generalPayPath: res.data.payPath, | generalPayPath: res.data.payPath, | ||||
generalExtraData: res.data.extraData, | generalExtraData: res.data.extraData, | ||||
extraDataFlag: JSON.stringify(res.data.extraData), | extraDataFlag: JSON.stringify(res.data.extraData), | ||||
}); | }); | ||||
console.log( that.data.extraDataFlag,"123456789") | |||||
console.log(that.data.extraDataFlag, "123456789") | |||||
} | } | ||||
that.setData({ | that.setData({ | ||||
@@ -930,11 +950,11 @@ Page({ | |||||
/** | /** | ||||
* 下拉刷新 | * 下拉刷新 | ||||
*/ | */ | ||||
onPullDownRefresh: function (e) { | |||||
onPullDownRefresh: function(e) { | |||||
let that = this; | let that = this; | ||||
that.initUsrCarList("flags"); | that.initUsrCarList("flags"); | ||||
that.setData({ | that.setData({ | ||||
current:0 | |||||
current: 0 | |||||
}) | }) | ||||
wx.stopPullDownRefresh(); | wx.stopPullDownRefresh(); | ||||
} | } |
@@ -62,6 +62,18 @@ Page({ | |||||
appVersion: "", | appVersion: "", | ||||
placeholder: '' | placeholder: '' | ||||
}, | }, | ||||
suerService() { | |||||
console.log("打开客服") | |||||
wx.openCustomerServiceChat({ | |||||
extInfo: { url: 'https://work.weixin.qq.com/kfid/kfc7f4a755cbb51fa99' }, | |||||
corpId: 'wwdc116b631d3ea35f', | |||||
success(res) { }, | |||||
fail(res) { | |||||
console.log(res); | |||||
} | |||||
}) | |||||
}, | |||||
checkUserStatus() { | checkUserStatus() { | ||||
let that = this; | let that = this; | ||||
Http.get({ | Http.get({ | ||||
@@ -110,6 +122,7 @@ Page({ | |||||
}).then(res => { | }).then(res => { | ||||
this.ifPhoneInfo() | this.ifPhoneInfo() | ||||
}).catch(err => { | }).catch(err => { | ||||
app.globalData.type = 'uc' | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/getuserinfo/index`, | url: `/pages/getuserinfo/index`, | ||||
}) | }) | ||||
@@ -136,6 +136,12 @@ | |||||
<view class="particulars_go">></view> | <view class="particulars_go">></view> | ||||
</view> | </view> | ||||
</navigator> | </navigator> | ||||
<!-- <view bindtap="suerService"> | |||||
<view class="particulars_list"> | |||||
<view class="particulars_name">联系客服</view> | |||||
<view class="particulars_go">></view> | |||||
</view> | |||||
</view> --> | |||||
<navigator url="/pages/complaint/complaint" open-type="navigate"> | <navigator url="/pages/complaint/complaint" open-type="navigate"> | ||||
<view class="particulars_list"> | <view class="particulars_list"> | ||||
<view class="particulars_name">投诉建议</view> | <view class="particulars_name">投诉建议</view> | ||||
@@ -1190,6 +1190,7 @@ Page({ | |||||
var eData = options.target.dataset.id; | var eData = options.target.dataset.id; | ||||
shareObj.path = `/pages/index/index?couponChannelId=${eData}&frommd=JC`; | shareObj.path = `/pages/index/index?couponChannelId=${eData}&frommd=JC`; | ||||
} | } | ||||
console.log(shareObj) | |||||
// 返回shareObj | // 返回shareObj | ||||
return shareObj; | return shareObj; | ||||
}, | }, | ||||
@@ -7,7 +7,7 @@ let app = getApp(); | |||||
Page({ | Page({ | ||||
/** | /** | ||||
* 页面的初始数据 | |||||
* 页面的初始数据 | |||||
*/ | */ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
@@ -17,7 +17,8 @@ Page({ | |||||
list: [], | list: [], | ||||
childUrl: config.api.activityDey, | childUrl: config.api.activityDey, | ||||
startDate:'', | startDate:'', | ||||
endDate:'' | |||||
endDate:'', | |||||
mouldType:0 | |||||
}, | }, | ||||
goActivity(e){ | goActivity(e){ | ||||
let id = e.currentTarget.dataset.id | let id = e.currentTarget.dataset.id | ||||
@@ -97,6 +98,9 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
this.setData({ | |||||
mouldType: app.globalData.mouldType, | |||||
}) | |||||
this.setActivityCalendar(this.data.startDate, this.data.endDate) | this.setActivityCalendar(this.data.startDate, this.data.endDate) | ||||
}, | }, | ||||
@@ -2,7 +2,7 @@ | |||||
<view style="height:{{navigationBarHeight}} "></view> | <view style="height:{{navigationBarHeight}} "></view> | ||||
<detelsit allFlag="true" bind:setDate="getDate" childUrl="{{childUrl}}" activityStyle=" color:red"></detelsit> | <detelsit allFlag="true" bind:setDate="getDate" childUrl="{{childUrl}}" activityStyle=" color:red"></detelsit> | ||||
<view class="activityBox" wx:for="{{list}}" wx:key="index" bindtap="goActivity" data-id="{{item.id}}"> | <view class="activityBox" wx:for="{{list}}" wx:key="index" bindtap="goActivity" data-id="{{item.id}}"> | ||||
<image class="activity" src="{{item.coverImg}}"></image> | |||||
<image class="activity" src="{{item.coverImg}}" style="{{mouldType==1?'height:360rpx;':''}}"></image> | |||||
<view class="title">{{item.title}}</view> | <view class="title">{{item.title}}</view> | ||||
<view class="text" wx:if="{{item.activityType==1}}">报名时间:{{item.startTime}}至{{item.endTime}}</view> | <view class="text" wx:if="{{item.activityType==1}}">报名时间:{{item.startTime}}至{{item.endTime}}</view> | ||||
<view class="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | <view class="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | ||||
@@ -1 +1 @@ | |||||
<web-view src="{{url}}" bindmessage="bindGetMsg"></web-view> | |||||
<web-view src="{{url}}" bindmessage="bindGetMsg"></web-view> |
@@ -12,24 +12,27 @@ Page({ | |||||
signActivity: "", | signActivity: "", | ||||
mineFlag: null, | mineFlag: null, | ||||
skipUrl: 0, | skipUrl: 0, | ||||
fillIndentId:"", | |||||
couponId:"", | |||||
fillIndentId: "", | |||||
couponId: "", | |||||
// skip: app.globalData.skip | // skip: app.globalData.skip | ||||
}, | }, | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
var that = this; | var that = this; | ||||
console.log(options.skipUrl, "options.skipUrl") | console.log(options.skipUrl, "options.skipUrl") | ||||
that.setData({ | |||||
skipUrl: options.skipUrl | |||||
}) | |||||
if (options.skipUrl) { | |||||
that.setData({ | |||||
skipUrl: options.skipUrl | |||||
}) | |||||
} | |||||
that.setData({ | that.setData({ | ||||
path: options.path | path: options.path | ||||
}) | }) | ||||
that.setData({ | that.setData({ | ||||
paramData: options | paramData: options | ||||
}) | }) | ||||
if (options && options.fillIndentId && options.couponId){ | |||||
if (options && options.fillIndentId && options.couponId) { | |||||
that.setData({ | that.setData({ | ||||
fillIndentId: options.fillIndentId, | fillIndentId: options.fillIndentId, | ||||
couponId: options.couponId | couponId: options.couponId | ||||
@@ -41,7 +44,7 @@ Page({ | |||||
}); | }); | ||||
} | } | ||||
if (options && options.mineFlag) { | |||||
if (options && options.mineFlag) { | |||||
that.setData({ | that.setData({ | ||||
mineFlag: options.mineFlag | mineFlag: options.mineFlag | ||||
}) | }) | ||||
@@ -74,6 +77,34 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
onShow: function() { | |||||
wx.checkSession({ | |||||
success() { | |||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
}, | |||||
fail() { | |||||
// session_key 已经失效,需要重新执行登录流程 | |||||
console.log("session_key 过期") | |||||
wx.login({ | |||||
success: (res) => { | |||||
if (res.code) { | |||||
let usrdata = { | |||||
appId: config.weapp.AppId, | |||||
code: res.code, | |||||
} | |||||
Http.post({ | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}).then(res => { | |||||
Http.setToken(res.data.token); | |||||
app.globalData.token = res.data.token; | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
backHome: function() { | backHome: function() { | ||||
wx.switchTab({ | wx.switchTab({ | ||||
url: '/index/index', | url: '/index/index', | ||||
@@ -84,137 +115,135 @@ Page({ | |||||
var iv = e.detail.iv; | var iv = e.detail.iv; | ||||
var encryptedData = e.detail.encryptedData; | var encryptedData = e.detail.encryptedData; | ||||
Http.post({ | Http.post({ | ||||
url: config.api.getUserPhone, | |||||
data: { | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | |||||
}).then(res => { | |||||
app.globalData.phone = res.data.phone; | |||||
if (that.data.skipUrl == '1') { | |||||
console.log(app.globalData.skip,app.globalData.skipUrl,"跳转地址" ) | |||||
if (app.globalData.skip == 'redirectTo') { | |||||
wx.redirectTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'navigateTo') { | |||||
wx.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'reLaunch') { | |||||
wx.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} else if (app.globalData.skip == 'switchTab') { | |||||
wx.switchTab({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | |||||
} | |||||
} | |||||
//线上配送 | |||||
if(that.data.path == "fi"){ | |||||
wx.redirectTo({ | |||||
url: `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}` | |||||
}) | |||||
} | |||||
// 来着问卷 | |||||
if (that.data.path =="wj"){ | |||||
url: config.api.getUserPhone, | |||||
data: { | |||||
encryptedData: encryptedData, | |||||
iv: iv | |||||
} | |||||
}).then(res => { | |||||
// debugger | |||||
app.globalData.phone = res.data.phone; | |||||
if (that.data.skipUrl == '1') { | |||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||||
if (app.globalData.skip == 'redirectTo') { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/**a | |||||
* 来自我的 | |||||
*/ | |||||
if (that.data.path == 'main') { | |||||
wx.switchTab({ | |||||
url: `/index/user` | |||||
} else if (app.globalData.skip == 'navigateTo') { | |||||
wx.navigateTo({ | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/** | |||||
* 来自积分兑换 | |||||
*/ | |||||
if (that.data.path == 'jifen') { | |||||
wx.redirectTo({ | |||||
url: `/pages/integralmall/payIntegcoupondetail/index?couponChannelId=${that.data.paramData.couponChannelId}&couponId=${that.data.paramData.couponId}` | |||||
} else if (app.globalData.skip == 'reLaunch') { | |||||
wx.reLaunch({ | |||||
url: app.globalData.skipUrl, | |||||
}) | }) | ||||
return; | return; | ||||
} | |||||
/** | |||||
* 来自拼团详情 | |||||
*/ | |||||
if (that.data.path == 'spell') { | |||||
if (that.data.paramData.avatarUrl) { | |||||
wx.redirectTo({ | |||||
url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}` | |||||
}) | |||||
} else { | |||||
wx.redirectTo({ | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}` | |||||
}) | |||||
} | |||||
} else if (app.globalData.skip == 'switchTab') { | |||||
wx.switchTab({ | |||||
url: app.globalData.skipUrl, | |||||
}) | |||||
return; | return; | ||||
} | } | ||||
/** | |||||
* fromId若存在来自卡转赠 | |||||
*/ | |||||
if (that.data.path == 'index' && !that.data.paramData.cuserId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, | |||||
}) | |||||
} else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||||
} | |||||
//线上配送 | |||||
if (that.data.path == "fi") { | |||||
wx.redirectTo({ | |||||
url: `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}` | |||||
}) | |||||
} | |||||
// 来着问卷 | |||||
if (that.data.path == "wj") { | |||||
wx.redirectTo({ | |||||
url: `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
}) | |||||
return; | |||||
} | |||||
/**a | |||||
* 来自我的 | |||||
*/ | |||||
if (that.data.path == 'main') { | |||||
wx.switchTab({ | |||||
url: `/index/user` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自积分兑换 | |||||
*/ | |||||
if (that.data.path == 'jifen') { | |||||
wx.redirectTo({ | |||||
url: `/pages/integralmall/payIntegcoupondetail/index?couponChannelId=${that.data.paramData.couponChannelId}&couponId=${that.data.paramData.couponId}` | |||||
}) | |||||
return; | |||||
} | |||||
/** | |||||
* 来自拼团详情 | |||||
*/ | |||||
if (that.data.path == 'spell') { | |||||
if (that.data.paramData.avatarUrl) { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
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 | |||||
url: `/pages/joinFrDpell/index?couponId=${that.data.paramData.couponId}&orderGroupId=${that.data.paramData.orderGroupId}&couponChannelId=${that.data.paramData.couponChannelId}&orderId=${that.data.paramData.orderId}&avatarUrl=${that.data.paramData.avatarUrl}&nickName=${that.data.paramData.nickName}` | |||||
}) | }) | ||||
} | |||||
/** | |||||
* 活动报名 | |||||
*/ | |||||
else if (that.data.signActivity) { | |||||
} else { | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | |||||
url: `/pages/spellGroup/mySpellGroup/index?couponId=${that.data.paramData.couponId}&couponChannelId=${that.data.paramData.couponChannelId}` | |||||
}) | }) | ||||
} else if (that.data.mineFlag == 'mine') { | |||||
wx.switchTab({ | |||||
url: '/index/user' | |||||
}); | |||||
} else if (that.data.mineFlag == 'index'){ | |||||
wx.switchTab({ | |||||
url: '/index/index' | |||||
}); | |||||
}else { | |||||
wx.showToast({ | |||||
title: res.data.msg, | |||||
icon: "success", | |||||
success: function(res) { | |||||
if (that.data.couponChannelId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||||
}) | |||||
} else { | |||||
wx.switchTab({ | |||||
url: '/index/passCar', | |||||
}) | |||||
} | |||||
} | |||||
}); | |||||
} | } | ||||
}) | |||||
.catch(err => { | |||||
return; | |||||
} | |||||
/** | |||||
* fromId若存在来自卡转赠 | |||||
*/ | |||||
if (that.data.path == 'index' && !that.data.paramData.cuserId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/game/index?url=" + that.data.paramData.url + "&id=" + that.data.paramData.id + "&gameId=" + that.data.paramData.gameId, | |||||
}) | |||||
} else if (that.data.path == 'index' && that.data.paramData.cuserId) { | |||||
wx.redirectTo({ | |||||
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 if (that.data.signActivity) { | |||||
wx.redirectTo({ | |||||
url: `/pages/radetail/joinActivity/edit?activityId=${that.data.signActivity}` | |||||
}) | |||||
} else if (that.data.mineFlag == 'mine') { | |||||
wx.switchTab({ | |||||
url: '/index/user' | |||||
}); | |||||
} else if (that.data.mineFlag == 'index') { | |||||
wx.switchTab({ | |||||
url: '/index/index' | |||||
}); | |||||
} else { | |||||
wx.showToast({ | wx.showToast({ | ||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
title: res.data.msg, | |||||
icon: "success", | |||||
success: function(res) { | |||||
if (that.data.couponChannelId) { | |||||
wx.redirectTo({ | |||||
url: "/pages/coupon/detail/index?couponChannelId=" + that.data.couponChannelId + "&flag=pay" | |||||
}) | |||||
} else { | |||||
wx.switchTab({ | |||||
url: '/index/passCar', | |||||
}) | |||||
} | |||||
} | |||||
}); | }); | ||||
}) | |||||
} | |||||
} | |||||
}).catch(err => { | |||||
wx.showToast({ | |||||
title: err.message, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | |||||
}); | }); |
@@ -15,8 +15,11 @@ Page({ | |||||
fromflag: '', | fromflag: '', | ||||
couponChannelIdflag: '', | couponChannelIdflag: '', | ||||
wjId: "", | wjId: "", | ||||
composeOrderType:"", | |||||
fillIndentId: "", | |||||
composeOrderType: "", | |||||
fillIndentId: "", | |||||
url:null,//游戏路径 | |||||
id:null,//游戏id, | |||||
gameId: null,//游戏gameId | |||||
}, | }, | ||||
//是否授权手机号 | //是否授权手机号 | ||||
judgePhonelngo() { | judgePhonelngo() { | ||||
@@ -47,25 +50,35 @@ Page({ | |||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: `/pages/getphoneInfo/index?skipUrl=1` | url: `/pages/getphoneInfo/index?skipUrl=1` | ||||
}); | }); | ||||
}) | |||||
}) | |||||
}, | }, | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||||
console.log(app.globalData.skip, app.globalData.skipUrl, app.globalData.type, "跳转地址") | |||||
var that = this; | var that = this; | ||||
// options.fromflag == 'coupondetail'; | // options.fromflag == 'coupondetail'; | ||||
// 游戏页面 | |||||
if (options && options.url && options.id && options.gameId){ | |||||
that.setData({ | |||||
url: options.url,//游戏路径 | |||||
id: options.id,//游戏id, | |||||
gameId: options.gameId,//游戏gameId | |||||
}) | |||||
} | |||||
// 来自优惠券详情页面 | // 来自优惠券详情页面 | ||||
if (options && options.fromflag) { | if (options && options.fromflag) { | ||||
that.setData({ | that.setData({ | ||||
fromflag: options.fromflag | fromflag: options.fromflag | ||||
}) | }) | ||||
} | |||||
if (options && options.composeOrderType){ | |||||
} | |||||
if (options && options.composeOrderType) { | |||||
that.setData({ | that.setData({ | ||||
composeOrderType: options.composeOrderType | composeOrderType: options.composeOrderType | ||||
}) | }) | ||||
} | } | ||||
//线上配送 填写订单 | //线上配送 填写订单 | ||||
if (options && options.fillIndentId && couponId && options.couponId){ | |||||
if (options && options.fillIndentId && couponId && options.couponId) { | |||||
that.setData({ | that.setData({ | ||||
fillIndentId: options.fillIndentId, | fillIndentId: options.fillIndentId, | ||||
couponId: options.couponId | couponId: options.couponId | ||||
@@ -152,248 +165,45 @@ Page({ | |||||
}); | }); | ||||
}) | }) | ||||
}, | }, | ||||
onShow: function() { | |||||
wx.checkSession({ | |||||
success() { | |||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
}, | |||||
fail() { | |||||
console.log("session_key 过期") | |||||
// session_key 已经失效,需要重新执行登录流程 | |||||
wx.login({ | |||||
success: (res) => { | |||||
if (res.code) { | |||||
let usrdata = { | |||||
appId: config.weapp.AppId, | |||||
code: res.code, | |||||
} | |||||
Http.post({ | |||||
url: config.api.login, | |||||
data: usrdata | |||||
}).then(res => { | |||||
Http.setToken(res.data.token); | |||||
app.globalData.token = res.data.token; | |||||
}) | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}) | |||||
}, | |||||
backHome: function() { | backHome: function() { | ||||
wx.switchTab({ | wx.switchTab({ | ||||
url: '/index/index', | url: '/index/index', | ||||
}) | }) | ||||
}, | }, | ||||
// bindGetUserInfo: function (e) { | |||||
// let that = this; | |||||
// var iv = e.detail.iv; | |||||
// var encryptedData = e.detail.encryptedData; | |||||
// wx.getUserInfo({ | |||||
// success: function (res) { | |||||
// Http.post({ | |||||
// url: config.api.getUserInfo, | |||||
// data: { | |||||
// encryptedData: encryptedData, | |||||
// iv: iv | |||||
// } | |||||
// }).then( | |||||
// function (res) { | |||||
// if (that.data.wjId) { | |||||
// app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// return; | |||||
// } | |||||
// if (that.data.fromflag == 'poster') { | |||||
// app.globalData.skipUrl = `/pages/canvas/index?couponChannelId=${that.data.couponChannelId}` | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// return; | |||||
// } | |||||
// // | |||||
// if (that.data.optionData.orderGroupId) { | |||||
// app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | |||||
// app.globalData.skip = 'reLaunch' | |||||
// that.judgePhonelngo() | |||||
// return; | |||||
// } | |||||
// if (that.data.path == 'index') { | |||||
// app.globalData.skipUrl = "/pages/game/index" | |||||
// app.globalData.skip = 'reLaunch' | |||||
// that.judgePhonelngo() | |||||
// } else { | |||||
// //返回主页 | |||||
// // if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup||that.data.couponChannelId && !that.data.cuserId&&app.globalData.type == 'cd') { | |||||
// if (that.data.couponChannelId && !that.data.cuserId && !that.data.spellGroup && app.globalData.type == 'cd') { | |||||
// // 跳转普通券/消费卡/限时秒杀/砍价详情 | |||||
// app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelId}` | |||||
// app.globalData.skip = 'navigateTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.couponChannelId && that.data.cuserId && !that.data.spellGroup && app.globalData.type != 'sd') { | |||||
// // 来自转赠 | |||||
// app.globalData.skipUrl = `/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}` | |||||
// app.globalData.skip = 'reLaunch' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | |||||
// // 拼团详情页 | |||||
// app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.optionData.id && app.globalData.type == 'gm') { | |||||
// // 游戏页面 | |||||
// that.getGameOne(app.globalData.token, that.data.optionData.id) | |||||
// } else if (that.data.optionData.id && app.globalData.type == 'td') { | |||||
// app.globalData.skipUrl = `/pages/topicDetail/index?id=${that.data.optionData.id}` | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// // 报名活动 | |||||
// else if (that.data.optionData.id && app.globalData.type == 'ra') { | |||||
// app.globalData.skipUrl = `/pages/radetail/index?id=${that.data.optionData.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// // 报名签到 | |||||
// else if (that.data.optionData.id && app.globalData.type == 'si') { | |||||
// app.globalData.skipUrl = `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// // 门店详情 | |||||
// else if (that.data.optionData.id && app.globalData.type == 'md') { | |||||
// app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.optionData.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// // 通过分享进入的门店详情页面 | |||||
// else if (that.data.id && that.data.frommd == 'md') { | |||||
// app.globalData.skipUrl = `/pages/index/searchbar/detail/index?id=${that.data.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.optionData.bt && that.data.optionData.id && app.globalData.type == 'bd') { | |||||
// // 宣传页详情 | |||||
// if (that.data.optionData.bt == '2') { | |||||
// // 自由图文 | |||||
// app.globalData.skipUrl = `/pages/freeBannerDetail/index?id=${that.data.optionData.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else { | |||||
// // 标准格式 | |||||
// app.globalData.skipUrl = `/pages/bannerdetail/index?id=${that.data.optionData.id}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// } else if (that.data.orderId || that.data.orderId && app.globalData.type == 'bg') { | |||||
// // 参与砍价 | |||||
// app.globalData.skipUrl = `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.orderId}`, | |||||
// app.globalData.skip = 'navigateTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'uc') { | |||||
// // 我的 | |||||
// app.globalData.skipUrl = '/index/user', | |||||
// app.globalData.skip = 'switchTab' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'in') { | |||||
// // 首页 | |||||
// app.globalData.skipUrl = '/index/index', | |||||
// app.globalData.skip = 'switchTab' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == "qd") { | |||||
// //每日签到 | |||||
// app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
// app.globalData.skip = 'reLaunch' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// else if (app.globalData.type == "hdrl") { | |||||
// //活动日历 | |||||
// app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// // 积分 | |||||
// else if (app.globalData.type == 'jf') { | |||||
// app.globalData.skipUrl = '/pages/integralmall/index', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'pc') { | |||||
// // 停车 | |||||
// app.globalData.skipUrl = '/index/passCar', | |||||
// app.globalData.skip = 'switchTab' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'mc') { | |||||
// // 我的券包 | |||||
// app.globalData.skipUrl = '/pages/couponorder/index/index', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'mo') { | |||||
// // 我的订单 | |||||
// app.globalData.skipUrl = '/pages/order/index/index?id=all', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'ca') { | |||||
// // 我的卡包 | |||||
// app.globalData.skipUrl = '/pages/cardorder/index/index', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'sc') { | |||||
// // 特享礼遇 | |||||
// app.globalData.skipUrl = '/pages/specialcourtesy/specialcourtesy', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'rb') { | |||||
// // 限时秒杀 | |||||
// app.globalData.skipUrl = '/pages/rushToBuy/index', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'bl') { | |||||
// // 砍价专场 | |||||
// app.globalData.skipUrl = '/pages/bargain/bargain', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'mb') { | |||||
// // 我的砍价 | |||||
// app.globalData.skipUrl = '/pages/bargain/bargain?from=myhtml', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'sl') { | |||||
// // 拼团专场 | |||||
// app.globalData.skipUrl = '/pages/spellGroup/spellGroup', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'ms') { | |||||
// // 我的拼团 | |||||
// app.globalData.skipUrl = '/pages/spellGroup/spellGroup?from=myhtml', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'dc') { | |||||
// // 消费卡 | |||||
// app.globalData.skipUrl = '/pages/discountCardList/discountCardList', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'td') { | |||||
// // 专题活动页 | |||||
// app.globalData.skipUrl = '/pages/topicDetail/index', | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (app.globalData.type == 'ml') { | |||||
// // 门店 | |||||
// app.globalData.skipUrl = '/index/searchbar', | |||||
// app.globalData.skip = 'switchTab' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.fromflag == 'coupondetail' && that.data.couponChannelIdflag) { | |||||
// app.globalData.skipUrl = `/pages/coupon/detail/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else if (that.data.fromflag == 'spellcoupondetail' && that.data.couponChannelIdflag) { | |||||
// app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | |||||
// app.globalData.skip = 'redirectTo' | |||||
// that.judgePhonelngo() | |||||
// } else { | |||||
// app.globalData.skipUrl = "/index/index", | |||||
// app.globalData.skip = 'switchTab' | |||||
// that.judgePhonelngo() | |||||
// } | |||||
// } | |||||
// }, | |||||
// function (error) { | |||||
// console.log(error) | |||||
// wx.showToast({ | |||||
// title: "请授权个人信息", | |||||
// icon: "none" | |||||
// }); | |||||
// } | |||||
// ) | |||||
// .catch(err => { | |||||
// wx.showToast({ | |||||
// title: err.errMsg, | |||||
// icon: 'none', | |||||
// duration: 2000, | |||||
// mask: false | |||||
// }); | |||||
// }) | |||||
// } | |||||
// }) | |||||
// }, | |||||
bindGetUserInfo(e) { | bindGetUserInfo(e) { | ||||
//session_key 未过期,并且在本生命周期一直有效 | |||||
wx.getUserProfile({ | wx.getUserProfile({ | ||||
title: '温馨提示', | |||||
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 | ||||
success: (res) => { | success: (res) => { | ||||
let that = this; | let that = this; | ||||
@@ -413,6 +223,12 @@ Page({ | |||||
// title: "授权个人信息成功11", | // title: "授权个人信息成功11", | ||||
// icon: "none" | // icon: "none" | ||||
// }); | // }); | ||||
if (app.globalData.type == 'gm' && that.data.id && that.data.gameId && that.data.url){//游戏页面 | |||||
app.globalData.skipUrl = '/pages/game/index?url=' + that.data.url + "&id=" + that.data.id + "&gameId=" + that.data.gameId, | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
return; | |||||
} | |||||
if (that.data.wjId) { | if (that.data.wjId) { | ||||
app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | app.globalData.skipUrl = `/pages/questionnaire/questionnaire?id=${that.data.wjId}` | ||||
app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
@@ -426,8 +242,8 @@ Page({ | |||||
return; | return; | ||||
} | } | ||||
// | // | ||||
if (that.data.optionData!=null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId !="" ) { | |||||
if (that.data.optionData != null && that.data.optionData.orderGroupId != null && that.data.optionData.orderGroupId != "") { | |||||
app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | app.globalData.skipUrl = `/pages/joinFrDpell/index?couponId=${that.data.optionData.couponId}&orderGroupId=${that.data.optionData.orderGroupId}&couponChannelId=${that.data.optionData.couponChannelId}&orderId=${that.data.optionData.orderId}&avatarUrl=${that.data.optionData.avatarUrl}&nickName=${that.data.optionData.nickName}` | ||||
app.globalData.skip = 'reLaunch' | app.globalData.skip = 'reLaunch' | ||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
@@ -453,7 +269,7 @@ Page({ | |||||
} else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | } else if (that.data.couponChannelId && app.globalData.type == 'sd' || that.data.couponChannelId && that.data.spellGroup) { | ||||
// 拼团详情页 | // 拼团详情页 | ||||
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelId}` | ||||
app.globalData.skip = 'redirectTo' | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
} else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | } else if (that.data.optionData != null && that.data.optionData.id && app.globalData.type == 'gm') { | ||||
// 游戏页面 | // 游戏页面 | ||||
@@ -604,12 +420,12 @@ Page({ | |||||
app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | app.globalData.skipUrl = `/pages/spellGroup/mySpellGroup/index?couponChannelId=${that.data.couponChannelIdflag}`, | ||||
app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
} else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId){ | |||||
} else if (that.data.fromflag == 'fillIndent' && that.data.fillIndentId && that.data.couponId) { | |||||
//线上配送 填写订单 | //线上配送 填写订单 | ||||
app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | app.globalData.skipUrl = `/pages/fillIndent/fillIndent?id=${that.data.fillIndentId}&couponId=${that.data.couponId}`, | ||||
app.globalData.skip = 'redirectTo' | app.globalData.skip = 'redirectTo' | ||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
}else { | |||||
} else { | |||||
app.globalData.skipUrl = "/index/index", | app.globalData.skipUrl = "/index/index", | ||||
app.globalData.skip = 'switchTab' | app.globalData.skip = 'switchTab' | ||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
@@ -636,9 +452,11 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
} | |||||
}, | |||||
fail: (err => { | |||||
console.log(err) | |||||
}) | |||||
}) | }) | ||||
}, | }, | ||||
getGameOne: function(token, id) { | getGameOne: function(token, id) { | ||||
let _this = this; | let _this = this; | ||||
@@ -13,9 +13,6 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
wx.switchTab({ | |||||
url: '/index1/index1' | |||||
}); | |||||
console.log("我是中转页面") | console.log("我是中转页面") | ||||
let that = this; | let that = this; | ||||
console.log(options); | console.log(options); | ||||
@@ -79,6 +76,8 @@ Page({ | |||||
options.id = this.data.newArr[2]; | options.id = this.data.newArr[2]; | ||||
} else if (options.type == 'wj') { | } else if (options.type == 'wj') { | ||||
options.id = this.data.newArr[2]; | options.id = this.data.newArr[2]; | ||||
} else if (options.type == 'ts') { | |||||
options.id = this.data.newArr[2]; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -214,6 +213,12 @@ Page({ | |||||
url: `/pages/questionnaire/questionnaire?id=${options.id}`, | url: `/pages/questionnaire/questionnaire?id=${options.id}`, | ||||
}) | }) | ||||
} | } | ||||
//投诉建议 | |||||
else if (app.globalData.type == 'ts') { | |||||
wx.redirectTo({ | |||||
url: `/pages/complaint/complaint`, | |||||
}) | |||||
} | |||||
// 宣传页详情 | // 宣传页详情 | ||||
else if (options && options.bt && options.id && app.globalData.type == 'bd') { | else if (options && options.bt && options.id && app.globalData.type == 'bd') { | ||||
if (options.bt == '2') { | if (options.bt == '2') { | ||||
@@ -6,7 +6,7 @@ const util = require("../../../../utils/util"); | |||||
let app = getApp(); | let app = getApp(); | ||||
Page({ | Page({ | ||||
/** | |||||
/** | |||||
* 页面的初始数据 | * 页面的初始数据 | ||||
*/ | */ | ||||
data: { | data: { | ||||
@@ -11,6 +11,7 @@ Page({ | |||||
* 页面的初始数据 | * 页面的初始数据 | ||||
*/ | */ | ||||
data: { | data: { | ||||
mouldType: 0, | |||||
navigationBarHeight, | navigationBarHeight, | ||||
teljpgUrl: imgurl.teljpg.url, | teljpgUrl: imgurl.teljpg.url, | ||||
wmhome: imgurl.wmhome.url, | wmhome: imgurl.wmhome.url, | ||||
@@ -31,12 +32,15 @@ Page({ | |||||
showErr: false, | showErr: false, | ||||
showTime: true, | showTime: true, | ||||
merchantVoList: [] | merchantVoList: [] | ||||
}, | |||||
}, | |||||
/** | |||||
/** | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
this.setData({ | |||||
mouldType: app.globalData.mouldType | |||||
}) | |||||
Http.get({ | Http.get({ | ||||
url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
data: { | data: { | ||||
@@ -501,6 +505,7 @@ Page({ | |||||
*/ | */ | ||||
onShow: function() { | onShow: function() { | ||||
this.setData({ | this.setData({ | ||||
mouldType: app.globalData.mouldType, | |||||
canSpell: true, | canSpell: true, | ||||
canBuyIf: true, | canBuyIf: true, | ||||
showTime: true | showTime: true | ||||
@@ -1,9 +1,9 @@ | |||||
<navbar back home text="拼团券" background='#fff'></navbar> | <navbar back home text="拼团券" background='#fff'></navbar> | ||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view class="content-box" > | <view class="content-box" > | ||||
<view class='content'> | <view class='content'> | ||||
<view class='top-img'> | |||||
<image src='{{data.coverImg}}'></image> | |||||
<view class='top-img' style="{{mouldType==1?'height: 750rpx;':''}}"> | |||||
<image src='{{data.coverImg}}' style="{{mouldType==1?'height: 750rpx;':''}}"></image> | |||||
</view> | </view> | ||||
<view class='title'>{{data.title}}</view> | <view class='title'>{{data.title}}</view> | ||||
<view class='text'> | <view class='text'> | ||||
@@ -3,7 +3,7 @@ const Http = require("../../utils/HttpBasics"); | |||||
var config = require("../../config/config.js"); | var config = require("../../config/config.js"); | ||||
const util = require("../../utils/util.js"); | const util = require("../../utils/util.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
Page({ | Page({ | ||||
/** | /** | ||||
@@ -15,6 +15,7 @@ Page({ | |||||
question: {}, | question: {}, | ||||
userDetails: "", | userDetails: "", | ||||
thenDate: "", | thenDate: "", | ||||
mouldType: 0 | |||||
}, | }, | ||||
//设置选中项 | //设置选中项 | ||||
setLsit(e) { | setLsit(e) { | ||||
@@ -193,7 +194,7 @@ Page({ | |||||
this.setData({ | this.setData({ | ||||
id: options.id, | id: options.id, | ||||
mouldType: app.globalData.mouldType, | |||||
}) | }) | ||||
this.getDetail() | this.getDetail() | ||||
}, | }, | ||||
@@ -4,7 +4,7 @@ | |||||
<!-- <view class="hidBox"> | <!-- <view class="hidBox"> | ||||
<view class="contcBox"></view> | <view class="contcBox"></view> | ||||
</view> --> | </view> --> | ||||
<image class="imgBox" src="{{question.logo}}"></image> | |||||
<image class="imgBox" src="{{question.logo}}" style="{{mouldType==1?'height:360rpx;':''}}"></image> | |||||
<view class="titleBox"> | <view class="titleBox"> | ||||
<view class="title">{{question.title}}</view> | <view class="title">{{question.title}}</view> | ||||
<view class="time">{{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}</view> | <view class="time">{{'答题时间:'+question.startDate_Sing+'至'+question.endDate_Sing}}</view> | ||||
@@ -2,7 +2,6 @@ | |||||
const Http = require("../../../utils/HttpBasics"); | const Http = require("../../../utils/HttpBasics"); | ||||
var config = require("../../../config/config.js"); | var config = require("../../../config/config.js"); | ||||
var app = getApp(); | var app = getApp(); | ||||
var app = getApp(); | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | ||||
Page({ | Page({ | ||||
@@ -15,6 +14,7 @@ Page({ | |||||
pageNum: 1, | pageNum: 1, | ||||
pageSize: 4, | pageSize: 4, | ||||
thenDate:"", | thenDate:"", | ||||
mouldType: 0 | |||||
}, | }, | ||||
goDetails(e){ | goDetails(e){ | ||||
let id = e.currentTarget.dataset.id | let id = e.currentTarget.dataset.id | ||||
@@ -58,7 +58,9 @@ Page({ | |||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | onLoad: function (options) { | ||||
this.setData({ | |||||
mouldType:app.globalData.mouldType, | |||||
}) | |||||
}, | }, | ||||
/** | /** | ||||
@@ -3,7 +3,7 @@ | |||||
<view class="noData" wx:if="{{list.length==0}}"> 敬请期待!</view> | <view class="noData" wx:if="{{list.length==0}}"> 敬请期待!</view> | ||||
<view class="questionLsi" wx:for="{{list}}" bindtap="goDetails" data-id="{{item.id}}"> | <view class="questionLsi" wx:for="{{list}}" bindtap="goDetails" data-id="{{item.id}}"> | ||||
<image class="img" src="{{item.logo}}"></image> | |||||
<image class="img" style="{{mouldType==1?'height:360rpx;':''}}" src="{{item.logo}}"></image> | |||||
<view class="title">{{item.title}}</view> | <view class="title">{{item.title}}</view> | ||||
<view class="conten">{{item.topDesc}}</view> | <view class="conten">{{item.topDesc}}</view> | ||||
@@ -26,9 +26,13 @@ Page({ | |||||
wmhome: imgurl.wmhome.url, | wmhome: imgurl.wmhome.url, | ||||
minute: "", | minute: "", | ||||
nodes: '', | nodes: '', | ||||
mouldType: 0 | |||||
}, | }, | ||||
onLoad(options) { | onLoad(options) { | ||||
let that = this; | let that = this; | ||||
that.setData({ | |||||
mouldType: app.globalData.mouldType, | |||||
}) | |||||
wx.hideShareMenu(); | wx.hideShareMenu(); | ||||
if(options&&options.id){ | if(options&&options.id){ | ||||
that.setData({ | that.setData({ | ||||
@@ -8,8 +8,8 @@ | |||||
<!-- 活动正常排版格式 --> | <!-- 活动正常排版格式 --> | ||||
<view class='coupons' style='{{data.type!=2?"padding-bottom: 160rpx":0}};'> | <view class='coupons' style='{{data.type!=2?"padding-bottom: 160rpx":0}};'> | ||||
<view class="coupons-body"> | <view class="coupons-body"> | ||||
<view class='banner'> | |||||
<image src='{{data.coverImg}}' mode='widthFix'></image> | |||||
<view class='banner' style="{{mouldType==1?'height:360rpx;':''}}"> | |||||
<image src='{{data.coverImg}}' style="{{mouldType==1?'height:360rpx;':''}}"></image> | |||||
</view> | </view> | ||||
<view class='box'> | <view class='box'> | ||||
<view class='act'> | <view class='act'> | ||||
@@ -25,7 +25,7 @@ page{ | |||||
.banner { | .banner { | ||||
position: relative; | position: relative; | ||||
width: 750rpx; | width: 750rpx; | ||||
height: 280rpx; | |||||
/* height: 280rpx; */ | |||||
overflow: hidden; | overflow: hidden; | ||||
} | } | ||||
@@ -53,7 +53,7 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | |||||
*/ | |||||
onLoad: function (options) { | onLoad: function (options) { | ||||
this.setData({ | this.setData({ | ||||
mouldType:app.globalData.mouldType | mouldType:app.globalData.mouldType | ||||
@@ -757,12 +757,12 @@ Page({ | |||||
}) | }) | ||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow: function () { | |||||
onShow() { | |||||
this.setData({ | this.setData({ | ||||
mouldType: app.globalData.mouldType, | mouldType: app.globalData.mouldType, | ||||
canSpell: true, | canSpell: true, | ||||
@@ -822,6 +822,7 @@ Page({ | |||||
var eData = options.target.dataset.id; | var eData = options.target.dataset.id; | ||||
shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${that.data.data.couponId}&spellGroup=spellGroup&frommd=JC`; | shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${that.data.data.couponId}&spellGroup=spellGroup&frommd=JC`; | ||||
} | } | ||||
console.log(shareObj) | |||||
// 返回shareObj | // 返回shareObj | ||||
return shareObj; | return shareObj; | ||||
}, | }, |
@@ -57,11 +57,12 @@ | |||||
"miniprogram": { | "miniprogram": { | ||||
"list": [ | "list": [ | ||||
{ | { | ||||
"id": -1, | |||||
"name": "券详情", | |||||
"pathName": "pages/index/index", | |||||
"query": "type=cd&couponChannelId=420885883373359104", | |||||
"scene": null | |||||
"id": 0, | |||||
"name": "pages/joinFrDpell/index", | |||||
"pathName": "pages/joinFrDpell/index", | |||||
"query": "couponId=633104903746412544&orderGroupId=635632781235642368&couponChannelId=633104904094539776&orderId=635632719977832448&avatarUrl=https://thirdwx.qlogo.cn/mmopen/vi_32/RjiaOaB3fZCibg4fZK3SerNlyrSLLXxA2NnT9Q8PBbPBJ67Z8xPndbCO8sEHW1omhT2gXYF6L1AwN65rGg140AZw/132&nickName=乐", | |||||
"scene": 1036, | |||||
"referrerInfo": {} | |||||
}, | }, | ||||
{ | { | ||||
"id": 8, | "id": 8, | ||||