Commit debf224c by 李伟康

修复

1 parent 117f19c7
import { preReleaseAppId } from '~/config' import { preReleaseAppId } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 3 let index = 2
/** /**
* *
......
...@@ -13,29 +13,37 @@ Component({ ...@@ -13,29 +13,37 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
toDetail(){ toDetail() {
let {chargeInfo} = this.data let {
chargeInfo
} = this.data
let param = { let param = {
brandName:chargeInfo.brandName, brandName: chargeInfo.brandName,
supplier:chargeInfo.supplier, supplier: chargeInfo.supplier,
icon:chargeInfo.icon icon: chargeInfo.icon
} }
wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail',{ wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail', {
param param,
notIntercept: true
}) })
}, },
toDetailPage(e){ toDetailPage(e) {
let {item} = e.currentTarget.dataset let {
let {chargeInfo} = this.data item
} = e.currentTarget.dataset
let {
chargeInfo
} = this.data
let param = { let param = {
brandName:chargeInfo.brandName, brandName: chargeInfo.brandName,
supplier:chargeInfo.supplier, supplier: chargeInfo.supplier,
id:item.id, id: item.id,
productName:item.productName, productName: item.productName,
icon:chargeInfo.icon icon: chargeInfo.icon
} }
wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail',{ wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail', {
param param,
notIntercept: true
}) })
} }
} }
......
...@@ -6,7 +6,7 @@ Component({ ...@@ -6,7 +6,7 @@ Component({
data: { data: {
curErrorIndex:-1, curErrorIndex: -1,
}, },
/** /**
...@@ -14,20 +14,29 @@ Component({ ...@@ -14,20 +14,29 @@ Component({
*/ */
methods: { methods: {
toDetail() { toDetail() {
const { businessInfo, address } = this.data const {
businessInfo,
address
} = this.data
let param = { let param = {
supplier: businessInfo.supplier, supplier: businessInfo.supplier,
brandName: businessInfo.brandName, brandName: businessInfo.brandName,
lat: address.location.lat, lat: address.location.lat,
lng: address.location.lng, lng: address.location.lng,
} }
wx.p.router.go('/packageEquity/pages/commodity/detail/detail',{ wx.p.router.go('/packageEquity/pages/commodity/detail/detail', {
param param,
notIntercept: true
}) })
}, },
toDetailPage(e) { toDetailPage(e) {
const { item } = e.currentTarget.dataset const {
const { businessInfo, address } = this.data item
} = e.currentTarget.dataset
const {
businessInfo,
address
} = this.data
let param = { let param = {
supplier: businessInfo.supplier, supplier: businessInfo.supplier,
brandName: businessInfo.brandName, brandName: businessInfo.brandName,
...@@ -35,14 +44,17 @@ Component({ ...@@ -35,14 +44,17 @@ Component({
lng: address.location.lng, lng: address.location.lng,
id: item.id id: item.id
} }
wx.p.router.go('/packageEquity/pages/commodity/detail/detail',{ wx.p.router.go('/packageEquity/pages/commodity/detail/detail', {
param param,
notIntercept: true
}) })
}, },
// 打开地图 // 打开地图
openMap() { openMap() {
const { businessInfo } = this.data const {
businessInfo
} = this.data
wx.openLocation({ wx.openLocation({
latitude: parseFloat(businessInfo.lat), latitude: parseFloat(businessInfo.lat),
longitude: parseFloat(businessInfo.lng), longitude: parseFloat(businessInfo.lng),
......
...@@ -105,7 +105,8 @@ Page({ ...@@ -105,7 +105,8 @@ Page({
location: true location: true
} }
wx.p.router.go('/packageEquity/pages/commodity/detail/detail',{ wx.p.router.go('/packageEquity/pages/commodity/detail/detail',{
param param,
notIntercept: true
}) })
} else if (item.appearance == 2) { } else if (item.appearance == 2) {
let param = { let param = {
...@@ -114,7 +115,8 @@ Page({ ...@@ -114,7 +115,8 @@ Page({
icon: item.equityIcon icon: item.equityIcon
} }
wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail',{ wx.p.router.go('/packageEquity/pages/commodity/chargeDetail/chargeDetail',{
param param,
notIntercept: true
}) })
} }
} }
......
...@@ -172,11 +172,9 @@ Page({ ...@@ -172,11 +172,9 @@ Page({
toMemberPage() { toMemberPage() {
this.toOpenPage() this.toOpenPage()
}, },
toRecharge() { async toRecharge() {
const isLogin = this.checkLogin() const loginStatus = await wx.p.router.intercept()
if (!isLogin) { if (loginStatus) return
return
}
if (!this.data.rechageNum) { if (!this.data.rechageNum) {
wx.p.wxApi.showToast('请输入充值账号') wx.p.wxApi.showToast('请输入充值账号')
return return
......
...@@ -216,11 +216,9 @@ Page({ ...@@ -216,11 +216,9 @@ Page({
wx.p.router.go('/packageEquity/pages/open/open?page=business') wx.p.router.go('/packageEquity/pages/open/open?page=business')
}, },
// 去购买 // 去购买
toBuyItem() { async toBuyItem() {
const isLogin = this.checkLogin() const loginStatus = await wx.p.router.intercept()
if (!isLogin) { if (loginStatus) return
return
}
const { const {
curentGoodsItem, curentGoodsItem,
isHaveInventory, isHaveInventory,
...@@ -244,7 +242,7 @@ Page({ ...@@ -244,7 +242,7 @@ Page({
}) })
}, },
// 确定购买 // 确定购买
comfirmBuyItem() { async comfirmBuyItem() {
wx.p.wxApi.showLoading() wx.p.wxApi.showLoading()
this.toGetCode() this.toGetCode()
this.modalOnCancel() this.modalOnCancel()
...@@ -387,19 +385,6 @@ Page({ ...@@ -387,19 +385,6 @@ Page({
title title
}) })
}, },
// 检测是否已经登录
checkLogin() {
const sessionId = wx.p.storage.get('sessionId')
let flag = true
if (!sessionId) {
flag = false
this.setData({
showLogin: true,
showComponent: false
})
}
return flag
},
// 获取a标签链接 // 获取a标签链接
getALabel(str) { getALabel(str) {
let reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g let reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g
......
...@@ -157,14 +157,18 @@ Page({ ...@@ -157,14 +157,18 @@ Page({
// wx.p.router.go('/packageEquity/pages/allEquity/allEquity') // wx.p.router.go('/packageEquity/pages/allEquity/allEquity')
// }, // },
toBuyMember() { toBuyMember() {
wx.p.router.go('/packageEquity/pages/open/open') wx.p.router.go('/packageEquity/pages/open/open', {
notIntercept: true
})
}, },
toNewPage(e) { toNewPage(e) {
const { const {
index, index,
item item
} = e.currentTarget.dataset } = e.currentTarget.dataset
wx.p.router.go(item.url) wx.p.router.go(item.url, {
notIntercept: true
})
}, },
...@@ -265,8 +269,9 @@ Page({ ...@@ -265,8 +269,9 @@ Page({
const { const {
id id
} = e.currentTarget.dataset } = e.currentTarget.dataset
wx.p.router.go('/packageEquity/pages/package/package',{ wx.p.router.go('/packageEquity/pages/package/package', {
id id,
notIntercept: true
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!