浏览代码

加入商户

zhaoxiaohai 3 年之前
父节点
当前提交
5ac49e8462

+ 2 - 2
app.json

@@ -43,10 +43,10 @@
         "pages/businessPartner/details",
         "pages/businessPartner/applyFor",
         "pages/storeMessage/select",
-        "pages/storeMessage/join",
         "pages/storeMessage/storehomepage",
         "pages/storeMessage/editor/editor",
-        "pages/webView/index"
+        "pages/webView/index",
+        "pages/teamManagement/applyFor"
     ],
     "usingComponents": {
         "van-button": "@vant/weapp/button/index",

+ 13 - 2
components/My_SearchInputBox/index.js

@@ -31,6 +31,11 @@ Component({
         inputRadius: {
             type: String,
             value: "10"
+        },
+        /* 邀请按钮 */
+        invitation: {
+            type: Boolean,
+            value: false
         }
     },
 
@@ -68,12 +73,18 @@ Component({
                 wx.navigateTo({
                     url: '/pages/teamManagement/change',
                 })
-            } else if(this.data.route == 'consociation'){
+            } else if (this.data.route == 'consociation') {
                 wx.navigateTo({
-                  url: '/pages/businessPartner/applyFor',
+                    url: '/pages/businessPartner/applyFor',
                 })
             }
         },
+        /* 团队成员邀请 */
+        InvitedToEnter() {
+            wx.navigateTo({
+                url: '/pages/teamManagement/applyFor',
+            })
+        },
         /* 清空 */
         clearInput() {
             this.setData({

+ 3 - 0
components/My_SearchInputBox/index.wxml

@@ -6,6 +6,9 @@
         </view>
     </view>
     <view class="searc" wx:else style="opacity: 0;"></view>
+    <view class="searc_but" catchtap="InvitedToEnter" wx:if="{{invitation}}">
+        <image style="width: 26rpx; height: 22rpx;" src="/static/icon-12.png" />邀请
+    </view>
     <view class="searc_but" bindtap="itemAdd" wx:if="{{fisadministrator}}">
         <van-icon wx:if="{{butText=='新增'}}" name="add" />{{butText}}
     </view>

+ 0 - 66
pages/storeMessage/join.js

@@ -1,66 +0,0 @@
-// pages/storeMessage/join.js
-Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 3
pages/storeMessage/join.json

@@ -1,3 +0,0 @@
-{
-  "usingComponents": {}
-}

+ 0 - 14
pages/storeMessage/join.wxml

@@ -1,14 +0,0 @@
-<My_GeneralTemplate padTop="50rpx" padBot="40rpx">
-    <view style="padding: 0 30rpx;">
-        <My_GreyRectangleForm title="商户组织">
-            <van-field autosize disabled="{{isDisabled}}" model:value="{{ fbrand }}" input-class="input-class" placeholder="点击选择" border="{{ false }}" />
-        </My_GreyRectangleForm>
-        <My_GreyRectangleForm title="商户编码">
-            <van-field autosize disabled="{{isDisabled}}" type="number" model:value="{{ fbrand }}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
-        </My_GreyRectangleForm>
-    </view>
-</My_GeneralTemplate>
-<!-- 提交按钮 -->
-<view wx:if="{{!isDisabled}}" class="submit_but">
-    <van-button bindtap="submit" custom-class="custom-class" round color="linear-gradient(180deg, #82E0E9 0%, #4BBECF 100%);">申请加入</van-button>
-</view>

+ 0 - 1
pages/storeMessage/join.wxss

@@ -1 +0,0 @@
-@import "/css/form2.wxss";

+ 7 - 6
pages/storeMessage/select.js

@@ -32,13 +32,14 @@ Page({
                 url: '/pages/storeMessage/index',
             })
         } else {
-            wx.showToast({
-                title: '功能尚在开发中,请联系商户管理邀请加入团队',
-                icon: 'none'
+            wx.scanCode({
+                success(res) {
+                    console.log("扫码", res)
+                },
+                fail(err) {
+                    console.log(err)
+                }
             })
-            /* wx.redirectTo({
-                url: '/pages/storeMessage/join',
-            }) */
         }
     },
 

+ 108 - 0
pages/teamManagement/applyFor.js

@@ -0,0 +1,108 @@
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel;
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        requestList: [], //请求列表
+        showBtn: -1, //选中下标
+        pattern: false, //显示方式选择
+        tabsList: ['商户二维码', '加入请求'], //tabs
+        tabsIndex: 0, //tabs 选中下标
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {},
+    /* tabs切换页面 */
+    setIndex({
+        detail
+    }) {
+        this.setData({
+            tabsIndex: detail
+        })
+    },
+    /* 下拉触底 */
+    scrolltolower() {
+        if (!this.data.scrolltolowerThrottle) return;
+        if (this.data.pageTotal < this.data.pageNumber) return;
+        this.setData({
+            scrolltolowerThrottle: false
+        })
+        this.getList();
+    },
+    /* 获得列表 */
+    getList() {},
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+    /* 选择 */
+    showBtnIndex(e) {
+        const {
+            index
+        } = e.currentTarget.dataset;
+        this.closeTheDropDown();
+        if (index == this.data.showBtn) return;
+        this.setData({
+            pattern: false,
+            showBtn: index,
+        })
+    },
+    /* 同意 */
+    ratify(e) {
+        console.log('同意')
+    },
+    /* 拒绝 */
+    refuse(e) {
+        console.log('拒绝')
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/teamManagement/applyFor.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "My_DisplayBox": "/components/My_DisplayBox/index",
+    "My_TwoDimensionalCode": "/components/My_TwoDimensionalCode/index"
+  }
+}

+ 23 - 0
pages/teamManagement/applyFor.wxml

@@ -0,0 +1,23 @@
+<!-- tabs -->
+<My_NavTabs tabsList="{{tabsList}}" bindsetIndex="setIndex"></My_NavTabs>
+<!-- 二维码 -->
+<My_TwoDimensionalCode wx:if="{{tabsIndex==0}}" title="商户二维码" codeName="商户二维码"></My_TwoDimensionalCode>
+<!-- 列表 -->
+<My_DisplayBox wx:else title="请求列表" isMore="{{false}}">
+    <image slot="display-box-img" class="display-title_image" src="/static/icon-05.png" mode="aspectFit"></image>
+    <scroll-view class="list-scroll-view" scroll-y bindscrolltolower="scrolltolower">
+        <view class="company-data" wx:for="{{requestList}}" data-index="{{index}}" bindtap="showBtnIndex">
+            <image class="company-data-image" src="{{item.attinfos[0].fobsurl}}"></image>
+            <view class="company-data-brandName u-line-1">
+                {{item.fbrand}}
+            </view>
+            <!-- 按钮 -->
+            <view wx:if="{{showBtn==index}}" class="company-data-but">
+                <view wx:if="{{!pattern}}">
+                    <van-button data-index="{{index}}" custom-class="custom-class-company-data jujue" style="margin-right: 20rpx;" catchtap="refuse">拒绝</van-button>
+                    <van-button data-index="{{index}}" custom-class="custom-class-company-data" catchtap="ratify">同意</van-button>
+                </view>
+            </view>
+        </view>
+    </scroll-view>
+</My_DisplayBox>

+ 1 - 0
pages/teamManagement/applyFor.wxss

@@ -0,0 +1 @@
+@import "../businessPartner/applyFor.wxss";

+ 2 - 1
pages/teamManagement/index.json

@@ -1,6 +1,7 @@
 {
   "usingComponents": {
     "My_MembersAndProducts": "/components/My_MembersAndProducts/index",
-    "My_SearchInputBox":"/components/My_SearchInputBox/index"
+    "My_SearchInputBox":"/components/My_SearchInputBox/index",
+    "van-empty": "@vant/weapp/empty/index"
   }
 }

+ 2 - 1
pages/teamManagement/index.wxml

@@ -1,8 +1,9 @@
 <!-- 搜索 -->
-<My_SearchInputBox route="team" fisadministrator="{{fisadministrator}}"></My_SearchInputBox>
+<My_SearchInputBox route="team" invitation fisadministrator="{{fisadministrator}}"></My_SearchInputBox>
 <!-- 列表 -->
 <My_GeneralTemplate>
     <view class="member_list">
         <My_MembersAndProducts wx:for="{{memberList}}" data-index="{{index}}" bind:changeMessage="changeMemberMessage" title="{{item.fname}}" twoRow="{{'身份/职位:'+item.frole}}" threeRow="{{'手机:'+item.fphonenumber}}" fisadministrator="{{fisadministrator}}" attinfos="{{item.attinfos[0]}}"></My_MembersAndProducts>
     </view>
+    <van-empty description="暂无数据" />
 </My_GeneralTemplate>

+ 7 - 0
project.private.config.json

@@ -177,6 +177,13 @@
                     "name": "",
                     "pathName": "pages/webView/index",
                     "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "",
+                    "pathName": "pages/teamManagement/applyFor",
+                    "query": "",
                     "scene": null,
                     "launchMode": "default"
                 }

二进制
static/icon-12.png