Browse Source

产品详情页、店铺详情页增加产品搜索,店铺管理信息中增加应用领域字段,处理商城内的店铺地址改为应用领域,我的商机改成公司商机

yangc 7 years ago
parent
commit
b677d8dbf6

+ 1 - 1
app.html

@@ -6,7 +6,7 @@
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" />
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css" />
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
-  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_oi789zl3ptp7rpb9.css">
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_cwq6wcut03gl23xr.css">
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" />
   {{ HEAD }}
   <script>

+ 13 - 11
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -1,11 +1,11 @@
 <template>
   <div class="mobile-modal" @touchmove="preventTouchMove($event)">
-    <div class="mobile-modal-box">
+    <div class="mobile-modal-box" ref="modalBody">
       <div class="mobile-modal-header">{{purchaseDetail.agreed == 1 || agreed == 1 ? '已采纳' : '已报价'}}<i class="icon-guanbi iconfont" @click="cancel"></i></div>
       <div class="say-price-info" ref="mobileModalBox">
         <div>
           <div v-if="isBuyer">
-            <div class="base-info">
+           <!-- <div class="base-info">
               <div class="content-line">
                 品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
               </div>
@@ -21,12 +21,12 @@
               <div class="content-line">
                 采购数量(PCS):<span>{{purchaseDetail.needquantity || '-'}}</span>
               </div>
-              <!--<div class="content-line">
+              &lt;!&ndash;<div class="content-line">
                 币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
               </div>
               <div class="content-line">
                 生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
-              </div>-->
+              </div>&ndash;&gt;
               <div class="content-line">
                 截止日期:<span>{{purchaseDetail.endDate | date}}</span>
               </div>
@@ -38,7 +38,7 @@
               <div class="content-line">
                 联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
               </div>
-            </div>
+            </div>-->
             <div class="base-info say-info" v-for="(item, index) in purchaseDetail.qutations" @click="selectQutation(index)">
               <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
               <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex != index" src="/images/mobile/@2x/applyPurchase/say-price-default.png" alt="">
@@ -73,7 +73,7 @@
           </div>
           <div v-if="!isBuyer">
           <div class="base-info">
-            <div class="content-line">
+            <!--<div class="content-line">
               品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
             </div>
             <div class="content-line">
@@ -87,16 +87,16 @@
             </div>
             <div class="content-line">
               采购数量(PCS):<span>{{purchaseDetail.needquantity || '-'}}</span>
-            </div>
+            </div>-->
             <!--<div class="content-line">
               币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
             </div>
             <div class="content-line">
               生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
             </div>-->
-            <div class="content-line">
+         <!--   <div class="content-line">
               截止日期:<span>{{purchaseDetail.endDate | date}}</span>
-            </div>
+            </div>-->
             <div class="content-line">
               买家:<span>{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
             </div>
@@ -212,6 +212,8 @@
     mounted() {
       this.$nextTick(() => {
         this._initscroll()
+//        console.log(this.$refs.modalBody.scrollHeight)
+        this.$refs.modalBody.style.marginTop = (0 - (this.$refs.modalBody.scrollHeight / 2)) / 100 - 2.5 + 'rem'
       })
     }
   }
@@ -219,11 +221,10 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
-      top: 10%;
+      top: 50%;
       left: 3%;
       right: 3%;
       width: 7rem;
-      bottom: 10%;
       margin: 0 auto;
       .say-price-info {
         background: #f3f3f3;
@@ -238,6 +239,7 @@
           &.say-info {
             /*height: 4.54rem;*/
             position: relative;
+            margin-top: .18rem;
             > img {
               position: absolute;
               right: 0;

+ 4 - 4
components/mobile/applyPurchase/SeekList.vue

@@ -2,17 +2,16 @@
   <div>
     <ul class="seek-list">
       <li v-for="(item, index) in purchaseManListData">
-        <p>
+        <p v-if="userType !== 'buyer'">
           <span v-if="item.inquiry && (item.inquiry.enName || (item.inquiry.enterprise && item.inquiry.enterprise.enName))">{{[item.inquiry.enName || item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
           <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
         </p>
-        <div>
+        <div class="clearfix">
           <div class="fl">
             <div>
               品牌:
               <span>{{item.inbrand || '-'}}</span>
             </div>
-            <div>
             <div>
               类目(产品名称):
               <span>{{item.title || item.prodTitle || '-'}}</span>
@@ -21,6 +20,7 @@
               型号:
               <span>{{item.cmpCode || '-'}}</span>
             </div>
+            <div>
               规格:
               <span>{{item.spec || '-'}}</span>
             </div>
@@ -217,7 +217,7 @@ export default {
 
     li {
       border: 1px solid #e0e0e4;
-      height: 4.2rem;
+      /*height: 4.2rem;*/
       margin: auto;
       margin-bottom: .2rem;
       max-width: 7.3rem;

+ 1 - 1
components/mobile/center/Seek.vue

@@ -5,7 +5,7 @@
       <p>{{seekTitle}}</p>
     </div>
     <div class="mobile-fix-content" id="mobileFixContent">
-      <div class="seek-title com-switch-item">
+      <div class="seek-title com-switch-item" v-if="userType == 'saler'">
         <span class="mobile-switch-btn" :class="{'active': activeType=='all'}" @click="switchActiveType('all')">公司商机</span>
         <span class="mobile-switch-btn" :class="{'active': activeType=='self'}" @click="switchActiveType('self')">我的商机</span>
       </div>

+ 21 - 6
components/mobile/store/StoreDetail.vue

@@ -20,6 +20,15 @@
           <p>抱歉,暂无主营产品信息</p>
         </div>
       </div>
+      <div class="store-description">
+        <h4>应用领域</h4>
+        <p class="content" v-if="store.storeApplication">
+          {{store.storeApplication}}
+        </p>
+        <div class="com-none-state" v-else>
+          <p>抱歉,暂无应用领域信息</p>
+        </div>
+      </div>
      <div class="contact-info">
       <h4>联系我们</h4>
       <ul class="list-unstyled clearfix">
@@ -70,7 +79,7 @@
       <p>抱歉,暂无店铺简介</p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>-->
-    <div class="product-store">
+    <div class="product-store" v-else>
       <div class="search-content">
         <input type="text" v-model="keyword" placeholder="请输入品牌/类目/型号/规格" @keyup.13="search">
         <span @click="search">
@@ -95,7 +104,7 @@
           </tr>
         </thead>
         <tbody id="product-body">
-        <tr v-for="commodity in searchLists" @click="goProductDetail(commodity.uuid)">
+        <tr v-for="commodity in searchLists" @click="goProductDetail(commodity)">
           <td class="store-name">
             <div>{{commodity.code}}</div>
             <div>{{commodity.brandNameCn}}</div>
@@ -256,11 +265,17 @@
           this.$store.commit('shop/storeInfo/GET_STORE_COMMODITY_FAILURE', err)
         }
       },
-      goProductDetail: function (uuid) {
-        if (uuid) {
-          this.$router.push('/mobile/brand/componentDetail/' + uuid)
+      goProductDetail: function (com) {
+//        if (uuid) {
+//          this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//        } else {
+//          this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+//          this.timeoutCount ++
+//        }
+        if (com.batchCode) {
+          this.$router.push('/mobile/product/' + com.batchCode)
         } else {
-          this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+          this.collectResult = '产品参数错误'
           this.timeoutCount ++
         }
       },

+ 6 - 1
components/product/ComponentGoods.vue

@@ -9,7 +9,7 @@
       <thead>
       <tr style="height: 40px;">
         <th width="80"></th>
-        <th width="150">品牌/型号</th>
+        <th width="150">品牌/类目/型号/规格</th>
         <th width="100">包装/生产日期</th>
         <th width="130">库存</th>
         <th width="90">梯度/pcs</th>
@@ -35,8 +35,13 @@
         <td class="brand-code">
           <div class="brand" v-if="compGoods.brand.nameEn"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
           <div class="brand" v-if="!compGoods.brand.nameEn">—</div>
+          <div class="brand">
+            <nuxt-link v-if="compGoods.kind&&compGoods.kind.nameCn" :to="`/product/kind/${compGoods.kindid}`" v-text="compGoods.kind.nameCn"></nuxt-link>
+          </div>
+          <div v-if="!compGoods.kind||!compGoods.kind.nameCn">{{compGoods.kindName || '—'}}</div>
           <div class="code" v-if="compGoods.code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
           <div class="code" v-if="!compGoods.code">—</div>
+          <div class="brand" style="width: 160px;">{{compGoods.spec || '—'}}</div>
         </td>
         <td>
           <div class="package" v-if="compGoods.packaging">{{compGoods.packaging}}</div>

+ 2 - 0
components/product/brand/BrandComponent.vue

@@ -14,6 +14,7 @@
         <tr class="bgf7">
           <th width="300">类目(产品名称)</th>
           <th width="300">型号</th>
+          <th width="300">规格</th>
           <th width="200">数据手册</th>
           <th width="200">操作</th>
         </tr>
@@ -22,6 +23,7 @@
         <tr class="text-center" v-for="item in list.content">
           <td><nuxt-link :to="'/product/kind/' + item.kindid"><span>{{item.kind.nameCn || '-'}}</span></nuxt-link></td>
           <td><nuxt-link :to="'/product/component/' + item.uuid"><span>{{item.code}}</span></nuxt-link></td>
+          <td><span>{{item.spec || '-'}}</span></td>
           <td><a @click="toAttach(item.attach)"><button class="btn btn-default"  :disabled="!item.attach" :class="{'disabledbtn':!item.attach}">Datasheet手册</button></a></td>
           <td>
             <button class="btn btn-default disabledbtn" :disabled="true">申请样片</button>

+ 21 - 9
components/product/component/ComponentDetail.vue

@@ -23,37 +23,42 @@
               <div class="message-item">类目(产品名称)</div>
               <div class="colon">:</div>
               <div class="message-body body-long">
-                {{list.kind.nameCn || ''}}
+                {{list.kind.nameCn || '-'}}
               </div>
             </div>
+            <div class="message-detail">
+              <div class="message-item">规格</div>
+              <div class="colon">:</div>
+              <div :title="list.spec">{{list.spec || '-'}}</div>
+            </div>
             <div class="message-detail">
               <div class="message-item">总库存量</div>
               <div class="colon">:</div>
-              <div class="message-body">{{list.reserve || '暂无库存'}}</div>
+              <div class="message-body body-long">{{list.reserve || '暂无库存'}}</div>
             </div>
             <div class="message-detail">
               <div class="message-item">产品生命周期</div>
               <div class="colon">:</div>
-              <div class="message-body body-long">
+              <div class="message-body">
                 {{list.lifecycle | lifecycleFilter}}
               </div>
             </div>
             <div class="message-detail">
               <div class="message-item">规格书</div>
               <div class="colon">:</div>
-              <div class="message-body">
+              <div class="message-body body-long">
                 <img src="/images/all/pdf.png" alt="" @click="toAttach(list.attach)" v-if="list.attach">
                 <span v-if="!list.attach">暂无</span>
               </div>
             </div>
-            <div class="message-detail">
+            <div class="message-detail message-long-line">
               <div class="message-item">产品描述</div>
               <div class="colon" style="margin-right: 17px">:</div>
               <div class="description"
                    :class="{'more-description':showMoreDesc}"
                    v-if="list.description">
                 {{[list.description, showMoreDesc] | descriptionFilter}}
-                <span @click="showMoreDesc = !showMoreDesc" v-if="list.description.length > 30">
+                <span @click="showMoreDesc = !showMoreDesc" v-if="getRealLength(list.description) > 84">
                   <img :src="!showMoreDesc?'/images/component/circle-arrow-down.png':'/images/component/circle-arrow-up.png'" alt="">
                   <!--<i class="iconfont" :class="{'icon-shouqi':showMoreDesc,'icon-shouqi1':!showMoreDesc}"></i>-->
                   <span v-text="showMoreDesc ? '收起' : '展开'"></span>
@@ -105,6 +110,7 @@
 </template>
 <script>
   //  import ComponentMenu from '~components/product/component/componentMenu.vue'
+  import {getRealLen, cutOutString} from '~utils/baseUtils'
   export default {
     name: 'ComponentDetail',
     data () {
@@ -155,7 +161,7 @@
 //    },
     filters: {
       descriptionFilter: function ([str, type]) {
-        return !type ? str.length > 30 ? str.substring(0, 30) : str : str
+        return !type ? getRealLen(str) > 84 ? cutOutString(str, 84) + '...' : str : str
       },
       lifecycleFilter: function (code) {
         if (code === 815) {
@@ -209,6 +215,9 @@
           tmp += str.substring(index, str.length - 1)
         }
         return tmp
+      },
+      getRealLength: function (str) {
+        return getRealLen(str)
       }
 //      getRealLen: function (str) {
 //        let len = 0
@@ -313,7 +322,7 @@
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
-    width: 93px;
+    width: 65px;
   }
   .componentDetail .container .component-message .message-body.body-long {
     width: 450px;
@@ -344,7 +353,7 @@
     border-top: none;
     position: absolute;
     right: 94px;
-    width: 508px;
+    width: 708px;
     background: #f5f6f8;
     z-index: 1;
     line-height: 22.7px;
@@ -491,6 +500,9 @@
   .component-message .message-detail:nth-child(odd) {
     width: 200px;
   }
+  .component-message .message-detail.message-long-line {
+    width: 796px;
+  }
   .component-message .message-detail:nth-child(1),.component-message .message-detail:nth-child(2) {
     border-top: 1px solid #e5e5e5;
   }

+ 1 - 1
components/provider/ExcellentSuppliers.vue

@@ -13,7 +13,7 @@
               <span>{{store.storeName}}</span>
             </div>
             <div class="description">
-              商家介绍:<span>{{store.description}}</span>
+              商家介绍:<span>{{store.enterprise.description}}</span>
             </div>
           </div>
         </a>

+ 1 - 1
components/provider/RecommendOriginal.vue

@@ -14,7 +14,7 @@
             </div>-->
             <div class="description">
               <strong>商家介绍</strong>:
-              <span>{{store.description || '暂无简介'}}</span>
+              <span>{{store.enterprise.description || '暂无简介'}}</span>
             </div>
           </div>
         </a>

+ 1 - 1
components/provider/Suppliers.vue

@@ -31,7 +31,7 @@
           <a class="store-name" :href="'/store/' + store.uuid" target="_blank"><div :title="store.storeName">{{store.storeName}}</div></a>
           <div class="store-message">
             <span>商家介绍:</span>
-            <span>{{showLittleDescription(store.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
+            <span>{{showLittleDescription(store.enterprise.description)}}<em v-if="store.description && store.description.length > 160">...</em></span>
           </div>
         </td>
         <td class="vertical-middle">

+ 3 - 2
components/search/GoodList.vue

@@ -41,7 +41,7 @@
           <thead>
           <tr style="height: 40px;">
             <!--<th width="80"></th>-->
-            <th width="140">品牌/类目/型号</th>
+            <th width="140">品牌/类目/型号/规格</th>
             <th width="100">包装/生产日期</th>
             <th width="110">商家名称</th>
             <th width="140">库存</th>
@@ -73,6 +73,7 @@
                 <span v-if="!item.uuid">{{item.code}}</span>
               </div>
               <div class="brand" v-if="!item.code">—</div>
+              <div class="brand">{{item.spec || '—'}}</div>
             </td>
             <td>
               <div class="package" v-text="item.packaging"></div>
@@ -313,7 +314,7 @@
         this.$emit('filterPriceEvent', this.filter)
       },
       goUnstandardDetail: function (comp) {
-        if (!comp.uuid) {
+        if (comp.batchCode) {
           this.$router.push('/store/productDetail/' + comp.batchCode)
         }
       }

+ 6 - 0
components/store/BaseInfo.vue

@@ -20,6 +20,12 @@
           <nuxt-link class="col-xs-10" :to="'/store/' + storeInfo.uuid">返回店铺</nuxt-link>
         </div>
         <div class="intro-text" v-text="storeInfo.description || '暂无主营产品信息'"></div>
+        <div class="intro-title row">
+          <h3 class="col-xs-2">
+            应用领域
+          </h3>
+        </div>
+        <div class="intro-text" v-text="storeInfo.storeApplication || '暂无应用领域信息'"></div>
       </div>
     </div>
     <div id="contact-fragment">

+ 1 - 1
components/store/CommodityList.vue

@@ -549,7 +549,7 @@ export default {
 
 	/* 物品列表 */
 	#goods-list-fragment .goodslist .brand-code {
-		font-size: 14px;
+		font-size: 12px;
 		text-align: center;
     position: relative;
 	}

+ 5 - 4
pages/mobile/center/user/collect/component.vue

@@ -8,10 +8,11 @@
       <ul v-if="compList && compList.length">
         <li :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>
-            <p>型号:<span v-text="comp.componentinfo.code"></span></p>
-            <p>产品描述:<span v-text="comp.componentinfo.description"></span></p>
+            <p>品牌:<span v-text="comp.componentinfo.brand.nameCn || '-'"></span></p>
+            <p>类目(产品名称):<span v-text="comp.componentinfo.kind.nameCn || '-'"></span></p>
+            <p>型号:<span v-text="comp.componentinfo.code || '-'"></span></p>
+            <p>规格:<span v-text="comp.componentinfo.spec || '-'"></span></p>
+            <p>产品描述:<span v-text="comp.componentinfo.description || '-'"></span></p>
           </div>
           <div class="vir"></div>
           <div class="fr">

+ 189 - 26
pages/mobile/product/_batchCode.vue

@@ -5,8 +5,8 @@
     </div>
     <div class="content-wrap">
       <div class="content-line cl-title">
-        <span class="code text-ellipse inline-block">sddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd</span>
-        <div class="focus-wrap inline-block">
+        <span class="code text-ellipse inline-block">{{commodity.code}}</span>
+        <div class="focus-wrap inline-block" :class="{'active': isFocus}">
           <i class="iconfont icon-shoucang"></i>
           <span>店铺关注</span>
         </div>
@@ -17,37 +17,69 @@
           <span>数量:</span>
         </div>
         <ul>
-          <li class="text-ellipse inline-block price-level">
-            <p><span>$</span>159.00</p>
-            <span>1+</span>
-          </li>
-          <li class="text-ellipse inline-block price-level">
-            <p><span>$</span>159.00</p>
-            <span>1+</span>
+          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel1">
+            <p><span>{{isRMB ? '¥' : '$'}}</span>
+              {{isRMB ? price.rMBPrice : price.uSDPrice}}
+            </p>
+            <span>{{price.start}}+</span>
           </li>
-          <li class="text-ellipse inline-block price-level">
+        </ul>
+        <i :class="`iconfont icon-arrow-${isMore ? 'up' : 'down'}`" @click="isMore = !isMore" v-if="priceLevel2.length"></i>
+      </div>
+      <div class="content-line cl-price2" v-if="priceLevel2.length && isMore">
+        <ul>
+          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel2">
             <p><span>$</span>159.00</p>
             <span>1+</span>
           </li>
         </ul>
-        <i class="iconfont icon-arrow-down"></i>
       </div>
-      <div class="content-line cl-price2">
+      <div class="content-line link cl-price2">
         <ul>
-          <li class="text-ellipse inline-block price-level">
-            <p><span>$</span>159.00</p>
-            <span>1+</span>
+          <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" tag="li" class="text-ellipse inline-block price-level">
+            <i class="iconfont icon-shouye-copy"></i>
+            <p>店铺</p>
+          </nuxt-link>
+          <li class="text-ellipse inline-block price-level" @click="showStoreInfo = true">
+            <i class="iconfont icon-kefu1"></i>
+            <p>联系卖家</p>
           </li>
-          <li class="text-ellipse inline-block price-level">
-            <p><span>$</span>159.00</p>
-            <span>1+</span>
+          <li class="text-ellipse inline-block price-level" :class="{'active': component.attach && component.attach != '1'}" @click="goAttach(component.attach)">
+            <i class="iconfont icon-pdf"></i>
+            <p>数据手册</p>
           </li>
         </ul>
       </div>
     </div>
+    <div class="params-wrap">
+      <p>产品参数</p>
+      <ul v-if="component.properties && component.properties.length">
+        <li v-for="prop in component.properties" v-if="prop.property">
+          <span class="inline-block" v-text="prop.property.labelCn"></span>
+          <span class="inline-block text-ellipse" v-text="prop.value"></span>
+        </li>
+      </ul>
+      <div class="com-none-state" v-else>
+        <p>卖家上传的产品暂无参数,请 <b @click="showStoreInfo = true">联系卖家</b> 了解具体详情</p>
+      </div>
+    </div>
+    <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
+      <div class="mobile-modal-box">
+        <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
+        <div class="mobile-modal-content">
+          <div v-if="checkInfo(storeInfo.enterprise.enAddress)">商家地址:{{storeInfo.enterprise.enAddress}}</div>
+          <!--<div class="content-line link-url">在线咨询</div>-->
+          <div v-if="checkInfo(storeInfo.enterprise.enTel)">致电:<a :href="'tel:' + storeInfo.enterprise.enTel" target="_blank" class="content-line link-url">{{storeInfo.enterprise.enTel}}</a></div>
+          <div v-if="checkInfo(storeInfo.enterprise.enEmail)">邮件:<a :href="'mailto:' + storeInfo.enterprise.enEmail" target="_blank" class="content-line link-url">{{storeInfo.enterprise.enEmail}}</a></div>
+        </div>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="remindCount"></remind-box>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
   </div>
 </template>
 <script>
+  import {RemindBox, LoginBox} from '~components/mobile/common'
   export default {
     layout: 'mobile',
     fetch({ store, route }) {
@@ -55,9 +87,71 @@
         store.dispatch('shop/findCommodityOnBatchInfo', route.params)
       ])
     },
+    components: {
+      RemindBox,
+      LoginBox
+    },
+    data () {
+      return {
+        isMore: false,
+        showStoreInfo: false,
+        remindText: '',
+        remindCount: 1,
+        url: '',
+        showLoginBox: false
+      }
+    },
     computed: {
       commodity () {
         return this.$store.state.shop.storeInfo.commodity.data
+      },
+      isRMB () {
+        return this.commodity.currencyName === 'RMB'
+      },
+      commodityPrices () {
+        return this.commodity.prices
+      },
+      priceLevel1 () {
+        return this.commodityPrices.length > 3 ? this.commodityPrices.slice(0, 3) : this.commodityPrices
+      },
+      priceLevel2 () {
+        return this.commodityPrices.length > 3 ? this.commodityPrices.slice(3, this.commodityPrices.length) : []
+      },
+      isFocus () {
+        console.log(this.$store.state.shop.storeInfo)
+        return this.$store.state.shop.storeInfo.focusList.data === 'true'
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      component () {
+        return this.$store.state.shop.storeInfo.component.data
+      }
+    },
+    methods: {
+      checkInfo: function (str) {
+        return str && str.trim() !== ''
+      },
+      goAttach: function (url) {
+        if (this.user.logged) {
+          if (url && url !== '1') {
+            window.open(url)
+//            window.location.href = url
+          } else {
+            if (!url) {
+              this.onRemind('该产品暂无数据手册')
+            } else {
+              this.onRemind('数据手册地址错误')
+            }
+          }
+        } else {
+          this.url = this.$route.fullPath
+          this.showLoginBox = true
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.remindCount++
       }
     }
   }
@@ -76,10 +170,9 @@
       }
     }
     .content-wrap {
-      -webkit-box-shadow: 0 -3px 7px 0px rgba(143, 141, 141, 0.25);
-      -moz-box-shadow: 0 -3px 7px 0px rgba(143, 141, 141, 0.25);
-      box-shadow: 0 -3px 7px 0px rgba(143, 141, 141, 0.25);
-      height: 3rem;
+      -webkit-box-shadow: 0 0 7px 0 rgba(143, 141, 141, 0.25);
+      -moz-box-shadow: 0 0 7px 0 rgba(143, 141, 141, 0.25);
+      box-shadow: 0 0 7px 0 rgba(143, 141, 141, 0.25);
       .content-line {
         height: 1.04rem;
         border-bottom: .01rem solid #d9d9d9;
@@ -88,7 +181,7 @@
           .code {
             font-size: .3rem;
             font-weight: bold;
-            max-width: 6.22rem;
+            width: 6.22rem;
             padding-right: .3rem;
             border-right: .01rem solid #e1e1e1;
             line-height: .76rem;
@@ -128,10 +221,11 @@
           }
         }
         &.cl-price1 {
-          padding: .18rem .18rem .2rem;
+          padding: .1rem .18rem 0;
           .fl {
             font-size: .24rem;
             text-align: center;
+            margin-top: .08rem;
             .price-tag {
               width: .69rem;
               height: .34rem;
@@ -146,7 +240,7 @@
           ul {
             display: inline-block;
             li {
-              width: 2.04rem;
+              width: 1.96rem;
             }
           }
           i {
@@ -154,14 +248,83 @@
           }
         }
         &.cl-price2 {
+          padding-top: .1rem;
           ul {
             text-align: center;
             li {
-              width: 2.3rem;
+              width: 2.83rem;
             }
           }
         }
+        &.link {
+          padding-top: .18rem;
+          ul {
+            li {
+              width: 33%;
+              &.active {
+                i {
+                  color: #d81e06;
+                }
+              }
+            }
+            i {
+              font-size: .39rem;
+              &.icon-kefu1 {
+                font-size: .44rem;
+                position: relative;
+                top: -.05rem;
+                & + p {
+                  margin-top: -.07rem;
+                }
+              }
+            }
+            p {
+              font-size: .2rem;
+              color: #333;
+            }
+          }
+        }
+      }
+    }
+    .params-wrap {
+      background: #f4f4f4;
+      padding: .29rem .23rem;
+      p {
+        font-size: .26rem;
+        text-align: center;
+        margin-bottom: .24rem;
       }
+      ul {
+        border-left: .01rem solid #d9d9d9;
+        border-top: .01rem solid #d9d9d9;
+        background: #fff;
+        font-size: .24rem;
+        li {
+          border-bottom: .01rem solid #d9d9d9;
+          span {
+            border-right: .01rem solid #d9d9d9;
+            height: .67rem;
+            line-height: .67rem;
+            text-align: center;
+            &:first-child {
+              width: 25%;
+            }
+            &:last-child {
+              width: 75%;
+              text-align: left;
+              padding: 0 .15rem;
+            }
+          }
+        }
+      }
+    }
+  }
+  .com-none-state {
+    padding: .2rem 0;
+    background: transparent;
+    b {
+      color: #3c7cf5;
+      font-weight: normal;
     }
   }
 </style>

+ 12 - 6
pages/mobile/search/_keycode.vue

@@ -32,7 +32,7 @@
 
     <div v-if="searchLists && searchLists.length > 0" >
       <div class="detail-brand" v-for="(item, index) in searchLists" :style="index == 0 ? 'padding-top: .2rem;' : ''" v-if="item">
-        <div class="brand-item" @click="goComponent(item.uuid)">
+        <div class="brand-item" @click="goComponent(item)">
           <p>商家名称:<span>{{item.storeName || '-'}}</span></p>
           <p>品牌:<span>{{item.brandEn || item.brand.nameCn || '-'}}</span></p>
           <p>类目(产品名称):<span>{{item.kind ? item.kind.nameCn : '-'}}</span></p>
@@ -191,13 +191,19 @@
           this.showLoginBox = true
         }
       },
-      goComponent: function (uuid) {
+      goComponent: function (item) {
         if (!this.isClickCollect) {
-          if (uuid) {
-            this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//          if (uuid) {
+//            this.$router.push('/mobile/brand/componentDetail/' + uuid)
+//          } else {
+//            this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
+//            this.timeoutCount++
+//          }
+          if (item.batchCode) {
+            this.$router.push('/mobile/product/' + item.batchCode)
           } else {
-            this.collectResult = '卖家上传的产品暂无参数,请联系卖家了解具体详情。'
-            this.timeoutCount++
+            this.collectResult = '产品参数错误'
+            this.timeoutCount ++
           }
         } else {
           this.isClickCollect = false

+ 35 - 9
pages/mobile/user/storeinfo.vue

@@ -37,6 +37,15 @@
                   <textarea v-model="storeInfo.description" maxlength="500" ref="descTextarea"></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'">
+                    {{storeInfo.storeApplication}}
+                  </div>
+                  <div class="text pull-left" v-else>
+                    <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" v-if="storeState === 'look'">
@@ -143,6 +152,11 @@
         handler: function (val) {
           this.setTextareaHeight()
         }
+      },
+      'storeInfo.storeApplication': {
+        handler: function (val) {
+          this.setApplicationTextareaHeight()
+        }
       }
 //      'storeInfo.enterprise.address': {
 //        handler: function (val) {
@@ -164,7 +178,8 @@
         this.Islook = true
         this.hidelook = true
         this.setTextareaHeight()
-        this.setAddarea()
+        this.setApplicationTextareaHeight()
+//        this.setAddarea()
       },
       dealWithText2(tp) {
         if (tp === 'open') {
@@ -248,7 +263,8 @@
           description: this.storeInfo.description,
           enterprise: this.storeInfo.enterprise,
           storeName: this.storeInfo.storeName,
-          storeShortName: this.storeInfo.storeShortName
+          storeShortName: this.storeInfo.storeShortName,
+          storeApplication: this.storeInfo.storeApplication
         }
         this.$http.put(`/store-service/stores/${this.storeInfo.uuid}?kind=BASIC_INFO`, kay).then(res => {
           this.collectResult = '保存成功'
@@ -270,18 +286,27 @@
           }
         })
       },
-      setAddarea () {
+      setApplicationTextareaHeight () {
         this.$nextTick(() => {
-          let el = this.$refs.addTextarea
+          let el = this.$refs.applicationTextarea
           if (el) {
-//            console.log(el.scrollHeight - el.clientHeight)
-//            console.log(el.clientHeight)
-//            console.log('-----------------')
-            el.style.height = '.6rem'
-            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 25) / 100 + 'rem'
+            el.style.height = '2rem'
+            el.style.height = (el.scrollHeight * 2.06 - el.clientHeight + 150) / 100 + 'rem'
           }
         })
       },
+//      setAddarea () {
+//        this.$nextTick(() => {
+//          let el = this.$refs.addTextarea
+//          if (el) {
+// //            console.log(el.scrollHeight - el.clientHeight)
+// //            console.log(el.clientHeight)
+// //            console.log('-----------------')
+//            el.style.height = '.6rem'
+//            el.style.height = (el.scrollHeight * 2 - el.clientHeight + 25) / 100 + 'rem'
+//          }
+//        })
+//      },
       setBS () {
         if (this.BScroll) {
           this.BScroll.refresh()
@@ -302,6 +327,7 @@
       storeI() {
         let str = JSON.stringify(this.$store.state.option.storeStatus.data)
         this.storeInfo = JSON.parse(str)
+        console.log(this.storeInfo)
         return ''
       },
       isAdmin () {