Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
881999b9
authored
Dec 11, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
请求接口函数替换
parent
1bcc5169
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1778 additions
and
1741 deletions
app.js
app.wxss
pages/campsite/evaluate/evaluate.js
pages/campsite/home-mirror/home-mirror.js
pages/campsite/home/home.js
pages/commodity/home/home.js
pages/commodity/menu-food/menu-food.js
pages/commodity/project-detail/project-detail.js
pages/commodity/project/project.js
pages/commodity/room-appointment/room-appointment.js
pages/home/dynamic-detail/dynamic-detail.js
pages/home/dynamic/dynamic.js
pages/home/history/history.js
pages/home/night-appointment/night-appointment.js
pages/login/login.js
pages/login/login.wxml
pages/mine/appointment-detail/appointment-detail.js
pages/mine/appointment-ticket/appointment-ticket.js
pages/mine/appointment/appointment.js
pages/mine/authentication-input/authentication-input.js
pages/mine/card/card.js
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/info/info.js
pages/mine/order/order.js
pages/mine/question/question.js
pages/pay/coupon-detail/coupon-detail.js
pages/pay/coupon-input/coupon-input.js
pages/pay/order-comment/order-comment.js
pages/pay/order-detail/order-detail.js
pages/pay/order-input/order-input.js
pages/play/activity-detail/activity-detail.js
pages/play/home/home.js
pages/play/movie-detail/movie-detail.js
pages/play/service-detail/service-detail.js
pages/play/service-sell/service-sell.js
pages/play/service/service.js
pages/play/strategy-detail/strategy-detail.js
wxss/layout.wxss
wxss/theme.wxss
app.js
View file @
881999b9
...
@@ -36,7 +36,6 @@ App({
...
@@ -36,7 +36,6 @@ App({
iMui
(
this
)
// m-ui 相关函数引入
iMui
(
this
)
// m-ui 相关函数引入
iLogin
(
this
)
// 全局登录,根据 token 的情况执行相关操作
iLogin
(
this
)
// 全局登录,根据 token 的情况执行相关操作
this
.
setUnitProportion
()
this
.
setUnitProportion
()
console
.
log
(
'wx.env'
,
wx
.
env
)
},
},
onShow
:
function
()
{
onShow
:
function
()
{
...
@@ -251,29 +250,6 @@ App({
...
@@ -251,29 +250,6 @@ App({
},
},
/**
/**
* 注册
* @function
* @param {number} - funcAmountValue 金额,单位分
* @returns
*/
registUserInfo
:
function
(
obj
)
{
this
.
wxRequest
({
url
:
'v1/login/getDecryptData'
,
data
:
obj
.
param
,
success
:
(
res
)
=>
{
if
(
obj
.
success
)
{
obj
.
success
(
res
)
}
},
fail
:
(
err
)
=>
{
if
(
obj
.
fail
)
{
obj
.
fail
(
err
)
}
}
})
},
/**
* 查询用户认证状态
* 查询用户认证状态
* 仅在用户已经注册的前提下会查询此函数
* 仅在用户已经注册的前提下会查询此函数
* @function
* @function
...
...
app.wxss
View file @
881999b9
@import '/wxss/reset.wxss';
@import '
.
/wxss/reset.wxss';
@import './
component/theme
/layout.wxss';
@import './
wxss
/layout.wxss';
@import './
component/theme
/theme.wxss';
@import './
wxss
/theme.wxss';
page {
page {
display: flex;
display: flex;
...
@@ -26,8 +26,6 @@ page {
...
@@ -26,8 +26,6 @@ page {
height: 100%;
height: 100%;
}
}
.bg-gradient {
.bg-gradient {
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 20%, #F3F4F6 100%);
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 20%, #F3F4F6 100%);
}
}
...
...
pages/campsite/evaluate/evaluate.js
View file @
881999b9
...
@@ -18,22 +18,21 @@ Page({
...
@@ -18,22 +18,21 @@ Page({
// 查询门店评分
// 查询门店评分
getOfficeAppraise
:
function
()
{
getOfficeAppraise
:
function
()
{
let
that
=
this
let
officeId
=
wx
.
getStorageSync
(
'shopInfoBuffer'
).
id
let
officeId
=
wx
.
getStorageSync
(
'shopInfoBuffer'
).
id
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/appraise/getOfficeAppraise'
,
url
:
'v1/appraise/getOfficeAppraise'
,
data
:
{
params
:
{
'officeId'
:
'8a3e59c57f564c569b3d7bb278ea50b3'
'officeId'
:
'8a3e59c57f564c569b3d7bb278ea50b3'
},
success
:
function
(
response
)
{
let
funcData
=
response
.
data
that
.
setData
({
officeServiceText
:
funcData
.
serviceEvaluation
.
toFixed
(
1
),
officeProductText
:
funcData
.
productEvaluatio
.
toFixed
(
1
),
officeEnvironmentalText
:
funcData
.
environmentalEvaluation
.
toFixed
(
1
),
})
}
}
})
})
.
then
((
response
)
=>
{
let
funcData
=
response
.
data
this
.
setData
({
officeServiceText
:
funcData
.
serviceEvaluation
.
toFixed
(
1
),
officeProductText
:
funcData
.
productEvaluatio
.
toFixed
(
1
),
officeEnvironmentalText
:
funcData
.
environmentalEvaluation
.
toFixed
(
1
),
})
})
},
},
/**
/**
...
@@ -43,64 +42,64 @@ Page({
...
@@ -43,64 +42,64 @@ Page({
* @returns
* @returns
*/
*/
getAppraise
:
function
()
{
getAppraise
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/appraise/getList'
,
url
:
'v1/appraise/getList'
,
data
:
{
params
:
{
'pageNo'
:
'1'
,
'pageNo'
:
'1'
,
'pageSize'
:
'-1'
,
'pageSize'
:
'-1'
,
'officeId'
:
'8a3e59c57f564c569b3d7bb278ea50b3'
'officeId'
:
'8a3e59c57f564c569b3d7bb278ea50b3'
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'star'
:
4
,
'scoreService'
:
funcResponse
.
list
[
i
].
serviceEvaluation
,
// 服务评价
'scoreCommodity'
:
funcResponse
.
list
[
i
].
productEvaluation
,
// 商品评价
'scoreEnvironmental'
:
funcResponse
.
list
[
i
].
environmentalEvaluation
,
// 环境评价
'userName'
:
funcResponse
.
list
[
i
].
nickname
,
'userAvatar'
:
funcResponse
.
list
[
i
].
headImg
,
'userType'
:
funcResponse
.
list
[
i
].
userType
,
'userAlbum'
:
funcResponse
.
list
[
i
].
imgUrls
,
// 评论图册
'date'
:
funcResponse
.
list
[
i
].
createDate
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'isMore'
:
false
,
'isDetail'
:
false
,
}
// 没有评论也没有图片,使用默认文本。
let
funcList
=
[]
if
(
funcItem
.
content
===
''
&&
funcItem
.
userAlbum
.
length
===
0
)
{
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
funcItem
.
content
=
'此用户没有填写评价。'
let
funcItem
=
{
}
'star'
:
4
,
'scoreService'
:
funcResponse
.
list
[
i
].
serviceEvaluation
,
// 服务评价
'scoreCommodity'
:
funcResponse
.
list
[
i
].
productEvaluation
,
// 商品评价
'scoreEnvironmental'
:
funcResponse
.
list
[
i
].
environmentalEvaluation
,
// 环境评价
'userName'
:
funcResponse
.
list
[
i
].
nickname
,
'userAvatar'
:
funcResponse
.
list
[
i
].
headImg
,
'userType'
:
funcResponse
.
list
[
i
].
userType
,
'userAlbum'
:
funcResponse
.
list
[
i
].
imgUrls
,
// 评论图册
'date'
:
funcResponse
.
list
[
i
].
createDate
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'isMore'
:
false
,
'isDetail'
:
false
,
}
funcItem
.
star
=
Math
.
floor
((
funcItem
.
scoreService
+
funcItem
.
scoreCommodity
+
funcItem
.
scoreEnvironmental
)
/
3
)
// 没有评论也没有图片,使用默认文本。
funcList
.
push
(
funcItem
)
if
(
funcItem
.
content
===
''
&&
funcItem
.
userAlbum
.
length
===
0
)
{
funcItem
.
content
=
'此用户没有填写评价。'
}
}
this
.
setData
({
funcItem
.
star
=
Math
.
floor
((
funcItem
.
scoreService
+
funcItem
.
scoreCommodity
+
funcItem
.
scoreEnvironmental
)
/
3
)
detailEvaluate
:
funcList
funcList
.
push
(
funcItem
)
})
}
this
.
setData
({
detailEvaluate
:
funcList
})
const
funcQuery
=
wx
.
createSelectorQuery
()
const
funcQuery
=
wx
.
createSelectorQuery
()
funcQuery
.
selectAll
(
'.evaluate-item-content-mark'
).
boundingClientRect
()
funcQuery
.
selectAll
(
'.evaluate-item-content-mark'
).
boundingClientRect
()
funcQuery
.
exec
((
response
)
=>
{
funcQuery
.
exec
((
response
)
=>
{
let
funcContentHeight
=
88
*
wx
.
getStorageSync
(
'unitProportion'
)
let
funcContentHeight
=
88
*
wx
.
getStorageSync
(
'unitProportion'
)
let
funcEvaluate
=
this
.
data
.
detailEvaluate
let
funcEvaluate
=
this
.
data
.
detailEvaluate
let
funcTextHeight
=
response
[
0
]
let
funcTextHeight
=
response
[
0
]
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
}
}
}
}
this
.
setData
({
this
.
setData
({
detailEvaluate
:
funcEvaluate
detailEvaluate
:
funcEvaluate
})
})
})
}
}
)
})
})
},
},
...
...
pages/campsite/home-mirror/home-mirror.js
View file @
881999b9
...
@@ -69,27 +69,25 @@ Page({
...
@@ -69,27 +69,25 @@ Page({
// 获取活动信息
// 获取活动信息
queryActivity
:
function
()
{
queryActivity
:
function
()
{
let
that
=
this
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/activity/getList'
,
url
:
'v1/activity/getList'
,
data
:
{
params
:
{
'listType'
:
'1'
,
'listType'
:
'1'
,
'pageSize'
:
'5'
,
'pageSize'
:
'5'
,
'pageNo'
:
'1'
,
'pageNo'
:
'1'
,
'officeId'
:
shopInfo
.
id
'officeId'
:
shopInfo
.
id
},
},
success
:
function
(
res
)
{
})
let
funcData
=
res
.
data
.
list
.
then
((
response
)
=>
{
that
.
setData
({
let
funcData
=
response
.
data
.
list
childActivity
:
funcData
this
.
setData
({
})
childActivity
:
funcData
}
}
)
})
})
},
},
queryEvaluate
:
function
()
{
queryEvaluate
:
function
()
{
let
that
=
this
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
App
.
request
({
App
.
request
({
url
:
'v1/appraise/getOfficeAppraise'
,
url
:
'v1/appraise/getOfficeAppraise'
,
...
...
pages/campsite/home/home.js
View file @
881999b9
...
@@ -69,27 +69,25 @@ Page({
...
@@ -69,27 +69,25 @@ Page({
// 获取活动信息
// 获取活动信息
queryActivity
:
function
()
{
queryActivity
:
function
()
{
let
that
=
this
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/activity/getList'
,
url
:
'v1/activity/getList'
,
data
:
{
params
:
{
'listType'
:
'1'
,
'listType'
:
'1'
,
'pageSize'
:
'5'
,
'pageSize'
:
'5'
,
'pageNo'
:
'1'
,
'pageNo'
:
'1'
,
'officeId'
:
shopInfo
.
id
'officeId'
:
shopInfo
.
id
},
},
success
:
function
(
res
)
{
})
let
funcData
=
res
.
data
.
list
.
then
((
response
)
=>
{
that
.
setData
({
let
funcData
=
response
.
data
.
list
childActivity
:
funcData
this
.
setData
({
})
childActivity
:
funcData
}
}
)
})
})
},
},
queryEvaluate
:
function
()
{
queryEvaluate
:
function
()
{
let
that
=
this
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
let
shopInfo
=
wx
.
getStorageSync
(
'shopInfoBuffer'
)
App
.
request
({
App
.
request
({
url
:
'v1/appraise/getOfficeAppraise'
,
url
:
'v1/appraise/getOfficeAppraise'
,
...
...
pages/commodity/home/home.js
View file @
881999b9
...
@@ -149,13 +149,12 @@ Page({
...
@@ -149,13 +149,12 @@ Page({
}
else
{
}
else
{
funcBanner
[
funcIndex
]
=
''
funcBanner
[
funcIndex
]
=
''
}
}
T
his
.
setData
({
t
his
.
setData
({
banner
:
funcBanner
banner
:
funcBanner
})
})
})
})
}
}
let
This
=
this
// 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品
// 0 首页,1 所有服务,2 儿童营地,3 海错图,4 元养水韵,5 儿童营地接待,6 拾光花坊, 7 商品
let
funcShopList
=
[
2
,
3
,
4
,
5
,
6
]
let
funcShopList
=
[
2
,
3
,
4
,
5
,
6
]
for
(
let
i
=
0
,
l
=
funcShopList
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
funcShopList
.
length
;
i
<
l
;
i
++
)
{
...
@@ -200,119 +199,119 @@ Page({
...
@@ -200,119 +199,119 @@ Page({
}
}
// 顶部第一商店推荐
// 顶部第一商店推荐
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/recommend'
,
url
:
'v1/commodity/recommend'
,
data
:
{
params
:
{
'officeId'
:
funcShopInfo
[
0
].
shopId
,
'officeId'
:
funcShopInfo
[
0
].
shopId
,
'genre'
:
5
,
'genre'
:
5
,
'tag'
:
'202'
,
'tag'
:
'202'
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'pageSize'
:
4
'pageSize'
:
4
},
}
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'name'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'name'
:
funcResponse
[
i
].
name
,
'shopType'
:
funcResponse
[
i
].
genre
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
'shopType'
:
funcResponse
[
i
].
genre
,
}
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
shopRecommendA
:
funcList
})
}
}
this
.
setData
({
shopRecommendA
:
funcList
})
})
})
// 顶部第二商店推荐
// 顶部第二商店推荐
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/recommend'
,
url
:
'v1/commodity/recommend'
,
data
:
{
params
:
{
'officeId'
:
funcShopInfo
[
1
].
shopId
,
'officeId'
:
funcShopInfo
[
1
].
shopId
,
'genre'
:
5
,
'genre'
:
5
,
'tag'
:
'202'
,
'tag'
:
'202'
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'pageSize'
:
4
'pageSize'
:
4
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'name'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'name'
:
funcResponse
[
i
].
name
,
'shopType'
:
funcResponse
[
i
].
genre
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
'shopType'
:
funcResponse
[
i
].
genre
,
}
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
shopRecommendB
:
funcList
})
}
}
this
.
setData
({
shopRecommendB
:
funcList
})
})
})
// 底部第一商店推荐
// 底部第一商店推荐
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/recommend'
,
url
:
'v1/commodity/recommend'
,
data
:
{
params
:
{
'officeId'
:
funcShopInfo
[
2
].
shopId
,
'officeId'
:
funcShopInfo
[
2
].
shopId
,
'genre'
:
4
,
'genre'
:
4
,
'tag'
:
'202'
,
'tag'
:
'202'
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'pageSize'
:
4
'pageSize'
:
4
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'name'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'name'
:
funcResponse
[
i
].
name
,
'shopType'
:
funcResponse
[
i
].
genre
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
'shopType'
:
funcResponse
[
i
].
genre
,
}
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
shopRecommendC
:
funcList
})
}
}
this
.
setData
({
shopRecommendC
:
funcList
})
})
})
// 底部第二商店推荐
// 底部第二商店推荐
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/recommend'
,
url
:
'v1/commodity/recommend'
,
data
:
{
params
:
{
'officeId'
:
funcShopInfo
[
3
].
shopId
,
'officeId'
:
funcShopInfo
[
3
].
shopId
,
'genre'
:
4
,
'genre'
:
4
,
'tag'
:
'202'
,
'tag'
:
'202'
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'pageSize'
:
4
'pageSize'
:
4
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'name'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'name'
:
funcResponse
[
i
].
name
,
'shopType'
:
funcResponse
[
i
].
genre
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
'shopType'
:
funcResponse
[
i
].
genre
,
}
'sideBarId'
:
funcResponse
[
i
].
classifyId
,
// 商品所属标签
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
shopRecommendD
:
funcList
})
}
}
this
.
setData
({
shopRecommendD
:
funcList
})
})
})
},
},
...
...
pages/commodity/menu-food/menu-food.js
View file @
881999b9
...
@@ -149,41 +149,41 @@ Page({
...
@@ -149,41 +149,41 @@ Page({
* @returns
* @returns
*/
*/
querySideBar
:
function
()
{
querySideBar
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getClassifys'
,
url
:
'v1/commodity/getClassifys'
,
data
:
{
params
:
{
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
},
},
success
:
(
response
)
=>
{
})
let
funcSideBar
=
[]
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcSideBar
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcResponse
=
response
.
data
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
let
funcItem
=
{
'tab'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
}
'tab'
:
funcResponse
[
i
].
name
,
funcSideBar
.
push
(
funcItem
)
}
}
funcSideBar
.
push
(
funcItem
)
}
// 判断是否从推荐菜单进入
// 判断是否从推荐菜单进入
if
(
this
.
data
.
option
.
sideBarId
)
{
if
(
this
.
data
.
option
.
sideBarId
)
{
for
(
let
i
=
0
,
l
=
funcSideBar
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
funcSideBar
.
length
;
i
<
l
;
i
++
)
{
if
(
funcSideBar
[
i
].
id
===
this
.
data
.
option
.
sideBarId
)
{
if
(
funcSideBar
[
i
].
id
===
this
.
data
.
option
.
sideBarId
)
{
this
.
setData
({
this
.
setData
({
sideBarIndex
:
i
sideBarIndex
:
i
})
})
break
break
}
}
}
}
}
}
this
.
setData
({
this
.
setData
({
sideBar
:
funcSideBar
,
sideBar
:
funcSideBar
,
})
})
this
.
queryCommodity
()
this
.
queryCommodity
()
}
})
})
},
},
...
@@ -422,24 +422,24 @@ Page({
...
@@ -422,24 +422,24 @@ Page({
onCommodityDetail
:
function
(
event
)
{
onCommodityDetail
:
function
(
event
)
{
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommodityParticulars'
,
url
:
'v1/commodity/getCommodityParticulars'
,
data
:
{
params
:
{
'commodityId'
:
funcItem
.
id
,
'commodityId'
:
funcItem
.
id
,
'classifyId'
:
funcItem
.
typeId
,
'classifyId'
:
funcItem
.
typeId
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
funcItem
.
banner
=
funcResponse
.
imgs
.
split
(
'|'
)
let
funcResponse
=
response
.
data
funcItem
.
banner
.
pop
()
funcItem
.
banner
=
funcResponse
.
imgs
.
split
(
'|'
)
funcItem
.
describeDetail
=
funcResponse
.
particulars
funcItem
.
banner
.
pop
()
funcItem
.
describeDetail
=
funcResponse
.
particulars
this
.
setData
({
this
.
setData
({
commodityDetail
:
funcItem
,
commodityDetail
:
funcItem
,
winCommodityDetail
:
true
winCommodityDetail
:
true
})
})
}
})
})
},
},
...
...
pages/commodity/project-detail/project-detail.js
View file @
881999b9
...
@@ -68,109 +68,107 @@ Page({
...
@@ -68,109 +68,107 @@ Page({
shopInfo
:
wx
.
getStorageSync
(
'shopInfoBuffer'
)
shopInfo
:
wx
.
getStorageSync
(
'shopInfoBuffer'
)
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommoditys'
,
url
:
'v1/commodity/getCommoditys'
,
data
:
{
params
:
{
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
},
},
success
:
(
response
)
=>
{
})
let
funcCommodityList
=
[]
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcCommodityList
=
[]
let
funcResponse
=
response
.
data
switch
(
this
.
data
.
shopInfo
.
shopType
)
{
// 年卡月卡
switch
(
this
.
data
.
shopInfo
.
shopType
)
{
case
1
:
// 年卡月卡
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
case
1
:
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'name'
:
funcResponse
[
i
].
name
,
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'name'
:
funcResponse
[
i
].
name
,
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceType'
:
1
,
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'describe'
:
funcResponse
[
i
].
synopsis
,
'priceType'
:
1
,
'tags'
:
funcResponse
[
i
].
tags
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
'tags'
:
funcResponse
[
i
].
tags
,
}
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
}
funcCommodityList
.
push
(
funcItem
)
funcCommodityList
.
push
(
funcItem
)
}
break
// 普通商品
case
2
:
// 门票商品
case
3
:
default
:
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'tags'
:
funcResponse
[
i
].
tags
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
}
break
// 普通商品
case
2
:
// 门票商品
case
3
:
default
:
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'tags'
:
funcResponse
[
i
].
tags
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
break
funcCommodityList
.
push
(
funcItem
)
}
}
break
this
.
setData
({
}
winLoading
:
false
,
commodityList
:
this
.
data
.
commodityList
.
concat
(
funcCommodityList
),
this
.
setData
({
})
winLoading
:
false
,
commodityList
:
this
.
data
.
commodityList
.
concat
(
funcCommodityList
),
console
.
log
(
this
.
data
.
commodityList
)
})
},
})
})
},
},
...
@@ -179,107 +177,107 @@ Page({
...
@@ -179,107 +177,107 @@ Page({
shopInfo
:
wx
.
getStorageSync
(
'shopInfoBuffer'
)
shopInfo
:
wx
.
getStorageSync
(
'shopInfoBuffer'
)
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommoditys'
,
url
:
'v1/commodity/getCommoditys'
,
data
:
{
params
:
{
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'genre'
:
3
,
'genre'
:
3
,
},
},
success
:
(
response
)
=>
{
})
let
funcCommodityList
=
[]
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcCommodityList
=
[]
let
funcResponse
=
response
.
data
switch
(
3
)
{
// 年卡月卡
switch
(
3
)
{
case
1
:
// 年卡月卡
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
case
1
:
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'name'
:
funcResponse
[
i
].
name
,
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'name'
:
funcResponse
[
i
].
name
,
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceType'
:
1
,
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'describe'
:
funcResponse
[
i
].
synopsis
,
'priceType'
:
1
,
'tags'
:
funcResponse
[
i
].
tags
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
'tags'
:
funcResponse
[
i
].
tags
,
}
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
break
// 普通商品
funcCommodityList
.
push
(
funcItem
)
case
2
:
}
// 门票商品
break
case
3
:
default
:
// 普通商品
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
case
2
:
let
funcItem
=
{
// 门票商品
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
case
3
:
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
default
:
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
let
funcItem
=
{
'dateInvalid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 失效时间
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'name'
:
funcResponse
[
i
].
name
,
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
// 商品封面
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'dateInvalid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 失效时间
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'name'
:
funcResponse
[
i
].
name
,
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'cover'
:
funcResponse
[
i
].
ticketsImg
?
funcResponse
[
i
].
ticketsImg
:
this
.
data
.
resourcesBase
+
'service/service.png'
,
// 商品封面
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceType'
:
1
,
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'describe'
:
funcResponse
[
i
].
synopsis
,
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'tags'
:
funcResponse
[
i
].
tags
,
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
}
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'tags'
:
funcResponse
[
i
].
tags
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
break
funcCommodityList
.
push
(
funcItem
)
}
}
break
this
.
setData
({
}
winLoading
:
false
,
commodityList
:
this
.
data
.
commodityList
.
concat
(
funcCommodityList
),
this
.
setData
({
})
winLoading
:
false
,
},
commodityList
:
this
.
data
.
commodityList
.
concat
(
funcCommodityList
),
})
})
})
},
},
...
...
pages/commodity/project/project.js
View file @
881999b9
...
@@ -34,28 +34,28 @@ Page({
...
@@ -34,28 +34,28 @@ Page({
},
},
queryBanner
:
function
()
{
queryBanner
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/banner/getOfficeByBanner'
,
url
:
'v1/banner/getOfficeByBanner'
,
data
:
{
params
:
{
'smColumnId'
:
1
,
'smColumnId'
:
1
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
let
funcItem
=
{
'cover'
:
funcResponse
[
i
].
img
,
'id'
:
funcResponse
[
i
].
id
,
'targetId'
:
funcResponse
[
i
].
jumpId
,
// 跳转目标 id
'cover'
:
funcResponse
[
i
].
img
,
'targetType'
:
Number
(
funcResponse
[
i
].
jumpColumnId
),
'targetId'
:
funcResponse
[
i
].
jumpId
,
// 跳转目标 id
}
'targetType'
:
Number
(
funcResponse
[
i
].
jumpColumnId
),
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
banner
:
funcList
})
}
}
this
.
setData
({
banner
:
funcList
})
})
})
},
},
...
@@ -73,137 +73,135 @@ Page({
...
@@ -73,137 +73,135 @@ Page({
}
}
}
}
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommoditys'
,
url
:
'v1/commodity/getCommoditys'
,
data
:
{
params
:
{
'officeId'
:
funcShopId
,
'officeId'
:
funcShopId
,
'genre'
:
funcCommodityType
,
'genre'
:
funcCommodityType
,
},
},
success
:
(
response
)
=>
{
})
let
funcCommodityList
=
[]
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcCommodityList
=
[]
let
funcResponse
=
response
.
data
switch
(
funcCommodityType
)
{
// 年卡月卡
switch
(
funcCommodityType
)
{
case
1
:
// 年卡月卡
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
case
1
:
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类型
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'inventoriesId'
:
funcResponse
[
i
].
inventorie
[
0
].
inventoriesId
,
// 仓库标识
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'name'
:
funcResponse
[
i
].
name
,
'dateInvalid'
:
funcResponse
[
i
].
inventorie
[
0
].
cardNam
,
// 失效时间
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'name'
:
funcResponse
[
i
].
name
,
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
sightseerPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
,
// 业主价
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
ownerPrice
),
// 业主价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'priceDiscount'
:
funcResponse
[
i
].
inventorie
[
0
].
price
,
// 活动价
'priceType'
:
1
,
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
inventorie
[
0
].
price
),
// 活动价文本格式
'describe'
:
funcResponse
[
i
].
synopsis
,
'priceType'
:
1
,
'tags'
:
funcResponse
[
i
].
tags
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
'tags'
:
funcResponse
[
i
].
tags
,
}
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
break
funcCommodityList
.
push
(
funcItem
)
// 普通商品
case
2
:
// 门票商品
case
3
:
default
:
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'tags'
:
funcResponse
[
i
].
tags
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
}
break
// 普通商品
case
2
:
// 门票商品
case
3
:
default
:
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品分类标识
'inventoriesId'
:
funcResponse
[
i
].
inventoriesId
,
// 仓库标识
'dateValid'
:
App
.
modular
.
miment
().
format
(
'YYYY.MM.DD'
),
// 有效时间
'dateInvalid'
:
funcResponse
[
i
].
cardNam
,
// 失效时间
'name'
:
funcResponse
[
i
].
name
,
'cover'
:
funcResponse
[
i
].
coverImg
,
// 商品封面
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceType'
:
1
,
'describe'
:
funcResponse
[
i
].
synopsis
,
'tags'
:
funcResponse
[
i
].
tags
,
'notificationId'
:
funcResponse
[
i
].
notificationId
,
// 下单须知
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
break
funcCommodityList
.
push
(
funcItem
)
}
}
break
}
let
funcShopCommodityData
=
this
.
data
.
shopCommodityData
let
funcShopCommodityData
=
this
.
data
.
shopCommodityData
funcShopCommodityData
[
funcIndex
]
=
funcCommodityList
funcShopCommodityData
[
funcIndex
]
=
funcCommodityList
this
.
setData
({
this
.
setData
({
shopCommodityData
:
funcShopCommodityData
,
shopCommodityData
:
funcShopCommodityData
,
})
// 水养韵苑服务数据暂时固定
if
(
funcShopAppId
===
7
)
{
let
funcCommodityItem
=
funcCommodityList
[
0
]
funcCommodityItem
.
cover
=
this
.
data
.
resourcesBase
+
'shop/cover-7.png'
funcCommodityItem
.
name
=
'SPA套餐'
funcCommodityItem
.
describe
=
''
funcCommodityList
=
[
funcCommodityItem
]
App
.
request
({
url
:
'v1/commodity/getSpaPriceRange'
,
params
:
{},
})
})
.
then
((
response
)
=>
{
// 水养韵苑服务数据暂时固定
let
funcResponse
=
response
.
data
if
(
funcShopAppId
===
7
)
{
funcCommodityItem
.
priceMin
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPriceMin
)
let
funcCommodityItem
=
funcCommodityList
[
0
]
funcCommodityItem
.
priceMax
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPriceMax
)
funcCommodityItem
.
cover
=
this
.
data
.
resourcesBase
+
'shop/cover-7.png'
funcCommodityItem
.
priceSpecialMin
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPriceMin
)
funcCommodityItem
.
name
=
'SPA套餐'
funcCommodityItem
.
priceSpecialMax
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPriceMax
)
funcCommodityItem
.
describe
=
''
funcCommodityList
=
[
funcCommodityItem
]
let
funcShopCommodityData
=
this
.
data
.
shopCommodityData
funcShopCommodityData
[
funcIndex
]
=
funcCommodityList
App
.
wxRequest
({
this
.
setData
({
url
:
'v1/commodity/getSpaPriceRange'
,
shopCommodityData
:
funcShopCommodityData
,
data
:
{
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
funcCommodityItem
.
priceMin
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPriceMin
)
funcCommodityItem
.
priceMax
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPriceMax
)
funcCommodityItem
.
priceSpecialMin
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPriceMin
)
funcCommodityItem
.
priceSpecialMax
=
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPriceMax
)
let
funcShopCommodityData
=
this
.
data
.
shopCommodityData
funcShopCommodityData
[
funcIndex
]
=
funcCommodityList
this
.
setData
({
shopCommodityData
:
funcShopCommodityData
,
})
}
})
})
}
}
)
}
,
}
})
})
},
},
...
@@ -274,28 +272,28 @@ Page({
...
@@ -274,28 +272,28 @@ Page({
// 商品
// 商品
// 跳转商品下单,需要查询商品参数
// 跳转商品下单,需要查询商品参数
if
(
funcItme
.
targetId
===
''
)
return
if
(
funcItme
.
targetId
===
''
)
return
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommodityParticulars'
,
url
:
'v1/commodity/getCommodityParticulars'
,
data
:
{
params
:
{
'commodityId'
:
funcItme
.
targetId
'commodityId'
:
funcItme
.
targetId
},
},
success
:
(
response
)
=>
{
})
let
funcCommodityInfo
=
App
.
setCommodityInfo
(
response
.
data
)
.
then
((
response
)
=>
{
let
funcCommodityInfo
=
App
.
setCommodityInfo
(
response
.
data
)
let
funcShopInfo
=
App
.
globalData
.
shopId
for
(
let
i
=
0
,
l
=
funcShopInfo
.
length
;
i
<
l
;
i
++
)
{
let
funcShopInfo
=
App
.
globalData
.
shopId
if
(
funcCommodityInfo
.
shopId
===
funcShopInfo
[
i
].
id
)
{
for
(
let
i
=
0
,
l
=
funcShopInfo
.
length
;
i
<
l
;
i
++
)
{
App
.
setShopInfo
(
funcShopInfo
[
i
].
appId
,
funcCommodityInfo
.
typeId
)
if
(
funcCommodityInfo
.
shopId
===
funcShopInfo
[
i
].
id
)
{
break
App
.
setShopInfo
(
funcShopInfo
[
i
].
appId
,
funcCommodityInfo
.
typeId
)
}
break
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
funcUrl
=
'/pages/pay/order-input/order-input?type='
+
funcCommodityInfo
.
typeId
wx
.
navigateTo
({
url
:
funcUrl
})
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcCommodityInfo
])
funcUrl
=
'/pages/pay/order-input/order-input?type='
+
funcCommodityInfo
.
typeId
wx
.
navigateTo
({
url
:
funcUrl
})
})
})
break
break
}
}
...
...
pages/commodity/room-appointment/room-appointment.js
View file @
881999b9
...
@@ -197,36 +197,35 @@ Page({
...
@@ -197,36 +197,35 @@ Page({
duration
:
60000
,
duration
:
60000
,
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/subscribe/doSubscribe'
,
url
:
'v1/subscribe/doSubscribe'
,
data
:
{
params
:
{
mobile
:
this
.
data
.
formPhone
,
mobile
:
this
.
data
.
formPhone
,
subscribeNum
:
this
.
data
.
formQuantity
,
subscribeNum
:
this
.
data
.
formQuantity
,
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
name
:
this
.
data
.
formName
,
name
:
this
.
data
.
formName
,
type
:
1
,
type
:
1
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
then
((
response
)
=>
{
if
(
response
.
data
&&
response
.
data
.
code
===
500
)
{
if
(
response
.
data
&&
response
.
data
.
code
===
500
)
{
App
.
ui
.
showToast
({
iconType
:
'error'
,
title
:
response
.
data
.
msg
,
})
return
}
App
.
ui
.
hideToast
()
this
.
setData
({
appointmentComplete
:
true
,
})
},
fail
:
(
response
)
=>
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
iconType
:
'error'
,
iconType
:
'error'
,
title
:
response
.
msg
,
title
:
response
.
data
.
msg
,
})
})
return
}
}
App
.
ui
.
hideToast
()
this
.
setData
({
appointmentComplete
:
true
,
})
})
.
catch
((
response
)
=>
{
App
.
ui
.
showToast
({
iconType
:
'error'
,
title
:
response
.
msg
,
})
})
})
},
},
...
...
pages/home/dynamic-detail/dynamic-detail.js
View file @
881999b9
...
@@ -17,25 +17,26 @@ Page({
...
@@ -17,25 +17,26 @@ Page({
// 最新动态详情
// 最新动态详情
getNoticeDetail
()
{
getNoticeDetail
()
{
var
that
=
this
App
.
request
({
App
.
wxRequest
({
url
:
'v1/dynamic/getDetail'
,
url
:
'v1/dynamic/getDetail'
,
data
:
{
id
:
that
.
data
.
id
},
params
:
{
success
:
function
(
res
)
{
id
:
this
.
data
.
id
var
content
=
res
.
data
.
content
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
},
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
})
.
replace
(
/<section/g
,
'<div'
)
.
then
((
response
)
=>
{
.
replace
(
/
\/
section>/g
,
'\div>'
);
let
content
=
response
.
data
.
content
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
var
response
=
{
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
cover
:
res
.
data
.
imgs
.
length
>
0
?
res
.
data
.
imgs
[
0
]
:
''
,
.
replace
(
/<section/g
,
'<div'
)
title
:
res
.
data
.
title
,
.
replace
(
/
\/
section>/g
,
'\div>'
);
date
:
res
.
data
.
releaseTime
,
let
funcResponse
=
{
describe
:
content
,
cover
:
response
.
data
.
imgs
.
length
>
0
?
response
.
data
.
imgs
[
0
]
:
''
,
}
title
:
response
.
data
.
title
,
that
.
setData
({
date
:
response
.
data
.
releaseTime
,
notice
:
response
describe
:
content
,
})
}
}
this
.
setData
({
notice
:
funcResponse
})
})
})
},
},
...
...
pages/home/dynamic/dynamic.js
View file @
881999b9
...
@@ -24,49 +24,50 @@ Page({
...
@@ -24,49 +24,50 @@ Page({
// 最新动态列表
// 最新动态列表
getNoticeList
()
{
getNoticeList
()
{
var
that
=
this
App
.
request
({
App
.
wxRequest
({
url
:
'v1/dynamic/getList'
,
url
:
'v1/dynamic/getList'
,
data
:
{
pageSize
:
that
.
data
.
pageSize
,
pageNo
:
that
.
data
.
pageNo
},
params
:
{
success
:
function
(
res
)
{
pageSize
:
this
.
data
.
pageSize
,
that
.
setData
({
pageNo
:
this
.
data
.
pageNo
loading
:
false
})
let
count
=
that
.
data
.
notice
.
length
var
tmpArr
=
[];
res
.
data
.
list
.
forEach
(
item
=>
{
var
content
=
item
.
summary
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
);
var
tmpItem
=
{
id
:
item
.
id
,
cover
:
item
.
imgs
.
length
>
0
?
item
.
imgs
[
0
]
:
''
,
title
:
item
.
title
,
date
:
item
.
releaseTime
,
describe
:
content
,
}
tmpArr
.
push
(
tmpItem
)
})
if
(
that
.
data
.
pageNo
==
1
)
{
that
.
setData
({
moreData
:
(
tmpArr
.
length
>=
Number
(
res
.
data
.
count
))
?
false
:
true
,
notice
:
tmpArr
})
}
else
{
that
.
setData
({
moreData
:
(
tmpArr
.
length
+
count
>=
Number
(
res
.
data
.
count
))
?
false
:
true
,
notice
:
that
.
data
.
notice
.
concat
(
tmpArr
)
})
}
},
},
fail
:
function
(
err
)
{
})
that
.
setData
({
.
then
((
response
)
=>
{
loading
:
false
this
.
setData
({
loading
:
false
})
let
count
=
this
.
data
.
notice
.
length
var
tmpArr
=
[];
response
.
data
.
list
.
forEach
(
item
=>
{
var
content
=
item
.
summary
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
);
var
tmpItem
=
{
id
:
item
.
id
,
cover
:
item
.
imgs
.
length
>
0
?
item
.
imgs
[
0
]
:
''
,
title
:
item
.
title
,
date
:
item
.
releaseTime
,
describe
:
content
,
}
tmpArr
.
push
(
tmpItem
)
})
if
(
this
.
data
.
pageNo
==
1
)
{
this
.
setData
({
moreData
:
(
tmpArr
.
length
>=
Number
(
response
.
data
.
count
))
?
false
:
true
,
notice
:
tmpArr
})
}
else
{
this
.
setData
({
moreData
:
(
tmpArr
.
length
+
count
>=
Number
(
response
.
data
.
count
))
?
false
:
true
,
notice
:
this
.
data
.
notice
.
concat
(
tmpArr
)
})
})
}
}
})
})
.
catch
((
response
)
=>
{
this
.
setData
({
loading
:
false
})
})
},
},
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
...
...
pages/home/history/history.js
View file @
881999b9
...
@@ -21,14 +21,15 @@ Page({
...
@@ -21,14 +21,15 @@ Page({
},
},
getBrands
:
function
(
index
)
{
getBrands
:
function
(
index
)
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/common/getBrands'
,
url
:
'v1/common/getBrands'
,
success
:
(
response
)
=>
{
params
:
{},
let
history
=
response
.
data
[
index
]
})
this
.
setData
({
.
then
((
response
)
=>
{
history
let
history
=
response
.
data
[
index
]
})
this
.
setData
({
}
history
})
})
})
},
},
})
})
\ No newline at end of file
pages/home/night-appointment/night-appointment.js
View file @
881999b9
...
@@ -231,36 +231,36 @@ Page({
...
@@ -231,36 +231,36 @@ Page({
title
:
'提交中'
,
title
:
'提交中'
,
duration
:
60000
,
duration
:
60000
,
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/subscribe/doSubscribe'
,
url
:
'v1/subscribe/doSubscribe'
,
data
:
{
params
:
{
mobile
:
this
.
data
.
formPhone
,
mobile
:
this
.
data
.
formPhone
,
subscribeNum
:
this
.
data
.
formQuantity
,
subscribeNum
:
this
.
data
.
formQuantity
,
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
name
:
this
.
data
.
formName
,
name
:
this
.
data
.
formName
,
type
:
0
,
type
:
0
,
},
},
success
:
(
res
)
=>
{
})
if
(
res
.
data
&&
res
.
data
.
code
==
500
)
{
.
then
((
response
)
=>
{
App
.
ui
.
showToast
({
if
(
response
.
data
&&
response
.
data
.
code
==
500
)
{
iconType
:
'error'
,
title
:
res
.
data
.
msg
,
})
}
else
{
this
.
setData
({
appointmentComplete
:
true
,
})
App
.
ui
.
hideToast
()
}
},
fail
:
(
err
)
=>
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
iconType
:
'error'
,
iconType
:
'error'
,
title
:
err
.
msg
,
title
:
response
.
data
.
msg
,
})
})
}
else
{
this
.
setData
({
appointmentComplete
:
true
,
})
App
.
ui
.
hideToast
()
}
}
})
})
.
catch
((
response
)
=>
{
App
.
ui
.
showToast
({
iconType
:
'error'
,
title
:
response
.
msg
,
})
})
},
},
onAppointmentComplete
:
function
()
{
onAppointmentComplete
:
function
()
{
...
@@ -274,20 +274,20 @@ Page({
...
@@ -274,20 +274,20 @@ Page({
// 预约入园查询返回剩余名额
// 预约入园查询返回剩余名额
queryQuota
:
function
()
{
queryQuota
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/subscribe/getResidue'
,
url
:
'v1/subscribe/getResidue'
,
data
:
{
params
:
{
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
subscribeDate
:
this
.
data
.
formDate
+
' 00:00:00'
,
type
:
0
,
type
:
0
,
},
},
success
:
(
res
)
=>
{
})
this
.
setData
(
{
.
then
((
response
)
=>
{
total
:
res
.
data
.
total
,
this
.
setData
({
winQuota
:
true
,
total
:
response
.
data
.
total
,
formQuantity
:
0
,
winQuota
:
true
,
})
formQuantity
:
0
,
this
.
updateSubmitButtonStatus
(
)
}
)
}
this
.
updateSubmitButtonStatus
()
})
})
},
},
...
...
pages/login/login.js
View file @
881999b9
...
@@ -22,90 +22,67 @@ Page({
...
@@ -22,90 +22,67 @@ Page({
})
})
},
},
navBack
:
function
(
e
)
{
if
(
this
.
data
.
islogin
&&
this
.
data
.
isphone
)
{
console
.
log
(
'授权及绑定成功'
)
}
else
{
console
.
log
(
'back home'
)
// setTimeout(()=>{
// wx.switchTab({
// url: '/pages/home/home',
// })
// },300)
}
},
/*
/*
* 获取用户信息
* 获取用户信息
*/
*/
userInfoHandler
:
function
(
res
)
{
onGetUserInfo
:
function
(
funcEvent
)
{
let
funcGetUserInfo
=
res
.
detail
.
userInfo
console
.
log
(
funcEvent
)
if
(
!
res
.
detail
.
userInfo
)
{
if
(
funcEvent
.
detail
.
errMsg
===
'getUserInfo:ok'
)
{
return
let
funcUserInfo
=
{
}
'name'
:
funcEvent
.
detail
.
userInfo
.
nickName
,
'avatar'
:
funcEvent
.
detail
.
userInfo
.
avatarUrl
,
let
funcUserInfo
=
this
.
data
.
userInfo
}
funcUserInfo
.
avatar
=
funcGetUserInfo
.
avatarUrl
funcUserInfo
.
name
=
funcGetUserInfo
.
nickName
App
.
request
({
funcUserInfo
.
sex
=
funcGetUserInfo
.
gender
url
:
'v1/login/getDecryptData'
,
params
:
{
this
.
registUserInfo
({
'iv'
:
''
,
param
:
{
'sessionKey'
:
''
,
avatarUrl
:
funcUserInfo
.
avatar
,
'encryptedData'
:
''
,
nickName
:
funcUserInfo
.
name
,
'nickName'
:
funcUserInfo
.
name
,
sessionKey
:
''
,
'avatarUrl'
:
funcUserInfo
.
avatar
,
encryptedData
:
''
,
}
,
iv
:
''
,
})
},
.
then
((
response
)
=>
{
success
:
(
res
)
=>
{
wx
.
setStorageSync
(
'userInfo'
,
Object
.
assign
(
wx
.
getStorageSync
(
'userInfo'
),
funcUserInfo
))
this
.
setData
({
this
.
setData
({
islogin
:
true
islogin
:
true
})
})
setTimeout
(()
=>
{
this
.
checkFinish
()
this
.
checkFinish
()
})
},
1000
)
}
}
})
},
},
/*
/*
* 绑定手机号
* 绑定手机号
*/
*/
userPhoneHandler
:
function
(
res
)
{
userPhoneHandler
:
function
(
funcEvent
)
{
if
(
!
res
.
detail
.
encryptedData
)
{
console
.
log
(
funcEvent
)
if
(
!
funcEvent
.
detail
.
encryptedData
)
{
return
return
}
}
let
sessionKey
=
wx
.
getStorageSync
(
'sessionKey'
)
let
funcUserInfo
=
wx
.
getStorageSync
(
'userInfo'
)
let
funcUserInfo
=
wx
.
getStorageSync
(
'userInfo'
)
this
.
registUserInfo
({
let
funcIv
=
funcEvent
.
detail
.
iv
param
:
{
let
funcSessionKey
=
wx
.
getStorageSync
(
'sessionKey'
)
avatarUrl
:
funcUserInfo
.
avatar
,
let
funcEncryptedData
=
funcEvent
.
detail
.
encryptedData
nickName
:
funcUserInfo
.
name
,
sessionKey
:
sessionKey
,
App
.
request
({
encryptedData
:
res
.
detail
.
encryptedData
,
url
:
'v1/login/getDecryptData'
,
iv
:
res
.
detail
.
iv
,
params
:
{
'iv'
:
funcIv
,
'sessionKey'
:
funcSessionKey
,
'encryptedData'
:
funcEncryptedData
,
'nickName'
:
''
,
'avatarUrl'
:
''
,
},
},
success
:
(
res
)
=>
{
funcUserInfo
.
phone
=
res
.
data
.
phoneNumber
this
.
setData
({
isphone
:
true
})
setTimeout
(()
=>
{
this
.
checkFinish
()
},
1000
)
}
})
})
},
.
then
((
response
)
=>
{
funcUserInfo
.
phone
=
response
.
data
.
phoneNumber
registUserInfo
:
function
(
obj
)
{
wx
.
setStorageSync
(
'userInfo'
,
Object
.
assign
(
wx
.
getStorageSync
(
'userInfo'
),
funcUserInfo
))
App
.
registUserInfo
({
this
.
setData
({
param
:
obj
.
param
,
isphone
:
true
success
:
function
(
res
)
{
})
if
(
obj
.
success
)
{
this
.
checkFinish
()
obj
.
success
(
res
)
}
}
})
})
},
},
...
@@ -117,7 +94,7 @@ Page({
...
@@ -117,7 +94,7 @@ Page({
let
funcTimer
=
setTimeout
(()
=>
{
let
funcTimer
=
setTimeout
(()
=>
{
wx
.
navigateBack
({})
wx
.
navigateBack
({})
clearTimeout
(
funcTimer
)
clearTimeout
(
funcTimer
)
},
1
000
)
},
2
000
)
}
}
}
}
})
})
\ No newline at end of file
pages/login/login.wxml
View file @
881999b9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<image src="{{resourcesBase + 'login/content.png'}}"></image>
<image src="{{resourcesBase + 'login/content.png'}}"></image>
</view>
</view>
<view class="login-operation">
<view class="login-operation">
<button class="login-operation-authorization" hidden="{{islogin}}" open-type="getUserInfo" bindgetuserinfo="
userInfoHandler
">微信授权登录</button>
<button class="login-operation-authorization" hidden="{{islogin}}" open-type="getUserInfo" bindgetuserinfo="
onGetUserInfo
">微信授权登录</button>
<view class="login-operation-authorization-complete row cc ac" hidden="{{!islogin}}">
<view class="login-operation-authorization-complete row cc ac" hidden="{{!islogin}}">
<text class="fs30 fw400">已授权</text>
<text class="fs30 fw400">已授权</text>
<image class="i32" src="../../image/icon/tick-3.png"></image>
<image class="i32" src="../../image/icon/tick-3.png"></image>
...
...
pages/mine/appointment-detail/appointment-detail.js
View file @
881999b9
...
@@ -368,25 +368,25 @@ Page({
...
@@ -368,25 +368,25 @@ Page({
'duration'
:
60000
'duration'
:
60000
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/volume/getVolume'
,
url
:
'v1/volume/getVolume'
,
data
:
{
params
:
{
'volumeId'
:
funcOrderInfo
.
codeId
'volumeId'
:
funcOrderInfo
.
codeId
},
},
success
:
(
response
)
=>
{
})
App
.
ui
.
hideToast
()
.
then
((
response
)
=>
{
App
.
ui
.
hideToast
()
let
funcResponse
=
response
.
data
let
funcResponse
=
response
.
data
let
funcCodeInfo
=
{
let
funcCodeInfo
=
{
'codeNo'
:
funcResponse
.
serialNumber
,
'codeNo'
:
funcResponse
.
serialNumber
,
'codeName'
:
funcResponse
.
name
,
'codeName'
:
funcResponse
.
name
,
'codeBase64'
:
funcResponse
.
qrcode
,
'codeBase64'
:
funcResponse
.
qrcode
,
}
this
.
setData
({
codeInfo
:
funcCodeInfo
,
winCode
:
true
,
})
}
}
this
.
setData
({
codeInfo
:
funcCodeInfo
,
winCode
:
true
,
})
})
})
},
},
// 多二维码 复制券码
// 多二维码 复制券码
...
...
pages/mine/appointment-ticket/appointment-ticket.js
View file @
881999b9
...
@@ -62,46 +62,45 @@ Page({
...
@@ -62,46 +62,45 @@ Page({
isDoing
:
true
isDoing
:
true
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/subscribe/cancelSubscribe'
,
url
:
'v1/subscribe/cancelSubscribe'
,
data
:
{
params
:
{
'id'
:
this
.
data
.
tickerInfo
.
id
'id'
:
this
.
data
.
tickerInfo
.
id
},
},
success
:
(
response
)
=>
{
})
App
.
ui
.
hideToast
()
.
then
((
response
)
=>
{
this
.
setData
({
App
.
ui
.
hideToast
()
isDoing
:
false
this
.
setData
({
})
isDoing
:
false
})
if
(
response
.
data
&&
response
.
data
.
code
==
500
)
{
if
(
response
.
data
&&
response
.
data
.
code
==
500
)
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
'iconType'
:
'error'
,
'iconType'
:
'error'
,
'title'
:
response
.
data
.
msg
,
'title'
:
response
.
data
.
msg
,
})
})
}
else
{
}
else
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
'iconType'
:
'success'
,
'iconType'
:
'success'
,
'title'
:
'取消成功'
'title'
:
'取消成功'
})
setTimeout
(()
=>
{
let
type
=
this
.
data
.
type
let
tabType
=
2
if
(
type
==
0
)
{
//返回夜间入园预约列表
tabType
=
1
}
else
{
// 返回看房预约
tabType
=
2
}
wx
.
redirectTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
tabType
,
})
})
setTimeout
(()
=>
{
},
2000
);
let
type
=
this
.
data
.
type
let
tabType
=
2
if
(
type
==
0
)
{
//返回夜间入园预约列表
tabType
=
1
}
else
{
// 返回看房预约
tabType
=
2
}
wx
.
redirectTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
tabType
,
})
},
2000
);
}
}
}
})
})
},
},
fail
:
()
=>
{},
})
})
},
},
//客服热线拨打
//客服热线拨打
...
...
pages/mine/appointment/appointment.js
View file @
881999b9
...
@@ -252,36 +252,35 @@ Page({
...
@@ -252,36 +252,35 @@ Page({
isDoing
:
true
isDoing
:
true
})
})
let
funcItem
=
event
.
target
.
dataset
.
item
let
funcItem
=
event
.
target
.
dataset
.
item
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/activity/doCancel'
,
url
:
'v1/activity/doCancel'
,
data
:
{
params
:
{
'enrollId'
:
funcItem
.
enrollId
,
'enrollId'
:
funcItem
.
enrollId
,
'type'
:
type
,
//0取消1删除
'type'
:
type
,
//0取消1删除
},
},
success
:
(
response
)
=>
{
})
App
.
ui
.
hideToast
()
.
then
((
response
)
=>
{
if
(
response
.
data
&&
response
.
data
.
code
==
500
)
{
App
.
ui
.
hideToast
()
App
.
ui
.
showToast
({
if
(
response
.
data
&&
response
.
data
.
code
==
500
)
{
'iconType'
:
'error'
,
App
.
ui
.
showToast
({
'title'
:
response
.
data
.
msg
,
'iconType'
:
'error'
,
})
'title'
:
response
.
data
.
msg
,
}
else
{
})
App
.
ui
.
showToast
({
}
else
{
'iconType'
:
'success'
,
App
.
ui
.
showToast
({
'title'
:
type
==
0
?
'取消成功'
:
'删除成功'
,
'iconType'
:
'success'
,
'title'
:
type
==
0
?
'取消成功'
:
'删除成功'
,
})
setTimeout
(()
=>
{
this
.
setData
({
'isDoing'
:
false
,
'pageNo'
:
1
,
})
})
setTimeout
(()
=>
{
this
.
queryActivityList
()
this
.
setData
({
},
2000
);
'isDoing'
:
false
,
'pageNo'
:
1
,
})
this
.
queryActivityList
()
},
2000
);
}
}
}
})
})
},
},
fail
:
()
=>
{},
})
})
},
},
// 预约列表/我的预约
// 预约列表/我的预约
...
@@ -308,47 +307,47 @@ Page({
...
@@ -308,47 +307,47 @@ Page({
this
.
setData
({
this
.
setData
({
isLoading
:
true
isLoading
:
true
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/subscribe/getList'
,
url
:
'v1/subscribe/getList'
,
data
:
{
params
:
{
state
:
1
,
//未过期 1,其他 空字符""
state
:
1
,
//未过期 1,其他 空字符""
type
:
type
//0 入园预约 1 看房预约 全部 空字符
type
:
type
//0 入园预约 1 看房预约 全部 空字符
},
},
success
:
(
res
)
=>
{
})
App
.
ui
.
hideToast
()
.
then
((
response
)
=>
{
let
tmpArr
=
[]
App
.
ui
.
hideToast
()
res
.
data
.
forEach
(
item
=>
{
let
tmpArr
=
[]
let
type
=
item
.
type
*
1
response
.
data
.
forEach
(
item
=>
{
let
title
=
''
let
type
=
item
.
type
*
1
let
url
=
''
let
title
=
''
switch
(
type
)
{
let
url
=
''
case
0
:
switch
(
type
)
{
title
=
'夜间入园预约'
case
0
:
url
=
'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg
'
title
=
'夜间入园预约
'
break
;
url
=
'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
case
1
:
break
;
title
=
'看房预约'
case
1
:
url
=
'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg
'
title
=
'看房预约
'
break
;
url
=
'http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
}
break
;
let
obj
=
{
}
title
:
title
,
let
obj
=
{
type
:
typ
e
,
title
:
titl
e
,
time
:
item
.
subscribeDate
.
substring
(
5
,
11
).
replace
(
'-'
,
'月'
).
replace
(
' '
,
'日'
)
+
((
type
==
0
)
?
' 20:00-24:00'
:
''
)
,
type
:
type
,
num
:
item
.
subscribeNum
,
time
:
item
.
subscribeDate
.
substring
(
5
,
11
).
replace
(
'-'
,
'月'
).
replace
(
' '
,
'日'
)
+
((
type
==
0
)
?
' 20:00-24:00'
:
''
)
,
url
:
url
,
num
:
item
.
subscribeNum
,
id
:
item
.
id
,
url
:
url
,
mobile
:
item
.
mobile
,
id
:
item
.
id
,
name
:
item
.
nam
e
,
mobile
:
item
.
mobil
e
,
subscribeDate
:
item
.
subscribeDate
name
:
item
.
name
,
}
subscribeDate
:
item
.
subscribeDate
tmpArr
.
push
(
obj
)
}
}
)
tmpArr
.
push
(
obj
)
this
.
setData
({
})
data
:
tmpArr
,
this
.
setData
({
isLoading
:
false
data
:
tmpArr
,
})
isLoading
:
false
}
}
)
})
})
},
},
...
...
pages/mine/authentication-input/authentication-input.js
View file @
881999b9
...
@@ -92,46 +92,45 @@ Page({
...
@@ -92,46 +92,45 @@ Page({
// 获取业主认证信息
// 获取业主认证信息
getAuth
()
{
getAuth
()
{
let
that
=
this
App
.
request
({
App
.
wxRequest
({
url
:
'v1/userAuth/getAuth'
,
url
:
'v1/userAuth/getAuth'
,
method
:
'GET'
,
method
:
'GET'
,
success
:
function
(
res
)
{
params
:
{},
let
state
=
res
.
data
.
state
*
1
// 0 待审核 1 审核通过 2 不通过
})
let
type
=
1
// 判断页面显示的类型 1.填写表单 2.认证中 3.认证失败
.
then
((
response
)
=>
{
switch
(
state
)
{
let
funcResponseData
=
response
.
data
case
0
:
let
state
=
funcResponseData
.
state
*
1
// 0 待审核 1 审核通过 2 不通过
type
=
2
;
let
type
=
1
// 判断页面显示的类型 1.填写表单 2.认证中 3.认证失败
break
;
switch
(
state
)
{
case
1
:
case
0
:
App
.
ui
.
showToast
({
type
=
2
;
iconType
:
'success'
,
break
;
title
:
'已审核通过'
,
case
1
:
})
App
.
ui
.
showToast
({
setTimeout
(()
=>
{
iconType
:
'success'
,
wx
.
navigateBack
({})
title
:
'已审核通过'
,
},
2000
)
})
break
;
setTimeout
(()
=>
{
case
2
:
wx
.
navigateBack
({})
type
=
3
;
},
2000
)
break
;
break
;
}
case
2
:
that
.
setData
({
type
=
3
;
type
:
type
,
break
;
name
:
res
.
data
.
name
?
res
.
data
.
name
:
''
,
phone
:
res
.
data
.
mobile
?
res
.
data
.
mobile
:
''
,
room
:
res
.
data
.
roomNo
?
res
.
data
.
roomNo
:
''
,
idCard
:
res
.
data
.
idcard
?
res
.
data
.
idcard
:
''
,
remarks
:
res
.
data
.
remarks
?
res
.
data
.
remarks
:
''
})
}
}
this
.
setData
({
type
:
type
,
name
:
funcResponseData
.
name
?
funcResponseData
.
name
:
''
,
phone
:
funcResponseData
.
mobile
?
funcResponseData
.
mobile
:
''
,
room
:
funcResponseData
.
roomNo
?
funcResponseData
.
roomNo
:
''
,
idCard
:
funcResponseData
.
idcard
?
funcResponseData
.
idcard
:
''
,
remarks
:
funcResponseData
.
remarks
?
funcResponseData
.
remarks
:
''
})
})
})
},
},
// 提交认证申请
// 提交认证申请
onSubmit
()
{
onSubmit
()
{
let
that
=
this
let
phone
=
this
.
data
.
phone
let
phone
=
this
.
data
.
phone
let
room
=
this
.
data
.
room
let
room
=
this
.
data
.
room
let
name
=
this
.
data
.
name
let
name
=
this
.
data
.
name
...
@@ -152,29 +151,29 @@ Page({
...
@@ -152,29 +151,29 @@ Page({
duration
:
60000
duration
:
60000
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/userAuth/doAuth'
,
url
:
'v1/userAuth/doAuth'
,
data
:
{
params
:
{
mobile
:
phone
,
mobile
:
phone
,
name
:
name
,
name
:
name
,
idcard
:
idCard
,
idcard
:
idCard
,
roomNo
:
room
,
roomNo
:
room
,
},
},
success
:
function
(
res
)
{
})
App
.
ui
.
showToast
(
{
.
then
((
response
)
=>
{
iconType
:
'success'
,
App
.
ui
.
showToast
({
title
:
'提交成功
'
,
iconType
:
'success
'
,
})
title
:
'提交成功'
,
that
.
setData
({
})
type
:
2
this
.
setData
({
})
type
:
2
}
,
}
)
fail
:
function
(
err
)
{
})
App
.
ui
.
showToast
(
{
.
catch
((
response
)
=>
{
iconType
:
'error'
,
App
.
ui
.
showToast
({
title
:
err
.
msg
,
iconType
:
'error'
,
})
title
:
response
.
msg
,
}
}
)
})
})
},
},
...
...
pages/mine/card/card.js
View file @
881999b9
...
@@ -47,56 +47,57 @@ Page({
...
@@ -47,56 +47,57 @@ Page({
'title'
:
'加载中'
,
'title'
:
'加载中'
,
'duration'
:
60000
'duration'
:
60000
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/volume/getVolumeList'
,
url
:
'v1/volume/getVolumeList'
,
data
:
{
params
:
{
status
:
''
,
//0已过期1待使用2已使用(""全部)
status
:
''
,
//0已过期1待使用2已使用(""全部)
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
-
1
pageSize
:
-
1
},
},
success
:
(
res
)
=>
{
})
App
.
ui
.
hideToast
()
.
then
((
response
)
=>
{
let
list
=
res
.
data
.
map
(
item
=>
{
App
.
ui
.
hideToast
()
let
shopFilter
=
this
.
data
.
shopConfig
.
filter
(
k
=>
{
let
list
=
response
.
data
.
map
(
item
=>
{
return
k
.
name
.
toLowerCase
()
==
item
.
officeName
.
toLowerCase
()
let
shopFilter
=
this
.
data
.
shopConfig
.
filter
(
k
=>
{
})
return
k
.
name
.
toLowerCase
()
==
item
.
officeName
.
toLowerCase
()
item
.
expireTime
=
item
.
expireTime
.
replace
(
/-/g
,
'.'
)
if
(
item
.
name
.
indexOf
(
'年卡'
)
!=
-
1
)
{
item
.
cardType
=
1
}
else
if
(
item
.
name
.
indexOf
(
'月卡'
)
!=
-
1
)
{
item
.
cardType
=
2
}
else
{
// 次票
item
.
cardType
=
3
}
item
.
logo
=
shopFilter
.
length
>
0
?
shopFilter
[
0
].
logo
:
''
// 名字隐私
if
(
item
.
personName
.
length
>
2
)
{
item
.
privateName
=
item
.
personName
.
substr
(
0
,
1
)
+
'*'
+
item
.
personName
.
substr
(
item
.
personName
.
length
-
1
)
}
else
{
item
.
privateName
=
item
.
personName
.
substr
(
0
,
1
)
+
'*'
}
// 手机号隐私
item
.
privatePhone
=
item
.
cellphone
.
substr
(
0
,
3
)
+
'****'
+
item
.
cellphone
.
substr
(
item
.
cellphone
.
length
-
4
)
// 身份证隐私
item
.
privateIdNum
=
item
.
identityCard
.
substr
(
0
,
6
)
+
'****'
+
item
.
identityCard
.
substr
(
item
.
identityCard
.
length
-
4
)
item
.
privateStatus
=
true
return
item
})
let
filterList
=
list
.
filter
(
item
=>
{
return
item
.
officeName
==
'儿童营地'
})
})
item
.
expireTime
=
item
.
expireTime
.
replace
(
/-/g
,
'.'
)
if
(
item
.
name
.
indexOf
(
'年卡'
)
!=
-
1
)
{
item
.
cardType
=
1
}
else
if
(
item
.
name
.
indexOf
(
'月卡'
)
!=
-
1
)
{
item
.
cardType
=
2
}
else
{
// 次票
item
.
cardType
=
3
}
item
.
logo
=
shopFilter
.
length
>
0
?
shopFilter
[
0
].
logo
:
''
// 名字隐私
if
(
item
.
personName
.
length
>
2
)
{
item
.
privateName
=
item
.
personName
.
substr
(
0
,
1
)
+
'*'
+
item
.
personName
.
substr
(
item
.
personName
.
length
-
1
)
}
else
{
item
.
privateName
=
item
.
personName
.
substr
(
0
,
1
)
+
'*'
}
// 手机号隐私
item
.
privatePhone
=
item
.
cellphone
.
substr
(
0
,
3
)
+
'****'
+
item
.
cellphone
.
substr
(
item
.
cellphone
.
length
-
4
)
// 身份证隐私
item
.
privateIdNum
=
item
.
identityCard
.
substr
(
0
,
6
)
+
'****'
+
item
.
identityCard
.
substr
(
item
.
identityCard
.
length
-
4
)
item
.
privateStatus
=
true
return
item
})
let
filterList
=
list
.
filter
(
item
=>
{
return
item
.
officeName
==
'儿童营地'
})
let
marginTop
=
filterList
.
length
===
0
?
84
:
12
let
marginTop
=
filterList
.
length
===
0
?
84
:
12
this
.
setData
({
this
.
setData
({
passList
:
filterList
,
passList
:
filterList
,
marginTop
marginTop
})
})
}
})
})
},
},
setView
:
function
()
{
setView
:
function
()
{
switch
(
this
.
data
.
passListType
)
{
switch
(
this
.
data
.
passListType
)
{
case
0
:
case
0
:
...
@@ -207,18 +208,17 @@ Page({
...
@@ -207,18 +208,17 @@ Page({
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/order/getOrderDetail'
,
url
:
'v1/order/getOrderDetail'
,
data
:
{
params
:
{
'orderId'
:
funcItem
.
orderId
'orderId'
:
funcItem
.
orderId
},
},
success
:
(
response
)
=>
{
})
.
then
((
response
)
=>
{
this
.
setData
({
this
.
setData
({
noticeDetail
:
response
.
data
.
particulars
,
noticeDetail
:
response
.
data
.
particulars
,
winNoticeDetail
:
true
winNoticeDetail
:
true
})
})
}
})
})
},
},
...
...
pages/mine/home/home.js
View file @
881999b9
...
@@ -163,16 +163,15 @@ Page({
...
@@ -163,16 +163,15 @@ Page({
* @returns
* @returns
*/
*/
queryIntegral
()
{
queryIntegral
()
{
let
that
=
this
App
.
request
({
App
.
wxRequest
({
url
:
'v1/smUser/getIntegral'
,
url
:
'v1/smUser/getIntegral'
,
data
:
{},
params
:
{},
success
:
function
(
res
)
{
})
let
integral
=
res
.
data
?
res
.
data
.
integral
:
'0'
.
then
((
response
)
=>
{
that
.
setData
({
let
integral
=
response
.
data
?
response
.
data
.
integral
:
'0'
integral
:
integral
this
.
setData
({
})
integral
:
integral
}
}
)
})
})
},
},
...
...
pages/mine/home/home.wxml
View file @
881999b9
...
@@ -274,14 +274,14 @@
...
@@ -274,14 +274,14 @@
<view class="club_examine row cc ac" wx:if="{{clubExamine > 0}}">
<view class="club_examine row cc ac" wx:if="{{clubExamine > 0}}">
<text>{{clubExamine}}</text>
<text>{{clubExamine}}</text>
</view>
</view>
<image class="i
con
" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image class="i
32
" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
</block>
</block>
<!-- 客服中心 -->
<!-- 客服中心 -->
<view class="service row cb ac" bindtap="onService">
<view class="service row cb ac" bindtap="onService">
<text>客服中心</text>
<text>客服中心</text>
<image class="i
con
" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image class="i
32
" src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/mine/info/info.js
View file @
881999b9
...
@@ -119,12 +119,12 @@ Page({
...
@@ -119,12 +119,12 @@ Page({
'address'
:
this
.
data
.
userInfo
.
address
,
'address'
:
this
.
data
.
userInfo
.
address
,
'birthday'
:
this
.
data
.
userInfo
.
birthday
,
'birthday'
:
this
.
data
.
userInfo
.
birthday
,
}
}
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/smUser/doUpdateInfo'
,
url
:
'v1/smUser/doUpdateInfo'
,
data
:
param
,
params
:
param
,
success
:
(
res
)
=>
{
})
wx
.
setStorageSync
(
'userInfo'
,
this
.
data
.
userInfo
)
.
then
((
response
)
=>
{
}
wx
.
setStorageSync
(
'userInfo'
,
this
.
data
.
userInfo
)
})
})
},
},
...
...
pages/mine/order/order.js
View file @
881999b9
...
@@ -167,7 +167,6 @@ Page({
...
@@ -167,7 +167,6 @@ Page({
* @returns
* @returns
*/
*/
setOrderType
:
function
()
{
setOrderType
:
function
()
{
let
that
=
this
;
App
.
wxRequest
({
App
.
wxRequest
({
url
:
'v1/common/getDictByType'
,
url
:
'v1/common/getDictByType'
,
data
:
{
data
:
{
...
@@ -209,7 +208,7 @@ Page({
...
@@ -209,7 +208,7 @@ Page({
let
orderTypeActive
=
0
//
let
orderTypeActive
=
0
//
let
aVal
=
''
let
aVal
=
''
funcList
.
forEach
((
item
,
index
)
=>
{
funcList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
value
==
th
at
.
data
.
optionsGoodType
)
{
if
(
item
.
value
==
th
is
.
data
.
optionsGoodType
)
{
typeTitle
=
item
.
name
typeTitle
=
item
.
name
orderTypeActive
=
index
orderTypeActive
=
index
}
}
...
@@ -439,7 +438,6 @@ Page({
...
@@ -439,7 +438,6 @@ Page({
onOrderPay
:
function
(
event
)
{
onOrderPay
:
function
(
event
)
{
// 数据校验不通过
// 数据校验不通过
let
that
=
this
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
let
wxRequest
=
funcItem
.
wxRequest
let
wxRequest
=
funcItem
.
wxRequest
...
@@ -452,11 +450,11 @@ Page({
...
@@ -452,11 +450,11 @@ Page({
signType
:
wxRequest
.
signType
,
signType
:
wxRequest
.
signType
,
paySign
:
wxRequest
.
paySign
,
paySign
:
wxRequest
.
paySign
,
success
(
res
)
{
success
(
res
)
{
th
at
.
setData
({
th
is
.
setData
({
'orderList'
:
[],
'orderList'
:
[],
'orderPages'
:
1
,
'orderPages'
:
1
,
})
})
th
at
.
queryOrder
()
th
is
.
queryOrder
()
},
},
fail
(
res
)
{}
fail
(
res
)
{}
})
})
...
...
pages/mine/question/question.js
View file @
881999b9
...
@@ -83,28 +83,28 @@ Page({
...
@@ -83,28 +83,28 @@ Page({
'iconType'
:
'loading'
,
'iconType'
:
'loading'
,
'title'
:
'提交中'
,
'title'
:
'提交中'
,
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/smFeedback/doFeedBack'
,
url
:
'v1/smFeedback/doFeedBack'
,
data
:
{
params
:
{
content
:
this
.
data
.
feedbackContent
content
:
this
.
data
.
feedbackContent
},
},
success
:
(
res
)
=>
{
})
App
.
ui
.
showToast
(
{
.
then
((
response
)
=>
{
'iconType'
:
'success'
,
App
.
ui
.
showToast
({
'title'
:
'提交成功
'
,
'iconType'
:
'success
'
,
})
'title'
:
'提交成功'
,
this
.
setData
({
})
winFeedback
:
true
,
this
.
setData
({
title
:
'客服中心'
,
winFeedback
:
true
,
feedbackContent
:
'
'
,
title
:
'客服中心
'
,
})
feedbackContent
:
''
,
}
,
}
)
fail
:
(
err
)
=>
{
})
App
.
ui
.
showToast
(
{
.
catch
((
response
)
=>
{
'iconType'
:
'error'
,
App
.
ui
.
showToast
({
'title'
:
err
.
msg
,
'iconType'
:
'error'
,
})
'title'
:
response
.
msg
,
}
}
)
})
})
},
},
...
...
pages/pay/coupon-detail/coupon-detail.js
View file @
881999b9
...
@@ -80,33 +80,33 @@ Page({
...
@@ -80,33 +80,33 @@ Page({
duration
:
60000
duration
:
60000
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/volume/doVolume'
,
url
:
'v1/volume/doVolume'
,
data
:
{
params
:
{
volumeId
:
this
.
data
.
couponDetail
.
volumeId
,
volumeId
:
this
.
data
.
couponDetail
.
volumeId
,
},
},
success
:
(
res
)
=>
{
})
if
(
res
.
data
&&
res
.
data
.
code
*
1
==
500
)
{
.
then
((
response
)
=>
{
App
.
ui
.
showToast
({
if
(
response
.
data
&&
response
.
data
.
code
*
1
==
500
)
{
iconType
:
'error'
,
title
:
res
.
data
.
msg
,
})
}
else
{
App
.
ui
.
showToast
({
iconType
:
'success'
,
title
:
'核销成功'
,
})
setTimeout
(()
=>
{
wx
.
navigateBack
()
},
2000
);
}
},
fail
:
(
err
)
=>
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
iconType
:
'error'
,
iconType
:
'error'
,
title
:
err
.
msg
,
title
:
response
.
data
.
msg
,
})
})
}
else
{
App
.
ui
.
showToast
({
iconType
:
'success'
,
title
:
'核销成功'
,
})
setTimeout
(()
=>
{
wx
.
navigateBack
()
},
2000
);
}
}
})
})
.
catch
((
response
)
=>
{
App
.
ui
.
showToast
({
iconType
:
'error'
,
title
:
response
.
msg
,
})
})
}
}
})
})
\ No newline at end of file
pages/pay/coupon-input/coupon-input.js
View file @
881999b9
...
@@ -32,13 +32,11 @@ Page({
...
@@ -32,13 +32,11 @@ Page({
},
},
// 扫码
// 扫码
handleScanCode
()
{
handleScanCode
()
{
let
that
=
this
wx
.
scanCode
({
wx
.
scanCode
({
onlyFromCamera
:
true
,
onlyFromCamera
:
true
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
)
let
result
=
res
.
result
let
result
=
res
.
result
th
at
.
getVolumeDetails
(
result
)
th
is
.
getVolumeDetails
(
result
)
}
}
})
})
},
},
...
...
pages/pay/order-comment/order-comment.js
View file @
881999b9
...
@@ -44,94 +44,93 @@ Page({
...
@@ -44,94 +44,93 @@ Page({
* @param
* @param
* @returns
* @returns
*/
*/
queryOrderDetail
:
function
()
{
queryOrderDetail
:
function
()
{
s
let
that
=
this
App
.
request
({
App
.
wxRequest
({
url
:
'v1/order/getOrderDetail'
,
url
:
'v1/order/getOrderDetail'
,
data
:
{
params
:
{
'orderId'
:
this
.
data
.
orderInfo
.
id
'orderId'
:
this
.
data
.
orderInfo
.
id
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcOrderInfo
=
{
let
funcResponse
=
response
.
data
'id'
:
this
.
data
.
orderInfo
.
id
,
let
funcOrderInfo
=
{
'score'
:
funcResponse
.
integral
,
// 积分
'id'
:
this
.
data
.
orderInfo
.
id
,
'state'
:
Number
(
funcResponse
.
status
),
// 订单状态
'score'
:
funcResponse
.
integral
,
// 积分
'amount'
:
funcResponse
.
totalMoney
,
// 实付金额
'state'
:
Number
(
funcResponse
.
status
),
// 订单状态
'contactName'
:
funcResponse
.
name
,
// 联系人名称
'amount'
:
funcResponse
.
totalMoney
,
// 实付金额
'contactPhone'
:
funcResponse
.
mobilePhone
,
// 联系人电话
'contactName'
:
funcResponse
.
name
,
// 联系人名称
'commodityType'
:
Number
(
funcResponse
.
goodType
),
// 商品类型
'contactPhone'
:
funcResponse
.
mobilePhone
,
// 联系人电话
'commodity'
:
[],
'commodityType'
:
Number
(
funcResponse
.
goodType
),
// 商品类型
'tipOrderNo'
:
funcResponse
.
orderSerialNumber
,
// 订单编号
'commodity'
:
[],
'tipTimeSubmit'
:
funcResponse
.
createDate
,
'tipOrderNo'
:
funcResponse
.
orderSerialNumber
,
// 订单编号
'tipTimePay'
:
App
.
modular
.
miment
(
funcResponse
.
paymentTime
).
format
(
'YYYY-MM-DD hh:mm:ss'
),
'tipTimeSubmit'
:
funcResponse
.
createDate
,
'tipIntegral'
:
funcResponse
.
integral
,
'tipTimePay'
:
App
.
modular
.
miment
(
funcResponse
.
paymentTime
).
format
(
'YYYY-MM-DD hh:mm:ss'
),
'officeName'
:
funcResponse
.
officeName
,
'tipIntegral'
:
funcResponse
.
integral
,
'wxRequest'
:
funcResponse
.
wxRequest
,
'officeName'
:
funcResponse
.
officeName
,
'businessTime'
:
funcResponse
.
businessTime
,
//营业时间
'wxRequest'
:
funcResponse
.
wxRequest
,
'expireTime'
:
funcResponse
.
expireTime
,
//订单有效期
'businessTime'
:
funcResponse
.
businessTime
,
//营业时间
'expireTime'
:
funcResponse
.
expireTime
,
//订单有效期
}
// 设置印章
let
shopName
=
funcResponse
.
officeName
;
let
shopFilter
=
this
.
data
.
shopConfig
.
filter
(
item
=>
{
return
item
.
name
.
toLowerCase
()
==
shopName
.
toLowerCase
()
}
}
// 设置印章
)
let
shopName
=
funcResponse
.
officeName
;
funcOrderInfo
.
shopInfo
=
shopFilter
[
0
]
let
shopFilter
=
this
.
data
.
shopConfig
.
filter
(
// 添加订单商品列表
item
=>
{
let
funcCommodity
=
funcResponse
.
smOrderDetails
return
item
.
name
.
toLowerCase
()
==
shopName
.
toLowerCase
()
let
funcGoodsQuantity
=
0
}
for
(
let
i
=
0
,
l
=
funcCommodity
.
length
;
i
<
l
;
i
++
)
{
)
let
funcCommodityItem
=
{
funcOrderInfo
.
shopInfo
=
shopFilter
[
0
]
'cover'
:
funcCommodity
[
i
].
imgUrl
,
// 添加订单商品列表
'name'
:
funcCommodity
[
i
].
name
,
// 名称
let
funcCommodity
=
funcResponse
.
smOrderDetails
'quantity'
:
funcCommodity
[
i
].
number
,
// 数量
let
funcGoodsQuantity
=
0
'amount'
:
funcCommodity
[
i
].
unitPrice
,
// 总价
for
(
let
i
=
0
,
l
=
funcCommodity
.
length
;
i
<
l
;
i
++
)
{
'state'
:
Number
(
funcCommodity
[
i
].
status
),
// 状态
let
funcCommodityItem
=
{
'codeId'
:
funcCommodity
[
i
].
volumeId
,
// 券码
'cover'
:
funcCommodity
[
i
].
imgUrl
,
'name'
:
funcCommodity
[
i
].
name
,
// 名称
'quantity'
:
funcCommodity
[
i
].
number
,
// 数量
'amount'
:
funcCommodity
[
i
].
unitPrice
,
// 总价
'state'
:
Number
(
funcCommodity
[
i
].
status
),
// 状态
'codeId'
:
funcCommodity
[
i
].
volumeId
,
// 券码
}
funcGoodsQuantity
=
funcGoodsQuantity
+
funcCommodityItem
.
quantity
funcOrderInfo
.
commodity
.
push
(
funcCommodityItem
)
}
}
// 倒计时
funcGoodsQuantity
=
funcGoodsQuantity
+
funcCommodityItem
.
quantity
funcOrderInfo
.
commodity
.
push
(
funcCommodityItem
)
}
// 倒计时
if
(
funcOrderInfo
.
state
==
0
)
{
if
(
funcOrderInfo
.
state
==
0
)
{
// 待付款状态
// 待付款状态
let
doTime
=
15
*
60
*
1000
let
doTime
=
15
*
60
*
1000
let
timeInter
=
setInterval
(()
=>
{
let
timeInter
=
setInterval
(()
=>
{
let
creatdTime
=
new
Date
(
funcOrderInfo
.
tipTimeSubmit
.
replace
(
/-/g
,
'/'
)).
getTime
()
let
creatdTime
=
new
Date
(
funcOrderInfo
.
tipTimeSubmit
.
replace
(
/-/g
,
'/'
)).
getTime
()
let
endTime
=
creatdTime
+
doTime
let
endTime
=
creatdTime
+
doTime
let
now
=
new
Date
().
getTime
()
let
now
=
new
Date
().
getTime
()
let
residueStamp
=
endTime
-
now
let
residueStamp
=
endTime
-
now
let
residuePayTime
=
App
.
modular
.
miment
(
residueStamp
).
format
(
'mm:ss'
)
let
residuePayTime
=
App
.
modular
.
miment
(
residueStamp
).
format
(
'mm:ss'
)
if
(
residueStamp
>
0
)
{
if
(
residueStamp
>
0
)
{
that
.
setData
({
this
.
setData
({
residuePayTime
:
residuePayTime
residuePayTime
:
residuePayTime
})
})
}
else
{
}
else
{
clearInterval
(
timeInter
)
clearInterval
(
timeInter
)
// that
.queryOrderDetail()
// this
.queryOrderDetail()
let
state
=
`orderInfo.state`
let
state
=
`orderInfo.state`
that
.
setData
({
this
.
setData
({
[
state
]:
-
1
[
state
]:
-
1
})
})
}
}
},
1000
)
},
1000
)
}
}
this
.
setData
({
this
.
setData
({
orderInfo
:
funcOrderInfo
,
orderInfo
:
funcOrderInfo
,
goodsQuantity
:
funcGoodsQuantity
goodsQuantity
:
funcGoodsQuantity
})
})
// 判断是否自动展示二维码
// 判断是否自动展示二维码
// 订单列表 去使用 按钮
// 订单列表 去使用 按钮
if
(
this
.
data
.
isFromUse
)
{
if
(
this
.
data
.
isFromUse
)
{
}
}
}
})
})
},
},
...
@@ -267,9 +266,9 @@ Page({
...
@@ -267,9 +266,9 @@ Page({
},
},
saveCommentInfo
:
function
()
{
saveCommentInfo
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/order/doAppraise'
,
url
:
'v1/order/doAppraise'
,
data
:
{
params
:
{
'orderId'
:
this
.
data
.
orderInfo
.
id
,
'orderId'
:
this
.
data
.
orderInfo
.
id
,
'imgUrls'
:
this
.
data
.
evaluateAlbum
,
'imgUrls'
:
this
.
data
.
evaluateAlbum
,
'serviceEvaluation'
:
this
.
data
.
scoreServe
,
'serviceEvaluation'
:
this
.
data
.
scoreServe
,
...
@@ -277,19 +276,19 @@ Page({
...
@@ -277,19 +276,19 @@ Page({
'environmentalEvaluation'
:
this
.
data
.
scoreEnvironment
,
'environmentalEvaluation'
:
this
.
data
.
scoreEnvironment
,
'content'
:
this
.
data
.
evaluateContent
'content'
:
this
.
data
.
evaluateContent
},
},
success
:
(
response
)
=>
{
})
App
.
ui
.
showToast
(
{
.
then
((
response
)
=>
{
iconType
:
'success'
,
App
.
ui
.
showToast
({
title
:
'评价成功
'
,
iconType
:
'success
'
,
ending
:
()
=>
{
title
:
'评价成功'
,
wx
.
navigateBack
(
{
ending
:
()
=>
{
event
:
{
wx
.
navigateBack
(
{
'type'
:
'onReload'
,
event
:
{
}
'type'
:
'onReload'
,
}
)
}
}
}
)
}
)
}
}
}
)
})
})
},
},
...
...
pages/pay/order-detail/order-detail.js
View file @
881999b9
...
@@ -246,28 +246,28 @@ Page({
...
@@ -246,28 +246,28 @@ Page({
title
:
'处理中'
,
title
:
'处理中'
,
duration
:
60000
,
duration
:
60000
,
})
})
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/order/cancelOrder'
,
url
:
'v1/order/cancelOrder'
,
data
:
{
params
:
{
'orderId'
:
this
.
data
.
orderInfo
.
id
,
'orderId'
:
this
.
data
.
orderInfo
.
id
,
'type'
:
type
,
'type'
:
type
,
},
},
success
:
(
response
)
=>
{
})
App
.
ui
.
showToast
(
{
.
then
((
response
)
=>
{
iconType
:
'success'
,
App
.
ui
.
showToast
({
title
:
type
==
1
?
'订单删除成功'
:
'订单取消成功
'
,
iconType
:
'success
'
,
ending
:
function
()
{
title
:
type
==
1
?
'订单删除成功'
:
'订单取消成功'
,
wx
.
navigateBack
(
{
ending
:
function
()
{
delta
:
1
,
wx
.
navigateBack
({
event
:
{
delta
:
1
,
type
:
'onReload'
,
event
:
{
option
:
{}
,
type
:
'onReload'
,
receivePage
:
'pages/mine/order/order'
,
option
:
{}
,
}
receivePage
:
'pages/mine/order/order'
,
}
)
}
}
}
)
}
)
}
}
}
)
})
})
}
}
})
})
...
...
pages/pay/order-input/order-input.js
View file @
881999b9
...
@@ -302,16 +302,16 @@ Page({
...
@@ -302,16 +302,16 @@ Page({
break
break
}
}
}
}
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/park/getDetail'
,
url
:
'v1/park/getDetail'
,
data
:
{
params
:
{
'id'
:
funcPointId
'id'
:
funcPointId
},
},
success
:
(
response
)
=>
{
})
this
.
setData
(
{
.
then
((
response
)
=>
{
buyContentTime
:
response
.
data
.
businessTime
this
.
setData
({
})
buyContentTime
:
response
.
data
.
businessTime
}
}
)
})
})
},
},
...
@@ -570,67 +570,67 @@ Page({
...
@@ -570,67 +570,67 @@ Page({
setStock
:
function
()
{
setStock
:
function
()
{
let
funcItem
=
this
.
data
.
shoppingCartList
[
0
]
let
funcItem
=
this
.
data
.
shoppingCartList
[
0
]
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommodityParticulars'
,
url
:
'v1/commodity/getCommodityParticulars'
,
data
:
{
params
:
{
'commodityId'
:
funcItem
.
id
,
'commodityId'
:
funcItem
.
id
,
'classifyId'
:
funcItem
.
typeId
,
'classifyId'
:
funcItem
.
typeId
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcRegisterTitle
let
funcResponse
=
response
.
data
let
funcQuantityStock
let
funcRegisterTitle
let
funcQuantityStock
// 年卡月卡
if
(
funcResponse
.
inventorie
)
{
// 年卡月卡
funcRegisterTitle
=
funcResponse
.
inventorie
[
0
].
cardName
if
(
funcResponse
.
inventorie
)
{
funcQuantityStock
=
funcResponse
.
inventorie
[
0
].
number
funcRegisterTitle
=
funcResponse
.
inventorie
[
0
].
cardName
switch
(
funcRegisterTitle
)
{
funcQuantityStock
=
funcResponse
.
inventorie
[
0
].
number
case
'年卡'
:
switch
(
funcRegisterTitle
)
{
this
.
setData
({
case
'年卡'
:
buyContent
:
'pay/order-input/card-1.png'
,
this
.
setData
({
cssShadow
:
'box-shadow: 0 0 20rpx #f2dae0;'
buyContent
:
'pay/order-input/card-1.png'
,
})
cssShadow
:
'box-shadow: 0 0 20rpx #f2dae0;'
break
})
break
case
'月卡'
:
this
.
setData
({
case
'月卡'
:
buyContent
:
'pay/order-input/card-2.png'
,
this
.
setData
({
cssShadow
:
'box-shadow: 0 0 20rpx #dae4f2;'
buyContent
:
'pay/order-input/card-2.png'
,
})
cssShadow
:
'box-shadow: 0 0 20rpx #dae4f2;'
break
})
break
case
''
:
this
.
setData
({
buyContent
:
'pay/order-input/card-3.png'
,
})
break
}
}
else
{
funcQuantityStock
=
funcResponse
.
number
switch
(
this
.
data
.
shopInfo
.
appId
)
{
case
1
:
this
.
setData
({
buyContent
:
'pay/order-input/card-4.png'
,
})
break
case
3
:
this
.
setData
({
buyContent
:
'pay/order-input/card-3.png'
,
})
break
}
case
''
:
this
.
setData
({
buyContent
:
'pay/order-input/card-3.png'
,
})
break
}
}
this
.
setData
({
}
else
{
registerTitle
:
funcRegisterTitle
,
funcQuantityStock
=
funcResponse
.
number
quantityTipNumber
:
funcQuantityStock
,
quantityMax
:
funcQuantityStock
<
this
.
data
.
quantityMax
?
funcQuantityStock
:
this
.
data
.
quantityMax
switch
(
this
.
data
.
shopInfo
.
appId
)
{
})
case
1
:
this
.
setData
({
buyContent
:
'pay/order-input/card-4.png'
,
})
break
case
3
:
this
.
setData
({
buyContent
:
'pay/order-input/card-3.png'
,
})
break
}
}
}
this
.
setData
({
registerTitle
:
funcRegisterTitle
,
quantityTipNumber
:
funcQuantityStock
,
quantityMax
:
funcQuantityStock
<
this
.
data
.
quantityMax
?
funcQuantityStock
:
this
.
data
.
quantityMax
})
})
})
},
},
...
@@ -668,41 +668,43 @@ Page({
...
@@ -668,41 +668,43 @@ Page({
switch
(
this
.
data
.
orderType
)
{
switch
(
this
.
data
.
orderType
)
{
case
6
:
case
6
:
case
7
:
case
7
:
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/activity/getDetail'
,
url
:
'v1/activity/getDetail'
,
data
:
{
'id'
:
this
.
data
.
shoppingCartList
[
0
].
id
},
params
:
{
success
:
(
response
)
=>
{
'id'
:
this
.
data
.
shoppingCartList
[
0
].
id
let
funcResponse
=
response
.
data
},
let
funcRichText
=
funcResponse
.
notice
})
.
replace
(
/<img/gi
,
'<img style="max-width:100%;height:auto;display:block" '
)
.
then
((
response
)
=>
{
.
replace
(
/<section/g
,
'<div'
)
let
funcResponse
=
response
.
data
.
replace
(
/
\/
section>/g
,
'\div>'
)
let
funcRichText
=
funcResponse
.
notice
.
replace
(
/<img/gi
,
'<img style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
)
this
.
setData
({
this
.
setData
({
noticeDetail
:
funcRichText
noticeDetail
:
funcRichText
})
})
}
})
})
break
break
default
:
default
:
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getNotification'
,
url
:
'v1/commodity/getNotification'
,
data
:
{
params
:
{
'notificationId'
:
this
.
data
.
shoppingCartList
[
0
].
notificationId
'notificationId'
:
this
.
data
.
shoppingCartList
[
0
].
notificationId
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcRichText
=
funcResponse
.
particulars
let
funcResponse
=
response
.
data
.
replace
(
/<img/gi
,
'<img style="max-width:100%;height:auto;display:block" '
)
let
funcRichText
=
funcResponse
.
particulars
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/<img/gi
,
'<img style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/
\/
section>/g
,
'\div>'
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
)
this
.
setData
({
this
.
setData
({
noticeDetail
:
funcRichText
noticeDetail
:
funcRichText
})
})
}
})
})
}
}
this
.
setData
({
this
.
setData
({
...
@@ -937,9 +939,9 @@ Page({
...
@@ -937,9 +939,9 @@ Page({
}
}
// 发送下单请求
// 发送下单请求
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/order/doOrder'
,
url
:
'v1/order/doOrder'
,
data
:
{
params
:
{
'isPayment'
:
Number
(
this
.
data
.
payAmount
)
===
0
?
0
:
2
,
'isPayment'
:
Number
(
this
.
data
.
payAmount
)
===
0
?
0
:
2
,
'totalMoney'
:
Number
(
this
.
data
.
payAmount
),
'totalMoney'
:
Number
(
this
.
data
.
payAmount
),
'office'
:
{
'id'
:
this
.
data
.
shopInfo
.
id
},
'office'
:
{
'id'
:
this
.
data
.
shopInfo
.
id
},
...
@@ -949,107 +951,107 @@ Page({
...
@@ -949,107 +951,107 @@ Page({
'mobilePhone'
:
funcRegisterInfo
[
0
].
phone
,
'mobilePhone'
:
funcRegisterInfo
[
0
].
phone
,
'goodType'
:
this
.
data
.
shopInfo
.
shopType
,
'goodType'
:
this
.
data
.
shopInfo
.
shopType
,
},
},
success
:
(
response
)
=>
{
})
if
(
/ 商品不存在/
.
test
(
response
.
data
.
msg
))
{
.
then
((
response
)
=>
{
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[])
if
(
/ 商品不存在/
.
test
(
response
.
data
.
msg
))
{
App
.
ui
.
showToast
({
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[])
iconType
:
'error'
,
App
.
ui
.
showToast
({
title
:
'商品已下架,请重新下单。'
,
iconType
:
'error'
,
ending
:
()
=>
{
title
:
'商品已下架,请重新下单。'
,
wx
.
navigateBack
({
ending
:
()
=>
{
delta
:
2
wx
.
navigateBack
({
})
delta
:
2
}
})
})
}
return
})
}
return
}
if
(
/价格不一致/
.
test
(
response
.
data
.
msg
))
{
if
(
/价格不一致/
.
test
(
response
.
data
.
msg
))
{
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[])
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[])
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
iconType
:
'error'
,
iconType
:
'error'
,
title
:
'价格已变更,请重新下单。'
,
title
:
'价格已变更,请重新下单。'
,
ending
:
()
=>
{
ending
:
()
=>
{
wx
.
navigateBack
({
wx
.
navigateBack
({
delta
:
2
delta
:
2
})
})
}
}
})
})
return
return
}
}
if
(
/订单未支付/
.
test
(
response
.
data
.
msg
))
{
if
(
/订单未支付/
.
test
(
response
.
data
.
msg
))
{
App
.
ui
.
showToast
({
App
.
ui
.
showToast
({
iconType
:
'error'
,
iconType
:
'error'
,
title
:
response
.
data
.
msg
,
title
:
response
.
data
.
msg
,
})
})
this
.
setData
({
this
.
setData
({
isPaySubmit
:
false
,
isPaySubmit
:
false
,
})
})
return
return
}
}
if
(
/库存不足/
.
test
(
response
.
data
.
msg
))
{
if
(
/库存不足/
.
test
(
response
.
data
.
msg
))
{
let
funcList
=
[]
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
response
.
data
.
data
.
list
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
response
.
data
.
data
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'cover'
:
response
.
data
.
data
.
list
[
i
].
imgUrl
,
'cover'
:
response
.
data
.
data
.
list
[
i
].
imgUrl
,
'name'
:
response
.
data
.
data
.
list
[
i
].
name
'name'
:
response
.
data
.
data
.
list
[
i
].
name
}
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
funcList
.
push
(
funcItem
)
winStockTip
:
true
,
stockList
:
funcList
,
isPaySubmit
:
false
,
})
return
}
}
// 库存充足正常下单支付
let
funcResponse
=
response
.
data
.
wxRequest
pagePayId
=
response
.
data
.
orderId
this
.
setData
({
this
.
setData
({
orderId
:
pagePayId
winStockTip
:
true
,
stockList
:
funcList
,
isPaySubmit
:
false
,
})
})
return
}
// 支付金额为零,默认支付成功
// 库存充足正常下单支付
if
(
Number
(
this
.
data
.
payAmount
)
===
0
)
{
let
funcResponse
=
response
.
data
.
wxRequest
this
.
payStatus
(
true
)
pagePayId
=
response
.
data
.
orderId
return
this
.
setData
({
}
orderId
:
pagePayId
wx
.
requestPayment
({
})
'timeStamp'
:
funcResponse
.
timeStamp
,
'nonceStr'
:
funcResponse
.
nonceStr
,
// 支付金额为零,默认支付成功
'package'
:
funcResponse
.
package
,
if
(
Number
(
this
.
data
.
payAmount
)
===
0
)
{
'signType'
:
funcResponse
.
signType
,
this
.
payStatus
(
true
)
'paySign'
:
funcResponse
.
paySign
,
return
success
:
(
response
)
=>
{
}
if
(
response
.
errMsg
===
'requestPayment:ok'
)
{
wx
.
requestPayment
({
// 用户点击支付完成按钮回调
'timeStamp'
:
funcResponse
.
timeStamp
,
// this.payStatus(true)
'nonceStr'
:
funcResponse
.
nonceStr
,
}
'package'
:
funcResponse
.
package
,
'signType'
:
funcResponse
.
signType
,
if
(
response
.
errMsg
===
'requestPayment:fail cancel'
)
{
'paySign'
:
funcResponse
.
paySign
,
clearInterval
(
App
.
globalData
.
payStateTimer
)
success
:
(
response
)
=>
{
this
.
payStatus
(
false
)
if
(
response
.
errMsg
===
'requestPayment:ok'
)
{
}
// 用户点击支付完成按钮回调
},
// this.payStatus(true)
fail
:
(
response
)
=>
{
}
if
(
response
.
errMsg
===
'requestPayment:fail cancel'
)
{
clearInterval
(
App
.
globalData
.
payStateTimer
)
clearInterval
(
App
.
globalData
.
payStateTimer
)
this
.
payStatus
(
false
)
this
.
payStatus
(
false
)
}
}
})
},
fail
:
(
response
)
=>
{
clearInterval
(
App
.
globalData
.
payStateTimer
)
this
.
payStatus
(
false
)
}
})
// 开启支付状态轮询
// 开启支付状态轮询
// wx.showLoading({ title: '正在获取数据', mask: true })
// wx.showLoading({ title: '正在获取数据', mask: true })
this
.
queryPayStatus
(
pagePayId
)
this
.
queryPayStatus
(
pagePayId
)
},
})
fail
:
(
error
)
=>
{
.
catch
((
response
)
=>
{
this
.
setData
({
this
.
setData
({
isPaySubmit
:
true
,
isPaySubmit
:
true
,
})
})
}
})
})
},
},
...
@@ -1124,17 +1126,17 @@ Page({
...
@@ -1124,17 +1126,17 @@ Page({
App
.
globalData
.
payStateTimer
=
setInterval
(()
=>
{
App
.
globalData
.
payStateTimer
=
setInterval
(()
=>
{
if
(
!
pagePayId
)
return
if
(
!
pagePayId
)
return
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/order/getOrderStatus'
,
url
:
'v1/order/getOrderStatus'
,
data
:
{
params
:
{
'orderId'
:
pagePayId
'orderId'
:
pagePayId
},
},
success
:
(
response
)
=>
{
})
// -1 - 已取消,0 - 未付款,1 - 未发货,2 - 待使用,3 - 已使用,4 - 已过期
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
// -1 - 已取消,0 - 未付款,1 - 未发货,2 - 待使用,3 - 已使用,4 - 已过期
if
(
funcResponse
.
status
===
'2'
)
{
let
funcResponse
=
response
.
data
this
.
payStatus
(
true
)
if
(
funcResponse
.
status
===
'2'
)
{
}
this
.
payStatus
(
true
)
}
}
})
})
...
...
pages/play/activity-detail/activity-detail.js
View file @
881999b9
...
@@ -26,76 +26,78 @@ Page({
...
@@ -26,76 +26,78 @@ Page({
//主题活动详情
//主题活动详情
queryActivityDetail
:
function
()
{
queryActivityDetail
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/activity/getDetail'
,
url
:
'v1/activity/getDetail'
,
data
:
{
id
:
this
.
data
.
id
},
params
:
{
success
:
(
response
)
=>
{
id
:
this
.
data
.
id
let
funcResponse
=
response
.
data
},
})
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcItem
=
{
let
funcItem
=
{
'id'
:
funcResponse
.
id
,
// 商品标识
'id'
:
funcResponse
.
id
,
// 商品标识
'typeId'
:
''
,
// 商品分类标识
'typeId'
:
''
,
// 商品分类标识
'inventoriesId'
:
''
,
// 仓库标识
'inventoriesId'
:
''
,
// 仓库标识
'dateValid'
:
''
,
// 有效时间
'dateValid'
:
''
,
// 有效时间
'dateInvalid'
:
''
,
// 失效时间
'dateInvalid'
:
''
,
// 失效时间
'name'
:
funcResponse
.
name
,
'name'
:
funcResponse
.
name
,
'cover'
:
funcResponse
.
banners
,
// 商品封面
'cover'
:
funcResponse
.
banners
,
// 商品封面
'price'
:
funcResponse
.
visitorPrice
,
// 普通价
'price'
:
funcResponse
.
visitorPrice
,
// 普通价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
visitorPrice
),
// 普通价文本格式
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
visitorPrice
),
// 普通价文本格式
'priceSpecial'
:
funcResponse
.
ownerPrice
,
// 业主价
'priceSpecial'
:
funcResponse
.
ownerPrice
,
// 业主价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPrice
),
// 业主价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPrice
),
// 业主价文本格式
'priceDiscount'
:
funcResponse
.
price
,
// 活动价
'priceDiscount'
:
funcResponse
.
price
,
// 活动价
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
price
),
// 活动价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
price
),
// 活动价文本格式
'priceType'
:
1
,
'priceType'
:
1
,
'describe'
:
funcResponse
.
summary
,
'describe'
:
funcResponse
.
summary
,
'tags'
:
''
,
'tags'
:
''
,
'notificationId'
:
''
,
// 下单须知
'notificationId'
:
''
,
// 下单须知
// 补充必要参数
// 补充必要参数
'quantity'
:
1
,
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
1
,
'quantityMax'
:
1
,
'isActive'
:
true
,
'isActive'
:
true
,
'activityTimetable'
:
funcResponse
.
activityTimes
,
// 场次库存信息
'activityTimetable'
:
funcResponse
.
activityTimes
,
// 场次库存信息
}
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcItem
])
}
wx
.
setStorageSync
(
'shoppingCartBuffer'
,
[
funcItem
])
this
.
setData
({
this
.
setData
({
banner
:
funcResponse
.
banners
,
banner
:
funcResponse
.
banners
,
info
:
{
info
:
{
title
:
funcResponse
.
name
,
title
:
funcResponse
.
name
,
date
:
funcResponse
.
activeDate
+
' '
+
funcResponse
.
activeTime
,
date
:
funcResponse
.
activeDate
+
' '
+
funcResponse
.
activeTime
,
address
:
funcResponse
.
address
,
address
:
funcResponse
.
address
,
quota
:
funcResponse
.
enrollNum
,
quota
:
funcResponse
.
enrollNum
,
describe
:
funcResponse
.
content
,
describe
:
funcResponse
.
content
,
price
:
funcItem
.
price
,
// 普通价
price
:
funcItem
.
price
,
// 普通价
priceText
:
funcItem
.
priceText
,
priceText
:
funcItem
.
priceText
,
priceSpecial
:
funcItem
.
priceSpecial
,
// 业主价
priceSpecial
:
funcItem
.
priceSpecial
,
// 业主价
priceSpecialText
:
funcItem
.
priceSpecialText
,
priceSpecialText
:
funcItem
.
priceSpecialText
,
priceDiscount
:
funcItem
.
priceDiscount
,
// 活动价
priceDiscount
:
funcItem
.
priceDiscount
,
// 活动价
priceDiscountText
:
funcItem
.
priceDiscountText
,
priceDiscountText
:
funcItem
.
priceDiscountText
,
priceType
:
funcItem
.
priceType
priceType
:
funcItem
.
priceType
// contact: response.contact,
// contact: response.contact,
}
}
})
})
this
.
configActiveState
(
funcResponse
.
activeState
*
1
)
this
.
configActiveState
(
funcResponse
.
activeState
*
1
)
}
})
})
},
},
// 活动报名
// 活动报名
...
...
pages/play/home/home.js
View file @
881999b9
...
@@ -79,45 +79,45 @@ Page({
...
@@ -79,45 +79,45 @@ Page({
* @returns
* @returns
*/
*/
queryMovie
:
function
()
{
queryMovie
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/film/getAllFilm'
,
url
:
'v1/film/getAllFilm'
,
data
:
{
params
:
{
'pageNo'
:
'1'
,
'pageNo'
:
'1'
,
'pageSize'
:
'-1'
,
'pageSize'
:
'-1'
,
'weekType'
:
'0'
,
'weekType'
:
'0'
,
'tagIds'
:
'102'
'tagIds'
:
'102'
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
list
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
.
list
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'name'
:
funcResponse
[
i
].
activityId
,
let
funcItem
=
{
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'name'
:
funcResponse
[
i
].
activityId
,
'dateEnd'
:
funcResponse
[
i
].
end
Date
,
'dateBegin'
:
funcResponse
[
i
].
begin
Date
,
'cover'
:
funcResponse
[
i
].
cover
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'movieDirector'
:
funcResponse
[
i
].
filmDirecto
r
,
'cover'
:
funcResponse
[
i
].
cove
r
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'movieName'
:
funcResponse
[
i
].
filmName
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieType'
:
funcResponse
[
i
].
filmTyp
e
,
'movieName'
:
funcResponse
[
i
].
filmNam
e
,
'movieKeyWord'
:
funcResponse
[
i
].
keyword
,
'movieType'
:
funcResponse
[
i
].
filmType
,
'movieLeader'
:
funcResponse
[
i
].
filmLea
d
,
'movieKeyWord'
:
funcResponse
[
i
].
keywor
d
,
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceType'
:
1
,
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'tagsId'
:
funcResponse
[
i
].
tagIds
,
'priceType'
:
1
,
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
)
,
'tagsId'
:
funcResponse
[
i
].
tagIds
,
}
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
if
(
funcItem
.
tagsId
.
includes
(
'102'
))
{
}
funcList
.
push
(
funcItem
)
if
(
funcItem
.
tagsId
.
includes
(
'102'
))
{
}
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
movieList
:
funcList
})
}
}
this
.
setData
({
movieList
:
funcList
})
})
})
},
},
...
@@ -252,38 +252,35 @@ Page({
...
@@ -252,38 +252,35 @@ Page({
* @returns
* @returns
*/
*/
routeList
:
function
()
{
routeList
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/strategy/getList'
,
url
:
'v1/strategy/getList'
,
data
:
{
params
:
{
'pageNo'
:
this
.
data
.
touristRoutePageNo
,
'pageNo'
:
this
.
data
.
touristRoutePageNo
,
'pageSize'
:
this
.
data
.
touristRoutePageSize
,
'pageSize'
:
this
.
data
.
touristRoutePageSize
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
.
list
[
i
].
id
,
let
funcItem
=
{
'cover'
:
funcResponse
.
list
[
i
].
cover
,
'id'
:
funcResponse
.
list
[
i
].
id
,
'title'
:
funcResponse
.
list
[
i
].
title
,
'cover'
:
funcResponse
.
list
[
i
].
cover
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'title'
:
funcResponse
.
list
[
i
].
title
,
'date'
:
funcResponse
.
list
[
i
].
updateDate
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'tags'
:
funcResponse
.
list
[
i
].
tags
.
split
(
'#'
),
'date'
:
funcResponse
.
list
[
i
].
updateDate
,
// 'isTop': Number(funcResponse.list[i].top) === 1 ? true : false,
'tags'
:
funcResponse
.
list
[
i
].
tags
.
split
(
'#'
),
// 'topCover': '',
// 'isTop': Number(funcResponse.list[i].top) === 1 ? true : false,
}
// 'topCover': '',
// if (funcItem) funcItem.topCover = funcResponse.list[i].topImg
funcList
.
push
(
funcItem
)
}
}
this
.
setData
({
// if (funcItem) funcItem.topCover = funcResponse.list[i].topImg
touristRouteList
:
this
.
data
.
touristRoutePageNo
===
1
?
funcList
:
this
.
data
.
touristRouteList
.
concat
(
funcList
)
funcList
.
push
(
funcItem
)
})
},
fail
:
(
err
)
=>
{
}
}
this
.
setData
({
touristRouteList
:
this
.
data
.
touristRoutePageNo
===
1
?
funcList
:
this
.
data
.
touristRouteList
.
concat
(
funcList
)
})
})
})
},
},
...
...
pages/play/movie-detail/movie-detail.js
View file @
881999b9
...
@@ -45,82 +45,82 @@ Page({
...
@@ -45,82 +45,82 @@ Page({
},
},
// 获取电影详情场次
// 获取电影详情场次
queryDetail
:
function
(
activityId
)
{
queryDetail
:
function
(
activityId
)
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/film/getFilmDetail'
,
url
:
'v1/film/getFilmDetail'
,
data
:
{
params
:
{
'activityId'
:
activityId
,
'activityId'
:
activityId
,
},
},
success
:
(
response
)
=>
{
})
let
movieInfo
=
response
.
data
.
then
((
response
)
=>
{
console
.
log
(
movieInfo
)
let
movieInfo
=
response
.
data
let
showList
=
{}
console
.
log
(
movieInfo
)
let
statusList
=
[]
let
showList
=
{}
let
day
=
2
let
statusList
=
[]
let
index
=
0
let
day
=
2
let
timeList
=
[]
let
index
=
0
// 添加电影日期场次
let
timeList
=
[]
for
(
let
key
in
movieInfo
.
allTimes
)
{
// 添加电影日期场次
timeList
.
push
(
App
.
modular
.
miment
(
key
).
stamp
())
for
(
let
key
in
movieInfo
.
allTimes
)
{
}
timeList
.
push
(
App
.
modular
.
miment
(
key
).
stamp
())
timeList
=
timeList
.
sort
((
a
,
b
)
=>
a
-
b
)
}
timeList
=
timeList
.
map
(
v
=>
App
.
modular
.
miment
(
v
).
format
(
'YYYY-MM-DD'
))
timeList
=
timeList
.
sort
((
a
,
b
)
=>
a
-
b
)
// console.log(timeList)
timeList
=
timeList
.
map
(
v
=>
App
.
modular
.
miment
(
v
).
format
(
'YYYY-MM-DD'
))
timeList
.
forEach
(
key
=>
{
// console.log(timeList)
let
tempItem
=
{}
timeList
.
forEach
(
key
=>
{
if
(
key
===
App
.
modular
.
miment
().
format
(
'YYYY-MM-DD'
)
&&
movieInfo
.
today
.
length
>
0
)
{
let
tempItem
=
{}
tempItem
=
{
if
(
key
===
App
.
modular
.
miment
().
format
(
'YYYY-MM-DD'
)
&&
movieInfo
.
today
.
length
>
0
)
{
id
:
0
,
tempItem
=
{
name
:
'今日'
+
App
.
modular
.
miment
().
format
(
'MM月DD日'
)
id
:
0
,
}
name
:
'今日'
+
App
.
modular
.
miment
().
format
(
'MM月DD日'
)
statusList
.
push
(
tempItem
)
}
showList
[
index
]
=
movieInfo
.
today
statusList
.
push
(
tempItem
)
index
++
showList
[
index
]
=
movieInfo
.
today
}
else
if
(
key
===
App
.
modular
.
miment
().
add
(
1
,
'DD'
).
format
(
'YYYY-MM-DD'
))
{
index
++
tempItem
=
{
}
else
if
(
key
===
App
.
modular
.
miment
().
add
(
1
,
'DD'
).
format
(
'YYYY-MM-DD'
))
{
id
:
1
,
tempItem
=
{
name
:
'明日'
+
App
.
modular
.
miment
().
add
(
1
,
'DD'
).
format
(
'MM月DD日'
)
id
:
1
,
}
name
:
'明日'
+
App
.
modular
.
miment
().
add
(
1
,
'DD'
).
format
(
'MM月DD日'
)
statusList
.
push
(
tempItem
)
}
showList
[
index
]
=
movieInfo
.
tomorrow
statusList
.
push
(
tempItem
)
index
++
showList
[
index
]
=
movieInfo
.
tomorrow
}
else
if
(
key
===
App
.
modular
.
miment
().
add
(
day
,
'DD'
).
format
(
'YYYY-MM-DD'
))
{
index
++
tempItem
=
{
}
else
if
(
key
===
App
.
modular
.
miment
().
add
(
day
,
'DD'
).
format
(
'YYYY-MM-DD'
))
{
id
:
day
,
tempItem
=
{
name
:
App
.
modular
.
miment
().
add
(
day
,
'DD'
).
format
(
'MM月DD日'
)
id
:
day
,
}
name
:
App
.
modular
.
miment
().
add
(
day
,
'DD'
).
format
(
'MM月DD日'
)
statusList
.
push
(
tempItem
)
}
showList
[
index
]
=
movieInfo
.
allTimes
[
key
]
statusList
.
push
(
tempItem
)
index
++
showList
[
index
]
=
movieInfo
.
allTimes
[
key
]
day
++
index
++
}
day
++
})
}
})
movieInfo
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
ownerPrice
),
// 业主价文本格式
movieInfo
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
visitorPrice
),
movieInfo
.
priceSpecialText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
ownerPrice
),
// 业主价文本格式
movieInfo
.
tags
=
movieInfo
.
tags
movieInfo
.
priceText
=
App
.
modular
.
utils
.
formatAmount
(
movieInfo
.
visitorPrice
),
movieInfo
.
tags
=
movieInfo
.
tags
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
movieInfo
.
priceDiscount
)
{
if
(
movieInfo
.
priceDiscount
)
{
movieInfo
.
priceType
=
1
movieInfo
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
movieInfo
.
visitorPrice
!==
movieInfo
.
ownerPrice
&&
funcUserType
)
{
movieInfo
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
movieInfo
.
priceType
=
3
if
(
movieInfo
.
visitorPrice
!==
movieInfo
.
ownerPrice
&&
funcUserType
)
{
movieInfo
.
priceType
=
2
}
else
{
movieInfo
.
priceType
=
3
}
}
}
this
.
setData
({
movieInfo
,
showList
,
statusList
})
}
}
this
.
setData
({
movieInfo
,
showList
,
statusList
})
})
})
},
},
// 跳转到报名页面
// 跳转到报名页面
...
...
pages/play/service-detail/service-detail.js
View file @
881999b9
...
@@ -394,58 +394,56 @@ Page({
...
@@ -394,58 +394,56 @@ Page({
* @returns
* @returns
*/
*/
queryActivity
:
function
()
{
queryActivity
:
function
()
{
console
.
log
(
'this.data.shopInfo.id'
)
App
.
request
({
console
.
log
(
this
.
data
.
shopInfo
.
id
)
App
.
wxRequest
({
url
:
'v1/activity/getList'
,
url
:
'v1/activity/getList'
,
data
:
{
params
:
{
'listType'
:
1
,
'listType'
:
1
,
'pageSize'
:
10
,
'pageSize'
:
10
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'tagId'
:
''
,
'tagId'
:
''
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
list
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
.
list
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'title'
:
funcResponse
[
i
].
name
,
'id'
:
funcResponse
[
i
].
id
,
'officeId'
:
funcResponse
[
i
].
officeId
,
'title'
:
funcResponse
[
i
].
name
,
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'officeId'
:
funcResponse
[
i
].
officeId
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'tagIds'
:
funcResponse
[
i
].
tagIds
.
split
(
','
),
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'tagNames'
:
[],
'tagIds'
:
funcResponse
[
i
].
tagIds
.
split
(
','
),
'date'
:
funcResponse
[
i
].
activeDate
+
' '
+
funcResponse
[
i
].
activeTime
,
// 活动时间
'tagNames'
:
[],
'priceType'
:
1
,
'date'
:
funcResponse
[
i
].
activeDate
+
' '
+
funcResponse
[
i
].
activeTime
,
// 活动时间
}
'priceType'
:
1
,
funcItem
.
tagNames
=
this
.
insertActivityTypeTag
(
funcItem
.
tagIds
)
}
funcItem
.
tagNames
=
this
.
insertActivityTypeTag
(
funcItem
.
tagIds
)
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 根据后台判断价格显示类型
if
(
funcItem
.
priceDiscount
)
{
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
funcItem
.
priceType
=
1
if
(
funcItem
.
priceDiscount
)
{
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcList
.
push
(
funcItem
)
}
}
funcList
.
push
(
funcItem
)
this
.
setData
({
winActivity
:
true
,
detailActivity
:
funcList
})
}
}
this
.
setData
({
winActivity
:
true
,
detailActivity
:
funcList
})
})
})
},
},
...
@@ -456,57 +454,57 @@ Page({
...
@@ -456,57 +454,57 @@ Page({
* @returns
* @returns
*/
*/
queryCommodity
:
function
()
{
queryCommodity
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/recommend'
,
url
:
'v1/commodity/recommend'
,
data
:
{
params
:
{
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'officeId'
:
this
.
data
.
shopInfo
.
id
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'genre'
:
this
.
data
.
shopInfo
.
shopType
,
'tag'
:
'201'
,
'tag'
:
'201'
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'pageSize'
:
10
,
'pageSize'
:
10
,
},
},
success
:
(
response
)
=>
{
})
let
funcCommodityList
=
[]
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcCommodityList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcResponse
=
response
.
data
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
let
funcItem
=
{
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类别标识
'id'
:
funcResponse
[
i
].
id
,
// 商品标识
'sidebarId'
:
funcResponse
[
i
].
classifyId
,
// 商品分类标识
'typeId'
:
funcResponse
[
i
].
genre
,
// 商品类别标识
'name'
:
funcResponse
[
i
].
name
,
'sidebarId'
:
funcResponse
[
i
].
classifyId
,
// 商品分类标识
'cover'
:
funcResponse
[
i
].
coverImg
?
funcResponse
[
i
].
coverImg
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'name'
:
funcResponse
[
i
].
name
,
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'cover'
:
funcResponse
[
i
].
coverImg
?
funcResponse
[
i
].
coverImg
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
sightseerPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
sightseerPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'priceDiscount'
:
funcResponse
[
i
].
price
,
// 活动价
'priceType'
:
1
,
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
price
),
// 活动价文本格式
'describe'
:
funcResponse
[
i
].
synopsis
,
'priceType'
:
1
,
'describeDetail'
:
''
,
// 商品描述详情,在点击详情时获得数据
'describe'
:
funcResponse
[
i
].
synopsis
,
}
'describeDetail'
:
''
,
// 商品描述详情,在点击详情时获得数据
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
funcCommodityList
.
push
(
funcItem
)
}
}
funcCommodityList
.
push
(
funcItem
)
this
.
setData
({
detailCommodity
:
funcCommodityList
,
winCommodity
:
true
,
})
}
}
this
.
setData
({
detailCommodity
:
funcCommodityList
,
winCommodity
:
true
,
})
})
})
},
},
...
@@ -517,49 +515,49 @@ Page({
...
@@ -517,49 +515,49 @@ Page({
* @returns
* @returns
*/
*/
queryMovie
:
function
()
{
queryMovie
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/film/getAllFilm'
,
url
:
'v1/film/getAllFilm'
,
data
:
{
params
:
{
'weekType'
:
0
,
'weekType'
:
0
,
'pageSize'
:
10
,
'pageSize'
:
10
,
'pageNo'
:
1
,
'pageNo'
:
1
,
'tagIds'
:
'102'
'tagIds'
:
'102'
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
list
.
then
((
response
)
=>
{
let
funcList
=
[]
let
funcResponse
=
response
.
data
.
list
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcList
=
[]
let
funcItem
=
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'name'
:
funcResponse
[
i
].
activityId
,
let
funcItem
=
{
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'name'
:
funcResponse
[
i
].
activityId
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'dateBegin'
:
funcResponse
[
i
].
beginDate
,
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'dateEnd'
:
funcResponse
[
i
].
endDate
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'cover'
:
funcResponse
[
i
].
cover
?
funcResponse
[
i
].
cover
:
this
.
data
.
resourcesBase
+
'play/shop/commodity-card.png'
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieDirector'
:
funcResponse
[
i
].
filmDirector
,
'movieName'
:
funcResponse
[
i
].
filmName
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieType'
:
funcResponse
[
i
].
filmType
,
'movieName'
:
funcResponse
[
i
].
filmName
,
'movieKeyWord'
:
funcResponse
[
i
].
keyword
,
'movieType'
:
funcResponse
[
i
].
filmType
,
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'movieKeyWord'
:
funcResponse
[
i
].
keyword
,
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'movieLeader'
:
funcResponse
[
i
].
filmLead
,
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'price'
:
funcResponse
[
i
].
visitorPrice
,
// 普通价
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
visitorPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
[
i
].
ownerPrice
,
// 业主价
'priceType'
:
1
,
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
[
i
].
ownerPrice
),
// 业主价文本格式
'tagsId'
:
funcResponse
[
i
].
tagIds
,
'priceType'
:
1
,
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
'tagsId'
:
funcResponse
[
i
].
tagIds
,
}
'tags'
:
funcResponse
[
i
].
tags
.
split
(
' '
),
funcList
.
push
(
funcItem
)
}
let
movieHeight
=
1064
if
(
funcList
.
length
>
0
)
{
movieHeight
=
1380
}
}
this
.
setData
({
detailCommodity
:
funcList
,
funcList
.
push
(
funcItem
)
movieHeight
})
}
}
let
movieHeight
=
1064
if
(
funcList
.
length
>
0
)
{
movieHeight
=
1380
}
this
.
setData
({
detailCommodity
:
funcList
,
movieHeight
})
})
})
},
},
...
@@ -570,64 +568,64 @@ Page({
...
@@ -570,64 +568,64 @@ Page({
* @returns
* @returns
*/
*/
getAppraise
:
function
()
{
getAppraise
:
function
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/appraise/getList'
,
url
:
'v1/appraise/getList'
,
data
:
{
params
:
{
'pageNo'
:
'1'
,
'pageNo'
:
'1'
,
'pageSize'
:
'-1'
,
'pageSize'
:
'-1'
,
'officeId'
:
this
.
data
.
shopInfo
.
id
'officeId'
:
this
.
data
.
shopInfo
.
id
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcResponse
=
response
.
data
let
funcList
=
[]
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
'star'
:
4
,
'scoreService'
:
funcResponse
.
list
[
i
].
serviceEvaluation
,
// 服务评价
'scoreCommodity'
:
funcResponse
.
list
[
i
].
productEvaluation
,
// 商品评价
'scoreEnvironmental'
:
funcResponse
.
list
[
i
].
environmentalEvaluation
,
// 环境评价
'userName'
:
funcResponse
.
list
[
i
].
nickname
,
'userAvatar'
:
funcResponse
.
list
[
i
].
headImg
,
'userType'
:
funcResponse
.
list
[
i
].
userType
,
'userAlbum'
:
funcResponse
.
list
[
i
].
imgUrls
,
// 评论图册
'date'
:
funcResponse
.
list
[
i
].
createDate
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'isMore'
:
false
,
'isDetail'
:
false
,
}
// 没有评论也没有图片,使用默认文本。
let
funcList
=
[]
if
(
funcItem
.
content
===
''
&&
funcItem
.
userAlbum
.
length
===
0
)
{
for
(
let
i
=
0
,
l
=
funcResponse
.
list
.
length
;
i
<
l
;
i
++
)
{
funcItem
.
content
=
'此用户没有填写评价。'
let
funcItem
=
{
}
'star'
:
4
,
'scoreService'
:
funcResponse
.
list
[
i
].
serviceEvaluation
,
// 服务评价
'scoreCommodity'
:
funcResponse
.
list
[
i
].
productEvaluation
,
// 商品评价
'scoreEnvironmental'
:
funcResponse
.
list
[
i
].
environmentalEvaluation
,
// 环境评价
'userName'
:
funcResponse
.
list
[
i
].
nickname
,
'userAvatar'
:
funcResponse
.
list
[
i
].
headImg
,
'userType'
:
funcResponse
.
list
[
i
].
userType
,
'userAlbum'
:
funcResponse
.
list
[
i
].
imgUrls
,
// 评论图册
'date'
:
funcResponse
.
list
[
i
].
createDate
,
'content'
:
funcResponse
.
list
[
i
].
content
,
'isMore'
:
false
,
'isDetail'
:
false
,
}
funcItem
.
star
=
Math
.
floor
((
funcItem
.
scoreService
+
funcItem
.
scoreCommodity
+
funcItem
.
scoreEnvironmental
)
/
3
)
// 没有评论也没有图片,使用默认文本。
funcList
.
push
(
funcItem
)
if
(
funcItem
.
content
===
''
&&
funcItem
.
userAlbum
.
length
===
0
)
{
funcItem
.
content
=
'此用户没有填写评价。'
}
}
this
.
setData
({
funcItem
.
star
=
Math
.
floor
((
funcItem
.
scoreService
+
funcItem
.
scoreCommodity
+
funcItem
.
scoreEnvironmental
)
/
3
)
detailEvaluate
:
funcList
funcList
.
push
(
funcItem
)
})
}
const
funcQuery
=
wx
.
createSelectorQuery
()
this
.
setData
({
funcQuery
.
selectAll
(
'.evaluate-item-content-mark'
).
boundingClientRect
()
detailEvaluate
:
funcList
funcQuery
.
exec
((
response
)
=>
{
})
let
funcContentHeight
=
88
*
wx
.
getStorageSync
(
'unitProportion'
)
let
funcEvaluate
=
this
.
data
.
detailEvaluate
const
funcQuery
=
wx
.
createSelectorQuery
()
funcQuery
.
selectAll
(
'.evaluate-item-content-mark'
).
boundingClientRect
()
let
funcTextHeight
=
response
[
0
]
funcQuery
.
exec
((
response
)
=>
{
for
(
let
i
=
0
,
l
=
funcTextHeight
.
length
;
i
<
l
;
i
++
)
{
let
funcContentHeight
=
88
*
wx
.
getStorageSync
(
'unitProportion'
)
if
(
funcContentHeight
<
funcTextHeight
[
i
].
height
)
{
let
funcEvaluate
=
this
.
data
.
detailEvaluate
funcEvaluate
[
i
].
isMore
=
true
}
let
funcTextHeight
=
response
[
0
]
for
(
let
i
=
0
,
l
=
funcTextHeight
.
length
;
i
<
l
;
i
++
)
{
if
(
funcContentHeight
<
funcTextHeight
[
i
].
height
)
{
funcEvaluate
[
i
].
isMore
=
true
}
}
}
this
.
setData
({
this
.
setData
({
detailEvaluate
:
funcEvaluate
detailEvaluate
:
funcEvaluate
})
})
})
}
}
)
})
})
},
},
...
@@ -896,21 +894,20 @@ Page({
...
@@ -896,21 +894,20 @@ Page({
},
},
// 查询门店评分
// 查询门店评分
getOfficeAppraise
:
function
()
{
getOfficeAppraise
:
function
()
{
let
that
=
this
let
officeId
=
wx
.
getStorageSync
(
'shopInfoBuffer'
).
id
let
officeId
=
wx
.
getStorageSync
(
'shopInfoBuffer'
).
id
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/appraise/getOfficeAppraise'
,
url
:
'v1/appraise/getOfficeAppraise'
,
data
:
{
params
:
{
'officeId'
:
officeId
'officeId'
:
officeId
},
},
success
:
function
(
response
)
{
})
let
funcData
=
response
.
data
.
then
((
response
)
=>
{
that
.
setData
({
let
funcData
=
response
.
data
officeServiceText
:
funcData
.
serviceEvaluation
.
toFixed
(
1
),
this
.
setData
({
officeProductText
:
funcData
.
productEvaluatio
.
toFixed
(
1
),
officeServiceText
:
funcData
.
serviceEvaluation
.
toFixed
(
1
),
officeEnvironmentalText
:
funcData
.
environmentalEvaluation
.
toFixed
(
1
),
officeProductText
:
funcData
.
productEvaluatio
.
toFixed
(
1
),
})
officeEnvironmentalText
:
funcData
.
environmentalEvaluation
.
toFixed
(
1
),
}
}
)
})
})
},
},
...
...
pages/play/service-sell/service-sell.js
View file @
881999b9
...
@@ -41,61 +41,61 @@ Page({
...
@@ -41,61 +41,61 @@ Page({
queryCommodityDetail
:
function
()
{
queryCommodityDetail
:
function
()
{
let
funcCommodity
=
wx
.
getStorageSync
(
'shoppingCartBuffer'
)[
0
]
let
funcCommodity
=
wx
.
getStorageSync
(
'shoppingCartBuffer'
)[
0
]
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/commodity/getCommodityParticulars'
,
url
:
'v1/commodity/getCommodityParticulars'
,
data
:
{
params
:
{
'commodityId'
:
funcCommodity
.
id
,
'commodityId'
:
funcCommodity
.
id
,
'genre'
:
funcCommodity
.
typeId
,
'genre'
:
funcCommodity
.
typeId
,
},
},
success
:
(
response
)
=>
{
})
let
funcResponse
=
response
.
data
.
then
((
response
)
=>
{
let
funcItem
=
{
let
funcResponse
=
response
.
data
'id'
:
funcResponse
.
id
,
// 商品标识
let
funcItem
=
{
'typeId'
:
funcResponse
.
genre
,
// 商品分类标识
'id'
:
funcResponse
.
id
,
// 商品标识
'inventoriesId'
:
funcResponse
.
inventoriesId
,
// 仓库标识
'typeId'
:
funcResponse
.
genre
,
// 商品分类标识
'dateValid'
:
''
,
// 有效时间
'inventoriesId'
:
funcResponse
.
inventoriesId
,
// 仓库标识
'dateInvalid'
:
''
,
// 失效时间
'dateValid'
:
''
,
// 有效时间
'name'
:
funcResponse
.
name
,
'dateInvalid'
:
''
,
// 失效时间
'cover'
:
funcResponse
.
ticketsImg
,
// 商品封面
'name'
:
funcResponse
.
name
,
'price'
:
funcResponse
.
sightseerPrice
,
// 普通价
'cover'
:
funcResponse
.
ticketsImg
,
// 商品封面
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPrice
),
// 普通价文本格式
'price'
:
funcResponse
.
sightseerPrice
,
// 普通价
'priceSpecial'
:
funcResponse
.
ownerPrice
,
// 业主价
'priceText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
sightseerPrice
),
// 普通价文本格式
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPrice
),
// 业主价文本格式
'priceSpecial'
:
funcResponse
.
ownerPrice
,
// 业主价
'priceDiscount'
:
funcResponse
.
price
,
// 活动价
'priceSpecialText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
ownerPrice
),
// 业主价文本格式
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
price
),
// 活动价文本格式
'priceDiscount'
:
funcResponse
.
price
,
// 活动价
'priceType'
:
1
,
'priceDiscountText'
:
App
.
modular
.
utils
.
formatAmount
(
funcResponse
.
price
),
// 活动价文本格式
'priceType'
:
1
,
'quantity'
:
1
,
'quantity'
:
1
,
'quantityMin'
:
1
,
'quantityMin'
:
1
,
'quantityMax'
:
funcResponse
.
number
<
20
?
funcResponse
.
number
:
20
,
// 最大上限 20 件
'quantityMax'
:
funcResponse
.
number
<
20
?
funcResponse
.
number
:
20
,
// 最大上限 20 件
'isActive'
:
true
,
'isActive'
:
true
,
'notificationId'
:
funcResponse
.
notificationId
,
// 下单须知
'notificationId'
:
funcResponse
.
notificationId
,
// 下单须知
'time'
:
funcResponse
.
spaMins
?
funcResponse
.
spaMins
+
'mins'
:
''
,
'time'
:
funcResponse
.
spaMins
?
funcResponse
.
spaMins
+
'mins'
:
''
,
'address'
:
'元养水韵SPA'
,
'address'
:
'元养水韵SPA'
,
'content'
:
funcResponse
.
particulars
,
'content'
:
funcResponse
.
particulars
,
}
}
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
let
funcUserType
=
wx
.
getStorageSync
(
'userInfo'
).
userType
// 根据后台判断价格显示类型
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
if
(
funcItem
.
priceDiscount
||
funcItem
.
priceDiscount
===
0
)
{
funcItem
.
priceType
=
1
funcItem
.
priceType
=
1
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
}
else
{
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
funcItem
.
priceType
=
3
if
(
funcItem
.
price
!==
funcItem
.
priceSpecial
&&
funcUserType
)
{
funcItem
.
priceType
=
2
}
else
{
funcItem
.
priceType
=
3
}
}
}
this
.
setData
({
banner
:
funcResponse
.
imgs
.
replace
(
/
\|
$/
,
''
).
split
(
'|'
),
serviceInfo
:
funcItem
})
}
}
this
.
setData
({
banner
:
funcResponse
.
imgs
.
replace
(
/
\|
$/
,
''
).
split
(
'|'
),
serviceInfo
:
funcItem
})
})
})
},
},
...
...
pages/play/service/service.js
View file @
881999b9
...
@@ -16,8 +16,7 @@ Page({
...
@@ -16,8 +16,7 @@ Page({
},
},
queryDetail
:
function
()
{
queryDetail
:
function
()
{
let
that
=
this
let
funcPredefineData
=
[
let
response
=
[
{
{
describe
:
[
describe
:
[
App
.
globalData
.
appResourcesBase
+
'play/detail/detail-1-1.png'
App
.
globalData
.
appResourcesBase
+
'play/detail/detail-1-1.png'
...
@@ -88,28 +87,43 @@ Page({
...
@@ -88,28 +87,43 @@ Page({
shop
:
[]
shop
:
[]
},
},
]
]
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/park/getList'
,
url
:
'v1/park/getList'
,
success
:
function
(
res
)
{
params
:
{},
let
funcData
=
res
.
list
})
response
.
forEach
(
res
=>
{
.
then
((
response
)
=>
{
res
.
shop
.
forEach
(
shop
=>
{
let
funcData
=
response
.
data
funcData
.
forEach
(
item
=>
{
let
funcShopTypeIndex
=
0
if
(
shop
.
id
===
item
.
id
)
{
let
funcShopIndex
=
0
shop
.
name
=
item
.
name
let
funcShopId
=
''
shop
.
summary
=
item
.
summary
shop
.
time
=
item
.
businessTime
while
(
funcPredefineData
[
funcShopTypeIndex
])
{
}
if
(
funcPredefineData
[
funcShopTypeIndex
].
shop
[
funcShopIndex
])
{
})
funcShopId
=
funcPredefineData
[
funcShopTypeIndex
].
shop
[
funcShopIndex
].
id
})
this
.
setShopInfo
(
funcPredefineData
,
funcShopTypeIndex
,
funcShopIndex
,
funcShopId
,
funcData
)
})
funcShopIndex
=
funcShopIndex
+
1
that
.
setData
({
}
else
{
tabDetail
:
response
funcShopTypeIndex
=
funcShopTypeIndex
+
1
})
funcShopIndex
=
0
}
}
}
this
.
setData
({
tabDetail
:
funcPredefineData
})
})
})
},
},
setShopInfo
:
function
(
funcPredefineData
,
funcShopTypeIndex
,
funcShopIndex
,
funcShopId
,
funcData
)
{
for
(
let
i
=
0
,
l
=
funcData
.
length
;
i
<
l
;
i
++
)
{
if
(
funcShopId
===
funcData
[
i
].
id
)
{
funcPredefineData
[
funcShopTypeIndex
].
shop
[
funcShopIndex
].
name
=
funcData
[
i
].
name
funcPredefineData
[
funcShopTypeIndex
].
shop
[
funcShopIndex
].
time
=
funcData
[
i
].
businessTime
funcPredefineData
[
funcShopTypeIndex
].
shop
[
funcShopIndex
].
summary
=
funcData
[
i
].
summary
}
}
},
onShopDetail
:
function
(
funcItem
)
{
onShopDetail
:
function
(
funcItem
)
{
let
funcShopAppId
=
funcItem
.
currentTarget
.
dataset
.
id
let
funcShopAppId
=
funcItem
.
currentTarget
.
dataset
.
id
let
funcShopType
=
funcItem
.
currentTarget
.
dataset
.
type
let
funcShopType
=
funcItem
.
currentTarget
.
dataset
.
type
...
...
pages/play/strategy-detail/strategy-detail.js
View file @
881999b9
...
@@ -41,30 +41,33 @@ Page({
...
@@ -41,30 +41,33 @@ Page({
* @returns
* @returns
*/
*/
queryTouristRouteDetail
()
{
queryTouristRouteDetail
()
{
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/strategy/getDetail'
,
url
:
'v1/strategy/getDetail'
,
data
:
{
id
:
this
.
data
.
id
},
params
:
{
success
:
(
res
)
=>
{
id
:
this
.
data
.
id
// 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
// width:100% --- 图片宽度加以限制,避免超出屏幕
// height:auto --- 高度自适应
// display:block --- 此代码,可以去掉图片之间的空白间隔,个人觉得好用
let
content
=
res
.
data
.
content
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
);
this
.
setData
({
banner
:
res
.
data
.
banners
,
content
:
content
,
date
:
res
.
data
.
updateDate
,
title
:
res
.
data
.
title
})
this
.
queryRelation
(
res
.
data
.
smParkIds
)
},
},
})
})
.
then
((
response
)
=>
{
let
funcData
=
response
.
data
// 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
// width:100% --- 图片宽度加以限制,避免超出屏幕
// height:auto --- 高度自适应
// display:block --- 此代码,可以去掉图片之间的空白间隔
let
content
=
funcData
.
content
.
replace
(
/<img/gi
,
'<img style="width:100%;height:auto;display:block" '
)
.
replace
(
/<table/gi
,
'<table style="max-width:100%;height:auto;display:block" '
)
.
replace
(
/<section/g
,
'<div'
)
.
replace
(
/
\/
section>/g
,
'\div>'
);
this
.
setData
({
banner
:
funcData
.
banners
,
content
:
content
,
date
:
funcData
.
updateDate
,
title
:
funcData
.
title
})
this
.
queryRelation
(
funcData
.
smParkIds
)
})
},
},
/**
/**
...
@@ -78,29 +81,31 @@ Page({
...
@@ -78,29 +81,31 @@ Page({
return
return
}
}
App
.
wxR
equest
({
App
.
r
equest
({
url
:
'v1/park/getParksByParkIds'
,
url
:
'v1/park/getParksByParkIds'
,
data
:
{
smParkIds
:
parkIds
},
params
:
{
success
:
(
response
)
=>
{
smParkIds
:
parkIds
let
funcResponse
=
response
.
data
},
})
let
funcList
=
[]
.
then
((
response
)
=>
{
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcResponse
=
response
.
data
let
funcItem
=
{
'id'
:
funcResponse
[
i
].
id
,
let
funcList
=
[]
'cover'
:
funcResponse
[
i
].
cardImg
,
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
'title'
:
funcResponse
[
i
].
name
,
let
funcItem
=
{
'time'
:
'营业时间 '
+
funcResponse
[
i
].
businessTime
,
'id'
:
funcResponse
[
i
].
id
,
'price'
:
funcResponse
[
i
].
chargeStandard
,
'cover'
:
funcResponse
[
i
].
cardImg
,
'describe'
:
''
,
'title'
:
funcResponse
[
i
].
name
,
}
'time'
:
'营业时间 '
+
funcResponse
[
i
].
businessTime
,
funcList
.
push
(
funcItem
)
'price'
:
funcResponse
[
i
].
chargeStandard
,
'describe'
:
''
,
}
}
funcList
.
push
(
funcItem
)
this
.
setData
({
relation
:
funcList
})
}
}
this
.
setData
({
relation
:
funcList
})
})
})
},
},
...
...
wxss/layout.wxss
0 → 100644
View file @
881999b9
/* 层级说明
- : 整体背景
0 : 视图
1 : 视图
2 : 视图
3 : 视图
4 : 视图
5 : 导航栏,占位元素
6 : 导航栏
7 : 遮罩,弹窗,提示,
8 : 遮罩
9 : 遮罩,toast,dialog
*/
.row { display: flex; flex-direction: row; }
.column { display: flex; flex-direction: column; }
.cs { justify-content: flex-start; }
.cc { justify-content: center; }
.ce { justify-content: flex-end; }
.cb { justify-content: space-between; }
.ca { justify-content: space-around; }
.as { align-items: flex-start; }
.ac { align-items: center; }
.ae { align-items: flex-end; }
.overflow_point_1 { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.overflow_point_2 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.overflow_point_3 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.overflow_point_4 { display: -webkit-box; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
\ No newline at end of file
wxss/theme.wxss
0 → 100644
View file @
881999b9
.text_decoration_delete {
text-decoration: line-through;
}
/* 字体颜色 */
.c00 { color: #000000; }
.c01 { color: #15191F; }
.c10 { color: #E66060; }
.c20 { color: #837048; }
.c30 { color: #5DB5DD; }
.c31 { color: #959DA9; }
.c32 { color: #656E7B; }
.c40 { color: #86C5E1; }
.c90 { color: #FFFFFF; }
/* 背景颜色 */
.cbg00 { background-color: #000000; }
.cbg01 { background-color: #15191F; }
.cbg10 { background-color: #E66060; }
.cbg20 { background-color: #837048; }
.cbg30 { background-color: #5DB5DD; }
.cbg31 { background-color: #959DA9; }
.cbg32 { background-color: #656E7B; }
.cbg40 { background-color: #86C5E1; }
.cbg90 { background-color: #FFFFFF; }
/* 字体字重 */
.fw100 { font-weight: 100; }
.fw200 { font-weight: 200; }
.fw300 { font-weight: 300; }
.fw400 { font-weight: 400; }
.fw500 { font-weight: 500; }
.fw600 { font-weight: 600; }
.fw700 { font-weight: 700; }
.fw800 { font-weight: 800; }
/* 字体大小 */
.fs18 { font-size: 18rpx; line-height: 26rpx; }
.fs22 { font-size: 22rpx; line-height: 32rpx; }
.fs26 { font-size: 26rpx; line-height: 36rpx; }
.fs30 { font-size: 30rpx; line-height: 40rpx; }
.fs34 { font-size: 34rpx; line-height: 48rpx; }
.fs38 { font-size: 38rpx; line-height: 52rpx; }
.fs42 { font-size: 42rpx; line-height: 58rpx; }
.fs50 { font-size: 50rpx; line-height: 72rpx; }
.fs54 { font-size: 54rpx; line-height: 76rpx; }
/* icon 大小 */
.i32 { width: 32rpx; height: 32rpx; }
.i40 { width: 40rpx; height: 40rpx; }
.i48 { width: 48rpx; height: 48rpx; }
.i136 { width: 136rpx; height: 136rpx; }
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment