fuwei 5 лет назад
Родитель
Сommit
e0685b4c4c

+ 1 - 1
ghs/src/admin/home/apply.vue

@@ -78,7 +78,7 @@
                         list:[{
                             name: "邀请开店",
                             img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,
-                            url: "/admin/interest/my-invite"
+                            url: "/pagesShare/interest/my-invite"
                         }]
                     },
                     {

+ 1 - 1
ghs/src/admin/home/workbench.vue

@@ -252,7 +252,7 @@ export default {
         {
           name: "邀请开店",
           img: `${this.$constant.imgUrl}/ghs/home/yqyl.png`,
-          url: "/admin/interest/my-invite"
+          url: "/pagesShare/interest/my-invite"
         },
         {
           name: "客户列表",

+ 3 - 3
ghs/src/api/proxy/index.js

@@ -10,6 +10,6 @@ export const assetDet = data => {
 /** *
  * 我的代理列表 b
  */
-export const applyList = data => {
-	return https.get('/apply/list', data)
-}
+// export const applyList = data => {
+// 	return https.get('/apply/list', data)
+// }

+ 4 - 0
ghs/src/api/store/index.js

@@ -1,4 +1,8 @@
 import https from '@/plugins/luch-request_0.0.7/request'
+
+export const applyList = data => {
+	return https.get('/apply/list', data)
+}
 // export const mainMy = async (data) => {
 // 	return https.get("/main/my", data);
 // };

+ 37 - 9
ghs/src/components/plugin/tabs.vue

@@ -17,13 +17,14 @@
 			class="item-wrap"
 			:style="{ width: isAdd ? `calc(100% - ${addTabWidth + 30}rpx)` : '100%' }"
 		>
+			<!-- { 'border-left': borderLeft }, -->
 			<view
 				v-for="(item, index) in tabs"
 				:key="index"
+					
 				:class="[
 					'tui-tabs-item',
-					{ active: currentTab == index },
-					{ 'border-left': borderLeft }
+					{ active: currentTab == index },	
 				]"
 				:style="{ width: itemWidth }"
 				@tap.stop="swichTabs(item,index)"
@@ -32,7 +33,8 @@
 					class="tui-tabs-title"
 					:class="{
 						'tui-tabs-active': currentTab == index,
-						'tui-tabs-disabled': item.disabled
+						'tui-tabs-disabled': item.disabled,
+						'border-left': borderLeft && !(index == tabs.length -1)
 					}"
 					:style="{
 						fontSize: size + 'rpx',
@@ -271,14 +273,26 @@ export default {
 	z-index: 9;
 	.tui-tabs-item {
 		&.border-left {
-			border-left: 2px solid #ddd;
-		}
-	}
-	.tui-tabs-item:first-child {
-		&.border-left {
-			border-left: none;
+			position: relative;
+			&::after {
+				// content: '';
+				// width: 2upx;
+				// height: 65%;
+				// position: absolute;
+				// left: 0upx;
+				// top: 50%;
+				// transform: translate(0,-50%);
+			// 	background-color: #ddd;
+			}
 		}
 	}
+	// .tui-tabs-item:first-child {
+	// 	&.border-left {
+	// 		&::after {
+	// 			content: '';
+	// 		}
+	// 	}
+	// }
 }
 .tui-tabs-view-shadow {
 	box-shadow: 4px 4px 10px #eee;
@@ -354,6 +368,20 @@ export default {
 	position: relative;
 	z-index: 2;
 	width: 100%;
+	&.border-left {
+		&::after {
+		content: '';
+		width: 2upx;
+		height: 40upx;
+		position: absolute;
+		right: 0upx;
+		top: 50%;
+		transform: translate(0,-50%);
+		background-color: #ddd;
+		}
+	}
+	&.border-left {
+	}
 }
 .tabs-title {
 	text-align: center;

+ 6 - 23
ghs/src/pages.json

@@ -125,6 +125,12 @@
 					"style": {
 						"navigationBarTitleText": "付款"
 					}
+				},
+				{
+					"path": "interest/my-invite",
+					"style": {
+						"navigationBarTitleText": "我的邀请"
+					}
 				}
 			]
 		},
@@ -191,29 +197,6 @@
 				}
 			]
 		},
-		{
-			"root": "admin/interest",
-			"pages": [
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "邀请列表"
-					}
-				},
-				{
-					"path": "my-invite",
-					"style": {
-						"navigationBarTitleText": "我的邀请"
-					}
-				},
-				{
-					"path": "setting",
-					"style": {
-						"navigationBarTitleText": "邀请奖励设置"
-					}
-				}
-			]
-		},
 		{
 			"root": "admin/coupon",
 			"pages": [

+ 0 - 0
ghs/src/admin/interest/invite.vue → ghs/src/pagesShare/interest/invite.vue


+ 48 - 17
ghs/src/admin/interest/my-invite.vue → ghs/src/pagesShare/interest/my-invite.vue

@@ -1,23 +1,31 @@
 <template>
   <div class="app-content">
+    <app-tabs borderLeft :tabs="optionsType" :currentTab="roleIndex" @change="roleChange" itemWidth="50%" :padding="0" />
     <div class="rank-wrap">
       <div class="user-blo">
         <div class="user-wrap">
           <div class="user-wrap-left">
             <app-avatar-module :width="100" />
             <div class="user-det">
-              <!-- <div class="user-name">{{ userInfo.merchantName }}</div> -->
+              <div class="user-name">{{ userInfo.merchantName }}</div>
               <div class="app-color-3">三级代理</div>
             </div>
           </div>
           <!-- #ifdef H5 -->
-          <div class="user-wrap-right" @click="showShare = true">
+          <!-- <div class="user-wrap-right" @click="showShare = true">
             <img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
-          </div>
+          </div> -->
           <!-- #endif -->
           <!-- #ifdef MP-WEIXIN -->
-          <button class="user-wrap-right" open-type="share">
+          <button
+            v-if="roleIndex == 1"
+            class="user-wrap-right" open-type="share">
             <img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
+          </button>
+           <button
+            v-else
+            class="user-wrap-right" open-type="share">
+            <img :src="`${constant.imgUrl}/ghs/me/yqghs.png`" alt mode="widthFix" />
           </button>
           <!-- #endif -->
         </div>
@@ -70,7 +78,8 @@ import AppShareMask from "@/components/module/app-share-mask";
 import { list, share } from "@/mixins";
 // api
 import { getUser } from "@/utils/auth";
-import { assetDet, applyList } from "@/api/proxy";
+// assetDet
+import { applyList } from "@/api/store/index";
 export default {
   name: "my-invite-list",
   components: {
@@ -86,6 +95,15 @@ export default {
       showShare: false,
       data: {},
       tabIndex: 0,
+      roleIndex: 0,
+      optionsType:[
+        {
+          name:'供货商'
+        },
+        {
+          name:'零售店铺'
+        }
+      ],
       tabs: [
         {
           name: "全部"
@@ -130,8 +148,16 @@ export default {
   },
   onLoad() {},
   methods: {
+    roleChange(e){
+       if (this.roleIndex == e.index) {
+        return false;
+      } else {
+        this.roleIndex = e.index;
+        this.init()
+      }
+    },
     init() {
-      this._assetDet();
+      // this._assetDet();
       this._applyList();
       getUser().then(res => {
         let params = {
@@ -143,21 +169,25 @@ export default {
         this.jweixinFn(params);
       });
     },
-    _assetDet() {
-      assetDet().then(res => {
-        if (this.$util.isEmpty(res.data)) {
-          return false;
-        }
-        this.data = res.data;
+    // _assetDet() {
+    //   assetDet().then(res => {
+    //     if (this.$util.isEmpty(res.data)) {
+    //       return false;
+    //     }
+    //     this.data = res.data;
+    //     this.userData[0].value = res.data.balance | 0.0;
+    //     this.userData[1].value = res.data.inviteNum | 0;
+    //     this.userData[2].value = res.data.payNum | 0;
+    //     this.userData[3].value = res.data.income | 0.0;
+    //   });
+    // },
+    _applyList() {
+      let status = this.getStatus(this.tabIndex);
+      return applyList({ status: status, style:this.roleIndex==0?2:1}).then(res => {
         this.userData[0].value = res.data.balance | 0.0;
         this.userData[1].value = res.data.inviteNum | 0;
         this.userData[2].value = res.data.payNum | 0;
         this.userData[3].value = res.data.income | 0.0;
-      });
-    },
-    _applyList() {
-      let status = this.getStatus(this.tabIndex);
-      return applyList({ status: status }).then(res => {
         this.completes(res);
       });
     },
@@ -206,6 +236,7 @@ export default {
 // 头部
 .rank-wrap {
   background-color: #fff;
+  margin-top: 20upx;
   .user-blo {
     padding: 40px 30px 28px 30px;
   }

+ 0 - 0
ghs/src/admin/interest/setting.vue → ghs/src/pagesShare/interest/setting.vue