Commit debf224c by 李伟康

修复

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