Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uni-app-ddh-shop
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
zhanhai
uni-app-ddh-shop
Commits
365acd81
Commit
365acd81
authored
Mar 15, 2025
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多典花1.1.0 版本优化
parent
a9924d6a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
283 additions
and
313 deletions
+283
-313
App.vue
App.vue
+2
-2
androidPrivacy.json
androidPrivacy.json
+1
-1
login.vue
pages/login/login.vue
+1
-1
application.vue
subPackage/application/application.vue
+6
-9
index.less
subPackage/application/index.less
+80
-72
category.vue
subPackage/category/category.vue
+3
-1
index.less
subPackage/lookGoods/index.less
+98
-119
lookGoods.vue
subPackage/lookGoods/lookGoods.vue
+91
-107
setting.vue
subPackage/setting/setting.vue
+1
-1
No files found.
App.vue
View file @
365acd81
...
...
@@ -16,8 +16,8 @@ export default {
success
:
function
()
{
plus
.
navigator
.
closeSplashscreen
()
}
})
})
}
else
{
uni
.
redirectTo
({
url
:
"/pages/starPage/index"
,
...
...
androidPrivacy.json
View file @
365acd81
...
...
@@ -15,7 +15,7 @@
"borderRadius"
:
"5px"
},
"disagreeMode"
:
{
"support"
:
tru
e
,
"support"
:
fals
e
,
"loadNativePlugins"
:
true
,
"visitorEntry"
:
false
,
"showAlways"
:
true
...
...
pages/login/login.vue
View file @
365acd81
...
...
@@ -209,7 +209,7 @@
const
self
=
this
const
params
=
{
"mobile"
:
self
.
mobile
,
"promoCode"
:
'own'
"promoCode"
:
'own
_ddh
'
}
self
.
$request
(
'/app/v1/loginNoCheck'
,
'POST'
,
params
).
then
(
res
=>
{
const
{
...
...
subPackage/application/application.vue
View file @
365acd81
<
template
>
<view
class=
"a-page"
>
<view
class=
'a-main'
v-show=
"list && list.length>0"
>
<scroll-view
class=
'box-at-home'
scroll-y=
"true"
...
...
@@ -21,7 +21,7 @@
</view>
</scroll-view>
</view>
</view>
</
template
>
...
...
@@ -55,19 +55,19 @@
self
.
$request
(
'/app/authenticate/selectLists'
,
'POST'
,
params
).
then
((
res
)
=>
{
const
{
current
,
total
,
size
,
records
}
=
res
.
result
const
{
current
,
total
,
size
,
data
}
=
res
.
result
const
hasNextPage
=
total
-
self
.
pageSize
*
self
.
pageNum
>
0
?
true
:
false
//是否有下一页
records
.
map
(
item
=>
{
data
.
map
(
item
=>
{
const
newUrl
=
JSON
.
parse
(
item
.
imagesUrl
)
item
.
imagesUrl
=
newUrl
})
if
(
self
.
loadFlag
){
console
.
log
(
res
.
result
,
'023'
)
self
.
list
=
self
.
list
.
concat
(
records
)
self
.
list
=
self
.
list
.
concat
(
data
)
}
else
{
self
.
list
=
records
self
.
list
=
data
}
self
.
hasNextPage
=
hasNextPage
self
.
loadFlag
=
false
...
...
@@ -95,9 +95,6 @@
this
.
pageNum
=
this
.
pageNum
+
1
this
.
init
();
},
},
onShow
()
{
this
.
init
()
}
}
</
script
>
...
...
subPackage/application/index.less
View file @
365acd81
.a-page{
.a-page
{
width: 100%;
height: calc(100vh-120px);
min-height: 100vh;
height: 100vh;
background: #F7FAFF;
padding-bottom:180rpx;
.a-main{
padding-top:29rpx;
.box-at-home{
height: 1200rpx;
.main-item{
margin:0 30rpx 24rpx;
width: 690rpx;
height: 523rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232,232,232,0.49);
border-radius: 10rpx;
.item-top{
margin: 0 18rpx;
height: 97rpx;
box-sizing: border-box;
padding: 30rpx;
.box-at-home {
width: 100%;
height: 100%;
.main-item {
width: 690rpx;
height: 523rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 232, 232, 0.49);
border-radius: 10rpx;
margin-bottom: 24rpx;
.item-top {
margin: 0 18rpx;
height: 97rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 97rpx;
text-align: left;
font-style: normal;
border-bottom: 1rpx solid #E9E9E9;
}
.item-box {
display: flex;
margin: 28rpx 0 0 42rpx;
.box-img {
width: 212rpx;
height: 212rpx;
background-size: 100%;
}
.box-con {
padding: 35rpx 66rpx 0 49rpx;
text-align: center;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 97rpx;
text-align: left;
font-style: normal;
border-bottom:1rpx solid #E9E9E9;
}
.item-box{
display: flex;
margin:28rpx 0 0 42rpx;
.box-img{
width: 212rpx;
height: 212rpx;
background-size: 100%;
}
.box-con{
padding:35rpx 66rpx 0 49rpx;
text-align: center;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
.cont-top{
font-size: 30rpx;
color: #333333;
line-height: 42rpx;
text-align: left;
font-style: normal;
}
.cont-footer{
padding-top:54rpx;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
text-align: left;
font-style: normal;
}
.cont-top {
font-size: 30rpx;
color: #333333;
line-height: 42rpx;
text-align: left;
font-style: normal;
}
.box-icon{
margin-top:56rpx;
width: 150rpx;
height: 150rpx;
background-size: 100%;
.cont-footer {
padding-top: 54rpx;
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
text-align: left;
font-style: normal;
}
}
.item-btn{
margin: 62rpx 9rpx 35rpx;
width: 670rpx;
height: 88rpx;
background: linear-gradient( 137deg, #3877F5 0%, #5690FA 100%);
border-radius: 44rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
line-height: 88rpx;
text-align: center;
font-style: normal;
.box-icon {
margin-top: 56rpx;
width: 150rpx;
height: 150rpx;
background-size: 100%;
}
}
.item-btn {
margin: 62rpx 9rpx 35rpx;
width: 670rpx;
height: 88rpx;
background: linear-gradient(137deg, #3877F5 0%, #5690FA 100%);
border-radius: 44rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
line-height: 88rpx;
text-align: center;
font-style: normal;
}
}
}
}
\ No newline at end of file
subPackage/category/category.vue
View file @
365acd81
...
...
@@ -124,6 +124,8 @@ export default {
self
.
$request
(
'/app/authenticate/save'
,
'POST'
,
params
).
then
((
res
)
=>
{
self
.
Go
(
'uni:/subPackage/application/application'
,
'redirect'
)
console
.
log
(
res
,
'save'
)
}).
catch
(
err
=>
{
console
.
log
(
err
,
'沃日3'
)
})
},
desVal
(
e
)
{
...
...
@@ -164,7 +166,7 @@ export default {
}
//上传图片
uni
.
chooseImage
({
count
:
1
,
//默认9
count
:
3
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
],
//从相册选择
success
:
function
(
res
)
{
...
...
subPackage/lookGoods/index.less
View file @
365acd81
.look-page{
.look-page
{
width: 100%;
height:calc(100vh-120px);
min-height:100vh;
overflow: hidden;
height: 100vh;
background: #F7FAFF;
.look-mian{
padding-top:6rpx;
.scroll-y-hs{
margin-top: 24rpx;
height: 1200rpx;
// padding-bottom:120rpx;
.mian-box{
display:flex;
flex-wrap: wrap;
align-items: center;
margin:0 30rpx;
.box-item{
margin-bottom:24rpx;
.look-mian {
height: 100%;
box-sizing: border-box;
padding-top: 30rpx;
.scroll-y-hs {
height: 100%;
.main-box {
display: flex;
flex-wrap: wrap;
align-items: center;
box-sizing: border-box;
padding: 0 30rpx;
.box-item {
margin-bottom: 24rpx;
width: 333rpx;
height: 392rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 232, 232, 0.49);
border-radius: 10rpx;
&:nth-child(2n) {
margin-left: 24rpx;
}
.item-top {
width: 333rpx;
height: 426rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232,232,232,0.49);
border-radius: 10rpx;
.item-top{
height: 272rpx;
.top-img {
display: block;
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.item-footer {
padding: 9rpx 12rpx 25rpx;
box-sizing: border-box;
.footer-des {
height: 37rpx;
line-height: 37rpx;
margin-bottom: 12rpx;
font-size: 26rpx;
color: #333333;
white-space: nowrap;
/* 确保文本在一行内显示 */
overflow: hidden;
/* 隐藏超出容器的内容 */
text-overflow: ellipsis;
/* 使用省略号表示被截断的文本 */
word-break: break-all;
/* 允许在单词内换行 */
}
.footer-box {
height: 40rpx;
line-height: 40rpx;
display: flex;
width: 333rpx;
height: 272rpx;
position: relative;
.top-img{
width: 333rpx;
height: 272rpx;
background-size: 333rpx 272rpx;
border-radius: 10rpx;
justify-content: flex-start;
align-items: center;
color: #FC4D3E;
text {
display: block;
}
.top-icon{
position: absolute;
top:0;
margin-left: 214rpx;
display: inline-block;
width:118rpx;
height: 110rpx;
background: url('https://ddh.yyhock.com/ddhMall/goods-sale.png') 0 0 no-repeat;
background-size:118rpx 110rpx ;
.num-icon {
margin-top: 4rpx;
font-size: 20rpx;
}
}
.item-footer{
padding: 9rpx 16rpx 21rpx 0rpx;
.footer-des{
width: 260rpx;
height: 37rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #333333;
line-height: 37rpx;
text-align: left;
font-style: normal;
white-space: nowrap; /* 确保文本在一行内显示 */
overflow: hidden; /* 隐藏超出容器的内容 */
text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
word-break: break-all; /* 允许在单词内换行 */
}
.footer-box{
display: flex;
margin:9rpx 0 16rpx;
.box-num{
display: flex;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FC4D3E;
line-height: 28rpx;
text-align: left;
font-style: normal;
.num-icon{
margin-top:4rpx;
font-size: 20rpx;
}
}
.num-money {
font-size: 28rpx;
margin-right: 8rpx;
}
.footer-line{
display: flex;
align-items: center;
justify-content: space-between;
.box-btn{
width: 76rpx;
height: 38rpx;
border-radius: 5rpx;
border: 1rpx solid #2263E6;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #2263E6;
line-height: 38rpx;
text-align: center;
font-style: normal;
}
.box-last{
height: 28rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #999999;
line-height: 28rpx;
text-align: right;
font-style: normal;
}
.box-last {
font-size: 20rpx;
color: #999999;
}
}
}
:nth-child(2n){
margin-left: 24rpx;
}
}
}
}
}
.look-footer{
padding-top:6rpx;
.look-footer {
padding-top: 6rpx;
// height: 100vh;
overflow: hidden;
.footer-img{
margin:30% 146rpx 0;
.footer-img {
margin: 30% 146rpx 0;
width: 458rpx;
height: 458rpx;
background-size: 100%;
}
.footer-text{
.footer-text {
// padding-bottom: 50%;
height: 40rpx;
font-family: PingFangSC, PingFang SC;
...
...
@@ -146,4 +125,4 @@
font-style: normal;
}
}
}
\ No newline at end of file
}
subPackage/lookGoods/lookGoods.vue
View file @
365acd81
<
template
>
<view
class=
'look-page'
>
<view
class=
'look-mian'
v-if=
"IndexList && IndexList.length>0"
>
<scroll-view
class=
'scroll-y-hs'
scroll-y=
"true"
style=
"height: 600px;"
refresher-default-style=
"none"
@
scrolltoupper=
"toupperTop"
@
scrolltolower=
"lowerMore"
>
<view
class=
'mian-box'
>
<view
class=
'box-item'
v-for=
"item in IndexList"
:key=
"item.id"
@
click=
"goItem(item)"
>
<view
class=
'look-mian'
v-if=
"IndexList && IndexList.length > 0"
>
<scroll-view
class=
'scroll-y-hs'
scroll-y=
"true"
refresher-default-style=
"none"
@
scrolltoupper=
"toupperTop"
@
scrolltolower=
"lowerMore"
>
<view
class=
'main-box'
>
<view
class=
'box-item'
v-for=
"item in IndexList"
:key=
"item.id"
@
click=
"goItem(item)"
>
<view
class=
'item-top'
>
<image
:src=
"item.goodsImage"
class=
'top-img'
></image>
<i
class=
'top-icon'
></i>
</view>
<view
class=
'item-footer'
>
<view
class=
'footer-des'
>
{{
item
.
goodsName
}}
</view>
<view
class=
'footer-des'
>
{{
item
.
goodsName
}}
</view>
<view
class=
'footer-box'
>
<view
class=
'box-num'
>
<view
class=
'num-icon'
>
¥
</view>
{{
item
.
goodsMoney
}}
</view>
</view>
<view
class=
'footer-line'
>
<view
class=
'box-btn'
>
可置换
</view>
<view
class=
"box-last"
>
{{
item
.
lookSum
}}
次浏览
</view>
<text
class=
'num-icon'
>
¥
</text>
<text
class=
"num-money"
>
{{
item
.
goodsMoney
}}
</text>
<text
class=
"box-last"
>
{{
item
.
lookSum
}}
次浏览
</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view
class=
'look-footer'
v-else
>
<image
class=
"footer-img"
src=
'https://ddh.yyhock.com/ddhMall/result-null.png'
></image>
<image
class=
"footer-img"
src=
'https://ddh.yyhock.com/ddhMall/result-null.png'
></image>
<view
class=
'footer-text'
>
暂无数据哦!
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
titleText
:
''
,
pageNum
:
1
,
pageSize
:
10
,
total
:
0
,
hasNextText
:
'上拉加载更多'
,
loadFlag
:
true
,
hasNextPage
:
false
,
goodType
:
0
,
IndexList
:[]
export
default
{
data
()
{
return
{
titleText
:
''
,
pageNum
:
1
,
pageSize
:
10
,
total
:
0
,
hasNextText
:
'上拉加载更多'
,
loadFlag
:
true
,
hasNextPage
:
false
,
goodType
:
0
,
IndexList
:
[]
}
},
onReady
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
titleText
})
},
onLoad
(
options
)
{
if
(
options
.
loanStatus
==
'我的关注'
)
{
this
.
titleText
=
options
.
loanStatus
this
.
goodType
=
1
}
else
{
this
.
titleText
=
options
.
loanStatus
this
.
goodType
=
2
}
this
.
buryingPoint
(
'app:lookGoods_pageView'
)
this
.
init
()
},
methods
:
{
init
()
{
const
self
=
this
const
params
=
{
"current"
:
self
.
pageNum
,
"size"
:
self
.
pageSize
,
"sort"
:
"id desc"
,
"type"
:
self
.
goodType
//1收藏,2 足迹
}
},
onReady
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
titleText
console
.
log
(
params
,
'params'
)
self
.
$request
(
'/app/goods/getGoodsByUserId'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
result
,
'getGoodsByUserId'
);
let
{
total
,
data
}
=
res
.
result
const
hasNextPage
=
total
-
self
.
pageSize
*
self
.
pageNum
>
0
?
true
:
false
//是否有下一页
if
(
self
.
loadFlag
)
{
self
.
IndexList
=
self
.
IndexList
.
concat
(
data
)
}
else
{
self
.
IndexList
=
data
}
self
.
hasNextPage
=
hasNextPage
self
.
loadFlag
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
onLoad
(
options
)
{
console
.
log
(
options
,
'09'
)
if
(
options
.
loanStatus
==
'我的关注'
){
this
.
titleText
=
options
.
loanStatus
this
.
goodType
=
1
}
else
{
this
.
titleText
=
options
.
loanStatus
this
.
goodType
=
2
goItem
(
item
)
{
const
params
=
{
goodId
:
item
.
id
}
this
.
buryingPoint
(
'app:lookGoods_pageView'
)
this
.
init
()
uni
.
navigateTo
({
url
:
'/subPackage/productDetails/productDetails?mydata='
+
encodeURIComponent
(
JSON
.
stringify
(
params
))
})
},
methods
:
{
init
(){
const
self
=
this
const
params
=
{
"current"
:
self
.
pageNum
,
"size"
:
self
.
pageSize
,
"sort"
:
"id desc"
,
"type"
:
self
.
goodType
//1收藏,2 足迹
}
console
.
log
(
params
,
'params'
)
self
.
$request
(
'/app/goods/getGoodsByUserId'
,
'POST'
,
params
).
then
(
res
=>
{
console
.
log
(
res
.
result
,
'getGoodsByUserId'
);
const
{
total
,
data
}
=
res
.
result
const
hasNextPage
=
total
-
self
.
pageSize
*
self
.
pageNum
>
0
?
true
:
false
//是否有下一页
if
(
self
.
loadFlag
){
console
.
log
(
33
);
self
.
IndexList
=
self
.
IndexList
.
concat
(
data
)
}
else
{
console
.
log
(
34
);
self
.
IndexList
=
data
}
self
.
hasNextPage
=
hasNextPage
self
.
loadFlag
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
,
'请求出错'
)
})
},
goItem
(
item
){
const
params
=
{
goodId
:
item
.
id
}
uni
.
navigateTo
({
url
:
'/subPackage/productDetails/productDetails?mydata='
+
encodeURIComponent
(
JSON
.
stringify
(
params
))
toupperTop
(
e
)
{
console
.
log
(
e
,
'到顶了'
);
},
lowerMore
(
e
)
{
console
.
log
(
e
,
'触底了'
);
if
(
!
this
.
hasNextPage
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
'到底了'
,
})
},
toupperTop
(
e
){
console
.
log
(
e
,
'到顶了'
);
},
lowerMore
(
e
){
console
.
log
(
e
,
'触底了'
);
if
(
!
this
.
hasNextPage
){
uni
.
showToast
({
icon
:
'none'
,
title
:
'到底了'
,
})
return
false
;
}
if
(
this
.
loadFlag
)
return
;
this
.
loadFlag
=
true
,
this
.
pageNum
=
this
.
pageNum
+
1
this
.
init
();
return
false
;
}
},
onShow
()
{
this
.
init
()
if
(
this
.
loadFlag
)
return
;
this
.
loadFlag
=
true
,
this
.
pageNum
=
this
.
pageNum
+
1
this
.
init
();
}
},
onShow
()
{
this
.
init
()
}
}
</
script
>
<
style
src=
'./index.less'
lang=
"less"
scoped
></
style
>
subPackage/setting/setting.vue
View file @
365acd81
...
...
@@ -32,7 +32,7 @@
<view
:hidden=
"userFeedbackHidden"
class=
"popup_content"
>
<view
class=
"popup_title"
>
提示
</view>
<view
class=
'popup_main'
>
您一
但
确认注销,您所有信息都会被清除,您确认注销账号?
您一
旦
确认注销,您所有信息都会被清除,您确认注销账号?
</view>
<view
class=
'btn-main'
>
<view
class=
'btn-confirm'
@
click=
'cancelAccount()'
>
...
...
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