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
af0a46ec
Commit
af0a46ec
authored
Aug 07, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/album' into develop
parents
b4a70553
9cae3510
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
21 deletions
+27
-21
App.vue
App.vue
+3
-0
albumIndex.vue
pages/album/albumIndex.vue
+5
-3
chooseFavorite.vue
pages/album/chooseFavorite.vue
+19
-18
No files found.
App.vue
View file @
af0a46ec
...
...
@@ -141,4 +141,7 @@ export default {
border-color
:
#3688FF
!
important
;
color
:
#ffffff
!
important
;
}
checkbox
.round
.wx-checkbox-input
{
border-radius
:
50%
!
important
;
}
</
style
>
pages/album/albumIndex.vue
View file @
af0a46ec
...
...
@@ -175,7 +175,9 @@ export default {
}
else
{
reject
(
false
)
}
})
}).
catch
(()
=>
{
reject
(
false
)
})
})
},
async
handleWhetherToVotePage
()
{
//---判断是否跳转投票页面
...
...
@@ -211,11 +213,11 @@ export default {
}
// 4.判断是否跳转投票页面
if
(
voteObj
.
alreadySurvey
===
0
)
{
// 未投过票
if
(
voteObj
.
alreadySurvey
===
1
)
{
// 未投过票
uni
.
navigateTo
({
url
:
`./chooseFavorite?surveyConfig=
${
JSON
.
stringify
(
surveyResult
)}
`
})
}
else
if
(
voteObj
.
alreadySurvey
===
1
)
{
// 已投票
}
else
if
(
voteObj
.
alreadySurvey
===
0
)
{
// 已投票
this
.
show
=
true
}
},
...
...
pages/album/chooseFavorite.vue
View file @
af0a46ec
...
...
@@ -13,9 +13,9 @@
<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.templateId
"
>
<view
class=
"item"
v-for=
"(item, index) in imgArr"
:key=
"item.templateId"
@
click=
"imageChange(item)
"
>
<image
class=
"img"
:src=
"item.templateUrl"
mode=
"aspectFill"
></image>
<
u-checkbox
class=
"checkbox"
v-model=
"item.value"
shape=
"circle"
></u-
checkbox>
<
checkbox
class=
"checkbox blue round"
:checked=
"item.value"
:value=
"item.templateId"
shape=
"circle"
></
checkbox>
</view>
</view>
<button
class=
"btn"
@
click=
"saveClick"
>
提交
</button>
...
...
@@ -25,10 +25,12 @@
</
template
>
<
script
>
import
UCheckboxGroup
from
'@/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'
import
UCheckbox
from
'@/uview-ui/components/u-checkbox/u-checkbox.vue'
export
default
{
components
:
{
UCheckboxGroup
,
UCheckbox
,
},
data
()
{
...
...
@@ -43,6 +45,9 @@ export default {
}
},
methods
:
{
checkboxChange
(
e
)
{
console
.
log
(
e
)
},
saveClick
()
{
//---提交
const
templateIds
=
this
.
imgArr
.
map
(
item
=>
{
if
(
item
.
value
)
return
item
.
templateId
...
...
@@ -82,7 +87,11 @@ export default {
},
imageChange
(
item
)
{
//---图片选择
this
.
$set
(
item
,
'value'
,
!
item
.
value
)
this
.
$forceUpdate
()
this
.
$set
(
item
,
'show'
,
false
)
this
.
$set
(
item
,
'show'
,
true
)
console
.
log
(
item
.
value
,
item
.
show
)
// item.show = false
// item.show = true
// item.value = !item.value
},
recordDeviceInfo
()
{
//---记录设备信息
...
...
@@ -100,7 +109,10 @@ export default {
this
.
companyArr
.
forEach
(
item
=>
{
imgArr
.
push
(...
item
.
templateDetailList
)
})
imgArr
.
forEach
(
item
=>
this
.
$set
(
item
,
'value'
,
false
))
imgArr
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'value'
,
false
)
this
.
$set
(
item
,
'show'
,
true
)
})
this
.
imgArr
=
this
.
companyArr
[
0
].
templateDetailList
}
}
...
...
@@ -171,21 +183,10 @@ export default {
heigit
:
100%
;
}
.checkbox
{
display
:
flex
;
position
:
absolute
;
right
:
12rpx
;
top
:
12rpx
;
width
:
36rpx
;
height
:
36rpx
;
}
.u-checkbox__label
{
margin
:
0
;
}
/
deep
/
.u-checkbox__icon-wrap
{
border
:
1px
solid
#fff
;
}
/
deep
/
.u-checkbox__icon-wrap--checked
{
border
:
1px
solid
#2979ff
;
right
:
0
;
top
:
8rpx
;
transform
:
scale
(
0
.8
);
}
}
}
...
...
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