Quellcode durchsuchen

feat: 个人收藏以及浏览足迹页面逻辑调整

周玉环 vor 6 Tagen
Ursprung
Commit
6efe346b2b

Datei-Diff unterdrückt, da er zu groß ist
+ 190 - 3
xinkeaboard-web/assets/style/goodsDetail.scss


+ 49 - 8
xinkeaboard-web/assets/style/member/collect.scss

@@ -1,4 +1,3 @@
-
 @import "../theme.scss";
 
 .fl {
@@ -60,6 +59,7 @@ i {
 
 .sld_collect_wrapper {
     float: left;
+
     .wrapper_main {
         float: left;
         width: 967px;
@@ -103,6 +103,7 @@ i {
                     border-radius: 5px;
                     transition: all 0.2s;
                     cursor: pointer;
+
                     &:hover {
                         background-color: $colorMain2;
                         color: #fff;
@@ -114,6 +115,7 @@ i {
                 height: 52px;
                 line-height: 52px;
                 margin-left: -1px;
+
                 a {
                     display: inline-block;
                     width: 178px;
@@ -122,6 +124,7 @@ i {
                     color: #333;
                     cursor: pointer;
                     border-right: 1px solid #eeeeee;
+
                     &:hover {
                         color: $colorMain2;
                     }
@@ -140,7 +143,7 @@ i {
             overflow: hidden;
             width: 100%;
 
-            & > ul {
+            &>ul {
                 margin-top: 5px;
             }
 
@@ -154,10 +157,11 @@ i {
                 width: 24%;
                 height: 358px;
                 background-color: #fff;
-                margin:  0.5%;
+                margin: 0.5%;
                 border: 1px solid #eeeeee;
                 padding: 13px;
                 box-sizing: border-box;
+
                 &:nth-of-type(4n) {
                     margin-right: 0;
                 }
@@ -169,6 +173,7 @@ i {
                     width: 240px;
                     height: 358px;
                     background: rgba(0, 0, 0, 0.1);
+
                     .border {
                         display: block;
                         position: absolute;
@@ -189,6 +194,7 @@ i {
                             background-image: url(/member/choose.png);
                         }
                     }
+
                     input[type="checkbox"] {
                         visibility: hidden;
                         position: absolute;
@@ -198,8 +204,10 @@ i {
                         height: 31px;
                         z-index: 1;
                     }
-                    input[type="checkbox"]:checked ~ .border {
+
+                    input[type="checkbox"]:checked~.border {
                         border: 2px solid #e60012;
+
                         .checklogo {
                             position: absolute;
                             top: -2px;
@@ -235,9 +243,39 @@ i {
                 }
 
                 .cg_img {
+                    position: relative;
                     width: 100%;
                     height: 214px;
 
+                    /* 遮罩层 */
+                    .mask {
+                        position: absolute;
+                        top: 0;
+                        left: 0;
+                        width: 100%;
+                        height: 100%;
+                        background-color: rgba(153, 153, 153, 0.6);
+                        /* 灰色透明遮罩 */
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        z-index: 1;
+                    }
+
+                    /* 白色圆圈 */
+                    .circle {
+                        background-color: white;
+                        width: 100px;
+                        height: 100px;
+                        border-radius: 50%;
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        font-size: 15px;
+                        color: black;
+                        text-align: center;
+                    }
+
                     .lazy {
                         width: 100%;
                         height: 214px;
@@ -261,7 +299,7 @@ i {
                         color: #666666;
                         font-size: 12px;
                         line-height: 42px;
-                        box-sizing: border-box;    
+                        box-sizing: border-box;
                         text-transform: uppercase;
                     }
 
@@ -377,6 +415,7 @@ i {
                             line-height: 46px;
                             color: #444444;
                             font-size: 14px;
+
                             i {
                                 font-size: 14px;
                                 color: $colorMain2;
@@ -395,6 +434,7 @@ i {
                         opacity: 0;
                         z-index: -1;
                         transition: all 0.3s;
+
                         button {
                             //width: 49.5%;
                             width: 100%;
@@ -433,7 +473,7 @@ i {
                     position: relative;
                     width: 75%;
                     height: 298px;
-                 
+
                     overflow: hidden;
 
                     .sld_vendor_collect {
@@ -444,7 +484,7 @@ i {
                         a {
                             float: left;
                             display: inline-block;
-                            width:200px;
+                            width: 200px;
                             height: 34px;
                             line-height: 34px;
                             text-align: center;
@@ -555,6 +595,7 @@ i {
     color: $colorMain;
     cursor: default;
 }
+
 .el-pager li:hover {
     color: $colorMain;
 }
@@ -563,4 +604,4 @@ i {
     color: #fff;
     background-color: $colorMain;
     border-color: $colorMain;
-}
+}

+ 39 - 1
xinkeaboard-web/assets/style/member/footprint.scss

@@ -89,6 +89,7 @@ a:visited {
                 border: 1px solid #e5e5e5;
                 margin: 0 0.5% 23px 0;
                 .img {
+                    position: relative;
                     width: 100%;
                     height: 240px;
                     border-bottom: 1px solid #e5e5e5;
@@ -100,9 +101,38 @@ a:visited {
                         width: 100%;
                         height: 100%;
                     }
+
+                    /* 遮罩层 */
+                    .mask {
+                        position: absolute;
+                        top: 0;
+                        left: 0;
+                        width: 100%;
+                        height: 100%;
+                        background-color: rgba(153, 153, 153, 0.6);
+                        /* 灰色透明遮罩 */
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        z-index: 1;
+                    }
+
+                    /* 白色圆圈 */
+                    .circle {
+                        background-color: white;
+                        width: 100px;
+                        height: 100px;
+                        border-radius: 50%;
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        font-size: 15px;
+                        color: black;
+                        text-align: center;
+                    }
                 }
                 .sld_foot_price {
-                    line-height: 44px;
+                    line-height: 20px;
                     padding: 0 7px;
                     .fl {
                         font-size: 14px;
@@ -112,6 +142,14 @@ a:visited {
                         float: left;
                         font-size: 12px;
                         color: #333333;
+                        width: 100%;
+                        display: -webkit-box;
+                        -webkit-box-orient: vertical;
+                        -webkit-line-clamp: 2;       /* 限制2行 */
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        padding: 5px 0;
+
                         &:hover {
                             color: $colorMain2;
                         }

+ 2 - 2
xinkeaboard-web/composables/index.js

@@ -1,8 +1,8 @@
 // 测试环境
-// export const apiUrl = 'http://54.46.9.88:8001/';
+export const apiUrl = 'http://54.46.9.88:8001/';
 
 // 本地后端
-export const apiUrl = 'http://192.168.0.158:8001/';
+// export const apiUrl = 'http://192.168.0.158:8001/';
 
 export const defaultUrl = 'http://54.46.9.88:8001/';
 export const supplierUrl = 'http://54.46.9.88:82/user/login';

+ 4 - 1
xinkeaboard-web/pages/goods/detail/[id].vue

@@ -129,6 +129,9 @@
             <div class="goods_des_left">
               <!-- 商品放大镜效果 start-->
               <div class="goods_main_picture">
+                <div class="mask" v-if="[5, 6].includes(goodsDetail.data.state)">
+                   <div class="circle">{{  L['已下架']  }}</div>
+                  </div>
                 <div
                   class="preview-box"
                   @mousemove="move($event)"
@@ -511,7 +514,7 @@
                       v-show="isShowQr"
                     ></div>
 
-                    <div class="buy_now flex_row_center_center mt-20" @click="goBuy">
+                    <div v-if="goodsDetail.data.state === 3" class="buy_now flex_row_center_center mt-20" @click="goBuy">
                       {{ L["发送询盘"] }}
                     </div>
                   </div>

+ 3 - 3
xinkeaboard-web/pages/member/account.vue

@@ -155,18 +155,18 @@ const toPage = (url, type) => {
         }
 
         .s1{
-          flex: 0 0 100px;
+          width: 100px;
         }
 
         .s2{
-          flex: 0 0 150px;
+          min-width: 100px;
           text-align: right;
         }
 
         .tips {
           margin-left: 60px;
           color: #999;
-          width: 680px;
+          flex: 1;
         }
 
         .oprate {

+ 3 - 0
xinkeaboard-web/pages/member/collect.vue

@@ -70,6 +70,9 @@
                     target="_blank"
                   >
                     <coverImage :src="item.productImage" class="lazy" />
+                    <div class="mask" v-if="[5, 6].includes(item.state)">
+                      <div class="circle">{{  L['已下架']  }}</div>
+                    </div>
                   </nuxt-link>
                 </div>
                 <p class="cg_price clearfix">

+ 8 - 12
xinkeaboard-web/pages/member/footprint.vue

@@ -22,7 +22,7 @@
             <ul class="sld_foot_goods clearfix">
               <li
                 v-for="(
-                  { goodsImage, productPrice, productId, isFollowProduct,goodsMoney,goodsName },
+                  { goodsImage, productId, goodsName, state },
                   index
                 ) in productLookLogInfoList"
                 :key="index"
@@ -33,20 +33,16 @@
                       :to="'/goods/detail/'+ calcProductName(goodsName) +'_'+ productId"
                   >
 
-                  <img :src="goodsImage" alt=""
-                  /></router-link>
+                  <img :src="goodsImage" alt=""/>
+                  <div class="mask" v-if="[5, 6].includes(state)">
+                   <div class="circle">{{  L['已下架']  }}</div>
+                  </div>
+                </router-link>
                 </div>
                 <p class="sld_foot_price">
-<!--                  <span class="fl">{{goodsMoney == null ? '面议' : goodsMoney}}</span>-->
                   <a style="cursor: pointer">
-                    <span
-                      class="fr"
-                      @click="follow(productId, true)"
-                      v-if="!isFollowProduct"
-                      >{{ L["收藏"] }}</span
-                    >
-                    <span class="fr" @click="follow(productId, false)" v-else>{{
-                      L["已收藏"]
+                    <span class="fr" @click="follow(productId, false)">{{
+                      goodsName
                     }}</span>
                   </a>
                 </p>

+ 46 - 37
xinkeaboard-web/pages/member/pwd/login.vue

@@ -7,25 +7,26 @@
  * @FilePath: /java-pc/src/views/member/center/accountSafe.vue
 -->
 <template>
-  <div class="sld_login_password_mange" v-if="getLatestMemberInfo" >
+  <div class="sld_login_password_mange" v-if="getLatestMemberInfo">
     <MemberTitle :memberTitle="L['登录密码']"></MemberTitle>
     <div class="container">
       <div class="title">
-        {{ memberInfo.data.hasLoginPassword ? L["修改"] : L["设置"] }} {{L['登录密码']}}
+        {{ memberInfo.data.hasLoginPassword ? L["修改"] : L["设置"] }}
+        {{ L["登录密码"] }}
       </div>
       <div class="mange_con">
         <div class="without_phone_tip" v-if="!memberInfo.data.memberEmail">
-          {{L["请先绑定邮箱,再进行登陆密码操作!"]}}
+          {{ L["请先绑定邮箱,再进行登陆密码操作!"] }}
         </div>
         <!-- 修改登录密码 start -->
         <template v-if="memberInfo.data.hasLoginPassword">
           <span class="current"
-            >{{L["当前邮箱账号"]}}
+            >{{ L["当前邮箱账号"] }}
             {{
               memberInfo.data.memberEmail ? memberInfo.data.memberEmail : "--"
             }}</span
           >
-          <div class="sms_code_con flex_row_center_center">
+          <div class="sms_code_con">
             <el-input
               v-model="sms_code"
               :placeholder="L['请输入邮件验证码']"
@@ -61,21 +62,21 @@
             {{ errorMsg }}
           </div>
           <div class="next flex_row_center_center pointer" @click="next">
-            {{L["修改密码"]}}
+            {{ L["修改密码"] }}
           </div>
         </template>
         <!-- 修改登录密码 end -->
       </div>
-<!--      <div class="manage_tips">-->
-<!--        <p class="tips_title">{{ L["温馨提示"] }}:</p>-->
-<!--        <p>• {{ L["为了保障您的账号安全,变更重要信息需进行身份验证。"] }}</p>-->
-<!--        <p>• {{ L["变更过程中有任何疑问请联系在线客服解决。"] }}</p>-->
-<!--        <p>-->
-<!--          •-->
-<!--          {{ L["如手机号/邮箱已不再使用无法获取验证码,请联系在线客服解决。"] }}-->
-<!--        </p>-->
-<!--        <p>• {{ L["复杂的密码可使账号更安全且建议定期更换密码。"] }}</p>-->
-<!--      </div>-->
+      <!--      <div class="manage_tips">-->
+      <!--        <p class="tips_title">{{ L["温馨提示"] }}:</p>-->
+      <!--        <p>• {{ L["为了保障您的账号安全,变更重要信息需进行身份验证。"] }}</p>-->
+      <!--        <p>• {{ L["变更过程中有任何疑问请联系在线客服解决。"] }}</p>-->
+      <!--        <p>-->
+      <!--          •-->
+      <!--          {{ L["如手机号/邮箱已不再使用无法获取验证码,请联系在线客服解决。"] }}-->
+      <!--        </p>-->
+      <!--        <p>• {{ L["复杂的密码可使账号更安全且建议定期更换密码。"] }}</p>-->
+      <!--      </div>-->
     </div>
   </div>
 </template>
@@ -84,7 +85,7 @@
 import { ElInput, ElMessage } from "element-plus";
 import { getCurrentInstance, reactive, ref, watch } from "vue";
 // import { lang_zn } from "@/assets/language/zh";
-import { getCurLanguage } from '@/composables/common.js';
+import { getCurLanguage } from "@/composables/common.js";
 import { useFiltersStore } from "@/store/filter.js";
 const filtersStore = useFiltersStore();
 // const L = lang_zn;
@@ -103,19 +104,18 @@ const timeOutId = ref(""); //定时器的返回值
 const countDownM = ref(0); //短信验证码倒计时
 const memberInfo = reactive({ data: {} });
 const isSmsClick = ref(false);
-const getLatestMemberInfo = ref(false)
+const getLatestMemberInfo = ref(false);
 
 const getMemberInfo = () => {
   get("v3/member/front/member/getInfo").then((res) => {
-      if (res.state == 200) {
-        memberInfo.data = res.data
-        filtersStore.setMemberInfo(res.data)
-        getLatestMemberInfo.value = true
-      }
-    });
-}
-getMemberInfo()
-
+    if (res.state == 200) {
+      memberInfo.data = res.data;
+      filtersStore.setMemberInfo(res.data);
+      getLatestMemberInfo.value = true;
+    }
+  });
+};
+getMemberInfo();
 
 const getSmsCode = () => {
   if (isSmsClick.value) {
@@ -185,7 +185,7 @@ const next = () => {
       ElMessage.success(res.msg);
       if (!memberInfo.data.hasLoginPassword) {
         memberInfo.data.hasLoginPassword = 1;
-        filtersStore.setMemberInfo(memberInfo.data)
+        filtersStore.setMemberInfo(memberInfo.data);
       }
       errorMsg.value = "";
       password.value = "";
@@ -212,11 +212,6 @@ watch([old_password, password, confirm_password], () => {
   password.value = password.value.substring(0, 20);
   confirm_password.value = confirm_password.value.substring(0, 20);
 });
-
-
-
-
-
 </script>
 
 <style lang="scss" scoped>
@@ -287,14 +282,28 @@ watch([old_password, password, confirm_password], () => {
       }
 
       .sms_code_con {
+        position: relative;
         width: 100%;
 
+        :deep(.el-input) {
+          width: 250px;
+          z-index: 1;
+        }
+
+        :deep(.el-input__inner) {
+          width: 250px;
+        }
         .get_sms {
-          width: 100px;
+          display: flex;
+          justify-content: center; /* 水平居中 */
+          align-items: center; /* 垂直居中 */
+          text-align: center; /* 多行文本居中 */
+          position: absolute;
+          right: -25px;
+          top: 0;
+          width: 120px;
           height: 40px;
-          line-height: 38px;
           background: #00985e;
-          text-align: center;
           color: white;
           font-size: 14px;
           border-radius: 0 3px 3px 0;
@@ -343,7 +352,7 @@ watch([old_password, password, confirm_password], () => {
     height: 40px;
     margin-top: 20px;
     border-radius: 3px;
-    .el-input__wrapper{
+    .el-input__wrapper {
       width: 100%;
     }
 

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.