diff --git a/rc-busness/assets/css/producted.less b/rc-busness/assets/css/producted.less index 630cf207..115ecc62 100644 --- a/rc-busness/assets/css/producted.less +++ b/rc-busness/assets/css/producted.less @@ -10,6 +10,29 @@ overflow-y: auto; } } +.ts-tag-list { + display: inline-flex; + flex-wrap: wrap; + justify-content: flex-start; + em { + font-style: normal; + display: flex; + align-items: center; + justify-content: center; + padding:.43rem 1rem; + font-size: 16px; + margin-left: 4px; + margin-right: 12px; + border-radius: 3px; + margin-bottom:1rem; + } + .disabled { + background:#808285; + color:#F6F6F6; + cursor: not-allowed;; + } +} + .ts-product-detail{ i { font-style: normal; @@ -83,7 +106,13 @@ } } } - +.rc-footimage{ + img{ + margin-left:auto; + margin-right:auto; + max-width:100%; + } +} // 手机端 @media screen and (max-width:768px) { .ts-ecprice{ @@ -248,18 +277,6 @@ cursor: pointer; font-size: 16px; } - .rc-footimage{ - overflow: hidden; - width: 100%; - margin: 0 auto; - display: flex; - justify-content: center; - margin-top: 20px; - img{ - width: 100%; - } - - } .ts-product-header { width: 100%; .rc-title { @@ -276,23 +293,14 @@ margin-top: 20px; .rc-prodtop { display: flex; - align-items: center; + align-items: flex-start; span { font-size: 14px; color: #333333; } - em { - font-style: normal; - display: flex; - align-items: center; - justify-content: center; - width: 59px; - font-size: 16px; - margin-left: 4px; - margin-right: 12px; - height: 39px; - border-radius: 3px; - } + em { + padding: 5px; + } } } .certification { @@ -342,6 +350,7 @@ margin: 0 auto; width: 100%; max-width: 1400px; + border-bottom-width: 4px; .rc-main{ padding:0; } @@ -529,20 +538,11 @@ margin-top: 16px; .rc-prodtop { display: flex; - align-items: center; + align-items: flex-start; span { font-size: 18px; color: #333333; } - em { - font-style: normal; - display: flex; - align-items: center; - justify-content: center; - font-size: 16px; - padding: 5px; - border-radius: 3px; - } } } .rc-produnnum { @@ -578,16 +578,6 @@ } } } - .rc-footimage{ - overflow: hidden; - display: flex; - justify-content: center; - align-items: center; - img{ - width: 100%; - } - } - } .rc-carousel__gallery-thumbnail{ diff --git a/rc-busness/assets/css/search.less b/rc-busness/assets/css/search.less index d08b2cb1..b42920c0 100644 --- a/rc-busness/assets/css/search.less +++ b/rc-busness/assets/css/search.less @@ -104,7 +104,6 @@ ul li ol li em strong i { } } strong{ - font-size: 18px; color: #333333; display: block; font-weight: bold; @@ -425,7 +424,6 @@ border-radius: 100px; } strong{ - font-size: 26px; color: #333333; display: block; } diff --git a/rc-busness/components/header.vue b/rc-busness/components/header.vue index dc5a52c9..a5fab9b5 100644 --- a/rc-busness/components/header.vue +++ b/rc-busness/components/header.vue @@ -358,8 +358,8 @@ export default { created(){ }, mounted() { - //判断用户有无登录显示红点 - let usernot=this.checkIsLogin(); + this.checkIsLogin(); + let usernot=this.$store.state.userInfo; //console.log(usernot); if(usernot){ this.loginornot=true @@ -367,26 +367,10 @@ export default { this.loginornot=false this.usermessage=usernot; } - //debugger; if(isInitialized) location.reload(); if(!isInitialized) isInitialized=true; - //console.log(this.loginornot); - /* - if(RCDL && RCDL.utilities && RCDL.navigation && RCDL.navigation.rebuild) - { - - if (["sm", "xs", "md-1"].includes(RCDL.utilities.breakpoints.values.width.current)) { - this.refreshMobileNav(); - } - else - { - this.refreshDesktopNav(); - } - - } - */ }, methods: { diff --git a/rc-busness/config/async/fetch.js b/rc-busness/config/async/fetch.js index 6f8d8392..3a3bf8ef 100644 --- a/rc-busness/config/async/fetch.js +++ b/rc-busness/config/async/fetch.js @@ -19,13 +19,15 @@ export default async(url = '', data = {}, type = 'GET', method = 'fetch') => { } } - if (window.fetch && method === 'fetch') { + if (fetch && method === 'fetch') { let token=''; - let tokenStr = localStorage.getItem("userInfo"); - if(tokenStr){ - tokenStr = JSON.parse(tokenStr); - if(tokenStr && tokenStr.xaccessToken) - token=tokenStr.xaccessToken; + if(process.client) { + let tokenStr = localStorage.getItem("userInfo"); + if(tokenStr){ + tokenStr = JSON.parse(tokenStr); + if(tokenStr && tokenStr.xaccessToken) + token=tokenStr.xaccessToken; + } } let requestConfig = { method: type, diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index 86f85e71..40b9c591 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -1521,18 +1521,26 @@ } }, - selectproduce(item,index){ - if(item.productList[0]==undefined){ - item.productlist[0].productCode=0; - } - if(item.productList[0]==undefined){ - item.productlist[0]=[]; + selectproduce(item){ + let isRxGoods=false; + let productCode = []; + let mainProductCode = item.productCode; + if(!item.ecPrice && !item.price) + { + isRxGoods=1; + productCode = [item.productCode]; + } else { + for(let i of item.productList) { + productCode.push(i.productCode); + } } this.$router.push({ path: "/productdetails/producted", query: { stype: 1, - productCode:item.productList[0].productCode + isRxGoods: isRxGoods, + mainProductCode:mainProductCode, + productCode:productCode.join(",") }, }); }, diff --git a/rc-busness/pages/personal/mypersonal.vue b/rc-busness/pages/personal/mypersonal.vue index 7ccafce7..89d40ad5 100644 --- a/rc-busness/pages/personal/mypersonal.vue +++ b/rc-busness/pages/personal/mypersonal.vue @@ -224,7 +224,7 @@ export default { }); }, userinter(){ - let user= this.checkIsLogin(); + let user= this.$store.state.userInfo; if(!user){ this.$message({ type: 'warning', @@ -377,9 +377,10 @@ obligation(item,index){ } }, mounted() { + this.checkIsLogin(); let userwidth=0; this.ifadroind(); - let user= this.checkIsLogin(); + let user= this.$store.state.userInfo; if(user){ this.userid=user.data; this.islogin=false; diff --git a/rc-busness/pages/productdetails/producted.vue b/rc-busness/pages/productdetails/producted.vue index 6113572d..ec0a5bb9 100644 --- a/rc-busness/pages/productdetails/producted.vue +++ b/rc-busness/pages/productdetails/producted.vue @@ -88,27 +88,33 @@
-

{{ item.productName }}

+

{{ curItem.brandName + " " + curItem.productName }}

-
+
+ 适用年龄: + {{ curItem.tagUsedAge }} +
+
+ 所属分类: + {{ curItem.categoryName }} +
+
商品价格: - ¥{{ item.ecPrice }} + ¥{{ curItem.ecPrice }} ¥{{ item.rsp }} + >¥{{ curItem.rsp }}
-
+
活动促销: 全场商品限时优惠 @@ -118,7 +124,7 @@
-
+
@@ -128,13 +134,16 @@
商品规格:
- - - - {{ item.specifications }} - +
+ + {{ item.specifications }} + +
+
@@ -153,7 +162,7 @@ />
-
+
@@ -178,14 +187,14 @@
  • 商品编号:{{ item.brandCode }}{{ curItem.brandCode }}
  • - 加入购物车 - 立即购买 + 加入购物车 + 立即购买
    @@ -193,26 +202,10 @@
    -
    - -
    -
    - -
    - - 回到顶部 -
    +
    +
    +
    @@ -262,8 +255,8 @@
    - 加入购物车 - 立即购买 + 加入购物车 + 立即购买
    @@ -271,8 +264,8 @@ \ No newline at end of file diff --git a/rc-busness/store/index.js b/rc-busness/store/index.js index 5f51be06..6682e961 100644 --- a/rc-busness/store/index.js +++ b/rc-busness/store/index.js @@ -29,12 +29,13 @@ const mutations = { logoutSystem(state) { localStorage.removeItem('userInfo') }, - checkIsLogin() { + checkIsLogin(state) { let rawUserInfoStr = localStorage.getItem('userInfo'); let rawUserInfo = JSON.parse(rawUserInfoStr); if(rawUserInfo && rawUserInfo.hasOwnProperty('xaccessToken') && rawUserInfo['xaccessToken'].length>36) - return rawUserInfo; - return false; + state.userInfo = rawUserInfo; + else + state.userInfo = undefined; }, changemessage(state, val) { localStorage.setItem('message', val.data);