Commit fb9fbe93 authored by leiqingsong's avatar leiqingsong

修改

parent cd5fe4ca
...@@ -27,7 +27,6 @@ export default { ...@@ -27,7 +27,6 @@ export default {
"Publish", "Publish",
"FastestProgress", "FastestProgress",
"MonthAward", "MonthAward",
"Instructions",
"Settings", "Settings",
"Grade", "Grade",
"AirDrop", "AirDrop",
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
<div class="invite-code"> <div class="invite-code">
<div class="nav"> <div class="nav">
<van-icon <van-icon
name="arrow-left" name="arrow-left"
size="20" size="20"
class="nav-left" class="nav-left"
@click="$router.go(-1)" color="#ffffff"
@click="$router.go(-1)"
/> />
<img :src="imgSrc" alt="" class="imgCode" /> <img :src="imgSrc" alt="" class="imgCode" />
</div> </div>
...@@ -54,7 +55,7 @@ export default { ...@@ -54,7 +55,7 @@ export default {
.invite-code { .invite-code {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: url("../assets/images/invite1.png"); background: url("../assets/images/invite_1.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.imgCode { .imgCode {
......
...@@ -60,8 +60,10 @@ export default { ...@@ -60,8 +60,10 @@ export default {
}); });
}, },
onRead(file) { onRead(file) {
this.avatar = file.content; if (!localStorage.getItem('user').inviteCode) {
console.log("file", file); this.$toast.fail('当前用户没有邀请码');
return
}
const inviteCode = JSON.parse(localStorage.getItem('user').inviteCode); const inviteCode = JSON.parse(localStorage.getItem('user').inviteCode);
const params = { const params = {
inviteCode: inviteCode inviteCode: inviteCode
...@@ -70,8 +72,12 @@ export default { ...@@ -70,8 +72,12 @@ export default {
fd.append("files", file.file); fd.append("files", file.file);
uploadImage(params, fd).then(res => { uploadImage(params, fd).then(res => {
console.log(res); console.log(res);
this.avatar = file.content;
this.imageUrl = res.zxUrl; this.imageUrl = res.zxUrl;
this.canSubmit = true; this.canSubmit = true;
}).catch(err => {
console.log('上传图像', err);
this.$toast.fail('图片上传失败,请重新选择');
}); });
}, },
onDeleteAvatar(file, detail) { 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