Просмотр исходного кода

Merge branch 'main' of https://gitlab.com/tea28/client

DaMowang 3 лет назад
Родитель
Сommit
8220d9b31c
2 измененных файлов с 24 добавлено и 10 удалено
  1. 5 3
      src/pages/my-tea-list/index.vue
  2. 19 7
      src/pages/my/userinfo.vue

+ 5 - 3
src/pages/my-tea-list/index.vue

@@ -20,6 +20,7 @@
             </view>
           </view>
         </view>
+
         <view class="head_option flex_r flex_ac">
           <!-- <image
             class="option_weixin"
@@ -248,6 +249,7 @@ page {
   overflow: hidden;
   border-radius: 4rpx;
   background: #fff;
+  border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
 }
 .head_img {
   width: 79rpx;
@@ -278,7 +280,7 @@ page {
 }
 .head_time {
   width: 100%;
-  height: 94rpx;
+  height: 60rpx;
   padding: 0 24rpx;
   box-sizing: border-box;
   font-size: 22rpx;
@@ -287,9 +289,9 @@ page {
 .head_info {
   width: 100%;
   overflow: hidden;
-  padding: 40rpx 24rpx 60rpx;
+  padding: 40rpx 24rpx 20rpx;
   box-sizing: border-box;
-  border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
+  
 }
 // 顶部-end
 

+ 19 - 7
src/pages/my/userinfo.vue

@@ -4,7 +4,13 @@
       <view class="list_title flex_r flex_ac flex_jb"
         ><text>头</text><text>像:</text></view
       >
-      <img @click="upheadimg" :src="formDa.head_pic" alt="" srcset="" class="head_pic" />
+      <img
+        @click="upheadimg"
+        :src="formDa.head_pic"
+        alt=""
+        srcset=""
+        class="head_pic"
+      />
     </view>
     <view class="list flex_r flex_ac">
       <view class="list_title flex_r flex_ac flex_jb"
@@ -28,17 +34,20 @@ import { get, post } from "@/request/api.js";
 export default {
   data() {
     return {
-      formDa: {},
+      formDa: {
+        nickname:undefined,
+        head_pic:undefined
+      },
     };
   },
   onLoad() {
     this.loadData();
   },
   methods: {
-    loadData(){
-        let da = uni.getStorageSync("userinfo");
-        this.formDa.nickname = da.nickname;
-        this.formDa.head_pic = da.head_pic;
+    loadData() {
+      let da = uni.getStorageSync("userinfo");
+      this.formDa.nickname = da.nickname;
+      this.formDa.head_pic = da.head_pic;
     },
     upheadimg() {
       // 上传图片uploadImg
@@ -49,7 +58,7 @@ export default {
         sourceType: ["album", "camera"], // album 从相册选图,camera 使用相机,默认二者都有
         success: function (res) {
           var arr = res.tempFiles;
-          that.$up(arr[0].path).then(res => {
+          that.$up(arr[0].path).then((res) => {
             that.$set(that.formDa, "head_pic", res);
             // that.formDa.head_pic = res;
           });
@@ -61,6 +70,9 @@ export default {
         if (res.code === 0) {
           appEv.errTips(res.msg);
           this.getuserInfo();
+          uni.navigateBack({
+            delta: 1, //返回层数,2则上上页
+          });
         }
       });
     },