From 4deda573bfc6663c1793b29f60a6e1035d891520 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 23 八月 2019 16:36:42 +0800
Subject: [PATCH] news

---
 src/views/partner/index.vue |   85 ++++++++++++++++++++++++++++++------------
 1 files changed, 61 insertions(+), 24 deletions(-)

diff --git a/src/views/partner/index.vue b/src/views/partner/index.vue
index b31fcf6..5bfdcf4 100644
--- a/src/views/partner/index.vue
+++ b/src/views/partner/index.vue
@@ -41,14 +41,14 @@
             <el-col :span="12">
               <el-form-item style="position: relative;">
                 <img src="../../img/huo5.png" alt="" class="left_img p_hide">
-                <el-input placeholder="鍏徃鍚嶇О" v-model="input1"></el-input>
+                <el-input placeholder="鍏徃鍚嶇О" v-model="company"></el-input>
                 <img src="../../img/huo1.png" class="right_img p_hide" alt="">
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item style="position: relative;">
                 <img src="../../img/huo5.png" alt="" class="left_img p_hide">
-                <el-input placeholder="鎮ㄧ殑鑱屼綅" v-model="input2"></el-input>
+                <el-input placeholder="鎮ㄧ殑鑱屼綅" v-model="Job"></el-input>
                 <img src="../../img/huo2.png" class="right_img p_hide" alt="" style="right: 0.4rem;">
               </el-form-item>
             </el-col>
@@ -57,14 +57,14 @@
             <el-col :span="12">
               <el-form-item style="position: relative;">
                 <img src="../../img/huo5.png" alt="" class="left_img p_hide">
-                <el-input placeholder="鎮ㄧ殑濮撳悕" v-model="input3"></el-input>
+                <el-input placeholder="鎮ㄧ殑濮撳悕" v-model="fullName"></el-input>
                 <img src="../../img/huo3.png" class="right_img p_hide" alt="">
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item style="position: relative;">
                 <img src="../../img/huo5.png" alt="" class="left_img p_hide">
-                <el-input placeholder="鎮ㄧ殑鐢佃瘽" v-model="input4"></el-input>
+                <el-input placeholder="鎮ㄧ殑鐢佃瘽" v-model="mob"></el-input>
                 <img src="../../img/huo4.png" class="right_img p_hide" alt="">
               </el-form-item>
             </el-col>
@@ -73,14 +73,14 @@
             <el-col>
               <el-form-item>
                 <img src="../../img/huo5.png" alt="" class="left_img p_hide">
-                <el-input type="textarea" placeholder="鍜ㄨ鍐呭" v-model="input5"></el-input>
+                <el-input type="textarea" placeholder="鍜ㄨ鍐呭" v-model="content"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="text-align:center">
             <el-col>
               <el-form-item>
-                <el-button type="primary" style="margin: 0.47rem 0 0.3rem;" @click="refer">鎻愪氦</el-button>
+                <el-button type="primary" :disabled="loading" style="margin: 0.47rem 0 0.3rem;" @click="refer">鎻愪氦</el-button>
               </el-form-item>
             </el-col>
           </el-row>
@@ -94,61 +94,98 @@
 export default {
   data () {
     return {
-      input1: '',
-      input2: '',
-      input3: '',
-      input4: '',
-      input5: '',
+      company: '',
+      Job: '',
+      fullName: '',
+      mob: '',
+      content: '',
       isPhone: true,//鎵嬫満 PC
       p_txt: '瀹炴柦浼欎即',
-      e_txt: 'Implementing partners'
+      e_txt: 'Implementing partners',
+      loading: false
     }
   },
 	methods: {
-		point (t,e) {
+		point (t, e) {
 			this.p_txt = t
 			this.e_txt = e
 		},
 		refer () {
-			if(!this.input1){
+      if (this.loading) {
+        this.err_msg('5s鍐呬笉鍙噸澶嶆彁浜�');
+				return false;
+      }
+
+			if (!this.company) {
 				this.err_msg('鍏徃鍚嶇О涓嶈兘涓虹┖');
 				return false;
 			}
 
-			if(!this.input2){
+			if (!this.Job) {
 				this.err_msg('鎮ㄧ殑鑱屼綅涓嶈兘涓虹┖');
 				return false;
 			}
 
-			if(!this.input3){
+			if (!this.fullName) {
 				this.err_msg('鎮ㄧ殑濮撳悕涓嶈兘涓虹┖');
 				return false;
 			}
 
-			if(!this.input4){
+			if (!this.mob) {
 				this.err_msg('鎮ㄧ殑鐢佃瘽涓嶈兘涓虹┖');
 				return false;
 			}
 
-			if(!this.input5){
+			if (!this.content) {
 				this.err_msg('鍜ㄨ鍐呭涓嶈兘涓虹┖');
 				return false;
-			}
+      }
+      
+      this.loading = true
+      setTimeout(() => {
+        this.loading = false
+      }, 5000)
+
+      let param = {
+        func: 'Web_Partner_SubData',
+        PartnerType: this.e_txt,
+	      Company: this.company,
+        Job: this.Job,
+        FullName: this.fullName,
+        Mob: this.mob,
+        Remark: this.content
+      }
+      this.Service.setSubmit(param).then(res => {
+        if (res.status) {
+          this.success_msg('鎻愪氦鎴愬姛锛屾垜浠細灏藉揩涓庢偍鍙栧緱鑱旂郴')
+        } else {
+          this.err_msg(res.message)
+        }
+      })
 		},
-		//閿欒鎻愮ず锛堝尯鍒嗘墜鏈� PC锛�
-		err_msg (err) {
+		err_msg (err) { //閿欒鎻愮ず锛堝尯鍒嗘墜鏈� PC锛�
 			if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
 			  alert(err)
-			}else{
-        this.$message.error(err);
+			} else {
+        this.$message.error(err)
+			}
+    },
+    success_msg (err) { //閿欒鎻愮ず锛堝尯鍒嗘墜鏈� PC锛�
+			if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
+			  alert(err)
+			} else {
+        this.$message.success(err)
 			}
 		}
-	}
+  }
 }
 </script>
 
 <style lang="less" scoped>
   @media (max-width: 750px) and (min-width: 0) {
+    .banner {
+      margin-top: 1.13rem;
+    }
     h2 {
       display: none;
     }

--
Gitblit v1.8.0