Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_uniapp
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
刘怀志
intel_promotion_uniapp
Commits
4c87b98a
Commit
4c87b98a
authored
Jul 12, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
d3ed4816
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
config.js
common/config.js
+2
-2
http.interceptor.js
common/http.interceptor.js
+6
-0
index.vue
pages/shop/index.vue
+10
-1
profile.vue
pages/user/profile.vue
+3
-2
No files found.
common/config.js
View file @
4c87b98a
...
@@ -4,6 +4,6 @@ export default {
...
@@ -4,6 +4,6 @@ export default {
// baseApi:'/prod-api'//web生产
// baseApi:'/prod-api'//web生产
// baseApi: 'https://qf.91isoft.com/cshop'//本地测试
// baseApi: 'https://qf.91isoft.com/cshop'//本地测试
// baseApi: 'https://project.91isoft.com/zntg/api'//本地测试
// baseApi: 'https://project.91isoft.com/zntg/api'//本地测试
//
baseApi: 'http://127.0.0.1:8099'//本地测试
baseApi
:
'http://127.0.0.1:8099'
//本地测试
baseApi
:
'https://www.hzyzntg.com/api'
//本地测试
//
baseApi: 'https://www.hzyzntg.com/api'//本地测试
}
}
common/http.interceptor.js
View file @
4c87b98a
...
@@ -46,6 +46,11 @@ const install = (Vue, vm) => {
...
@@ -46,6 +46,11 @@ const install = (Vue, vm) => {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return
res
.
data
;
return
res
.
data
;
}
else
if
(
res
.
code
==
410
){
Vue
.
prototype
.
$u
.
vuex
(
'vuex_token'
,
''
)
Vue
.
prototype
.
$u
.
vuex
(
'vuex_user'
,
{})
Vue
.
prototype
.
$u
.
vuex
(
'vuex_unit'
,
''
)
Vue
.
prototype
.
$u
.
route
(
'/login/login/passwordLogin'
);
}
else
{
}
else
{
//todo 统一处理错误信息
//todo 统一处理错误信息
if
(
res
.
message
){
if
(
res
.
message
){
...
@@ -59,6 +64,7 @@ const install = (Vue, vm) => {
...
@@ -59,6 +64,7 @@ const install = (Vue, vm) => {
Vue
.
prototype
.
$u
.
http
.
interceptor
.
error
=
(
res
)
=>
{
Vue
.
prototype
.
$u
.
http
.
interceptor
.
error
=
(
res
)
=>
{
console
.
log
(
'error'
,
res
);
console
.
log
(
'error'
,
res
);
if
(
res
.
code
==
401
){
if
(
res
.
code
==
401
){
console
.
log
(
'22222222222222222222'
)
//跳转至登录页面
//跳转至登录页面
Vue
.
prototype
.
$u
.
route
(
'/login/login/passwordLogin'
);
Vue
.
prototype
.
$u
.
route
(
'/login/login/passwordLogin'
);
return
true
;
return
true
;
...
...
pages/shop/index.vue
View file @
4c87b98a
...
@@ -174,7 +174,16 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
...
@@ -174,7 +174,16 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
this
.
hotList
=
[...
this
.
hotList
,
...
list1
]
this
.
hotList
=
[...
this
.
hotList
,
...
list1
]
}
}
});
}).
catch
((
err
)
=>
{
// if(err.code == 410) {
// this.$u.vuex('vuex_token', '')
// this.$u.vuex('vuex_user', '')
// this.$u.vuex('vuex_unit','')
// this.$u.route({
// url: '/login/login/passwordLogin'
// })
// }
});
},
},
...
...
pages/user/profile.vue
View file @
4c87b98a
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
</view>
</view>
<view
class=
"toptitlelist"
>
<view
class=
"toptitlelist"
>
<view
class=
"toptitlelist1"
>
{{
vuex_user
.
name
}}
</view>
<view
class=
"toptitlelist1"
>
{{
vuex_user
.
name
}}
</view>
<view
class=
"toptitlelist2"
v-if=
"vuex_user.nickName !== '未登录'"
>
ID:
{{
vuex_user
.
phone
}}
</view>
<view
class=
"toptitlelist2"
v-if=
"vuex_user.nickName !== '未登录'
&& vuex_user.name
"
>
ID:
{{
vuex_user
.
phone
}}
</view>
<view
class=
"toptitlelist2"
v-if=
"vuex_user.nickName == '未登录'"
@
click=
"toLogin"
>
点击登录鸿泽云智能推广系统账号
<view
class=
"toptitlelist2"
v-if=
"vuex_user.nickName == '未登录'
|| !vuex_user.name
"
@
click=
"toLogin"
>
点击登录鸿泽云智能推广系统账号
</view>
</view>
</view>
</view>
<!--
<view
class=
"u-m-l-10 u-p-10"
>
<!--
<view
class=
"u-m-l-10 u-p-10"
>
...
@@ -121,6 +121,7 @@
...
@@ -121,6 +121,7 @@
},
},
onShow
()
{
onShow
()
{
console
.
log
(
'this.vuex_user'
,
this
.
vuex_user
)
// #ifdef H5
// #ifdef H5
this
.
initH5
()
this
.
initH5
()
// #endif
// #endif
...
...
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