Commit a3311932 by crushh

Merge branch 'feature/3月迭代' into dev

parents f7234e0d 839110c4
......@@ -76,6 +76,7 @@
</span>
<el-input class="m-l-10 w-399" maxlength="200" v-model="haobanObj.secretVal" placeholder="必填"></el-input>
<el-button class="m-l-20" type="text" @click="saveSecret('3')">保存</el-button>
<el-button class="m-l-20" type="text" @click="delSecret">删除</el-button>
<span v-if="haobanObj.updateTime" class="m-l-20 font-12 color-909399">最后一次保存:{{ haobanObj.updateTime | formatTimeStamp }}</span>
<span class="m-l-37 font-14 color-303133">
<span :class="['iconfont-hb3', haobanObj.checkFlag ? 'color-49c958 iconchenggong' : 'color-f83431 iconshibai']"></span>
......@@ -470,7 +471,7 @@ export default {
type: 'warning'
})
.then(() => {
that.postDel(index, row);
that.postDel(row.secretId);
})
.catch(() => {});
},
......@@ -487,10 +488,10 @@ export default {
})
.catch(() => {});
},
postDel(index, row) {
postDel(secretId) {
const that = this;
let para = {
secretId: row.secretId
secretId
};
postRequest('/haoban-manage3-web/member-secret-del', para)
.then(res => {
......@@ -561,6 +562,16 @@ export default {
}
that.postSaveSecret(flag, para);
}, 300),
/**删除 secret */
delSecret() {
this.$confirm('确定删除好办助手secret?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.postDel(this.haobanObj.secretId);
});
},
postSaveSecret(flag, para) {
const that = this;
const url = flag == 1 ? '/wx-enterprise-wx-secret-set' : flag == 2 ? 'wx-enterprise-contact-secret-set' : 'wx-enterprise-haoban-secret-set';
......@@ -625,8 +636,10 @@ export default {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = [];
let arr = [];
if (resData.result && resData.result.length) {
resData.result.forEach(ele => {
arr.push(ele.secretType);
if (ele.secretType == 1) {
that.wxObj = ele;
}
......@@ -646,6 +659,14 @@ export default {
this.paymentObj = ele;
}
});
if (!arr.includes(3)) {
this.haobanObj = {
secretType: 3,
secretVal: '',
checkFlag: 0,
updateTime: null
};
}
}
return false;
}
......
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