|
@@ -24,7 +24,7 @@
|
|
|
</div>
|
|
|
<div class="vongi-btn vongi-login-btn">
|
|
|
<button class="mui-btn mui-btn-pink" @click="save">保 存</button>
|
|
|
- <button class="mui-btn mui-btn-danger mui-btn-outlined">删除联系人</button>
|
|
|
+ <button v-show="actionType=='edit'" @click="del" class="mui-btn mui-btn-danger mui-btn-outlined">删除联系人</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -114,6 +114,26 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ //删除
|
|
|
+ del() {
|
|
|
+ var _this = this;
|
|
|
+ var btnArray = ['取消', '确定'];
|
|
|
+ mui.confirm('确定删除此联系人吗?', '删除联系人', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ _this.isLoading = true;
|
|
|
+ API_Relatives.delPhoneNumber(_this.subForm.bookId).then(response => {
|
|
|
+ _this.isLoading = false;
|
|
|
+
|
|
|
+ mui.toast('处理成功');
|
|
|
+ _this.$router.go(-1);
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ _this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
asynCallBack() {},
|
|
|
},
|
|
|
mounted() {
|