Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
a277ba24
Commit
a277ba24
authored
Aug 28, 2020
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增评价
调整部分功能
parent
b44f1601
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
497 additions
and
6 deletions
+497
-6
pages.json
pages.json
+6
-0
goods.vue
pages/goods/goods.vue
+4
-1
order-commit-details.vue
pages/order/order-commit-details.vue
+249
-0
order-commit.vue
pages/order/order-commit.vue
+236
-3
user-center.vue
pages/user-center/user-center.vue
+1
-1
api.js
plugin/api.js
+1
-1
No files found.
pages.json
View file @
a277ba24
...
...
@@ -250,6 +250,12 @@
},
{
"path"
:
"express"
},
{
"path"
:
"order-commit"
},
{
"path"
:
"order-commit-details"
}
]
},
...
...
pages/goods/goods.vue
View file @
a277ba24
...
...
@@ -176,7 +176,10 @@
</view>
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"g.sendArea&&g.sendArea!=''"
>
<view
class=
"label"
>
发货地
</view>
<view
class=
"content"
>
{{g.sendArea }}
</view>
</view>
<view
class=
"sku-box u-skeleton-rect"
v-if=
"setting.is_express == '1'"
>
<view
class=
"label"
>
快递
</view>
<view
class=
"content"
>
{{ g.express == '' ? '免运费' : '¥' + g.express }}
</view>
...
...
pages/order/order-commit-details.vue
0 → 100644
View file @
a277ba24
<
template
>
<view
class=
"commit-detail"
>
<u-top-tips
ref=
"uTips"
></u-top-tips>
<view
class=
"good-item"
>
<image
class=
"good-pic"
:src=
"goodsPic"
mode=
"aspectFit"
/>
<view
class=
"right-box"
>
<view
class=
"good-info"
>
{{
goodsName
}}
</view>
<view
class=
"op-box"
>
<u-rate
:current=
"msg.CommentGrade"
active-color=
"#FA3534"
inactive-color=
"#b2b2b2"
active-icon=
"star"
inactive-icon=
"star-o"
size=
"40"
></u-rate>
</view>
</view>
</view>
<view
class=
"content-box"
>
<view
class=
"title-box"
>
输入评价内容
</view>
<view
class=
"editor-box"
>
<view
class=
"editor-icon"
>
<u-icon
name=
"edit"
size=
"36"
></u-icon>
</view>
<view
class=
"editor"
>
<textarea
placeholder=
"评价内容"
v-model=
"msg.Content"
maxlength=
"200"
></textarea>
<u-upload
:action=
"action"
:file-list=
"fileList"
max-count=
"9"
:custom-btn=
"true"
@
on-success=
"uploadSuccessHandler"
>
<view
slot=
"addBtn"
class=
"slot-btn"
>
<u-icon
name=
"photograph"
size=
"40"
color=
"#888"
></u-icon>
<view
class=
"mian-title"
>
上传图片
</view>
</view>
</u-upload>
</view>
</view>
</view>
<view
style=
"padding:10px 40px;background:#FFF"
>
<u-button
size=
"80"
:ripple=
"true"
@
click=
"submitForm"
shape=
"circle"
:custom-style=
"
{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px'
}"
>
<u-loading
mode=
"circle"
style=
"margin-right: 5px;"
v-if=
"submitStatus"
></u-loading>
提交评价
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"发表评价"
,
mc
:
""
,
secondary
:
""
,
msg
:
{
CommentGrade
:
5
,
GoodsId
:
0
,
Content
:
""
,
OrderDetailId
:
0
,
CommentImgList
:
[],
},
submitStatus
:
false
,
goodsName
:
""
,
goodsPic
:
""
,
action
:
this
.
host2
+
"/api/File/UploadTencent"
,
fileList
:
[],
};
},
onLoad
(
option
)
{
if
(
option
.
param
)
{
let
param
=
JSON
.
parse
(
decodeURIComponent
(
option
.
param
));
this
.
msg
.
GoodsId
=
param
.
GoodsId
;
this
.
msg
.
OrderDetailId
=
param
.
OrderDetailId
;
this
.
goodsName
=
param
.
GoodsName
;
this
.
goodsPic
=
param
.
CoverImage
;
}
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
},
methods
:
{
uploadSuccessHandler
(
data
,
index
,
lists
)
{
console
.
log
(
JSON
.
parse
(
data
));
let
r
=
JSON
.
parse
(
data
);
this
.
msg
.
CommentImgList
.
push
(
r
.
data
);
},
submitForm
()
{
this
.
submitStatus
=
true
;
if
(
this
.
msg
.
CommentGrade
>
0
)
{
this
.
request2
(
{
url
:
"/api/AppletOrder/SetGoodsCommentInfo"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showModal
({
content
:
"评价成功,感谢您的反馈"
,
showCancel
:
false
,
confirmText
:
"确认"
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
navigateBack
({
delta
:
1
,
});
}
this
.
submitStatus
=
false
;
},
});
}
else
{
this
.
submitStatus
=
false
;
this
.
$refs
.
uTips
.
show
({
title
:
res
.
msg
,
type
:
"error"
,
duration
:
"2300"
,
});
}
}
);
}
else
{
this
.
$refs
.
uTips
.
show
({
title
:
"请您为商品打打分吧"
,
type
:
"error"
,
duration
:
"2300"
,
});
}
},
},
};
</
script
>
<
style
>
.commit-detail
{
background
:
#faf8f9
;
height
:
100vh
;
position
:
relative
;
}
.commit-detail
.good-item
{
margin
:
10px
0
;
background
:
#fff
;
padding
:
10px
;
border-radius
:
10px
;
display
:
flex
;
}
.commit-detail
.good-item
.good-pic
{
width
:
120
rpx
;
height
:
120
rpx
;
margin-right
:
15px
;
border-radius
:
5px
;
}
.commit-detail
.good-item
.right-box
{
width
:
1px
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
height
:
120
rpx
;
}
.commit-detail
.good-item
.right-box
.good-info
{
flex
:
1
;
width
:
100%
;
height
:
1px
;
font-size
:
28
rpx
;
color
:
#333
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
word-break
:
break-all
;
margin-bottom
:
5px
;
}
.commit-detail
.good-item
.right-box
.op-box
{
height
:
25px
;
}
.commit-detail
.content-box
{
background
:
#fff
;
padding
:
15px
;
border-radius
:
5px
;
}
.commit-detail
.content-box
.title-box
{
padding-bottom
:
15px
;
border-bottom
:
1px
solid
#e3e3e3
;
font-size
:
15px
;
font-weight
:
500
;
margin-bottom
:
15px
;
color
:
#000
;
}
.commit-detail
.content-box
.editor-box
{
display
:
flex
;
}
.commit-detail
.content-box
.editor-box
.editor-icon
{
width
:
18px
;
margin-right
:
5px
;
}
.commit-detail
.content-box
.editor-box
.editor
{
width
:
1px
;
flex
:
1
;
}
.commit-detail
.content-box
.editor-box
.editor
textarea
{
width
:
100%
;
height
:
150px
;
font-size
:
14px
;
color
:
#000
;
border
:
none
;
outline
:
none
;
margin-bottom
:
10px
;
}
.commit-detail
.content-box
.editor-box
.editor
.slot-btn
{
width
:
140
rpx
;
height
:
140
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
background
:
rgb
(
244
,
245
,
246
);
border-radius
:
10
rpx
;
}
.commit-detail
.content-box
.editor-box
.editor
.slot-btn
.mian-title
{
font-size
:
28
rpx
;
color
:
#888
;
font-weight
:
600
;
margin
:
10
rpx
0
;
}
.commit-detail
.content-box
.editor-box
.editor
.slot-btn
.sub-title
{
color
:
#999
;
font-size
:
26
rpx
;
font-family
:
"microsoft yahei"
!important
;
}
.commit-detail
.u-list-item
{
width
:
90px
!important
;
height
:
90px
!important
;
}
</
style
>
\ No newline at end of file
pages/order/order-commit.vue
View file @
a277ba24
<
template
>
<view
class=
"commit-box"
>
<u-empty
text=
"没有找到未评价的商品信息"
font-size=
"36"
mode=
"list"
v-if=
"g.length == 0 && !loading"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"height: 100vh;width: 100vw;overflow: hidden;padding:0 0 10px 0;"
>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"good-list"
>
<view
class=
"good-item"
v-for=
"(x, i) in g"
:key=
"i"
>
<image
class=
"good-pic"
:src=
"x.CoverImage"
mode=
"aspectFit"
/>
<view
class=
"right-box"
>
<view
class=
"good-info"
>
<view
class=
"good-name"
>
{{
x
.
GoodsName
}}
</view>
<view
class=
"good-attr"
>
<u-tag
v-for=
"(y, yi) in x.SpecificationList"
:key=
"yi"
size=
"mini"
:text=
"y"
type=
"warning"
/>
</view>
</view>
<view
class=
"op-box"
>
<u-button
size=
"mini"
ripple
plain
shape=
"circle"
:custom-style=
"
{color:mc,borderColor:mc}"
@click="goCommit(x)"
>评价
</u-button>
</view>
</view>
</view>
</view>
<u-loadmore
v-if=
"showLoading"
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F5F5F5"
/>
</scroll-view>
</view>
<!--
<view
class=
"quick"
v-if=
"!loading"
>
<view
class=
"item"
>
<u-icon
name=
"cart-o"
size=
"48"
color=
"#333"
/>
</view>
<view
class=
"item"
@
click=
"goTop"
>
<u-icon
name=
"arrow-up"
size=
"48"
color=
"#333"
/>
</view>
</view>
-->
</view>
</
template
>
<
script
>
export
default
{
}
data
()
{
return
{
pageTitle
:
"评价中心"
,
loading
:
false
,
g
:
[],
showLoading
:
false
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多评价商品了"
,
},
status
:
"loadmore"
,
scrollTop
:
0
,
old
:
{
scrollTop
:
0
,
},
mc
:
""
,
secondary
:
""
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
IsComment
:
2
,
GoodsName
:
""
,
OrderNo
:
""
,
},
page_count
:
0
,
isover
:
false
,
};
},
onShow
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
console
.
log
(
this
.
g
)
this
.
init
();
},
mounted
()
{
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
},
methods
:
{
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
goCommit
(
x
)
{
let
msg
=
{
GoodsId
:
x
.
GoodsId
,
OrderDetailId
:
x
.
OrderDetailId
,
GoodsName
:
x
.
GoodsName
,
CoverImage
:
x
.
CoverImage
,
};
uni
.
navigateTo
({
url
:
"/pages/order/order-commit-details?param="
+
encodeURIComponent
(
JSON
.
stringify
(
msg
)),
fail
:
function
(
e
)
{
console
.
log
(
e
);
},
});
},
goTop
(
e
)
{
this
.
scrollTop
=
this
.
old
.
scrollTop
;
this
.
$nextTick
(
function
()
{
this
.
scrollTop
=
0
;
});
},
init
()
{
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
msg
.
pageIndex
!=
1
;
this
.
request2
(
{
url
:
"/api/AppletOrder/GetAppletGoodsWaitCommentPageList"
,
data
:
this
.
msg
,
},
(
res
)
=>
{
this
.
isloading
=
false
;
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
}
}
uni
.
hideNavigationBarLoading
();
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
status
=
"loading"
;
this
.
msg
.
pageIndex
++
;
this
.
init
();
}
else
{
this
.
isover
=
true
;
this
.
status
=
"nomore"
;
}
},
},
};
</
script
>
<
style
>
.commit-box
{
background
:
#faf8f9
;
height
:
100vh
;
position
:
relative
;
}
.commit-box
.quick
{
right
:
50
rpx
;
bottom
:
50
rpx
;
position
:
absolute
;
}
.commit-box
.quick
.item
{
background
:
#fff
;
border
:
1px
solid
#aaa
;
height
:
90
rpx
;
width
:
90
rpx
;
color
:
#333
;
border-radius
:
90
rpx
;
margin-top
:
40
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.commit-box
.good-list
{
}
.commit-box
.good-list
.good-item
{
margin-top
:
10px
;
background
:
#fff
;
padding
:
10px
;
border-radius
:
10px
;
display
:
flex
;
}
.commit-box
.good-list
.good-item
.good-pic
{
width
:
200
rpx
;
height
:
200
rpx
;
margin-right
:
15px
;
border-radius
:
5px
;
}
.commit-box
.good-list
.good-item
.right-box
{
width
:
1px
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
height
:
200
rpx
;
}
.commit-box
.good-list
.good-item
.right-box
.good-info
{
flex
:
1
;
width
:
100%
;
height
:
1px
;
}
.commit-box
.good-list
.good-item
.right-box
.op-box
{
text-align
:
right
;
height
:
25px
;
}
.commit-box
.good-list
.good-item
.right-box
.good-info
.good-name
{
font-size
:
28
rpx
;
color
:
#333
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
5px
;
}
.commit-box
.good-list
.good-item
.right-box
.good-info
.good-attr
{
text-align
:
left
;
}
</
style
>
\ No newline at end of file
pages/user-center/user-center.vue
View file @
a277ba24
...
...
@@ -108,7 +108,7 @@
{{
user_info
.
MyOrder
.
WaitReceiving
}}
</view>
<!-- 待评价 -->
<view
v-if=
"item.link_url == '/pages/order/
index/index?status=4
' && user_info.MyOrder.WaitCommentNum > 0"
class=
"badge"
:style=
"
{ background: mainColor }">
<view
v-if=
"item.link_url == '/pages/order/
order-commit
' && user_info.MyOrder.WaitCommentNum > 0"
class=
"badge"
:style=
"
{ background: mainColor }">
{{
user_info
.
MyOrder
.
WaitCommentNum
}}
</view>
<!-- 售后 -->
...
...
plugin/api.js
View file @
a277ba24
...
...
@@ -4,7 +4,7 @@ export default {
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
Vue
.
prototype
.
host2
=
"https://mallApi.oytour.com"
//
Vue.prototype.host2 = "http://192.168.2.65
"
//
Vue.prototype.host2 = "http://192.168.2.16:8088
"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
...
...
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