瀏覽代碼

中英文切换固定字段语言整理

kouchengxing 4 年之前
父節點
當前提交
65f526cd51
共有 6 個文件被更改,包括 622 次插入103 次删除
  1. 333 20
      src/lang/en.ts
  2. 32 9
      src/lang/zh.ts
  3. 3 1
      src/views/news/details.vue
  4. 5 2
      src/views/news/index.vue
  5. 232 54
      src/views/shops/enter/add.vue
  6. 17 17
      src/views/shops/enter/index.vue

+ 333 - 20
src/lang/en.ts

@@ -1,29 +1,342 @@
 export default {
-  title: "Title",
+  title: "China steel furniture industry gathering network",
   SLS: "Switch Language Success",
+  inputPlaceholder: "Please input",
+  pleaseChoose: "Please choose",
+  pleaseUpload: "Please upload",
+  loading: "Data loading...",
+  nodata: "No data",
+  loadMore: "Click to load more",
+  form: {
+    submit: "Submission",
+    RegAccount: "Password must be 9 to 16 alphanumeric",
+    loginAccount: "Account number (mobile number)",
+    loginPassword: "Password",
+    phone: "Phone number",
+    validatePhone: "Please input the correct mobile number",
+    validateCode: "Verification Code",
+    getValidateCode: "Get verification code",
+    autoLogin: "Autologon",
+    login: "login",
+    register: "register"
+  },
+  message: {
+    success: {
+      editPassword: "Password modification succeeded, please login again",
+      cancelGz: "Cancellation of success",
+      revocation: "Unsuccessful",
+      findPassword: "Reset succeeded, please log in",
+      login: "Landing successfully",
+      register: "Successfully registered, please log in",
+      infoAdd: "Requirements published successfully!"
+    },
+    confirm: {
+      cancelGz: "Cancel attention?",
+      revocation: "Do you want to cancel the requirement?",
+      logout: "Log out?"
+    }
+  },
   route: {
-    home: "home",
-    mall: "mall",
-    shops: "shops",
-    info: "info",
+    home: "Home Page",
+    mall: "Online Shop",
+    shops: "Manufacturer",
+    info: "Demand supply",
     login: "login",
     register: "register",
-    findPassword: "findPassword",
-    collect: "collect",
-    issue: "issue",
-    shopDetails: "shopDetails",
-    shopHonor: "shopHonor",
-    shopProfile: "shopProfile",
-    productDetails: "productDetails",
-    shopEnter: "shopEnter",
-    shopEnterAdd: "shopEnterAdd",
-    infoBuy: "infoBuy",
-    infoSell: "infoSell",
-    infoAdd: "infoAdd",
-    news: "news"
+    findPassword: "Forget password",
+    collect: "My concern",
+    issue: "My needs",
+    shopDetails: "Store details",
+    shopHonor: "Qualification honor",
+    shopProfile: "Company profile",
+    productDetails: "product details",
+    shopEnter: "Enterprise certification publicity",
+    shopEnterAdd: "Merchant residence application",
+    infoBuy: "Purchase information details",
+    infoSell: "Details of supply information",
+    infoAdd: "I would like to buy it",
+    news: "Notification information",
+    newsDetail: "Information details",
+    user: "Personal Center",
+    editPassword: "Change Password"
   },
   errCode: {
-    "-1": "Network request failed",
-    500: "system error"
+    "-100": "Network request failed",
+    "-1": "An unknown error occurred",
+    "301": "User name already exists",
+    "302": "Phone number already exists",
+    "303": "Wrong account or password",
+    "304": "Verification code error",
+    "305": "login has failed",
+    "306": "User not registered", //重置密码时 账号和手机号未能查询到相应用户
+
+    "402": "Interface request failed",
+    "404": "Query result does not exist",
+
+    "500": "System error",
+    "501": "Can 't submit again, please try again later",
+    "502": "Signature verification parameter missing", //缺少验签参数
+    "503": "Interface request timeout",
+    "504": "Error checking", //验签错误
+    "505": "This request mode is not supported temporarily", //暂不支持此种请求方式
+    "506": "User not logged in", //未登录(缺少Token)
+    "507": "User login timeout" //token超时
+  },
+  page: {
+    components: {
+      category: {
+        showHeader: "Commodity classification"
+      },
+      userInfo: {
+        username: "You are not signed in",
+        editPassword: "Modify information",
+        logout: "Quit landing",
+        login: "login",
+        register: "register"
+      }
+    },
+    layout: {
+      footer: {
+        item1: "Novice guide",
+        item2: "Merchant service",
+        item3: "Common problem",
+        item4: "About us",
+        item5: "Platform customer service",
+        bottom:
+          "Technical support: Digital China general software (Luoyang) Co., Ltd"
+      },
+      header: {
+        hyn: "Welcome",
+        login: "Please login.",
+        register: "Free registration",
+        shopEnter: "Merchant entry",
+        productPublish: "Commodity release",
+        searchProduct: "product",
+        searchShops: "enterprise",
+        kw: "content",
+        search: "search"
+      }
+    },
+    views: {
+      account: {
+        user: {
+          editPassword: {
+            oldPassword: "Old password",
+            loginPassword: "New password",
+            surePassword: "Confirm password",
+            err1: "Please enter the password again",
+            err2: "The two passwords are inconsistent"
+          },
+          index: {
+            titles: "My concerns, my needs",
+            tableIndex: "Serial number",
+            purchaseTitle: "Demand heading",
+            summaryOfNeeds: "outline",
+            createTime: "Release time",
+            status: "Current state",
+            status1: "Concentration of signs",
+            status2: "Has ended",
+            option: "operation",
+            revocation: "Revoke",
+            public: "Re release",
+            companyName: "Name of merchant",
+            primaryBusiness: "Main products",
+            followDate: "Date of concern",
+            inShop: "Enter the shop",
+            cancelGz: "Remove concerns"
+          }
+        },
+        findPassword: {
+          title: "Reset password",
+          loginPassword: "New password",
+          submit: "register"
+        },
+        login: {
+          topTitle: "Welcome to login",
+          title: "Account login"
+        },
+        register: {
+          title: "User registration",
+          check: "I have read and agree",
+          protocol: "User service agreement and platform Disclaimer",
+          validateCheck: "Please agree to the disclaimer"
+        }
+      },
+      home: {
+        noticeTitle: "Notice announcement",
+        fwTitle: "Service capability",
+        productTitle: "Product Center",
+        hotProducts: "Hot commodity",
+        newsProducts: "New Arrivals",
+        ppTitle: "Brand business",
+        primaryBusiness: "Main commodity",
+        xqTitle: "Demand supply",
+        gys: "Supplier",
+        xq: "demand",
+        gy: "supply",
+        qg: "want to buy",
+        furniture: "Furniture maintenance",
+        industry: "Industry information",
+        fwListText1: "Home steel furniture manufacturers settled in",
+        fwListText2: "Steel furniture products settled in",
+        fwListText3: "Platform member registration",
+        fwListText4: "10000 online e-commerce turnover"
+      },
+      info: {
+        buy: {
+          purchaseTitle: "want to buy",
+          summaryOfNeeds: "Summary of needs",
+          demandDetails: "Demand details",
+          contacts: "Contacts",
+          contactNumber: "Contact number",
+          releaseTime: "Release time"
+        },
+        sell: {
+          supplyTitle: "supply",
+          manufacturer: "Manufacturer",
+          contacts: "Contacts",
+          releaseTime: "Release time",
+          telephone: "Contact number",
+          supplyDetails: "Supply details"
+        },
+        add: {
+          title: "Service capability",
+          purchaseTitle: "Demand heading",
+          summaryOfNeeds: "Summary of needs",
+          demandDetails: "Demand details",
+          contacts: "Contacts",
+          contactNumber: "Contact number"
+        },
+        index: {
+          titles: "Purchase information,Supply information",
+          sell: "I want to sell.",
+          public: "Release"
+        }
+      },
+      mall: {
+        category: "classification",
+        comprehensiveSort: "Comprehensive sorting",
+        newProducts: "New products",
+        price: "Price",
+        minPrice: "Minimum price",
+        maxPrice: "Highest price",
+        productsOrCompanyName: "Commodity name or enterprise name",
+        search: "search",
+        all: "all"
+      },
+      news: {
+        details: {
+          time: "time",
+          titles: "Notice notice, industry information, furniture maintenance"
+        },
+        index: {
+          details: "details"
+        }
+      },
+      shops: {
+        details: {
+          honor: {
+            qualificationHonor: "Qualification honor"
+          },
+          index: {
+            certified: "certified",
+            alreadyConcerned: "Pay close attention to",
+            focusBusinesses: "Focus on businesses",
+            keyWord: "Key word",
+            searchWholeStation: "Search the whole station",
+            searchShop: "Search shop",
+            home: "home",
+            companyIntroduction: "Company profile",
+            qualificationHonor: "Qualification honor",
+            followSuccess: "Focus on success"
+          },
+          product: {
+            brandAuthentication: "Brand authentication",
+            price: "price",
+            specifications: "Specifications",
+            color: "color",
+            contactMerchant: "Contact merchant",
+            commodityDetails: "Commodity details",
+            tradeName: "Trade name",
+            commodityMaterial: "Commodity material",
+            commodityWeight: "Single item weight",
+            commodityColor: "Commodity color",
+            commoditySpecifications: "Commodity specification",
+            distributionMode: "Distribution mode",
+            productionDate: "Date of manufacture",
+            productionLocation: "Production location",
+            warehouseAddress: "Address of supply warehouse"
+          },
+          products: {
+            buyNow: "Buy Now"
+          },
+          profile: {
+            companyType: "Types of enterprises",
+            unifiedSocialCreditCode: "Unified social credit code",
+            legalPerson: "Corporate representative",
+            detailAddress: "Registered address",
+            primaryBusiness: "Main products",
+            companyIntroduction: "Company profile",
+            businessLicense: "Business license"
+          }
+        },
+        enter: {
+          add: {
+            accountInfo: "Account information",
+            useLoginSystem: "Account is used to log in to merchant platform",
+            userName: "User name",
+            password: "Please set password",
+            surepassword: "Please confirm the password",
+            regAccount: "Password must be 9 to 16 alphanumeric",
+            err1: "Please enter the password again",
+            err2: "The two passwords are inconsistent",
+            companyInfo: "Basic information of the enterprise",
+            companyName: "Enterprise name",
+            companyType: "Types of enterprises",
+            primaryBusiness: "Main business",
+            companyAddress: "location of an enterprise",
+            province: "province",
+            city: "city",
+            area: "area",
+            detailAddress: "Detailed address",
+            chooseLongitudeAndLatitude: "Latitude and longitude selection",
+            longitude: "longitude",
+            latitude: "latitude",
+            close: "close",
+            choose: "choose",
+            legalPerson: "Enterprise legal person",
+            contactNumber: "Contact number",
+            establishDate: "date of establishment",
+            unifiedSocialCreditCode: "Unified social credit code",
+            companyIntroduction: "Enterprise introduction",
+            businessLicense: "Business license",
+            defaultImg: "Enterprise default picture",
+            propagandaImg: "Corporate image",
+            submit: "Submission",
+            message1:
+              "Unable to resolve the address, please complete the detailed address information or manually click the map to select",
+            message2: "Information submitted successfully",
+            message3:
+              "The business license within the validity period only supports JPG and PNG format, and the size is less than 2m"
+          },
+          index: {
+            title1: "Application for merchants to settle in",
+            title2: "Enterprise certification publicity",
+            auditStatus: "Audit status",
+            auditDate: "Audit date",
+            rejectReason: "Reason for rejection",
+            search: "search",
+            serialNumber: "Serial number",
+            applyDate: "Date of application"
+          }
+        },
+        index: {
+          primaryBusiness: "Main camp",
+          total: "Total",
+          product: "Commodity",
+          enterTheShop: "Enter the shop"
+        }
+      }
+    }
   }
 };

+ 32 - 9
src/lang/zh.ts

@@ -2,6 +2,8 @@ export default {
   title: "中国钢制家具产业聚集网",
   SLS: "切换语言成功",
   inputPlaceholder: "请输入",
+  pleaseChoose: "请选择",
+  pleaseUpload: "请上传",
   loading: "数据加载中...",
   nodata: "暂无数据",
   loadMore: "点击加载更多",
@@ -222,8 +224,13 @@ export default {
         all: "全部"
       },
       news: {
-        details: {},
-        index: {}
+        details: {
+          time: "时间",
+          titles: "通知公告,行业资讯,家具保养"
+        },
+        index: {
+          details: "详情"
+        }
       },
       shops: {
         details: {
@@ -279,14 +286,17 @@ export default {
             userName: "用户名",
             password: "请设置密码",
             surepassword: "请确认密码",
+            regAccount: "密码必须为9到16位由数字字母组合",
+            err1: "请再次输入密码",
+            err2: "两次输入密码不一致",
             companyInfo: "企业基本信息",
             companyName: "企业名称",
             companyType: "企业类型",
             primaryBusiness: "主营业务",
             companyAddress: "企业所在地",
-            chooseProvince: "请选择省份",
-            chooseCity: "请选择城市",
-            chooseArea: "请选择区县",
+            province: "省份",
+            city: "城市",
+            area: "区县",
             detailAddress: "详细地址",
             chooseLongitudeAndLatitude: "经纬度选择",
             longitude: "经度",
@@ -294,16 +304,29 @@ export default {
             close: "关闭",
             choose: "选择",
             legalPerson: "企业法人",
+            contactNumber: "联系电话",
             establishDate: "成立日期",
-            chooseEstablishDate: "选择成立日期",
             unifiedSocialCreditCode: "统一社会信用代码",
             companyIntroduction: "企业介绍",
             businessLicense: "营业执照",
-            defaultImgUrl: "企业默认图片",
+            defaultImg: "企业默认图片",
             propagandaImg: "企业宣传图片",
-            submit: "提交"
+            submit: "提交",
+            message1: "无法解析地址,请完善详细地址信息或者手动点击地图选择",
+            message2: "信息提交成功",
+            message3:
+              "有效期内的企业营业执照,图片仅支持JPG,PNG格式,大小小于2M"
           },
-          index: {}
+          index: {
+            title1: "商家入驻申请",
+            title2: "企业认证公示",
+            auditStatus: "审核状态",
+            auditDate: "审核日期",
+            rejectReason: "驳回理由",
+            search: "查询",
+            serialNumber: "序号",
+            applyDate: "申请日期"
+          }
         },
         index: {
           primaryBusiness: "主营",

+ 3 - 1
src/views/news/details.vue

@@ -6,7 +6,9 @@
           {{ detailObj.noticeTitle }}
         </div>
         <div class="deptDiv">
-          <span>时间:{{ detailObj.createTime }}</span>
+          <span
+            >{{ $t("page.views.news.details.time") }}:{{ detailObj.createTime }}</span
+          >
         </div>
         <div class="desCon" v-html="detailObj.noticeContent"></div>
       </div>

+ 5 - 2
src/views/news/index.vue

@@ -3,7 +3,7 @@
     <div class="container">
       <tab
         class="tab"
-        titles="通知公告,行业资讯,家具保养"
+        :titles="`${$t(`page.views.news.details.titles`)}`"
         :currIndex.sync="currIndex"
       />
       <load-more
@@ -20,7 +20,10 @@
             <div class="tit">{{ item.noticeTitle }}</div>
             <div class="detail">
               <div class="desc">{{ item.noticeOutline }}</div>
-              <span class="xq">详情<i class="el-icon-d-arrow-right"></i></span>
+              <span class="xq"
+                >{{ $t("page.views.news.index.details")
+                }}<i class="el-icon-d-arrow-right"></i
+              ></span>
             </div>
           </router-link>
         </div>

+ 232 - 54
src/views/shops/enter/add.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="bg-F5">
     <div class="container">
-      <div class="partTitle"><span class="orangeLine"></span>商户入驻申请</div>
+      <div class="partTitle">
+        <span class="orangeLine"></span
+        >{{ $t("page.views.shops.enter.index.title1") }}
+      </div>
       <el-form
         class="formPanel"
         ref="form"
@@ -10,26 +13,53 @@
         label-width="280px"
       >
         <div class="formTitle">
-          账户信息
-          <span class="subTitle">(账号用于登录商户平台)</span>
+          {{ $t("page.views.shops.enter.add.accountInfo") }}
+          <span class="subTitle"
+            >({{ $t("page.views.shops.enter.add.useLoginSystem") }})</span
+          >
         </div>
-        <el-form-item class="formItem" label="用户名" prop="loginName">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.userName`)}`"
+          prop="loginName"
+        >
           <el-input v-model="form.loginName"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="请设置密码" prop="password">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.password`)}`"
+          prop="password"
+        >
           <el-input show-password v-model="form.password"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="请确认密码" prop="surepassword">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.surepassword`)}`"
+          prop="surepassword"
+        >
           <el-input show-password v-model="form.surepassword"></el-input>
         </el-form-item>
 
         <div class="line"></div>
-        <div class="formTitle">企业基本信息</div>
-        <el-form-item class="formItem" label="企业名称" prop="companyName">
+        <div class="formTitle">
+          {{ $t("page.views.shops.enter.add.companyInfo") }}
+        </div>
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.companyName`)}`"
+          prop="companyName"
+        >
           <el-input v-model="form.companyName"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="企业类型" prop="companyType">
-          <el-select v-model="form.companyType" placeholder="请选择">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.companyType`)}`"
+          prop="companyType"
+        >
+          <el-select
+            v-model="form.companyType"
+            :placeholder="`${$t(`pleaseChoose`)}`"
+          >
             <el-option
               v-for="{ key, value } in companyType"
               :key="`companyType${value}`"
@@ -39,69 +69,118 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item class="formItem" label="主营业务" prop="primaryBusiness">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.primaryBusiness`)}`"
+          prop="primaryBusiness"
+        >
           <el-input v-model="form.primaryBusiness"></el-input>
         </el-form-item>
 
-        <el-form-item class="formItem" label="企业所在地">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.companyAddress`)}`"
+        >
           <el-select
             class="quyuSel"
             v-model="province"
-            placeholder="请选择省份"
+            :placeholder="
+              `${$t(`pleaseChoose`)}${$t(
+                `page.views.shops.enter.add.province`
+              )}`
+            "
           >
             <el-option v-for="x in provinces" :key="x" :label="x" :value="x" />
           </el-select>
-          <el-select class="quyuSel" v-model="city" placeholder="请选择城市">
+          <el-select
+            class="quyuSel"
+            v-model="city"
+            :placeholder="
+              `${$t(`pleaseChoose`)}${$t(`page.views.shops.enter.add.city`)}`
+            "
+          >
             <el-option v-for="x in citys" :key="x" :label="x" :value="x" />
           </el-select>
-          <el-select class="quyuSel" v-model="area" placeholder="请选择区县">
+          <el-select
+            class="quyuSel"
+            v-model="area"
+            :placeholder="
+              `${$t(`pleaseChoose`)}${$t(`page.views.shops.enter.add.area`)}`
+            "
+          >
             <el-option v-for="x in areas" :key="x" :label="x" :value="x" />
           </el-select>
         </el-form-item>
-        <el-form-item class="formItem" label="详细地址" prop="detailAddress">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.detailAddress`)}`"
+          prop="detailAddress"
+        >
           <el-input v-model="address"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="经纬度选择" prop="jwd">
+        <el-form-item class="formItem" :label="`${$t(`pleaseChoose`)}${$t(`page.views.shops.enter.add.longitude`)}${$t(`page.views.shops.enter.add.latitude`)}`" prop="jwd">
           <div class="longLatDiv">
-            <span>经度</span>
+            <span>{{ $t("page.views.shops.enter.add.longitude") }}</span>
             <el-input class="input" v-model="form.longitude"></el-input>
           </div>
           <div class="longLatDiv">
-            <span>纬度</span>
+            <span>{{ $t("page.views.shops.enter.add.latitude") }}</span>
             <el-input class="input" v-model="form.latitude"></el-input>
           </div>
           <el-button class="submitBtn" @click="toggerMap">{{
-            mapVisible ? "关闭" : "选择"
+            mapVisible
+              ? $t("page.views.shops.enter.add.close")
+              : $t("page.views.shops.enter.add.choose")
           }}</el-button>
           <div :class="{ map: true, show: mapVisible }" id="map"></div>
         </el-form-item>
-        <el-form-item class="formItem" label="企业法人" prop="legalPerson">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.legalPerson`)}`"
+          prop="legalPerson"
+        >
           <el-input v-model="form.legalPerson"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="联系电话" prop="contactNumber">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.contactNumber`)}`"
+          prop="contactNumber"
+        >
           <el-input v-model="form.contactNumber"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="成立日期" prop="establishDate">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.establishDate`)}`"
+          prop="establishDate"
+        >
           <el-date-picker
             v-model="form.establishDate"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择成立日期"
+            :placeholder="
+              `${$t(`pleaseChoose`)}${$t(
+                `page.views.shops.enter.add.establishDate`
+              )}`
+            "
           />
         </el-form-item>
         <el-form-item
           class="formItem"
-          label="统一社会信用代码"
+          :label="`${$t(`page.views.shops.enter.add.unifiedSocialCreditCode`)}`"
           prop="unifiedSocialCreditCode"
         >
           <el-input v-model="form.unifiedSocialCreditCode"></el-input>
         </el-form-item>
-        <el-form-item class="formItem" label="企业介绍" prop="surepassword">
+        <el-form-item
+          class="formItem"
+          :label="`${$t(`page.views.shops.enter.add.companyIntroduction`)}`"
+          prop="companyIntroduce"
+        >
           <el-input type="textarea" v-model="form.companyIntroduce"></el-input>
         </el-form-item>
         <el-form-item
           class="formItem"
-          label="营业执照"
+          :label="`${$t(`page.views.shops.enter.add.businessLicense`)}`"
           prop="businessLicenseUrl"
         >
           <el-upload
@@ -117,12 +196,12 @@
             <i class="el-icon-plus"></i>
           </el-upload>
           <div class="info">
-            有效期内的企业营业执照,图片仅支持JPG,PNG格式,大小小于2M
+            {{ $t("page.views.shops.enter.add.message3") }}
           </div>
         </el-form-item>
         <el-form-item
           class="formItem"
-          label="企业默认图片"
+          :label="`${$t(`page.views.shops.enter.add.defaultImg`)}`"
           prop="defaultImgUrl"
         >
           {{ form.defaultImgUrl }}
@@ -142,7 +221,7 @@
         </el-form-item>
         <el-form-item
           class="formItem"
-          label="企业宣传图片"
+          :label="`${$t(`page.views.shops.enter.add.propagandaImg`)}`"
           prop="propagandaImgUrl"
         >
           <el-upload
@@ -161,7 +240,9 @@
 
         <div class="line"></div>
         <el-form-item class="formItem tc">
-          <el-button class="submitBtn" @click="validate">提交</el-button>
+          <el-button class="submitBtn" @click="validate">{{
+            $t("page.views.shops.enter.add.submit")
+          }}</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -182,6 +263,7 @@ import { provinces, getCity, getArea } from "@/api/area";
 import BMap from "BMap";
 import { RegAccount } from "@/utils";
 import { ElForm } from "element-ui/types/form";
+import i18n from "@/lang";
 @Component({ name: "shopEnterAdd" })
 export default class extends Vue {
   private form: IAny = {
@@ -202,37 +284,49 @@ export default class extends Vue {
   private fileList: IFile[] = [];
   private rules = {
     loginName: [
-      { required: true, message: "请输入用户名", trigger: "blur" },
+      {
+        required: true,
+        message: `${i18n.t(`page.views.shops.enter.add.accountInfo`)}`,
+        trigger: "blur"
+      },
       {
         validator: (rule: any, value: string, callback: any) =>
           callback(
             RegAccount.test(value)
               ? undefined
-              : new Error("用户名必须为9到16位由数字字母组合")
+              : new Error(`${i18n.t(`page.views.shops.enter.add.regAccount`)}`)
           ),
         trigger: "blur"
       }
     ],
     password: [
-      { required: true, message: "请输入密码", trigger: "blur" },
+      {
+        required: true,
+        message: `${i18n.t(`page.views.shops.enter.add.password`)}`,
+        trigger: "blur"
+      },
       {
         validator: (rule: any, value: string, callback: any) =>
           callback(
             RegAccount.test(value)
               ? undefined
-              : new Error("密码必须为9到16位由数字字母组合")
+              : new Error(`${i18n.t(`page.views.shops.enter.add.regAccount`)}`)
           ),
         trigger: "blur"
       }
     ],
     surepassword: [
-      { required: true, message: "请再次输入密码", trigger: "blur" },
+      {
+        required: true,
+        message: `${i18n.t(`page.views.shops.enter.add.surepassword`)}`,
+        trigger: "blur"
+      },
       {
         validator: (rule: any, value: string, callback: any) => {
           if (value === "") {
-            callback(new Error("请再次输入密码"));
+            callback(new Error(`${i18n.t(`page.views.shops.enter.add.err1`)}`));
           } else if (value !== this.form.password) {
-            callback(new Error("两次输入密码不一致!"));
+            callback(new Error(`${i18n.t(`page.views.shops.enter.add.err2`)}`));
           } else {
             callback();
           }
@@ -241,48 +335,120 @@ export default class extends Vue {
       }
     ],
     companyName: [
-      { required: true, message: "请输入企业名称", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.companyName`
+        )}`,
+        trigger: "blur"
+      }
     ],
     companyType: [
-      { required: true, message: "请选择企业类型", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`pleaseChoose`)}${i18n.t(
+          `page.views.shops.enter.add.companyType`
+        )}`,
+        trigger: "blur"
+      }
     ],
     primaryBusiness: [
-      { required: true, message: "请输入企业类型", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.primaryBusiness`
+        )}`,
+        trigger: "blur"
+      }
     ],
 
     detailAddress: [
-      { required: true, message: "请输入详细地址", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.detailAddress`
+        )}`,
+        trigger: "blur"
+      }
     ],
     jwd: [
       {
         validator: (rule: any, value: any, callback: any) => {
-          if (!this.form.longitude) return callback(new Error("请输入经度"));
-          if (!this.form.latitude) return callback(new Error("请输入纬度"));
+          if (!this.form.longitude)
+            return callback(
+              new Error(
+                `${i18n.t(`inputPlaceholder`)}${i18n.t(
+                  `page.views.shops.enter.add.longitude`
+                )}`
+              )
+            );
+          if (!this.form.latitude)
+            return callback(
+              new Error(
+                `${i18n.t(`inputPlaceholder`)}${i18n.t(
+                  `page.views.shops.enter.add.latitude`
+                )}`
+              )
+            );
 
           callback();
         }
       }
     ],
     legalPerson: [
-      { required: true, message: "请输入企业法人", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.legalPerson`
+        )}`,
+        trigger: "blur"
+      }
     ],
     contactNumber: [
-      { required: true, message: "请输入联系电话", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.contactNumber`
+        )}`,
+        trigger: "blur"
+      }
     ],
     establishDate: [
-      { required: true, message: "请输入成立日期", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`page.views.shops.enter.add.establishDate`)}`,
+        trigger: "blur"
+      }
     ],
     unifiedSocialCreditCode: [
-      { required: true, message: "请输入统一社会信用代码", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.unifiedSocialCreditCode`
+        )}`,
+        trigger: "blur"
+      }
     ],
     companyIntroduce: [
-      { required: true, message: "请输入企业介绍", trigger: "blur" }
+      {
+        required: true,
+        message: `${i18n.t(`inputPlaceholder`)}${i18n.t(
+          `page.views.shops.enter.add.companyIntroduction`
+        )}`,
+        trigger: "blur"
+      }
     ],
     businessLicenseUrl: [
       {
         validator: (rule: string, value: any, callback: any) => {
           if (!this.form.businessLicenseUrl)
-            return callback(new Error("请上传营业执照"));
+            return callback(
+              new Error(
+                `${i18n.t(`pleaseUpload`)}${i18n.t(
+                  `page.views.shops.enter.add.businessLicense`
+                )}`
+              )
+            );
 
           callback();
         }
@@ -292,7 +458,13 @@ export default class extends Vue {
       {
         validator: (rule: string, value: any, callback: any) => {
           if (!this.form.defaultImgUrl)
-            return callback(new Error("请上传企业默认图片"));
+            return callback(
+              new Error(
+                `${i18n.t(`pleaseUpload`)}${i18n.t(
+                  `page.views.shops.enter.add.defaultImg`
+                )}`
+              )
+            );
 
           callback();
         }
@@ -302,7 +474,13 @@ export default class extends Vue {
       {
         validator: (rule: string, value: any, callback: any) => {
           if (!this.form.propagandaImgUrl)
-            return callback(new Error("请上传企业宣传图片"));
+            return callback(
+              new Error(
+                `${i18n.t(`pleaseUpload`)}${i18n.t(
+                  `page.views.shops.enter.add.propagandaImg`
+                )}`
+              )
+            );
           callback();
         }
       }
@@ -381,7 +559,7 @@ export default class extends Vue {
           this.form.longitude = pp.lng;
           this.form.latitude = pp.lat;
         } else {
-          this.$message("无法解析地址,请完善详细地址信息或者手动点击地图选择");
+          this.$message(`${i18n.t(`page.views.shops.enter.add.message1`)}`);
         }
       }
     });
@@ -399,7 +577,7 @@ export default class extends Vue {
     const [err] = await this.$post("/company/enter", this.form);
     if (err) return;
     this.DomForm.resetFields();
-    this.$message.success("信息提交成功");
+    this.$message.success(`${i18n.t(`page.views.shops.enter.add.message2`)}`);
     this.$router.push("/shopEnter");
   }
   success(type: string, url: string, uid: number) {

+ 17 - 17
src/views/shops/enter/index.vue

@@ -2,27 +2,27 @@
   <div class="bg-F5">
     <div class="bannerDiv">
       <img src="@assets/shrz-banner.png" alt="" />
-      <router-link class="applyBtn" to="/shopEnter/add"
-        >商家入驻申请</router-link
-      >
+      <router-link class="applyBtn" to="/shopEnter/add">{{
+        $t("page.views.shops.enter.index.title1")
+      }}</router-link>
     </div>
     <div class="container">
-      <div class="partTitle"><span class="orangeLine"></span>企业认证公示</div>
+      <div class="partTitle"><span class="orangeLine"></span>{{$t("page.views.shops.enter.index.title2")}}</div>
       <div class="cxtj">
-        <span>企业名称:</span>
+        <span>{{ $t("page.views.shops.enter.add.companyName") }}:</span>
         <el-input
           v-model="companyName"
           clearable
           size="small"
-          placeholder="请输入企业名称"
+          :placeholder="`${$t(`inputPlaceholder`)}${$t(`page.views.shops.enter.add.companyName`)}`"
           style="width:38rem;"
         ></el-input>
-        <span class="ml2rem">审核状态:</span>
+        <span class="ml2rem">{{ $t("page.views.shops.enter.add.auditStatus") }}:</span>
         <el-select
           v-model="status"
           clearable
           size="small"
-          placeholder="请选择"
+          :placeholder="`${$t(`pleaseChoose`)}`"
           style="width:14rem;"
         >
           <el-option
@@ -33,34 +33,34 @@
           ></el-option>
         </el-select>
         <el-button class="searchBtn" size="small" @click="search"
-          >查询</el-button
+          >{{ $t("page.views.shops.enter.index.search") }}</el-button
         >
       </div>
       <el-table
-        empty-text="数据加载中..."
+        :empty-text="`${$t(`loading`)}`"
         class="qyrzgs"
         stripe
         v-if="items"
         :data="items"
       >
-        <el-table-column type="index" label="序号" width="50"></el-table-column>
-        <el-table-column prop="companyName" label="企业名称"></el-table-column>
+        <el-table-column type="index" :label="`${$t(`page.views.shops.enter.index.serialNumber`)}`" width="50"></el-table-column>
+        <el-table-column prop="companyName" :label="`${$t(`page.views.shops.enter.add.companyName`)}`"></el-table-column>
         <el-table-column
           prop="detailAddress"
-          label="详细地址"
+          :label="`${$t(`page.views.shops.enter.add.detailAddress`)}`"
         ></el-table-column>
-        <el-table-column prop="createTime" label="申请日期"></el-table-column>
-        <el-table-column prop="address" label="审核状态">
+        <el-table-column prop="createTime" :label="`${$t(`page.views.shops.enter.index.applyDate`)}`"></el-table-column>
+        <el-table-column prop="address" :label="`${$t(`page.views.shops.enter.index.auditStatus`)}`">
           <template slot-scope="{ row: { status } }">
             {{ getStatusText(status) }}
           </template>
         </el-table-column>
-        <el-table-column prop="address" label="审核日期">
+        <el-table-column prop="address" :label="`${$t(`page.views.shops.enter.index.auditDate`)}`">
           <template slot-scope="{ row: { companyExamine } }">
             {{ companyExamine && companyExamine.examineDate }}
           </template>
         </el-table-column>
-        <el-table-column prop="address" label="驳回理由">
+        <el-table-column prop="address" :label="`${$t(`page.views.shops.enter.index.rejectReason`)}`">
           <template slot-scope="{ row: { companyExamine } }">
             {{ companyExamine && companyExamine.rejectReason }}
           </template>