上传代码
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
<template>
|
||||
<view class="return" @click="Return">
|
||||
<image
|
||||
style="width: 40rpx; height: 40rpx"
|
||||
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="container">
|
||||
<button class="login-btn" open-type="chooseAvatar" @chooseavatar="Userinfo">
|
||||
<image class="avatar" :src="userinfo"></image>
|
||||
@@ -24,7 +31,7 @@ export default {
|
||||
inject: ["$global"],
|
||||
data() {
|
||||
return {
|
||||
userinfo:"",
|
||||
userinfo: "",
|
||||
name: "",
|
||||
id: "",
|
||||
info: {},
|
||||
@@ -60,6 +67,12 @@ export default {
|
||||
// this.id = JSON.parse(info).id
|
||||
},
|
||||
methods: {
|
||||
// 返回首页
|
||||
Return() {
|
||||
uni.reLaunch({
|
||||
url: "/pages/Home/Home",
|
||||
});
|
||||
},
|
||||
// 输入昵称
|
||||
inputName(e) {
|
||||
this.name = e.detail.value;
|
||||
@@ -71,10 +84,7 @@ export default {
|
||||
},
|
||||
// 微信登录
|
||||
async wxLogin(e) {
|
||||
if (
|
||||
this.name !== "" &&
|
||||
this.userinfo !== ""
|
||||
) {
|
||||
if (this.name !== "" && this.userinfo !== "") {
|
||||
uni.showLoading({
|
||||
title: "登录中...",
|
||||
mask: true,
|
||||
@@ -116,7 +126,7 @@ export default {
|
||||
//````````````````````````````````````````````````````````````````````
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
@@ -170,4 +180,10 @@ export default {
|
||||
background-color: #11cb2a00;
|
||||
color: #fff;
|
||||
}
|
||||
.return {
|
||||
position: fixed;
|
||||
top: 100rpx;
|
||||
left: 80rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user