Browse Source

新用户认证页面

lmj 2 years ago
parent
commit
4d33deb61c

+ 13 - 2
app.json

@@ -4,7 +4,8 @@
     "pages/logs/logs",
     "pages/success/paySuccess",
     "pages/business/business",
-    "pages/search/search"
+    "pages/search/search",
+    "pages/newUser/newUser"
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -23,6 +24,16 @@
     "van-icon": "@vant/weapp/icon/index",
     "van-tag": "@vant/weapp/tag/index",
     "van-tabbar": "@vant/weapp/tabbar/index",
-    "van-tabbar-item": "@vant/weapp/tabbar-item/index"
+    "van-tabbar-item": "@vant/weapp/tabbar-item/index",
+    "van-field": "@vant/weapp/field/index",
+    "van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
+    "van-dropdown-item": "@vant/weapp/dropdown-item/index",
+    "van-panel": "@vant/weapp/panel/index",
+    "van-action-sheet": "@vant/weapp/action-sheet/index",
+    "van-calendar": "@vant/weapp/calendar/index",
+    "van-cell": "@vant/weapp/cell/index",
+    "van-cell-group": "@vant/weapp/cell-group/index"
+
+
   }
 }

+ 42 - 0
pages/newUser/newUser.js

@@ -0,0 +1,42 @@
+Page({
+  data:{
+    option1: [
+      { text: '学生', value: 0 },
+      { text: '老师', value: 1 },
+    ],
+    value1: 0,
+
+    option2: [
+      { text: '请选择', value: 3 },
+      { text: '计科', value: 4 },
+      { text: '软件', value: 5 },
+    ],
+    value2: 3,
+
+    option3: [
+      { text: '请选择', value: 3 },
+      { text: '火锅', value: 6 },
+      { text: '烧烤', value: 7 },
+      { text: '烤肉', value: 8 },
+    ],
+    value3: 3,
+
+    date: '',
+    show: false, 
+  },
+onDisplay(){
+  this.setData({ show: true });
+},
+onClose() {
+  this.setData({ show: false });
+},
+formatDate(date) {
+  date = new Date(date);
+},
+onConfirm(event) {
+  this.setData({
+    show: false,
+    date: this.formatDate(event.detail),
+  })
+ }
+});

+ 4 - 0
pages/newUser/newUser.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "新用户认证"
+}

+ 74 - 0
pages/newUser/newUser.wxml

@@ -0,0 +1,74 @@
+<!--pages/newUser/newUser.wxml-->
+<view style="font-size:25px; font-weight:600;margin-left: 10px;margin-top: 10px;">完善信息</view>
+<view style="font-size:small; color:gray;margin-left: 10px; margin-top: 5px;">请填写以下个人信息</view>
+
+<view style="margin-top: 30px;">
+<van-cell-group>
+  <van-field
+    label="姓名"
+    value="{{ value }}"
+    placeholder="请输入姓名"
+    bind:change="onChange"
+    required
+  />
+</van-cell-group>
+
+<van-cell-group>
+  <van-field
+    label="手机号"
+    value="{{ value }}"
+    placeholder="请输入手机号"
+    bind:change="onChange"
+    required
+  />
+</van-cell-group>
+
+<van-cell-group>
+  <van-field
+    label="身份证号"
+    value="{{ value }}"
+    placeholder="请输入身份证号"
+    bind:change="onChange"
+    required
+  />
+</van-cell-group>
+
+<view class="b" >
+<view class="a">请选择身份</view>
+<van-dropdown-menu active-color="	#6495ED">
+  <van-dropdown-item  value="{{ value1 }}" options="{{ option1 }}" />
+</van-dropdown-menu>
+</view>
+
+<van-cell-group>
+  <van-field
+    label="学校"
+    value="{{ value }}"
+    placeholder="请填写学校全称"
+    bind:change="onChange"
+  />
+</van-cell-group>
+
+
+<view class="b">
+<view class="a">入学时间</view>
+<van-cell class="c" title="请选择日期" value="{{ date }}" bind:click="onDisplay" />
+<van-calendar show="{{ show }}" bind:close="onClose" bind:confirm="onConfirm" />
+</view>
+
+<view class="b" >
+<view class="a">专业</view>
+<van-dropdown-menu active-color="	#6495ED">
+  <van-dropdown-item  value="{{ value2 }}" options="{{ option2 }}"  />
+</van-dropdown-menu>
+</view>
+
+<view class="b" style="margin-bottom: 100px;">
+<view class="a">美食偏好</view>
+<van-dropdown-menu active-color="	#6495ED">
+  <van-dropdown-item  value="{{ value3 }}" options="{{ option3 }}"  />
+</van-dropdown-menu>
+</view>
+</view>
+
+<van-button type="primary" block round color="#CDC9C9" >提交</van-button>

+ 19 - 0
pages/newUser/newUser.wxss

@@ -0,0 +1,19 @@
+van-dropdown-menu{
+  display: flex; 
+  margin-left: 150px;
+}
+.a{
+  width:40%;
+  padding-top: 12px;
+  padding-left: 10px;
+  color:rgba(82, 79, 79, 0.829);
+  font-size: 14px;
+}
+.b{
+  display: flex; 
+  flex-wrap:nowrap;
+}
+.c{
+  width:60%;
+  margin-left: 110px;
+}

+ 7 - 0
project.private.config.json

@@ -27,6 +27,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "user",
+          "pathName": "pages/newUser/newUser",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }