Переглянути джерело

Merge branch 'release-201816-wcz' of ssh://10.10.100.21/source/mall-web-ssr into feature-201816-wangcz

shenjj 7 роки тому
батько
коміт
c8b9054c99

+ 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_0c0tncbpq6umzpvi.css">
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_6hf7erbfhh9.css">
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" />
   {{ HEAD }}
   <script>

+ 11 - 1
components/mobile/register-saler/register/StepThird.vue

@@ -680,11 +680,21 @@
 <style lang="scss">
   .mobile-vendor_store_apply{
     #image-box{
-      padding:0 20px;
       overflow:visible;
       height:95vh;
       margin-top:0;
       top:2%;
+      padding:1rem;
+      .x-close-wrap{
+        right:-.15rem;
+        top:-.15rem;
+        width:.35rem;
+        height:.35rem;
+        line-height: .3rem;
+        a{
+          font-size: .35rem;
+        }
+      }
     }
     .wrap-title {
       color: #333;

+ 5 - 5
components/provider/HotCommodity.vue

@@ -12,7 +12,7 @@
               <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
                 <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
                 <span class="name">{{component.code}}</span>
-                <div class="price">1111.23242</div>
+                <div class="price">{{component.prices ? component.currencyName === 'RMB' ? '¥' + '&nbsp;' + component.prices[0].rMBPrice : '$' +  '&nbsp;' + component.prices[0].uSDPrice : '-'}}</div>
               </a>
             </li>
           </ul>
@@ -23,7 +23,7 @@
               <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
                 <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
                 <span class="name">{{component.code}}</span>
-                <div class="price">1111.23242</div>
+                <div class="price">{{component.prices ? component.currencyName === 'RMB' ? '¥' + '&nbsp;' + component.prices[0].rMBPrice : '$' +  '&nbsp;' + component.prices[0].uSDPrice : '-'}}</div>
               </a>
             </li>
           </ul>
@@ -34,7 +34,7 @@
               <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
                 <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
                 <span class="name">{{component.code}}</span>
-                <div class="price">1111.23242</div>
+                <div class="price">{{component.prices ? component.currencyName === 'RMB' ? '¥' + '&nbsp;' + component.prices[0].rMBPrice : '$' +  '&nbsp;' + component.prices[0].uSDPrice : '-'}}</div>
               </a>
             </li>
           </ul>
@@ -45,7 +45,7 @@
               <a :href="'/store/productDetail/' + component.batchCode" target="_blank">
                 <div class="img"><img :src="component.img || '/images/store/common/default.png'"/></div>
                 <span class="name">{{component.code}}</span>
-                <div class="price">1111.23242</div>
+                <div class="price">{{component.prices ? component.currencyName === 'RMB' ? '¥' + '&nbsp;' + component.prices[0].rMBPrice : '$' +  '&nbsp;' + component.prices[0].uSDPrice : '-'}}</div>
               </a>
             </li>
           </ul>
@@ -61,7 +61,6 @@ export default {
   name: 'hot-commodity',
   computed: {
     hotComponents () {
-      console.log(this.$store.state.provider.storeCms.hotComponents.data, 'c')
       return this.$store.state.provider.storeCms.hotComponents.data
     },
     // 产品推荐轮播
@@ -115,6 +114,7 @@ export default {
           margin: 0 auto;
           width: 181px;
           height: 117px;
+          line-height: 117px;
           border-radius: 2px;
           border: solid 1px #e2e2e2;
           img{

+ 2 - 3
components/provider/RecommendOriginal.vue

@@ -5,7 +5,7 @@
       <img src="/images/original/line.png" alt=""/>
     </div>
     <ul class="recommend-list list-unstyled list-inline">
-      <li class="recommend" v-for="(store, index) in stores">
+      <li class="recommend-store" v-for="(store, index) in stores">
         <a :href="'/store/' + store.uuid" target="_blank">
           <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'" /></div>
           <div class="content">
@@ -49,7 +49,6 @@ export default {
       line-height: 34px;
       text-align: center;
       span{
-        font-family: AdobeHeitiStd-Regular;
         font-size: 16px;
         color: #333;
       }
@@ -62,7 +61,7 @@ export default {
     ul.recommend-list{
       padding: 14px 0px 0 8px;
       width: 220px;
-      li.recommend{
+      li.recommend-store{
         margin-bottom: 12px;
         .img {
           margin-right: 8px;

+ 2 - 2
components/provider/RecommendStoreShow.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="container showAll">
-    <div class="new">
+    <div class="new-store">
       <new-store/>
       <recommend-original/>
       <hot-commodity/>
@@ -34,7 +34,7 @@ export default {
     width: 1190px;
     padding: 0;
     overflow: hidden;
-    .new {
+    .new-store {
       float: left;
       margin-right: 15px;
       width: 220px;

+ 15 - 5
components/store/home/EnterpriseInfo.vue

@@ -90,6 +90,12 @@
         <div class="content" style="height: 270px; width: 1070px; padding: 0 50px;"><qualification-certificate></qualification-certificate></div>
       </div>
     </el-dialog>
+    <!--联系卖家-->
+    <link-saler-box
+      :tel="tel"
+      v-if="showLinkBox"
+      @cancelAction="showLinkBox = false">
+    </link-saler-box>
   </div>
 </template>
 <script>
@@ -97,20 +103,23 @@
   import RecommendList from './RecommendList.vue'
   import CommodityList from './CommodityList.vue'
   import QualificationCertificate from './QualificationCertificate.vue'
+  import LinkSalerBox from '~components/common/LinkSalerBox.vue'
   export default {
     name: 'product-recommend-self',
     data () {
       return {
         dialogVisible: false,
         dialogCertificate: false,
-        showMore: false
+        showMore: false,
+        showLinkBox: false
       }
     },
     components: {
       RecommendList,
       Buy,
       CommodityList,
-      QualificationCertificate
+      QualificationCertificate,
+      LinkSalerBox
     },
     computed: {
       commodities () {
@@ -149,9 +158,9 @@
       // 店铺简介
       getIntro (text) {
         let realLength = this.baseUtils.getRealLen(text)
-        if (realLength > 500) {
+        if (realLength > 495) {
           this.showMore = true
-          text = this.baseUtils.cutOutString(text, 500) + '...'
+          text = this.baseUtils.cutOutString(text, 495) + '...'
         } else {
           this.showMore = false
         }
@@ -335,6 +344,7 @@
             margin: -5px 0 0 1px;
             border-radius: 5px;
            .list{
+             height: 150px;
              border-radius: 5px;
              background: #fff;
             .information-list {
@@ -352,7 +362,7 @@
             div:last-child {
               width: 158px;
               line-height: 20px;
-              padding: 0px 10px 0px 6px;
+              padding: 0px 0px 0px 6px;
             }
             }
             .information-list > div {

+ 29 - 2
pages/mobile/center/user/doPay/_ids.vue

@@ -6,7 +6,7 @@
     <div class="content-line md-pay">
       <h1>收款账户</h1>
       <div class="info-line clearfix">
-        <div class="fl">平台代收&nbsp;<i class="inline-block">i</i></div>
+        <div class="fl">平台代收&nbsp;<i class="inline-block" @click="showRemind = true">i</i></div>
         <div class="fr"><span class="inline-block text-ellipse">{{accountData.branchname}}</span></div>
       </div>
       <div class="info-line clearfix">
@@ -56,6 +56,12 @@
       <nuxt-link to="/mobile/order?type=buyer" class="operate inline-block">前往订单中心</nuxt-link>
       <a class="operate inline-block active" @click="submit">提交</a>
     </div>
+    <div class="mobile-modal" v-if="showRemind">
+      <div class="consignment-modal">
+        <div class="cm-content">货款将由优软商城在银行开立的第三方账户暂为保管,待您确定收货后,商城再和卖家结算。</div>
+        <div class="cm-foot" @click="showRemind = false">我知道了</div>
+      </div>
+    </div>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
@@ -70,7 +76,8 @@
         remindText: '',
         timeoutCount: '',
         showMore: false,
-        imgUrl: null
+        imgUrl: null,
+        showRemind: false
       }
     },
     components: {
@@ -309,5 +316,25 @@
         }
       }
     }
+    .consignment-modal {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      width: 6.3rem;
+      margin-left: -3.15rem;
+      margin-top: -1.36rem;
+      background: #fff;
+      border-radius: .15rem;
+      font-size: .32rem;
+      .cm-content {
+        padding: .39rem .42rem .25rem;
+        border-bottom: 1px solid #f4f4f4;
+      }
+      .cm-foot {
+        padding: .27rem 0;
+        color: #3f84f6;
+        text-align: center;
+      }
+    }
   }
 </style>

+ 77 - 7
pages/mobile/product/_batchCode.vue

@@ -80,7 +80,7 @@
         </div>
 
       </div>
-      <div class="content-line link cl-price2">
+    <!--  <div class="content-line link cl-price2">
         <ul class="clearfix">
           <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" tag="li" class="text-ellipse inline-block price-level">
             <i class="iconfont icon-dianpu"></i>
@@ -95,7 +95,7 @@
             <p class="lastOne" :class="{'active': component.attach && component.attach !== '' && component.attach !== '1'}">数据手册</p>
           </li>
         </ul>
-      </div>
+      </div>-->
     </div>
     <div class="params-wrap">
       <div class="wrap-title"><span class="line"></span>产品参数</div>
@@ -109,6 +109,26 @@
         <p>卖家上传的产品暂无参数,请 <b @click="showStoreInfo = true">联系卖家</b> 了解具体详情</p>
       </div>
     </div>
+    <div class="operate-bottom">
+      <div class="inline-block ob-ope">
+        <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" class="item inline-block">
+          <i class="iconfont icon-dianpu"></i>
+          <p>查看店铺</p>
+        </nuxt-link>
+        <a class="item inline-block" @click="showStoreInfo = true">
+          <i class="iconfont icon-duihua"></i>
+          <p>联系卖家</p>
+        </a>
+        <a class="item inline-block" @click="goAttach(component.attach)" :class="{'active': component.attach && component.attach !== '' && component.attach !== '1'}">
+          <i class="iconfont icon-pdf"></i>
+          <p>数据手册</p>
+        </a>
+      </div>
+      <div class="inline-block ob-buy">
+        <button @click="buy(false)">加入购物车</button>
+        <button @click="buy(true)">立即购买</button>
+      </div>
+    </div>
     <div class="mobile-modal" v-if="showStoreInfo" @touchmove="preventTouchMove($event)">
       <div class="mobile-modal-box mobile-link-en">
         <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
@@ -199,9 +219,9 @@
 //            window.location.href = url
           } else {
             if (!url) {
-              this.onRemind('该产品暂无数据手册')
+              this.setRemindText('该产品暂无数据手册')
             } else {
-              this.onRemind('数据手册地址错误')
+              this.setRemindText('数据手册地址错误')
             }
           }
         } else {
@@ -215,13 +235,13 @@
             this.$store.dispatch('shop/StoreFocus', {storeName: this.storeInfo.storeName, storeid: this.storeInfo.id})
               .then(response => {
                 this.$store.dispatch('shop/StoreFocusList', {id: this.storeInfo.id})
-                this.onRemind('关注成功')
+                this.setRemindText('关注成功')
               })
           } else {
             this.$http.post('/trade/storeFocus/delete/storeId', [this.storeInfo.id])
               .then(response => {
                 this.$store.dispatch('shop/StoreFocusList', {id: this.storeInfo.id})
-                this.onRemind('取消成功')
+                this.setRemindText('取消成功')
               })
           }
         } else {
@@ -229,9 +249,12 @@
           this.showLoginBox = true
         }
       },
-      onRemind: function (str) {
+      setRemindText: function (str) {
         this.remindText = str
         this.remindCount++
+      },
+      buy: function (flag) {
+        this.baseUtils.buyOrCar(flag, null, this, this.commodity, '/mobile/center/user/pay/')
       }
     }
   }
@@ -547,6 +570,53 @@
         padding-left: 1rem;
       }
     }
+    .operate-bottom {
+      height: 1rem;
+      position: fixed;
+      background: #fff;
+      bottom: .98rem;
+      width: 100%;
+      border-top: 1px solid #ccc;
+      > div {
+        height: 100%;
+      }
+      .ob-ope {
+        /*width: 3.72rem;*/
+        width: 49.5%;
+        .item {
+          width: 33.3%;
+          text-align: center;
+          p {
+            font-size: .24rem;
+            color: #666;
+          }
+          i {
+            color: #2e2d2c;
+            font-size: .4rem;
+            margin: .1rem 0 .04rem;
+            display: inline-block;
+          }
+          &.active {
+            .icon-pdf {
+              color: #eb062b;
+            }
+          }
+        }
+      }
+      .ob-buy {
+        width: 50.5%;
+        button {
+          width: 50%;
+          height: 100%;
+          color: #fff;
+          background: #ff9c00;
+          border: none;
+          &:last-child {
+            background: #f80915;
+          }
+        }
+      }
+    }
   }
   .com-none-state {
     padding: .2rem 0;

+ 16 - 18
utils/baseUtils.js

@@ -7,7 +7,7 @@ const NULL_ARR = ['空', '没', '无', '-', '—', 'null', '#N/A']
  *  $this: 当前对象
  *  item: 操作对象
  * */
-const _buyOrCar = function (isBuy, event, $this, item) {
+const _buyOrCar = function (isBuy, event, $this, item, url = '/user#/order/pay/') {
   if (event) event.stopPropagation()
   if (!$this.$store.state.option.user.logged) {
     $this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
@@ -36,22 +36,22 @@ const _buyOrCar = function (isBuy, event, $this, item) {
                   type: 'success'
                 })
                 window.setTimeout(function () {
-                  window.location.href = '/user#/order/pay/' + _enidfilter(response.data.data.orderid)
+                  window.location.href = url + _enidfilter(response.data.data.orderid)
                 }, 1000)
               } else {
-                window.location.href = '/user#/order/pay/' + _enidfilter(response.data.data.orderid)
+                window.location.href = url + _enidfilter(response.data.data.orderid)
               }
             } else {
               if (response.data.data && response.data.data.unvailable === 1) {
-                $this.$message.error('产品信息已失效,请刷新页面')
+                _setMessage($this, '产品信息已失效,请刷新页面', $this.isMobile, false)
               } else {
-                $this.$message.error(response.data.message)
+                _setMessage($this, response.data.message, $this.isMobile, false)
               }
             }
           }, err => {
             console.log(err)
             if (item.minBuyQty > item.reserve) {
-              $this.$message.error('商品' + item.code + '的库存已经不满足起订量')
+              _setMessage($this, '商品' + item.code + '的库存已经不满足起订量', $this.isMobile, false)
             }
           })
       } else {
@@ -68,24 +68,18 @@ const _buyOrCar = function (isBuy, event, $this, item) {
           .then(response => {
             if (response.data.success) {
               if (response.data.message) {
-                $this.$message({
-                  message: '添加购物车成功,但商品信息有更新',
-                  type: 'success'
-                })
+                _setMessage($this, '添加购物车成功,但商品信息有更新', $this.isMobile, true)
               } else {
-                $this.$message({
-                  message: '添加购物车成功',
-                  type: 'success'
-                })
+                _setMessage($this, '添加购物车成功', $this.isMobile, true)
               }
             } else {
               // if (response.data.code === 2) {
               //   $this.$message.error('库存已不满足起订量')
               // } else
               if (response.data.message === '该产品已失效') {
-                $this.$message.error(response.data.message + ',请刷新页面')
+                _setMessage($this, response.data.message + ',请刷新页面', $this.isMobile, false)
               } else {
-                $this.$message.error(response.data.message)
+                _setMessage($this, response.data.message, $this.isMobile, false)
               }
             }
           })
@@ -352,11 +346,15 @@ const _filterStringEllipsis = (str, len) => {
 * @str 提示信息
 * @isMobile 是否移动端
 * */
-const _setMessage = ($this, str = '系统错误', isMobile) => {
+const _setMessage = ($this, str = '系统错误', isMobile, isSuccess = false) => {
   if (isMobile) {
     $this.setRemindText(str)
   } else {
-    $this.$message.error(str)
+    if (isSuccess) {
+      $this.$message.success(str)
+    } else {
+      $this.$message.error(str)
+    }
   }
 }