Browse Source

分销-申请开店

jf 5 năm trước cách đây
mục cha
commit
2f08519002

+ 6 - 1
ghsApp/src/api/invite/index.js

@@ -6,7 +6,12 @@ import https from "@/plugins/luch-request_0.0.7/request";
 export const appyleListApi = async data => {
 	return https.get("/apply/list", data);
 };
-
+/** *
+	* 获取小程序appID 姜枫 2021-03-23
+	*/
+export const getWeixinId = data => {
+	return https.get('/wx-open/get-mini-info', data)
+}
 /** *
  * 列表 b
  */

+ 9 - 9
ghsApp/src/components/app-bind-info.vue

@@ -2,11 +2,11 @@
     <view>
         <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title required" style="width:120rpx;">{{nameTetx}}</div>
-            <view 
+            <view
                 v-if="!$util.isEmpty(form.nickName)"
-                style="width:400rpx;">{{form.nickName}}
+                style="width:400rpx;padding-left: 90rpx">{{form.nickName}}
             </view>
-            <view 
+            <view
                 v-else
                 class="plart-tit"
                 style="width:400rpx; text-align:center;">
@@ -20,10 +20,10 @@
         </tui-list-cell>
         <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title required" style="width:120rpx;">手机号</div>
-            <view 
+            <view
             v-if="!$util.isEmpty(form.mobile)"
-            style="width:400rpx;">{{form.mobile}}</view>
-            <view 
+            style="width:400rpx;padding-left: 90rpx">{{form.mobile}}</view>
+            <view
                 v-else
                 class="plart-tit"
                 style="width:400rpx; text-align:center;">
@@ -35,7 +35,7 @@
                 @getphonenumber="getWxMobile"
             >帮我填</button>
         </tui-list-cell>
-          
+
     </view>
 </template>
 
@@ -114,5 +114,5 @@
         color: #666666;
         font-size: 28upx;
         font-weight: 400;
-    } 
-</style>
+    }
+</style>

+ 7 - 6
ghsApp/src/pagesClient/official/apply.vue

@@ -55,18 +55,18 @@
       </div>
       <!-- 手机号 -->
       <div class="module-com">
-          <tui-list-cell 
+          <tui-list-cell
             v-if="option.style == 1"
             class="line-cell code-wrap" :hover="false">
             <div class="tui-title">主营业务</div>
             <div>
-              <button 
+              <button
                 @click="changeMain(1)"
                 :class="['admin-button-com','mini-btn',form.main==1?'blue':'default']">
                 零售
               </button>
               <button
-                @click="changeMain(2)" 
+                @click="changeMain(2)"
                 style="margin-left:10px;" :class="['admin-button-com','mini-btn',form.main==2?'blue':'default']">
                 培训
               </button>
@@ -95,7 +95,7 @@
                 placeholder="请输入营业执照编号"
               /> -->
          </tui-list-cell>
-         
+
       </div>
       <!-- 推荐人 -->
       <div class="module-com recommend-wrap" v-if="!$util.isEmpty(merchantData)">
@@ -169,7 +169,7 @@ export default {
         // floor: "",
         longitude: "",
         latitude: "",
-        
+
       },
       showRegion: false,
       // 省市联动
@@ -224,9 +224,10 @@ export default {
     },
     // ==============
     confirmFn() {
+    	// console.log('cs',this.option.shopAdminId)
       // let id = uni.getStorageSync("introMerchantId");
       applyRegister({
-        introSjId: this.option.introMerchantId || 0,
+        shopAdminId: this.option.shopAdminId,
         ...this.form,
         style: this.option.style || 0,
         from: this.option.from || 0

+ 28 - 10
ghsApp/src/pagesInvite/list.vue

@@ -16,18 +16,18 @@
 					<view class="name"> {{ userInfo.merchantName || "" }}</view>
 					<view class="mark"> 三级代理 </view>
 				</view>
-				<button
-					id="sharekh"
-					v-if="pageIndex == 0"
-					class="user-wrap-right btn" open-type="share">
+<!--				<button id="sharekh" v-if="pageIndex == 0" class="user-wrap-right btn" open-type="share">-->
+<!--					<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />-->
+<!--				</button>-->
+				<button v-if="pageIndex == 0" class="user-wrap-right btn" @tap="toProcedure">
 					<img :src="`${constant.imgUrl}/retail/interest/invite-store.png`" alt mode="widthFix" />
 				</button>
-				<button
-					id="shareGhs"
-					v-else
-					class="user-wrap-right" open-type="share">
+				<navigator v-else class="user-wrap-right" :url="`/pagesClient/official/index?shopAdminId=${loginInfo.shopAdminId}`">
 					<img :src="`${constant.imgUrl}/ghs/me/yqghs.png`" alt mode="widthFix" />
-				</button>
+				</navigator>
+<!--				<button id="shareGhs" v-else class="user-wrap-right" open-type="share">-->
+<!--					<img :src="`${constant.imgUrl}/ghs/me/yqghs.png`" alt mode="widthFix" />-->
+<!--				</button>-->
 				<!-- <image
 					v-if="pageIndex == 0"
 					class="btn"
@@ -86,7 +86,7 @@
 <script>
 import Tabs from "@/components/plugin/tabs";
 import InviteItem from "./inviteItem";
-import { appyleListApi } from "@/api/invite/index";
+import { appyleListApi,getWeixinId } from "@/api/invite/index";
 // import { getMerchantDetail } from "@/api/merchant/index";
 import { list } from "@/mixins";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
@@ -153,6 +153,7 @@ export default {
 		};
 	},
 	onLoad() {
+		console.log(this.loginInfo.shopAdminId)
 		this.init();
 	},
 	onPullDownRefresh() {
@@ -171,6 +172,7 @@ export default {
 		}
 	},
 	onShareAppMessage(res) {
+		return
 		if (res.target.id === "shareGhs") {
 			return {
 				title: "更懂您的花卉宝",
@@ -192,6 +194,22 @@ export default {
 	mounted(){
 	},
 	methods: {
+		toProcedure(){
+			getWeixinId().then(res => {
+				uni.navigateToMiniProgram({
+					appId: res.data.hd.miniAppId,
+					path: 'pagesClient/official/index',
+					extraData: {
+						'shopAdminId': this.loginInfo.shopAdminId
+					},
+					success(res) {
+						// 打开成功
+					}
+				})
+			});
+
+		},
+
 		// async initMerchant() {
 		// 	try {
 		// 		const { data } = await getMerchantDetail();