liuyg
2022-02-19 5ae3b2a30ecf7e907c82aacc02fef9fdca62f086
pages/registerUser/registerUser.vue
@@ -15,7 +15,7 @@
            <u-input v-model="form.obj" placeholder="请输入工作单位" />
         </u-form-item>
         <u-form-item label="辖区" left-icon="account-fill" label-width="200">
            <u-input type="select" placeholder="请选择辖区" :border="true" @click="mapShow = true" />
            <u-input type="select" placeholder="请选择辖区" :border="true" @click="openLoginMap" />
            <!-- <u-select v-model="showxq" mode="mutil-column-auto" :list="listxq" @confirm="confirmxq"></u-select> -->
         </u-form-item>
         <u-form-item label="性别" label-width="200" left-icon="man">
@@ -27,23 +27,29 @@
         </u-form-item>
         <u-form-item label="是否人脸登录" label-width="240" left-icon="server-man">
            <u-radio-group v-model="radioValue">
               <u-radio v-for="(item, index) in radioList" :key="index" :name="item.name" :disabled="item.disabled">
               <u-radio v-for="(item, index) in radioList" :key="index" :name="item.name"
                  :disabled="item.disabled">
                  {{item.name}}
               </u-radio>
            </u-radio-group>
            (功能研发中)
         </u-form-item>
      </u-form>
         <view class="agree">
            注册即代表同意
            <text class="a">《用户协议》</text>
            和
            <text class="a">《隐私政策》</text>
         </view>
      <div v-show="mapShow">
         <div class="login-map-bc" @click="mapShow = false">
         </div>
         <div class="login-map-content">
            <u-icon class="login-map-close" name="close" @click="mapShow = false"></u-icon>
            <map style="width: 100%; height: 100%;" :latitude="latitude" :longitude="longitude" :markers="marker"
               :scale="scale" :polyline="polyline">
            </map>
            <web-view style="width: 100%; height: 100%;" :src="loginMapUrl">
            </web-view>
         </div>
      </div>
@@ -58,6 +64,7 @@
   export default {
      data() {
         return {
            loginMapUrl: "",
            radioList: [{
                  name: '是',
                  disabled: false
@@ -285,7 +292,8 @@
         };
      },
      methods: {
         getLocation() {
         openLoginMap() {
            var that = this
            uni.getLocation({
               type: 'wgs84',
               success: function(res) {
@@ -304,10 +312,40 @@
                     title: '位置', //标注点名
                     alpha: 1, //透明度
                  }]
                  var data = [{
                     "id": '100000',
                     "place": '无数据',
                     "state": '0',
                     "dtype": '0',
                     "size": '300',
                     "jd": res.longitude,
                     "wd": res.latitude
                  }]
                  data = JSON.stringify(data);
                  that.loginMapUrl = 'http://223.82.109.183:2082/loginMap/loginMap.html?data=' + data
                  that.mapShow = true
               }
            })
         },
         zc() {
            uni.request({
               url: that.$store.state.piAPI + '/zc/inster',
               method: 'POST',
               data: {
                  username: this.form.user
               },
               success: (res) => {
                  uni.showToast({
                     title: '注册成功,请等待审核',
                     icon:'none',
                     duration: 2000
                  });
               }
            });
            var that = this;
            this.$refs.uForm.validate(valid => {
               if (valid) {
@@ -318,6 +356,8 @@
                  });
               }
            });
         },
         depl() {
            var that = this;
@@ -457,6 +497,7 @@
      },
      onReady() {
         this.$refs.uForm.setRules(this.rules);
      },
      watch: {
         faceState() {
@@ -490,7 +531,7 @@
      z-index: 111;
      background: rgba(0, 0, 0, .3);
   }
   .login-map-content {
      position: fixed;
      bottom: 0;
@@ -501,7 +542,7 @@
      border-radius: 15px;
      overflow: hidden;
   }
   .login-map-close {
      position: absolute;
      top: 10px;
@@ -510,6 +551,7 @@
      height: 20px;
      z-index: 11;
   }
   .warp {
      display: flex;
      align-items: center;
@@ -554,4 +596,18 @@
   .registerUser {
      padding: 0 1.2rem;
   }
   .agree {
      margin: 27rpx 95rpx 0;
      font-size: 22rpx;
      font-family: Adobe Heiti Std;
      font-weight: normal;
      color: #cacaca;
      line-height: 34rpx;
      .a {
         color: #000000;
      }
   }
</style>