Bladeren bron

feat:解除绑定

zhanghui 1 jaar geleden
bovenliggende
commit
ae1f3e385e

+ 9 - 0
common/js/service.js

@@ -3,6 +3,15 @@ import request from '../js/request.js';
 
 export default {
 
+    //解除绑定
+    unbind(data) {
+        return request({
+            url: '/expand/app/unbind',
+            method: 'POST',
+            data: data
+        })
+    },
+
     //给专员添加备注
     addRemark(data) {
         return request({

+ 4 - 8
pages/my/my.vue

@@ -75,14 +75,10 @@
 
 		<view class="flex-col justify-start list">
 			<uni-list :border="false">
-				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的分组" to="/pages/myGroup/myGroup"
-					showArrow thumb="/static/my/fenzu.png" thumb-size="sm" />
-				<uni-list-item v-if="userInfo.isExtensionWorker == 1" :clickable="true" title="推广码" showArrow
-					thumb="/static/my/qr.png" thumb-size="sm" @click="openQrCord" />
-				<uni-list-item v-if="userInfo.roleTag == 1" :clickable="true" title="购买优惠券"
-					to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm" />
-				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="拓客排行榜" to="/pages/spreadRankingList/spreadRankingList"
-							   showArrow thumb="/static/my/ranking.png" thumb-size="sm"/>
+				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的分组" to="/pages/myGroup/myGroup" showArrow thumb="/static/my/fenzu.png" thumb-size="sm" />
+				<uni-list-item v-if="userInfo.isExtensionWorker == 1" :clickable="true" title="推广码" showArrow thumb="/static/my/qr.png" thumb-size="sm" @click="openQrCord" />
+				<uni-list-item v-if="userInfo.roleTag == 1" :clickable="true" title="购买优惠券" to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm" />
+				<uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="拓客排行榜" to="/pages/spreadRankingList/spreadRankingList" showArrow thumb="/static/my/ranking.png" thumb-size="sm"/>
 			</uni-list>
 		</view>
 

+ 7 - 0
pages/specialistsDetail/index.rpx.css

@@ -34,3 +34,10 @@
     max-height: 900rpx;
     overflow: hidden;
 }
+.jiechuBtn{
+    margin-top: 60rpx;
+    width: 200rpx;
+    height: 80rpx;
+    font-size: 30rpx;
+    line-height: 80rpx;
+}

+ 37 - 1
pages/specialistsDetail/specialistsDetail.vue

@@ -12,7 +12,7 @@
 
         <swiper class="swiper" :style="{height:height}" :current="current" @change="swiperChange">
             <swiper-item>
-                <view class="msg" :style="{height:height}">
+                <view class="msg bord" :style="{height:height}">
                     <view class="flex-row justify-between msgItem">
                         <view>
                             <text>头像</text>
@@ -77,8 +77,15 @@
                         </view>
                     </view>
 
+
+                    <view class="flex-row justify-center">
+                        <button class="jiechuBtn" type="warn" @click="unbind">解除绑定</button>
+                    </view>
+
+
                 </view>
 
+
             </swiper-item>
 
             <swiper-item>
@@ -134,6 +141,35 @@
         },
         methods: {
 
+            unbind(){
+                let that = this
+                uni.showModal({
+                    title: '危险操作',
+                    content: '解除绑定后不可恢复,请再次确认!',
+                    success: function (res) {
+                        if (res.confirm) {
+                            console.log('用户点击确定');
+                            that.$api.service.unbind({
+                                id:that.expandUserId
+                            }).then(res=>{
+                                uni.$u.toast("解除绑定成功")
+                                console.log(res)
+
+                                uni.navigateBack({
+                                    delta: 1
+                                });
+
+                            })
+
+                        } else if (res.cancel) {
+                            console.log('用户点击取消');
+                        }
+                    }
+                });
+
+
+            },
+
             amplifier(url){
                 this.amplifierUrl = url
                 this.$refs.amplifierPopup.open()

+ 3 - 1
pages/specialistsList/specialistsList.vue

@@ -30,10 +30,12 @@
 			}
 		},
 		onLoad(e) {
-
 			let sysInfo = uni.getSystemInfoSync()
 			this.height = sysInfo.windowHeight  - 70 + 'px' //除标题栏栏外的屏幕可用高度
 		},
+		onShow(){
+			this.$refs.MescrollItem.downCallback()
+		},
 		methods: {
 			openAddRemarkPopup(e){
 				this.$refs.addRemarkPopup.openPopup(e)

+ 2 - 2
pages/todaySpecialistsList/module/mescrollUni-item.vue

@@ -15,12 +15,12 @@
 					</view>
 					<view class="flex-row justify-between msg">
 						<text>{{item.phone}}</text>
-						<text class="detail" @click="navigateToPage('/pages/specialistsDetail/specialistsDetail')">详情</text>
+						<text class="detail" @click="navigateToPage('/pages/specialistsDetail/specialistsDetail?id=' + item.id)">详情</text>
 					</view>
 				</view>
 				<view class="flex-row justify-between">
 					<text class="time">{{item.createTime}}</text>
-					<text class="remark" @click="openAddRemarkPopup('eeeeeeeeeeeee')">备注</text>
+					<text class="remark" @click="openAddRemarkPopup(item.id)">备注</text>
 				</view>
 			</view>
 		</view>

+ 5 - 0
pages/todaySpecialistsList/todaySpecialistsList.vue

@@ -35,6 +35,11 @@
             let sysInfo = uni.getSystemInfoSync()
             this.height = sysInfo.windowHeight  - 50 + 'px' //除标题栏栏外的屏幕可用高度
         },
+
+        onShow(){
+            this.$refs.MescrollItem.downCallback()
+        },
+
         methods: {
             back() {
                 let pages = getCurrentPages()