wei 2 주 전
부모
커밋
d94add01aa
4개의 변경된 파일33개의 추가작업 그리고 77개의 파일을 삭제
  1. 27 42
      src/components/sidebox.vue
  2. 1 1
      src/langs/cn/index.js
  3. 5 5
      src/langs/en/index.js
  4. 0 29
      src/main.js

+ 27 - 42
src/components/sidebox.vue

@@ -8,8 +8,6 @@
           <img src="@/assets/img/side/sideimg4.png" alt="" class="fixedMessagesImg">
           <p class="fixedMessagesText">TOP</p>
         </div>
-        <!-- <p v-if="lang == 'cn'" class="fixed-text">三优<br/>导航</p> -->
-        <!-- <p v-if="lang == 'en'" class="fixed-text">Sanyou<br/>navigation</p> -->
     </div>
     <el-drawer
     title=""
@@ -73,7 +71,7 @@
       :visible.sync="dialogVisible"
       width="1200px">
       <div class="production_bottom_box">
-        <p class="production_bottom_title">{{ $t("input.leaveaMessage") }}</p>
+        <p class="production_bottom_title">{{ $t("input.Comments") }}</p>
         <div class="submit_box">
           <el-form label-position="left" ref="form" :model="form" label-width="130px">
             <div class="el_input">
@@ -92,16 +90,8 @@
                 <el-input v-model="form.phone"></el-input>
               </el-form-item>
             </div>
-            <div class="el_input">
-              <el-form-item :label="$t('input.catalogNumber') + ':'">
-                <el-input v-model="form.catalog"></el-input>
-              </el-form-item>
-              <el-form-item :label="$t('input.productName') + ':'">
-                <el-input v-model="form.productName"></el-input>
-              </el-form-item>
-            </div>
             <div class="el_input_message">
-              <el-form-item :label="$t('input.Comments') + ':'">
+              <el-form-item :label="$t('input.leaveaMessage') + ':'">
                 <el-input v-model="form.message" type="textarea" :rows="3"></el-input>
               </el-form-item>
             </div>
@@ -116,7 +106,7 @@
     <!-- 移动端 -->
     <el-dialog
       v-if="$util.isMobileDevice()"
-      :title="$t('input.leaveaMessage')"
+      :title="$t('input.Comments')"
       :visible.sync="dialogVisible"
       width="90%">
       <div class="production_bottom_box">
@@ -143,18 +133,8 @@
                 <el-input v-model="form.phone"></el-input>
               </el-form-item>
             </div>
-            <div class="el_input">
-              <el-form-item :label="$t('input.catalogNumber') + ':'">
-                <el-input v-model="form.catalog"></el-input>
-              </el-form-item>
-            </div>
-            <div class="el_input">
-              <el-form-item :label="$t('input.productName') + ':'">
-                <el-input v-model="form.productName"></el-input>
-              </el-form-item>
-            </div>
             <div class="el_input_message">
-              <el-form-item :label="$t('input.Comments') + ':'">
+              <el-form-item :label="$t('input.leaveaMessage') + ':'">
                 <el-input v-model="form.message" type="textarea" :rows="3"></el-input>
               </el-form-item>
             </div>
@@ -181,13 +161,11 @@ export default {
       drawer: false,
       dialogVisible: false,
       form: {
-        catalog: "",
+        name: "",
         company: "",
         email: "",
-        message: "",
-        name: "",
         phone: "",
-        productName: ""
+        message: ""
       },
       fullscreenLoading: false,
       isTop: false // 是否回到顶部
@@ -224,21 +202,30 @@ export default {
       return false;
     },
     init () {
-      YSF.init('467cad5bb74586dff3727cc6e20b014f', {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      YSF.init("467cad5bb74586dff3727cc6e20b014f", {
         hidden: 1 // hidden 表示是否隐藏访客端默认入口
       }).then(ysf => {
         ysf("config", {
-          title: "SRC",
+          title: "BsAb",
           level: 1,
           success: function () {
-            ysf('open')
+            ysf("open")
+            loading.close();
           },
           error: function (err) {
-            console.log(err, "配置失败,拒绝 Promise 并返回错误信息"); // 配置失败,拒绝 Promise 并返回错误信息
+            this.$message.error(err);
+            loading.close();
           }
         })
       }).catch(error => {
-        console.log('sdk加载失败---', error);
+        this.$message.error(error);
+        loading.close();
       });
     },
     // 验证
@@ -266,20 +253,18 @@ export default {
     postSubmit() {
       if (this.verification()) {
         this.fullscreenLoading = true;
-        this.$api.post("message/submit", this.from).then(res => {
+        this.$api.post("message/submit", this.form).then(res => {
           if (res.code == 0) {
             this.$message({
               message: this.$t("input.YourMessage"),
               type: "success"
             });
             this.form = {
-              catalog: "",
               company: "",
               email: "",
-              message: "",
               name: "",
               phone: "",
-              productName: ""
+              message: ""
             };
             this.fullscreenLoading = false;
             this.dialogVisible = false
@@ -559,17 +544,17 @@ export default {
         right: 0px;
         z-index: 9999;
         .fixedMessages{
-          width: 0.9rem;
+          width: 0.6rem;
           background: #FFFFFF;
           box-shadow: 0px 2px 27px 0px rgba(105,105,105,0.35);
           border-top-left-radius: 10px;
           border-bottom-left-radius: 10px;
-          padding-top: 0.3rem;
+          padding-top: 0.2rem;
           overflow: hidden;
             .fixed-messageImg{
               display: block;
-              margin: 0 auto 0.3rem;
-              width: 0.6rem;
+              margin: 0 auto 0.2rem;
+              width: 0.4rem;
               background: linear-gradient(180deg, #22AB3A, #1880C1);
               padding: 5px;
               border-radius: 50%;
@@ -586,7 +571,7 @@ export default {
               .fixedMessagesText{
                 font-family: Source Han Sans CN;
                 font-weight: bold;
-                font-size: 18px;
+                font-size: 14px;
                 color: #989898;
                 line-height: 1;
                 text-align: center;

+ 1 - 1
src/langs/cn/index.js

@@ -237,8 +237,8 @@ export default {
     leaveaMessage: '给我们留言',
     enterkeywords: '输入关键字',
     address_must: '请准确填写您的地址,以防样品接收不到。例如:国家/省/市/区/街道/楼号',
-    Wewill: '我们会在24小时内通过电子邮件联系您',
     Comments: '备注',
+    Wewill: '我们会在24小时内通过电子邮件联系您',
     submit: '提交',
     empty: '是必填的',
     emailY: '请填写正确的',

+ 5 - 5
src/langs/en/index.js

@@ -224,21 +224,21 @@ export default {
   input: {
     all: 'All',
     Diagnostic: 'Diagnostic',
-    fullname: 'Full Name',
+    fullname: 'Name',
     country: 'Country / Region',
     companyInstitution: 'Company / Institution',
     address: 'Address',
-    email: 'Email Address',
+    email: 'Email',
     telFor: 'Comments',
-    company: 'Company',
+    company: 'Company name',
     tel: 'Tel',
     catalogNumber: 'Catalog Number',
     productName: 'Product Name',
     leaveaMessage: 'Leave a Message',
     enterkeywords: 'Enter Keywords',
     address_must: 'Please fill in your address accurately to prevent samples from not being received',
-    Wewill: 'We will contact you by email Within 24 hours',
-    Comments: 'Comments',
+    Comments: 'Leave Message',
+    Wewill: 'Thank you for contacting us, we will reach you out in 24hr by email',
     submit: 'Submit',
     empty: 'Is Required',
     emailY: 'Format is Incorrect',

+ 0 - 29
src/main.js

@@ -21,39 +21,10 @@ import ba from "vue-ba"
 import Distpicker from "v-distpicker" // 省市县
 import tool from "./js/util/tool.js"
 import "default-passive-events"
-import YSF from '@neysf/qiyu-web-sdk';
 promise.polyfill()
 require("./js/filter.js")
 require("./js/directive.js")
 
-YSF.init('467cad5bb74586dff3727cc6e20b014f').then(ysf => {
-  ysf("config", {
-    title: "SRC",
-    // uid:"crs",
-    // name:'test',
-    // email:'test@163.com',
-    // mobile:'13888888888',
-    // data:JSON.stringify([
-    //   {"key":"real_name", "value":"土豪"},
-    //   {"key":"mobile_phone", "value":"15989303213", "hidden":true},
-    //   {"key":"email", "value":"13800000000@163.com"},
-    //   {"index":0, "key":"account", "label":"账号", "value":"zhangsan" , "href":"http://example.domain/user/zhangsan"},
-    //   {"index":1, "key":"sex", "label":"性别", "value":"先生"},
-    //   {"index":5, "key":"reg_date", "label":"注册日期", "value":"2015-11-16"},
-    //   {"index":6, "key":"last_login", "label":"上次登录时间", "value":"2015-12-22 15:38:54"}
-    // ]),
-    level: 1,
-    success: function () {
-      ysf('open')
-    },
-    error: function (err) {
-      console.log(err, "配置失败,拒绝 Promise 并返回错误信息"); // 配置失败,拒绝 Promise 并返回错误信息
-    }
-  })
-  // ysf('open');
-}).catch(error => {
-  console.log('sdk加载失败---', error);
-});
 
 Vue.component("v-distpicker", Distpicker) // 省市县
 Vue.config.productionTip = false