Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit debf224c
authored
Aug 11, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复
1 parent
117f19c7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
58 deletions
api/env/index.js
components/chageItem/index.js
components/commodityItem/index.js
packageEquity/pages/allEquity/allEquity.js
packageEquity/pages/commodity/chargeDetail/chargeDetail.js
packageEquity/pages/commodity/detail/detail.js
pages/tab/equity/index.js
api/env/index.js
View file @
debf224
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
/**
/**
*
*
...
...
components/chageItem/index.js
View file @
debf224
...
@@ -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
})
})
}
}
}
}
...
...
components/commodityItem/index.js
View file @
debf224
...
@@ -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
),
...
...
packageEquity/pages/allEquity/allEquity.js
View file @
debf224
...
@@ -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
})
})
}
}
}
}
...
...
packageEquity/pages/commodity/chargeDetail/chargeDetail.js
View file @
debf224
...
@@ -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
...
...
packageEquity/pages/commodity/detail/detail.js
View file @
debf224
...
@@ -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
...
...
pages/tab/equity/index.js
View file @
debf224
...
@@ -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
})
})
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment