begmoon 1 rok temu
rodzic
commit
7712c727f9

BIN
images/weixinzhifu.png


+ 25 - 2
pages/signup/signup.js

@@ -18,6 +18,7 @@ Page({
     signup_name:'',
     text:'获取验证码',
     isLoading:0,
+    userinfo:{},
   },
 
   /**
@@ -42,6 +43,19 @@ Page({
         
       }
     })
+    this.getUserData()
+  },
+  getUserData() {
+    $api.getAuthinfo().then(res=>{
+      this.setData({
+        userinfo: res.data.data,
+      })
+    })
+    .catch(err=>{
+      this.setData({
+        userinfo: {}
+      })
+    })
   },
   bindChange(e) {
     let match=this.data.info.groups;
@@ -108,12 +122,21 @@ Page({
           phcode:this.data.phcode,
           match_group:this.data.match_group,
           match_id:this.data.info.id,
-          match_name:this.data.info.name
+          match_name:this.data.info.name,
+          signup_name:this.data.signup_name
       }
       if(this.data.type == 2){
           data.total_fee=this.data.info.player_price 
-          data.signup_name=this.data.signup_name
       }
+
+      if (data.signup_name.length<=0){
+        wx.showToast({
+          icon: 'none',
+          title: '请输入名字',
+        })
+        return
+      }
+
       if (data.phone.length<11){
         wx.showToast({
           icon: 'none',

+ 28 - 5
pages/signup/signup.wxml

@@ -1,6 +1,5 @@
-<view class="money">报名费用 ¥<label wx:if='{{type==2}}'>{{info.player_price}}</label>
-  <label wx: wx:else>{{info.viewer_price}}</label>
-</view>
+<view class="title" wx:if='{{type==2}}'><label>比赛名称</label><label class="content">{{info.name}}</label></view>
+
 <view class="item" wx:if='{{type==2}}'> 
    <label>比赛分组</label>
    <view class="tags"> 
@@ -13,8 +12,12 @@
     </picker>
   </view>
 </view>
-<view class="item" wx:if='{{type==2}}'> 
-   <label>参赛名</label>
+<view class="message" wx:if='{{type==2}}'><label>注:按资金量选择分组,冠军组需历届小组前三,十万以上</label></view>
+<view class="title" wx:if='{{type==1}}'><label>游客报名</label></view>
+
+<view class="item"> 
+   <label wx:if='{{type==2}}'>参赛名</label>
+   <label wx:else>观赛名</label>
    <view class="tags"> 
       <input  bindinput="inputchange1" placeholder-style="color:#999;" placeholder="请填写"></input> 
   </view>
@@ -33,4 +36,24 @@
           <view class="disabled" wx:else>{{text}}</view>
     </view>
 </view>
+
+<view class="title"><label>费用说明</label></view>
+<view class="title">
+<label>报名费用</label> 
+<block wx:if="{{userinfo.player_type <= 1}}">
+<label class="content" wx:if='{{type==2}}'>{{info.player_price}}</label>
+<label class="content" wx: wx:else>{{info.viewer_price}}</label>
+<label>元</label>
+</block>
+<block wx:else>
+<label class="content">免费</label>
+</block>
+</view>
+
+<view class="title" wx:if="{{userinfo.player_type <= 1}}">
+<label>支付方式</label>
+<label class="content">微信支付</label>
+<image class="zf" mode="widthFix" src="../../images/weixinzhifu.png"></image>
+</view>
+
 <button bindtap="post">提交报名</button>

+ 39 - 4
pages/signup/signup.wxss

@@ -10,19 +10,54 @@ page{
 }
 
 .item{
-  padding: 30rpx 0 0rpx;
+  padding: 30rpx 0rpx 0rpx;
   padding-left: 140rpx;
   position: relative;
+  font-size: 34rpx;
 }
 .item label{
   position: absolute;
   left: 0;
   top: 30rpx;
   line-height: 64rpx;
-  font-weight: 500;
+  
+}
+
+.title{
+  line-height: 64rpx;
+  margin-top: 30rpx;
+  margin-bottom: 20rpx;
+  font-size: 38rpx;
 }
+
+.title label{
+  line-height: 64rpx;
+  margin-top: 30rpx;
+  margin-bottom: 20rpx;
+  font-size: 34rpx;
+}
+
+.message{
+  font-size: 26rpx;
+  color: #666;
+}
+
+.zf{
+  width: 40rpx;
+  height: 40rpx;
+  margin-left: 20rpx;
+  position: absolute;
+  margin-top: 15rpx;
+}
+.content{
+  margin-left: 30rpx;
+}
+
+
+
 .tags{
   position: relative;
+  margin-left: 25rpx;
 }
 .tags>text{
   display: inline-block;
@@ -69,9 +104,9 @@ page{
 }
 .yzm view{
   width: 40%;
-  height: 88rpx;
+  height: 80rpx;
   color: #D94B24;
-  line-height: 88rpx;
+  line-height: 80rpx;
   border: 1px solid #D94B24;
   border-radius: 8rpx;
   font-size: 30rpx;