Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
iedgeMini
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
02d86a73
authored
Mar 19, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
兼容
parent
c1a412d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
223 deletions
.gitignore
pages/user/userInfo.vue
unpackage/dist/dev/mp-weixin/pages/user/userInfo.js
.gitignore
View file @
02d86a73
/.idea
/.idea
/.hbuilderx
/.hbuilderx
/unpackage
/unpackage
/*
/*.hbuilderx
/*.hbuilderx
/.DS_Store
/.DS_Store
/node_modules
/node_modules
\ No newline at end of file
pages/user/userInfo.vue
View file @
02d86a73
<
template
>
<
template
>
<view
class=
"userInfoPage"
>
<view
class=
"userInfoPage"
>
<barX
/>
<barX
/>
<view
class=
"head"
v-if=
"userinfo"
>
<view
class=
"head"
v-if=
"userinfo"
>
<view
class=
"top row"
>
<view
class=
"top row"
>
<navigator
url=
"/pages/user/msgList"
><text
class=
"icon iconfont icon-ldxi"
></text></navigator>
<navigator
url=
"/pages/user/msgList"
><text
class=
"icon iconfont icon-ldxi"
></text></navigator>
<navigator
url=
"/pages/user/setting"
><text
class=
"icon iconfont icon-set"
></text></navigator>
<navigator
url=
"/pages/user/setting"
><text
class=
"icon iconfont icon-set"
></text></navigator>
</view>
</view>
<view
class=
"cen row"
>
<view
class=
"cen row"
>
<view
class=
"imgh"
>
<view
class=
"imgh"
>
<image
@
click=
"chooseImageChange"
:src=
"userinfo.avatar_url?userinfo.avatar_url:'https://img.ichunt.com/images/ichunt/202502/24/e3f1f226b93f791de65faf46be2cdf9f.png'"
/>
<image
@
click=
"chooseImageChange"
:src=
"userinfo.avatar_url?userinfo.avatar_url:'https://img.ichunt.com/images/ichunt/202502/24/e3f1f226b93f791de65faf46be2cdf9f.png'"
/>
</view>
</view>
<view>
<view>
<view
class=
"namen"
>
{{
userinfo
.
wx_nickname
||
userinfo
.
phone
||
userinfo
.
email
||
'微信用户'
}}
</view>
<view
class=
"namen"
>
{{
userinfo
.
wx_nickname
||
userinfo
.
phone
||
userinfo
.
email
||
'微信用户'
}}
</view>
<navigator
:url=
"'/pages/user/companyInfo?id='+companyId"
>
<navigator
:url=
"'/pages/user/companyInfo?id='+companyId"
>
<view
class=
"com row verCenter"
v-if=
"certification.length>0"
>
<view
class=
"com row verCenter"
v-if=
"certification.length>0"
>
<view
>
{{
userinfo
.
company_name
}}
</view>
<view
>
{{
userinfo
.
company_name
}}
</view>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/71bb98554d41d147323089e464079a28.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/71bb98554d41d147323089e464079a28.png"
/>
<text
class=
"icon iconfont icon-arrowright"
></text>
<text
class=
"icon iconfont icon-arrowright"
></text>
</view>
</view>
<view
class=
"com row verCenter di"
v-else
>
<view
class=
"com row verCenter di"
v-else
>
<view
>
暂无公司信息
</view>
<view
>
暂无公司信息
</view>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/00d5a3c2e0a057075b618a2da69978da.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/00d5a3c2e0a057075b618a2da69978da.png"
/>
<text
class=
"grz"
>
去认证
<text
class=
"icon iconfont icon-arrowright"
></text></text>
<text
class=
"grz"
>
去认证
<text
class=
"icon iconfont icon-arrowright"
></text></text>
</view>
</view>
</navigator>
</navigator>
<navigator
url=
"/pages/user/coupon"
>
<navigator
url=
"/pages/user/coupon"
>
<view
class=
"coup-box row verCenter"
>
<view
class=
"coup-box row verCenter"
>
优惠券:
<text
class=
"tops"
>
{{
couponCount
}}
</text>
张未使用
优惠券:
<text
class=
"tops"
>
{{
couponCount
}}
</text>
张未使用
<text
class=
"icon iconfont icon-arrowright"
></text>
<text
class=
"icon iconfont icon-arrowright"
></text>
</view>
</view>
</navigator>
</navigator>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"head"
v-else
></view>
<view
class=
"head"
v-else
></view>
<view
class=
"sec"
>
<view
class=
"sec"
>
<view
class=
"order-box"
>
<view
class=
"order-box"
>
<view
class=
"tit row bothSide verCenter"
>
<view
class=
"tit row bothSide verCenter"
>
<text>
我的订单
</text>
<text>
我的订单
</text>
<navigator
url=
"/pages/user/orderList"
class=
"go-order"
>
<navigator
url=
"/pages/user/orderList"
class=
"go-order"
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
查看
查看
<text
class=
"icon iconfont icon-arrowright"
></text>
<text
class=
"icon iconfont icon-arrowright"
></text>
</view>
</view>
</navigator>
</navigator>
</view>
</view>
<view
class=
"order-status row bothSide"
>
<view
class=
"order-status row bothSide"
>
<navigator
url=
"/pages/user/orderList?status=1"
class=
"yhq"
>
<navigator
url=
"/pages/user/orderList?status=1"
class=
"yhq"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/d70205f2f83cead903cca76bde50db17.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/d70205f2f83cead903cca76bde50db17.png"
/>
<view>
待确认
</view>
<view>
待确认
</view>
<text
class=
"count"
v-if=
"orderCount['1']>0"
>
{{
orderCount
[
'1'
]
}}
</text>
<text
class=
"count"
v-if=
"orderCount['1']>0"
>
{{
orderCount
[
'1'
]
}}
</text>
</navigator>
</navigator>
<navigator
url=
"/pages/user/orderList?status=2,3"
class=
"yhq"
>
<navigator
url=
"/pages/user/orderList?status=2,3"
class=
"yhq"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/1fe54495f0fdfb72f8126daee9d5564f.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/1fe54495f0fdfb72f8126daee9d5564f.png"
/>
<view>
待付款
</view>
<view>
待付款
</view>
<text
class=
"count"
v-if=
"(orderCount['2']+orderCount['3'])>0"
>
{{
orderCount
[
'2'
]
+
orderCount
[
'3'
]
}}
</text>
<text
class=
"count"
v-if=
"(orderCount['2']+orderCount['3'])>0"
>
{{
orderCount
[
'2'
]
+
orderCount
[
'3'
]
}}
</text>
</navigator>
</navigator>
<navigator
url=
"/pages/user/orderList?status=4"
class=
"yhq"
>
<navigator
url=
"/pages/user/orderList?status=4"
class=
"yhq"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/4de1203f3ddb51a020c0ab53bd2ee3b5.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/4de1203f3ddb51a020c0ab53bd2ee3b5.png"
/>
<view>
待发货
</view>
<view>
待发货
</view>
<text
class=
"count"
v-if=
"orderCount['4']>0"
>
{{
orderCount
[
'4'
]
}}
</text>
<text
class=
"count"
v-if=
"orderCount['4']>0"
>
{{
orderCount
[
'4'
]
}}
</text>
</navigator>
</navigator>
<navigator
url=
"/pages/user/orderList?status=7,8"
class=
"yhq"
>
<navigator
url=
"/pages/user/orderList?status=7,8"
class=
"yhq"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/986cd7e0d070537db3767503d85084c9.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/986cd7e0d070537db3767503d85084c9.png"
/>
<view>
待收货
</view>
<view>
待收货
</view>
<text
class=
"count"
v-if=
"(orderCount['7']+orderCount['8'])>0"
>
{{
orderCount
[
'7'
]
+
orderCount
[
'8'
]
}}
</text>
<text
class=
"count"
v-if=
"(orderCount['7']+orderCount['8'])>0"
>
{{
orderCount
[
'7'
]
+
orderCount
[
'8'
]
}}
</text>
</navigator>
</navigator>
<navigator
url=
"/pages/user/orderList?status=-1,10"
class=
"yhq"
>
<navigator
url=
"/pages/user/orderList?status=-1,10"
class=
"yhq"
>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/d75f5fe63ec44f624c0289ca2c4821a5.png"
/>
<image
src=
"https://img.ichunt.com/images/ichunt/202502/24/d75f5fe63ec44f624c0289ca2c4821a5.png"
/>
<view>
已完结
</view>
<view>
已完结
</view>
<text
class=
"count"
v-if=
"(orderCount['-1']+orderCount['10'])>0"
>
{{
orderCount
[
'-1'
]
+
orderCount
[
'10'
]
}}
</text>
<text
class=
"count"
v-if=
"(orderCount['-1']+orderCount['10'])>0"
>
{{
orderCount
[
'-1'
]
+
orderCount
[
'10'
]
}}
</text>
</navigator>
</navigator>
</view>
</view>
</view>
</view>
<view
class=
"link-box row bothSide"
>
<view
class=
"link-box row bothSide"
>
<navigator
url=
"/pages/user/qDlist"
class=
"litem"
>
<navigator
url=
"/pages/user/qDlist"
class=
"litem"
>
<text
class=
"icon iconfont icon iconfont icon-qdlist"
></text>
<text
class=
"icon iconfont icon iconfont icon-qdlist"
></text>
<view>
我的清单
</view>
<view>
我的清单
</view>
</navigator>
</navigator>
<navigator
url=
"/pages/user/address"
class=
"litem"
>
<navigator
url=
"/pages/user/address"
class=
"litem"
>
<text
class=
"icon iconfont icon-dzsd"
></text>
<text
class=
"icon iconfont icon-dzsd"
></text>
<view>
地址管理
</view>
<view>
地址管理
</view>
</navigator>
</navigator>
<navigator
url=
"/pages/user/invoice"
class=
"litem"
>
<navigator
url=
"/pages/user/invoice"
class=
"litem"
>
<text
class=
"icon iconfont icon-fpgl"
></text>
<text
class=
"icon iconfont icon-fpgl"
></text>
<view>
发票管理
</view>
<view>
发票管理
</view>
</navigator>
</navigator>
<navigator
:url=
'$globalData.KFQQ'
class=
"litem"
>
<navigator
:url=
'$globalData.KFQQ'
class=
"litem"
>
<text
class=
"icon iconfont icon-kfi"
></text>
<text
class=
"icon iconfont icon-kfi"
></text>
<view>
我的客服
</view>
<view>
我的客服
</view>
</navigator>
</navigator>
</view>
</view>
</view>
</view>
<bottomNavFixed
actval=
"4"
/>
<bottomNavFixed
actval=
"4"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
Api_Url
Api_Url
}
from
'@/util/api.js'
}
from
'@/util/api.js'
import
barX
from
'@/components/barx.vue'
;
import
barX
from
'@/components/barx.vue'
;
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
import
bottomNavFixed
from
'@/components/bottom_nav.vue'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isInit
:
false
,
isInit
:
false
,
couponCount
:
0
,
couponCount
:
0
,
certification
:
[],
certification
:
[],
userinfo
:
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
))
,
userinfo
:
uni
.
getStorageSync
(
'user_info'
)
?
JSON
.
parse
(
uni
.
getStorageSync
(
'user_info'
))
:
''
,
companyId
:
""
,
companyId
:
""
,
orderCount
:
{
orderCount
:
{
"1"
:
0
,
"1"
:
0
,
"2"
:
0
,
"2"
:
0
,
"3"
:
0
,
"3"
:
0
,
"4"
:
0
,
"4"
:
0
,
"7"
:
0
,
"7"
:
0
,
"8"
:
0
,
"8"
:
0
,
"10"
:
0
,
"10"
:
0
,
"-1"
:
0
"-1"
:
0
}
}
}
}
},
},
onLoad
:
function
()
{
onLoad
:
function
()
{
this
.
getData
()
this
.
getData
()
},
},
onShow
()
{
onShow
()
{
this
.
getInfo
();
this
.
getInfo
();
},
},
methods
:
{
methods
:
{
getInfo
()
{
getInfo
()
{
//获取用户信息
//获取用户信息
this
.
request
(
Api_Url
+
'/api/user/info'
,
'GET'
,
{},
(
this
.
isInit
?
false
:
true
)).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/user/info'
,
'GET'
,
{},
(
this
.
isInit
?
false
:
true
)).
then
(
res
=>
{
this
.
isInit
=
true
this
.
isInit
=
true
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
certification
=
res
.
data
.
certification
||
[]
this
.
certification
=
res
.
data
.
certification
||
[]
this
.
userinfo
=
res
.
data
.
userinfo
this
.
userinfo
=
res
.
data
.
userinfo
uni
.
setStorageSync
(
'user_info'
,
JSON
.
stringify
(
this
.
userinfo
));
uni
.
setStorageSync
(
'user_info'
,
JSON
.
stringify
(
this
.
userinfo
));
this
.
certification
.
forEach
(
item
=>
{
this
.
certification
.
forEach
(
item
=>
{
if
(
item
.
com_name
==
this
.
userinfo
.
company_name
)
{
if
(
item
.
com_name
==
this
.
userinfo
.
company_name
)
{
this
.
companyId
=
item
.
id
this
.
companyId
=
item
.
id
}
}
})
})
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
msg
,
title
:
res
.
msg
,
icon
:
'none'
icon
:
'none'
});
});
}
}
});
});
},
},
chooseImageChange
()
{
chooseImageChange
()
{
uni
.
chooseImage
({
uni
.
chooseImage
({
count
:
1
,
// 限制选择一张图片
count
:
1
,
// 限制选择一张图片
sizeType
:
[
'original'
,
'compressed'
],
// 选择原图或压缩图
sizeType
:
[
'original'
,
'compressed'
],
// 选择原图或压缩图
sourceType
:
[
'album'
,
'camera'
],
// 从相册或相机选择
sourceType
:
[
'album'
,
'camera'
],
// 从相册或相机选择
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
const
tempFilePath
=
res
.
tempFilePaths
[
0
];
// 获取临时文件路径
const
tempFilePath
=
res
.
tempFilePaths
[
0
];
// 获取临时文件路径
uni
.
uploadFile
({
uni
.
uploadFile
({
url
:
Api_Url
+
'/api/upload/uploadFile'
,
// 替换为你的上传接口地址
url
:
Api_Url
+
'/api/upload/uploadFile'
,
// 替换为你的上传接口地址
filePath
:
tempFilePath
,
filePath
:
tempFilePath
,
name
:
'file'
,
// 后端接收的字段名
name
:
'file'
,
// 后端接收的字段名
formData
:
{
formData
:
{
// 'user': 'test', // 可选,附加的表单数据
// 'user': 'test', // 可选,附加的表单数据
},
},
success
:
(
uploadRes
)
=>
{
success
:
(
uploadRes
)
=>
{
let
resP
=
JSON
.
parse
(
uploadRes
.
data
)
let
resP
=
JSON
.
parse
(
uploadRes
.
data
)
if
(
resP
.
code
==
0
)
{
if
(
resP
.
code
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
'上传成功'
,
title
:
'上传成功'
,
icon
:
'success'
icon
:
'success'
});
});
this
.
request
(
Api_Url
+
'/api/user/editAvatar'
,
'POST'
,
{
url
:
resP
.
data
.
show_url
},
false
).
then
(
resg
=>
{
this
.
request
(
Api_Url
+
'/api/user/editAvatar'
,
'POST'
,
{
url
:
resP
.
data
.
show_url
},
false
).
then
(
resg
=>
{
if
(
resg
.
code
==
0
)
{
if
(
resg
.
code
==
0
)
{
this
.
getInfo
();
this
.
getInfo
();
}
}
});
});
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
title
:
resP
.
msg
,
title
:
resP
.
msg
,
icon
:
'success'
icon
:
'success'
});
});
}
}
}
}
});
});
}
}
});
});
},
},
getData
()
{
getData
()
{
//获取优惠券
//获取优惠券
this
.
request
(
Api_Url
+
'/api/coupon/getList'
,
'GET'
,
{
status
:
-
1
},
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/coupon/getList'
,
'GET'
,
{
status
:
-
1
},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
couponCount
=
res
.
data
.
count
[
'-1'
]
||
0
this
.
couponCount
=
res
.
data
.
count
[
'-1'
]
||
0
}
}
});
});
//获取订单信息
//获取订单信息
this
.
request
(
Api_Url
+
'/api/order/count'
,
'GET'
,
{},
true
).
then
(
res
=>
{
this
.
request
(
Api_Url
+
'/api/order/count'
,
'GET'
,
{},
true
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
orderCount
=
{...
res
.
data
}
this
.
orderCount
=
{
...
res
.
data
}
}
}
});
});
}
}
},
},
components
:
{
components
:
{
barX
,
barX
,
bottomNavFixed
bottomNavFixed
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
@import
'../../assets/css/user/userInfo.scss'
;
@import
'../../assets/css/user/userInfo.scss'
;
</
style
>
</
style
>
\ No newline at end of file
unpackage/dist/dev/mp-weixin/pages/user/userInfo.js
View file @
02d86a73
...
@@ -9,7 +9,7 @@ const _sfc_main = {
...
@@ -9,7 +9,7 @@ const _sfc_main = {
isInit
:
false
,
isInit
:
false
,
couponCount
:
0
,
couponCount
:
0
,
certification
:
[],
certification
:
[],
userinfo
:
JSON
.
parse
(
common_vendor
.
index
.
getStorageSync
(
"user_info"
))
,
userinfo
:
common_vendor
.
index
.
getStorageSync
(
"user_info"
)
?
JSON
.
parse
(
common_vendor
.
index
.
getStorageSync
(
"user_info"
))
:
""
,
companyId
:
""
,
companyId
:
""
,
orderCount
:
{
orderCount
:
{
"1"
:
0
,
"1"
:
0
,
...
...
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