Browse Source

添加返回按钮

louyu 7 years ago
parent
commit
e4e888a128

+ 1 - 1
index.html

@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <title>presell</title>
+    <title>合同</title>
       <link rel="stylesheet" href="//at.alicdn.com/t/font_587947_4e7wxdmocu3anhfr.css">
     <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
   </head>

+ 19 - 1
src/components/multiColorBackground.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="main-bg">
+    <div v-if="showGoBack" class="icon go-back" @click="handleClick"><</div>
     <div class="bg-top" :style="{height:(topHeight||4)+'rem'}">
 
     </div>
@@ -14,7 +15,12 @@
 <script>
     export default {
         name: "multiColorBackground",
-      props:['topHeight']
+      props:['topHeight','showGoBack'],
+      methods:{
+          handleClick(){
+            this.$router.go(-1);
+          }
+      }
     }
 </script>
 
@@ -29,6 +35,18 @@
      height: 100vh;
      background-color: #e8eff5;
    }
+   .icon{
+     position: fixed;
+     display: inline-block;
+     top:0.6rem;
+     left: 0.5rem;
+     font-size: 0.4rem;
+     height: 0.4rem;
+     width: 0.2rem;
+     color: white;
+     z-index: 6;
+   }
+
   .content{
     position: absolute;
     width: 100%;

+ 1 - 1
src/views/addContact.vue

@@ -1,5 +1,5 @@
 <template>
-    <multi-color-background top-height="2.7">
+    <multi-color-background top-height="2.7" show-go-back="1">
       <h1 class="title">添加联系人</h1>
       <div class="main" >
         <div class="input-container">

+ 1 - 1
src/views/companyAuth.vue

@@ -1,5 +1,5 @@
 <template>
-    <multi-color-background>
+    <multi-color-background show-go-back="1">
         <h1 class="title">企业认证</h1>
         <div class="step-bar">
           <span class="step" :class="{'active':stepNum===1 }">企业信息</span>

+ 1 - 1
src/views/drawSign.vue

@@ -1,5 +1,5 @@
 <template>
-  <multi-color-background>
+  <multi-color-background show-go-back="1">
     <h1 class="title">手绘签名</h1>
     <div class="inner draw" >
       <div class="canvas-container" @mousemove="beginPath($event)">

+ 1 - 1
src/views/person.vue

@@ -1,5 +1,5 @@
 <template>
-    <multi-color-background top-height="2.7">
+    <multi-color-background top-height="2.7" show-go-back="1">
       <h1 class="title">个人认证</h1>
       <div class="main" >
         <div class="input-container">

+ 1 - 1
src/views/setting.vue

@@ -1,5 +1,5 @@
 <template>
-    <multi-color-background top-height="2.7">
+    <multi-color-background top-height="2.7" show-go-back="1">
       <h1 class="title">安全设置</h1>
       <div class="main">
         <info-block v-for="item,index in infoData" :info-data="item" :key="index"></info-block>

+ 1 - 1
src/views/sign.vue

@@ -1,5 +1,5 @@
 <template>
-    <multi-color-background>
+    <multi-color-background show-go-back="1">
       <div class="main">
         <h1 class="title">我的签名</h1>
         <mt-navbar class="navbar" v-model="selected">