Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panyongping
uni-pdtravel
Commits
33b5b1f2
Commit
33b5b1f2
authored
Aug 03, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/album' into develop
parents
78d0702e
b382ed0c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1162 additions
and
578 deletions
+1162
-578
pages.json
pages.json
+10
-1
albumIndex.vue
pages/album/albumIndex.vue
+82
-8
chooseFavorite.vue
pages/album/chooseFavorite.vue
+29
-91
myPhotoAlbum.vue
pages/album/myPhotoAlbum/myPhotoAlbum.vue
+691
-478
purchasedPhotoAlbum.vue
pages/album/purchasedPhotoAlbum/purchasedPhotoAlbum.vue
+350
-0
No files found.
pages.json
View file @
33b5b1f2
...
...
@@ -372,7 +372,16 @@
}
}
]
,{
"path"
:
"purchasedPhotoAlbum/purchasedPhotoAlbum"
,
"style"
:
{
"navigationBarTitleText"
:
"我的影集"
,
"enablePullDownRefresh"
:
false
}
}
]
}
],
"globalStyle"
:
{
...
...
pages/album/albumIndex.vue
View file @
33b5b1f2
<
template
>
<view
class=
"big-box"
:style=
"
{'padding-top': statusBarHeight + 'px'}">
<view
class=
"big-box"
:style=
"
{'padding-top': statusBarHeight + 'px'}"
v-show="show"
>
<view
class=
"nav-bar"
:style=
"
{'top': statusBarHeight + 'px', 'height': navHeight + 'px','line-height': navHeight + 'px'}">
摄影/旅拍
</view>
...
...
@@ -92,6 +92,7 @@ export default {
statusBarHeight
:
0
,
capsule
:
0
,
navHeight
:
0
,
show
:
false
,
//是否显示首页
list
:
[
{
title
:
'精彩瞬间'
,
...
...
@@ -129,14 +130,15 @@ export default {
image
:
'./static/album/customPic.png'
,
color
:
'#D48D46'
}
]
],
options
:
{}
//路由参数
}
},
methods
:
{
jumpToScanFaceClick
()
{
//---跳转扫脸页面
const
openid
=
uni
.
getStorageSync
(
'openid'
)
this
.
$request
(
'wechatUser/pdFace/checkScanFace'
,{
openid
}).
then
(
res
=>
{
//创建任务
this
.
$request
(
'wechatUser/pdFace/checkScanFace'
,{
openid
}).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
if
(
res
.
data
.
isScanFace
===
0
)
{
//未扫脸
uni
.
navigateTo
({
...
...
@@ -156,7 +158,6 @@ export default {
})
},
jumptoVlog
()
{
//---跳转到vlog页面
console
.
log
(
'fdsa'
)
uni
.
redirectTo
({
url
:
'/pages/vlog/vlogIndex/vlogIndex'
})
...
...
@@ -166,16 +167,89 @@ export default {
this
.
jumpToScanFaceClick
()
}
},
judgeWhether
(
url
,
data
)
{
//---判断是否成功的封装函数
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$request
(
url
,
data
).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
resolve
(
res
.
data
)
}
else
{
reject
(
false
)
}
})
})
},
async
handleWhetherToVotePage
()
{
//---判断是否跳转投票页面
// 1.获取调查列表
const
surveyQueryData
=
{
pageCode
:
'albumIndex'
,
//默认前端写死
channelId
:
this
.
options
.
channelId
//游客扫码携带的channelId或者是胖丁登录时的公司id
}
const
surveyList
=
await
this
.
judgeWhether
(
'scenic/market/findPageMarket'
,
surveyQueryData
)
// 2.判断商店是否在做投票活动
let
surveyIds
let
surveyResult
=
[]
if
(
surveyList
.
length
)
{
surveyIds
=
surveyList
.
map
(
item
=>
item
.
surveyId
)
surveyResult
=
await
this
.
judgeWhether
(
'scenic/albumConfig/getSurveyConfig'
,
{
surveyIds
})
}
// 3.判断用户是否已经投过票
let
voteObj
=
{}
// 用户投票信息
if
(
surveyResult
.
length
)
{
// 默认保存第一个商店id到缓存
uni
.
setStorageSync
(
'merchantId'
,
surveyResult
[
0
].
merchantId
)
const
votedQueryData
=
{
merchantId
:
surveyResult
[
0
].
merchantId
,
openid
:
uni
.
getStorageSync
(
'openid'
)
}
voteObj
=
await
this
.
judgeWhether
(
'wechatUser/pdAlbum/checkVisitorSurvey'
,
votedQueryData
)
}
// 4.判断是否跳转投票页面
if
(
voteObj
.
alreadySurvey
===
0
)
{
// 未投过票
uni
.
navigateTo
({
url
:
`./chooseFavorite?surveyConfig=
${
JSON
.
stringify
(
surveyResult
)}
`
})
}
else
if
(
voteObj
.
alreadySurvey
===
1
)
{
// 已投票
this
.
show
=
true
}
},
recordDeviceInfo
()
{
//---记录设备信息
this
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
// 状态栏高度
this
.
capsule
=
uni
.
getMenuButtonBoundingClientRect
()
// 胶囊大小、位置数据
this
.
navHeight
=
(
this
.
capsule
.
top
-
this
.
statusBarHeight
)
*
2
+
this
.
capsule
.
height
// 导航栏高度
}
}
},
onLoad
(
option
)
{
if
(
option
.
tip
===
'true'
)
this
.
showtip
=
true
onLoad
(
options
)
{
this
.
recordDeviceInfo
()
}
this
.
options
=
options
if
(
this
.
options
.
tip
===
'true'
)
{
this
.
show
=
true
this
.
showtip
=
true
}
else
{
this
.
handleWhetherToVotePage
()
}
if
(
uni
.
getStorageSync
(
'location'
))
return
uni
.
getLocation
({
//获取定位
type
:
'wgs84'
,
success
:
res
=>
{
uni
.
setStorageSync
(
'location'
,
JSON
.
stringify
(
res
))
},
fail
()
{
uni
.
showToast
({
title
:
'获取经纬度失败'
,
icon
:
'none'
})
}
})
}
}
</
script
>
...
...
pages/album/chooseFavorite.vue
View file @
33b5b1f2
<
template
>
<view
class=
"big-box"
:style=
"
{'padding-top': statusBarHeight + 'px'}">
<view
class=
"nav-bar"
:style=
"
{'height': navHeight + 'px'}">
<picker
mode=
"selector"
@
change=
"companyChage"
:value=
"index"
:range=
"companyArr"
range-key=
"
n
ame"
>
<view
class=
"company"
>
{{
companyArr
[
index
]
?
companyArr
[
index
].
n
ame
:
'请选择公司'
}}
</view>
<picker
mode=
"selector"
@
change=
"companyChage"
:value=
"index"
:range=
"companyArr"
range-key=
"
merchantN
ame"
>
<view
class=
"company"
>
{{
companyArr
[
index
]
?
companyArr
[
index
].
merchantN
ame
:
'请选择公司'
}}
</view>
</picker>
<u-icon
name=
"arrow-down"
></u-icon>
</view>
...
...
@@ -13,8 +13,8 @@
<image
class=
"start"
src=
"./static/album/star.png"
></image>
</view>
<view
class=
"img-box"
>
<view
class=
"item"
@
click=
"imageChange(item)"
v-for=
"(item, index) in imgArr"
:key=
"item.
i
d"
>
<image
class=
"img"
:src=
"item.
u
rl"
mode=
"aspectFill"
></image>
<view
class=
"item"
@
click=
"imageChange(item)"
v-for=
"(item, index) in imgArr"
:key=
"item.
templateI
d"
>
<image
class=
"img"
:src=
"item.
templateU
rl"
mode=
"aspectFill"
></image>
<u-checkbox
class=
"checkbox"
v-model=
"item.value"
shape=
"circle"
></u-checkbox>
</view>
</view>
...
...
@@ -39,20 +39,27 @@ export default {
index
:
0
,
// 选中的公司索引-默认选中第一个
companyArr
:
[],
// 公司枚举
imgArr
:
[],
//图片
value
:
true
,
location
:
{},
//位置信息
option
:
{},
//路由传参
}
},
methods
:
{
saveClick
()
{
//---提交
const
selectedPic
=
this
.
imgArr
.
filter
(
item
=>
item
.
value
)
const
templateIds
=
this
.
imgArr
.
map
(
item
=>
{
if
(
item
.
value
)
return
item
.
templateId
})
||
[]
if
(
!
templateIds
.
length
)
return
uni
.
showToast
({
title
:
'您还没有选择模板哟!'
,
icon
:
'none'
})
const
data
=
{
id
:
selectedPic
[
0
].
id
,
// 图片id
merchantId
:
selectedPic
[
0
].
merchantId
merchantId
:
this
.
companyArr
[
this
.
index
].
merchantId
,
//商店id
openid
:
uni
.
getStorageSync
(
'openid'
),
//openid
templateIds
//模板Id
}
uni
.
setStorageSync
(
'merchantId'
,
data
.
merchantId
)
this
.
$request
(
'
scenic/V2merchant/submitChoose'
,
data
).
then
(
res
=>
{
//创建任务
this
.
$request
(
'
wechatUser/pdAlbum/saveVisitorSurvey'
,
data
).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
uni
.
showToast
({
title
:
'提交成功'
,
...
...
@@ -71,99 +78,30 @@ export default {
},
companyChage
(
e
)
{
//---公司变化
this
.
index
=
Number
(
e
.
detail
.
value
)
const
merchantId
=
this
.
companyArr
[
this
.
index
].
id
this
.
getPic
(
merchantId
)
this
.
imgArr
=
this
.
companyArr
[
this
.
index
].
templateDetailList
},
imageChange
(
item
)
{
//---图片选择
this
.
imgArr
.
forEach
(
item
=>
item
.
value
=
false
)
item
.
value
=
true
this
.
$set
(
item
,
'value'
,
!
item
.
value
)
this
.
$forceUpdate
()
// item.value = !item.value
},
recordDeviceInfo
()
{
//---记录设备信息
this
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
// 状态栏高度
this
.
capsule
=
uni
.
getMenuButtonBoundingClientRect
()
// 胶囊大小、位置数据
this
.
navHeight
=
(
this
.
capsule
.
top
-
this
.
statusBarHeight
)
*
2
+
this
.
capsule
.
height
// 导航栏高度
},
getCompany
(
nearbyId
)
{
//---获取景区列表
this
.
$request
(
'scenic/newMerchant/findAllMerchant'
).
then
(
res
=>
{
//创建任务
if
(
res
.
code
===
'00'
)
{
if
(
!
res
.
data
.
length
)
return
const
id
=
this
.
option
.
merchantId
||
nearbyId
let
index
=
res
.
data
.
findIndex
(
item
=>
item
.
id
===
id
)
this
.
index
=
index
===
-
1
?
0
:
index
this
.
companyArr
=
res
.
data
this
.
getPic
(
this
.
companyArr
[
this
.
index
].
id
)
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
getPic
(
merchantId
)
{
//---获取景区图片
this
.
$request
(
'scenic/V2merchant/getImgList'
,{
merchantId
}).
then
(
res
=>
{
//创建任务
if
(
res
.
code
===
'00'
)
{
res
.
data
.
forEach
(
item
=>
item
.
value
=
false
)
this
.
imgArr
=
res
.
data
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
},
getNearByCompany
()
{
//---获取最近的景区
const
data
=
{
merchantType
:
1
,
userlatitude
:
this
.
location
.
latitude
,
//纬度
userlongitude
:
this
.
location
.
longitude
//经度
}
this
.
$request
(
'scenic/newMerchant/findAllMerchant'
,
data
).
then
(
res
=>
{
//创建任务
if
(
res
.
code
===
'00'
)
{
if
(
!
res
.
data
.
length
)
{
this
.
getCompany
()
return
uni
.
showToast
({
title
:
'获取最近景点失败'
,
icon
:
'none'
})
}
this
.
getCompany
(
res
.
data
[
0
].
id
)
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
})
}
})
}
},
onLoad
(
option
)
{
this
.
option
=
option
this
.
recordDeviceInfo
()
uni
.
getLocation
({
//获取定位
type
:
'wgs84'
,
success
:
res
=>
{
this
.
location
=
res
uni
.
setStorageSync
(
'location'
,
JSON
.
stringify
(
res
))
if
(
this
.
option
.
merchantId
)
{
//扫码进入则直接加载景区列表,默认显示传入的景区
this
.
getCompany
()
}
else
{
//否则获取并显示距离最近的景点
this
.
getNearByCompany
()
}
},
fail
()
{
this
.
getCompany
()
uni
.
showToast
({
title
:
'获取经纬度失败'
,
icon
:
'none'
})
}
this
.
option
=
option
this
.
companyArr
=
JSON
.
parse
(
option
.
surveyConfig
)
const
imgArr
=
[]
this
.
companyArr
.
forEach
(
item
=>
{
imgArr
.
push
(...
item
.
templateDetailList
)
})
imgArr
.
forEach
(
item
=>
this
.
$set
(
item
,
'value'
,
false
))
this
.
imgArr
=
this
.
companyArr
[
0
].
templateDetailList
}
}
</
script
>
...
...
pages/album/myPhotoAlbum/myPhotoAlbum.vue
View file @
33b5b1f2
...
...
@@ -6,106 +6,76 @@
<view
class=
"left-name"
>
照片来源
</view>
<view
class=
"left-picker"
@
click=
"orderShow=true"
>
<i>
{{
cityName
}}
</i>
<image
src=
"../
../../static/img
/album/myPhoto01.png"
></image>
<image
src=
"../
static
/album/myPhoto01.png"
></image>
</view>
<u-picker
mode=
"selector"
v-model=
"orderShow"
:default-selector=
"[orderType]"
:range=
"option"
range-key=
"cateName"
@
confirm=
"industrysTypeConfirm($event)"
@
cancel=
"cancel"
></u-picker>
<view
class=
"left-project"
:class=
"[projectCheck==0?'left-projectDe':'']"
@
click=
"projectClick(0)"
>
长江索道
<i>
6
</i>
</view>
<view
class=
"left-project"
:class=
"[projectCheck==1?'left-projectDe':'']"
@
click=
"projectClick(1)"
>
定制旅拍
<i>
8
</i>
<u-picker
mode=
"selector"
v-model=
"orderShow"
:default-selector=
"[orderType]"
:range=
"option"
range-key=
"areaName"
@
confirm=
"industrysTypeConfirm($event)"
@
cancel=
"cancel"
></u-picker>
<view
v-for=
"(item,index) in merchantList"
:key=
"index"
class=
"left-project"
:class=
"[projectCheck==0?'left-projectDe':'']"
@
click=
"projectClick(index,item.id)"
>
{{
item
.
name
}}
<i>
{{
previewData
.
length
}}
</i>
</view>
</view>
<view
class=
"address-right"
@
click=
"projectMoreFun()"
>
<view
class=
"address-right"
@
click=
"projectMoreFun()"
v-if=
"merchantList.length>2"
>
<u-icon
name=
"more-dot-fill"
></u-icon>
</view>
</view>
<!--头部更多-->
<view
class=
"album-addressMore"
v-if=
"projectMoreType==true"
>
<view
class=
"addressMore-name"
>
长江索道(6)
</view>
<view
class=
"addressMore-name"
>
定制旅拍(8)
</view>
<view
class=
"addressMore-name"
v-for=
"(item,index) in merchantList"
:key=
"index"
>
{{
item
.
name
}}
(
{{
previewData
.
length
}}
)
</view>
</view>
<!--全选按钮-->
<view
class=
"album-checkAll"
>
<u-checkbox
v-model=
"checkProjectAll"
>
全选
</u-checkbox>
<u-checkbox
v-model=
"checkProjectAll"
@
change=
"checkProjectAllFun()"
>
全选
</u-checkbox>
<view
class=
"checkAll-tips"
>
未下载影像保留15天
</view>
</view>
<!--主体循环-->
<view
class=
"album-subject"
>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
<view
class=
"subject-List"
>
<image
class=
"list-image"
src=
"../../../static/img/hghg/dialog.png"
></image>
<u-checkbox
v-model=
"checkProjectAll"
shape=
"circle"
class=
"list-uCheck"
></u-checkbox>
<view
class=
"subject-List"
v-for=
"(item,index) in previewData"
:key=
"index"
@
click=
"projectCheckPhoto(index)"
>
<image
class=
"list-image"
:src=
"item.faceSourceUrl||item.faceAiUrl"
></image>
<u-checkbox
v-model=
"item.checkType"
v-if=
"checkTypeFun==true"
@
click
.
stop
.
native=
"()=>
{}" @change="stopPhoto(index)" shape="circle" class="list-uCheck">
</u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
</view>
<!--脚部-->
<view
class=
"album-bottom"
>
<view
class=
"bottom-left"
v-if=
"maskDetail==false"
>
<view
class=
"left-oldMoney"
>
¥
15.00
</view>
<view
class=
"left-newMoney"
>
¥
10.00
</view>
<view
class=
"left-oldMoney"
>
¥
{{
originalPrice
}}
</view>
<view
class=
"left-newMoney"
>
¥
{{
sellingPrice
}}
</view>
<view
class=
"left-detail"
@
click=
"maskDetail=true"
>
<text>
明细
</text>
<u-icon
name=
"arrow-up"
></u-icon>
</view>
<view
class=
"left-num"
>
1
</view>
<view
class=
"left-mask"
>
<view
class=
"left-num"
v-if=
"priceNum>0"
>
{{
priceNum
}}
</view>
<view
class=
"left-mask"
v-if=
"priceNum>0"
>
多够更省
<view
class=
"mask-transparent"
></view>
</view>
</view>
<view
class=
"bottom-Detail"
v-if=
"maskDetail==true"
>
<view
class=
"detail-total"
>
合计:¥
8.00
</view>
<view
class=
"detail-favorable"
>
优惠减:¥
2.00
</view>
<view
class=
"detail-total"
>
合计:¥
{{
sellingPrices
}}
</view>
<view
class=
"detail-favorable"
>
优惠减:¥
{{
favorablePrice
}}
</view>
</view>
<view
class=
"bootom-btn"
>
去下载
</view>
<view
class=
"bootom-btn"
@
click=
"upLoad()"
>
去下载
</view>
</view>
<!--预览-->
<view
class=
"album-maskPreview"
>
<view
class=
"album-maskPreview"
v-if=
"maskPreviewType==true"
@
click=
"maskPreviewType=false"
>
<view
class=
"maskPreview-Num"
>
{{
previewNum
+
1
}}
/
{{
previewData
.
length
}}
</view>
<view
class=
"maskPreview-img"
@
touchstart=
"start"
@
touchend=
"end"
@
touchmove=
"move"
>
<view
class=
"maskPreview-img"
@
touchstart=
"start"
@
touchend=
"end"
@
touchmove=
"move"
>
<template
v-if=
"previewData.length==1"
>
<image
class=
"img-center"
:src=
"previewData[previewNum].
src
"
></image>
<image
class=
"img-center"
:src=
"previewData[previewNum].
faceSourceUrl
"
></image>
</
template
>
<
template
v-else
>
<image
class=
"img-left"
v-if=
"previewNum==0"
:src=
"previewData[previewData.length-1].src
"
></image>
<image
class=
"img-left"
v-else
:src=
"previewData[previewNum-1].src
"
></image>
<image
class=
"img-center"
:style=
"
{
'right':touchRight,'left':touchLeft}" :src="previewData[previewNum].src
">
</image>
<image
class=
"img-right"
v-if=
"previewNum==previewData.length-1"
:src=
"previewData[0].src
"
></image>
<image
class=
"img-right"
v-else
:src=
"previewData[previewNum+1].src
"
></image>
<image
class=
"img-left"
:style=
"
{left:touchLeft0 +'rpx'}" v-if="previewNum==0" :src="previewData[previewData.length-1].faceSourceUrl||previewData[previewData.length-1].faceAiUrl
">
</image>
<image
class=
"img-left"
:style=
"
{left:touchLeft0 +'rpx'}" v-else :src="previewData[previewNum-1].faceSourceUrl||previewData[previewNum-1].faceAiUrl
">
</image>
<image
class=
"img-center"
:style=
"
{
right:touchRight +'rpx',left:touchLeft +'rpx'}" :src="previewData[previewNum].faceSourceUrl||previewData[previewNum].faceAiUrl
">
</image>
<image
class=
"img-right"
:style=
"
{right:touchRight2 +'rpx'}" v-if="previewNum==previewData.length-1" :src="previewData[0].faceSourceUrl||previewData[0].faceAiUrl
">
</image>
<image
class=
"img-right"
:style=
"
{right:touchRight2 +'rpx'}" v-else :src="previewData[previewNum+1].faceSourceUrl||previewData[previewNum+1].faceAiUrl
">
</image>
</
template
>
</view>
<view
class=
"maskPreview-check"
>
<u-checkbox
v-model=
"previewData[previewNum].
type"
shape=
"circle"
class=
"maskPreview-Check"
></u-checkbox>
<view
class=
"maskPreview-check"
v-if=
"checkTypeFun==true"
>
<u-checkbox
v-model=
"previewData[previewNum].
checkType"
@
click
.
stop
.
native=
"()=>{}"
@
change=
"stopPhoto(previewNum)"
shape=
"circle"
class=
"maskPreview-Check"
></u-checkbox>
</view>
</view>
<!--明细-->
...
...
@@ -113,19 +83,20 @@
<view
class=
"maskDetail-content"
>
<view
class=
"content-title"
>
明细
<u-icon
class=
"title-close"
name=
"close-circle"
@
click=
"maskDetail=false"
></u-icon>
<u-icon
class=
"title-close"
name=
"close-circle"
@
click=
"maskDetail=false"
></u-icon>
</view>
<view
class=
"content-label"
>
我的相片
</view>
<view
class=
"content-money"
>
<view
class=
"money-name"
>
相片
</view>
<view
class=
"money-text"
>
1*10.00=10.00
</view>
<view
class=
"money-text"
>
{{priceNum}}*{{sellingPrice}}={{sellingPrices}}
</view>
</view>
<view
class=
"content-favorable"
>
<view
class=
"favorable-name"
>
优惠
</view>
<view
class=
"favorable-text"
>
-¥
2.00
</view>
<view
class=
"favorable-text"
>
-¥
{{favorablePrice}}
</view>
</view>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</template>
...
...
@@ -133,517 +104,759 @@
import
uPicker
from
'@/uview-ui/components/u-picker/u-picker.vue'
import
uCheckboxGroup
from
'@/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'
import
uCheckbox
from
'@/uview-ui/components/u-checkbox/u-checkbox'
import
uToast
from
'@/uview-ui/components/u-toast/u-toast.vue'
export
default
{
components
:
{
uPicker
,
uCheckboxGroup
,
uCheckbox
,
uToast
},
data
()
{
return
{
orderShow
:
false
,
//头部城市选择
option
:
[
{
cateName
:
'全部'
,
id
:
0
},
{
cateName
:
'景区'
,
id
:
1
},
{
cateName
:
'酒店'
,
id
:
2
},
{
cateName
:
'餐饮'
,
id
:
3
},
{
cateName
:
'特产'
,
id
:
4
},
// { cateName: '运营车', id: 5 },
// { cateName: '组合订单', id: 10 },
],
cityName
:
'重庆'
,
projectCheck
:
0
,
//当前选择的产品
projectMoreType
:
false
,
//是否显示更多产品
checkProjectAll
:
false
,
//所有产品全选
maskDetail
:
false
,
previewData
:[
//图片预览
{
type
:
false
,
src
:
'../../../static/img/hghg/dialog.png'
},
{
type
:
false
,
src
:
'../../../static/img/coupon/coupon.jpg'
},
{
type
:
false
,
src
:
'../../../static/img/common/getTicketBg.jpg'
},
faceIds
:
[],
//查询照片ID
openid
:
''
,
orderShow
:
false
,
//头部城市选择
option
:
[],
//城市
cityName
:
'重庆'
,
areaId
:
'100500000'
,
//城市ID
merchantId
:
''
,
//商户ID
location
:
{},
//位置信息
projectCheck
:
0
,
//当前选择的产品
merchantList
:[],
//头部列表
projectMoreType
:
false
,
//是否显示更多产品
checkProjectAll
:
false
,
//所有产品全选
maskDetail
:
false
,
maskPreviewType
:
false
,
//遮罩预览
previewData
:
[
//图片预览
// {
// type: false,
// src: '../static/album/customPic.png'
// },
],
previewNum
:
0
,
//当前是第几张图片
previewNum
:
0
,
//当前是第几张图片
checkTypeFun
:
true
,
//刷新选项
//左右滑动监听开始
startData
:
{
clientX
:
''
,
clientY
:
''
,
},
transition
:
''
,
transition
:
''
,
touch
:
{},
touchLeft
:
0
,
touchRight
:
0
,
touchLeft0
:
-
466
,
touchLeft
:
0
,
touchRight
:
0
,
touchRight2
:
-
466
,
touchType
:
0
,
//向左0++ 向右1--
//左右滑动 监听结束
originalPrice
:
0
,
//原价单价
originalPrices
:
0
,
//原价
sellingPrice
:
0
,
//售价单价
sellingPrices
:
0
,
//售价
favorablePrice
:
0
,
//优惠
priceNum
:
0
,
//选购了多少照片
}
},
onLoad
(
option
)
{
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
//获取openid
this
.
faceIds
=
JSON
.
parse
(
option
.
faceIds
)
this
.
location
=
JSON
.
parse
(
uni
.
getStorageSync
(
'location'
))
this
.
merchantId
=
uni
.
getStorageSync
(
'merchantId'
)
// 'z0015605022691a5945bbe463141668c'
this
.
obtainProvince
()
//获取省市区
this
.
inquireMerchant
()
//查询所有商户
this
.
getPhotos
()
//照片列表
},
methods
:
{
industrysTypeConfirm
(
e
)
{
//单列----分类 点击确定 城市
this
.
cityName
=
this
.
option
[
e
].
cateName
obtainProvince
(){
//获取省列表
this
.
$request
(
'scenic/search/loadAreaByCity'
,{
areaLevel
:
1
,
inChina
:
0
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
option
=
res
.
data
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
cancel
()
{
//单列 点击取消
this
.
orderShow
=
false
inquireMerchant
(){
//查询所有商户
var
data
=
{
id
:
this
.
merchantId
,
//商户ID
province
:
this
.
areaId
,
//省市ID
areaCode
:
this
.
areaId
,
//省市ID
userlatitude
:
this
.
location
.
latitude
,
//纬度
userlongitude
:
this
.
location
.
longitude
,
//经度
merchantType
:
1
,
//
}
this
.
$request
(
'scenic/newMerchant/findAllMerchant'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
merchantList
=
res
.
data
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
projectClick
(
num
){
//产品选择
getPhotos
(){
//照片
var
data
=
{
faceIds
:
this
.
faceIds
,
//照片ID
openid
:
this
.
openid
,
merchantId
:
this
.
merchantId
,
//商户ID
}
this
.
$request
(
'wechatUser/pdFace/list'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
previewData
=
res
.
data
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
[
'checkType'
]
=
false
this
.
originalPrice
=
item
.
originalPrice
//原价.
this
.
sellingPrice
=
item
.
sellingPrice
//售价
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
industrysTypeConfirm
(
e
)
{
//单列----分类 点击确定 城市
this
.
cityName
=
this
.
option
[
e
].
areaName
this
.
areaId
=
this
.
option
[
e
].
areaId
this
.
inquireMerchant
()
},
cancel
()
{
//单列 点击取消
this
.
orderShow
=
false
},
projectClick
(
num
,
id
)
{
//商户选择
this
.
projectCheck
=
num
this
.
merchantId
=
id
this
.
inquireMerchant
()
},
projectMoreFun
(){
//更多产品显示
if
(
this
.
projectMoreType
==
false
){
this
.
projectMoreType
=
true
projectCheckPhoto
(
index
){
//点击预览
this
.
previewNum
=
index
this
.
maskPreviewType
=
true
},
stopPhoto
(
index
){
//刷新显示
if
(
this
.
checkProjectAll
==
true
){
this
.
checkProjectAll
=
false
}
if
(
this
.
previewData
[
index
].
checkType
==
false
){
this
.
previewData
[
index
].
checkType
=
true
}
else
{
this
.
previewData
[
index
].
checkType
=
false
}
this
.
checkTypeFun
=
false
this
.
checkTypeFun
=
true
this
.
checkMonkey
()
},
checkProjectAllFun
(){
//是否全选
if
(
this
.
checkProjectAll
==
true
){
this
.
checkProjectAll
=
false
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
.
checkType
=
false
})
}
else
{
this
.
checkProjectAll
=
true
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
.
checkType
=
true
})
}
this
.
checkMonkey
()
},
checkMonkey
(){
//明细价格计算
this
.
originalPrices
=
0
//原价
this
.
sellingPrices
=
0
//售价
this
.
priceNum
=
0
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checkType
==
true
){
this
.
originalPrices
+=
item
.
originalPrice
//原价
this
.
sellingPrices
+=
item
.
sellingPrice
//售价
this
.
priceNum
++
}
})
},
projectMoreFun
()
{
//更多产品显示
if
(
this
.
projectMoreType
==
false
)
{
this
.
projectMoreType
=
true
}
else
{
this
.
projectMoreType
=
false
}
},
// 触摸touch事件
start
(
e
)
{
//@touchstart 触摸开始
start
(
e
)
{
//@touchstart 触摸开始
this
.
transition
=
'.1s'
this
.
startData
.
clientX
=
e
.
changedTouches
[
0
].
clientX
//手指按下时的X坐标
this
.
startData
.
clientY
=
e
.
changedTouches
[
0
].
clientY
//手指按下时的Y坐标
this
.
startData
.
clientX
=
e
.
changedTouches
[
0
].
clientX
//手指按下时的X坐标
this
.
startData
.
clientY
=
e
.
changedTouches
[
0
].
clientY
//手指按下时的Y坐标
},
end
(
e
)
{
//@touchend触摸结束
end
(
e
)
{
//@touchend触摸结束
this
.
transition
=
'.5s'
if
(
Math
.
abs
(
this
.
touch
.
clientX
-
this
.
startData
.
clientX
)
>
100
)
{
//在事件结束时,判断滑动的距离是否达到出发需要执行事件的要求
if
(
Math
.
abs
(
this
.
touch
.
clientX
-
this
.
startData
.
clientX
)
>
100
)
{
//在事件结束时,判断滑动的距离是否达到出发需要执行事件的要求
console
.
log
(
'执行查看跳转事件'
)
// this.touch = {};
//动画结束后回到原位 切换图片
this
.
touchLeft0
=
-
466
this
.
touchLeft
=
0
this
.
touchRight
=
0
this
.
touchRight2
=
-
466
//判断当前应该显示哪张照片
if
(
this
.
touchType
==
1
)
{
if
(
this
.
previewNum
==
0
)
{
this
.
previewNum
=
this
.
previewData
.
length
-
1
}
else
{
this
.
previewNum
--
}
}
else
{
if
(
this
.
previewNum
==
this
.
previewData
.
length
-
1
)
{
this
.
previewNum
=
0
}
else
{
this
.
previewNum
++
}
}
}
else
{
console
.
log
(
'滑动距离不够,不执行跳转'
)
// this.touch = {};
//动画结束后回到原位
this
.
touchLeft0
=
-
466
this
.
touchRight0
=
0
this
.
touchLeft
=
0
this
.
touchRight
=
0
this
.
touchLeft2
=
0
this
.
touchRight2
=
-
466
}
},
move
(
event
)
{
//@touchmove触摸移动
let
touch
=
event
.
touches
[
0
]
//滑动过程中,手指滑动的坐标信息 返回的是Objcet对象
move
(
event
)
{
//@touchmove触摸移动
let
touch
=
event
.
touches
[
0
]
//滑动过程中,手指滑动的坐标信息 返回的是Objcet对象
this
.
touch
=
touch
let
data
=
touch
.
clientX
-
this
.
startData
.
clientX
if
(
touch
.
clientX
<
this
.
startData
.
clientX
)
{
//向左移动
if
(
touch
.
clientX
<
this
.
startData
.
clientX
)
{
//向左移动
console
.
log
(
'左滑动'
)
console
.
log
(
touch
.
clientX
)
console
.
log
(
this
.
startData
.
clientX
)
this
.
touchRight
=
touch
.
clientX
-
this
.
startData
.
clientX
//方向RPX值
this
.
touchRight
=
this
.
startData
.
clientX
-
touch
.
clientX
this
.
touchLeft0
=
this
.
touchLeft0
+
this
.
startData
.
clientX
-
touch
.
clientX
this
.
touchRight2
=
this
.
touchRight2
+
this
.
startData
.
clientX
-
touch
.
clientX
this
.
touchType
=
0
}
if
(
touch
.
clientX
>
this
.
startData
.
clientX
)
{
//向右移动
if
(
touch
.
clientX
>
this
.
startData
.
clientX
)
{
//向右移动
console
.
log
(
'右滑动'
)
console
.
log
(
touch
.
clientX
)
console
.
log
(
this
.
startData
.
clientX
)
this
.
touchLeft
=
touch
.
clientX
-
this
.
startData
.
clientX
//方向RPX值
this
.
touchLeft
=
touch
.
clientX
-
this
.
startData
.
clientX
this
.
touchLeft0
=
this
.
touchLeft0
+
this
.
startData
.
clientX
-
touch
.
clientX
this
.
touchRight2
=
this
.
touchRight2
+
this
.
startData
.
clientX
-
touch
.
clientX
this
.
touchType
=
1
}
},
upLoad
(){
//下单
var
data
=
{
orderMoney
:
this
.
sellingPrices
,
//订单总价
orderProductVo
:{},
//下单信息
}
var
orderProductVo
=
{
buyNum
:
this
.
priceNum
,
//购买数量
orderImgList
:[],
//订单图片
orderType
:
1
,
//订单类型(0其他,1景区,2酒店,3餐饮,4特产,5运营车,10组合订单)
postage
:
0
,
//邮费
couponList
:[],
//产品券信息 游客使用券信息后传
unitPrice
:
this
.
sellingPrice
,
//产品单价
}
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checkType
==
true
){
var
imgList
=
{
imgUrl
:
item
.
faceSourceUrl
||
item
.
faceAiUrl
}
orderProductVo
.
orderImgList
.
push
(
imgList
)
}
})
data
.
orderProductVo
=
orderProductVo
this
.
$request
(
'orderc/photo/photoCreateOrder'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
uni
.
navigateTo
({
// url: `./myPhotoAlbum/myPhotoAlbum?faceIds=${JSON.stringify(res.data.faceIds)}`
url
:
'../../payment/orderPayment/orderPayment?orderId='
+
res
.
data
.
id
+
'&albumOrderdetail=1'
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
page
{
background-color
:
#F7F7F7
;
}
.albumBox
{
// 76=16 - 44 - 16 98 =34 - 32 - 32
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
background-color
:
#F7F7F7
;
padding-bottom
:
98rpx
;
padding-top
:
174rpx
;
overflow
:
auto
;
}
.album-address
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
76rpx
;
padding
:
0
24rpx
0
24rpx
;
background-color
:
#FFFFFF
;
box-shadow
:
0
0
16px
0
rgba
(
0
,
0
,
0
,
0
.1
);
overflow
:
hidden
;
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
20
;
.address-left
{
page
{
background-color
:
#F7F7F7
;
}
.albumBox
{
// 76=16 - 44 - 16 98 =34 - 32 - 32
display
:
flex
;
flex
:
1
;
box-shadow
:
inset
-16px
0px
8px
0px
rgba
(
255
,
255
,
255
,
0
.2
);
overflow-x
:
auto
;
.left-name
{
font-size
:
32rpx
;
color
:
#999999
;
line-height
:
76rpx
;
margin-right
:
48rpx
}
.left-picker
{
flex-direction
:
column
;
height
:
100%
;
background-color
:
#F7F7F7
;
padding-bottom
:
98rpx
;
padding-top
:
174rpx
;
overflow
:
auto
;
}
.album-address
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
76rpx
;
padding
:
0
24rpx
0
24rpx
;
background-color
:
#FFFFFF
;
box-shadow
:
0
0
16px
0
rgba
(
0
,
0
,
0
,
0
.1
);
overflow
:
hidden
;
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
20
;
.address-left
{
display
:
flex
;
f
ont-size
:
32rpx
;
color
:
#333333
;
line-height
:
76rpx
;
margin-right
:
24rpx
;
image
{
width
:
26
rpx
;
height
:
26rpx
;
margin-top
:
25
rpx
;
margin-
left
:
8rpx
;
f
lex
:
1
;
box-shadow
:
inset
-16px
0px
8px
0px
rgba
(
255
,
255
,
255
,
0
.2
)
;
overflow-x
:
auto
;
.left-name
{
font-size
:
32
rpx
;
color
:
#999999
;
line-height
:
76
rpx
;
margin-
right
:
48rpx
}
}
.left-project
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
76rpx
;
margin-right
:
48rpx
;
position
:
relative
;
i
{
display
:
block
;
width
:
24rpx
;
height
:
24rpx
;
font-size
:
16rpx
;
color
:
#FFFFFF
;
line-height
:
24rpx
;
text-align
:
center
;
background-color
:
#EE520E
;
border-radius
:
50%
;
position
:
absolute
;
top
:
12rpx
;
right
:
-24rpx
;
.left-picker
{
display
:
flex
;
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
76rpx
;
margin-right
:
24rpx
;
image
{
width
:
26rpx
;
height
:
26rpx
;
margin-top
:
25rpx
;
margin-left
:
8rpx
;
}
}
.left-project
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
76rpx
;
margin-right
:
48rpx
;
position
:
relative
;
i
{
display
:
block
;
width
:
24rpx
;
height
:
24rpx
;
font-size
:
16rpx
;
color
:
#FFFFFF
;
line-height
:
24rpx
;
text-align
:
center
;
background-color
:
#EE520E
;
border-radius
:
50%
;
position
:
absolute
;
top
:
12rpx
;
right
:
-24rpx
;
}
}
.left-projectDe
{
color
:
#3688FF
;
font-weight
:
bold
;
}
}
.left-projectDe
{
color
:
#3688FF
;
font-weight
:
bold
;
.address-right
{
display
:
flex
;
}
}
.address-right
{
display
:
flex
;
}
}
.
album-address
:
:-
webkit-scrollbar
{
display
:
none
;
}
.album-addressMore
{
width
:
232rpx
;
padding
:
24rpx
24rpx
0
24rpx
;
box-shadow
:
0
0
16px
0
rgba
(
0
,
0
,
0
,
0
.1
);
position
:
fixed
;
top
:
76rpx
;
right
:
0
;
z-index
:
20
;
.addressMore-name
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
44rpx
;
margin-bottom
:
24rpx
;
}
}
.album-checkAll
{
display
:
flex
;
width
:
100%
;
height
:
98rpx
;
padding
:
32rpx
24rpx
0
24rpx
;
overflow
:
hidden
;
position
:
fixed
;
top
:
76rpx
;
left
:
0
;
z-index
:
20
;
/
deep
/
.u-checkbox
{
line-height
:
34rpx
!
important
;
}
/
deep
/
.u-checkbox__label
{
font-size
:
24rpx
!
important
;
.
album-address
:
:-
webkit-scrollbar
{
display
:
none
;
}
.checkAll-tips
{
font-size
:
24rpx
;
color
:
#999999
;
line-height
:
46rpx
;
margin-left
:
24rpx
;
.album-addressMore
{
width
:
232rpx
;
padding
:
24rpx
24rpx
0
24rpx
;
box-shadow
:
0
0
16px
0
rgba
(
0
,
0
,
0
,
0
.1
);
position
:
fixed
;
top
:
76rpx
;
right
:
0
;
z-index
:
20
;
.addressMore-name
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
44rpx
;
margin-bottom
:
24rpx
;
}
}
}
.album-subject
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
flex
:
1
;
padding
:
0
24rpx
0
24rpx
;
overflow
:
auto
;
.subject-List
{
width
:
344rpx
;
height
:
460rpx
;
margin-bottom
:
24rpx
;
border-radius
:
16rpx
;
.album-checkAll
{
display
:
flex
;
width
:
100%
;
height
:
98rpx
;
padding
:
32rpx
24rpx
0
24rpx
;
overflow
:
hidden
;
position
:
relative
;
.list-image
{
display
:
block
;
width
:
344rpx
;
height
:
460rpx
;
}
.list-mask
{
width
:
344rpx
;
height
:
64rpx
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.2
);
font-size
:
28rpx
;
color
:
#fff
;
line-height
:
64rpx
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
position
:
fixed
;
top
:
76rpx
;
left
:
0
;
z-index
:
20
;
/
deep
/
.u-checkbox
{
line-height
:
34rpx
!
important
;
}
.list-uCheck
{
position
:
absolute
;
right
:
0
;
top
:
24rpx
;
/
deep
/
.u-checkbox__label
{
font-size
:
24rpx
!
important
;
}
}
}
.album-bottom
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
98rpx
;
padding
:
0
0
0
24rpx
;
box-shadow
:
0rpx
-2rpx
8rpx
2rpx
rgba
(
0
,
0
,
0
,
0
.08
);
position
:
fixed
;
bottom
:
0
;
left
:
0
;
z-index
:
22
;
.bottom-left
{
flex
:
1
;
display
:
flex
;
line-height
:
98rpx
;
.left-oldMoney
{
.checkAll-tips
{
font-size
:
24rpx
;
color
:
#999999
;
text-decoration
:
line-through
;
line-height
:
110rpx
;
margin-right
:
8rpx
;
line-height
:
46rpx
;
margin-left
:
24rpx
;
}
.left-newMoney
{
font-size
:
40rpx
;
color
:
#EE520E
;
font-weight
:
bold
;
margin-right
:
68rpx
;
}
.left-detail
{
display
:
flex
;
color
:
#333333
;
margin-right
:
20rpx
;
text
{
}
.album-subject
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
flex
:
1
;
padding
:
0
24rpx
0
24rpx
;
overflow
:
auto
;
.subject-List
{
width
:
344rpx
;
height
:
460rpx
;
margin-bottom
:
24rpx
;
border-radius
:
16rpx
;
overflow
:
hidden
;
position
:
relative
;
.list-image
{
display
:
block
;
width
:
344rpx
;
height
:
460rpx
;
}
.list-mask
{
width
:
344rpx
;
height
:
64rpx
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.2
);
font-size
:
28rpx
;
line-height
:
98rpx
;
margin-right
:
10rpx
;
color
:
#fff
;
line-height
:
64rpx
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
}
.left-num
{
width
:
32rpx
;
height
:
32rpx
;
border-radius
:
50%
;
background-color
:
#EE520E
;
text-align
:
center
;
line-height
:
32rpx
;
font-size
:
20rpx
;
font-weight
:
bold
;
color
:
#fff
;
margin-top
:
34rpx
;
}
.left-mask
{
width
:
128rpx
;
height
:
48rpx
;
font-size
:
24rpx
;
color
:
#FFFFFF
;
line-height
:
48rpx
;
text-align
:
center
;
background-color
:
#EE520E
;
border-radius
:
28rpx
;
opacity
:
0
.5
;
position
:
absolute
;
left
:
350rpx
;
top
:
-24rpx
;
.mask-transparent
{
width
:
0px
;
height
:
0px
;
border
:
10rpx
solid
transparent
;
/*以下四个样式对应四种三角形,任选其一即可实现*/
border-top-color
:
#EE520E
;
/* border-left-color:lightseagreen; */
/* border-right-color:lightseagreen; */
// border-bottom-color:lightseagreen;
.list-uCheck
{
position
:
absolute
;
right
:
15rpx
;
bottom
:
-17
rpx
;
right
:
0
;
top
:
24
rpx
;
}
}
}
.bottom-Detail
{
flex
:
1
;
.album-bottom
{
display
:
flex
;
flex-direction
:
column
;
.detail-total
{
font-size
:
28rpx
;
line-height
:
40rpx
;
color
:
191919
;
margin-bottom
:
4rpx
;
margin-top
:
16rpx
;
}
.detail-favorable
{
font-size
:
16rpx
;
color
:
#FF4308
;
line-height
:
22rpx
;
}
}
.bootom-btn
{
width
:
240rpx
;
height
:
98rpx
;
background-color
:
#3688FF
;
font-size
:
32rpx
;
color
:
#fff
;
font-weight
:
bold
;
text-align
:
center
;
line-height
:
98rpx
;
}
}
.album-maskDetail
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
98rpx
;
left
:
0
;
z-index
:
19
;
background-color
:
rgba
(
0
,
0
,
0
,.
3
);
.maskDetail-content
{
justify-content
:
space-between
;
width
:
100%
;
padding
:
32
rpx
;
background-color
:
#fff
;
bo
rder-radius
:
16rpx
16rpx
0
0
;
height
:
98
rpx
;
padding
:
0
0
0
24rpx
;
bo
x-shadow
:
0rpx
-2rpx
8rpx
2rpx
rgba
(
0
,
0
,
0
,
0
.08
)
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
bottom
:
98rpx
;
.content-title
{
width
:
100%
;
font-size
:
36rpx
;
color
:
#333333
;
line-height
:
50rpx
;
margin-bottom
:
38rpx
;
text-align
:
center
;
font-weight
:
bold
;
position
:
relative
;
.title-close
{
position
:
absolute
;
top
:
8rpx
;
right
:
0
;
}
}
.content-label
{
font-size
:
36rpx
;
color
:
#191919
;
font-weight
:
bold
;
line-height
:
50rpx
;
margin-bottom
:
32rpx
;
}
.content-money
{
z-index
:
25
;
.bottom-left
{
flex
:
1
;
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
8rpx
;
.money-name
{
font-size
:
32rpx
;
color
:
#191919
;
line-height
:
44rpx
;
line-height
:
98rpx
;
.left-oldMoney
{
font-size
:
24rpx
;
color
:
#999999
;
text-decoration
:
line-through
;
line-height
:
110rpx
;
margin-right
:
8rpx
;
}
.money-text
{
font-size
:
32rpx
;
.left-newMoney
{
font-size
:
40rpx
;
color
:
#EE520E
;
font-weight
:
bold
;
margin-right
:
68rpx
;
}
.left-detail
{
display
:
flex
;
color
:
#333333
;
line-height
:
44rpx
;
margin-right
:
20rpx
;
text
{
font-size
:
28rpx
;
line-height
:
98rpx
;
margin-right
:
10rpx
;
}
}
.left-num
{
width
:
32rpx
;
height
:
32rpx
;
border-radius
:
50%
;
background-color
:
#EE520E
;
text-align
:
center
;
line-height
:
32rpx
;
font-size
:
20rpx
;
font-weight
:
bold
;
color
:
#fff
;
margin-top
:
34rpx
;
}
.left-mask
{
width
:
128rpx
;
height
:
48rpx
;
font-size
:
24rpx
;
color
:
#FFFFFF
;
line-height
:
48rpx
;
text-align
:
center
;
background-color
:
#EE520E
;
border-radius
:
28rpx
;
opacity
:
0
.5
;
position
:
absolute
;
left
:
230rpx
;
top
:
-24rpx
;
z-index
:
23
;
.mask-transparent
{
width
:
0px
;
height
:
0px
;
border
:
10rpx
solid
transparent
;
/*以下四个样式对应四种三角形,任选其一即可实现*/
border-top-color
:
#EE520E
;
/* border-left-color:lightseagreen; */
/* border-right-color:lightseagreen; */
// border-bottom-color:lightseagreen;
position
:
absolute
;
right
:
15rpx
;
bottom
:
-17rpx
;
}
}
}
.content-favorable
{
.bottom-Detail
{
flex
:
1
;
display
:
flex
;
justify-content
:
space-between
;
.favorable-name
{
flex-direction
:
column
;
.detail-total
{
font-size
:
28rpx
;
color
:
#FC771D
;
line-height
:
40rpx
;
color
:
191919
;
margin-bottom
:
4rpx
;
margin-top
:
16rpx
;
}
.favorable-text
{
font-size
:
28rpx
;
color
:
#FC771D
;
line-height
:
40rpx
;
.detail-favorable
{
font-size
:
16rpx
;
color
:
#FF4308
;
line-height
:
22rpx
;
}
}
.bootom-btn
{
width
:
240rpx
;
height
:
98rpx
;
background-color
:
#3688FF
;
font-size
:
32rpx
;
color
:
#fff
;
font-weight
:
bold
;
text-align
:
center
;
line-height
:
98rpx
;
}
}
}
.album-maskPreview
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
98rpx
;
left
:
0
;
z-index
:
22
;
background-color
:
rgba
(
0
,
0
,
0
,.
3
);
.maskPreview-Num
{
font-size
:
28rpx
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
.album-maskDetail
{
position
:
fixed
;
top
:
72rpx
;
right
:
32rpx
;
top
:
0
;
right
:
0
;
bottom
:
98rpx
;
left
:
0
;
z-index
:
24
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
.maskDetail-content
{
width
:
100%
;
padding
:
32rpx
;
background-color
:
#fff
;
border-radius
:
16rpx
16rpx
0
0
;
position
:
fixed
;
left
:
0
;
bottom
:
98rpx
;
.content-title
{
width
:
100%
;
font-size
:
36rpx
;
color
:
#333333
;
line-height
:
50rpx
;
margin-bottom
:
38rpx
;
text-align
:
center
;
font-weight
:
bold
;
position
:
relative
;
.title-close
{
position
:
absolute
;
top
:
8rpx
;
right
:
0
;
}
}
.content-label
{
font-size
:
36rpx
;
color
:
#191919
;
font-weight
:
bold
;
line-height
:
50rpx
;
margin-bottom
:
32rpx
;
}
.content-money
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
8rpx
;
.money-name
{
font-size
:
32rpx
;
color
:
#191919
;
line-height
:
44rpx
;
}
.money-text
{
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
44rpx
;
font-weight
:
bold
;
}
}
.content-favorable
{
display
:
flex
;
justify-content
:
space-between
;
.favorable-name
{
font-size
:
28rpx
;
color
:
#FC771D
;
line-height
:
40rpx
;
}
.favorable-text
{
font-size
:
28rpx
;
color
:
#FC771D
;
line-height
:
40rpx
;
}
}
}
}
.maskPreview-img
{
display
:
flex
;
width
:
100%
;
height
:
794rpx
;
.album-maskPreview
{
position
:
fixed
;
top
:
152rpx
;
top
:
0
;
right
:
0
;
bottom
:
98rpx
;
left
:
0
;
.img-left
{
width
:
520rpx
;
height
:
692rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
left
:
-466rpx
;
top
:
0
;
bottom
:
0
;
}
.img-right
{
width
:
520rpx
;
height
:
692rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
right
:
-466rpx
;
top
:
0
;
bottom
:
0
;
z-index
:
22
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
.maskPreview-Num
{
font-size
:
28rpx
;
color
:
#FFFFFF
;
line-height
:
40rpx
;
position
:
fixed
;
top
:
72rpx
;
right
:
32rpx
;
}
.img-center
{
width
:
596rpx
;
.maskPreview-img
{
display
:
flex
;
width
:
100%
;
height
:
794rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
right
:
0
;
top
:
0
;
bottom
:
0
;
position
:
fixed
;
top
:
152rpx
;
left
:
0
;
.img-left
{
width
:
520rpx
;
height
:
692rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
left
:
-466rpx
;
top
:
0
;
bottom
:
0
;
}
.img-right
{
width
:
520rpx
;
height
:
692rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
right
:
-466rpx
;
top
:
0
;
bottom
:
0
;
}
.img-center
{
width
:
596rpx
;
height
:
794rpx
;
border-radius
:
16rpx
16rpx
16rpx
16rpx
;
margin
:
auto
;
position
:
absolute
;
right
:
0
;
top
:
0
;
bottom
:
0
;
left
:
0
;
}
}
}
.maskPreview-check
{
width
:
48rpx
;
height
:
48rpx
;
margin
:
auto
;
position
:
fixed
;
top
:
968rpx
;
left
:
0
;
right
:
0
;
/
deep
/
.u-checkbox__icon-wrap
{
width
:
50rpx
!
important
;
height
:
50rpx
!
important
;
color
:
#fff
!
important
;
border
:solid
2px
#fff
;
.maskPreview-check
{
width
:
48rpx
;
height
:
48rpx
;
margin
:
auto
;
position
:
fixed
;
top
:
968rpx
;
left
:
0
;
right
:
0
;
/
deep
/
.u-checkbox__icon-wrap
{
width
:
50rpx
!
important
;
height
:
50rpx
!
important
;
color
:
#fff
!
important
;
border
:
solid
2px
#fff
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/album/purchasedPhotoAlbum/purchasedPhotoAlbum.vue
0 → 100644
View file @
33b5b1f2
<
template
>
<view
class=
"albumBox"
>
<!--头部-->
<view
class=
"album-address"
>
<view
class=
"address-left"
>
<view
class=
"left-picker"
@
click=
"orderShow=true"
>
<i>
{{
cityName
}}
</i>
<image
src=
"../static/album/myPhoto01.png"
></image>
</view>
<u-picker
mode=
"selector"
v-model=
"orderShow"
:default-selector=
"[orderType]"
:range=
"option"
range-key=
"areaName"
@
confirm=
"industrysTypeConfirm($event)"
@
cancel=
"cancel"
></u-picker>
</view>
</view>
<!--主体循环-->
<view
class=
"album-subject"
>
<view
class=
"subject-List"
v-for=
"(item,index) in previewData"
:key=
"index"
@
click=
"projectCheckPhoto(index)"
>
<image
class=
"list-image"
:src=
"item.faceSourceUrl"
></image>
<u-checkbox
v-model=
"item.checkType"
v-if=
"checkTypeFun==true"
@
click
.
stop
.
native=
"()=>
{}" @change="stopPhoto(index)" shape="circle" class="list-uCheck">
</u-checkbox>
<view
class=
"list-mask"
>
预览
</view>
</view>
</view>
<!--脚部-->
<view
class=
"album-bottom"
>
<view
class=
"bottom-left"
v-if=
"maskDetail==false"
>
<!--全选按钮-->
<view
class=
"album-checkAll"
>
<u-checkbox
v-model=
"checkProjectAll"
@
change=
"checkProjectAllFun()"
>
全选
</u-checkbox>
<view
class=
"checkAll-tips"
>
未下载影像保留15天
</view>
</view>
</view>
<view
class=
"bootom-btn"
@
click=
"upLoad()"
>
去下载
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</
template
>
<
script
>
import
uPicker
from
'@/uview-ui/components/u-picker/u-picker.vue'
import
uCheckboxGroup
from
'@/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'
import
uCheckbox
from
'@/uview-ui/components/u-checkbox/u-checkbox'
import
uToast
from
'@/uview-ui/components/u-toast/u-toast.vue'
export
default
{
components
:
{
uPicker
,
uCheckboxGroup
,
uCheckbox
,
uToast
},
data
()
{
return
{
faceIds
:
[],
//查询照片ID
openid
:
''
,
orderShow
:
false
,
//头部城市选择
option
:
[],
//城市
cityName
:
'全部'
,
areaId
:
''
,
//城市ID
merchantId
:
''
,
//商户ID
location
:
{},
//位置信息
projectCheck
:
0
,
//当前选择的产品
merchantList
:[],
//商户列表
merchantName
:
'全部'
,
//商户名称
projectMoreType
:
false
,
//是否显示更多产品
checkProjectAll
:
false
,
//所有产品全选
maskDetail
:
false
,
maskPreviewType
:
false
,
//遮罩预览
previewData
:
[
//图片预览
// {
// type: false,
// src: '../static/album/customPic.png'
// },
],
previewNum
:
0
,
//当前是第几张图片
checkTypeFun
:
true
,
//刷新选项
//左右滑动监听开始
startData
:
{
clientX
:
''
,
clientY
:
''
,
},
transition
:
''
,
touch
:
{},
touchLeft
:
0
,
touchRight
:
0
,
touchType
:
0
,
//向左0++ 向右1--
//左右滑动 监听结束
originalPrice
:
0
,
//原价单价
originalPrices
:
0
,
//原价
sellingPrice
:
0
,
//售价单价
sellingPrices
:
0
,
//售价
favorablePrice
:
0
,
//优惠
priceNum
:
0
,
//选购了多少照片
}
},
onLoad
(
option
)
{
this
.
openid
=
uni
.
getStorageSync
(
'openid'
)
//获取openid
//this.merchantId = 'z0015605022691a5945bbe463141668c'//uni.getStorageSync('merchantId')
this
.
obtainProvince
()
//获取省市区
this
.
inquireMerchant
()
//查询所有商户
this
.
getPhotos
()
//照片列表
},
methods
:
{
obtainProvince
(){
//获取省列表
this
.
$request
(
'scenic/search/loadAreaByCity'
,{
areaLevel
:
1
,
inChina
:
0
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
option
=
res
.
data
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
inquireMerchant
(){
//查询所有商户
var
data
=
{
id
:
this
.
merchantId
,
//商户ID
province
:
this
.
areaId
,
//省市ID
areaCode
:
this
.
areaId
,
//省市ID
merchantType
:
1
,
//
}
this
.
$request
(
'scenic/newMerchant/findAllMerchant'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
merchantList
=
res
.
data
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
getPhotos
(){
//照片
var
data
=
{
openid
:
this
.
openid
,
merchantId
:
this
.
merchantId
,
//商户ID
}
this
.
$request
(
'wechatUser/pdFace/getAlbumList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
this
.
previewData
=
res
.
data
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
[
'checkType'
]
=
false
this
.
originalPrice
=
item
.
originalPrice
//原价.
this
.
sellingPrice
=
item
.
sellingPrice
//售价
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
industrysTypeConfirm
(
e
)
{
//单列----分类 点击确定 城市
this
.
cityName
=
this
.
option
[
e
].
areaName
this
.
areaId
=
this
.
option
[
e
].
areaId
this
.
inquireMerchant
()
},
cancel
()
{
//单列 点击取消
this
.
orderShow
=
false
},
projectCheckPhoto
(
index
){
//点击预览
this
.
previewNum
=
index
this
.
maskPreviewType
=
true
},
stopPhoto
(
index
){
//刷新显示
if
(
this
.
checkProjectAll
==
true
){
this
.
checkProjectAll
=
false
}
if
(
this
.
previewData
[
index
].
checkType
==
false
){
this
.
previewData
[
index
].
checkType
=
true
}
else
{
this
.
previewData
[
index
].
checkType
=
false
}
this
.
checkTypeFun
=
false
this
.
checkTypeFun
=
true
},
checkProjectAllFun
(){
//是否全选
if
(
this
.
checkProjectAll
==
true
){
this
.
checkProjectAll
=
false
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
.
checkType
=
false
})
}
else
{
this
.
checkProjectAll
=
true
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
.
checkType
=
true
})
}
},
upLoad
(){
//下单
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
page
{
background-color
:
#F7F7F7
;
}
.albumBox
{
// 76=16 - 44 - 16 98 =34 - 32 - 32
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
background-color
:
#F7F7F7
;
padding-bottom
:
98rpx
;
padding-top
:
174rpx
;
overflow
:
auto
;
}
.album-address
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
76rpx
;
padding
:
0
24rpx
0
24rpx
;
background-color
:
#FFFFFF
;
box-shadow
:
0
0
16px
0
rgba
(
0
,
0
,
0
,
0
.1
);
overflow
:
hidden
;
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
20
;
.address-left
{
display
:
flex
;
flex
:
1
;
box-shadow
:
inset
-16px
0px
8px
0px
rgba
(
255
,
255
,
255
,
0
.2
);
overflow-x
:
auto
;
.left-picker
{
display
:
flex
;
font-size
:
32rpx
;
color
:
#333333
;
line-height
:
76rpx
;
margin-right
:
24rpx
;
image
{
width
:
26rpx
;
height
:
26rpx
;
margin-top
:
25rpx
;
margin-left
:
8rpx
;
}
}
}
}
.
album-address
:
:-
webkit-scrollbar
{
display
:
none
;
}
.album-subject
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
flex
:
1
;
padding
:
0
24rpx
0
24rpx
;
overflow
:
auto
;
.subject-List
{
width
:
344rpx
;
height
:
460rpx
;
margin-bottom
:
24rpx
;
border-radius
:
16rpx
;
overflow
:
hidden
;
position
:
relative
;
.list-image
{
display
:
block
;
width
:
344rpx
;
height
:
460rpx
;
}
.list-mask
{
width
:
344rpx
;
height
:
64rpx
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.2
);
font-size
:
28rpx
;
color
:
#fff
;
line-height
:
64rpx
;
text-align
:
center
;
position
:
absolute
;
left
:
0
;
bottom
:
0
;
}
.list-uCheck
{
position
:
absolute
;
right
:
0
;
top
:
24rpx
;
}
}
}
.album-bottom
{
display
:
flex
;
justify-content
:
space-between
;
width
:
100%
;
height
:
98rpx
;
padding
:
0
0
0
24rpx
;
box-shadow
:
0rpx
-2rpx
8rpx
2rpx
rgba
(
0
,
0
,
0
,
0
.08
);
position
:
fixed
;
bottom
:
0
;
left
:
0
;
z-index
:
25
;
.bottom-left
{
flex
:
1
;
display
:
flex
;
line-height
:
98rpx
;
.album-checkAll
{
width
:
100%
;
height
:
98rpx
;
padding
:
32rpx
24rpx
0
24rpx
;
overflow
:
hidden
;
/
deep
/
.u-checkbox
{
line-height
:
34rpx
!
important
;
}
/
deep
/
.u-checkbox__label
{
font-size
:
24rpx
!
important
;
}
.checkAll-tips
{
font-size
:
24rpx
;
color
:
#999999
;
line-height
:
46rpx
;
margin-left
:
24rpx
;
}
}
}
.bootom-btn
{
width
:
240rpx
;
height
:
98rpx
;
background-color
:
#3688FF
;
font-size
:
32rpx
;
color
:
#fff
;
font-weight
:
bold
;
text-align
:
center
;
line-height
:
98rpx
;
}
}
</
style
>
\ 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