Commit fb9fbe93 authored by leiqingsong's avatar leiqingsong

修改

parent cd5fe4ca
......@@ -27,7 +27,6 @@ export default {
"Publish",
"FastestProgress",
"MonthAward",
"Instructions",
"Settings",
"Grade",
"AirDrop",
......
......@@ -5,6 +5,7 @@
name="arrow-left"
size="20"
class="nav-left"
color="#ffffff"
@click="$router.go(-1)"
/>
<img :src="imgSrc" alt="" class="imgCode" />
......@@ -54,7 +55,7 @@ export default {
.invite-code {
width: 100%;
height: 100vh;
background: url("../assets/images/invite1.png");
background: url("../assets/images/invite_1.png");
background-repeat: no-repeat;
background-size: 100% 100%;
.imgCode {
......
......@@ -60,8 +60,10 @@ export default {
});
},
onRead(file) {
this.avatar = file.content;
console.log("file", file);
if (!localStorage.getItem('user').inviteCode) {
this.$toast.fail('当前用户没有邀请码');
return
}
const inviteCode = JSON.parse(localStorage.getItem('user').inviteCode);
const params = {
inviteCode: inviteCode
......@@ -70,8 +72,12 @@ export default {
fd.append("files", file.file);
uploadImage(params, fd).then(res => {
console.log(res);
this.avatar = file.content;
this.imageUrl = res.zxUrl;
this.canSubmit = true;
}).catch(err => {
console.log('上传图像', err);
this.$toast.fail('图片上传失败,请重新选择');
});
},
onDeleteAvatar(file, detail) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment