Commit 358e90b5 by 严立

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

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