JXDS18FUJT 2 жил өмнө
parent
commit
a017a12469

+ 2 - 1
src/manifest.json

@@ -22,7 +22,8 @@
       "scope.userLocation": {
       "scope.userLocation": {
         "desc": "获取位置可以更好地推荐区域信息"
         "desc": "获取位置可以更好地推荐区域信息"
       }
       }
-    }
+    },
+    "requiredPrivateInfos":["choosePoi"]
   },
   },
   "mp-toutiao": {
   "mp-toutiao": {
     "appid": "tta896de2b37a8562901",
     "appid": "tta896de2b37a8562901",

+ 1 - 0
src/otherPages/courseCatalog/index.vue

@@ -80,6 +80,7 @@ export default {
     };
     };
   },
   },
   onLoad(query){
   onLoad(query){
+
     this.query = query
     this.query = query
     this.$store.dispatch('getOpenExamRoom')
     this.$store.dispatch('getOpenExamRoom')
     api.carVideo.studentVipVideoList(this.query).then(res=>{
     api.carVideo.studentVipVideoList(this.query).then(res=>{

+ 7 - 4
src/otherPages/examRoadVideo/index.vue

@@ -93,6 +93,7 @@
         </view>
         </view>
       </view>
       </view>
     </view>
     </view>
+    
   </view>
   </view>
 </template>
 </template>
 
 
@@ -113,6 +114,9 @@ export default {
     };
     };
   },
   },
   methods: {
   methods: {
+    getCurrentCity() {
+   
+    },
     isShowCity() {
     isShowCity() {
       if (this.province.provinceId && this.province.province) {
       if (this.province.provinceId && this.province.province) {
         this.cityShow = true;
         this.cityShow = true;
@@ -156,10 +160,9 @@ export default {
   },
   },
   onLoad(query) {
   onLoad(query) {
     this.query = query;
     this.query = query;
-    api.user.studentVipExamList().then(res=>{
-      uni.setStorageSync('examRoom',res.rows)
-
-    })
+    api.user.studentVipExamList().then((res) => {
+      uni.setStorageSync("examRoom", res.rows);
+    });
     api.exam.studentExamInfoIp().then((res) => {
     api.exam.studentExamInfoIp().then((res) => {
       this.city.city = res.data.cityName;
       this.city.city = res.data.cityName;
       this.city.cityId = Number(res.data.city);
       this.city.cityId = Number(res.data.city);

+ 93 - 6
src/pages/user/index.vue

@@ -3,22 +3,34 @@
     <scroll-view scroll-y class="bg">
     <scroll-view scroll-y class="bg">
       <div class="user">
       <div class="user">
         <van-cell custom-class="head-cell" is-link label-class="" center>
         <van-cell custom-class="head-cell" is-link label-class="" center>
-          <button open-type="getPhoneNumber" @getphonenumber="getPhoneByUser" class="userButton" slot="title">
+          <view
+            @click="
+              () => {
+                userFormShow = true;
+                username = userInfo.nickName||'新用户';
+              }
+            "
+            class="userButton"
+            slot="title"
+          >
             <image
             <image
               class="user-headImg"
               class="user-headImg"
               v-if="userInfo.headImage"
               v-if="userInfo.headImage"
               :src="userInfo.headImage"
               :src="userInfo.headImage"
             ></image>
             ></image>
             <image class="user-headImg" v-else :src="unLoginHead"></image>
             <image class="user-headImg" v-else :src="unLoginHead"></image>
-            <view class="flex" style="width: 60%; padding-left: 24rpx;text-align:left;">
-              <view style="font-size: 38rpx; color: #0a1a33;width: 100%;">{{
+            <view
+              class="flex"
+              style="width: 60%; padding-left: 24rpx; text-align: left"
+            >
+              <view style="font-size: 38rpx; color: #0a1a33; width: 100%">{{
                 userInfo.nickName || "新用户"
                 userInfo.nickName || "新用户"
               }}</view>
               }}</view>
-              <view style="font-size: 26rpx; color: #8a9099;width: 100%;">
+              <view style="font-size: 26rpx; color: #8a9099; width: 100%">
                 {{ "点击绑定手机号" }}</view
                 {{ "点击绑定手机号" }}</view
               >
               >
             </view>
             </view>
-          </button>
+          </view>
         </van-cell>
         </van-cell>
 
 
         <!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
         <!-- <van-cell title="我要提现" value="" is-link center @click="goCashOut">
@@ -111,6 +123,54 @@
           unit-id="adunit-8eb44bbd7e3147d4"
           unit-id="adunit-8eb44bbd7e3147d4"
         ></ad>
         ></ad>
       </view>
       </view>
+      <van-popup position="bottom" :show="userFormShow">
+        <view class="userform">
+          <view class="userform-close">
+            <van-icon
+              @click="
+                () => {
+                  userFormShow = false;
+                }
+              "
+              color="#a8a8a8"
+              size="18"
+              name="cross"
+            />
+          </view>
+          <view>
+            <van-field
+              :value="username"
+              required
+              clearable
+              label="用户名"
+              @change="changeUserName"
+              placeholder="请输入用户名"
+            />
+            <van-field
+              readonly
+              :value="userphone"
+              clearable
+              label="手机号"
+              placeholder="请绑定手机号"
+            >
+              <van-button
+                open-type="getPhoneNumber"
+                @getphonenumber="getPhoneByUser"
+                slot="button"
+                size="small"
+                type="primary"
+              >
+                获取手机号
+              </van-button>
+            </van-field>
+          </view>
+          <view class="userform-bind">
+            <van-button custom-style="width:690rpx;" round type="primary"
+              >修改用户信息</van-button
+            >
+          </view>
+        </view>
+      </van-popup>
 
 
       <!-- <view class="ad-box serviceBox">
       <!-- <view class="ad-box serviceBox">
 			<ad unit-id="adunit-d8c1548cc9663765"></ad>
 			<ad unit-id="adunit-d8c1548cc9663765"></ad>
@@ -140,10 +200,21 @@ export default {
       return this.$store.getters.isVip;
       return this.$store.getters.isVip;
     },
     },
   },
   },
+  data() {
+    return {
+      userFormShow: false,
+      username: "",
+      userphone: "",
+    };
+  },
   mounted() {
   mounted() {
     this.$store.dispatch("GetInfo");
     this.$store.dispatch("GetInfo");
   },
   },
   methods: {
   methods: {
+    changeUserName(e) {
+      console.log(e);
+      this.username = e.detail;
+    },
     getPhoneByUser(e) {
     getPhoneByUser(e) {
       console.log(e);
       console.log(e);
     },
     },
@@ -200,6 +271,22 @@ export default {
 }
 }
 </style>
 </style>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+.userform {
+  width: 100%;
+  height: 320rpx;
+  background: #fff;
+  .userform-close {
+    text-align: right;
+    padding-right: 15rpx;
+    padding-top: 15rpx;
+  }
+  .userform-bind {
+    width: 100%;
+    padding: 30rpx 30rpx;
+    display: flex;
+    justify-content: center;
+  }
+}
 .flex {
 .flex {
   display: flex;
   display: flex;
   flex-wrap: wrap;
   flex-wrap: wrap;
@@ -209,7 +296,7 @@ export default {
   border: 0;
   border: 0;
 }
 }
 .userButton {
 .userButton {
-   border: 0;
+  border: 0;
   display: flex;
   display: flex;
   flex-wrap: wrap;
   flex-wrap: wrap;
   flex-direction: row;
   flex-direction: row;