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

处理立即询价不做登入限制

Administrator 7 жил өмнө
parent
commit
45f4edd8d8

+ 1 - 1
components/default/Footer.vue

@@ -58,7 +58,7 @@
 </template>
 <script>
   export default {
-    name: 'footer',
+    name: 'footerView',
     data () {
       return {
         links: [{

+ 1 - 1
components/default/Header.vue

@@ -68,7 +68,7 @@
 </template>
 <script>
   export default {
-    name: 'header',
+    name: 'headerView',
     data () {
       return {
 //        showEnterprises: false

+ 1 - 1
components/home/Nav.vue

@@ -30,7 +30,7 @@
 </template>
 <script>
   export default {
-    name: 'nav'
+    name: 'navView'
   }
 </script>
 <style lang="scss" scoped>

+ 1 - 1
components/main/Nav.vue

@@ -37,7 +37,7 @@
 </template>
 <script>
   export default {
-    name: 'nav'
+    name: 'navView'
   }
 </script>
 <style lang="scss" scoped>

+ 9 - 1
components/supplier/details.vue

@@ -37,7 +37,7 @@
               <p v-text="detail.spec ? detail.spec : '暂无信息'">32</p>
             </li>
           </ul>
-          <a @click="hasDialog = true">立即询价</a>
+          <a @click="immediatelyClick">立即询价</a>
         </div>
       </div>
       <div class="detail">
@@ -172,6 +172,14 @@
       spliceString (str, length) {
         return spliceStr(str, length)
       },
+      // 弹出询价界面
+      immediatelyClick () {
+        if (!this.user.logged) {
+          this.$router.push('/auth/login?returnUrl=' + window.location.href)
+        } else {
+          this.hasDialog = true
+        }
+      },
       // 时间格式化
       setDeadLineValid: function () {
         this.applyObj.deadline = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')

+ 9 - 5
components/supplier/resource.vue

@@ -246,11 +246,15 @@
       },
       // 弹出询价界面
       immediatelyClick (type) {
-        this.hasDialog = true
-        this.applyObj.cmpCode = type.cmpCode
-        this.applyObj.brand = (type.standard === 1 ? type.pbranden : type.brand)
-        this.applyObj.spec = type.spec
-        this.applyObj.prodName = (type.standard === 1 ? type.kind : type.prodName)
+        if (!this.user.logged) {
+          this.$router.push('/auth/login?returnUrl=' + window.location.href)
+        } else {
+          this.hasDialog = true
+          this.applyObj.cmpCode = type.cmpCode
+          this.applyObj.brand = (type.standard === 1 ? type.pbranden : type.brand)
+          this.applyObj.spec = type.spec
+          this.applyObj.prodName = (type.standard === 1 ? type.kind : type.prodName)
+        }
       },
       // 时间格式化
       setDeadLineValid: function () {

+ 1 - 1
layouts/main.vue

@@ -12,7 +12,7 @@
   import { Header, Footer, RightBar } from '~components/default'
   import { MainHeader, MainNav } from '~components/main'
   export default {
-    name: 'main',
+    name: 'mainView',
     components: {
       HeaderView: Header,
       FooterView: Footer,

+ 1 - 1
layouts/uservendor.vue

@@ -11,7 +11,7 @@
   import { Header, Footer, RightBar } from '~components/default'
   import { VendorHeader } from '~components/main'
   export default {
-    name: 'main',
+    name: 'mainView',
     components: {
       HeaderView: Header,
       FooterView: Footer,

+ 2 - 1
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.125:8080/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.121:9090/platform-b2c/')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
@@ -137,6 +137,7 @@ module.exports = {
     '/logout/**': baseUrl,
     '/static/**': baseUrl,
     '/vendor**': baseUrl,
+    '/vendor/introduction/**': baseUrl,
     '/trade/**': baseUrl,
     '/recommendation/**': baseUrl,
     '/store-service/**': baseUrl,

+ 0 - 1
pages/supplier/_uuid/_id.vue

@@ -9,7 +9,6 @@
   export default {
     name: 'SupplierDetails',
     layout: 'main',
-    middleware: 'authenticated',
     fetch ({store, route}) {
       return Promise.all([
         store.dispatch('supplier/loadMaterialDetail', {id: route.params.id})

+ 0 - 1
pages/supplier/_uuid/index.vue

@@ -9,7 +9,6 @@
   export default {
     name: 'SupplierResource',
     layout: 'main',
-    middleware: 'authenticated',
     fetch ({store, route}) {
       return Promise.all([
         store.dispatch('supplier/loadMaterialList', {page: 1, size: 20, vendUU: route.params.uuid}),

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 532 - 54
yarn.lock


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно