shenjj 7 tahun lalu
induk
melakukan
6438e6f7e8

+ 15 - 15
components/mobile/register-saler/register/StepFirst.vue

@@ -11,17 +11,17 @@
           <label class="mobile-x-required pull-left" style="margin-bottom: 0;text-align: right;width: 1.8rem">企业名称:</label>
           <div class="mobile-x-input-kuang pull-left" style="margin-bottom: 0">
             <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @input="nameTypeCheck()" @change="nameCheck(3)" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
-            <div class="mobile-x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
-              <i class="glyphicon glyphicon-ok x-icon-left"></i>
-            </div>
+            <!--<div class="mobile-x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">-->
+              <!--<i class="glyphicon glyphicon-ok x-icon-left"></i>-->
+            <!--</div>-->
           </div>
         </div>
-        <div class="col-sm-5 mobile-x-text-info" v-show="!validName.isValidTypeName && !validName.init">
+        <div class="col-sm-5 mobile-x-text-info" style="font-size: 0.24rem" v-show="!validName.isValidTypeName && !validName.init">
           <p>
             <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~99个字符
           </p>
         </div>
-        <div class="col-sm-5 mobile-x-text-info" v-show="!validName.isValidName && !validName.init">
+        <div class="col-sm-5 mobile-x-text-info" style="font-size: 0.24rem" v-show="!validName.isValidName && !validName.init">
           <p>
             <i class="fa fa-info-circle"></i>注册的企业名称已存在,请联系管理员
           </p>
@@ -32,12 +32,12 @@
           <label class="mobile-x-required pull-left"  style="margin-bottom: 0;text-align: right;width: 1.8rem">营业执照号:</label>
           <div class="mobile-x-input-kuang pull-left" style="margin-bottom: 0">
             <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control x-input'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
-            <div class="mobile-x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
-              <i class="glyphicon glyphicon-ok x-icon-left"></i>
-            </div>
+            <!--<div class="mobile-x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">-->
+              <!--<i class="glyphicon glyphicon-ok x-icon-left"></i>-->
+            <!--</div>-->
           </div>
         </div>
-        <div class="col-sm-5 mobile-x-text-info" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
+        <div class="col-sm-5 mobile-x-text-info" style="font-size: 0.24rem" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
       </div>
       <div class="row">
         <div class="row clearfix" style="margin:0 0.25rem;line-height: 0.7rem;padding: 0.2rem 0;">
@@ -45,10 +45,10 @@
           <div class="mobile-x-input-kuang pull-left"  style="margin-bottom: 0">
             <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="background-color: transparent;">
             <!--<span class="fa fa-map-marker mobile-fa-map-marker"></span>-->
-            <div class="mobile-x-text-help" v-show="validAddress.isValidAddress && !validAddress.init">
-              <i class="glyphicon glyphicon-ok x-icon-left"></i>
-            </div>
-            <div class="mobile-x-text-help" v-show="!validAddress.isValidAddress && validAddress.init" >
+            <!--<div class="mobile-x-text-help" v-show="validAddress.isValidAddress && !validAddress.init">-->
+              <!--<i class="glyphicon glyphicon-ok x-icon-left"></i>-->
+            <!--</div>-->
+            <div class="mobile-x-text-help"  >
               <i class="glyphicon glyphicon-chevron-right x-icon-left" style="color: #999"></i>
             </div>
           </div>
@@ -96,8 +96,8 @@
             </div>
           </div>
         </div>
-
-        <div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
+        <!--v-show="!validAddress.isValidAddress && !validAddress.init"-->
+        <div class="col-sm-5"  style="margin:-0.3rem 0 0 0.3rem;font-size: 0.24rem"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
       </div>
     </div>
     <div class="row next-btn"><button class="btn" style="background: rgb(63, 132, 246);width: 90%; color: #fff;border-radius: 4px" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>

+ 31 - 14
components/mobile/store/StoreDetail.vue

@@ -4,12 +4,16 @@
     <div class="store-logo">
       <div class="store-logo-box">
         <img :src="store.logoUrl || '/images/component/default.png'"/>
-        <i v-if="showIcon" class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>
+        <!--<i v-if="showIcon" class="iconfont icon-shoucang" :style="isFocus === 'true'?'color:#ff7800':'color: #ddd'" @click="collectStore"></i>-->
       </div>
       <!--<div class="store-switch-item">-->
         <!--<span :class="activeType=='product'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='product'">产品</span>-->
         <!--<span :class="activeType=='detail'?'mobile-switch-btn active':'mobile-switch-btn'" @click="activeType='detail'">介绍</span>-->
       <!--</div>-->
+      <span class="focus" @click="collectStore">
+          <i class="iconfont icon-shoucang1" :style="isFocus === 'true'? 'right:0.28rem': 'right:0.2rem'" :class="isFocus === 'true' ? 'icon-shoucang1' : 'icon-shoucang2'"></i>
+          <span v-text="isFocus === 'true' ? '已收藏' : '收藏'" :class="isFocus ? '' : 'right01'">已收藏</span>
+        </span>
     </div>
     <modal-wrapper :showModal="activeType==='detail'" :title="'企业信息 | ' + store.storeName" @closeAction="activeType=''">
       <div class="store-info" >
@@ -438,19 +442,6 @@
           max-height: 2.1rem;
           max-width: 3.6rem;
         }
-        >i {
-          position: absolute;
-          font-size: .4rem;
-          background: #fff;
-          width: .6rem;
-          height: .6rem;
-          line-height: .6rem;
-          border-radius: 100%;
-          box-shadow: 0 0 .05rem #aaa;
-          right: -1.44rem;
-          top: .75rem;
-          text-align: center;
-        }
       }
     }
     .store-switch-item {
@@ -910,4 +901,30 @@
       display: inline-block;
     }
   }
+  span.focus{
+    margin: 0 auto;
+    text-align: center;
+    i {
+      position: absolute;
+      font-size: .4rem;
+      width: .6rem;
+      height: .6rem;
+      line-height: .6rem;
+      border-radius: 100%;
+      right: .28rem;
+      top: 1rem;
+      color: #fff;
+      text-align: center;
+    }
+    span{
+      position: absolute;
+      right: .19rem;
+      top: .8rem;
+      font-size: .28rem;
+      color: #fff;
+      &.right01 {
+        right: .3rem;
+      }
+    }
+  }
 </style>

+ 1 - 1
components/pcb/home/StoreBanner.vue

@@ -1,4 +1,4 @@
-<template>
+\<template>
   <div class="container" id="title-fragment">
     <div class="container">
       <div class="shop-pcb">

+ 1 - 1
components/store/home/StoreBanner.vue

@@ -23,7 +23,7 @@
         <div class="shop-logo">
           <img class="logo-img" :src="storeInfo.logoUrl || '/images/store/common/default.png'" />
          <!-- <p id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</p>-->
-          <p class="shop-name" v-if="storeInfo.storeName">{{storeInfo.storeName | nameFilter}}</p>
+          <p class="shop-name" v-if="storeInfo.storeName" :title="storeInfo.storeName | nameFilter">{{storeInfo.storeName | nameFilter}}</p>
           <p class="shop-name" v-else></p>
           <div class="enter-store">
             <a v-if="isFocus === 'false'" @click="focusStore(storeInfo, $event)">关注店铺</a>

+ 21 - 1
pages/mobile/center/user/collect/store.vue

@@ -34,6 +34,7 @@
             <!--</i>-->
           </div>
           <div class="list-item-phone" v-else>
+            <template v-if="item.enterprise">
             <!--电话:<a :href="'tel:' + item.enterprise.enTel" >{{item.enterprise.enTel}}</a>-->
             <p @click.stop="" v-if="item.enterprise.enTel">电话:<a :href="'tel:' + item.enterprise.enTel" >{{item.enterprise.enTel}}</a></p>
             <p v-else>电话:<span>{{item.enterprise.enTel || '-'}}</span></p>
@@ -45,6 +46,7 @@
               <i class="iconfont icon-shoucang1" :class="item.isFocus == 'true' ? 'icon-shoucang1' : 'icon-shoucang2'" :style="item.isFocus === 'true'?'color:#2d8cf0':''"></i>
               <span  class="focus" v-text="item.isFocus == 'true' ? '已关注' : '未关注'" :class="item.isFocus == 'true' ? '' : 'right01'" >已关注</span>
             </span>
+            </template>
             <!--<i class="iconfont icon-shoucang"  :style="item.isFocus === 'true'?'color:#2d8cf0':'color:#bbb'"></i>-->
           </div>
         </div>
@@ -115,6 +117,7 @@
     },
     async asyncData() {
       let { data } = await axios.get(`/trade/storeFocus/page`, {params: { count: 10, page: 1 }})
+      console.log(data)
       return {
         storeList: data
       }
@@ -127,10 +130,12 @@
     },
     methods: {
       onSearch(keyObj) {
-        console.log(keyObj.keyword)
         if (keyObj.keyword === '') {
+          this.onRemind('请输入搜索关键字')
+          return
           if (this.searchShow === true) {
             this.searchShow = false
+            this.storeList = {}
             this.page = 1
             this.reloadList()
           }
@@ -196,7 +201,22 @@
       async reloadList() {
         if (this.searchShow) {
           let { data } = await this.$http.get('/api/store-service/stores', {params: { page: this.page, count: this.count, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: this.keyword || null, field: this.field, op: 'similar' }})
+
+
+          let _pull = []
+          for (let i = 0; i < data.content.length; i++) {
+            _pull.push(findStoreFocusInMobil({id: data.content[i].id}))
+          }
+          Promise.all(_pull)
+            .then(result => {
+              if (result) {
+                for (let i = 0; i < result.length; i++) {
+                  this.$set(data.content[i], 'isFocus', result[i] ? result[i].data : 'false')
+                }
+              }
+            })
           this.storeList.content = [...this.storeList.content, ...data.content]
+
         } else {
           let { data } = await axios.get(`/trade/storeFocus/page`, {params: {count: 10, page: this.page}})
           this.storeList.content = [...this.storeList.content, ...data.content]

+ 41 - 31
pages/mobile/center/vendor/attentionBus.vue

@@ -10,9 +10,9 @@
           <i class="iconfont icon-sousuo"></i>
           </span>
       </div>
-      <div class="attention-bus-list" v-if="attentionList.length > 0">
+      <div class="attention-bus-list" v-if="attentionList.content.length > 0">
         <ul>
-          <li v-for="(item, index) in attentionList" v-bind:key="index">
+          <li v-for="(item, index) in attentionList.content" v-bind:key="index">
             <div class="item">
               <div class="name">
                 {{ item.nameCn | filterStr}}
@@ -25,7 +25,7 @@
           </li>
         </ul>
       </div>
-      <div class="none-state" v-if="!isSearchSearchingMore && attentionList.length === 0">
+      <div class="none-state" v-if="!isSearchSearchingMore && attentionList.content.length === 0">
         <img src="/images/mobile/@2x/search-empty.png">
         <p>暂无数据</p>
         <nuxt-link to="/">返回首页</nuxt-link>
@@ -39,15 +39,22 @@
     </div>
 </template>
 <script>
+  import axios from '~/plugins/axios'
     import { RemindBox, PullUp } from '~components/mobile/common'
     export default {
       name: 'attention-Bus',
       layout: 'mobile',
       middleware: 'authenticated',
-      fetch({store}) {
-        return Promise.all([
-          store.dispatch('product/getUserCollectCode', {keyword: '', count: 20, page: 1, type: 'yes', enUU: store.state.option.user.data.enterprise.uu})
-        ])
+      // fetch({store}) {
+      //   return Promise.all([
+      //     store.dispatch('product/getUserCollectCode', {keyword: '', count: 20, page: 1, type: 'yes', enUU: store.state.option.user.data.enterprise.uu})
+      //   ])
+      // },
+      async asyncData({store}) {
+        let {data} = await axios.get('/produce/kindConcern/kindList', { params: {keyword: '', count: 20, page: 1, type: 'yes', enUU: store.state.option.user.data.enterprise.uu} })
+        return {
+          attentionList: data
+        }
       },
       data() {
         return {
@@ -61,23 +68,23 @@
           isSearchSearchingMore: false
         }
       },
-      watch: {
-        'getkindConcernList.data': {
-          handler: function (val) {
-            if (this.isChange) {
-              this.attentionList = val.content
-              this.isChange = false
-            } else {
-              this.attentionList = [...this.attentionList, ...val.content]
-            }
-            this.isSearchSearchingMore = false
-          },
-          immediate: true
-        }
-      },
+      // watch: {
+      //   'getkindConcernList.data': {
+      //     handler: function (val) {
+      //       if (this.isChange) {
+      //         this.attentionList = val.content
+      //         this.isChange = false
+      //       } else {
+      //         this.attentionList = [...this.attentionList, ...val.content]
+      //       }
+      //       this.isSearchSearchingMore = false
+      //     },
+      //     immediate: true
+      //   }
+      // },
       computed: {
         allPage() {
-          return Math.ceil(this.$store.state.product.component.collectCode.data.totalElements / 10)
+          return Math.ceil(this.attentionList.totalElements / 10)
         },
         getkindConcernList() {
           return this.$store.state.product.component.collectCode
@@ -109,8 +116,8 @@
             this.$http.post('/produce/kindConcern/modify', param).then(res => {
               this.collectResult = '取消成功'
               this.timeoutCount++
-              // kindConcern.status = 0
-              this.$store.dispatch('product/UpdateCollectCode', { key: index, status: 0 })
+              kindConcern.status = 0
+              // this.$store.dispatch('product/UpdateCollectCode', { key: index, status: 0 })
               // this.attentionList.splice(index, 1)
               // if (this.attentionList.length <= 15 && this.page < this.allPage) {
               //   this.page++
@@ -121,7 +128,8 @@
             this.$http.post('/produce/kindConcern/modify', param).then(res => {
               this.collectResult = '关注成功'
               this.timeoutCount++
-              this.$store.dispatch('product/UpdateCollectCode', {key: index, status: 1})
+              kindConcern.status = 1
+              // this.$store.dispatch('product/UpdateCollectCode', {key: index, status: 1})
               // this.attentionList.splice(index, 1)
               // if (this.attentionList.length <= 15 && this.page < this.allPage) {
               //   this.page++
@@ -130,13 +138,15 @@
             })
           }
         },
-        getAttentionListArray(page) {
+       async getAttentionListArray(page) {
           this.isSearchSearchingMore = true
-          if (this.activeType === 'attention') {
-            this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
-          } else {
-            this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
-          }
+          let {data} = await axios.get('/produce/kindConcern/kindList', { params: {keyword: '', count: 20, page: page, type: 'yes', enUU: this.$store.state.option.user.data.enterprise.uu} })
+          this.attentionList.content = [...this.attentionList.content, ...data.content]
+          // if (this.activeType === 'attention') {
+          //   this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
+          // } else {
+          //   this.$store.dispatch('product/getUserCollectCode', {keyword: this.keyword, count: 20, page: page, enUU: this.$store.state.option.user.data.enterprise.uu})
+          // }
         },
         getMoreSearch() {
           this.page++