This commit is contained in:
zhaofang
2022-10-31 12:08:22 +08:00
parent 0c2a0eec33
commit ed96c08384
2 changed files with 20 additions and 14 deletions

View File

@@ -632,7 +632,6 @@
apicourseStudy.lastStudy().then(res => { apicourseStudy.lastStudy().then(res => {
if (res.status === 200) { if (res.status === 200) {
this.lastStudy = res.result; this.lastStudy = res.result;
//console.log(this.lastStudy,'this.lastStudy');
if (res.result != '' && res.result.courseId) { if (res.result != '' && res.result.courseId) {
this.overlayShow = true; this.overlayShow = true;
} }
@@ -646,7 +645,6 @@
//引导页弹框是否显示 //引导页弹框是否显示
//检查本地,减少服务器请求的次数 //检查本地,减少服务器请求的次数
let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid); let localGuide=localStorage.getItem('user-guide-'+this.userInfo.aid);
//console.log("=== "+localGuide);
if(!localGuide){ if(!localGuide){
apiGuide.hasUser().then(res=>{ apiGuide.hasUser().then(res=>{
if(res.status==200){ if(res.status==200){
@@ -740,7 +738,6 @@
let key = 'index'; let key = 'index';
apiPlace.detail(key).then(res => { apiPlace.detail(key).then(res => {
let lmj = JSON.parse(res.result.content) let lmj = JSON.parse(res.result.content)
console.log(lmj,'lmj');
this.resonimg = lmj; this.resonimg = lmj;
}) })
}, },

View File

@@ -29,13 +29,13 @@
</div> </div>
<div class="informationItem"> <div class="informationItem">
<div class="information-header"> <div class="information-header">
<h4>个人签名</h4> <h4>个人签名<svg-icon v-show="!signData.isEdit" type="primary" @click="signData.isEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon></h4>
</div> </div>
<div class="base-info"> <div class="base-info">
<label class="label" style="min-width:70px;text-align: left;">我的签名</label> <label class="label" style="min-width:70px;text-align: left;">我的签名</label>
<p class="info-text" style="width:540px" v-show="!signData.isEdit"> <p class="info-text" style="width:540px" v-show="!signData.isEdit">
{{form.sign}} {{form.sign}}
<svg-icon v-show="!signData.isEdit" type="primary" @click="signData.isEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon>
</p> </p>
<el-input v-show="signData.isEdit" style="width:40%;height:40px" type="textarea" maxlength="20" v-model="signData.sign" :rows="1"></el-input> <el-input v-show="signData.isEdit" style="width:40%;height:40px" type="textarea" maxlength="20" v-model="signData.sign" :rows="1"></el-input>
<el-button v-show="signData.isEdit" style="margin-left:110px" @click="signData.isEdit = false">取消</el-button> <el-button v-show="signData.isEdit" style="margin-left:110px" @click="signData.isEdit = false">取消</el-button>
@@ -45,24 +45,27 @@
</div> </div>
<div class="informationItem"> <div class="informationItem">
<div class="information-header"> <div class="information-header">
<h4>个人主页设置</h4> <h4>个人主页设置<svg-icon v-show="!hideHomeEdit" type="primary" @click="hideHomeEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon></h4>
</div> </div>
<div class="dynamic-range"> <el-checkbox v-model="hideHome"> 关闭个人主页 </el-checkbox> <div class="dynamic-range">
<el-radio v-model="hideHome" :label="true">关闭个人主页</el-radio>
<el-button style="margin-left:110px" type="primary" @click="saveHideHome()">保存</el-button> <el-radio v-model="hideHome" :label="false">打开个人主页</el-radio>
<!-- <el-checkbox v-model="hideHome"> 关闭个人主页 </el-checkbox> -->
<el-button v-show="hideHomeEdit" style="margin-left:110px" @click="hideHomeEdit = false">取消</el-button>
<el-button v-show="hideHomeEdit" type="primary" @click="saveHideHome()">保存</el-button>
<!-- <el-button v-show="!dynamicData.isEdit" style="margin-left:110px" type="primary" @click="dynamicData.isEdit = true">编辑</el-button> --> <!-- <el-button v-show="!dynamicData.isEdit" style="margin-left:110px" type="primary" @click="dynamicData.isEdit = true">编辑</el-button> -->
</div> </div>
</div> </div>
<div class="informationItem"> <div class="informationItem">
<div class="information-header"> <div class="information-header">
<h4>动态可见范围</h4> <h4>动态可见范围<svg-icon v-show="!dynamicDataEdit" type="primary" @click="dynamicDataEdit = true" icon-class="passWard-edit" style="margin-left: 10px;font-size: 18px;cursor: pointer;"></svg-icon></h4>
</div> </div>
<div class="dynamic-range"> <div class="dynamic-range">
<el-radio v-model="form.dynamic" :label="1">全部动态</el-radio> <el-radio v-model="form.dynamic" :label="1">全部动态</el-radio>
<el-radio v-model="form.dynamic" :label="2">最近半年动态</el-radio> <el-radio v-model="form.dynamic" :label="2">最近半年动态</el-radio>
<el-radio v-model="form.dynamic" :label="3">最近三个月动态</el-radio> <el-radio v-model="form.dynamic" :label="3">最近三个月动态</el-radio>
<!-- <el-button v-show="dynamicData.isEdit" style="margin-left:110px" @click="dynamicData.isEdit = false">取消</el-button> --> <el-button v-show="dynamicDataEdit" style="margin-left:110px" @click="dynamicDataEdit = false">取消</el-button>
<el-button style="margin-left:110px" type="primary" @click="saveDynamic()">保存</el-button> <el-button type="primary" v-show="dynamicDataEdit" @click="saveDynamic()">保存</el-button>
<!-- <el-button v-show="!dynamicData.isEdit" style="margin-left:110px" type="primary" @click="dynamicData.isEdit = true">编辑</el-button> --> <!-- <el-button v-show="!dynamicData.isEdit" style="margin-left:110px" type="primary" @click="dynamicData.isEdit = true">编辑</el-button> -->
</div> </div>
</div> </div>
@@ -187,6 +190,8 @@
} }
}; };
return { return {
dynamicDataEdit:false,
hideHomeEdit:false,
signData:{ signData:{
sign:'', sign:'',
isEdit:false isEdit:false
@@ -236,6 +241,9 @@
} }
}, },
watch:{ watch:{
// hideHome() {
// this.hideHomeEdit = true;
// },
dialogVisiblePassword(val) { dialogVisiblePassword(val) {
if(!val) { if(!val) {
this.passwordForm={}; this.passwordForm={};
@@ -254,7 +262,6 @@
if(this.userInfo.avatar){ if(this.userInfo.avatar){
this.avatarUrl = this.avatar; this.avatarUrl = this.avatar;
} }
console.log("sss "+this.userInfo.showHome);
this.hideHome = !this.userInfo.showHome; this.hideHome = !this.userInfo.showHome;
this.load(); this.load();
this.getInfo(); this.getInfo();
@@ -266,8 +273,9 @@
// 保存个人主页选项的编辑 // 保存个人主页选项的编辑
saveHideHome(){ saveHideHome(){
//执行隐藏操作 //执行隐藏操作
userApi.updateShowHome(!this.hideHome).then(res=>{ userApi.updateShowHome(this.hideHome).then(res=>{
if(res.status == 200) { if(res.status == 200) {
this.hideHomeEdit = false;
//this.userInfo.showHome = !this.hideHome; //this.userInfo.showHome = !this.hideHome;
this.$message.success('修改成功'); this.$message.success('修改成功');
this.$store.dispatch('InitData'); this.$store.dispatch('InitData');
@@ -301,6 +309,7 @@
saveDynamic() { saveDynamic() {
userApi.updateDynamic(this.form.dynamic).then(res=>{ userApi.updateDynamic(this.form.dynamic).then(res=>{
if(res.status == 200) { if(res.status == 200) {
this.dynamicDataEdit = false;
this.$message.success('修改动态可见范围成功'); this.$message.success('修改动态可见范围成功');
} }
}) })