Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli-app
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
xinrenli-app
Commits
0d4e104b
Commit
0d4e104b
authored
Apr 10, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付时间倒计时,修改bug
parent
dcb62df5
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
360 additions
and
240 deletions
+360
-240
components/evaluate.vue
+5
-5
components/form.vue
+63
-23
components/upload/aIndex.vue
+0
-4
demand/index/index.vue
+22
-19
home/index/index.vue
+24
-20
main.js
+10
-6
my/coupon/index.vue
+23
-1
order/detail/detail.vue
+55
-40
pages/demand/components/index.vue
+45
-19
pages/home/index.vue
+13
-2
pages/my/index.vue
+84
-53
pages/order/index.vue
+16
-48
No files found.
components/evaluate.vue
View file @
0d4e104b
...
@@ -86,11 +86,11 @@
...
@@ -86,11 +86,11 @@
return
item
.
url
;
return
item
.
url
;
});
});
console
.
log
(
photoList
,
'第三'
)
console
.
log
(
photoList
,
'第三'
)
//
uni.previewImage({
uni
.
previewImage
({
//
current: inx,
current
:
inx
,
//
urls: photoList,
urls
:
photoList
,
//
loop: true
loop
:
true
//
})
})
}
}
}
}
...
...
components/form.vue
View file @
0d4e104b
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
<u-datetime-picker
ref=
"datePicker"
:formatter=
"formatter"
v-model=
"formInfo.repairTime"
<u-datetime-picker
ref=
"datePicker"
:formatter=
"formatter"
v-model=
"formInfo.repairTime"
:show=
"showTime"
mode=
"date"
@
confirm=
"handleConfirmDate"
@
cancel=
"handleClose"
>
:show=
"showTime"
mode=
"date"
@
confirm=
"handleConfirmDate"
@
cancel=
"handleClose"
>
</u-datetime-picker>
</u-datetime-picker>
<input
type=
"text"
v-model=
"formInfo.repairTime"
placeholder=
"请选择时间"
>
<view
class=
"time-text"
>
{{
formInfo
.
repairTime
?
formInfo
.
repairTime
:
'请选择时间'
}}
</view>
<!--
<input
type=
"text"
v-model=
"formInfo.repairTime"
placeholder=
"请选择时间"
>
-->
<u-icon
name=
"arrow-down-fill"
color=
"#000000"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-down-fill"
color=
"#000000"
size=
"28"
></u-icon>
</view>
</view>
</u--input>
</u--input>
...
@@ -67,8 +68,8 @@
...
@@ -67,8 +68,8 @@
<view>
<view>
<view
class=
"video-box"
style=
""
v-if=
"formInfo.videoList.length"
>
<view
class=
"video-box"
style=
""
v-if=
"formInfo.videoList.length"
>
<video
id=
"myVideo"
:src=
"formInfo.videoList[0].url"
<video
id=
"myVideo"
:src=
"formInfo.videoList[0].url"
@
error=
"videoErrorCallback"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
:show-fullscreen-btn=
'false'
></video>
<view
class=
"position-icon"
@
click=
"delVideoList"
>
<view
class=
"position-icon"
@
click=
"delVideoList"
>
...
@@ -77,8 +78,8 @@
...
@@ -77,8 +78,8 @@
</view>
</view>
<comUpload
v-else
:afterWidth=
"350"
@
getVal=
"getVideoList"
<comUpload
v-else
:afterWidth=
"350"
@
getVal=
"getVideoList"
ref=
"videoRef"
ref=
"videoRef"
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
>
:acceptType=
"acceptType"
:maxCount=
"1"
:multiple=
"isMultiple"
>
</comUpload>
</comUpload>
</view>
</view>
...
@@ -137,7 +138,12 @@
...
@@ -137,7 +138,12 @@
statusBtn
:
Number
,
statusBtn
:
Number
,
detailData
:
Object
detailData
:
Object
},
},
data
()
{
data
()
{
const
mobile
=
(
rule
,
value
,
callback
)
=>
{
return
/^1
[
3-9
]\d{9}
$/
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入正确的手机号码'
))
}
return
{
return
{
showTime
:
false
,
//时间选择器是否显示
showTime
:
false
,
//时间选择器是否显示
acceptType
:
'video'
,
acceptType
:
'video'
,
...
@@ -156,19 +162,36 @@
...
@@ -156,19 +162,36 @@
linkman
:
{
linkman
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
联系人
'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
},
},
phone
:
[{
type
:
'string'
,
required
:
true
,
message
:
'请输入正确的联系人手机号码'
,
max
:
11
,
min
:
11
,
trigger
:
'blur'
},
{
// 自定义验证函数,见上说明
validator
:
mobile
,
message
:
'手机号码不正确'
,
// 触发器可以同时用blur和change
trigger
:
[
'change'
,
'blur'
],
}
],
repairAddress
:
{
repairAddress
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
维修地址
'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
},
},
budget
:
{
budget
:
{
type
:
'
string
'
,
type
:
'
number
'
,
required
:
true
,
required
:
true
,
message
:
'请填写
备注说明
'
,
message
:
'请填写
预算金额
'
,
trigger
:
[
'blur'
,
'change'
]
trigger
:
[
'blur'
,
'change'
]
},
},
},
},
...
@@ -176,6 +199,11 @@
...
@@ -176,6 +199,11 @@
};
};
},
},
//如果是自己封装的组件就是mounted()
//如果不是组件就是onReady()
mounted
()
{
this
.
$refs
.
form
.
setRules
(
this
.
rules
);
},
watch
:
{
watch
:
{
detailData
:
{
detailData
:
{
handler
(
newVal
,
oldVal
)
{
handler
(
newVal
,
oldVal
)
{
...
@@ -216,6 +244,7 @@
...
@@ -216,6 +244,7 @@
url
:
data
.
url
,
url
:
data
.
url
,
fileType
:
'picture'
fileType
:
'picture'
})
})
// that.formInfo.pictureList = photoList
},
},
//删除照片
//删除照片
delPhotoItem
(
index
)
{
delPhotoItem
(
index
)
{
...
@@ -224,7 +253,6 @@
...
@@ -224,7 +253,6 @@
// 获取上传视频的值
// 获取上传视频的值
getVideoList
(
data
)
{
getVideoList
(
data
)
{
let
that
=
this
let
that
=
this
console
.
log
(
data
,
'有的哈桑'
)
let
videoList
=
[]
let
videoList
=
[]
videoList
.
push
({
videoList
.
push
({
url
:
data
.
url
,
url
:
data
.
url
,
...
@@ -232,27 +260,36 @@
...
@@ -232,27 +260,36 @@
})
})
that
.
formInfo
.
videoList
=
videoList
that
.
formInfo
.
videoList
=
videoList
},
},
delVideoList
(){
delVideoList
()
{
console
.
log
(
'删除'
,
this
.
formInfo
.
videoList
)
this
.
formInfo
.
videoList
.
splice
(
0
,
1
)
this
.
formInfo
.
videoList
.
splice
(
0
,
1
)
console
.
log
(
'删除后'
,
this
.
formInfo
.
videoList
)
},
},
// 上传音频事件
// 上传音频事件
getVoiceList
(
data
)
{
getVoiceList
(
data
)
{
let
that
=
this
let
that
=
this
that
.
showPopup
=
false
that
.
showPopup
=
false
console
.
log
(
data
,
'有的哈桑'
)
let
voiceList
=
[]
let
voiceList
=
[]
voiceList
.
push
({
voiceList
.
push
({
url
:
data
.
url
,
url
:
data
.
url
,
fileType
:
'v
ideo
'
fileType
:
'v
oice
'
})
})
that
.
formInfo
.
voiceList
=
voiceList
that
.
formInfo
.
voiceList
=
voiceList
},
},
//确认修改和重新发布按钮
//确认修改和重新发布按钮
handleUpdateForm
()
{
handleUpdateForm
()
{
this
.
$emit
(
'submit'
,
this
.
formInfo
)
let
that
=
this
that
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
res
)
{
if
(
that
.
formInfo
.
pictureList
.
length
||
that
.
formInfo
.
videoList
.
length
||
that
.
formInfo
.
voiceList
.
length
)
{
that
.
$emit
(
'submit'
,
that
.
formInfo
)
}
else
{
uni
.
$u
.
toast
(
'图片、视频、音频选其一必填'
)
}
}
}).
catch
(
errors
=>
{
uni
.
$u
.
toast
(
'校验失败'
)
})
},
},
async
handleAdd
()
{
async
handleAdd
()
{
let
that
=
this
let
that
=
this
...
@@ -374,20 +411,23 @@
...
@@ -374,20 +411,23 @@
.video-box
{
.video-box
{
width
:
373
rpx
;
width
:
373
rpx
;
height
:
210
rpx
;
height
:
210
rpx
;
position
:
relative
;
position
:
relative
;
video{
video
{
width
:
100%
;
width
:
100%
;
height
:
100%
height
:
100%
}
}
}
}
.position-icon
{
.position-icon
{
position
:
absolute
;
position
:
absolute
;
top
:
-10
rpx
;
top
:
-10
rpx
;
right
:
-10
rpx
;
right
:
-10
rpx
;
}
.time-text
{
color
:
#666666
;
font-size
:
24
rpx
;
}
}
@import
url("@/css/form.css")
;
@import
url("@/css/form.css")
;
...
...
components/upload/aIndex.vue
View file @
0d4e104b
...
@@ -84,8 +84,6 @@
...
@@ -84,8 +84,6 @@
async
afterRead
(
event
)
{
async
afterRead
(
event
)
{
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let
lists
=
[].
concat
(
event
.
file
)
let
lists
=
[].
concat
(
event
.
file
)
console
.
log
(
lists
,
'点九三'
)
let
fileListLen
=
this
[
`fileList
${
event
.
name
}
`
].
length
let
fileListLen
=
this
[
`fileList
${
event
.
name
}
`
].
length
lists
.
map
((
item
)
=>
{
lists
.
map
((
item
)
=>
{
this
[
`fileList
${
event
.
name
}
`
].
push
({
this
[
`fileList
${
event
.
name
}
`
].
push
({
...
@@ -115,11 +113,9 @@
...
@@ -115,11 +113,9 @@
'Authorization'
:
`Bearer
${
uni
.
getStorageSync
(
'token'
)}
`
'Authorization'
:
`Bearer
${
uni
.
getStorageSync
(
'token'
)}
`
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
,
'单价'
)
const
{
const
{
data
data
}
=
JSON
.
parse
(
res
.
data
);
}
=
JSON
.
parse
(
res
.
data
);
console
.
log
(
data
,
'大街上可能'
)
this
.
$emit
(
'getVal'
,
data
);
this
.
$emit
(
'getVal'
,
data
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
demand/index/index.vue
View file @
0d4e104b
...
@@ -24,34 +24,40 @@
...
@@ -24,34 +24,40 @@
<view
class=
""
>
预算金额
</view>
<view
class=
""
>
预算金额
</view>
<view
class=
""
>
{{
detailData
.
budget
}}
</view>
<view
class=
""
>
{{
detailData
.
budget
}}
</view>
</view>
</view>
<view
class=
"content-photograph"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
<view
class=
"content-photograph"
>
<view
class=
""
>
上传图片
<view
class=
""
>
上传图片
</view>
</view>
<view
class=
"content-photograph-photo"
>
<view>
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in detailData.pictureList"
<view
class=
"content-photograph-photo"
v-if=
"detailData && detailData.pictureList && detailData.pictureList.length"
>
:key=
"index"
></image>
<image
class=
"content-photograph-photo-img"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in detailData.pictureList"
:key=
"index"
></image>
</view>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
</view>
<view
class=
"content-frequency"
v-if=
"detailData && detailData.videoList && detailData.videoList.length"
>
</view>
<view
class=
"content-frequency"
>
<view
class=
""
>
<view
class=
""
>
上传视频
上传视频
</view>
</view>
<view
v-if=
"detailData && detailData.videoList && detailData.videoList.length"
>
<view
v-for=
"(v ,index) in detailData.videoList"
:key=
"index"
>
<view
v-for=
"(v ,index) in detailData.videoList"
:key=
"index"
>
<video
id=
"myVideo"
<video
class=
"video-box"
id=
"myVideo"
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
:src=
"v.url"
controls
:show-fullscreen-btn=
'false'
></video>
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
</view>
</view>
</view>
</view>
<view
class=
"content-voice"
v-if=
"detailData && detailData.voiceList && detailData.voiceList.length"
>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
<view
class=
"content-voice"
>
<view
class=
""
>
<view
class=
""
>
语音描述
语音描述
</view>
</view>
<!-- class="content-voice-audio" -->
<!-- class="content-voice-audio" -->
<view
class=
"margin-y-two"
>
<view
class=
"margin-y-two"
v-if=
"detailData && detailData.voiceList && detailData.voiceList.length"
>
<free-audio
<free-audio
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
:isDel=
"false"
></free-audio>
audioId=
'audio1'
:url=
'detailData.voiceList[0].url'
:isDel=
"false"
></free-audio>
</view>
</view>
<view
class=
"noData-text"
v-else
>
暂无数据
</view>
</view>
</view>
<view
class=
"content-remarks"
>
<view
class=
"content-remarks"
>
<view
class=
""
>
<view
class=
""
>
...
@@ -63,7 +69,8 @@
...
@@ -63,7 +69,8 @@
<view
class=
"font-bold"
>
<view
class=
"font-bold"
>
<text></text>
订单已驳回
<text></text>
订单已驳回
</view>
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<!--
<u--textarea
v-model=
"detailData.value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
<!--
<u--textarea
v-model=
"detailData.value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
</view>
</view>
<view
class=
"content-reject"
v-if=
"subscript == 3 && detailData.status== 5"
>
<view
class=
"content-reject"
v-if=
"subscript == 3 && detailData.status== 5"
>
...
@@ -175,16 +182,12 @@
...
@@ -175,16 +182,12 @@
&
-frequency
{
&
-frequency
{
padding
:
30
rpx
0
rpx
;
padding
:
30
rpx
0
rpx
;
>view
{
.video-box
{
display
:
flex
;
>video
{
margin-top
:
20
rpx
;
margin-top
:
20
rpx
;
width
:
373
rpx
;
width
:
373
rpx
;
height
:
210
rpx
;
height
:
210
rpx
;
}
}
}
}
}
&
-voice
{
&
-voice
{
padding
:
30
rpx
0
rpx
;
padding
:
30
rpx
0
rpx
;
...
...
home/index/index.vue
View file @
0d4e104b
...
@@ -16,24 +16,23 @@
...
@@ -16,24 +16,23 @@
{{
orderDetail
&&
orderDetail
.
actualAmount
?
orderDetail
.
actualAmount
:
''
}}
{{
orderDetail
&&
orderDetail
.
actualAmount
?
orderDetail
.
actualAmount
:
''
}}
</view>
</view>
</view>
</view>
<view
class=
"content-photograph"
>
<view
class=
"content-photograph"
>
<view
class=
""
>
<view
class=
""
>
图片说明
图片说明
</view>
</view>
<view
class=
"content-photograph-photo"
>
<view
class=
"content-photograph-photo"
v-if=
"orderDetail && orderDetail.pictureList.length"
>
<image
class=
"content-photograph-photo-graph"
:src=
"v.url"
mode=
""
<image
class=
"content-photograph-photo-graph"
:src=
"v.url"
mode=
""
v-for=
"(v ,index) in orderDetail.
fileVos"
:key=
"v.id"
v-if=
"v.fileType == 'picture'
"
></image>
v-for=
"(v ,index) in orderDetail.
pictureList"
:key=
"v.id
"
></image>
</view>
</view>
<view
class=
"noData-text"
>
暂无数据
</view>
<view
v-else
class=
"noData-text"
>
暂无数据
</view>
</view>
</view>
<view
class=
"content-frequency"
>
<view
class=
"content-frequency"
>
<view
class=
""
>
<view
class=
""
>
视频说明
视频说明
</view>
</view>
<view
v-if=
"orderDetail && orderDetail.fileVos.length && v.fileType == 'video'"
v-for=
"(v ,index) in orderDetail.fileVos"
:key=
"v.id"
>
<view
v-if=
"orderDetail && orderDetail.videoList.length"
v-for=
"(v ,index) in orderDetail.videoList"
<video
v-if=
"v.fileType == 'video'"
id=
"myVideo"
:key=
"v.id"
>
:src=
"v.url"
<video
:src=
"v.url"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
controls
:show-fullscreen-btn=
'false'
></video>
:show-fullscreen-btn=
'false'
></video>
</view>
</view>
<view
class=
"noData-text"
>
暂无数据
</view>
<view
class=
"noData-text"
>
暂无数据
</view>
...
@@ -42,11 +41,11 @@
...
@@ -42,11 +41,11 @@
<view
class=
""
>
<view
class=
""
>
语音说明
语音说明
</view>
</view>
<view
class=
"margin-top-two"
>
<view
class=
"margin-top-two"
v-if=
"orderDetail && orderDetail.voiceList.length"
>
<free-audio
startPic=
'../../static/stopStatus.png'
endPic=
'../../static/startStatus.png'
audioId=
'audio1'
<free-audio
startPic=
'../../static/stopStatus.png'
endPic=
'../../static/startStatus.png'
:url=
'path'
:isDel=
"false"
></free-audio>
audioId=
'audio1'
:url=
'orderDetail.voiceList[0].url'
:isDel=
"false"
></free-audio>
<view
class=
"noData-text"
>
暂无数据
</view>
</view>
</view>
<view
v-else
class=
"noData-text"
>
暂无数据
</view>
<!--
<view
class=
"content-voice-audio"
@
click=
"doPlay()"
></view>
-->
<!--
<view
class=
"content-voice-audio"
@
click=
"doPlay()"
></view>
-->
</view>
</view>
<view
class=
"content-remarks"
>
<view
class=
"content-remarks"
>
...
@@ -67,7 +66,7 @@
...
@@ -67,7 +66,7 @@
import
apiBaseConfig
from
'@/config/index.js'
;
import
apiBaseConfig
from
'@/config/index.js'
;
import
freeAudio
from
'../../components/chengpeng-audio/free-audio.vue'
import
freeAudio
from
'../../components/chengpeng-audio/free-audio.vue'
export
default
{
export
default
{
components
:{
components
:
{
freeAudio
freeAudio
},
},
data
()
{
data
()
{
...
@@ -75,12 +74,12 @@
...
@@ -75,12 +74,12 @@
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
,
scrollTopHeader
:
0
,
orderDetail
:{},
orderDetail
:
{},
path
:
'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
path
:
'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
console
.
log
(
option
.
id
,
'结束'
)
console
.
log
(
option
.
id
,
'结束'
)
this
.
getDetailData
(
option
.
id
)
this
.
getDetailData
(
option
.
id
)
this
.
timer
=
null
;
this
.
timer
=
null
;
this
.
innerAudioContext
=
uni
.
createInnerAudioContext
();
this
.
innerAudioContext
=
uni
.
createInnerAudioContext
();
...
@@ -103,11 +102,16 @@
...
@@ -103,11 +102,16 @@
})
})
},
},
methods
:
{
methods
:
{
async
getDetailData
(
id
){
async
getDetailData
(
id
)
{
let
that
=
this
let
that
=
this
const
data_back
=
await
orderDetailMsgNew
({
id
:
id
})
const
data_back
=
await
orderDetailMsgNew
({
console
.
log
(
data_back
,
'返沪'
)
id
:
id
const
{
code
,
data
}
=
data_back
})
console
.
log
(
data_back
,
'返沪'
)
const
{
code
,
data
}
=
data_back
that
.
orderDetail
=
data
that
.
orderDetail
=
data
// orderDetailMsgNew({id:id}).then(res=>{
// orderDetailMsgNew({id:id}).then(res=>{
// console.log(res.data,'详情')
// console.log(res.data,'详情')
...
...
main.js
View file @
0d4e104b
...
@@ -30,12 +30,16 @@ import commentList from '@/components/comment/comment.vue'
...
@@ -30,12 +30,16 @@ import commentList from '@/components/comment/comment.vue'
Vue
.
component
(
'comment-list'
,
commentList
)
Vue
.
component
(
'comment-list'
,
commentList
)
// 时间过滤器
// 时间过滤器
Vue
.
filter
(
'formatDate'
,
date
=>
{
Vue
.
filter
(
"formatDate"
,
(
date
)
=>
{
let
newDate
=
new
Date
(
date
);
let
d
=
new
Date
(
date
);
let
year
=
newDate
.
getFullYear
();
let
month
=
(
d
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
d
.
getMonth
()
+
1
)
:
(
d
.
getMonth
()
+
1
);
let
month
=
newDate
.
getMonth
().
toString
().
padStart
(
2
,
0
);
let
day
=
d
.
getDate
()
<
10
?
'0'
+
d
.
getDate
()
:
d
.
getDate
();
let
day
=
newDate
.
getDay
().
toString
().
padStart
(
2
,
0
);
let
hours
=
d
.
getHours
()
<
10
?
'0'
+
d
.
getHours
()
:
d
.
getHours
();
return
year
+
'-'
+
month
+
'-'
+
day
;
let
min
=
d
.
getMinutes
()
<
10
?
'0'
+
d
.
getMinutes
()
:
d
.
getMinutes
();
let
sec
=
d
.
getSeconds
()
<
10
?
'0'
+
d
.
getSeconds
()
:
d
.
getSeconds
();
let
times
;
times
=
d
.
getFullYear
()
+
'-'
+
month
+
'-'
+
day
;
return
times
})
})
uni
.
$u
.
setConfig
({
uni
.
$u
.
setConfig
({
config
:
{
config
:
{
...
...
my/coupon/index.vue
View file @
0d4e104b
<
template
>
<
template
>
<view
class=
"index"
>
<view
class=
"index"
>
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<view
class=
"index-content"
>
<view
class=
"index-content"
v-if=
"useCouponList.length && couponLoseList.length"
>
<view
class=
"index-content-item"
v-for=
"(item,index) in useCouponList"
>
<view
class=
"index-content-item"
v-for=
"(item,index) in useCouponList"
>
<view
class=
"index-content-item-nav baiyin-flex baiyin-flex-c-b"
>
<view
class=
"index-content-item-nav baiyin-flex baiyin-flex-c-b"
>
<text></text>
<text></text>
...
@@ -66,6 +66,12 @@
...
@@ -66,6 +66,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无优惠券
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -395,5 +401,21 @@
...
@@ -395,5 +401,21 @@
}
}
}
}
}
}
.diagram
{
text-align
:
center
;
margin-top
:
335
rpx
;
>image
{
width
:
396
rpx
;
height
:
243
rpx
;
}
>
view
{
margin-top
:
20
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#444444
;
}
}
}
}
</
style
>
</
style
>
order/detail/detail.vue
View file @
0d4e104b
...
@@ -2,10 +2,8 @@
...
@@ -2,10 +2,8 @@
<view>
<view>
<view
style=
"padding-bottom: 100rpx;"
>
<view
style=
"padding-bottom: 100rpx;"
>
<view
class=
"padding-x-four d-flex flex-wrap j-sb flex-content"
>
<view
class=
"padding-x-four d-flex flex-wrap j-sb flex-content"
>
<view
v-for=
"item in 5"
>
<view
v-for=
"(item,index) in articleData.fileVos"
@
click=
"handlePreview(item,index)"
>
<image
class=
"evaluateListImgItem"
<image
class=
"evaluateListImgItem"
:src=
"item.url"
mode=
"scaleToFill"
></image>
src=
"https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
mode=
"scaleToFill"
></image>
</view>
</view>
</view>
</view>
<view
class=
"paddding-x-two"
>
<view
class=
"paddding-x-two"
>
...
@@ -13,10 +11,9 @@
...
@@ -13,10 +11,9 @@
<view
class=
"evaluate-title"
>
{{
articleData
.
title
}}
</view>
<view
class=
"evaluate-title"
>
{{
articleData
.
title
}}
</view>
<view
class=
"d-flex a-center j-sb margin-top-two"
>
<view
class=
"d-flex a-center j-sb margin-top-two"
>
<view
class=
"d-flex a-center"
>
<view
class=
"d-flex a-center"
>
<image
class=
"img"
<image
class=
"img"
src=
"../../static/logoLogin.png"
mode=
"widthFix"
></image>
src=
"https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
<view
class=
"evaluate-name"
>
{{
articleData
.
createUser
?
articleData
.
createUser
:
'官方发布'
}}
mode=
"widthFix"
></image>
</view>
<view
class=
"evaluate-name"
>
{{
articleData
.
createUser
?
articleData
.
createUser
:
'官方'
}}
</view>
</view>
</view>
<view
class=
"eval-time"
>
发布于
{{
articleData
.
createTime
|
formatDate
}}
</view>
<view
class=
"eval-time"
>
发布于
{{
articleData
.
createTime
|
formatDate
}}
</view>
...
@@ -24,7 +21,7 @@
...
@@ -24,7 +21,7 @@
<view
class=
"evaluateText text-indent"
v-html=
"articleData.content"
></view>
<view
class=
"evaluateText text-indent"
v-html=
"articleData.content"
></view>
</view>
</view>
</view>
</view>
<view
class=
"bgWhite"
>
<view
class=
"bgWhite"
v-if=
"userEvalList.length"
>
<view
class=
"padding-aval"
>
<view
class=
"padding-aval"
>
<comment-list
:personEvalList=
"userEvalList"
></comment-list>
<comment-list
:personEvalList=
"userEvalList"
></comment-list>
</view>
</view>
...
@@ -41,21 +38,25 @@
...
@@ -41,21 +38,25 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
articleDetail
,
userEvaluateGet
,
addUserEvaluate
}
from
'../../api/order/index.js'
import
{
articleDetail
,
userEvaluateGet
,
addUserEvaluate
}
from
'../../api/order/index.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
articleData
:{},
articleData
:
{},
userQuery
:{
userQuery
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
articleId
:
null
articleId
:
null
},
},
userEvalList
:[],
userEvalList
:
[],
evalQuery
:{
evalQuery
:
{
content
:
''
,
//评论的内容
content
:
''
,
//评论的内容
articleId
:
''
,
//文章id
articleId
:
''
,
//文章id
deleteStatus
:
0
deleteStatus
:
0
}
}
}
}
},
},
...
@@ -64,55 +65,69 @@
...
@@ -64,55 +65,69 @@
this
.
getUserEvalList
(
option
.
id
)
this
.
getUserEvalList
(
option
.
id
)
},
},
methods
:
{
methods
:
{
getDetail
(
id
){
getDetail
(
id
)
{
let
that
=
this
let
that
=
this
articleDetail
(
id
).
then
(
res
=>
{
articleDetail
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
that
.
articleData
=
res
.
data
that
.
articleData
=
res
.
data
}
}
})
})
},
},
getUserEvalList
(
id
){
getUserEvalList
(
id
)
{
let
that
=
this
let
that
=
this
that
.
userQuery
.
articleId
=
id
that
.
userQuery
.
articleId
=
id
userEvaluateGet
(
that
.
userQuery
).
then
(
res
=>
{
userEvaluateGet
(
that
.
userQuery
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
if
(
res
.
total
>
0
)
{
this
.
userEvalList
=
res
.
rows
this
.
userEvalList
=
res
.
rows
}
}
}
}
})
})
},
},
async
handleSend
(){
async
handleSend
()
{
let
that
=
this
let
that
=
this
if
(
that
.
evalQuery
.
content
)
{
if
(
that
.
evalQuery
.
content
)
{
that
.
$set
(
that
.
evalQuery
,
'content'
,
that
.
evalQuery
.
content
.
trim
())
that
.
$set
(
that
.
evalQuery
,
'content'
,
that
.
evalQuery
.
content
.
trim
())
that
.
$set
(
that
.
evalQuery
,
'articleId'
,
that
.
articleData
.
id
)
that
.
$set
(
that
.
evalQuery
,
'articleId'
,
that
.
articleData
.
id
)
const
data_back
=
await
addUserEvaluate
(
that
.
evalQuery
)
const
data_back
=
await
addUserEvaluate
(
that
.
evalQuery
)
const
{
code
}
=
data_back
const
{
if
(
code
===
200
){
code
}
=
data_back
if
(
code
===
200
)
{
that
.
evalQuery
.
content
=
''
that
.
evalQuery
.
content
=
''
uni
.
showToast
({
uni
.
showToast
({
title
:
'评论成功!'
,
title
:
'评论成功!'
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
2000
,
duration
:
2000
,
success
()
{
success
()
{
let
clearTime
=
setTimeout
(()
=>
{
let
clearTime
=
setTimeout
(()
=>
{
clearTimeout
(
clearTime
)
clearTimeout
(
clearTime
)
that
.
$uniGo
.
navigateBack
({
that
.
$uniGo
.
navigateBack
({
delta
:
1
delta
:
1
})
})
},
1000
)
},
1000
)
}
}
})
})
}
}
}
else
{
}
else
{
return
uni
.
showToast
({
return
uni
.
showToast
({
title
:
'不可发布空白内容'
,
title
:
'不可发布空白内容'
,
icon
:
'none'
icon
:
'none'
})
})
}
}
},
//图片预览
handlePreview
(
item
,
index
)
{
let
that
=
this
var
photoList
=
that
.
articleData
.
fileVos
.
map
(
item
=>
{
// item 获取到的图片地址
return
item
.
url
;
});
uni
.
previewImage
({
current
:
index
,
urls
:
photoList
,
loop
:
true
})
}
}
}
}
}
}
...
...
pages/demand/components/index.vue
View file @
0d4e104b
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
已沟通审核通过,待支付
<text>
{{
item
.
actualAmount
?
item
.
actualAmount
:
0
}}
元
</text>
已沟通审核通过,待支付
<text>
{{
item
.
actualAmount
?
item
.
actualAmount
:
0
}}
元
</text>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
截止1小时内支付完成
<text>
{{
isEndTime
}}
</text>
截止1小时内支付完成
<text
v-if=
"isEndTime"
>
{{
isEndTime
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
""
@
click
.
stop=
"payment(item)"
>
<view
class=
""
@
click
.
stop=
"payment(item)"
>
...
@@ -47,7 +47,8 @@
...
@@ -47,7 +47,8 @@
</view>
</view>
<!-- // 已接单 -->
<!-- // 已接单 -->
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-else-if=
"item.status == 6"
class=
"buttonclde buttonGray"
<button
v-else-if=
"item.status == 6"
class=
"buttonclde buttonGray"
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
...
@@ -78,36 +79,60 @@
...
@@ -78,36 +79,60 @@
data
()
{
data
()
{
return
{
return
{
timer
:
""
,
//定时器
timer
:
""
,
//定时器
isEndTime
:
"
01:00:00
"
,
//倒计时要有个初始值
isEndTime
:
""
,
//倒计时要有个初始值
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
globalData
:
getApp
().
globalData
,
show
:
false
,
show
:
false
,
title
:
'确认取消订单吗'
,
title
:
'确认取消订单吗'
,
titbut
:
'取消订单'
,
titbut
:
'取消订单'
,
currentId
:
''
,
//当前的id
currentId
:
''
,
//当前的id
actualAmount
:
0
,
//实付金饿
actualAmount
:
0
,
//实付金额
countdownh
:
''
,
countdownm
:
''
,
countdowns
:
''
,
timer
:
null
,
//重复执行
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
subscript
==
2
){
this
.
list
.
map
(
item
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
this
.
countDown
(
)
this
.
showtime
(
item
.
modifyTime
)
},
1000
)
},
1000
)
})
}
},
},
methods
:
{
methods
:
{
// 1小时倒计时
showtime
(
modifyTime
)
{
countDown
()
{
//获取当前时间
let
allTime
=
0
;
var
curTime
=
new
Date
();
let
h
=
this
.
isEndTime
.
substring
(
0
,
2
);
var
curTimeDate
=
curTime
.
getTime
();
//当前时间戳
let
m
=
this
.
isEndTime
.
substring
(
3
,
5
);
// 发起支付的时间
let
s
=
this
.
isEndTime
.
substring
(
6
,
8
);
var
startTime
=
new
Date
(
modifyTime
);
allTime
=
Number
(
h
)
*
60
*
60
+
Number
(
m
)
*
60
+
Number
(
s
);
// 发起支付的时间+1小时
if
(
allTime
<=
0
)
return
clearInterval
(
this
.
timer
);
//执行倒计时结束逻辑
var
addHour
=
startTime
.
setHours
(
startTime
.
getHours
()
+
1
)
allTime
--
;
console
.
log
(
addHour
,
'大伤脑筋'
)
h
=
parseInt
(
allTime
/
3600
)
<
10
?
'0'
+
String
(
parseInt
(
allTime
/
3600
))
:
parseInt
(
allTime
/
3600
);
console
.
log
(
new
Date
(
addHour
),
'大伤脑筋111'
)
m
=
parseInt
(
allTime
/
60
)
<
10
?
'0'
+
String
(
parseInt
(
allTime
/
60
))
:
parseInt
(
allTime
/
60
);
var
lefttime
=
addHour
-
curTimeDate
,
s
=
allTime
%
60
<
10
?
'0'
+
String
(
allTime
%
60
)
:
allTime
%
60
;
leftd
=
Math
.
floor
(
lefttime
/
(
1000
*
60
*
60
*
24
)),
//计算天数
this
.
isEndTime
=
h
+
":"
+
m
+
":"
+
s
;
lefth
=
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
<
10
?
"0"
+
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
)
:
Math
.
floor
((
lefttime
/
(
1000
*
60
*
60
)
%
24
)
+
leftd
*
24
),
//计算小时数
leftm
=
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
)
<
10
?
"0"
+
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
)
:
Math
.
floor
(
lefttime
/
(
1000
*
60
)
%
60
),
//计算分钟数
lefts
=
Math
.
floor
(
lefttime
/
1000
%
60
)
<
10
?
"0"
+
Math
.
floor
(
lefttime
/
1000
%
60
)
:
Math
.
floor
(
lefttime
/
1000
%
60
);
//计算秒数
this
.
countdownh
=
lefth
//返回倒计时的字符串
this
.
countdownm
=
leftm
//返回倒计时的字符串
this
.
countdowns
=
lefts
//返回倒计时的字符串
// 倒计时结束时,显示00:00:00
if
(
lefttime
<
0
)
{
this
.
countdownh
=
this
.
countdownm
=
this
.
countdowns
=
"00"
}
this
.
isEndTime
=
this
.
countdownh
+
'时'
+
this
.
countdownm
+
'分'
+
this
.
countdowns
+
'秒'
},
},
// 跳转详情页
// 跳转详情页
jump
(
data
)
{
jump
(
data
)
{
...
@@ -276,7 +301,8 @@
...
@@ -276,7 +301,8 @@
color
:
#FD0100
;
color
:
#FD0100
;
line-height
:
44
rpx
;
line-height
:
44
rpx
;
}
}
.buttonGray
{
.buttonGray
{
border
:
1
rpx
solid
#666666
!important
;
border
:
1
rpx
solid
#666666
!important
;
color
:
#666666
!important
;
color
:
#666666
!important
;
}
}
...
...
pages/home/index.vue
View file @
0d4e104b
...
@@ -107,15 +107,26 @@
...
@@ -107,15 +107,26 @@
onReachBottom
()
{
onReachBottom
()
{
let
that
=
this
let
that
=
this
if
(
that
.
total
<
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
nomore
=
'nomore'
if
(
that
.
total
<
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
nomore
=
'nomore'
that
.
queryParams
.
pageNum
++
that
.
getSquare
()
},
},
methods
:
{
methods
:
{
getSquare
(){
getSquare
(){
let
that
=
this
userNeedSquare
(
this
.
queryParams
).
then
(
res
=>
{
userNeedSquare
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
,
'需求广场'
)
console
.
log
(
res
,
'需求广场'
)
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
if
(
res
.
total
>
0
){
if
(
res
.
total
>
0
){
this
.
userNeedList
=
res
.
rows
that
.
total
=
res
.
total
this
.
total
=
res
.
total
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
){
that
.
loadStatus
=
'nomore'
}
if
(
that
.
queryParams
.
pageNum
==
1
){
that
.
userNeedList
=
res
.
rows
}
else
{
that
.
userNeedList
=
[...
that
.
userNeedList
,...
res
.
rows
]
}
}
}
}
}
})
})
...
...
pages/my/index.vue
View file @
0d4e104b
...
@@ -4,15 +4,18 @@
...
@@ -4,15 +4,18 @@
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }">
</view>
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }">
</view>
<view
class=
"content-in"
>
<view
class=
"content-in"
>
<view
class=
"content-in-info baiyin-flex baiyin-flex-c-b"
>
<view
class=
"content-in-info baiyin-flex baiyin-flex-c-b"
>
<button
class=
"content-in-info-l"
type=
"balanced"
open-type=
"chooseAvatar"
@
chooseavatar=
"onChooseavatar"
>
<button
class=
"content-in-info-l"
type=
"balanced"
open-type=
"chooseAvatar"
@
chooseavatar=
"onChooseavatar"
>
<image
v-if=
"!headImgUrl"
src=
"@/static/icon/my03.png"
mode=
""
></image>
<image
v-if=
"!headImgUrl"
src=
"@/static/icon/my03.png"
mode=
""
></image>
<image
v-else
:src=
"headImgUrl"
mode=
""
></image>
<image
v-else
:src=
"headImgUrl"
mode=
""
></image>
</button>
</button>
<view
v-if=
"token"
class=
"content-in-info-r
"
>
<view
v-if=
"token"
class=
"content-in-info-r
flex-1"
>
<view
class=
"content-in-info-r-t baiyin-flex"
>
<view
class=
"content-in-info-r-t baiyin-flex"
>
<text
v-if=
"nameDisabled"
>
{{
nickname
}}
</text>
<text
class=
"flex-1"
v-if=
"nameDisabled"
>
{{
nickname
}}
</text>
<input
v-else
confirm-type=
"确定"
@
confirm=
"inputNameConfirm"
maxlength=
"15"
type=
"text"
:value=
"nickname"
/>
<input
v-else
confirm-type=
"确定"
@
confirm=
"inputNameConfirm"
maxlength=
"15"
type=
"text"
:value=
"nickname"
/>
<image
src=
"@/static/icon/my02.png"
mode=
""
@
click=
"nameDisabled = !nameDisabled"
></image>
<image
src=
"@/static/icon/my02.png"
mode=
""
@
click=
"nameDisabled = !nameDisabled"
></image>
</view>
</view>
<view
class=
"content-in-info-r-b"
v-if=
"mobile"
>
手机号:
{{
mobile
}}
</view>
<view
class=
"content-in-info-r-b"
v-if=
"mobile"
>
手机号:
{{
mobile
}}
</view>
</view>
</view>
...
@@ -20,7 +23,8 @@
...
@@ -20,7 +23,8 @@
未登录
未登录
</view>
</view>
</view>
</view>
<view
class=
"content-in-item baiyin-flex baiyin-flex-c-sb baiyin-flex-c-b"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"index != 0 ? clickJumpNPage(item) : null"
>
<view
class=
"content-in-item baiyin-flex baiyin-flex-c-sb baiyin-flex-c-b"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"index != 0 ? clickJumpNPage(item) : null"
>
<!-- 联系客服生成 -->
<!-- 联系客服生成 -->
<button
class=
"content-in-item-btn"
v-if=
"index === 0"
open-type=
"contact"
></button>
<button
class=
"content-in-item-btn"
v-if=
"index === 0"
open-type=
"contact"
></button>
<view
class=
"baiyin-flex baiyin-flex-c-b"
>
<view
class=
"baiyin-flex baiyin-flex-c-b"
>
...
@@ -30,22 +34,18 @@
...
@@ -30,22 +34,18 @@
<image
src=
"@/static/icon/my09.png"
mode=
""
></image>
<image
src=
"@/static/icon/my09.png"
mode=
""
></image>
</view>
</view>
<view
class=
"content-in-btn"
@
click=
"handleLogin"
>
<view
class=
"content-in-btn"
@
click=
"handleLogin"
>
<u-button
<u-button
:text=
"token ? '退出登录' : '登录'"
color=
"#EA654E"
:customStyle=
"
{
:text=
"token ? '退出登录' : '登录'"
color=
"#EA654E"
:customStyle=
"
{
width: '560rpx',
width: '560rpx',
height: '80rpx',
height: '80rpx',
borderRadius: '10rpx',
borderRadius: '10rpx',
padding: '0rpx',
padding: '0rpx',
margin: '178rpx 0rpx 0rpx 65rpx'
margin: '178rpx 0rpx 0rpx 65rpx'
}"
}">
</u-button>
>
</u-button>
</view>
</view>
</view>
</view>
<com-navbar
:leftIcon=
"false"
bgColor=
"transparent"
title=
"我的"
:titleStyle=
"
{ color: '#ffffff', fontSize: '34rpx' }" />
<com-navbar
:leftIcon=
"false"
bgColor=
"transparent"
title=
"我的"
<com-tabbar
:titleStyle=
"
{ color: '#ffffff', fontSize: '34rpx' }" />
:list=
"[
<com-tabbar
:list=
"[
{
{
name: '首页',
name: '首页',
icon: '/static/tabbar/tb1.png',
icon: '/static/tabbar/tb1.png',
...
@@ -81,26 +81,28 @@
...
@@ -81,26 +81,28 @@
url: '',
url: '',
type: 'myCenter'
type: 'myCenter'
}
}
]"
]" />
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
apiBaseConfig
from
'@/config/index.js'
;
import
apiBaseConfig
from
'@/config/index.js'
;
import
{
mapMutations
}
from
'vuex'
;
import
{
import
{
updateUserMsg
}
from
'@/api/system/index.js'
mapMutations
export
default
{
}
from
'vuex'
;
import
{
updateUserMsg
}
from
'@/api/system/index.js'
export
default
{
data
()
{
data
()
{
return
{
return
{
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
,
scrollTopHeader
:
0
,
nameDisabled
:
true
,
nameDisabled
:
true
,
nickname
:
'用户名称'
,
nickname
:
'用户名称'
,
mobile
:
''
,
//手机号
mobile
:
''
,
//手机号
list
:
[
list
:
[{
{
icon
:
require
(
'@/static/icon/my04.png'
),
icon
:
require
(
'@/static/icon/my04.png'
),
title
:
'联系客服'
title
:
'联系客服'
},
},
...
@@ -125,35 +127,40 @@ export default {
...
@@ -125,35 +127,40 @@ export default {
url
:
'/my/coupon/index?type=coupon'
url
:
'/my/coupon/index?type=coupon'
}
}
],
],
token
:
''
,
token
:
''
,
uploadUrl
:
apiBaseConfig
.
upload
,
uploadUrl
:
apiBaseConfig
.
upload
,
headImgUrl
:
''
headImgUrl
:
''
};
};
},
},
onLoad
()
{
onLoad
()
{
let
that
=
this
let
that
=
this
console
.
log
(
that
.
$store
.
state
.
login
.
userInfo
.
user
,
'打死你'
)
console
.
log
(
that
.
$store
.
state
.
login
.
userInfo
.
user
,
'打死你'
)
if
(
that
.
$store
.
state
.
login
.
userInfo
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
){
if
(
that
.
$store
.
state
.
login
.
userInfo
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
)
{
that
.
nickname
=
that
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
that
.
nickname
=
that
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
}
}
if
(
that
.
$store
.
state
.
login
.
userInfo
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
.
headImgUrl
){
if
(
that
.
$store
.
state
.
login
.
userInfo
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
&&
that
.
$store
.
state
.
login
.
userInfo
.
user
.
headImgUrl
)
{
that
.
headImgUrl
=
that
.
$store
.
state
.
login
.
userInfo
.
user
.
headImgUrl
that
.
headImgUrl
=
that
.
$store
.
state
.
login
.
userInfo
.
user
.
headImgUrl
}
}
let
token
=
uni
.
getStorageSync
(
'token'
)
let
token
=
uni
.
getStorageSync
(
'token'
)
console
.
log
(
'token'
,
token
)
console
.
log
(
'token'
,
token
)
if
(
token
){
if
(
token
)
{
that
.
token
=
token
that
.
token
=
token
}
}
let
mobile
=
uni
.
getStorageSync
(
'mobile'
)
let
mobile
=
uni
.
getStorageSync
(
'mobile'
)
that
.
mobile
=
mobile
that
.
mobile
=
mobile
},
},
methods
:
{
methods
:
{
...
mapMutations
([
'upDateUserInfoMount'
]),
onChooseavatar
(
e
)
{
onChooseavatar
(
e
)
{
console
.
log
(
e
,
'1211'
);
console
.
log
(
e
,
'1211'
);
// return;
// return;
let
that
=
this
;
let
that
=
this
;
const
{
avatarUrl
}
=
e
.
detail
;
const
{
avatarUrl
}
=
e
.
detail
;
that
.
fdsa
=
avatarUrl
;
that
.
fdsa
=
avatarUrl
;
that
.
uploadFilePromise
(
avatarUrl
)
that
.
uploadFilePromise
(
avatarUrl
)
},
},
...
@@ -171,7 +178,10 @@ export default {
...
@@ -171,7 +178,10 @@ export default {
const
{
const
{
data
data
}
=
JSON
.
parse
(
res
.
data
);
}
=
JSON
.
parse
(
res
.
data
);
that
.
updateUser
({
headImgUrl
:
data
.
url
})
this
.
headImgUrl
=
data
.
url
that
.
updateUser
({
headImgUrl
:
data
.
url
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
resolve
(
data
.
url
)
resolve
(
data
.
url
)
...
@@ -183,18 +193,23 @@ export default {
...
@@ -183,18 +193,23 @@ export default {
inputNameConfirm
(
e
)
{
inputNameConfirm
(
e
)
{
console
.
log
(
'======inputNameConfirm:'
,
e
.
detail
.
value
);
console
.
log
(
'======inputNameConfirm:'
,
e
.
detail
.
value
);
let
that
=
this
let
that
=
this
this
.
updateUser
({
nickname
:
e
.
detail
.
value
})
this
.
updateUser
({
nickname
:
e
.
detail
.
value
})
},
},
async
updateUser
(
data
)
{
async
updateUser
(
data
)
{
let
that
=
this
let
that
=
this
const
back_data
=
await
updateUserMsg
(
data
)
const
back_data
=
await
updateUserMsg
(
data
)
console
.
log
(
back_data
)
console
.
log
(
back_data
)
const
{
code
}
=
back_data
const
{
if
(
code
===
200
){
code
}
=
back_data
if
(
code
===
200
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'修改成功!'
,
title
:
'修改成功!'
,
icon
:
'none'
icon
:
'none'
})
})
that
.
upDateUserInfoMount
()
}
}
},
},
clickJumpNPage
(
row
)
{
clickJumpNPage
(
row
)
{
...
@@ -204,15 +219,15 @@ export default {
...
@@ -204,15 +219,15 @@ export default {
});
});
}
}
},
},
handleLogin
(){
handleLogin
()
{
if
(
this
.
token
){
if
(
this
.
token
)
{
uni
.
showModal
({
uni
.
showModal
({
content
:
'是否要退出登录'
,
content
:
'是否要退出登录'
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'退出成功!'
,
title
:
'退出成功!'
,
icon
:
'none'
icon
:
'none'
})
})
//执行退出
//执行退出
uni
.
clearStorageSync
()
uni
.
clearStorageSync
()
...
@@ -220,24 +235,24 @@ export default {
...
@@ -220,24 +235,24 @@ export default {
}
}
}
}
})
})
}
else
{
}
else
{
this
.
$uniGo
.
navigateTo
({
this
.
$uniGo
.
navigateTo
({
url
:
'/my/login/login'
url
:
'/my/login/login'
})
})
}
}
}
}
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
page
{
page
{
background-color
:
#f7f8f9
;
background-color
:
#f7f8f9
;
}
}
</
style
>
</
style
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.content
{
.content
{
&-bg
{
&-bg
{
width
:
100%
;
width
:
100%
;
height
:
340
rpx
;
height
:
340
rpx
;
...
@@ -246,14 +261,17 @@ page {
...
@@ -246,14 +261,17 @@ page {
left
:
0%
;
left
:
0%
;
z-index
:
-1
;
z-index
:
-1
;
}
}
&
-in
{
&
-in
{
width
:
calc
(
100%
-
30
rpx
*
2
);
width
:
calc
(
100%
-
30
rpx
*
2
);
margin
:
0
rpx
30
rpx
0
;
margin
:
0
rpx
30
rpx
0
;
&-info
{
&-info
{
padding
:
35
rpx
30
rpx
;
padding
:
35
rpx
30
rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
14
rpx
;
border-radius
:
14
rpx
;
margin-bottom
:
16
rpx
;
margin-bottom
:
16
rpx
;
&-l
{
&-l
{
width
:
120
rpx
;
width
:
120
rpx
;
height
:
120
rpx
;
height
:
120
rpx
;
...
@@ -262,18 +280,22 @@ page {
...
@@ -262,18 +280,22 @@ page {
border
:
none
;
border
:
none
;
outline
:
none
;
outline
:
none
;
background
:
transparent
;
background
:
transparent
;
image
{
image
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
border-radius
:
50%
;
border-radius
:
50%
;
}
}
}
}
&
-l
::after
{
&
-l
::after
{
border
:
none
;
border
:
none
;
}
}
&
-r
{
&
-r
{
&-t
{
&-t
{
margin-bottom
:
17
rpx
;
margin-bottom
:
17
rpx
;
input,
input,
text
{
text
{
font-size
:
36
rpx
;
font-size
:
36
rpx
;
...
@@ -282,12 +304,14 @@ page {
...
@@ -282,12 +304,14 @@ page {
color
:
#666666
;
color
:
#666666
;
margin-right
:
34
rpx
;
margin-right
:
34
rpx
;
}
}
image
{
image
{
width
:
32
rpx
;
width
:
32
rpx
;
height
:
32
rpx
;
height
:
32
rpx
;
margin-top
:
5
rpx
;
margin-top
:
5
rpx
;
}
}
}
}
&
-b
{
&
-b
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
AlibabaPuHuiTi-Regular
,
AlibabaPuHuiTi
;
font-family
:
AlibabaPuHuiTi-Regular
,
AlibabaPuHuiTi
;
...
@@ -296,6 +320,7 @@ page {
...
@@ -296,6 +320,7 @@ page {
}
}
}
}
}
}
&
-item
{
&
-item
{
padding
:
26
rpx
22
rpx
;
padding
:
26
rpx
22
rpx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
...
@@ -303,6 +328,7 @@ page {
...
@@ -303,6 +328,7 @@ page {
box-shadow
:
0
rpx
0
rpx
6
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.05
);
box-shadow
:
0
rpx
0
rpx
6
rpx
0
rpx
rgba
(
0
,
0
,
0
,
0.05
);
margin-bottom
:
16
rpx
;
margin-bottom
:
16
rpx
;
position
:
relative
;
position
:
relative
;
&-btn
{
&-btn
{
position
:
absolute
;
position
:
absolute
;
top
:
0%
;
top
:
0%
;
...
@@ -315,19 +341,23 @@ page {
...
@@ -315,19 +341,23 @@ page {
background
:
transparent
;
background
:
transparent
;
border-radius
:
10
rpx
;
border-radius
:
10
rpx
;
}
}
&
-btn
::after
{
&
-btn
::after
{
outline
:
none
;
outline
:
none
;
border
:
none
;
border
:
none
;
}
}
>
image
{
>
image
{
width
:
34
rpx
;
width
:
34
rpx
;
height
:
34
rpx
;
height
:
34
rpx
;
}
}
>
view
{
>
view
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
AlibabaPuHuiTi-Regular
,
AlibabaPuHuiTi
;
font-family
:
AlibabaPuHuiTi-Regular
,
AlibabaPuHuiTi
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#333333
;
color
:
#333333
;
image
{
image
{
margin-right
:
12
rpx
;
margin-right
:
12
rpx
;
width
:
28
rpx
;
width
:
28
rpx
;
...
@@ -335,9 +365,10 @@ page {
...
@@ -335,9 +365,10 @@ page {
}
}
}
}
}
}
&
-item
:last-child
{
&
-item
:last-child
{
margin-bottom
:
0
rpx
;
margin-bottom
:
0
rpx
;
}
}
}
}
}
}
</
style
>
</
style
>
pages/order/index.vue
View file @
0d4e104b
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
暂无数据
暂无数据
</view>
</view>
</view>
</view>
<u-loadmore
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"#fff"
title=
"动态"
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"#fff"
title=
"动态"
:titleStyle=
"
{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
:titleStyle=
"
{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<com-tabbar
:list=
" [
{
<com-tabbar
:list=
" [
{
...
@@ -63,57 +65,14 @@
...
@@ -63,57 +65,14 @@
},
},
articleList
:[],
//文章列表
articleList
:[],
//文章列表
total
:
0
,
//总数
total
:
0
,
//总数
loadStatus
:
'loading'
,
//加载时的状态(loadmore/ loading / nomore)
evaluateList
:
[{
loadingText
:
'正在加载'
,
name
:
'马保国'
,
nomoreText
:
'已经到底了'
image
:
'https://slzh-oss.oss-cn-beijing.aliyuncs.com/usercenter/template/2c94809a787cec070179e01ec0ba02a9.jpg'
,
time
:
'2021.06.06'
,
content
:
'服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵服务好,景色好,山河锦绣,树木茂盛,空气清新,鸟语花香,人杰地灵'
,
imageList
:
[{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
{
url
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
},
]
}],
personEvalList
:
[{
avatar
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李哈哈'
,
date
:
'2022-01-31'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar
:
'https://img1.baidu.com/it/u=3486651663,3991438881&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李小乖'
,
date
:
'2022-05-11'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
{
avatar
:
'https://img2.baidu.com/it/u=955956276,3392954639&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
,
nickname
:
'李哈哈'
,
date
:
'2022-01-31'
,
content
:
'评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容'
},
]
}
}
},
},
onReachBottom
()
{
onReachBottom
()
{
let
that
=
this
let
that
=
this
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
if
(
that
.
total
<=
that
.
queryParams
.
pageNum
*
that
.
queryParams
.
pageSize
)
return
that
.
loadStatus
=
'nomore'
that
.
queryParams
.
pageNum
++
that
.
queryParams
.
pageNum
++
that
.
getArticleList
()
that
.
getArticleList
()
},
},
...
@@ -126,8 +85,17 @@
...
@@ -126,8 +85,17 @@
const
data_back
=
await
userArticleGet
(
that
.
queryParams
);
const
data_back
=
await
userArticleGet
(
that
.
queryParams
);
const
{
code
,
total
,
rows
}
=
data_back
;
const
{
code
,
total
,
rows
}
=
data_back
;
if
(
code
===
200
&&
total
>
0
)
{
if
(
code
===
200
&&
total
>
0
)
{
that
.
articleList
=
rows
that
.
total
=
total
that
.
total
=
total
if
(
that
.
total
<
that
.
queryParams
.
pageSize
){
that
.
loadStatus
=
'nomore'
}
else
{
that
.
loadStatus
=
'loading'
}
if
(
that
.
queryParams
.
pageNum
==
1
){
that
.
articleList
=
rows
}
else
{
that
.
articleList
=
[...
that
.
articleList
,...
rows
]
}
}
}
},
},
...
...
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