Răsfoiți Sursa

合并master

lemon橪 4 ani în urmă
părinte
comite
d8b9d81f70

+ 1 - 1
buyer/src/App.vue

@@ -31,7 +31,7 @@ export default {
 </script>
 <style lang="scss">
 #app{
-  min-height: 100%;
+  height: 100%;
   @include background_color($light_background_color);
 }
 </style>

+ 1 - 1
buyer/src/components/goodsDetail/ShowGoodsDetail.vue

@@ -92,7 +92,7 @@
                   <td>{{param.paramName}}</td><td>{{param.paramValue}}</td>
                 </tr>
               </table>
-              <!-- <div v-else>暂无商品参数</div> -->
+              <div v-else>暂无商品参数</div>
             </TabPane>
           </Tabs>
         </div>

+ 21 - 19
buyer/src/components/verify/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
+  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
     <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
       <img :src="data.backImage" style="width:100%;height:100%" alt="">
       <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
@@ -18,6 +18,7 @@
 import { getVerifyImg, postVerifyImg } from './verify.js';
 export default {
   props: {
+    // 传入数据,判断是登录、注册、修改密码
     verifyType: {
       defalut: 'LOGIN',
       type: String
@@ -38,16 +39,18 @@ export default {
       distance: 0, // 拼图移动距离
       flag: false, // 判断滑块是否按下
       downX: 0, // 鼠标按下位置
-      bgColor: 'aqua', // 滑动背景颜色
+      bgColor: '#04ad11', // 滑动背景颜色
       verifyText: '拖动滑块解锁' // 文字提示
     };
   },
   methods: {
-    mouseDown (e) { // 鼠标按下操作,
+    // 鼠标按下事件,开始拖动滑块
+    mouseDown (e) {
       this.downX = e.clientX;
       this.flag = true;
     },
-    mouseMove (e) { // 鼠标移动
+    // 鼠标移动事件,计算距离
+    mouseMove (e) {
       if (this.flag) {
         let offset = e.clientX - this.downX;
 
@@ -60,7 +63,8 @@ export default {
         }
       }
     },
-    mouseUp () { // 鼠标抬起
+    // 鼠标抬起事件,验证是否正确
+    mouseUp () {
       if (!this.flag) return false;
       this.flag = false;
       let params = {
@@ -83,33 +87,31 @@ export default {
         }
       });
     },
-    refresh () { // 刷新验证图片
+    refresh () { // 刷新滑块
       this.flag = false;
       this.downX = 0;
       this.distance = 0;
-      this.bgColor = 'aqua';
+      this.bgColor = '#04ad11';
       this.verifyText = '拖动滑块解锁';
-      this.getImg();
+      this.init();
     },
-    getImg () { // 获取验证图片
+    init () { // 初始化数据
       getVerifyImg(this.type).then(res => {
-        this.data = res.result;
+        if (res.result) {
+          this.data = res.result;
+          this.show = true;
+        } else {
+          this.$Message.warning('请求失败请重试!')
+        }
       });
     }
   },
-  created () {
-    // this.getImg();
-  },
   watch: {
     verifyType: {
       immediate: true,
       handler: function (v) {
         this.type = v;
-        // this.refresh();
       }
-    },
-    show (v) {
-      if (v) this.refresh();
     }
   }
 };
@@ -143,7 +145,7 @@ export default {
   }
 }
 .handle {
-  border: 1px solid rgb(134, 134, 134);
+  border: 1px solid #e4dede;
   margin-top: 5px;
   height: 42px;
   background: #ddd;
@@ -156,7 +158,7 @@ export default {
     width: 40px;
     height: 40px;
     opacity: 0.5;
-    background: aqua;
+    background: #04ad11;
   }
 
   .swiper {

+ 8 - 8
buyer/src/config/index.js

@@ -17,15 +17,15 @@ export default {
    * @description api请求基础路径
    */
   api_dev: {
-    common: 'http://192.168.0.100:8890',
-    buyer: 'http://192.168.0.100:8888',
-    seller: 'http://192.168.0.100:8889',
-    manager: 'http://192.168.0.100:8887'
+    // common: 'http://192.168.0.100:8890',
+    // buyer: 'http://192.168.0.100:8888',
+    // seller: 'http://192.168.0.100:8889',
+    // manager: 'http://192.168.0.100:8887'
 
-    // common: 'https://common-api.pickmall.cn',
-    // buyer: 'https://buyer-api.pickmall.cn',
-    // seller: 'https://store-api.pickmall.cn',
-    // manager: 'https://admin-api.pickmall.cn'
+    common: 'https://common-api.pickmall.cn',
+    buyer: 'https://buyer-api.pickmall.cn',
+    seller: 'https://store-api.pickmall.cn',
+    manager: 'https://admin-api.pickmall.cn'
   },
   api_prod: {
     common: 'https://common-api.pickmall.cn',

+ 9 - 5
buyer/src/pages/Login.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="login" @keyup.enter="handleSubmit('formInline')">
     <!-- 顶部logo -->
-    <div class="top-content">
+    <div class="top-content" @click='$refs.verify.show = false'>
       <div class="logo-box">
         <img
           :src="logoImg"
@@ -15,7 +15,7 @@
       <!-- 轮播 -->
       <Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
         <CarouselItem>
-          <div class="demo-carousel">
+          <div class="demo-carousel" @click='$refs.verify.show = false'>
             <img
               src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680"
             />
@@ -23,7 +23,7 @@
         </CarouselItem>
       </Carousel>
       <!-- 登录模块 -->
-      <div class="form-box">
+      <div class="form-box" @click='$refs.verify.show = false'>
         <div class="account-number">
           <div class="tab-switch">
             <span>{{type?'账号登录':'验证码登录'}}</span>
@@ -37,6 +37,7 @@
           :model="formData"
           :rules="ruleInline"
           v-show="type === true"
+          @click.self='$refs.verify.show = false'
         >
           <FormItem prop="username">
             <i-input
@@ -72,6 +73,7 @@
           :model="formSms"
           :rules="ruleInline"
           v-show="type === false"
+          @click.self='$refs.verify.show = false'
         >
           <FormItem prop="mobile">
             <i-input
@@ -194,7 +196,7 @@ export default {
       this.$refs[name].validate((valid) => {
         if (valid) {
           if (this.type) {
-            this.$refs.verify.show = true;
+            this.$refs.verify.init();
           } else {
             let data = JSON.parse(JSON.stringify(this.formSms));
             apiLogin.smsLogin(data).then((res) => {
@@ -224,6 +226,7 @@ export default {
         }
       });
     },
+    // 发送手机验证码
     sendCode () {
       if (this.time === 60) {
         if (this.formSms.mobile === '') {
@@ -296,9 +299,10 @@ export default {
         this.$refs.verify.show = false;
       }
     },
+    // 开启滑块验证
     verifyBtnClick () {
       if (!this.verifyStatus) {
-        this.$refs.verify.show = true;
+        this.$refs.verify.init();
       }
     },
     handleWebLogin (type) { // 第三方登录

+ 2 - 2
buyer/src/pages/SignUp.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="login">
+  <div class="login" @click='$refs.verify.show = false'>
     <div style="height:50px;"></div>
     <div class="logo-box">
       <img
@@ -202,7 +202,7 @@ export default {
     },
     verifyBtnClick () {
       if (!this.verifyStatus) {
-        this.$refs.verify.show = true;
+        this.$refs.verify.init();
       }
     }
   },

+ 6 - 2
buyer/src/pages/forgetPassword.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="login">
+  <div class="forget-password" @click='$refs.verify.show = false'>
     <div style="height:50px;"></div>
     <!-- 顶部logo -->
     <div class="logo-box">
@@ -236,7 +236,7 @@ export default {
     },
     verifyBtnClick () {
       if (!this.verifyStatus) {
-        this.$refs.verify.show = true;
+        this.$refs.verify.init();
       }
     }
   },
@@ -248,7 +248,11 @@ export default {
   }
 };
 </script>
+
 <style scoped lang="scss">
+.forget-password{
+  height: 100%;
+}
 .logo-box {
   width: 600px;
   height: 80px;

+ 2 - 2
manager/src/views/goods/goods-info/goods.vue

@@ -200,9 +200,9 @@ export default {
           width: 100,
           render: (h, params) => {
             if (params.row.marketEnable == "DOWN") {
-              return h("Tag", {props: {color: "green"},},"上架");
+              return h("Tag", {props: {color: "volcano"},},"下架");
             } else if (params.row.marketEnable == "UPPER") {
-              return h("Tag", {props: {color: "volcano",},},"下架");
+              return h("Tag", {props: {color: "green",},},"上架");
             }
           },
         },

+ 13 - 7
manager/src/views/goods/goods-review/index.vue

@@ -28,7 +28,7 @@
               size="small" show-total show-elevator show-sizer></Page>
       </Row>
     </Card>
-
+    <!-- 评价详情 -->
     <Modal v-model="infoFlag" width="800" :title="infoTitle">
 
       <div class="info-list" style="overflow: hidden">
@@ -58,12 +58,15 @@
                 <ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName"
                               :description="infoData.content"/>
               </ListItem>
-              <div class="" v-if="infoData.haveImage == 1">
+              <div class="" v-if="infoData.haveImage">
                 评价图
                 <div style="margin-left: 40px">
-                  <img style="width: 100px;height: 110px;margin-left: 2px"
-                       v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img"
+                  <template v-if="infoData.images && infoData.images.length">
+                    <img style="width: 100px;height: 110px;margin-left: 2px"
+                       v-for="(img,index) in infoData.images.split(',')"  :src="img"
                        alt="" :key="index"/>
+                  </template>
+                  
                 </div>
               </div>
             </List>
@@ -74,10 +77,13 @@
                 <div style="float: left"> 商家回复:</div>
                 <div style="margin-left: 60px">{{ infoData.reply }}</div>
               </div>
-              <div v-if="infoData.haveReplyImage == 1">
+              <div v-if="infoData.haveReplyImage">
                 <div style="margin-left: 60px">
-                  <img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
-                       v-if="infoData.replyImage.length !=0" :src="img" alt=""/>
+                  <template  v-if="infoData.replyImage && infoData.replyImage.length">
+                    <img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
+                       :src="img" alt=""/>
+                  </template>
+                  
                 </div>
               </div>
             </div>

+ 3 - 3
manager/src/views/login.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="login">
+  <div class="login" @click='$refs.verify.show = false'>
     <Row @keydown.enter.native="submitLogin" class="flex">
       <Col style="width: 368px">
       <Header />
@@ -111,7 +111,7 @@ export default {
       // 登录操作
       this.$refs.usernameLoginForm.validate((valid) => {
         if (valid) {
-          this.$refs.verify.show = true;
+          this.$refs.verify.init();
         }
       });
     },
@@ -161,7 +161,7 @@ export default {
   }
   .verify-con {
     position: absolute;
-    top: 90px;
+    top: 150px;
     z-index: 10;
     left: 20px;
   }

+ 19 - 14
manager/src/views/my-components/verify/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
+  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
     <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
       <img :src="data.backImage" style="width:100%;height:100%" alt="">
       <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
@@ -18,7 +18,8 @@
 import { getVerifyImg, postVerifyImg } from './verify.js';
 export default {
   props: {
-    verifyType: { // 验证方式,登录,注册等
+    // 传入数据,判断是登录、注册、修改密码
+    verifyType: {
       defalut: 'LOGIN',
       type: String
     }
@@ -38,15 +39,17 @@ export default {
       distance: 0, // 拼图移动距离
       flag: false, // 判断滑块是否按下
       downX: 0, // 鼠标按下位置
-      bgColor: 'aqua', // 滑动背景颜色
+      bgColor: '#04ad11', // 滑动背景颜色
       verifyText: '拖动滑块解锁' // 文字提示
     };
   },
   methods: {
+    // 鼠标按下事件,开始拖动滑块
     mouseDown (e) {
       this.downX = e.clientX;
       this.flag = true;
     },
+    // 鼠标移动事件,计算距离
     mouseMove (e) {
       if (this.flag) {
         let offset = e.clientX - this.downX;
@@ -60,6 +63,7 @@ export default {
         }
       }
     },
+    // 鼠标抬起事件,验证是否正确
     mouseUp () {
       if (!this.flag) return false;
       this.flag = false;
@@ -83,17 +87,22 @@ export default {
         }
       });
     },
-    refresh () {
+    refresh () { // 刷新滑块
       this.flag = false;
       this.downX = 0;
       this.distance = 0;
-      this.bgColor = 'aqua';
+      this.bgColor = '#04ad11';
       this.verifyText = '拖动滑块解锁';
-      this.getImg();
+      this.init();
     },
-    getImg () {
+    init () { // 初始化数据
       getVerifyImg(this.type).then(res => {
-        this.data = res.result;
+        if (res.result) {
+          this.data = res.result;
+          this.show = true;
+        } else {
+          this.$Message.warning('请求失败请重试!')
+        }
       });
     }
   },
@@ -102,11 +111,7 @@ export default {
       immediate: true,
       handler: function (v) {
         this.type = v;
-        // this.refresh();
       }
-    },
-    show (v) {
-      if (v) this.refresh();
     }
   }
 };
@@ -140,7 +145,7 @@ export default {
   }
 }
 .handle {
-  border: 1px solid rgb(134, 134, 134);
+  border: 1px solid #e4dede;
   margin-top: 5px;
   height: 42px;
   background: #ddd;
@@ -153,7 +158,7 @@ export default {
     width: 40px;
     height: 40px;
     opacity: 0.5;
-    background: aqua;
+    background: #04ad11;
   }
 
   .swiper {

+ 2 - 2
seller/src/views/login.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="login">
+  <div class="login" @click="$refs.verify.show = false">
     <Row type="flex" @keydown.enter.native="submitLogin">
       <Col style="width: 368px">
       <Header />
@@ -128,7 +128,7 @@ export default {
       // 登录提交
       this.$refs.usernameLoginForm.validate((valid) => {
         if (valid) {
-          this.$refs.verify.show = true;
+          this.$refs.verify.init();
         }
       });
     },

+ 18 - 16
seller/src/views/my-components/verify/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
+  <div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
     <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
       <img :src="data.backImage" style="width:100%;height:100%" alt="">
       <img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
@@ -18,6 +18,7 @@
 import { getVerifyImg, postVerifyImg } from './verify.js';
 export default {
   props: {
+    // 传入数据,判断是登录、注册、修改密码
     verifyType: {
       defalut: 'LOGIN',
       type: String
@@ -38,15 +39,17 @@ export default {
       distance: 0, // 拼图移动距离
       flag: false, // 判断滑块是否按下
       downX: 0, // 鼠标按下位置
-      bgColor: 'aqua', // 滑动背景颜色
+      bgColor: '#04ad11', // 滑动背景颜色
       verifyText: '拖动滑块解锁' // 文字提示
     };
   },
   methods: {
+    // 鼠标按下事件,开始拖动滑块
     mouseDown (e) {
       this.downX = e.clientX;
       this.flag = true;
     },
+    // 鼠标移动事件,计算距离
     mouseMove (e) {
       if (this.flag) {
         let offset = e.clientX - this.downX;
@@ -60,6 +63,7 @@ export default {
         }
       }
     },
+    // 鼠标抬起事件,验证是否正确
     mouseUp () {
       if (!this.flag) return false;
       this.flag = false;
@@ -83,33 +87,31 @@ export default {
         }
       });
     },
-    refresh () {
+    refresh () { // 刷新滑块
       this.flag = false;
       this.downX = 0;
       this.distance = 0;
-      this.bgColor = 'aqua';
+      this.bgColor = '#04ad11';
       this.verifyText = '拖动滑块解锁';
-      this.getImg();
+      this.init();
     },
-    getImg () {
+    init () { // 初始化数据
       getVerifyImg(this.type).then(res => {
-        this.data = res.result;
+        if (res.result) {
+          this.data = res.result;
+          this.show = true;
+        } else {
+          this.$Message.warning('请求失败请重试!')
+        }
       });
     }
   },
-  created () {
-    // this.getImg();
-  },
   watch: {
     verifyType: {
       immediate: true,
       handler: function (v) {
         this.type = v;
-        // this.refresh();
       }
-    },
-    show (v) {
-      if (v) this.refresh();
     }
   }
 };
@@ -143,7 +145,7 @@ export default {
   }
 }
 .handle {
-  border: 1px solid rgb(134, 134, 134);
+  border: 1px solid #e4dede;
   margin-top: 5px;
   height: 42px;
   background: #ddd;
@@ -156,7 +158,7 @@ export default {
     width: 40px;
     height: 40px;
     opacity: 0.5;
-    background: aqua;
+    background: #04ad11;
   }
 
   .swiper {