guhongwei hace 4 años
padre
commit
57f4e3017f
Se han modificado 2 ficheros con 12 adiciones y 3 borrados
  1. 1 1
      src/views/service/index.vue
  2. 11 2
      src/views/service/policy.vue

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

@@ -68,7 +68,7 @@ export default {
       } else if (type == '3') {
         console.log('3');
       } else if (type == '4') {
-        console.log('4');
+        window.location.href = 'http://broadcast.waityou24.cn/liveAchieve';
       } else if (type == '5') {
         this.$router.push({ path: '/service/register', query: { type: type } });
       } else if (type == '6') {

+ 11 - 2
src/views/service/policy.vue

@@ -49,6 +49,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapPolicy } = createNamespacedHelpers('policy');
 export default {
   name: 'policy',
   props: {},
@@ -56,7 +57,7 @@ export default {
   data: function () {
     return {
       form: {
-        user_id: '123456',
+        user_id: '607e70354de4e23e840f4ef6',
         qyfr: [],
         yyzz: [],
         qylr: [],
@@ -72,11 +73,19 @@ export default {
   },
   created() {},
   methods: {
+    ...mapPolicy(['create']),
     onSubmit(formName) {
       this.$refs[formName].validate(async (valid) => {
         if (valid) {
           let data = this.form;
-          console.log(data);
+          let res = await this.create(data);
+          if (this.$checkRes(res)) {
+            this.$message({
+              message: '政策服务申报成功,请耐心等待结果',
+              type: 'success',
+            });
+            this.$router.push({ path: '/service/index' });
+          }
         } else {
           console.log('error submit!!');
           return false;