浏览代码

扫码报名入口

zhaoxiaohai 3 年之前
父节点
当前提交
199083650f

+ 2 - 1
app.json

@@ -58,7 +58,8 @@
         "pages/chatRoom/history",
         "pages/portal/search",
         "pages/chatRoom/create",
-        "pages/chatRoom/stats"
+        "pages/chatRoom/stats",
+        "pages/scanQRCodes/register"
     ],
     "usingComponents": {
         "van-button": "@vant/weapp/button/index",

+ 4 - 0
components/My_NavTabs/index.js

@@ -15,6 +15,10 @@ Component({
         /* 回调 */
         setIndex: {
             type: Function
+        },
+        leftJustifying: {
+            type: Boolean,
+            value: false
         }
     },
 

+ 1 - 1
components/My_NavTabs/index.wxml

@@ -1,5 +1,5 @@
 <view class="tabs_box">
-    <view class="tbas_list">
+    <view class="tbas_list {{leftJustifying?'tbas_list11':''}}">
         <view wx:for="{{tabsList}}" data-index="{{index}}" class="{{tabsIndex==index?'active':''}}" bindtap="setTabsIndex">{{item}}</view>
     </view>
 </view>

+ 4 - 0
components/My_NavTabs/index.wxss

@@ -16,6 +16,10 @@
     margin: 0 auto;
 }
 
+.tbas_list11 {
+    justify-content: flex-start !important;
+}
+
 .tbas_list>view {
     line-height: 32rpx;
     height: 60rpx;

+ 25 - 17
components/My_TwoDimensionalCode/index.js

@@ -16,28 +16,36 @@ Component({
         },
         codeName: {
             type: String
+        },
+        tactivitysignupid: {
+            type: String
         }
     },
     lifetimes: {
         attached: function () {
-            _Http.basic({
-                "accesstoken": wx.getStorageSync('userData').token,
-                "classname": "customer.tagents.tagents",
-                "method": "query_enterpriseAgentsMain",
-                "content": {}
-            }).then(res => {
-                if (res.msg != '成功') return wx.showToast({
-                    title: res.msg,
-                    icon: "none"
-                });
-                let codeText = '';
-                if (this.data.title == '商户二维码') {
-                    codeText = 'https://www.buwanjia.com/qrcode?type=shop&fbrand=' + res.data[0].fbrand + '&tagentsid=' + res.data[0].tagentsid;
-                } else {
-                    codeText = 'https://www.buwanjia.com/qrcode?type=partner&fbrand=' + res.data[0].fbrand + '&tagentsid=' + res.data[0].tagentsid;
-                };
+            if (this.data.title == '我的身份码') {
+                let codeText = this.data.tactivitysignupid;
                 this.qrCode(codeText)
-            });
+            } else {
+                _Http.basic({
+                    "accesstoken": wx.getStorageSync('userData').token,
+                    "classname": "customer.tagents.tagents",
+                    "method": "query_enterpriseAgentsMain",
+                    "content": {}
+                }).then(res => {
+                    if (res.msg != '成功') return wx.showToast({
+                        title: res.msg,
+                        icon: "none"
+                    });
+                    let codeText = '';
+                    if (this.data.title == '商户二维码') {
+                        codeText = 'https://www.buwanjia.com/qrcode?type=shop&fbrand=' + res.data[0].fbrand + '&tagentsid=' + res.data[0].tagentsid;
+                    } else {
+                        codeText = 'https://www.buwanjia.com/qrcode?type=partner&fbrand=' + res.data[0].fbrand + '&tagentsid=' + res.data[0].tagentsid;
+                    };
+                    this.qrCode(codeText)
+                });
+            }
         },
         detached: function () {
             // 在组件实例被从页面节点树移除时执行

+ 16 - 6
pages/portal/index.js

@@ -27,6 +27,7 @@ Page({
         newProductIndex2: 0,
         repetitionSubmit: false, //是否重复提交招商表单
         tiveList: [], //直播列表
+        portal_middle_1: '',
     },
 
     /**
@@ -122,22 +123,31 @@ Page({
             brandSelect: index
         })
     },
+    /* 去报名展会 */
+    toApply() {
+        const data = this.data.portal_middle_1;
+        wx.navigateTo({
+            url: '/pages/scanQRCodes/register?id=' + data[0].fdataid,
+        })
+    },
     /* 获取轮播图 */
     getBanner() {
         let imgList = wx.getStorageSync('bannerDataList');
+        console.log("imgList", imgList)
         if (imgList != "") {
             const bannerList = imgList.filter(value => value.flocation == 'portal_head');
             const portal_middle_1 = imgList.filter(value => value.flocation == 'portal_middle_1');
-            const portal_middle_2 = imgList.filter(value => value.flocation == 'portal_middle_2');
+            /* const portal_middle_2 = imgList.filter(value => value.flocation == 'portal_middle_2');
             const portal_middle_3 = imgList.filter(value => value.flocation == 'portal_middle_3');
-            const portal_middle_4 = imgList.filter(value => value.flocation == 'portal_middle_4');
+            const portal_middle_4 = imgList.filter(value => value.flocation == 'portal_middle_4'); */
+            console.log(portal_middle_1)
             this.setData({
                 swiperBannerList: bannerList[0].banner,
-                portal_middle_1: portal_middle_1[0].banner,
-                portal_middle_2: portal_middle_2[0].banner,
-                portal_middle_3: portal_middle_3[0].banner,
-                portal_middle_4: portal_middle_4[0].banner,
+                portal_middle_1: portal_middle_1[0].banner
             });
+            /* portal_middle_2: portal_middle_2[0].banner,
+                portal_middle_3: portal_middle_3[0].banner,
+                portal_middle_4: portal_middle_4[0].banner, */
         } else {
             setTimeout(() => {
                 this.getBanner()

+ 3 - 0
pages/portal/index.wxml

@@ -30,6 +30,9 @@
         </view>
     </view>
 </view>
+<view wx:if="{{portal_middle_1!=''}}" style="margin:20px auto 0; height: 90px; width: 351px; overflow: hidden; border-radius: 10rpx; box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.05);">
+    <image src="{{portal_middle_1[0].attinfos[0].fobsurl}}" bindtap="toApply" mode="aspectFill" style="height: 100%; width: 100%;"></image>
+</view>
 <!-- 广告位1 -->
 <!-- <My_BannerSwiper type="advertising" marTop='40' swiperBannerList="{{portal_middle_1}}" /> -->
 <!-- 品牌关注榜 -->

+ 347 - 0
pages/scanQRCodes/register.js

@@ -0,0 +1,347 @@
+import {
+    ApiModel
+} from "../../utils/api";
+const _Http = new ApiModel();
+import {
+    TestVerify
+} from "../../utils/verify"
+const _Verify = new TestVerify();
+const utilMd5 = require('../../utils/md5');
+let countDownTime1 = null;
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        tabsList: ['身份信息'], //tabs
+        pageType: 0, //0报名 1查看二维码
+        rulesChecked: true, //同意用户隐私协议
+        isNoToken: false, //是否存在登录
+        countDownTime: 30, //倒计时
+        tactivityid: 2, //展会id
+        fname: "", //姓名
+        fidcard: "", //身份证号
+        fphonenumber: "", //手机号
+        password: '', //验证码
+        fcompname: "", //公司
+        frole: "", //职位
+        findustry: "", //行业
+        faddress: "", //地址
+        fchannel: "", //入会渠道
+        errTips: {
+            fname: false, //姓名
+            fidcard: false, //身份证号
+            fphonenumber: false, //手机号
+            password: false, //验证码
+            fcompname: false, //公司
+            frole: false, //职位
+            findustry: false, //行业
+        },
+        throttle: false, //截流
+        msg: null,
+        myShowModel: false, //角色选择
+        userIndex: null, //选择账号下标
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        /* this.setData({
+            tactivityid: options.id
+        }) */
+        //判断是否存在登录态
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.activity.activitysignup",
+            "method": "getsignupmsg",
+            "content": {
+                "tactivityid": 2
+            }
+        }).then(res => {
+            console.log("获取个人信息", res)
+            if (res.msg == '失败') {
+                this.setData({
+                    isNoToken: true
+                })
+            } else {
+                if (res.data.length >= 1) {
+                    this.setData({
+                        pageType: 1,
+                        msg: res.data[0]
+                    })
+                }
+            }
+        })
+    },
+    /* 获取验证码 */
+    getVerifyCode() {
+        //验证手机号码
+        if (!_Verify.phoneNumber(this.data.fphonenumber, 1)) return this.setData({
+            "errTips.fphonenumber": true
+        });
+        /* 倒计时中阻止 */
+        if (this.data.countDownTime != 30) return wx.showToast({
+            title: '请勿重复获取验证码',
+            icon: "none"
+        });
+        _Http.getPassword({
+            "phonenumber": this.data.fphonenumber,
+            "client": "wechat_customer"
+        }).then(res => {
+            this.setData({
+                countDownTime: this.data.countDownTime - 1
+            })
+            countDownTime1 = setInterval(() => {
+                if (this.data.countDownTime != 0) {
+                    this.setData({
+                        countDownTime: this.data.countDownTime - 1
+                    })
+                } else {
+                    clearInterval(countDownTime1);
+                    this.setData({
+                        countDownTime: 30
+                    })
+                }
+            }, 1000);
+            wx.showToast({
+                title: res.msg,
+                icon: "none",
+                duration: 3000
+            })
+        })
+    },
+    //验证必填项
+    verify() {
+        let errTips = this.data.errTips,
+            result = false;
+        for (let key in this.data.errTips) {
+            if (this.data.isNoToken) {
+                if (this.data[key] == '') {
+                    errTips[key] = true;
+                    result = true;
+                }
+            } else {
+                if (this.data[key] == '' && key != 'password') {
+                    errTips[key] = true;
+                    result = true;
+                }
+            }
+        };
+        this.setData({
+            errTips
+        })
+        return result;
+    },
+    /* 提交表单 */
+    submitData() {
+        if (this.verify()) return wx.showToast({
+            title: '请完善表格必填项',
+            icon: "none"
+        });
+        if (this.data.throttle) return;
+        if (!this.data.isNoToken) {
+            //存在登录态,直接提交
+            this.signup(wx.getStorageSync('userData').token);
+        } else {
+            //未存在登录态,先登录在提交
+            if (!this.data.password) {
+                this.setData({
+                    "errTips.password": true
+                })
+                return wx.showToast({
+                    title: '还未填写验证码',
+                    icon: "none"
+                });
+            };
+            _Http.login({
+                "phonenumber": this.data.fphonenumber,
+                "password": utilMd5.hexMD5(this.data.password),
+                "client": "wechat_customer"
+            }).then(res => {
+                /* 结果验证 */
+                if (res.msg != '成功') {
+                    this.setData({
+                        "errTips.password": true
+                    });
+                    return wx.showToast({
+                        title: '账号或验证码错误!',
+                        icon: "none"
+                    });
+                }
+                console.log("用户登录", res)
+                if (res.account_list.length == 1) {
+                    this.signup(res.account_list[0].token);
+                } else {
+                    this.setData({
+                        account_list: res.account_list,
+                        myShowModel: true
+                    })
+                }
+            })
+        }
+    },
+    /* 获取焦点 */
+    inputFocus(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        let errTips = this.data.errTips;
+        errTips[name] = false;
+        this.setData({
+            errTips
+        })
+    },
+    /* 失去焦点 */
+    inputBlur(e) {
+        const {
+            name
+        } = e.currentTarget.dataset;
+        const {
+            value
+        } = e.detail;
+        if (name == 'fphonenumber') {
+            if (!_Verify.phoneNumber(this.data.fphonenumber, 1)) return this.setData({
+                "errTips.fphonenumber": true
+            })
+        };
+        if (value.trim() == "") {
+            let errTips = this.data.errTips;
+            errTips[name] = true;
+            this.setData({
+                errTips
+            })
+        }
+    },
+    /* 选择用户 */
+    userSelect(e) {
+        console.log(e)
+        const {index,item} = e.currentTarget.dataset;
+        this.setData({
+            userIndex:index
+        })
+        wx.setStorageSync('userData', item);
+        this.signup(item.token)
+    },
+    /* 提交报名表 */
+    signup(token) {
+        _Http.basic({
+            "accesstoken": token,
+            "classname": "customer.activity.activitysignup",
+            "method": "signup",
+            "content": {
+                "fname": this.data.fname,
+                "fidcard": this.data.fidcard,
+                "fphonenumber": this.data.fphonenumber,
+                "fcompname": this.data.fcompname,
+                "frole": this.data.frole,
+                "findustry": this.data.findustry,
+                "faddress": this.data.faddress,
+                "fchannel": this.data.fchannel,
+                "tactivityid": this.data.tactivityid
+            }
+        }).then(res => {
+            console.log("提交报名", res)
+            if (res.msg != '成功') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            this.setData({
+                throttle: true
+            });
+            wx.showToast({
+                title: '报名成功'
+            })
+            setTimeout(() => {
+                wx.navigateBack({
+                    delta: 1,
+                })
+            }, 500);
+        })
+    },
+    /* input事件剔除特殊字符 */
+    eliminate(value) {
+        const {
+            name
+        } = value.target.dataset;
+        this.setData({
+            [name]: _Verify.Eliminate(value.detail)
+        })
+    },
+    /* 用户守则 */
+    rulesOnChange() {
+        this.setData({
+            rulesChecked: !this.data.rulesChecked
+        })
+    },
+    viewRules() {
+        wx.downloadFile({
+            url: 'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/PrivacyPolicy.docx',
+            success: (res) => {
+                console.log(res)
+                wx.openDocument({
+                    filePath: res.tempFilePath,
+                    fail: (err) => {
+                        console.log(err)
+                        wx.showToast({
+                            title: '读取失败,请稍后再试',
+                            icon: "none"
+                        })
+                    }
+                })
+            },
+            fail: (err) => {
+                console.log(err)
+                wx.showToast({
+                    title: '读取失败,请稍后再试',
+                    icon: "none"
+                })
+            }
+        })
+        return
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+    },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+    },
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 9 - 0
pages/scanQRCodes/register.json

@@ -0,0 +1,9 @@
+{
+  "usingComponents": {
+    "My_Background": "../../components/My_Background/index",
+    "My_RectangularFrame": "../../components/My_RectangularFrame/index",
+    "van-count-down": "@vant/weapp/count-down/index",
+    "van-checkbox": "@vant/weapp/checkbox/index",
+    "My_TwoDimensionalCode": "/components/My_TwoDimensionalCode/index"
+  }
+}

+ 125 - 0
pages/scanQRCodes/register.wxml

@@ -0,0 +1,125 @@
+<block wx:if="{{pageType==0}}">
+    <!-- LOGO -->
+    <view class="login_logo">
+        <image src="../../static/logo.png" mode="aspectFill"></image>
+    </view>
+    <!-- 商户认证 -->
+    <My_RectangularFrame title="参展入会">
+        <view class="form_box firm">
+            <!-- 品牌名 -->
+            <view class="input_text_title">姓名<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field value="{{ fname }}" bind:input='eliminate' data-name="fname" bind:focus='inputFocus' bind:blur='inputBlur' input-class="input-class" placeholder="请填写姓名" border="{{ false }}" error='{{errTips.fname}}' />
+                </view>
+            </view>
+            <!-- 身份证 -->
+            <view class="input_text_title">身份证<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field value="{{ fidcard }}" bind:input='eliminate' type='idcard' data-name="fidcard" bind:focus='inputFocus' bind:blur='inputBlur' input-class="input-class" placeholder="请填写姓名身份证" error='{{errTips.fidcard}}' border="{{ false }}" />
+                </view>
+            </view>
+            <!-- 手机号 -->
+            <view class="input_text_title">手机号<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bind:blur='inputBlur' type='number' input-class="input-class" error='{{errTips.fphonenumber}}' placeholder="请输入手机号" border="{{ false }}" />
+                </view>
+            </view>
+            <block wx:if="{{isNoToken}}">
+                <!-- 验证码 -->
+                <view class="input_text_title">验证码<text>*</text></view>
+                <view class="input_text_box box_mar_bot">
+                    <view class="input_text_input marLeft" style="display: flex;">
+                        <van-field model:value="{{ password }}" data-name="password" type='number' input-class="input-class password-css" bind:focus='inputFocus' bind:blur='inputBlur' error='{{errTips.password}}' placeholder="请输入验证码" border="{{ false }}" />
+                        <view class="get-password" bindtap="getVerifyCode">
+                            <text></text>
+                            <view>{{countDownTime=='30'?'发送验证码':countDownTime+'s'}}</view>
+                        </view>
+                    </view>
+                </view>
+            </block>
+            <!-- 公司 -->
+            <view class="input_text_title">公司名<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field value="{{ fcompname }}" bind:input='eliminate' error='{{errTips.fcompname}}' bind:focus='inputFocus' bind:blur='inputBlur' data-name="fcompname" input-class="input-class" placeholder="请填写公司名" border="{{ false }}" />
+                </view>
+            </view>
+            <!-- 职位 -->
+            <view class="input_text_title">职位<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field model:value="{{ frole }}" bind:input='eliminate' error='{{errTips.frole}}' data-name="frole" bind:focus='inputFocus' bind:blur='inputBlur' input-class="input-class" placeholder="请输入职位" border="{{ false }}" />
+                </view>
+            </view>
+            <!-- 行业 -->
+            <view class="input_text_title">行业<text>*</text></view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field model:value="{{ findustry }}" bind:input='eliminate' error='{{errTips.findustry}}' bind:focus='inputFocus' bind:blur='inputBlur' data-name="findustry" input-class="input-class" placeholder="请输入行业" border="{{ false }}" />
+                </view>
+            </view>
+            <!-- 住址 -->
+            <view class="input_text_title">住址</view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field value="{{ faddress }}" bind:input='eliminate' data-name="faddress" input-class="input-class" placeholder="请输入住址" border="{{ false }}" />
+                </view>
+            </view>
+            <!-- 入会渠道 -->
+            <view class="input_text_title">入会渠道</view>
+            <view class="input_text_box box_mar_bot">
+                <view class="input_text_input marLeft">
+                    <van-field value="{{ fchannel }}" bind:input='eliminate' data-name="fchannel" input-class="input-class" placeholder="请输入入会渠道" border="{{ false }}" />
+                </view>
+            </view>
+        </view>
+        <view class="rules">
+            <van-checkbox checked-color='#4CBECF' icon-size="12px" label-class='rules-text' value="{{ rulesChecked }}" bind:change="rulesOnChange" />
+            <view class="view" bindtap="viewRules">《<text>阅读用户隐私协议</text>》</view>
+        </view>
+    </My_RectangularFrame>
+    <!-- 提交按钮 -->
+    <view class="input_text_but">
+        <van-button custom-class='login-custom-class' data-name="{{pageType}}" bindtap="submitData" size='large' round color="linear-gradient(180deg, #83E0E9 0%, #4CBECF 100%)">
+            立即报名
+        </van-button>
+    </view>
+    <!-- 背景图片 -->
+    <My_Background></My_Background>
+    <!-- 弹出层 -->
+    <van-action-sheet show="{{ popups }}" bind:close="showPop">
+        <My_Checkbox title="经营类目" bind:saleprodChange="saleprodChange" dataList="{{dataList}}" isRequest='{{false}}'></My_Checkbox><!-- saleprodclass="{{saleprodclass}}" -->
+        <view style="height: 34rpx;"></view>
+    </van-action-sheet>
+</block>
+<block wx:if="{{pageType==1}}">
+    <!-- tabs -->
+    <My_NavTabs tabsList="{{tabsList}}" leftJustifying='true' bindsetIndex="setIndex"></My_NavTabs>
+    <My_TwoDimensionalCode title="我的身份码" codeName="{{'ID:'+msg.tactivitysignupid}}" tactivitysignupid='{{msg.tactivitysignupid}}'></My_TwoDimensionalCode>
+</block>
+<view class="model" wx:if="{{myShowModel}}">
+    <view class="role-selector">
+        <view class="title">
+            请选择账号
+        </view>
+        <scroll-view class="scroll-view" scroll-y>
+            <view class="user_text_box {{userIndex==index?'pitch-on':''}}" data-item="{{item}}" data-index='{{index}}' bindtap="userSelect" wx:for="{{account_list}}">
+                <image wx:if="{{item.attinfos[0].fobsurl}}" class="input_text_img" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
+                <image wx:else class="input_text_img" src="/static/tacitly-approve/MRuserImg.png" mode="aspectFill"></image>
+                <view class="text_box">
+                    <view class="user_name u-line-1">
+                        {{item.fname}}
+                       <!--  <view class="u-line-1"></view>
+                        <view class="u-line-1">{{item.fname}}</view> -->
+                    </view>
+                    <view class="user_identity u-line-1">
+                        {{item.frole}}
+                    </view>
+                </view>
+            </view>
+        </scroll-view>
+    </view>
+</view>

+ 167 - 0
pages/scanQRCodes/register.wxss

@@ -0,0 +1,167 @@
+@import "/css/form.wxss";
+
+/* 根目录按钮样式 */
+.login-custom-class {
+    font-size: 42rpx !important;
+    font-family: PingFangSC-Medium, PingFang SC !important;
+    font-weight: 500;
+    line-height: 58rpx;
+    box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.2);
+}
+
+/* 输入提示定位 */
+.input_text_tips {
+    position: absolute;
+    top: 0;
+    left: 200rpx;
+    transform: translate(0, -63%);
+}
+
+.firm .input_text_input .password-css {
+    width: 300rpx !important;
+}
+
+.get-password {
+    display: flex;
+    align-items: center;
+    width: 148rpx;
+    height: 50rpx;
+    line-height: 50rpx;
+    font-size: 24rpx;
+    color: #69D0DD;
+}
+
+.get-password>text {
+    width: 2rpx;
+    height: 26rpx;
+    background: #4BBECF;
+    margin-right: 18rpx;
+}
+
+.get-password>view {
+    flex: 1;
+    text-align: center;
+}
+
+/* logo */
+.login_logo {
+    width: 186rpx;
+    height: 160rpx;
+    margin: 60rpx auto 0;
+}
+
+.login_logo>image {
+    width: 100%;
+    height: 100%;
+}
+
+/* 按钮 */
+.input_text_but {
+    width: 340rpx;
+    height: 98rpx;
+    margin: 70rpx auto 0;
+    border-radius: 49rpx;
+}
+
+/* 用户隐私协议 */
+.rules {
+    height: 44rpx;
+    font-size: 24rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    line-height: 44rpx;
+    width: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: 25rpx;
+    color: #4CBECF;
+    margin-bottom: -40rpx;
+}
+
+.rules .view {
+    margin-left: -20rpx;
+}
+
+.rules text {
+    text-decoration: underline;
+}
+
+.model {
+    position: fixed;
+    width: 100vw;
+    height: 100vh;
+    background-color: rgba(0, 0, 0, 0.6);
+    top: 0;
+    left: 0;
+    z-index: 9999;
+}
+.role-selector {
+    position: absolute;
+    width: 590rpx;
+    height: 570rpx;
+    background: #FFFFFF;
+    border-radius: 20rpx;
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
+}
+.role-selector .title {
+    width: 100%;
+    height: 50rpx;
+    font-size: 36rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 550;
+    color: #000000;
+    line-height: 50rpx;
+    text-align: center;
+    margin-top: 40rpx;
+}
+.role-selector .scroll-view {
+    width: 510rpx;
+    height: 410rpx;
+    margin: 30rpx auto 0;
+}
+.user_text_box {
+    display: flex;
+    align-items: center;
+    width: 510rpx;
+    height: 100rpx;
+    background: rgba(233, 234, 236, 0.7);
+    border-radius: 70rpx;
+    margin-bottom: 40rpx;
+}
+.user_text_box .input_text_img {
+    width: 76rpx;
+    height: 76rpx;
+    margin-left: 24rpx;
+}
+.text_box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 366rpx;
+    height: 64rpx;
+    margin-left: 10rpx;
+}
+.user_identity {
+    text-align: right;
+    flex-shrink: 0;
+    width: 130rpx;
+    font-size: 28rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    color: #000000;
+    opacity: .7;
+}
+.user_name {
+    width: 230rpx;
+    font-size: 28rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    color: #333333;
+}
+.pitch-on {
+    background-color: #7AC9D4;
+}
+.pitch-on .user_name,
+.pitch-on .user_identity {
+    color: #FFFFFF;
+}

+ 17 - 2
pages/tabbar-pages/home/index.js

@@ -13,8 +13,12 @@ Page({
         productList: [], //供需列表
         //轮播图列表
         swiperBannerList: [],
+        portal_middle_1: '',
         /* 宫格列表 */
         gridList: [{
+            text: '参展入口',
+            icon: '/static/home-grid/icon-05.png'
+        }, {
             text: '即时通讯',
             icon: '/static/home-grid/icon-01.png'
         }, {
@@ -84,6 +88,15 @@ Page({
             wx.navigateTo({
                 url: '/pages/chatRoom/index',
             })
+        } else if (name == '参展入口') {
+            const data = this.data.portal_middle_1;
+            if (data.length == 0) return wx.showToast({
+                title: '暂无展会活动',
+                icon: "none"
+            })
+            wx.navigateTo({
+                url: '/pages/scanQRCodes/register?id=' + data[0].fdataid,
+            })
         } else {
             wx.showToast({
                 title: '功能开发中',
@@ -224,9 +237,11 @@ Page({
             })
         })
         /* 获取轮播图 */
-        const bannerList = wx.getStorageSync('bannerDataList').filter(value => value.flocation == 'home_head');
+        const bannerList = wx.getStorageSync('bannerDataList').filter(value => value.flocation == 'home_head'),
+            portal_middle_1 = wx.getStorageSync('bannerDataList').filter(value => value.flocation == 'portal_middle_1');
         this.setData({
-            swiperBannerList: bannerList[0].banner
+            swiperBannerList: bannerList[0].banner,
+            portal_middle_1: portal_middle_1[0].banner
         });
         //获取信息数量
         this.selectComponent("#gxshuju").unReadMessageCount();

+ 1 - 1
pages/tabbar-pages/home/index.wxml

@@ -4,7 +4,7 @@
 <My_BannerSwiper swiperBannerList="{{swiperBannerList}}"></My_BannerSwiper>
 <!-- 宫格区域 -->
 <view class="grid_box">
-    <van-grid border="{{false}}" column-num="4" icon-size='58' bindtap="gridJumpPage">
+    <van-grid border="{{false}}" column-num="5" icon-size='58' bindtap="gridJumpPage">
         <van-grid-item wx:for="{{gridList}}" data-name="{{item.text}}" icon="{{item.icon}}" text="{{item.text}}" text-class="grid-text-class" />
     </van-grid>
 </view>

+ 9 - 11
project.private.config.json

@@ -25,23 +25,14 @@
         "packNpmRelationList": [],
         "minifyWXSS": true,
         "disableUseStrict": false,
+        "minifyWXML": true,
         "showES6CompileOption": false,
         "useCompilerPlugins": false,
         "ignoreUploadUnusedFiles": true,
-        "useStaticServer": true,
-        "minifyWXML": true
+        "useStaticServer": true
     },
     "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
     "condition": {
-        "plugin": {
-            "list": []
-        },
-        "game": {
-            "list": []
-        },
-        "gamePlugin": {
-            "list": []
-        },
         "miniprogram": {
             "list": [
                 {
@@ -293,6 +284,13 @@
                     "name": "登录",
                     "pathName": "pages/login/index",
                     "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "扫码注册登记",
+                    "pathName": "pages/scanQRCodes/register",
+                    "query": "",
                     "scene": null,
                     "launchMode": "default"
                 }

二进制
static/home-grid/icon-05.png


+ 2 - 1
utils/Http.js

@@ -1,4 +1,5 @@
-const baseUrl = "https://www.buwanjia.com/bwj/rest/webclientrest";
+const baseUrl = "https://test.buwanjia.com/bwj/rest/webclientrest";
+// const baseUrl = "https://www.buwanjia.com/bwj/rest/webclientrest";
 class HTTP {
     request({
         url,