Browse Source

Merge remote-tracking branch 'origin/feature/201812-wangcz' into feature/201812-wangcz

shenjj 7 years ago
parent
commit
e0e4369917

+ 2 - 2
pages/mobile/center/user/collect/component.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="mobile-fix-content" id="mobileFixContent">
       <ul v-if="compList && compList.length">
-        <li :key="comp.componentid" v-for="comp in compList" @click="goUrl('/mobile/brand/componentDetail/' + comp.componentinfo.uuid)">
+        <li class="clearfix" :key="comp.componentid" v-for="comp in compList" @click="goUrl('/mobile/brand/componentDetail/' + comp.componentinfo.uuid)">
           <div class="fl">
             <p>品牌:<span v-text="comp.componentinfo.brand.nameCn || '-'"></span></p>
             <p>类目(产品名称):<span v-text="comp.componentinfo.kind.nameCn || '-'"></span></p>
@@ -136,7 +136,6 @@
       width: 7.1rem;
       margin: 0 auto;
       li {
-        height: 1.8rem;
         border-radius: .05rem;
         border: 1px solid #ccc;
         margin: .25rem 0 0 0;
@@ -167,6 +166,7 @@
         .fr {
           width: 2.34rem;
           text-align: center;
+          margin-top: .3rem;
           i {
             display: block;
             color: #ff7800;

+ 19 - 19
pages/mobile/user/enterpriseinfo.vue

@@ -103,7 +103,7 @@
                 </div>
               </li>
 
-              <li class="clearfix" :class="{border:  storeState !== 'look'}">
+            <!--  <li class="clearfix" :class="{border:  storeState !== 'look'}">
                 <div class="name pull-left" :class="{update: storeState !== 'look'}">企业简介:</div>
                 <div class="text pull-left clearfix" v-if="storeState === 'look'">
                   {{Islook ? dealWithText(enterpriseInfo.description) : dealWithText()}}
@@ -117,7 +117,7 @@
                 <div class="text pull-left" v-else>
                   <textarea v-model="enterpriseInfo.description" maxlength="500" ref="descTextarea"></textarea>
                 </div>
-              </li>
+              </li>-->
 
             </ul>
           </div>
@@ -212,13 +212,13 @@
     components: {
       RemindBox
     },
-    watch: {
-      'enterpriseInfo.description': {
-        handler: function (val) {
-          this.setTextareaHeight()
-        }
-      }
-    },
+//    watch: {
+//      'enterpriseInfo.description': {
+//        handler: function (val) {
+//          this.setTextareaHeight()
+//        }
+//      }
+//    },
     methods: {
       chooseTitle(key) {
         if (key === 0) {
@@ -378,7 +378,7 @@
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true
-        this.setTextareaHeight()
+//        this.setTextareaHeight()
         this.BScroll.refresh()
       },
       dealWithText2(tp) {
@@ -444,16 +444,16 @@
         this.labelText = ''
         this.IsChange = ''
         this.AddBtnShow = true
-      },
-      setTextareaHeight () {
-        this.$nextTick(() => {
-          let el = this.$refs.descTextarea
-          if (el) {
-            el.style.height = '2rem'
-            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
-          }
-        })
       }
+//      setTextareaHeight () {
+//        this.$nextTick(() => {
+//          let el = this.$refs.descTextarea
+//          if (el) {
+//            el.style.height = '2rem'
+//            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
+//          }
+//        })
+//      }
     },
     computed: {
       enterprise() {

+ 4 - 0
pages/mobile/user/index.vue

@@ -12,6 +12,7 @@
           <img :src="user.data.imageUrl ? user.data.imageUrl : '/images/component/default.png'" alt="" class="photo"/>
         </div>
         <span>{{user.data.userName}}</span>
+        <span class="tel">{{user.data.userTel}}</span>
         <span class="edit" to="/mobile/user/info/personal">
           <img src="/images/mobile/user/edit.png" alt=""/>
         </span>
@@ -182,6 +183,9 @@
         width: .3rem;
         height: .3rem;
       }
+      span.tel{
+        margin-left: .2rem;
+      }
       .l-right {
         color: #666;
         margin-right: .35rem;

+ 64 - 5
pages/mobile/user/storeinfo.vue

@@ -46,6 +46,21 @@
                     <textarea v-model="storeInfo.storeApplication" maxlength="100" ref="applicationTextarea"></textarea>
                   </div>
                 </li>
+                <li class="clearfix" :class="{border:  storeState !== 'look'}">
+                  <div class="name pull-left" :class="{update: storeState !== 'look'}">企业简介:</div>
+                  <div class="text pull-left clearfix" v-if="storeState === 'look'">
+                    {{IsEnlook ? dealWithEnText(storeInfo.enterprise.description) : dealWithEnText()}}
+                    <a class="pull-right" @click="dealWithEnText2('open')" v-show="IsEnlook">
+                      全部<img src="/images/store/default/openblack.png"/>
+                    </a>
+                    <a class="pull-right upload" @click="dealWithEnText2('hide')" v-show="!hideEnlook">
+                      收起<img src="/images/store/default/openblack.png"/>
+                    </a>
+                  </div>
+                  <div class="text pull-left" v-else>
+                    <textarea v-model="storeInfo.enterprise.description" maxlength="500" ref="enTextarea"></textarea>
+                  </div>
+                </li>
                <!-- <li class="clearfix" :class="{border:  storeState !== 'look'}">
                   <div class="name pull-left" :class="{update: storeState !== 'look'}">店铺地址:</div>
                   <div class="text pull-left" v-if="storeState === 'look'">
@@ -143,6 +158,9 @@
         normalText: '', // 原来文本
         Islook: true,
         hidelook: true,
+        normalEnText: '', // 原来文本
+        IsEnlook: true,
+        hideEnlook: true,
         timeoutCount: 0,
         collectResult: ''
       }
@@ -153,9 +171,14 @@
           this.setTextareaHeight()
         }
       },
-      'storeInfo.storeApplication': {
+//      'storeInfo.storeApplication': {
+//        handler: function (val) {
+//          this.setApplicationTextareaHeight()
+//        }
+//      },
+      'storeInfo.enterprise.description': {
         handler: function (val) {
-          this.setApplicationTextareaHeight()
+          this.setEnTextareaHeight()
         }
       }
 //      'storeInfo.enterprise.address': {
@@ -177,8 +200,11 @@
         this.storeState = 'update'
         this.Islook = true
         this.hidelook = true
+        this.IsEnlook = true
+        this.hideEnlook = true
         this.setTextareaHeight()
         this.setApplicationTextareaHeight()
+        this.setEnTextareaHeight()
 //        this.setAddarea()
       },
       dealWithText2(tp) {
@@ -190,6 +216,15 @@
           this.hidelook = true
         }
       },
+      dealWithEnText2(tp) {
+        if (tp === 'open') {
+          this.IsEnlook = false
+          this.hideEnlook = false
+        } else {
+          this.IsEnlook = true
+          this.hideEnlook = true
+        }
+      },
       dealWithText(_T) {
         if (_T !== undefined) {
           // 文本处理
@@ -206,6 +241,22 @@
           return this.normalText && this.normalText.length ? this.normalText : '暂无信息'
         }
       },
+      dealWithEnText(_T) {
+        if (_T !== undefined) {
+          // 文本处理
+          this.normalEnText = _T
+          if (_T.length < 140) {
+            this.IsEnlook = false
+            return _T
+          } else {
+            this.IsEnlook = true
+            return _T.substr(0, 140) + '...'
+          }
+        } else {
+          this.IsEnlook = false
+          return this.normalEnText && this.normalEnText.length ? this.normalEnText : '暂无信息'
+        }
+      },
       storeInfosave(_tp) {
         this.BScroll.refresh()
         if (_tp === 'cancel') {
@@ -229,8 +280,8 @@
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.address || this.storeInfo.enterprise.address === '') {
-          this.collectResult = '企业地址不能为空'
+        if (!this.storeInfo.enterprise.description || this.storeInfo.enterprise.description === '') {
+          this.collectResult = '企业简介不能为空'
           this.timeoutCount++
           return false
         }
@@ -295,6 +346,15 @@
           }
         })
       },
+      setEnTextareaHeight () {
+        this.$nextTick(() => {
+          let el = this.$refs.enTextarea
+          if (el) {
+            el.style.height = '2rem'
+            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
+          }
+        })
+      },
 //      setAddarea () {
 //        this.$nextTick(() => {
 //          let el = this.$refs.addTextarea
@@ -327,7 +387,6 @@
       storeI() {
         let str = JSON.stringify(this.$store.state.option.storeStatus.data)
         this.storeInfo = JSON.parse(str)
-        console.log(this.storeInfo)
         return ''
       },
       isAdmin () {