kevin_zhangl 2 лет назад
Родитель
Сommit
2439d68cc8

+ 7 - 0
backendApi/modules/v1/controllers/BaseController.php

@@ -36,6 +36,13 @@ class BaseController extends \yii\rest\ActiveController {
      * @throws \yii\web\BadRequestHttpException
      */
     public function beforeAction($action) {
+        // 动态返回语言:zh:zh-CN | en:en-US
+        if (!Yii::$app->request->isOptions) {
+            $language = Yii::$app->request->headers->get('language') ?? 'en';
+            Yii::$app->language = $language == 'zh' ? 'zh-CN' : 'en-US';
+            Yii::$app->sourceLanguage = $language == 'zh' ? 'en-US' : 'zh-CN';
+        }
+
         $parentBeforeAction = parent::beforeAction($action);
 
         // 增加的判断用户登录后未操作后的超时

+ 9 - 0
common/config/main.php

@@ -96,6 +96,15 @@ return [
                         'app/error' => 'error.php',
                     ],
                 ],
+                'ctx*' => [
+                    'class' => 'yii\i18n\PhpMessageSource',
+                    'basePath' => '@common/messages',
+//                    'sourceLanguage' => 'en-US',
+                    'fileMap' => [
+                        'ctx' => 'ctx.php',
+                        'ctx/error' => 'error.php',
+                    ],
+                ],
             ],
         ],
     ],

+ 313 - 0
common/messages/en-US/ctx.php

@@ -0,0 +1,313 @@
+<?php
+return [
+    # 公用
+    'notConnection' => 'Connection not operated for too long',
+    'deleteFailed' => 'failed to delete',
+    'deleteSuccessfully' => 'delete successfully',
+    'quickLoginCanNotOperate' => '快速登录的会员无法进行任何操作',
+    'selectAtLeastOne' => '必须选择一条数据',
+    'failed' => 'Failed',
+    'successfully' => 'Successfully',
+    'createAt' => 'Creation Time',
+    'status' => 'Status',
+    'state' => 'State',
+    'sort' => 'Sort',
+    'illegalRequest' => 'Illegal request',
+    'invalidParameter' => 'Invalid Parameter',
+    'dataDoesNotExists' => 'The data does not exist',
+
+
+    /**【以下内容为会员端词条,如果管理端有相同词条,移入分割线之上使用即可,翻译完全部项目之后删除以下内容】
+     * 会员端翻译:Yii::t('app', 'addressId')
+     * 管理端翻译:Yii::t('ctx', 'addressId')
+     */
+    # 商城
+    'addressId' => 'Address',
+    'reconsume' => 'Reconsume',
+    'orderCode' => 'Order Code',
+    'orderDetail' => 'Order Detail',
+    'productCode' => 'Product Code',
+    'productName' => 'Product Name',
+    'productPrice' => 'Product Price',
+    'qty' => 'Qty',
+    'taxRate' => 'Tax Rate',
+    'totalTax' => 'Total Tax',
+    'totalAmount' => 'Total Amount',
+    'total' => 'Total',
+    'signature' => 'Signature',
+    'date' => 'Date',
+    'accountBalance' => 'Account Balance',
+    'travelBonus' => 'Travel Bonus',
+    'carFund' => 'Car Fund',
+    'villaFund' => 'Villa Fund',
+    'reconsumeSuccessfully' => '帮会员复消成功',
+    'reconsumeRemark' => '复销备注',
+    'standardProducts' => 'Standard Products',
+    'carFundProducts' => 'Car Fund Products',
+    'villaFundProducts' => 'Villa Fund Products',
+    'travelFundProducts' => 'Travel Fund Products',
+    'insufficientInventory' => 'Insufficient inventory',
+    'soldOut' => 'Sold out',
+    'productsDoesNotExists' => 'Products does not exists!',
+    'cashDoesNotAdequate' => '余额不足,无法购买商品',
+    'exchangePointDoesNotAdequate' => '兑换积分不足,无法购买商品',
+    'travelPointDoesNotAdequate' => '旅游积分不足,无法购买商品',
+    'carFundPointDoesNotAdequate' => '车奖积分不足,无法购买商品',
+    'villaPointDoesNotAdequate' => '房奖积分不足,无法购买商品',
+    'paymentInfoDoesNotExists' => '支付信息不存在',
+    'payAmountNotEqualOrderAmount' => '支付金额与订单金额不符',
+    'orderSn' => 'Order Code',
+    'expressCompany' => 'Express Company',
+    'orderTrackNo' => 'Track Code',
+    'remark' => 'Remark',
+    'orderType' => 'Order Type',
+    'payType' => 'Pay Type',
+    'productID' => 'Product ID',
+    'quantity' => 'Quantity',
+    'repeatSalesMemberNo' => 'UserName',
+    'consigneeNo' => 'Consignee',
+    'acceptMobile' => 'Accept Mobile',
+    'lgaName' => 'Lga Name',
+    'cityName' => 'City Name',
+    'detailAddress' => 'Address',
+    'shippingAddress' => 'shipping Address',
+
+    'orderDoesNotExist' => 'the order does not exist',
+    'orderHasBeenCancelCanNotDeliver ' => '订单已取消不能发货',
+    'orderHasBeenDeleteCanNotDeliver' => '订单已删除不能发货',
+    'orderPayStatusDoesNotSupportRefund' => '订单状态支付状态不支持退款',
+    'orderLogisticsStatusDoesNotSupportRefund' => '订单物流状态不支持退款',
+    'orderPayTypeDoesNotSupportRefund' => '订单支付方式不支持退款',
+    'paymentPasswordError' => 'The payment password is incorrect',
+    'shippingDoesNotExist' => 'the shipping address does not exist',
+    'payTypeError' => '支付方式错误',
+    'orderCanNotHasMoreClassification' => '订单不能包含多种商品分类',
+    'shopGoodClassificationError' => '商品分类错误',
+    'orderStatusTypeError' => '订单状态类型错误',
+    'orderStatusDoesNotChange' => '订单状态没有改变',
+    'orderHasBeenLogisticsStatusDoesNotChangedUnpaid' => '订单已经进入物流状态不能改为未支付',
+    'orderHasBeenInvalidCanNotProcess' => '订单已失效不能处理',
+    'orderCanNotBeenChangedLogistics' => '订单不能单独处理为物流状态',
+    'orderHasBeenFinishedCanNotCancel' => '订单已完成不能取消',
+    'orderHasBeenDeletedCanNotCancel' => '订单已删除不能取消',
+    'orderHasBeenFinishedCanNotDelete' => '订单已完成不能删除',
+    'flowTypeError' => '流水类型错误',
+    'flowCreateError' => '流水产生错误',
+    'doesNotYourSubMemberCanNotReconsume' => '不是您的伞下会员,不能为其复消',
+    'membersResellingBalancePayment' => 'Members reselling balance payment',
+    'membersExchangePointPayment' => '会员复销积分兑换',
+    'orderCanNotContainMultipleProductCategories' => 'Order cannot contain multiple product categories',
+
+
+    # 会员
+    'memberCode' => 'Member Code',
+    'memberName' => 'Member Name',
+    'memberAddress' => 'Member Address',
+    'memberPhone' => 'Member Phone',
+    'bankName' => 'Bank Name',
+    'bankCode' => 'Bank Code',
+    'admin' => 'Admin',
+    'minCharge' => 'Min Charge',
+    'maxCharge' => 'Max Charge',
+    'chargeRate' => 'Charge Rate',
+    'updater' => 'Updater',
+    'userName' => 'USER_NAME',
+    'passwordHash' => 'PASSWORD_HASH',
+    'payPassword' => 'PAY_PASSWORD',
+    'nation' => 'NATION',
+    'realName' => 'REAL_NAME',
+    'IDCard' => 'ID_CARD',
+    'IDType' => 'ID_TYPE',
+    'mobile' => 'MOBILE',
+    'address' => 'ADDRESS',
+    'IDImage' => 'ID_IMAGE',
+    'openBank' => 'OPEN_BANK',
+    'bankAddress' => 'BANK_ADDRESS',
+    'bankNo' => 'BANK_NO',
+    'bankProvince' => 'BANK_PROVINCE',
+    'bankCity' => 'BANK_CITY',
+    'bankCounty' => 'BANK_COUNTY',
+    'spouseName' => 'SPOUSE_NAME',
+    'spouseIDCard' => 'SPOUSE_IDCARD',
+    'decClosed' => 'DEC_CLOSED',
+    'decClosedAt' => 'DEC_CLOSED_AT',
+    'decLv' => 'DEC_LV',
+    'empLv' => 'EMP_LV',
+    'crownLv' => 'CROWN_LV',
+    'province' => 'PROVINCE',
+    'city' => 'CITY',
+    'county' => 'COUNTY',
+    'tel' => 'TEL',
+    'subComID' => 'SUB_COM_ID',
+    'avatar' => 'AVATAR',
+    'isDec' => 'IS_DEC',
+    'isAtlas' => 'IS_ATLAS',
+    'isRecharge' => 'IS_RECHARGE',
+    'DEC_ID' => 'DEC_ID',
+    'birthday' => 'BIRTHDAY',
+    'decRoleID' => 'DEC_ROLE_ID',
+    'periodAt' => 'PERIOD_AT',
+    'decProvince' => 'DEC_PROVINCE',
+    'decCity' => 'DEC_CITY',
+    'decCounty' => 'DEC_COUNTY',
+    'isUnion' => 'IS_UNION',
+    'statusAt' => 'STATUS_AT',
+    'verified' => 'VERIFIED',
+    'verifiedAt' => 'VERIFIED_AT',
+    'allowLogin' => 'ALLOW_LOGIN',
+    'notOperating' => 'NOT_OPERATING',
+    'regFrom' => 'REG_FROM',
+    'IDCardPrefix' => 'ID_CARD_PREFIX',
+    'sex' => 'SEX',
+    'decAccountOld' => 'DEC_ACCOUNT_OLD',
+    'bankUpdatedAt' => 'BANK_UPDATED_AT',
+    'isDirectSeller' => 'IS_DIRECT_SELLER',
+    'decLvUpdatedAt' => 'DEC_LV_UPDATED_AT',
+    'decLvUpdatedPeriod' => 'DEC_LV_UPDATED_PERIOD',
+    'decAddress' => 'DEC_ADDRESS',
+    'decPhone' => 'DEC_PHONE',
+    'guarantor' => 'GUARANTOR',
+    'guarantorName' => 'GUARANTOR_NAME',
+    'partFuncClosed' => 'PART_FUNC_CLOSED',
+    'lastDecLvUpdatedPeriod' => 'LAST_DEC_LV_UPDATED_PERIOD',
+    'userCreator' => 'USER_CREATOR',
+    'userUpdater' => 'USER_UPDATER',
+    'lastDecLvUpdatedAt' => 'LAST_DEC_LV_UPDATED_AT',
+    'decCreatedAt' => 'DEC_CREATED_AT',
+    'partFuncClosedRemark' => 'PART_FUNC_CLOSED_REMARK',
+    'decCreatedPeriod' => 'DEC_CREATED_PERIOD',
+    'passwordChanged' => 'PASSWORD_CHANGED',
+    'subComLeader' => 'SUB_COM_LEADER',
+    'zgUpgradePv' => 'ZG_UPGRADE_PV',
+    'appClientID' => 'APP_CLIENT_ID',
+    'readAgreement' => 'READ_AGREEMENT',
+    'lastDecLv' => 'LAST_DEC_LV',
+    'bonusAppClientID' => 'BONUS_APP_CLIENT_ID',
+    'isFirstOpen' => 'IS_FIRST_OPEN',
+    'isModifyPassword' => 'IS_MODIFY_PASSWORD',
+    'isStudio' => 'IS_STUDIO',
+    'email' => 'EMAIL',
+
+    'fillingUpOfADeficit' => 'filling up of a deficit',
+    'fullPayment' => 'full payment',
+
+    'personalDataModifiedSuccessfully' => 'Personal data modified successfully',
+    'passwordModifiedSuccessfully' => 'Password modified successfully',
+    'theFunctionIsNotAvailable' => 'The function is not available',
+    'inactiveUser' => 'Inactive user. Please contact customer service.',
+    'checkPerformance' => 'Please contact customer service to check performance.',
+    'checkPerformanceOfUpgradedMember' => 'Please contact the customer service personnel to check the performance of upgraded members',
+    'memberNumberExpired' => 'Member number expired',
+    'memberNumberDoesNotConformTo' => 'Member number does not conform to',
+    'failedToGenerateMemberNumber' => 'Failed to generate member number',
+    'memberNumberDoesNotExist' => 'Member number does not exist',
+    'repeatSalesMemberNoDoesNotExist' => 'Repeat sales Member No. does not exist',
+    'memberDoesNotExist' => 'Member does not exist',
+    'memberDoesNotInSamePlacementNetwork' => 'The member is not in the same placement network as the current user',
+    'viewSubMembersMost' => 'View the top 20 sub members of the member at most',
+    'upgradeMethodIncorrect' => 'The upgrade method is incorrect. Please contact the customer service personnel',
+
+    'originalLoginPasswordError' => 'Original login password error',
+    'originalPaymentPasswordError' => 'Original payment password error',
+    'userNameNotExists' => 'Nonexistent user name',
+    'pleaseSelectUpgradeLevel' => 'Please select upgrade level',
+    'totalPVLessThan' => 'Total PV cannot be less than the selected level PV',
+    'totalPvExceedPv' => 'The total PV cannot exceed the PV value of the next level under the selected level',
+    'deliveryTemporarilyNotSupported' => 'Delivery is temporarily not supported in the region. Contact customer service for details',
+    'applicantCashShort' => 'The applicant is short of cash and cannot complete the declaration',
+    'failedToUpgrade' => 'Failed to upgrade for member',
+    'bulkDeclarationNotSames' => 'Bulk declaration member must be the same member',
+    'reportFormatIncorrect' => 'The format of the report data is incorrect',
+    'memberNumberCanNotContainChineseCharacters' => 'Member number cannot contain Chinese characters',
+    'pleaseSelectTheEntryLevel' => 'Please select the entry level',
+    'totalBVCanNotLessThanSelectedBV' => 'The total BV of self selected goods cannot be less than the BV of the selected entry level',
+    'totalBVCanNotLessThanNextSelectedLevelBV' => 'The total BV of self selected goods cannot exceed the BV value of the next level under the selected level',
+    'incorrectEntryType' => 'Incorrect entry type',
+    'MembershipNumberFilledInitialPurchase' => 'Membership number must be filled in for initial purchase',
+    'fillTheInstructorNumberTheMember' => 'For the first purchase, you must fill in the instructor number of the member',
+    'sponsorNumberMustBeFilled' => 'For the first purchase, the Sponsor number of the member must be filled in',
+    'beFilledTheMarketMember' => 'The first purchase must be filled in the market of the member',
+    'pleaseSelectMarket' => 'Please select a market',
+    'stockistDoesNotExist' => 'Stockist does not exist',
+    'newMemberDoesNotExist' => 'New member does not exist',
+    'brandAmbassadorUpgradeError' => 'Brand Ambassador upgrade error',
+    'changeUserStatusError' => 'change user status error',
+    'dataFormatError' => 'Data format error',
+
+
+
+    # 奖金
+    'memberBonus' => 'Member Bonus',
+    'memberEcoin' => 'Member Ecoin',
+    'carPoints' => 'Car Points',
+    'villaPoints' => 'Villa Points',
+    'increase' => 'increase',
+    'reduce' => 'reduce',
+    'cannotViewThisPeriod' => 'Cannot view this period',
+    'bonusRecordDoesNotExists' => 'The bonus record does not exists of this period',
+    'pleaseSelectThePeriod' => 'Please select the period',
+    'withdrawalApplicationHasBeenSubmitted' => 'Withdrawal application has been submitted, please wait for review.',
+    'withdrawHasBeenBacked' => 'Withdraw has been backed',
+    'withdrawDoesNotAllowedOfAuthentication' => '未实名验证无法提现',
+    'withdrawDoesNotAllowedOfSubsidiaryMember' => '附属会员无法提现',
+    'autoWithdrawHasBeenOpened' => '已开启自动提现,如需手动提现请关闭自动提现',
+    'withdrawNotAllowOfDate' => '未到提现日期,请在每月挂网后第一周申请提现',
+    'withdrawAllowOnceOfMonth' => '提现失败,每月只可以提现一次',
+    'withdrawRecordHasNotVerify' => '提现失败,您存在未审核的提现记录',
+    'notionalPoolingAmountFinished' => '归集完成,归集金额',
+    'withdrawDoesNotUploadInvoice' => '该提现记录无法上传发票',
+    'transferDoesNotAllowedOfAuthentication' => '未实名验证无法转账',
+    'transferDoesNotAllowed' => '不允许转账',
+    'transferDoesNotOpen' => '转账功能未启用',
+    'transferTypeDoesNotExists' => '没有可用的转账类型',
+    'rechargeApplicationHasBeenSubmitted' => 'Recharge application has been submitted, please wait for review.',
+
+    # 设置
+    'autoWithdrawHasBeenClosed' => '开启关闭自动提现成功',
+    'closeMessageSendSuccessfully' => '开启关闭复销短信提醒成功',
+    'changeDefaultAddressFailed' => '更新默认地址失败',
+    'addShippingAddressSuccessfully' => '添加收货地址成功',
+    'updateUserConfigFailed' => '更新个人设置失败',
+    'isAutoWithdraw' => '是否自动提现',
+    'allowReconsumeSms' => '开启复销短信通知',
+    'pleaseAuthentication' => '请先实名认证',
+    'systemCloseAutoWithdraw' => '系统关闭了自动提现',
+    'systemCloseReconsumeSMSNotification' => '系统关闭了开启复销短信通知',
+    'openAutoWithdraw' => '开启关闭自动提现',
+    'updateUserSMSExpiredFailed' => '更新个人短信有效期失败',
+    'modeDoesNotExist' => '不存在此方式',
+
+    # 首页
+    'pcOf' => 'PC of ',
+
+    # 财务
+    'statueError' => 'Status error',
+    'notAllowedToTransferToYourself' => 'Not allowed to transfer to yourself',
+    'wrongTransactionType' => 'Wrong transaction type',
+    'isCanWithdrawBack' => '提现退回已关闭',
+    'withdrawRecordDoesNotExist' => '符合退回的提现记录不存在',
+
+
+    # 登录
+    'refreshTokenFailed' => 'refresh token failed',
+    'passwordChangeSucceeded' => 'Password change succeeded',
+    'accountDoesNotExist' => 'The account does not exist',
+    'memberNameOrPasswordIncorrect' => 'The member name or password is incorrect',
+    'abnormalMemberCode' => 'Abnormal member code',
+    'memberNotActivated' => 'Member not activated',
+    'memberHasBeenCancelled' => 'The member has been cancelled',
+    'memberHasBeenBlacklisted' => 'The member has been blacklisted',
+    'memberHasBeenPermanentlySuspended' => 'The member has been permanently suspended',
+    'memberPartOfFunctionClosed' => 'Member part of the function is closed, unable to log in.',
+    'memberAppDeviceInformationUpdateFailed' => 'Member APP device information update failed',
+
+    # 文章
+    'category' => 'Category',
+    'title' => 'Title',
+    'content' => 'Content',
+    'articleDoesNotExist' => 'The article does not exist',
+
+
+
+
+];

+ 317 - 0
common/messages/zh-CN/ctx.php

@@ -0,0 +1,317 @@
+<?php
+return [
+    # 公用
+    'notConnection' => '长时间未操作',
+    'deleteFailed' => '删除失败',
+    'deleteSuccessfully' => '删除成功',
+    'quickLoginCanNotOperate' => '快速登录的会员无法进行任何操作',
+    'selectAtLeastOne' => '必须选择一条数据',
+    'failed' => '失败',
+    'successfully' => '成功',
+    'createAt' => '创建时间',
+    'updateAt' => '更新时间',
+    'deletedAt' => '删除时间',
+    'status' => '状态',
+    'state' => '状态',
+    'sort' => '排序',
+    'deleted' => '是否删除',
+    'illegalRequest' => '非法请求',
+    'invalidParameter' => '无效参数',
+    'dataDoesNotExists' => '数据不存在',
+
+
+    /**【以下内容为会员端词条,如果管理端有相同词条,移入分割线之上使用即可,翻译完全部项目之后删除以下内容】
+     * 会员端翻译:Yii::t('app', 'addressId')
+     * 管理端翻译:Yii::t('ctx', 'addressId')
+     */
+    # 商城
+    'addressId' => '收货地址',
+    'orderCode' => '订单号',
+    'orderDetail' => '订单详情',
+    'productCode' => '商品编号',
+    'productName' => '商品名字',
+    'productPrice' => '商品价格',
+    'qty' => '数量',
+    'taxRate' => '税率',
+    'totalTax' => '数额总计',
+    'totalAmount' => '总金额',
+    'total' => '总计',
+    'signature' => '签名',
+    'date' => '日期',
+    'accountBalance' => '账户余额',
+    'travelBonus' => '旅游积分',
+    'carFund' => '车奖积分',
+    'villaFund' => '房奖积分',
+    'reconsumeSuccessfully' => '帮会员复消成功',
+    'reconsume' => '帮会员复销',
+    'reconsumeRemark' => '复销备注',
+    'standardProducts' => '普通商品列表',
+    'carFundProducts' => '车奖积分商品',
+    'villaFundProducts' => '房奖积分商品',
+    'travelFundProducts' => '旅游积分商品',
+    'insufficientInventory' => '库存不足',
+    'soldOut' => '已下架',
+    'productsDoesNotExists' => '商品不存在',
+    'cashDoesNotAdequate' => '余额不足,无法购买商品',
+    'exchangePointDoesNotAdequate' => '兑换积分不足,无法购买商品',
+    'travelPointDoesNotAdequate' => '旅游积分不足,无法购买商品',
+    'carFundPointDoesNotAdequate' => '车奖积分不足,无法购买商品',
+    'villaPointDoesNotAdequate' => '房奖积分不足,无法购买商品',
+    'paymentInfoDoesNotExists' => '支付信息不存在',
+    'payAmountNotEqualOrderAmount' => '支付金额与订单金额不符',
+
+
+    'orderSn' => '订单号',
+    'expressCompany' => '快递公司',
+    'orderTrackNo' => '快递单号',
+    'remark' => '备注',
+    'orderType' => '订单类型',
+    'payType' => '支付方式',
+    'productID' => '商品ID',
+    'quantity' => '商品数量',
+    'repeatSalesMemberNo' => '复消会员编号',
+    'consignee' => '收货人',
+    'acceptMobile' => '收货电话',
+    'lgaName' => '地域',
+    'cityName' => '城市',
+    'detailAddress' => '详细地址',
+    'shippingAddress' => '收货地址',
+
+    'orderDoesNotExist' => '订单不存在',
+    'orderHasBeenCancelCanNotDeliver ' => '订单已取消不能发货',
+    'orderHasBeenDeleteCanNotDeliver' => '订单已删除不能发货',
+    'orderPayStatusDoesNotSupportRefund' => '订单状态支付状态不支持退款',
+    'orderLogisticsStatusDoesNotSupportRefund' => '订单物流状态不支持退款',
+    'orderPayTypeDoesNotSupportRefund' => '订单支付方式不支持退款',
+    'paymentPasswordError' => '支付密码不正确',
+    'shippingDoesNotExist' => '收货地址不存在',
+    'payTypeError' => '支付方式错误',
+    'orderCanNotHasMoreClassification' => '订单不能包含多种商品分类',
+    'shopGoodClassificationError' => '商品分类错误',
+    'orderStatusTypeError' => '订单状态类型错误',
+    'orderStatusDoesNotChange' => '订单状态没有改变',
+    'orderHasBeenLogisticsStatusDoesNotChangedUnpaid' => '订单已经进入物流状态不能改为未支付',
+    'orderHasBeenInvalidCanNotProcess' => '订单已失效不能处理',
+    'orderCanNotBeenChangedLogistics' => '订单不能单独处理为物流状态',
+    'orderHasBeenFinishedCanNotCancel' => '订单已完成不能取消',
+    'orderHasBeenDeletedCanNotCancel' => '订单已删除不能取消',
+    'orderHasBeenFinishedCanNotDelete' => '订单已完成不能删除',
+    'flowTypeError' => '流水类型错误',
+    'flowCreateError' => '流水产生错误',
+    'doesNotYourSubMemberCanNotReconsume' => '不是您的伞下会员,不能为其复消',
+    'orderCanNotContainMultipleProductCategories' => '订单不能包含多种商品分类',
+    'dataFormatError' => '数据格式错误',
+
+    # 会员
+    'memberCode' => '会员编号',
+    'memberName' => '会员名字',
+    'memberAddress' => '收货地址',
+    'bankName' => '银行名称',
+    'bankCode' => '银行代码',
+    'admin' => '操作人',
+    'minCharge' => '最低手续费',
+    'maxCharge' => '最高手续费',
+    'chargeRate' => '手续费比例',
+    'updater' => '更新人',
+
+    'userName' => '帐号',
+    'passwordHash' => '登录密码',
+    'payPassword' => '支付密码',
+    'nation' => '民族',
+    'realName' => '姓名',
+    'IDCard' => '身份证号',
+    'IDType' => '证件类型',
+    'mobile' => '手机号',
+    'address' => '身份证地址',
+    'IDImage' => '证件图片',
+    'openBank' => '开户行',
+    'bankAddress' => '银行地址',
+    'bankNo' => '银行卡号',
+    'bankProvince' => '银行省份',
+    'bankCity' => '银行城市',
+    'bankCounty' => '银行县区',
+    'spouseName' => '配偶姓名',
+    'spouseIDCard' => '配偶证件号',
+    'decClosed' => '是否关闭报单功能',
+    'decClosedAt' => '关闭时间',
+    'decLv' => '报单级别',
+    'empLv' => '聘级',
+    'crownLv' => '星级',
+    'province' => '省份',
+    'city' => '城市',
+    'county' => '县区',
+    'tel' => '座机',
+    'subComID' => '子公司ID',
+    'avatar' => '头像',
+    'isDec' => '是否为报单中心',
+    'isAtlas' => '是否显示图谱',
+    'isRecharge' => '是否显示充值',
+    'DEC_ID' => '报单中心ID',
+    'birthday' => '生日',
+    'decRoleID' => '报单中心级别',
+    'periodAt' => '期数',
+    'decProvince' => '报单中心所属的省份',
+    'decCity' => '报单中心所属的城市',
+    'decCounty' => '报单中心所属的县区',
+    'isUnion' => '是否为点位合作',
+    'statusAt' => '状态更改时间',
+    'verified' => '是否认证',
+    'verifiedAt' => '认证时间',
+    'allowLogin' => '允许登录',
+    'notOperating' => '不运作',
+    'regFrom' => '注册类型',
+    'IDCardPrefix' => '身份证前缀',
+    'sex' => '性别',
+    'decAccountOld' => '老系统中的报单中心编号',
+    'bankUpdatedAt' => '银行信息更新时间',
+    'isDirectSeller' => '是否为直销员',
+    'decLvUpdatedAt' => '报单级别更新时间',
+    'decLvUpdatedPeriod' => '报单级别更新期数',
+    'decAddress' => '报单中心详细地址',
+    'decPhone' => '报单中心电话',
+    'guarantor' => '担保人编号',
+    'guarantorName' => '担保人姓名',
+    'partFuncClosed' => '部分功能开启',
+    'lastDecLvUpdatedPeriod' => '上次报单级别更新期数',
+    'userCreator' => '创建人',
+    'userUpdater' => '修改人',
+    'lastDecLvUpdatedAt' => '上次报单级别更新时间',
+    'decCreatedAt' => '成为报单中心时间',
+    'partFuncClosedRemark' => '部分功能关闭原因',
+    'decCreatedPeriod' => '成为报单中心期数',
+    'passwordChanged' => '是否修改过密码',
+    'subComLeader' => '是否为分公司领导',
+    'zgUpgradePv' => '增购升级PV',
+    'appClientID' => 'APP设备ID',
+    'readAgreement' => '已读协议',
+    'lastDecLv' => '上次的报单级别',
+    'bonusAppClientID' => '结算APP设备ID',
+    'isFirstOpen' => '首次开通',
+    'isModifyPassword' => '是否修改密码',
+    'isStudio' => '是否是工作室',
+    'email' => '电子邮箱',
+
+
+
+    'fillingUpOfADeficit' => '补差额',
+    'fullPayment' => '全额',
+
+    'personalDataModifiedSuccessfully' => '个人资料修改成功',
+    'passwordModifiedSuccessfully' => '密码修改成功',
+    'theFunctionIsNotAvailable' => '功能暂未开放',
+    'inactiveUser' => '非激活用户,请联系客服',
+    'checkPerformance' => '请联系客服人员核对业绩',
+    'checkPerformanceOfUpgradedMember' => '请联系客服人员核对升级会员业绩',
+    'memberNumberExpired' => '会员编号过期',
+    'memberNumberDoesNotConformTo' => '会员编号不符合',
+    'failedToGenerateMemberNumber' => '会员编号生成失败',
+    'memberNumberDoesNotExist' => '会员编号不存在',
+    'repeatSalesMemberNoDoesNotExist' => '复消会员编号不存在',
+    'memberDoesNotExist' => '会员不存在',
+    'memberDoesNotInSamePlacementNetwork' => '会员与当前用户不再同一安置网络内',
+    'viewSubMembersMost' => '最多查看会员的前20层子会员',
+    'upgradeMethodIncorrect' => '升级方式不正确,请联系客服人员',
+
+    'originalLoginPasswordError' => '原登录密码错误',
+    'originalPaymentPasswordError' => '原支付密码错误',
+    'userNameNotExists' => '不存在的用户名',
+    'pleaseSelectUpgradeLevel' => '请选择升级级别',
+    'totalPVLessThan' => '总PV不能小于所选级别PV',
+    'totalPvExceedPv' => '总PV不能超过已选级别下一个级别的PV值',
+    'deliveryTemporarilyNotSupported' => '地区暂时不支持配送,具体联系客服',
+    'applicantCashShort' => '报单人现金不足,无法完成报单',
+    'failedToUpgrade' => '为会员升级失败',
+    'bulkDeclarationNotSames' => '批量报单会员必须是同一身份证',
+    'reportFormatIncorrect' => '报单数据格式错误',
+    'memberNumberCanNotContainChineseCharacters' => '会员编号中不能含有汉字',
+    'pleaseSelectTheEntryLevel' => '请选择报单级别',
+    'totalBVCanNotLessThanSelectedBV' => '自选商品总BV不能小于所选报单级别BV',
+    'totalBVCanNotLessThanNextSelectedLevelBV' => '自选商品总BV不能超过已选级别下一个级别的BV值',
+    'incorrectEntryType' => '报单类型错误',
+    'MembershipNumberFilledInitialPurchase' => '首购必须填写加入会员编号',
+    'fillTheInstructorNumberTheMember' => '首购必须填写加入会员的指导老师编号',
+    'sponsorNumberMustBeFilled' => '首购必须填写加入会员的开拓人编号',
+    'beFilledTheMarketMember' => '首购必须填写加入会员的市场',
+    'pleaseSelectMarket' => '请选择市场',
+    'stockistDoesNotExist' => '报单中心不存在',
+    'newMemberDoesNotExist' => '新加入的会员不存在',
+    'membersResellingBalancePayment' => '会员复销余额支付',
+    'membersExchangePointPayment' => '会员复销积分兑换',
+    'brandAmbassadorUpgradeError' => 'BA会员升级错误',
+    'changeUserStatusError' => '修改会员状态错误',
+
+
+    # 奖金
+    'memberBonus' => '会员奖金',
+    'memberEcoin' => '会员余额',
+    'carPoints' => '车奖积分',
+    'villaPoints' => '房奖积分',
+    'increase' => '增加',
+    'reduce' => '减少',
+    'cannotViewThisPeriod' => '该期不能查看',
+    'bonusRecordDoesNotExists' => '当期无奖金记录',
+    'pleaseSelectThePeriod' => '请选择期数',
+    'withdrawalApplicationHasBeenSubmitted' => '提现申请已提交,请等待审核',
+    'withdrawHasBeenBacked' => '提现已退回',
+    'withdrawDoesNotAllowedOfAuthentication' => '未实名验证无法提现',
+    'withdrawDoesNotAllowedOfSubsidiaryMember' => '附属会员无法提现',
+    'autoWithdrawHasBeenOpened' => '已开启自动提现,如需手动提现请关闭自动提现',
+    'withdrawNotAllowOfDate' => '未到提现日期,请在每月挂网后第一周申请提现',
+    'withdrawAllowOnceOfMonth' => '提现失败,每月只可以提现一次',
+    'withdrawRecordHasNotVerify' => '提现失败,您存在未审核的提现记录',
+    'notionalPoolingAmountFinished' => '归集完成,归集金额',
+    'withdrawDoesNotUploadInvoice' => '该提现记录无法上传发票',
+    'transferDoesNotAllowedOfAuthentication' => '未实名验证无法转账',
+    'transferDoesNotAllowed' => '不允许转账',
+    'transferDoesNotOpen' => '转账功能未启用',
+    'transferTypeDoesNotExists' => '没有可用的转账类型',
+    'rechargeApplicationHasBeenSubmitted' => '充值申请已提交,请等待审核',
+
+    # 设置
+    'autoWithdrawHasBeenClosed' => '开启关闭自动提现成功',
+    'closeMessageSendSuccessfully' => '开启关闭复销短信提醒成功',
+    'changeDefaultAddressFailed' => '更新默认地址失败',
+    'addShippingAddressSuccessfully' => '添加收货地址成功',
+    'updateUserConfigFailed' => '更新个人设置失败',
+    'isAutoWithdraw' => '是否自动提现',
+    'allowReconsumeSms' => '开启复销短信通知',
+    'pleaseAuthentication' => '请先实名认证',
+    'systemCloseAutoWithdraw' => '系统关闭了自动提现',
+    'systemCloseReconsumeSMSNotification' => '系统关闭了开启复销短信通知',
+    'openAutoWithdraw' => '开启关闭自动提现',
+    'updateUserSMSExpiredFailed' => '更新个人短信有效期失败',
+    'modeDoesNotExist' => '不存在此方式',
+
+
+    # 首页
+    'pcOf' => 'PC of ',
+
+    # 财务
+    'statueError' => 'Status error',
+    'notAllowedToTransferToYourself' => '不允许向自己转账',
+    'isCanWithdrawBack' => '提现退回已关闭',
+    'withdrawRecordDoesNotExist' => '符合退回的提现记录不存在',
+
+    # 文章
+    'category' => '分类',
+    'title' => '标题',
+    'content' => '内容',
+    'articleDoesNotExist' => '文章不存在',
+
+    # 登录
+    'refreshTokenFailed' => '刷新token失败',
+    'passwordChangeSucceeded' => '密码修改成功',
+    'wrongTransactionType' => '错误的交易类型',
+    'accountDoesNotExist' => '账号不存在',
+    'memberNameOrPasswordIncorrect' => '用户名或密码错误',
+    'abnormalMemberCode' => '会员编号异常',
+    'memberNotActivated' => '会员未激活',
+    'memberHasBeenCancelled' => '会员已被注销',
+    'memberHasBeenBlacklisted' => '会员已被列入黑名单',
+    'memberHasBeenPermanentlySuspended' => '会员已被永久关停',
+    'memberPartOfFunctionClosed' => '会员部分功能关闭,无法登录.',
+    'memberAppDeviceInformationUpdateFailed' => '会员APP设备信息更新失败',
+
+
+
+];

+ 7 - 7
frontendApi/modules/v1/controllers/BaseController.php

@@ -59,6 +59,13 @@ class BaseController extends \yii\rest\ActiveController {
      * @throws \yii\web\BadRequestHttpException
      */
     public function beforeAction($action) {
+        // 动态返回语言:zh:zh-CN | en:en-US
+        if (!Yii::$app->request->isOptions) {
+            $language = Yii::$app->request->headers->get('language') ?? 'en';
+            Yii::$app->language = $language == 'zh' ? 'zh-CN' : 'en-US';
+            Yii::$app->sourceLanguage = $language == 'zh' ? 'en-US' : 'zh-CN';
+        }
+
         if (!\Yii::$app->getUser()->isGuest) {
             $this->forbiddenQuicklyUser();
 
@@ -109,13 +116,6 @@ class BaseController extends \yii\rest\ActiveController {
             }
         }
 
-        // 动态返回语言:zh:zh-CN | en:en-US
-        if (!Yii::$app->request->isOptions) {
-            $language = Yii::$app->request->headers->get('language') ?? 'en';
-            Yii::$app->language = $language == 'zh' ? 'zh-CN' : 'en-US';
-            Yii::$app->sourceLanguage = $language == 'zh' ? 'en-US' : 'zh-CN';
-        }
-
         return parent::beforeAction($action);
     }