Commit 358e90b5 by 严立

LL - 修复首页登录状态判断

parent 97433572
......@@ -48,8 +48,6 @@ App({
for (let i = 0, l = funcObjectKey.length; i < l; i++) {
funcCss = funcCss + funcObjectKey[i] + ': ' + funcCssObject[funcObjectKey[i]] + '; '
}
// console.log(funcCss)
return funcCss
},
......@@ -64,10 +62,6 @@ App({
method: obj.method || 'POST',
header: header,
success: (res) => {
// console.log("接口:", this.globalData.baseUrl + obj.url);
// console.log("参数:", JSON.stringify(obj.data));
// console.log("返回:", res);
let code = res.data.code * 1
if (200 == code && true == res.data.success) {
if (obj.success) {
......@@ -90,9 +84,6 @@ App({
}
},
fail: (err) => {
// console.log("接口:", this.globalData.baseUrl + obj.url)
// console.log("参数:", obj.data)
// console.log("返回:", err)
if (obj.fail) {
let err = {
statusCode: 9999,
......@@ -162,7 +153,6 @@ App({
}
wx.setStorageSync('userInfo', funcUserInfo)
if (obj && obj.success) {
obj.success(funcResponse.token)
}
......
......@@ -208,7 +208,7 @@ Page({
url: '/api/v1/commodity/getCommoditys',
data: {
'officeId': this.data.shopInfo.id,
// 'classifyId': this.data.sideBar[this.data.currentIndex].id,
'classifyId': this.data.sideBar[this.data.currentIndex].id,
'genre': this.data.shopInfo.shopType,
},
success: (response) => {
......@@ -264,6 +264,11 @@ Page({
funcCommodityList.push(funcItem)
}
// 重新根据商品分类区分数据
// for (let i) {
// }
this.setData({
winLoading: false,
commodityList: funcCommodityList,
......
......@@ -67,20 +67,23 @@ Page({
pageNo: 1
})
this.getBanner()
// this.loadVisiterPlanList()
this.getNoticeList()
this.getBrands()
},
setLogin: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
this.setData({
isLogin: funcUserInfo.isSignIn
})
let funcTimer = setInterval(() => {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo) {
this.setData({
isLogin: funcUserInfo.isSignIn
})
clearInterval(funcTimer)
}
}, 200)
},
onShareAppMessage: function (res) {
if (res.from === 'button') {
// 来自页面内转发按钮
console.log(res.target)
}
return {
title: '自定义转发标题',
......@@ -95,7 +98,6 @@ Page({
},
onGuide: function () {
console.log('onGuide')
wx.navigateTo({
url: '/pages/home/guide/guide'
})
......@@ -186,7 +188,6 @@ Page({
},
bannerClick(e) {
console.log(e.currentTarget.dataset.item)
// 活动、动态、攻略详情 对应 1,2,3
let jumpColumnId = e.currentTarget.dataset.item.jumpColumnId*1
let jumpId = e.currentTarget.dataset.item.jumpId
......@@ -278,7 +279,6 @@ Page({
// 跳转到品牌故事详情页面
onToHistory: function (event) {
let { index } = event.currentTarget.dataset
console.log(index)
wx.navigateTo({
url: '/pages/home/history/history?index=' + index,
})
......
......@@ -92,7 +92,6 @@ Page({
},
onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type)
logicData.option = options
......@@ -349,8 +348,6 @@ Page({
payAmount: App.modular.utils.formatAmount(funcPayAmount),
buyContentAmount: funcPriceUnit,
})
console.log('shoppingCartList', this.data.shoppingCartList)
},
/**
......@@ -492,7 +489,6 @@ Page({
* @returns
*/
onEntryTimeChange: function (event) {
console.log(event.detail)
let funcColumn = event.detail.column
let funcIndex = event.detail.value
......@@ -985,11 +981,9 @@ Page({
'enrollNum': this.data.quantity,
'name': this.data.registerInfo[0].name,
'mobile': this.data.registerInfo[0].phone,
'totalPrice': Number(this.data.payAmount),
},
success: (response) => {
console.log('/api/v1/activity/doActivityEnroll')
console.log(response)
if (/请勿重复报名/.test(response.data.msg)) {
wx.lin.showToast({
title: response.data.msg,
......@@ -1012,10 +1006,20 @@ Page({
return
}
if (/总价格不能为空/.test(response.data.msg)) {
wx.lin.showToast({
title: response.data.msg,
icon: 'error',
})
this.setData({
isPaySubmit: false,
})
return
}
// 库存充足正常下单支付
let funcResponse = response.data
pagePayId = funcResponse.orderId
console.log(pagePayId)
this.setData({
orderId: pagePayId
})
......@@ -1032,8 +1036,6 @@ Page({
'signType': funcResponse.signType,
'paySign': funcResponse.paySign,
success: (response) => {
console.log('active requestPayment')
if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调
// this.payStatus(true)
......@@ -1063,8 +1065,6 @@ Page({
},
queryPayStatus: function () {
console.log('queryPayStatus')
let funcIndex = 0
App.globalData.payStateTimer = setInterval(() => {
......@@ -1097,9 +1097,6 @@ Page({
* @returns
*/
payStatus: function (funcPayResult) {
console.log('payStatus', funcPayResult)
console.log('payStatus', logicData.option.type)
clearInterval(App.globalData.payStateTimer)
this.setData({
isPaySubmit: false,
......
......@@ -399,7 +399,6 @@ Page({
},
success: (response) => {
let funcResponse = response.data.list
console.log(funcResponse)
let funcList = []
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
......@@ -429,7 +428,6 @@ Page({
funcItem.priceType = 3
}
}
console.log(funcItem)
funcList.push(funcItem)
}
......@@ -617,8 +615,6 @@ Page({
let funcEvaluate = this.data.detailEvaluate
let funcTextHeight = response[0]
console.log(funcContentHeight)
console.log(funcTextHeight)
for (let i = 0, l = funcTextHeight.length; i < l; i++) {
if (funcContentHeight > funcTextHeight[i].height) {
funcEvaluate[i].isMore = true
......@@ -724,6 +720,7 @@ Page({
},
// 跳转到服务详情
onContact: function () {
App.setShopInfo(Number(this.data.option.id), 3)
wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail'
})
......@@ -902,8 +899,6 @@ Page({
this.setData({
detailEvaluate: funcEvaluate
})
console.log(funcItem)
},
/**
......@@ -913,7 +908,6 @@ Page({
* @returns
*/
onEvaluateAlbum: function (event) {
console.log('onEvaluateAlbum')
let funcItem = event.currentTarget.dataset.item
let funcIndex = event.currentTarget.dataset.index
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment