Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9f34c73e
authored
Sep 14, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ww-订单评价
parent
89b09175
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
14 deletions
pages/pay/order-comment/order-comment.js
pages/pay/order-comment/order-comment.wxml
project.config.json
pages/pay/order-comment/order-comment.js
View file @
9f34c73e
...
...
@@ -9,7 +9,10 @@ Page({
scoreProductText
:
'0.0'
,
scoreEnvironment
:
0
,
// 环境分数
scoreEnvironmentText
:
'0.0'
,
content
:
''
,
// 评价内容,
imgUrls
:
[],
// 评价图片
orderInfo
:
{
orderId
:
'02aaa9a62d5645c59109218c27d2174a'
,
name
:
'精灵鸟理想国年卡'
,
price
:
'1680.00'
,
quantity
:
4
,
...
...
@@ -18,16 +21,16 @@ Page({
id
:
0
,
imgUrl
:
''
},
//
{
//
id: 1,
//
imgUrl: ''
//
},
//
{
//
id: 2,
//
imgUrl: ''
//
}
{
id
:
1
,
imgUrl
:
''
},
{
id
:
2
,
imgUrl
:
''
}
]
}
}
,
},
/**
...
...
@@ -37,6 +40,7 @@ Page({
* @returns
*/
onChangeScore
:
function
(
event
)
{
// type 1: 服务评价 2: 产品评价 3: 环境评价
const
{
index
,
type
}
=
event
.
currentTarget
.
dataset
console
.
log
(
index
,
type
)
let
{
scoreServe
,
scoreProduct
,
scoreEnvironment
}
=
this
.
data
...
...
@@ -67,6 +71,62 @@ Page({
* @returns
*/
eventInputDone
:
function
(
event
)
{
// console.log(event.detail.value)
let
content
=
event
.
detail
.
value
this
.
setData
({
content
})
},
/**
* 新增评价图片
* @function
* @param
* @returns
*/
eventImageAdd
:
function
(
event
)
{
console
.
log
(
event
.
detail
.
all
[
0
])
let
imgUrl
=
event
.
detail
.
all
[
0
].
url
let
imgUrls
=
[]
imgUrls
.
push
(
imgUrl
)
this
.
setData
({
imgUrls
})
},
/**
* 移除评价图片
* @function
* @param
* @returns
*/
eventImageRemove
:
function
(
event
)
{
console
.
log
(
event
.
detail
.
all
)
},
/**
* 提交订单
* @function
* @param
* @returns
*/
onSubmitCommennt
:
function
()
{
console
.
log
(
'submit'
)
let
funcFile
=
this
.
data
.
imgUrls
[
0
]
wx
.
uploadFile
({
url
:
App
.
globalData
.
baseUrl
+
'/api/v1/common/upload'
,
filePath
:
funcFile
,
name
:
'file'
,
header
:
{
'Content-Type'
:
'multipart/form-data'
,
'token'
:
App
.
globalData
.
token
},
success
:
(
res
)
=>
{
console
.
log
(
res
)
}
})
// let formData = {}
// formData.orderId = this.data.orderInfo.orderId
// formData.imgUrls = '',
// formData.serviceEvaluation = this.data.scoreServe
// formData.productEvaluation = this.data.scoreProduct
// formData.environmentalEvaluation = this.data.scoreEnvironment
// formData.content = this.data.content
}
})
\ No newline at end of file
pages/pay/order-comment/order-comment.wxml
View file @
9f34c73e
...
...
@@ -83,7 +83,7 @@
<view class="order-comment">
<l-textarea placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF" maxlength="200" l-class="l-textarea" border="{{false}}" bind:linblur="eventInputDone" />
<view class="order-picker">
<l-image-picker l-item-class="l-image-item" l-class="l-picker" count="9" size="3" size-type="compressed" custom="{{true}}">
<l-image-picker l-item-class="l-image-item" l-class="l-picker" count="9" size="3" size-type="compressed" custom="{{true}}"
bind:linchange="eventImageAdd" bind:linremove="eventImageRemove"
>
<view class="col con-c align-c">
<image class="icon-img"></image>
<text>添加图片</text>
...
...
@@ -93,7 +93,7 @@
</view>
</view>
<view class="footer-wrapper">
<view class="comment-btn">
<view class="comment-btn"
bindtap="onSubmitCommennt"
>
<text>提交评价</text>
</view>
</view>
...
...
project.config.json
View file @
9f34c73e
...
...
@@ -148,8 +148,8 @@
},
{
"id"
:
11
,
"name"
:
"pages/play/movie
-detail/movie-detail
"
,
"pathName"
:
"pages/play/movie
-detail/movie-detail
"
,
"name"
:
"pages/play/movie
/movie
"
,
"pathName"
:
"pages/play/movie
/movie
"
,
"query"
:
""
,
"scene"
:
null
},
...
...
@@ -159,6 +159,13 @@
"pathName"
:
"pages/play/home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/play/service-detail/service-detail"
,
"pathName"
:
"pages/play/service-detail/service-detail"
,
"query"
:
""
,
"scene"
:
null
}
]
}
...
...
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