Эх сурвалжийг харах

Merge branch 'backu01'

# Conflicts:
#	assets/scss/common.scss
#	components/common/page/pageComponent.vue
#	components/product/CategoryNav.vue
#	components/provider/HotCommodity.vue
#	components/store/CommodityInfo.vue
#	nuxt.config.js
#	plugins/element-ui.js
hangb 8 жил өмнө
parent
commit
b82836562b

+ 1 - 97
assets/scss/common.scss

@@ -352,104 +352,8 @@ div.el-tree-node__content{
   z-index: 1000;
   color: #fff;
 }
-//.messageBoard .img-item .previewImg  i{
-//  display: none;
-//  position: absolute;
-//  top: 27px;
-//  right: 16px;
-//  z-index: 1000;
-//  color: #fff;
-//  margin-right: 34px;
-//}
 .messageBoard .img-item:hover .preview {
   display: block;
 }
-//.messageBoard .img-item:hover  i {
-//  display: block;
-//
-//}
 
-/*查看大图*/
-//#image-box .x-floating-wrap,.image-box .x-floating-wrap {
-//  position: fixed;
-//  z-index: 99998;
-//  background: #000;
-//  top: 0;
-//  left: 0;
-//  width: 100%;
-//  height: 100%;
-//  opacity: 0.5;
-//}
-//#image-box,.image-box{
-//  display:table; overflow:hidden; margin-left:50px; _position:relative;  width: 1200px;height: 700px;
-//  position: fixed;
-//  top: 50%;
-//  margin-top: -300px;
-//  left: 50%;
-//  margin-left: -600px;
-//  z-index: 2000;
-//}
-//#image-box .x-floating,.image-box .x-floating {
-//  vertical-align:middle !important;
-//  display:table-cell;
-//  text-align:center;
-//  _position:absolute;
-//  _top:50%; _left:50%;
-//  top: inherit !important;
-//  left: inherit !important;
-//}
-//#image-box .x-floating img ,.image-box .x-floating img {
-//  margin: auto auto;
-//  max-width: 970px !important;
-//  max-height: 600px !important;
-//  -webkit-user-select: none;
-//  -moz-user-select: none;
-//  -ms-user-select: none;
-//  user-select: none;
-//}
-//#image-box .x-floating-wrap,.image-box .x-floating-wrap{
-//  z-index: 1000000 !important;
-//}
-//#item-content{
-//  color:#fff; display:inline-block; _position:relative; _top:-50%; _left:-50%;
-//  position: relative;
-//  z-index: 10000000;
-//}
-//#item-content div.x-close-wrap{
-//  position: absolute;
-//  right: -15px;
-//  line-height: 30px;
-//  top: -13px;
-//  color: #fff;
-//  width: 35px;
-//  height: 35px;
-//  background: rgba(0, 0, 0, 0.5);
-//  border-radius: 100%;
-//  opacity: 1;
-//  margin: 0;
-//  z-index: 100000;
-//  min-height: initial;
-//  text-align: center;
-//}
-//#item-content div.x-close-wrap a{
-//  position: relative;
-//  left: 0;
-//  bottom: 0;
-//  font-size: 34px;
-//  color: #fff;
-//}
-//#item-content div.x-close-wrap a:hover{
-//  color: #fff !important;
-//}
-//#item-content div.x-close-wrap:hover{
-//  cursor: pointer;
-//  opacity: .9;
-//}
-//#item-content div.x-close-wrap img{
-//  width: 30px !important;
-//  height: 30px !important;
-//}
-//#item-content .img{
-//  position: relative;
-//  z-index: 10;
-//}
+

+ 1 - 1
components/common/page/pageComponent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page-wrap" v-if="total/pageSize>1">
+  <div class="page-wrap" v-if="total/1.0/pageSize>1">
     <el-pagination
       :current-page.sync="current"
       :page-size="pageSize"

+ 0 - 1
components/product/CategoryNav.vue

@@ -31,7 +31,6 @@
 </script>
 
 <style scoped>
-  @import "~element-ui/lib/theme-default/breadcrumb.css";
   /* breadcrumbs */
   .breadcrumbs {
     margin-top: 20px;

+ 0 - 1
components/product/Recommends.vue

@@ -103,7 +103,6 @@
     max-width: 200px;
   }
   #recommends .recommend-list .recommend .content {
-    font-family: "Microsoft Yahei";
     margin: 0 10px;
     height: 108px;
     text-align: left;

+ 0 - 1
components/provider/ExcellentSuppliers.vue

@@ -97,7 +97,6 @@ export default {
 
 	.marketing .title {
 		font-size: 24px;
-		font-family: "Microsoft Yahei", "微软雅黑";
 		line-height: 60px;
 		height: 60px;
 		font-weight: inherit;

+ 7 - 18
components/provider/HotCommodity.vue

@@ -12,25 +12,15 @@
   </div>
 </template>
 <script>
-  export default {
-    name: 'hot-commodity',
-    data () {
-      return {
-        hotComponents: {}
-      }
-    },
-    mounted () {
-      this.$http.get('/api/cms-service/storeCms/inventory')
-        .then(response => {
-          this.hotComponents = response.data
-        })
-    },
-    computed: {
-      // hotComponents () {
-      // return this.$store.state.provider.storeCms.hotComponents.data
-      // }
+
+export default {
+  name: 'hot-commodity',
+  computed: {
+    hotComponents () {
+      return this.$store.state.provider.storeCms.hotComponents.data
     }
   }
+}
 </script>
 <style scoped>
   .hot-commodity {
@@ -79,7 +69,6 @@
 
   .hot-commodity-box span {
     font-size: 14px;
-    font-family: "Microsoft Yahei", "微软雅黑";
     color: #333434;
     text-align: center;
     display: inline-block;

+ 0 - 2
components/provider/Suppliers.vue

@@ -166,7 +166,6 @@ export default {
 
 	#store-list .text-message {
 		color: rgb(80,120,203);
-		font-family: "Microsoft Yahei";
 	}
 
 	#store-list .btn-primary {
@@ -199,7 +198,6 @@ export default {
 	}
 
 	#store-list table>tbody .text-point {
-		font-family: "Microsoft Yahei", "微软雅黑";
 		color: #ff3737;
 		font-weight: 600;
 	}

+ 4 - 5
components/store/CommodityInfo.vue

@@ -342,7 +342,6 @@ export default {
 		width: 1190px;
 		padding-left: 0;
 		padding-right: 0;
-		font-family: "Microsoft Yahei", "微软雅黑";
 	}
 	.commodity .commodity-detail {
 		width: 100%;
@@ -475,17 +474,17 @@ export default {
 	}
 
 	ul.list-inline {
-		margin: 0;
+		margin: 0px;
 	}
 
 	.commodity-price ul.list-inline li {
-		padding-left: 0;
-		padding-right: 0;
+		padding-left: 0px;
+		padding-right: 0px;
 		border-bottom: 1px dashed #D6D3CE;
 	}
 
 	.commodity-price .table {
-		margin-bottom: 0;
+		margin-bottom: 0px;
 	}
 
 	.commodity-price ul>li:last-child {

+ 3 - 4
components/store/RecommendProduct.vue

@@ -29,7 +29,6 @@
 <script>
   import Buy from '~components/common/buyOrCar/buyComponent.vue'
   import axios from '~/plugins/axios'
-  import {Message} from 'element-ui'
   export default {
     name: 'recommend-product',
     components: {
@@ -76,7 +75,7 @@
                 .then(response => {
                   window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
                 }, err => {
-                  Message.error('以下器件null对应的商品不存在,请您重新选择')
+                  this.$message.error('以下器件null对应的商品不存在,请您重新选择')
                   console.log(err)
                 })
             } else {
@@ -85,12 +84,12 @@
                 .then(response => {
                   console.log(response.data)
                   if (response.data.success) {
-                    Message({
+                    this.$message({
                       message: '添加购物车成功',
                       type: 'success'
                     })
                   } else {
-                    Message.error(response.data.message)
+                    this.$message.error(response.data.message)
                     // console.log(response.data.message)
                   }
                 })

+ 0 - 6
components/store/common/StoreHeader.vue

@@ -129,9 +129,6 @@ export default {
 }
 </script>
 <style scoped>
-  body{
-		font-family: "Microsoft Yahei", "微软雅黑";
-	}
   .header-text {
     text-align: center;
     font-size: 20px;
@@ -205,7 +202,6 @@ export default {
 	#nav_fragment #search_input {
 		height: 40px;
 		font-size: 16px;
-		font-family: '微软雅黑';
 		border: 2px solid #5078cb;
 		border-top-left-radius: 0px;
 		border-bottom-left-radius: 0px;
@@ -333,7 +329,6 @@ export default {
 
 	#nav_fragment .hot-search .resources {
 		font-size: 12px;
-		font-family: "Microsoft Yahei", "微软雅黑";
 		color: rgb(250,50,50);
 	}
 
@@ -382,7 +377,6 @@ export default {
 		padding: 0 15px;
 		line-height: 30px;
 		text-align: left;
-		font-family: "Microsoft Yahei";
 	}
 
 	#search-group .association li:hover {

+ 8 - 16
nuxt.config.js

@@ -2,7 +2,6 @@ const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
 const webpack = require('webpack')
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
 
 module.exports = {
   router: {
@@ -21,7 +20,11 @@ module.exports = {
       { hid: 'description', name: 'description', content: '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!' }
     ],
     link: [
-      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
+      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
+      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css' },
+      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css' },
+      { rel: 'stylesheet', type: 'text/css', href: 'https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css' },
+      { rel: 'stylesheet', type: 'text/css', href: 'https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css' }
     ]
   },
   /*
@@ -45,18 +48,6 @@ module.exports = {
         test: /\.js$/,
         loader: 'babel-loader'
       })
-      config.module.rules.push({
-        test: /\.css$/,
-        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
-      })
-      config.module.rules.push({
-        test: /\.scss$/,
-        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
-      })
-      config.module.rules.push({
-        test: /\.less$/,
-        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
-      })
       if (isClient) {
         config.module.rules.push({
           enforce: 'pre',
@@ -88,9 +79,10 @@ module.exports = {
   css: [
     /* {
     src: 'font-awesome/css/font-awesome.css'
-  }, */{src: '~assets/scss/app.scss', lang: 'scss'}/* , {
+  }, */{src: '~assets/scss/app.scss', lang: 'scss'},
+    {
       src: 'swiper/dist/css/swiper.css'
-    } */ /*, {
+    }  /*, {
       src: 'element-ui/lib/theme-default/index.css'
     } */
   ],

+ 1 - 1
plugins/element-ui.js

@@ -1,5 +1,5 @@
 import Vue from 'vue'
-import { Breadcrumb, BreadcrumbItem, Tree, Pagination, Upload, Dialog, Message } from 'element-ui'
+import { Message, Breadcrumb, BreadcrumbItem, Tree, Pagination, Upload, Dialog } from 'element-ui'
 
 Vue.use(Breadcrumb)
 Vue.use(BreadcrumbItem)

+ 1 - 1
store/shop.js

@@ -33,7 +33,7 @@ export const actions = {
     commit('recommend/REQUEST_PRODUCTS')
     return axios.get('/api/store/recommend/products', { params })
       .then(response => {
-        commit('recommend/GET_PRODUCTS_SUCCESS', response.data ? JSON.parse(response.data) : [])
+        commit('recommend/GET_PRODUCTS_SUCCESS', response.data ? JSON.parse(JSON.stringify(response.data)) : [])
       }, err => {
         commit('recommend/GET_PRODUCTS_FAILURE', err)
       })