Browse Source

微信信息保存完成

sys 2 years ago
parent
commit
969492b758
3 changed files with 148 additions and 2 deletions
  1. 8 0
      pages.json
  2. 134 0
      pages/my/edit/we-chat.vue
  3. 6 2
      pages/my/editInformation.vue

+ 8 - 0
pages.json

@@ -203,6 +203,14 @@
         "navigationBarTextStyle": "black",
         "enablePullDownRefresh": false
       }
+    },
+    {
+      "path": "pages/my/edit/we-chat",
+      "style": {
+        "navigationBarTitleText": "",
+        "navigationBarTextStyle": "black",
+        "enablePullDownRefresh": false
+      }
     }
   ],
   "globalStyle": {

+ 134 - 0
pages/my/edit/we-chat.vue

@@ -0,0 +1,134 @@
+<template>
+  <view class="form-box">
+    <en-nav title="" :title-color="'#333'" :right-show="true" :right-type="2" >
+      <template v-slot:right>
+        <text class="nav-right sys-weight-600 sys-color-white" @click="setNextStep">保存</text>
+      </template>
+    </en-nav>
+    <view class="login-box"  >
+      <view class="login-top">
+        <view class="login-title">
+          <text class="title-item sys-color-black sys-weight-600">上传微信,赚取奖励</text>
+        </view>
+        <view class="login-from">
+          <view class="from-title">
+            <view class="title-circle sys-background-black" :class="{'sys-background-green':weChat!==''}"></view>
+            <view class="title-text sys-color-black">添加微信</view>
+          </view>
+          <view class="from-text from-item" :class="{'apply-shake':isShakeBut}">
+            <input type="text" class="from-input sys-color-gray-3" max="11" v-model="weChat" placeholder="请输入微信"></input>
+          </view>
+
+        </view>
+      </view>
+
+    </view>
+  </view>
+</template>
+
+<script>
+import EnNav from "@/components/en-utils/en-nav/en-nav";
+import tools from "@/service/tools";
+export default {
+  components: {EnNav},
+  data() {
+    return {
+      'weChat':'',
+      'isShakeBut':false
+    }
+  },
+  watch: {
+    'weChat': function () {
+      this.verifyIsOK()
+    },
+  },
+  methods: {
+    setNextStep() {
+      if (this.isOK) {
+        uni.navigateBack()
+      } else {
+        tools.error('请输入微信号')
+        this.isShakeBut = true
+        setTimeout(() => {
+          this.isShakeBut = false
+        }, 500)
+      }
+    },
+    verifyIsOK() {
+      this.isOK = this.weChat !== '';
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+@import "/static/css/shake.css";
+.form-box{
+  padding: 0 32rpx;
+  .nav-right{
+    font-size: 28rpx;
+    line-height: 44rpx;
+    color: #333;
+
+  }
+  .login-box{
+    padding: 82rpx 0 0 0;
+    box-sizing: border-box;
+    position: relative;
+    .login-top{
+      .login-title{
+        padding-bottom: 60rpx;
+        .title-item{
+          font-size: 48rpx;
+        }
+      }
+      .login-from{
+        .from-title{
+          display: flex;
+          justify-content: flex-start;
+          height: 44rpx;
+          .title-circle{
+            width: 16rpx;
+            height: 16rpx;
+            border-radius: 50%;
+            margin-top: 14rpx;
+            margin-right: 8rpx;
+          }
+
+
+        }
+        .from-text{
+          width: 100%;
+          padding-bottom: 40rpx;
+          border-bottom: 1rpx solid #E0E0E0;
+          .from-input{
+            font-size: 32rpx;
+            height: 44rpx;
+            line-height: 44rpx;
+          }
+          .from-input::placeholder{
+            color: #999999;
+          }
+        }
+        .from-item{
+          margin-top: 60rpx;
+        }
+
+      }
+
+      .login-but{
+        margin-top: 120rpx;
+      }
+
+      .local-txt{
+        padding-top: 32rpx;
+        font-size: 24rpx;
+        text-align: center;
+      }
+    }
+
+  }
+
+}
+
+</style>

+ 6 - 2
pages/my/editInformation.vue

@@ -64,12 +64,12 @@
             </view>
           </view>
         </view>
-        <view class="edit-item">
+        <view class="edit-item" >
           <view class="item-title">
             <view class="item-title-text sys-weight-600 sys-color-black sys-height-44">添加微信</view>
             <view class="item-title-proportion sys-weight-600 sys-color-black sys-height-44">+10%</view>
           </view>
-          <view class="item-data">
+          <view class="item-data" @click="goToUrl(4)">
             <view class="row-text sys-height-44 sys-color-gray-9">上传微信,赚取奖励</view>
             <view class="row-icon">
               <text class="iconfont sys-height-44 sys-color-gray-9"> &#xe62b;</text>
@@ -247,6 +247,10 @@ export default {
         uni.navigateTo({
           'url':'./edit/school'
         })
+      }else if(type===4){
+        uni.navigateTo({
+          'url':'./edit/we-chat'
+        })
       }
     }
   }