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
6c7ad2f9
Commit
6c7ad2f9
authored
Apr 06, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传图片,视频,
parent
5d1921cb
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
225 additions
and
129 deletions
+225
-129
api/system/index.js
+6
-1
api/user.js
+2
-2
components/form.vue
+64
-33
components/record/record.vue
+40
-2
components/upload/aIndex.vue
+33
-13
demand/index/index.vue
+1
-1
demand/updateForm/updateForm.vue
+19
-5
my/login/login.vue
+31
-58
package.json
+4
-4
pages/demand/components/index.vue
+2
-2
pages/demand/index.vue
+3
-1
pages/my/index.vue
+18
-5
static/recordIcon/goon.png
+0
-0
utils/request.js
+2
-2
No files found.
api/system/index.js
View file @
6c7ad2f9
...
...
@@ -2,13 +2,17 @@ import {
ApiHttp
}
from
'@/utils/request.js'
//修改微信用户
const
updateUserMsg
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/wxUser'
,
params
,
'PUT'
)
}
//用户需求广场
const
userNeedSquare
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/userDemandSquare'
,
params
,
'GET'
)
}
// 获取订单列表
const
orderDetailList
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/list'
,
params
,
'GET'
)
return
ApiHttp
(
'/xinrenli/order/list
User
'
,
params
,
'GET'
)
}
// 获取订单详细信息
...
...
@@ -45,6 +49,7 @@ const removeOrderFunction = (params) =>{
}
export
{
updateUserMsg
,
userNeedSquare
,
orderDetailList
,
orderDetailMsg
,
...
...
api/user.js
View file @
6c7ad2f9
...
...
@@ -7,7 +7,7 @@ const login = (params) => {
}
// 获取手机号
const
loginPhone
=
(
params
)
=>
{
return
ApiHttp
(
'/xcxPhoneLogin'
,
params
,
'
POS
T'
)
return
ApiHttp
(
'/xcxPhoneLogin'
,
params
,
'
GE
T'
)
}
const
loginOut
=
(
params
)
=>
{
...
...
@@ -15,7 +15,7 @@ const loginOut = (params) => {
}
const
loginUserInfo
=
(
params
)
=>
{
return
ApiHttp
(
'/
system/by-wx-user/getUser
Info'
,
params
,
'GET'
)
return
ApiHttp
(
'/
get
Info'
,
params
,
'GET'
)
}
const
getDealerPhone
=
(
params
)
=>
{
return
ApiHttp
(
'/system/getDealerPhone'
,
params
,
'POST'
)
...
...
components/form.vue
View file @
6c7ad2f9
...
...
@@ -56,7 +56,7 @@
<view
class=
"form-tips"
>
以下内容三选一必填
</view>
</view>
<view
class=
""
>
<comUpload></comUpload>
<comUpload
v-model=
"formInfo.pictureList"
@
getVal=
"getPhotoList"
ref=
"photoRef"
></comUpload>
</view>
</view>
<view>
...
...
@@ -64,7 +64,8 @@
<view
class=
"form-item-name"
>
上传视频
</view>
</view>
<view
class=
""
>
<comUpload
:acceptType=
"acceptType"
></comUpload>
<comUpload
@
getVal=
"getVideoList"
ref=
"videoRef"
:acceptType=
"acceptType"
:multiple=
"multiple"
></comUpload>
</view>
</view>
<view>
...
...
@@ -81,11 +82,11 @@
<view>
添加语音描述
</view>
</view>
</view>
<
!--
<
u-popup
:show=
"showPopup"
@
close=
"handleClosePopup"
@
open=
"handleOpenPopup"
>
<u-popup
:show=
"showPopup"
@
close=
"handleClosePopup"
@
open=
"handleOpenPopup"
>
<view
class=
"padding-y-two"
>
<recordCom></recordCom>
<recordCom
@
getVal=
"getVoiceList"
></recordCom>
</view>
</u-popup>
-->
</u-popup>
</view>
</view>
...
...
@@ -125,18 +126,10 @@
return
{
showTime
:
false
,
//时间选择器是否显示
acceptType
:
'video'
,
multiple
:
false
,
//视频上传数量(多张、单张)
path
:
'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
,
voicePath
:
''
,
showPopup
:
false
,
// formInfo: {
// title: undefined, //标题
// linkman: undefined, //联系人
// phone: undefined, //联系电话
// repairTime: undefined, //维修时间
// repairAddress: undefined, //维修地址
// budget: undefined, //预算金额
// remark: undefined, //备注说明
// },
formInfo
:
{},
rules
:
{
title
:
{
...
...
@@ -163,7 +156,8 @@
message
:
'请填写备注说明'
,
trigger
:
[
'blur'
,
'change'
]
},
}
},
};
},
...
...
@@ -193,28 +187,57 @@
// 时间格式化默认值
if
(
!
that
.
formInfo
.
repairTime
)
{
that
.
formInfo
.
repairTime
=
uni
.
$u
.
timeFormat
(
Number
(
new
Date
()),
'yyyy-mm-dd'
);
}
else
{
that
.
formInfo
.
repairTime
=
uni
.
$u
.
timeFormat
(
that
.
formInfo
.
repairTime
,
'yyyy-mm-dd'
)
}
},
methods
:
{
// 获取上传图片的值
getPhotoList
(
data
)
{
this
.
formInfo
.
pictureList
.
push
({
url
:
data
.
data
.
url
,
fileType
:
'picture'
})
},
// 获取上传视频的值
getVideoList
(
data
)
{
this
.
formInfo
.
videoList
.
push
({
url
:
data
.
data
.
url
,
fileType
:
'video'
})
},
// 上传音频事件
getVoiceList
(
data
)
{
this
.
formInfo
.
videoList
.
push
({
url
:
data
.
data
.
url
,
fileType
:
'voice'
})
},
//确认修改和重新发布按钮
handleUpdateForm
(){
handleUpdateForm
()
{
this
.
$emit
(
'submit'
,
this
.
formInfo
)
},
async
handleAdd
()
{
let
that
=
this
that
.
formInfo
.
repairTime
=
uni
.
$u
.
timeFormat
(
that
.
formInfo
.
repairTime
,
'yyyy-mm-dd'
);
const
data_back
=
await
addOrderFunction
(
that
.
formInfo
)
console
.
log
(
data_back
,
'提交'
)
const
{
code
}
=
data_back
if
(
code
==
200
){
const
{
code
}
=
data_back
if
(
code
==
200
)
{
uni
.
showToast
({
title
:
'发布成功!'
,
icon
:
'none'
,
duration
:
2000
,
title
:
'发布成功!'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
setTimeout
(()
=>
{
that
.
resetForm
()
},
1000
)
let
cleatTime
=
setTimeout
(()
=>
{
clearTimeout
(
cleatTime
)
that
.
$uniGo
.
reLaunch
({
url
:
'/pages/demand/index'
})
},
1000
)
}
})
}
...
...
@@ -223,7 +246,7 @@
handlePublish
()
{
let
that
=
this
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
that
.
handleAdd
()
}
}).
catch
(
errors
=>
{
...
...
@@ -282,16 +305,24 @@
repairTime
:
undefined
,
//维修时间
repairAddress
:
''
,
//维修地址
budget
:
''
,
//预算金额
remark
:
'测试默认值'
,
//备注说明
fileVos
:[
remark
:
''
,
//备注说明
pictureList
:
[],
//图片
videoList
:
[],
//视频
voiceList
:
[
{
url
:
'https://img1.baidu.com/it/u=567782244,1695500002&fm=253&fmt=auto&app=138&f=JPEG?w=753&h=500'
,
//地址
fileType
:
'picture'
,
//文件类型video
},
url
:
'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3'
,
fileType
:
'voice'
}
],
//音频
// fileVos:[
// {
// url:'https://img1.baidu.com/it/u=567782244,1695500002&fm=253&fmt=auto&app=138&f=JPEG?w=753&h=500',//地址
// fileType:'picture',//文件类型video
// },
],
//
],
// id:null,
userId
:
1
,
//用户id
userId
:
1
,
//用户id
}
}
}
...
...
components/record/record.vue
View file @
6c7ad2f9
...
...
@@ -28,7 +28,7 @@
<view>
重新录制
</view>
</view>
<view
class=
"d-flex flex-column a-center"
@
click=
"bofang"
>
<img
class=
"record-icon"
src=
"../../static/recordIcon/play.png
"
alt=
""
>
<img
class=
"record-icon"
:src=
"playStatus==1 ? '../../static/recordIcon/goon.png' : '../../static/recordIcon/play.png'
"
alt=
""
>
<view>
{{
playStatus
==
1
?
'录音播放中'
:
'播放录音'
}}
</view>
</view>
...
...
@@ -38,10 +38,12 @@
<view
:class=
"status==2?'row':'no-clicking'"
@
click=
"jixu"
hover-class=
"jump-hover"
>
继续
</view>
<view
:class=
"status==1 || status==2?'row':'no-clicking'"
@
click=
"tingzhi"
hover-class=
"jump-hover"
>
停止
</view>
-->
</view>
<view
class=
"upload-voice-text"
@
click=
"handleUpload"
>
上传录音
</view>
</view>
</
template
>
<
script
>
import
apiBaseConfig
from
'@/config/index.js'
;
const
recorderManager
=
uni
.
getRecorderManager
()
const
innerAudioContext
=
uni
.
createInnerAudioContext
()
var
init
...
...
@@ -53,9 +55,35 @@
tempFilePath
:
""
,
//音频路径
status
:
0
,
//录音状态 0:未开始录音 1:正在录音 2:暂停录音 3:已完成录音
playStatus
:
0
,
//录音播放状态 0:未播放 1:正在播放
uploadUrl
:
apiBaseConfig
.
upload
,
}
},
methods
:
{
//上传录音按钮事件
async
handleUpload
(){
console
.
log
(
'山海关穿 '
,
this
.
uploadUrl
,
this
.
tempFilePath
)
let
that
=
this
return
new
Promise
((
resolve
,
reject
)
=>
{
let
a
=
wx
.
uploadFile
({
url
:
that
.
uploadUrl
,
// 仅为示例,非真实的接口地址
filePath
:
that
.
tempFilePath
,
name
:
'file'
,
header
:{
'Authorization'
:
`Bearer
${
uni
.
getStorageSync
(
'token'
)}
`
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'dsan'
)
that
.
$emit
(
'getVal'
,
JSON
.
parse
(
res
.
data
))
setTimeout
(()
=>
{
resolve
(
res
.
data
.
data
)
},
1000
)
},
fail
(
err
)
{
console
.
log
(
'失败'
,
err
)
}
});
})
},
handleStart
()
{
let
that
=
this
if
(
that
.
status
==
0
)
{
...
...
@@ -119,7 +147,6 @@
* 停止录音
*/
tingzhi
:
function
()
{
debugger
recorderManager
.
onStop
((
res
)
=>
{
console
.
log
(
'recorder stop'
,
res
)
this
.
tempFilePath
=
res
.
tempFilePath
...
...
@@ -297,4 +324,15 @@
height
:
80
rpx
;
border
:
5
rpx
solid
rgb
(
241
,
244
,
245
);
}
.upload-voice-text
{
width
:
276
rpx
;
height
:
70
rpx
;
border-radius
:
14
rpx
;
border
:
2
rpx
solid
#2C66FF
;
text-align
:
center
;
line-height
:
70
rpx
;
color
:
#2C66FF
;
font-size
:
24
rpx
;
margin
:
20
rpx
auto
;
}
</
style
>
components/upload/aIndex.vue
View file @
6c7ad2f9
<
template
>
<view
class=
"index"
>
<u-upload
:fileList=
"fileList1"
name=
"1"
@
afterRead=
"afterRead"
@
delete=
"deletePic"
:multiple=
"true"
:maxCount=
"5"
width=
"210"
height=
"210"
:accept=
"acceptType"
>
<u-upload
:fileList=
"fileList1"
name=
"1"
@
afterRead=
"afterRead"
@
delete=
"deletePic"
:multiple=
"multiple"
:maxCount=
"5"
width=
"210"
height=
"210"
:accept=
"acceptType"
>
<view
class=
"index-upload d-flex j-center a-center"
>
<image
v-if=
"imgType === 'camera'"
src=
"@/static/icon/camera.png"
mode=
"widthFix"
></image>
<view
class=
"index-upload-tlo d-flex flex-wrap j-center"
v-else-if=
"imgType === 'cross'"
>
...
...
@@ -29,6 +30,14 @@
crossTextShow
:
{
type
:
Boolean
,
default
:
true
},
multiple
:
{
type
:
Boolean
,
default
:
true
},
value
:
{
typr
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
...
...
@@ -37,15 +46,29 @@
fileList1
:
[],
};
},
watch
:{
value
:{
handler
(
newVal
,
oldVal
){
console
.
log
(
newVal
,
newVal
,
'监听'
)
if
(
newVal
.
length
){
this
.
fileList1
=
newVal
console
.
log
(
this
.
fileList1
,
'大家撒'
)
}
else
{
this
.
fileList1
=
[]
}
},
immediate
:
true
,
deep
:
true
}
},
onLoad
()
{},
methods
:
{
// 删除图片
deletePic
(
event
)
{
this
[
`fileList
${
event
.
name
}
`
].
splice
(
event
.
index
,
1
)
;
this
[
`fileList
${
event
.
name
}
`
].
splice
(
event
.
index
,
1
)
},
// 新增图片
async
afterRead
(
event
)
{
console
.
log
(
event
)
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let
lists
=
[].
concat
(
event
.
file
)
let
fileListLen
=
this
[
`fileList
${
event
.
name
}
`
].
length
lists
.
map
((
item
)
=>
{
...
...
@@ -66,20 +89,17 @@
fileListLen
++
}
},
//上传图片
uploadFilePromise
(
url
)
{
let
that
=
this
return
new
Promise
((
resolve
,
reject
)
=>
{
let
a
=
uni
.
uploadFile
({
//url: this.$common.domain+'/api/common/upload', // 仅为示例,非真实的接口地址
url
:
that
.
uploadUrl
,
// 仅为示例,非真实的接口地址
url
:
this
.
uploadUrl
,
// 仅为示例,非真实的接口地址
filePath
:
url
,
name
:
'file'
,
formData
:
{
user
:
'test'
header
:
{
'Authorization'
:
`Bearer
${
uni
.
getStorageSync
(
'token'
)}
`
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'第三款'
)
this
.
$emit
(
'getVal'
,
JSON
.
parse
(
res
.
data
)
)
setTimeout
(()
=>
{
resolve
(
res
.
data
.
data
)
},
1000
)
...
...
demand/index/index.vue
View file @
6c7ad2f9
...
...
@@ -61,7 +61,7 @@
<view
class=
"font-bold"
>
<text></text>
订单已驳回
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
沟通金额没有谈妥
</view>
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<!--
<u--textarea
v-model=
"detailData.value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
</view>
<view
class=
"content-reject"
v-if=
"subscript == 3 && subs== '1'"
>
...
...
demand/updateForm/updateForm.vue
View file @
6c7ad2f9
...
...
@@ -35,18 +35,32 @@
orderDetailMsgNew
({
id
:
that
.
detailInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
'订单详情'
,
res
)
if
(
res
.
code
==
200
)
{
that
.
detailData
=
res
.
data
}
})
},
//重新发布和修改按钮事件
handleSubmit
(
data
){
console
.
log
(
data
,
'表单重新提交'
)
updateOrderFunction
(
data
).
then
(
res
=>
{
console
.
log
(
res
,
'重新提交返回'
)
async
handleSubmit
(
data
){
let
that
=
this
const
back_data
=
await
updateOrderFunction
(
data
)
const
{
code
}
=
back_data
if
(
code
==
200
){
uni
.
showToast
({
title
:
'修改成功!'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
let
cleatTime
=
setTimeout
(()
=>
{
clearTimeout
(
cleatTime
)
that
.
$uniGo
.
navigateBack
({
delta
:
1
})
},
1000
)
}
})
}
}
}
}
...
...
my/login/login.vue
View file @
6c7ad2f9
...
...
@@ -14,7 +14,7 @@
</
template
>
<
script
>
import
{
login
}
from
'@/api/user.js'
import
{
login
,
loginPhone
,
loginUserInfo
}
from
'@/api/user.js'
export
default
{
data
()
{
...
...
@@ -22,7 +22,8 @@
height
:
0
,
loginParams
:{
xcxCode
:
''
}
},
token
:
''
}
},
onLoad
()
{
...
...
@@ -41,36 +42,28 @@
let
that
=
this
uni
.
login
({
success
(
res
)
{
console
.
log
(
res
,
'获取code'
)
that
.
getSessionkeyAndOpenId
(
res
.
code
)
}
})
},
// 2.获取sessionKey,openId
async
getSessionkeyAndOpenId
(
code
)
{
const
back_data
=
await
login
({
xcxCode
:
code
})
console
.
log
(
back_data
,
'静默登录'
)
async
getSessionkeyAndOpenId
(
xcxCode
)
{
let
that
=
this
const
back_data
=
await
login
({
xcxCode
:
xcxCode
})
const
{
code
,
data
}
=
back_data
if
(
code
===
200
){
uni
.
setStorageSync
(
'token'
,
data
.
token
)
}
},
// async getSessionkeyAndOpenId() {
// const res = await this.$myRequest({
// url:`/xcxLogin?appid=${this.loginParams.appid}&code=${this.loginParams.code}`,
// })
// if(res.data.code == 200){
// let dataObj = JSON.parse(res.data.data)
// this.sessionKey = dataObj.sessionKey
// this.openid = dataObj.openid
// }
// },
// 3.授权手机号登录拿到encryptedData和iv
// 3.授权手机号登录
getPhoneNumber
(
e
)
{
let
that
=
this
// 同意登录
console
.
log
(
e
,
'第三节'
)
if
(
e
.
detail
.
errMsg
==
"getPhoneNumber:ok"
)
{
console
.
log
(
e
,
'Dasnj '
)
const
iv
=
e
.
detail
.
iv
const
encryptedData
=
e
.
detail
.
encryptedData
this
.
getNumberAndToken
(
iv
,
encryptedData
)
console
.
log
(
e
.
detail
.
code
,
'Dasnj '
)
that
.
getPhoneLogin
(
e
.
detail
.
code
)
}
else
{
// 取消授权 清空头像和昵称
uni
.
navigateBack
({
...
...
@@ -78,46 +71,26 @@
})
}
},
// 4.获取token
async
getNumberAndToken
(
iv
,
encryptedData
)
{
const
res
=
await
this
.
$myRequest
({
url
:
'/phone'
,
method
:
'POST'
,
data
:{
appid
:
this
.
loginParams
.
appid
,
encryptedData
:
encryptedData
,
iv
:
iv
,
sessionKey
:
this
.
sessionKey
,
openid
:
this
.
openid
,
rawData
:
this
.
rawData
,
signature
:
this
.
signature
}
})
if
(
res
.
data
.
code
==
200
){
console
.
log
(
res
.
data
.
data
.
token
,
'token'
)
uni
.
setStorageSync
(
'token'
,
res
.
data
.
data
.
token
)
uni
.
setStorageSync
(
'powerIds'
,
res
.
data
.
data
.
powerIds
)
uni
.
setStorageSync
(
'userInfo'
,
res
.
data
.
data
.
feederUserVo
)
uni
.
showToast
({
title
:
'登录成功'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
setTimeout
(()
=>
{
uni
.
reLaunch
({
url
:
'../index/index'
})
},
1000
)
}
})
// 获取手机号
async
getPhoneLogin
(
xcxCode
){
let
that
=
this
const
data_back
=
await
loginPhone
({
xcxCode
:
xcxCode
})
const
{
code
}
=
data_back
if
(
code
===
200
){
that
.
getUserMsg
()
}
},
//使用账号密码
handleUse
(){
uni
.
navigateTo
({
url
:
'../chooseLogin/chooseLogin'
async
getUserMsg
(){
const
data_back
=
await
loginUserInfo
()
const
{
code
,
data
}
=
data_back
if
(
code
===
200
){
uni
.
setStorageSync
(
'mobile'
,
data
.
user
.
mobile
)
this
.
$uniGo
.
reLaunch
({
url
:
'/pages/home/index'
})
}
},
}
}
</
script
>
...
...
package.json
View file @
6c7ad2f9
...
...
@@ -11,8 +11,8 @@
"env"
:
{
"UNI_PLATFORM"
:
"mp-weixin"
,
"UNI_BASE_ENV"
:
"development"
,
"UNI_BASE_URL"
:
"http://192.168.0.1
82:8996
"
,
"UNI_BASE_API"
:
"
/custom
"
"UNI_BASE_URL"
:
"http://192.168.0.1
75:7001
"
,
"UNI_BASE_API"
:
""
},
"define"
:
{
"CUSTOM-DEV"
:
true
...
...
@@ -23,8 +23,8 @@
"env"
:
{
"UNI_PLATFORM"
:
"mp-weixin"
,
"UNI_BASE_ENV"
:
"uat"
,
"UNI_BASE_URL"
:
"http://
192.168.0.175:7001
"
,
"UNI_BASE_API"
:
""
"UNI_BASE_URL"
:
"http://
xinrenli.nyinhong.com
"
,
"UNI_BASE_API"
:
"
/api
"
},
"define"
:
{
"CUSTOM-UAT"
:
true
...
...
pages/demand/components/index.vue
View file @
6c7ad2f9
...
...
@@ -12,7 +12,7 @@
</view>
<view
class=
"content-matter-substance"
>
<image
:src=
"item.
fileVos
[0].url"
mode=
""
></image>
<image
:src=
"item.
pictureList
[0].url"
mode=
""
></image>
<view
class=
""
>
<view
class=
""
>
说明:
{{
item
.
remark
?
item
.
remark
:
'暂无说明'
}}
...
...
@@ -25,7 +25,7 @@
<!-- // 已驳回 -->
<view
class=
"d-flex a-end j-sb"
v-if=
"subscript == '1'"
>
<view
class=
"reject flex-1 hiddenMore"
>
驳回理由:
没有明确问题描述没有明确问题描述没有明确问题描述没有明确问题描述
驳回理由:
{{
item
.
reasonsForRejection
?
item
.
reasonsForRejection
:
'暂无'
}}
</view>
<button
@
click
.
stop=
"handleAgainAdd(item)"
class=
"buttoncl"
style=
"margin-left: 20rpx;"
>
重新发布
</button>
</view>
...
...
pages/demand/index.vue
View file @
6c7ad2f9
...
...
@@ -85,7 +85,6 @@
pageNum
:
1
,
status
:
0
,
deleteStatus
:
0
,
userId
:
1
,
orderByColumn
:
'modifyTime'
,
isAsc
:
'desc'
},
...
...
@@ -99,12 +98,15 @@
if
(
option
.
id
)
{
this
.
subscript
=
option
.
id
}
},
onShow
()
{
this
.
getMyNeedList
()
},
methods
:
{
async
getMyNeedList
()
{
let
that
=
this
that
.
needInfo
.
status
=
that
.
subscript
that
.
statusNeedList
=
[]
const
data_back
=
await
orderDetailList
(
that
.
needInfo
)
const
{
code
,
...
...
pages/my/index.vue
View file @
6c7ad2f9
...
...
@@ -9,11 +9,11 @@
</button>
<view
class=
"content-in-info-r"
>
<view
class=
"content-in-info-r-t baiyin-flex"
>
<text
v-if=
"nameDisabled"
>
用户名称
</text>
<input
v-else
confirm-type=
"确定"
@
confirm=
"inputNameConfirm"
maxlength=
"15"
type=
"text"
value=
"用户名称"
/>
<text
v-if=
"nameDisabled"
>
{{
$store
.
state
.
login
.
userInfo
.
user
.
nickname
}}
</text>
<input
v-else
confirm-type=
"确定"
@
confirm=
"inputNameConfirm"
maxlength=
"15"
type=
"text"
value=
"用户名称
1
"
/>
<image
src=
"@/static/icon/my02.png"
mode=
""
@
click=
"nameDisabled = !nameDisabled"
></image>
</view>
<view
class=
"content-in-info-r-b"
>
手机号:12385757454
</view>
<view
class=
"content-in-info-r-b"
v-if=
"mobile"
>
手机号:
{{
mobile
}}
</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"
>
...
...
@@ -85,6 +85,7 @@
<
script
>
import
apiBaseConfig
from
'@/config/index.js'
;
import
{
mapMutations
}
from
'vuex'
;
import
{
updateUserMsg
}
from
'@/api/system/index.js'
export
default
{
data
()
{
return
{
...
...
@@ -92,6 +93,8 @@ export default {
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
,
nameDisabled
:
true
,
nickname
:
'zhangsan'
,
mobile
:
''
,
//手机号
list
:
[
{
icon
:
require
(
'@/static/icon/my04.png'
),
...
...
@@ -120,7 +123,12 @@ export default {
]
};
},
onLoad
()
{},
onLoad
()
{
console
.
log
(
this
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
,
'D撒'
)
let
mobile
=
uni
.
getStorageSync
(
'mobile'
)
console
.
log
(
mobile
,
'手机号'
)
this
.
mobile
=
mobile
},
methods
:
{
...
mapMutations
([
'upDateUserInfoMount'
]),
onChooseavatar
(
e
)
{
...
...
@@ -154,7 +162,12 @@ export default {
});
},
inputNameConfirm
(
e
)
{
console
.
log
(
'======inputNameConfirm:'
,
e
);
console
.
log
(
'======inputNameConfirm:'
,
e
.
detail
.
value
);
this
.
updateUser
(
e
.
detail
.
value
)
},
async
updateUser
(
value
){
const
back_data
=
await
updateUserMsg
({
nickname
:
value
})
console
.
log
(
back_data
)
},
clickJumpNPage
(
row
)
{
if
(
row
.
url
)
{
...
...
static/recordIcon/goon.png
0 → 100644
View file @
6c7ad2f9
866 Bytes
utils/request.js
View file @
6c7ad2f9
...
...
@@ -33,9 +33,9 @@ function switchMethod(method) {
**/
const
ApiHttp
=
(
url
,
params
,
method
,
isToken
=
true
)
=>
{
let
header
=
{},
token
=
store
.
state
.
login
.
token
||
null
;
token
=
uni
.
getStorageSync
(
'token'
)
||
null
;
// token = store.state.login.token || null;
header
=
switchMethod
(
method
)
// console.log(store.state.login.token,'================token')
if
(
isToken
)
{
header
=
{
...
header
,
...
...
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