Bladeren bron

修改问题

hejie 3 jaren geleden
bovenliggende
commit
a85aabdf12
4 gewijzigde bestanden met toevoegingen van 225 en 96 verwijderingen
  1. 6 0
      src/pages.json
  2. 131 0
      src/pages/autoym-submit/index.vue
  3. 88 96
      src/pages/my/index.vue
  4. BIN
      src/static/my/f_close.png

+ 6 - 0
src/pages.json

@@ -149,6 +149,12 @@
 			"style": {
 				"navigationBarTitleText": "充值"
 			}
+		},
+		{
+			"path": "pages/autoym-submit/index",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
 		}
 	],
 	"tabBar": {

+ 131 - 0
src/pages/autoym-submit/index.vue

@@ -0,0 +1,131 @@
+<template>
+  <view class="container">
+    <!-- 提示信息 -->
+    <view class="hint flex_r flex_ac">请填写本人真实信息</view>
+    <!-- 提示信息-end -->
+
+    <!-- 提交内容 -->
+    <view class="con">
+      <view class="list flex_r flex_ac">
+        <view class="list_name">真实姓名:</view>
+        <input
+          class="list_input flex_grow"
+          type="text"
+          v-model="name"
+          placeholder="请输入您的真实姓名"
+        />
+      </view>
+      <view class="list flex_r flex_ac">
+        <view class="list_name">身份证号:</view>
+        <input
+          class="list_input flex_grow"
+          type="text"
+          v-model="code"
+          placeholder="请输入您的身份证号"
+        />
+      </view>
+      <view class="btn flex_r flex_ac flex_jc" @tap="submit">提交审核</view>
+    </view>
+    <!-- 提交内容-end -->
+  </view>
+</template>
+
+<script>
+let page = 1;
+let app = getApp();
+// let reqApi = new ReqApi();
+var appEv = app.$vm.$options;
+// import { ReqApi } from "@/utils/reqTools.js";
+import { post } from "@/request/api.js";
+export default {
+  data() {
+    return {
+      name: "",
+      code: "",
+    };
+  },
+  onLoad: function () {},
+  methods: {
+    submit: function () {
+      let data = {
+        name: this.name,
+        card: this.code,
+      };
+      post("/user/authentication", data).then((res) => {
+      });
+      //   let that = this;
+      //   let data = {
+      //     name: this.name,
+      //     idNumber: this.code,
+      //   };
+      //   const info = reqApi.identifyTwo(data);
+      //   if (info) {
+      //     info.then((res) => {
+      //       if (res.data.status == 200) {
+      //         uni.redirectTo({
+      //           url: "/pages/aytonym-status/index?status=1",
+      //         });
+      //       } else {
+      //         uni.redirectTo({
+      //           url: "/pages/aytonym-status/index?status=0&msg=" + res.data.msg,
+      //         });
+      //       }
+      //     });
+      //   }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+// 页面配置
+// 页面配置-end
+
+// 提示信息
+.hint {
+  width: 100%;
+  height: 74rpx;
+  font-size: 24rpx;
+  color: #e75b25;
+  padding: 0 30rpx;
+  background: #f4f4f4;
+}
+// 提示信息-end
+
+// 提交内容
+.con {
+  width: 1005;
+  overflow: hidden;
+  padding: 30rpx;
+  box-sizing: border-box;
+}
+.list {
+  width: 100%;
+  height: 100rpx;
+  border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
+}
+.list_name {
+  font-size: 28rpx;
+  color: #333333;
+  font-weight: "SourceHanSansCN-Medium";
+  width: 130rpx;
+}
+.list_input {
+  width: calc(100% - 140rpx);
+  margin-left: 10rpx;
+  height: 100%;
+  font-size: 28rpx;
+  color: #333;
+}
+.btn {
+  width: 395rpx;
+  height: 95rpx;
+  border-radius: 10rpx;
+  background: #17bb87;
+  color: #fff;
+  font-size: 34rpx;
+  font-family: "SourceHanSansCN-Medium";
+  margin: 100rpx auto 0;
+}
+// 提交内容-end
+</style>

+ 88 - 96
src/pages/my/index.vue

@@ -1,26 +1,29 @@
 <template>
   <view class="container">
-    <view class="content" :style="isShiMing ? 'padding-top:30rpx;' : ''">
+    <view
+      class="content"
+      :style="userinfo.is_authentication == 1 ? 'padding-top:30rpx;' : ''"
+    >
       <!-- 用户信息 -->
       <view class="uerInfo mar_t16 flex_r">
         <view class="user_img">
           <image
             class="image"
             :src="
-              userInfo && userInfo.headimgurl != ''
-                ? userInfo.headimgurl
+              userinfo && userinfo.head_pic != ''
+                ? userinfo.head_pic
                 : 'https://tea.soowin.com/mnt/image/m_avar.jpg'
             "
             mode=""
           ></image>
           <view
             class="coupon_info flex_r flex_ac"
-            v-if="!isShiMing"
+            v-if="isShiMing"
             @tap="goToAutonym"
           >
             完成实名认证,享受更多权益
             <image
-              src="/static/f_close.png"
+              src="/static/my/f_close.png"
               mode="widthFix"
               class="close_icon"
               @tap.stop="closeAuto"
@@ -28,12 +31,14 @@
             <view class="sj_icon"></view>
           </view>
         </view>
-        <block v-if="userInfo && userInfo != ''">
+        <block v-if="userinfo && userinfo != ''">
           <view class="user_con flex_c">
             <view class="user_name flex_r flex_ae ellipsis"
-              >{{ userInfo.weiXinNiceName
+              >{{ userinfo.nickname
               }}<text
-                >({{ userInfo.identifyFlag == 0 ? "未实名" : "已实名" }})</text
+                >({{
+                  userinfo.is_authentication == 0 ? "未实名" : "已实名"
+                }})</text
               ></view
             >
             <view class="flex_r flex_ac">
@@ -42,15 +47,15 @@
                   class="level_img"
                   src="/static/my/huangguan.png"
                   mode=""
-                ></image> 
-                <view class="level_text">{{ userInfo.leve }}</view>
+                ></image>
+                <view class="level_text">{{ userinfo.level_name }}</view>
               </view>
             </view>
             <view class="user_account flex_r flex_ac mar_t10">
-              <view class="account">账号:{{ userInfo.userAccount }}</view>
+              <view class="account">账号:{{ userinfo.mobile }}</view>
               <view
                 class="copy_account flex_r flex_ac flex_jc"
-                @tap="copyText(userInfo.userAccount)"
+                @tap="copyText(userinfo.mobile)"
                 >复制</view
               >
             </view>
@@ -82,7 +87,7 @@
       <view class="acc_info">
         <view class="acc_head flex_r flex_ac flex_jb">
           <view class="acc_price"
-            >账号余额¥<text>{{ userInfoAccount.commission }}</text></view
+            >账号余额¥<text>{{ userinfo.user_money }}</text></view
           >
           <view class="C flex_r flex_ac">
             <navigator
@@ -99,11 +104,11 @@
         <view class="info_con flex_r flex_jb">
           <view class="info_list flex_c flex_jb">
             <view class="list_name">昨日收益(元)</view>
-            <view class="list_text">{{ userInfoAccount.yesterdayProfit }}</view>
+            <view class="list_text">{{ userinfo.yesterdayProfit || 0 }}</view>
           </view>
           <view class="info_list flex_c flex_jb" @tap="getToAccMoney">
-            <view class="list_name">拼团金</view>
-            <view class="list_text">{{ userInfoAccount.accountMoney }}</view>
+            <view class="list_name">积分</view>
+            <view class="list_text">{{ userinfo.integral || 0 }}</view>
           </view>
           <!-- 					<view class="info_list flex_c flex_jb" @tap="getToBean">
 						<view class="list_name">拼豆</view>
@@ -111,7 +116,7 @@
 					</view> -->
           <view class="info_list flex_c flex_jb" @tap="getToTeaList">
             <view class="list_name">茶友(人)</view>
-            <view class="list_text">{{ userInfoAccount.teaFriends }}</view>
+            <view class="list_text">{{ userinfo.friends || 0 }}</view>
           </view>
         </view>
         <view class="acc_hint mar_t50" @tap="SetHint"
@@ -403,7 +408,7 @@ export default {
       isShiMing: true,
       agentName: "", // 缘起
       user_id: undefined,
-      userinfo:undefined, // 获取用户信息
+      userinfo: undefined, // 获取用户信息
     };
   },
   onLoad: function (options) {
@@ -421,28 +426,28 @@ export default {
     }
   },
   onShow: function () {
-    this.userinfo = uni.getStorageSync("userinfo")
-    let token = uni.getStorageSync('token');
+    this.userinfo = uni.getStorageSync("userinfo");
+    let token = uni.getStorageSync("token");
     if (!token) {
       this.login();
     }
   },
   methods: {
-    login(){
+    login() {
       // #ifdef  MP-WEIXIN
       wx.login({
-        success (res) {
+        success(res) {
           if (res.code) {
-            post("appletLogin",{ code: res.code }).then(res => {
+            post("appletLogin", { code: res.code }).then((res) => {
               console.log(res);
-            })
+            });
           }
-        }
-      })
+        },
+      });
       // #endif
-      
+
       // #ifdef  H5 || APP-PLUS
-      this.goto("/pages/my/login")
+      this.goto("/pages/my/login");
       // #endif
     },
 
@@ -472,27 +477,14 @@ export default {
     },
     // 跳转到实名页面
     goToAutonym() {
-      let that = this;
-      const info = reqApi.identifyUserPayment();
-      if (info) {
-        info.then((res) => {
-          if (res.data.status == 200) {
-            uni.navigateTo({
-              url: "/pages/autonym-submit/index",
-            });
-          } else if (res.data.status == 999) {
-            uni.navigateTo({
-              url: "/pages/autonym-pay/index",
-            });
-          } else {
-            appEv.errTip(res.data.msg);
-          }
-        });
-      }
+      console.log("qqqqqqqqq");
+      uni.navigateTo({
+        url: "/pages/autoym-submit/index",
+      });
     },
     // 关闭实名信息
-    closeAuto: function () {
-      this.isShiMing = true;
+    closeAuto() {
+      this.isShiMing = false;
     },
     // 未开放提示信息
     SetHint: function () {
@@ -500,71 +492,71 @@ export default {
     },
 
     //是否实名
-    async isrealName(){
+    async isrealName() {
       let n = await u_post("ShuZiTeaYW/userInfo/realName");
-      return n.status == 200
+      return n.status == 200;
     },
     // 跳转到分享页面
     getImgPage: function () {
       let that = this;
-      if(this.isrealName()){
-            uni.navigateTo({
-              url: "/pages/invi-img/index",
-            });
-          } else {
-            appEv.errTips("您还未实名");
-            const infor = reqApi.identifyUserPayment();
-            if (infor) {
-              infor.then((rea) => {
-                if (rea.data.status == 200) {
-                  uni.navigateTo({
-                    url: "/pages/autonym-submit/index",
-                  });
-                } else if (rea.data.status == 999) {
-                  uni.navigateTo({
-                    url: "/pages/autonym-pay/index",
-                  });
-                } else {
-                  appEv.errTip(rea.data.msg);
-                }
+      if (this.isrealName()) {
+        uni.navigateTo({
+          url: "/pages/invi-img/index",
+        });
+      } else {
+        appEv.errTips("您还未实名");
+        const infor = reqApi.identifyUserPayment();
+        if (infor) {
+          infor.then((rea) => {
+            if (rea.data.status == 200) {
+              uni.navigateTo({
+                url: "/pages/autonym-submit/index",
+              });
+            } else if (rea.data.status == 999) {
+              uni.navigateTo({
+                url: "/pages/autonym-pay/index",
               });
+            } else {
+              appEv.errTip(rea.data.msg);
             }
-          }
+          });
+        }
+      }
     },
     // 跳转到提现页面
     getToCash: function () {
       let that = this;
-      if(this.isrealName()){
-            uni.navigateTo({
-              url: "/pages/cash/index",
-            });
-          } else {
-            appEv.errTips("您还未实名");
-            const infor = reqApi.identifyUserPayment();
-            if (infor) {
-              infor.then((rea) => {
-                if (rea.data.status == 200) {
-                  uni.navigateTo({
-                    url: "/pages/autonym-submit/index",
-                  });
-                } else if (rea.data.status == 999) {
-                  uni.navigateTo({
-                    url: "/pages/autonym-pay/index",
-                  });
-                } else {
-                  appEv.errTip(rea.data.msg);
-                }
+      if (this.isrealName()) {
+        uni.navigateTo({
+          url: "/pages/cash/index",
+        });
+      } else {
+        appEv.errTips("您还未实名");
+        const infor = reqApi.identifyUserPayment();
+        if (infor) {
+          infor.then((rea) => {
+            if (rea.data.status == 200) {
+              uni.navigateTo({
+                url: "/pages/autonym-submit/index",
               });
+            } else if (rea.data.status == 999) {
+              uni.navigateTo({
+                url: "/pages/autonym-pay/index",
+              });
+            } else {
+              appEv.errTip(rea.data.msg);
             }
-          }
+          });
+        }
+      }
     },
     // 复制账号
     copyText(e) {
-        uniCopy({
-          content: e,
-          success: (res) => {},
-          error: (e) => {},
-        });
+      uniCopy({
+        content: e,
+        success: (res) => {},
+        error: (e) => {},
+      });
     },
     // 跳转到用户设置页面
     getToSetting: function () {

BIN
src/static/my/f_close.png