Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
XiTianSenMall
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leiqingsong
XiTianSenMall
Commits
8060b785
Commit
8060b785
authored
4 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设置界面的bug
parent
5f351d9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
40 deletions
+49
-40
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+11
-10
modefyAvatar.vue
H5/src/views/modefyAvatar.vue
+1
-1
settings.vue
H5/src/views/settings.vue
+37
-29
No files found.
H5/src/utils/bridgeToAppFun.js
View file @
8060b785
...
@@ -62,17 +62,18 @@ class bridgeToAppFun {
...
@@ -62,17 +62,18 @@ class bridgeToAppFun {
}
}
navigateBack
()
{
navigateBack
()
{
console
.
log
(
"返回"
);
console
.
log
(
"返回"
);
//
if (this.userAgent === "android") {
if
(
this
.
userAgent
===
"android"
)
{
//
console.log("an");
console
.
log
(
"an"
);
try
{
try
{
const
home_url
=
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7"
;
const
home_url
=
"https://shop92680967.youzan.com/v2/showcase/homepage?alias=6aFsQ4vCp7"
;
location
.
href
=
home_url
;
location
.
href
=
home_url
;
}
catch
{
}
catch
{
console
.
log
(
"返回调用失败,都不行"
);
console
.
log
(
"返回调用失败,都不行"
);
}
}
//
} else {
}
else
{
//
jsBridge.callhandler("navigateBack");
jsBridge
.
callhandler
(
"navigateBack"
);
//
}
}
}
}
showBottomBar
(
params
)
{
showBottomBar
(
params
)
{
console
.
log
(
"隐藏底部"
);
console
.
log
(
"隐藏底部"
);
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/modefyAvatar.vue
View file @
8060b785
...
@@ -60,7 +60,7 @@ export default {
...
@@ -60,7 +60,7 @@ export default {
});
});
},
},
onRead
(
file
)
{
onRead
(
file
)
{
console
.
log
(
'读取到图片了'
,
file
);
console
.
log
(
"读取到图片了"
,
file
);
const
inviteCode
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
inviteCode
;
const
inviteCode
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
inviteCode
;
if
(
!
inviteCode
)
{
if
(
!
inviteCode
)
{
this
.
$toast
.
fail
(
"当前用户没有邀请码"
);
this
.
$toast
.
fail
(
"当前用户没有邀请码"
);
...
...
This diff is collapsed.
Click to expand it.
H5/src/views/settings.vue
View file @
8060b785
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<van-cell-group
class=
"group-1"
>
<van-cell-group
class=
"group-1"
>
<van-cell
title=
"用户名"
:value=
"userName"
/>
<van-cell
title=
"用户名"
:value=
"userName"
/>
<van-cell
is-link
center
title=
"头像"
@
click=
"onModefy"
>
<van-cell
is-link
center
title=
"头像"
@
click=
"onModefy"
>
<img
class=
"avatar-img"
:src=
"avatar"
alt=
"头像"
/>
<img
class=
"avatar-img"
:src=
"
imageBaseUrl +
avatar"
alt=
"头像"
/>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
<van-cell-group>
<van-cell-group>
...
@@ -56,6 +56,7 @@ export default {
...
@@ -56,6 +56,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
userName
:
""
,
userName
:
""
,
imageBaseUrl
:
""
,
headImage
:
""
,
headImage
:
""
,
avatar
:
""
,
avatar
:
""
,
fileList
:
[],
fileList
:
[],
...
@@ -65,6 +66,7 @@ export default {
...
@@ -65,6 +66,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
imageBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
this
.
getUser
();
},
},
methods
:
{
methods
:
{
...
@@ -73,21 +75,25 @@ export default {
...
@@ -73,21 +75,25 @@ export default {
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
};
};
console
.
log
(
"setting-userId"
,
params
);
console
.
log
(
"setting-userId"
,
params
);
getUserInfo2
(
params
).
then
(
res
=>
{
getUserInfo2
(
params
)
.
then
(
res
=>
{
if
(
res
.
userId
)
{
if
(
res
.
userId
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
));
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
));
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
userName
=
res
.
userId
;
this
.
userName
=
res
.
userId
;
this
.
inviteeCode
=
this
.
inviteeCode
=
res
.
beInvitedCode
==
1
?
"请填写推荐人邀请码"
:
res
.
beInvitedCode
;
res
.
beInvitedCode
==
1
// this.avatar = process.env.VUE_APP_BASE_URL + res.headImage;
?
"请填写推荐人邀请码"
this
.
avatar
=
"http://8.131.244.76:81"
+
res
.
headImage
;
:
res
.
beInvitedCode
;
this
.
avatar
=
res
.
headImage
;
// this.avatar = "http://8.131.244.76:81" + res.headImage;
this
.
headImage
=
res
.
headImage
;
this
.
headImage
=
res
.
headImage
;
});
});
}
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
if
(
err
.
response
.
status
===
502
)
{
if
(
err
.
response
.
status
===
502
)
{
this
.
$toast
(
'服务在升级,请稍后重试'
)
this
.
$toast
(
"服务在升级,请稍后重试"
);
}
}
});
});
},
},
...
@@ -131,16 +137,18 @@ export default {
...
@@ -131,16 +137,18 @@ export default {
inviteCode
:
this
.
fillCode
,
inviteCode
:
this
.
fillCode
,
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
userId
:
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)).
userId
};
};
fillInviteCode
(
params
).
then
(
res
=>
{
fillInviteCode
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
// console.log('成功');
// console.log('成功');
this
.
inviteeCode
=
this
.
fillCode
;
this
.
inviteeCode
=
this
.
fillCode
;
}
else
{
}
else
{
this
.
$toast
.
fail
(
res
.
message
);
this
.
$toast
.
fail
(
res
.
message
);
}
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
this
.
$toast
.
fail
(
err
)
this
.
$toast
.
fail
(
err
);
});
});
},
},
fillInviterCode
()
{
fillInviterCode
()
{
...
...
This diff is collapsed.
Click to expand it.
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