mobile/pages/branch/activity/detail/popup/reg.vue
@@ -9,22 +9,32 @@
         <scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'">
            <view class="pb30">
               <!-- 如果不是连盟汇会员,需要填写个人信息,报名后会自动加入活动发起的分会 -->
               <view class="reg-section join-box p30 radius24 bg-white" v-if="!activityData.is_member">
                  <view class="tips f28 p20 radius12"><text class="iconfont icon-gantanhao mr10"></text> 您还不是{{activityData.store_name}}的会员,请完善以下信息,提交报名后即可成为会员。</view>
               <view class="reg-section join-box p30 radius24 bg-white" v-if="!activityData.is_member || is_friend">
                  <view class="tips f28 p20 radius12" v-if="!activityData.is_member && !is_friend"><text class="iconfont icon-gantanhao mr10"></text> 您还不是{{activityData.store_name}}的会员,请完善以下信息,提交报名后即可成为会员。</view>
                  <view class="tips f28 p20 radius12 friend" v-if="is_friend"><text class="iconfont icon-gantanhao mr10"></text>您正在帮朋友报名,以下信息请填写您朋友的信息</view>
                  <view class="item d-s-c">
                     <view class="item-name">真实姓名</view>
                     <input type="text" maxlength="30" class="flex-1" placeholder="请输入真实姓名" v-model="formData.real_name" placeholder-class=
                     <input type="text" maxlength="30" class="flex-1 f28" placeholder="请输入真实姓名" v-model="formData.real_name" placeholder-class=
                     "placeholder" />
                  </view>
                  <view class="item d-s-c">
                     <view class="item-name">手机号码</view>
                     <input type="text" maxlength="30" class="flex-1" placeholder="请输入常用的手机号码" v-model="formData.mobile" placeholder-class=
                     <input type="text" maxlength="30" class="flex-1 f28" placeholder="请输入常用的手机号码" v-model="formData.mobile" placeholder-class=
                     "placeholder" />
                  </view>
                  <view class="item d-s-c">
                     <view class="item-name">单位/公司名称</view>
                     <input type="text" maxlength="30" class="flex-1" placeholder="请输入单位/公司名称" v-model="formData.company" placeholder-class=
                     <input type="text" maxlength="30" class="flex-1 f28" placeholder="请输入单位/公司名称" v-model="formData.company" placeholder-class=
                     "placeholder" />
                  </view>
                  <!-- 加入哪个分会 -->
                  <view class="item d-s-c">
                     <view class="item-name">所在分会</view>
                     <view class="flex-1 d-s-c f28" @click="openBranch">
                        <text class="flex-1" v-if="formData.branch_id">{{branch_name}}</text>
                        <text class="gray6 flex-1" v-else>去选择</text>
                        <text class='iconfont icon-jiantou'></text>
                     </view>
                  </view>
               </view>
               <view class="reg-section pay-box p30 radius24 bg-white" v-if="activityData.fee > 0">
@@ -102,15 +112,19 @@
      </view>
      <!-- 积分弹窗 -->
      <PointsForm :isOpenPoints="isOpenPoints" :activityData="activityData" :max_price="onlinePrice+formData.points_money" @close="closePointsFunc"></PointsForm>
      <!-- 分会弹窗 -->
      <Branch :isOpenBranch="isOpenBranch" @close="closeBranchFunc"></Branch>
   </view>
</template>
<script>
   import { pay } from '@/common/pay.js';
   import PointsForm from './points'; // 积分选择弹窗
   import Branch from './branch'; // 分会选择弹窗
   export default {
      components: {
         PointsForm
         PointsForm,
         Branch
      },
      data() {
         return {
@@ -133,6 +147,7 @@
               is_use_balance: 0, // 是否使用余额支付
               is_combined_pay: 0, // 是否需要组合支付
               pay_type: 20, // 支付方式,默认微信支付
               branch_id: '', // 所在分会
            },
            /*尺寸比例*/
            ratio: 1,
@@ -144,9 +159,11 @@
            validate: false,
            payData: [], // 半屏小程序相关
            isFirst: false,
            branch_name: '',
            isOpenBranch: false,
         };
      },
      props: ['isOpenReg', 'in_radius'],
      props: ['isOpenReg', 'in_radius', 'is_friend'],
      onLoad() {},
      onShow() {
@@ -280,7 +297,8 @@
                        activity_id: self.activityData.activity_id,
                        is_member: self.activityData.is_member,
                        pay_source: self.getPlatform(),
                        in_radius: self.in_radius ? 1 : 0 // 如果为1,报名成功后直接签到
                        in_radius: self.in_radius ? 1 : 0, // 如果为1,报名成功后直接签到
                        is_friend: self.is_friend ? 1 : 0, // 是否是帮朋友报名
                     })
                  )
               }, function(res) {
@@ -316,12 +334,12 @@
         // 验证数据
         validateForm() {
            let self = this;
            if (!self.activityData.is_member) {
            if (!self.activityData.is_member || self.is_friend) {
               if (!self.formData.real_name) {
                  return self.showTips('请输入您的真实姓名');
                  return self.showTips('请输入真实姓名');
               }
               if (!self.formData.mobile) {
                  return self.showTips('请输入您的手机号码');
                  return self.showTips('请输入手机号码');
               }
               if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(self.formData.mobile)) {
                  return self.showTips('请输入正确的手机号码');
@@ -360,6 +378,19 @@
               this.formData.points_money = parseFloat((e * this.activityData.points_ratio).toFixed(2));
            }
            this.isOpenPoints = false;
         },
         openBranch() {
            this.isOpenBranch = true;
         },
         /*关闭分会弹窗*/
         closeBranchFunc(e) {
            if (e !== null) {
               this.formData.branch_id = e.branch_id;
               this.branch_name = e.name;
            }
            this.isOpenBranch = false;
         },
      }
   };
@@ -432,6 +463,15 @@
      .tips {
         background-color: #f7f7f7;
         color: #333;
         &.friend {
            background-color: #FCF8ED;
            color: #CEAD60;
            .iconfont{
               color: #CEAD60;
            }
         }
      }
   }
   .pay-box {