Commit 716e227a by LJM

css

parent dbeb1a5e
Showing with 38 additions and 14 deletions
......@@ -28,17 +28,23 @@
<div class="tip" style="margin-top: 20px">猎芯联系渠道</div>
<el-form :inline="true" :model="userinfo" label-width="124px">
<el-form-item label="猎芯专属采购经理">
<el-input v-model="userinfo.company_name" placeholder=""></el-input>
<el-input v-model="userinfo.sku_user_info.name" placeholder="" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="userinfo.contacts_name"></el-input>
<el-input v-model="userinfo.sku_user_info.mobile" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="userinfo.sku_user_info.email" :readonly="true"></el-input>
</el-form-item>
<br>
<el-form-item label="猎芯渠道经理">
<el-input v-model="userinfo.mobile"></el-input>
<el-input v-model="userinfo.channel_user_info.name" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="userinfo.email"></el-input>
<el-input v-model="userinfo.channel_user_info.mobile" :readonly="true"></el-input>
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="userinfo.channel_user_info.email" :readonly="true"></el-input>
</el-form-item>
</el-form>
<div class="tip" style="margin-top: 20px">意见反馈渠道</div>
......@@ -51,7 +57,7 @@
</el-form-item>
</el-form>
<el-row>
<el-button type="primary">编辑</el-button>
<el-button type="primary" @click="submituser">编辑</el-button>
</el-row>
</div>
<Menu/>
......@@ -62,10 +68,10 @@ import Vue from 'vue';
import Menu from "@/components/menu.vue";
import {NODE_ENVS} from "../../ajax";
import Tool from '../../tool'
import {Form, FormItem, Input, Message, Upload} from 'element-ui'
import {Form, FormItem, Input, Message, Row, Upload} from 'element-ui'
Vue.prototype.$message = Message
Vue.use(Form).use(FormItem).use(Input).use(Upload)
Vue.prototype.$message = Message;
Vue.use(Form).use(FormItem).use(Input).use(Upload).use(Row);
export default {
name: "message",
data() {
......@@ -102,30 +108,48 @@ export default {
contacts_name: this.userinfo.contacts_name
}).then(res => {
if (res.code === 0) {
this.$message("提交成功");
this.$message({
message: '操作成功',
type: 'success'
});
sessionStorage.removeItem('userInfox')
} else {
this.$message(res.msg);
this.$message({
message: res.msg,
type: 'warning'
});
}
})
},
handleAvatarSuccess(res, file) {
if (res.code === 0) {
this.$message("设置成功")
this.$message({
message: '设置成功',
type: 'success'
});
this.userinfo.avatar = URL.createObjectURL(file.raw);
sessionStorage.removeItem('userInfox')
} else {
this.$message(res.msg);
this.$message({
message: res.msg,
type: 'warning'
});
}
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/gif';
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isJPG) {
this.$message('上传头像图片只能是 JPG、PNG、GIF 格式!');
this.$message({
message: '上传头像图片只能是 JPG、PNG、GIF 格式!',
type: 'warning'
});
}
if (!isLt2M) {
this.$message('上传头像图片大小不能超过 5MB!');
this.$message({
message: '上传头像图片大小不能超过 5MB!',
type: 'warning'
});
}
return isJPG && isLt2M;
}
......
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 sign in to comment