فهرست منبع

feat:解绑服务对象

zhanghui 3 ماه پیش
والد
کامیت
9bfca8642b
2فایلهای تغییر یافته به همراه53 افزوده شده و 0 حذف شده
  1. 9 0
      common/js/api.js
  2. 44 0
      myPages/serviceObjectAllInfo/index.vue

+ 9 - 0
common/js/api.js

@@ -1091,4 +1091,13 @@ export default {
         })
     },
 
+    // 解绑服务对象
+    unbindServiceObject(data) {
+        return request({
+            url: '/member/wechat/unbindServiceObject',
+            method: 'post',
+            data: data
+        })
+    },
+
 }

+ 44 - 0
myPages/serviceObjectAllInfo/index.vue

@@ -212,6 +212,10 @@
       <view class="btn">保存</view>
     </view>
 
+    <view @click="unbindServiceObject" class="sure-btn">
+      <view class="btn1">解绑</view>
+    </view>
+
     <!-- 性别选择 -->
     <u-picker :show="genderShow" keyName="gender" @confirm="sureChooseGender" :columns="genderList"></u-picker>
       <cropper selWidth="660rpx" selHeight="660rpx" ref="cropper" quality="0.5" @uploadImg="uploadCropImg"  @upload="userInfo.facePhotoUrl" />
@@ -302,6 +306,34 @@ export default {
   },
   methods: {
 
+    unbindServiceObject(){
+      let that = this
+
+      uni.showModal({
+        title: '温馨提示',
+        content: '解绑后您将无法看到该服务对象的信息!确定解绑?',
+        success: function (res) {
+          if (res.confirm) {
+            console.log('用户点击确定');
+
+            that.$api.unbindServiceObject({
+              id:that.userInfo.id
+            }).then(res=>{
+              uni.showToast({
+                icon: 'none',
+                title: '解绑成功!'
+              })
+            })
+
+          } else if (res.cancel) {
+            console.log('用户点击取消');
+          }
+        }
+      })
+
+
+    },
+
     uploadCropImg(e){
       uni.compressImage({
         src: e,
@@ -666,6 +698,18 @@ export default {
       margin-top: 12px;
       font-size: 14px;
     }
+
+    .btn1 {
+      text-align: center;
+      height: 42px;
+      background: red;
+      border-radius: 27px;
+      color: #ffffff;
+      line-height: 42px;
+      margin-top: 12px;
+      font-size: 14px;
+    }
+
   }
 }