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
15e6f9ca
Commit
15e6f9ca
authored
Sep 15, 2021
by
zhoucong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
e24d9475
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
95 deletions
+184
-95
App.vue
App.vue
+1
-1
product.vue
pages/vlog/product/product.vue
+3
-3
productDetails.vue
pages/vlog/productDetails/productDetails.vue
+180
-91
No files found.
App.vue
View file @
15e6f9ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
if
(
!
token
&&
path
.
indexOf
(
"pages/ourPayment/ourPayment"
)
==-
1
){
//扫码支付页面不需要在此登录
if
(
!
token
&&
path
.
indexOf
(
"pages/ourPayment/ourPayment"
)
==-
1
){
//扫码支付页面不需要在此登录
setTimeout
(()
=>
{
//解决关联普通二维码扫码首次进入时一直显示登录中
setTimeout
(()
=>
{
//解决关联普通二维码扫码首次进入时一直显示登录中
uni
.
navigateTo
({
uni
.
navigateTo
({
//
url: "/pages/login/login"
url
:
"/pages/login/login"
})
})
},
300
)
},
300
)
}
}
...
...
pages/vlog/product/product.vue
View file @
15e6f9ca
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
<text
class=
"noprice"
>
¥
{{
item
.
originalPrice
}}
</text>
<text
class=
"noprice"
>
¥
{{
item
.
originalPrice
}}
</text>
<text
class=
"price"
>
¥
{{
item
.
sellingPrice
}}
</text>
<text
class=
"price"
>
¥
{{
item
.
sellingPrice
}}
</text>
</view>
</view>
<navigator
url=
"../productDetails/productDetails
"
class=
"btnn"
>
<navigator
:url=
"'../productDetails/productDetails?id='+item.id+'&name='+item.name
"
class=
"btnn"
>
<view>
开始制作
</view>
<view>
开始制作
</view>
</navigator>
</navigator>
</view>
</view>
<view
class=
"guige"
>
<view
class=
"guige"
v-if=
"item.priceStockList[0].standardName"
>
规格:
{{
item
.
priceStockList
[
0
].
standardName
||
""
}}
规格:
{{
item
.
priceStockList
[
0
].
standardName
||
""
}}
</view>
</view>
</view>
</view>
...
@@ -45,11 +45,11 @@ export default {
...
@@ -45,11 +45,11 @@ export default {
getList
(){
//获取商品列表
getList
(){
//获取商品列表
this
.
$request
(
"scenic/user/product/findProductList"
,
{
this
.
$request
(
"scenic/user/product/findProductList"
,
{
openid
:
uni
.
getStorageSync
(
"openid"
),
openid
:
uni
.
getStorageSync
(
"openid"
),
productType
:
4
,
type
:
4
type
:
4
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
"00"
)
{
if
(
res
.
code
===
"00"
)
{
this
.
list
=
res
.
data
.
list
this
.
list
=
res
.
data
.
list
console
.
log
(
this
.
list
);
}
else
{
}
else
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
...
...
pages/vlog/productDetails/productDetails.vue
View file @
15e6f9ca
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"item"
>
<view
class=
"item"
>
<image
src=
"https://cdn.uviewui.com/uview/swiper/1.jpg
"
></image>
<image
:src=
"productVo.priceStockList[0].imgList[0].url
"
></image>
<view
class=
"title"
style=
"padding-top: 35rpx;"
>
<view
class=
"title"
style=
"padding-top: 35rpx;"
>
<text>
规格:
24张
</text>
<text>
规格:
{{
productVo
.
priceStockList
[
0
].
standardName
||
""
}}
</text>
<view
style=
"margin-top: 30rpx;"
>
<view
style=
"margin-top: 30rpx;"
>
<text
class=
"noprice"
>
¥
88
</text>
<text
class=
"noprice"
>
¥
{{
productVo
.
priceStockList
[
0
].
originalPrice
||
""
}}
</text>
<text
class=
"price"
>
¥
88
</text>
<text
class=
"price"
>
¥
{{
productVo
.
priceStockList
[
0
].
sellingPrice
||
""
}}
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
""
style=
"display: flex;"
>
<view
class=
""
style=
"display: flex;"
>
<u-section
title=
"模板选择"
:right=
"false"
color=
"#303133"
></u-section><text
style=
"font-size: 24rpx;color: #ccc;margin-left: 30rpx;"
>
Template Selection
</text>
<u-section
title=
"模板选择"
:right=
"false"
color=
"#303133"
></u-section><text
style=
"font-size: 24rpx;color: #ccc;margin-left: 30rpx;"
>
Template Selection
</text>
</view>
</view>
<image
src=
"../../../static/img/vlog/icon/fengexian.png"
mode=
""
style=
"width: 100%;height: 15rpx;"
></image>
<image
src=
"../../../static/img/vlog/icon/fengexian.png"
mode=
""
style=
"width: 100%;height: 15rpx;"
></image>
<view
style=
"display: flex;justify-content: space-around;margin-top: 20rpx;"
>
<view
style=
"display: flex;justify-content: space-around;margin-top: 20rpx;"
>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</view>
</view>
<view
v-if=
"current===0"
>
<view
v-if=
"current===0"
>
<view
class=
"cover"
>
<view
class=
"cover"
>
<view
class=
"coverItem"
v-for=
"(item,index) in
coverList
"
:key=
"index"
>
<view
class=
"coverItem"
v-for=
"(item,index) in
imgList2
"
:key=
"index"
>
<image
class=
"img"
:src=
"item.url"
mode=
""
@
click=
"changeCover(item.url)"
></image>
<image
class=
"img"
:src=
"item.url"
mode=
""
@
click=
"changeCover(item.url)"
></image>
<u-icon
v-if=
"cover===item.url"
class=
"icon"
name=
"checkmark-circle-fill"
color=
"#2979FF"
size=
"50"
></u-icon>
<u-icon
v-if=
"cover===item.url"
class=
"icon"
name=
"checkmark-circle-fill"
color=
"#2979FF"
size=
"50"
></u-icon>
</view>
</view>
...
@@ -28,33 +28,19 @@
...
@@ -28,33 +28,19 @@
</view>
</view>
<view
class=
""
v-else
>
<view
class=
""
v-else
>
<view
class=
"cover"
>
<view
class=
"cover"
>
<view
class=
"coverItem"
v-for=
"(item,index) in i
nsidePagesList
"
:key=
"index"
>
<view
class=
"coverItem"
v-for=
"(item,index) in i
mgList3
"
:key=
"index"
>
<image
class=
"img"
:src=
"item.url"
mode=
""
@
click=
"changeinsidePages(item.url)"
></image>
<image
class=
"img"
:src=
"item.url"
mode=
""
@
click=
"changeinsidePages(item.url)"
></image>
<u-icon
v-if=
"insidePages===item.url"
class=
"icon"
name=
"checkmark-circle-fill"
color=
"#2979FF"
size=
"50"
></u-icon>
<u-icon
v-if=
"insidePages===item.url"
class=
"icon"
name=
"checkmark-circle-fill"
color=
"#2979FF"
size=
"50"
></u-icon>
</view>
</view>
</view>
</view>
</view>
</view>
<view
style=
"display: flex;margin-top: 30rpx;"
>
<view
style=
"display: flex;margin-top: 30rpx;"
>
<u-section
title=
"详细参数"
:right=
"false"
color=
"#303133"
></u-section><text
style=
"font-size: 24rpx;color: #ccc;margin-left: 30rpx;"
>
Parameters
</text>
<u-section
title=
"详细参数"
:right=
"false"
color=
"#303133"
></u-section><text
style=
"font-size: 24rpx;color: #ccc;margin-left: 30rpx;"
>
Parameters
</text>
</view>
</view>
<image
src=
"../../../static/img/vlog/icon/fengexian.png"
mode=
""
style=
"width: 100%;height: 15rpx;"
></image>
<image
src=
"../../../static/img/vlog/icon/fengexian.png"
mode=
""
style=
"width: 100%;height: 15rpx;"
></image>
<view
class=
"parameter"
>
<view
class=
"parameter"
>
<view
class=
"parameterItem"
>
<image
:src=
"item.url"
mode=
"widthFix"
v-for=
"(item,index) in imgList1"
:key=
"index"
></image>
<view>
产品品牌:
</view>
<view>
产品名称:
</view>
<view>
产品规格:
</view>
<view>
内页数量:
</view>
<view>
入册数量:
</view>
<view>
内页尺寸:
</view>
</view>
<view
class=
"parameterItem"
>
<view>
相册工艺:
</view>
<view>
产品封面:
</view>
<view>
内页材质:
</view>
<view>
装订方式:
</view>
<view>
产品配送:
</view>
</view>
</view>
</view>
<view
class=
"bottom"
@
click=
"beginMaking"
>
<view
class=
"bottom"
@
click=
"beginMaking"
>
上传照片制作
上传照片制作
...
@@ -62,81 +48,184 @@
...
@@ -62,81 +48,184 @@
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
current
:
0
,
//封面内页切换
productVo
:{},
//产品详情
cover
:
""
,
//封面
imgList1
:[],
//详情列表
coverList
:[
imgList2
:[],
//封面列表
{
url
:
"https://cdn.uviewui.com/uview/swiper/1.jpg"
},
imgList3
:[],
//内页列表
{
url
:
"https://cdn.uviewui.com/uview/swiper/2.jpg"
},
current
:
0
,
//封面内页切换
{
url
:
"https://cdn.uviewui.com/uview/swiper/3.jpg"
},
cover
:
""
,
//封面
],
//封面列表
insidePages
:
""
,
//内页
insidePages
:
""
,
//内页
insidePagesList
:[
}
{
url
:
"https://cdn.uviewui.com/uview/swiper/1.jpg"
},
{
url
:
"https://cdn.uviewui.com/uview/swiper/2.jpg"
},
{
url
:
"https://cdn.uviewui.com/uview/swiper/3.jpg"
}
],
//内页列表
list
:[
{
name
:
"封面"
},
{
name
:
"内页"
}
],
}
},
onLoad
(){
//代替 vue 里面的 created
uni
.
setNavigationBarTitle
({
title
:
"欢乐集"
})
},
onReady
()
{
//代替 vue 里面的 mounted
},
methods
:
{
changeCover
(
url
){
//选择封面
this
.
cover
=
url
},
},
changeinsidePages
(
url
){
//选择内页
onLoad
(
option
)
{
//代替 vue 里面的 created
this
.
insidePages
=
url
uni
.
setNavigationBarTitle
({
title
:
option
.
name
})
this
.
getDetails
(
option
.
id
)
},
},
beginMaking
(){
onReady
()
{
//代替 vue 里面的 mounted
if
(
this
.
cover
===
""
){
},
return
uni
.
showModal
({
title
:
'提示'
,
content
:
'请选择封面'
,});
methods
:
{
}
getDetails
(
id
)
{
//获取商品详情
if
(
this
.
insidePages
===
""
){
this
.
$request
(
"scenic/user/product/findChoseProductInfo"
,
{
return
uni
.
showModal
({
title
:
'提示'
,
content
:
'请选择内页'
,});
productId
:
id
,
}
openid
:
uni
.
getStorageSync
(
"openid"
)
this
.
$u
.
route
({
}).
then
(
res
=>
{
url
:
'pages/vlog/uploadPictures/uploadPictures'
,
if
(
res
.
code
===
"00"
)
{
params
:{
this
.
productVo
=
res
.
data
.
productVo
cover
:
this
.
cover
,
res
.
data
.
productVo
.
imgList
.
forEach
(
item
=>
{
insidePages
:
this
.
insidePages
if
(
item
.
location
===
5
){
this
.
imgList1
.
push
(
item
)
}
if
(
item
.
location
===
6
){
this
.
imgList2
.
push
(
item
)
}
if
(
item
.
location
===
8
){
this
.
imgList3
.
push
(
item
)
}
})
}
else
{
uni
.
showModal
({
title
:
'提示'
,
content
:
res
.
message
,
showCancel
:
false
,
})
}
})
},
changeCover
(
url
)
{
//选择封面
this
.
cover
=
url
},
changeinsidePages
(
url
)
{
//选择内页
this
.
insidePages
=
url
},
beginMaking
()
{
if
(
this
.
cover
===
""
)
{
return
uni
.
showModal
({
title
:
'提示'
,
content
:
'请选择封面'
,
});
}
}
})
if
(
this
.
insidePages
===
""
)
{
return
uni
.
showModal
({
title
:
'提示'
,
content
:
'请选择内页'
,
});
}
this
.
$u
.
route
({
url
:
'pages/vlog/uploadPictures/uploadPictures'
,
params
:
{
cover
:
this
.
cover
,
insidePages
:
this
.
insidePages
}
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
padding
:
0
20rpx
;
box-sizing
:
border-box
;
margin-bottom
:
100rpx
;
text-align
:
center
;
.content
{
.item
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
30rpx
20rpx
20rpx
20rpx
;
padding
:
0
20rpx
;
image
{
width
:
48%
;
height
:
220rpx
;
border-radius
:
10rpx
;}
box-sizing
:
border-box
;
.title
{
width
:
48%
;
height
:
220rpx
;
padding-top
:
10rpx
;
margin-top
:
20rpx
;}
margin-bottom
:
100rpx
;
}
text-align
:
center
;
.noprice
{
font-size
:
24rpx
;
text-decoration
:
line-through
;
color
:
#ccc
;}
.price
{
font-size
:
32rpx
;
color
:
#DE6F26
;
margin-left
:
10rpx
;}
.item
{
.cover
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
display
:
flex
;
.coverItem
{
width
:
48
.5%
;
height
:
200rpx
;
position
:
relative
;
padding-top
:
20rpx
;
justify-content
:
space-between
;
.img
{
width
:
100%
;
height
:
100%
;
border-radius
:
10rpx
;}
padding
:
30rpx
20rpx
20rpx
20rpx
;
.icon
{
position
:
absolute
;
top
:
25rpx
;
right
:
5rpx
;}
image
{
width
:
48%
;
height
:
220rpx
;
border-radius
:
10rpx
;
}
.title
{
width
:
48%
;
height
:
220rpx
;
padding-top
:
10rpx
;
margin-top
:
20rpx
;
}
}
}
}
.parameter
{
display
:
flex
;
justify-content
:
space-between
;
.parameterItem
{
width
:
50%
;
text-align
:
left
;
color
:
#ccc
;
.noprice
{
view
{
margin
:
10rpx
0
;}
font-size
:
24rpx
;
text-decoration
:
line-through
;
color
:
#ccc
;
font-weight
:
bold
;
}
.price
{
font-size
:
32rpx
;
color
:
#DE6F26
;
margin-left
:
10rpx
;
font-weight
:
bold
;
}
.cover
{
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
.coverItem
{
width
:
48
.5%
;
height
:
220rpx
;
position
:
relative
;
padding-top
:
20rpx
;
.img
{
width
:
100%
;
height
:
100%
;
border-radius
:
10rpx
;
}
.icon
{
position
:
absolute
;
top
:
25rpx
;
right
:
5rpx
;
}
}
}
}
}
.bottom
{
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
height
:
100rpx
;
background-color
:
#FFE600
;
right
:
0
;
line-height
:
100rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
border-top-left-radius
:
10rpx
;
border-top-right-radius
:
10rpx
;}
.parameter
{
width
:
100%
;
image
:{
width
:
100%
;
border-radius
:
10rpx
;}
}
.bottom
{
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
height
:
100rpx
;
background-color
:
#FFE600
;
right
:
0
;
line-height
:
100rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
border-top-left-radius
:
10rpx
;
border-top-right-radius
:
10rpx
;
}
}
.btnn
{
background-color
:
#ECF4FF
;
width
:
25%
;
height
:
60rpx
;
line-height
:
60rpx
;
font-size
:
26rpx
;
}
.active
{
background-color
:
#2979FF
;
color
:
#fff
;
}
.noactive
{
color
:
#2979FF
;
}
}
.btnn
{
background-color
:
#ECF4FF
;
width
:
25%
;
height
:
60rpx
;
line-height
:
60rpx
;
font-size
:
26rpx
;}
</
style
>
.active
{
background-color
:
#2979FF
;
color
:
#fff
;}
.noactive
{
color
:
#2979FF
;}
</
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