wuhongyu 5 år sedan
förälder
incheckning
f98303595e
3 ändrade filer med 16 tillägg och 3 borttagningar
  1. 14 2
      src/views/dynamic/dealDetail.vue
  2. 1 1
      src/views/market/index.vue
  3. 1 0
      src/views/market/marketlists.vue

+ 14 - 2
src/views/dynamic/dealDetail.vue

@@ -62,6 +62,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: product } = createNamespacedHelpers('enterpriseproject');
 export default {
   name: 'dealDetail',
   props: {},
@@ -81,6 +82,7 @@ export default {
   },
   methods: {
     ...transaction(['fetch']),
+    ...product({ list: 'newquery', newfetch: 'newfetch' }),
     async search() {
       let res = await this.fetch(this.id);
       res.data.status = parseInt(res.data.status);
@@ -88,8 +90,18 @@ export default {
       this.$set(this, `dealDetails`, res.data);
     },
 
-    onclick() {
-      console.log(this.product_id);
+    async onclick() {
+      console.log(this.dealDetails.product_id);
+      const res = await this.newfetch(this.dealDetails.product_id);
+      let id = this.dealDetails.product_id;
+      console.log(res.data.totaltype);
+      if (res.data.totaltype == '0') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 0, id: id, column_name: '技术供求', display: 2 } });
+      } else if (res.data.totaltype == '1') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: id, column_name: '科技产品', display: 2 } });
+      } else if (res.data.totaltype == '2') {
+        this.$router.push({ path: '/market/marketlists', query: { totaltype: 2, id: id, display: 2, column_name: '科技产品' } });
+      }
     },
   },
   filters: {

+ 1 - 1
src/views/market/index.vue

@@ -223,7 +223,7 @@ export default {
       this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, column_name: '科技产品', display: 1 } });
     },
     productDetail(id) {
-      this.$router.push({ path: '/market/marketlists', query: { totaltype: 2, id: id, display: 2, column_name: '科技产品' } });
+      this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: id, display: 2, column_name: '科技产品' } });
     },
     toTecList() {
       this.$router.push({ path: '/market/marketlists', query: { totaltype: 0, column_name: '技术供求', display: 1 } });

+ 1 - 0
src/views/market/marketlists.vue

@@ -286,6 +286,7 @@ export default {
       shenhe.product_id = this.detailInfo.userid;
       console.log(shenhe);
       let ress = await this.tranauditcreate(shenhe);
+      this.$router.push({ path: '/live/hall/dock/dockDetail', query: { id: this.detailInfo.id } });
     },
   },
 };