瀏覽代碼

国际化 修改奖励

qukaidi 4 年之前
父節點
當前提交
a1d0a13fff
共有 5 個文件被更改,包括 90 次插入127 次删除
  1. 26 1
      common/locales/zh.js
  2. 8 8
      pages/login/index.vue
  3. 22 21
      pages/login/register.vue
  4. 29 96
      pages/me/Reward-details/index.vue
  5. 5 1
      uview-ui/components/u-upload/u-upload.vue

+ 26 - 1
common/locales/zh.js

@@ -6,7 +6,32 @@ export default {
 		no: "还没有账号?",
 		Lan: "切换语言—中文",
 		mobile: "请输入手机号",
-		code: "请输入验证码"
+		code: "请输入验证码",
+		locationtitle: "温馨提示",
+		locationcontent: "为了更好地为您服务,请开启定位权限,请问是否同意?",
+		locationcancelText: "不同意",
+		locationconfirmText: "同意",
+		suclogin:"登录成功",
+		errlogin:"登录失败",
+		repeatcode:"倒计时结束后再发送",
+		telcode:"请输入手机号"
+	},
+	register:{
+		tips:"请按照要求上传您的营业执照和门头照片",
+		uplicense:"请上传营业执照",
+		uppicture:"	请上传门头照片",
+		tips2:"注:请确保系统识别的营业执照名称和法人信息与营业执照上的信息保持一致",
+		nextstep:"下一步",
+		tipstitle:"温馨提示",
+		tipscontent: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
+		tipscancelText: "不同意",
+		tipsconfirmText: "同意",
+		Analyse: "正在识别,请稍等",
+		sucAnalyse: "识别成功",
+		errAnalyse: "识别失败",
+		sucupload:"上传成功",
+		delupload:"移除成功",
+		reloadText:"点击重试1"
 	},
 	//扫码页面
 	scanenter: {

+ 8 - 8
pages/login/index.vue

@@ -121,10 +121,10 @@
 				let result = permision.judgeIosPermission('location')
 				if (!result) {
 					uni.showModal({
-						title: "温馨提示",
-						content: "为了更好地为您服务,请开启定位权限,请问是否同意??",
-						cancelText: "不同意",
-						confirmText: "同意",
+						title: this.$t('login.locationtitle'),
+						content:this.$t('login.locationcontent'),
+						cancelText:this.$t('login.locationcancelText'),
+						confirmText: this.$t('login.locationconfirmText'),
 						success: res => {
 							if (res.confirm) {
 								plus.runtime.openURL("app-settings://");
@@ -171,7 +171,7 @@
 							
 							this.toUser(res.data.data)
 							uni.$emit('login', {
-								msg: '登录成功'
+								msg: this.$t('login.suclogin')
 							})
 
 						} else {
@@ -179,7 +179,7 @@
 						}
 					}).catch(err => {
 						
-						this.$u.toast('登录失败');
+						this.$u.toast(this.$t('login.errlogin'));
 					}).finally(() => {
 						this.loading = false
 					})
@@ -217,10 +217,10 @@
 							this.codeLoading = false
 						})
 					} else {
-						this.$u.toast('倒计时结束后再发送');
+						this.$u.toast(this.$t('login.repeatcode'));
 					}
 				} else {
-					this.$u.toast('请输入手机号');
+					this.$u.toast(this.$t('login.telcode'));
 				}
 
 			},

+ 22 - 21
pages/login/register.vue

@@ -4,39 +4,39 @@
 			<view slot="head">
 				<view class="u-flex">
 					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					请按照要求上传您的营业执照和门头照片
+					{{$t('register.tips')}}
 				</view>
 			</view>
 			<view slot="body">
 				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="licensepicType"
-				 @on-change="getLicensedata" @on-remove="licenseRemove">
+				 @on-change="getLicensedata"  @on-remove="licenseRemove" :show-tips="false" :reloadText="this.$t('register.reloadText')">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
 				</u-upload>
 				<view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0 60rpx 0;">
-					请上传营业执照
+					{{$t('register.uplicense')}}
 				</view>
 				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="storepicType"
-				 @on-change="getStoredata" @on-remove="storeRemove">
+				 @on-change="getStoredata">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
 				</u-upload>
 				<view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0;">
-					请上传门头照片
+					{{$t('register.uppicture')}}
 				</view>
 			</view>
 		</u-card>
 		<view style="color: #787878;margin: 0 40rpx;">
-			注:请确保系统识别的营业执照名称和法人信息与营业执照上的信息保持一致
+			{{$t('register.tips2')}}
 		</view>
 		<view style="margin: 30rpx;">
-			<u-button type="primary" @click="nextStep" v-if="showLicense&&showStore">下一步</u-button>
+			<u-button type="primary" @click="nextStep" v-if="showLicense&&showStore">{{$t('register.nextstep')}}</u-button>
 			<!-- <u-button type="primary" @click="nextStep">下一步</u-button> -->
 		</view>
-		<u-modal v-model="modalShow" :content="storecontent" :show-cancel-button="true" confirm-text="同意" cancel-text="不同意"
-		 @cancel="cancelModal"></u-modal>
+		<u-modal v-model="modalShow" :title="this.$t('register.tipstitle')" :content="storecontent" :show-cancel-button="true"
+		 :confirm-text="this.$t('register.tipsconfirmText')" :cancel-text="this.$t('register.tipscancelText')" @cancel="cancelModal"></u-modal>
 	</view>
 </template>
 
@@ -58,8 +58,8 @@
 				showLicense: false,
 				showStore: false,
 				modalShow: false,
-				storecontent: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
-				Analyse: "正在识别,请稍等",
+				storecontent: this.$t('register.tipscontent'),
+				Analyse: this.$t('register.Analyse'),
 				appStoreBusinessLicenseDto: ''
 			};
 		},
@@ -71,10 +71,10 @@
 			});
 			if (this.SystemInfo.platform == 'ios') {
 				uni.showModal({
-					title: "温馨提示",
-					content: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
-					cancelText: "不同意",
-					confirmText: "同意",
+					title: this.$t('register.tipstitle'),
+					content: this.$t('register.tipscontent'),
+					cancelText: this.$t('register.tipscancelText'),
+					confirmText: this.$t('register.tipsconfirmText'),
 					success: res => {
 						if (res.cancel) {
 							uni.navigateBack({})
@@ -124,7 +124,7 @@
 			},
 			getLicensedata(res, index, lists, name) {
 				if (res.statusCode == 200) {
-					this.$u.toast('上传成功');
+					this.$u.toast(this.$t('register.sucupload'));
 					this.showLicense = true
 					uni.hideLoading();
 					this.licenseUrl = JSON.parse(res.data).data
@@ -136,7 +136,7 @@
 						}
 					}).then(res => {
 						if (res.data.code == 0) {
-							this.$u.toast('识别成功');
+							this.$u.toast(this.$t('register.sucAnalyse'));
 							this.licenseDate = res.data.data.wordsResultQuery
 							this.Analyse = res.data.msg
 						}
@@ -145,14 +145,14 @@
 							this.Analyse = res.data.msg
 						}
 					}).catch(err => {
-						this.$u.toast('识别失败');
-						this.Analyse = "识别失败"
+						this.$u.toast(this.$t('register.errAnalyse'));
+						this.Analyse = this.$t('register.errAnalyse')
 					}).finally(() => {})
 				}
 			},
 			getStoredata(res, index, lists, name) {
 				if (res.statusCode == 200) {
-					this.$u.toast('上传成功');
+					this.$u.toast(this.$t('register.sucupload'));
 					this.storeUrl = JSON.parse(res.data).data
 					this.showStore = true
 				}
@@ -161,8 +161,9 @@
 				uni.navigateBack({})
 			},
 			licenseRemove() {
+				this.$u.toast(this.$t('register.delupload'));
 				this.showLicense = false
-				this.Analyse = "正在识别,请稍等"
+				this.Analyse = this.$t('register.Analyse')
 			},
 			storeRemove() {
 				this.showStore = false

+ 29 - 96
pages/me/Reward-details/index.vue

@@ -7,8 +7,6 @@
 
 		<view class="content">
 			<view style="width: 100%;">
-				<!-- <u-tabs style="width: 350rpx;float: left;margin-top: 0;" :list="list" :is-scroll="false" :current="current" @change="change"
-							 active-color="#fff" inactive-color="#ffffff" bg-color="#ffffff00"></u-tabs> -->
 				<view style="width: 340rpx;height: 80rpx;text-align: center;padding-top: 25rpx;padding-left: 20rpx;float: left;margin-top: 0;margin-left: 30rpx;">
 					<view style="float: left;">
 						<text @tap="$u.throttle(whole, 500)">全部</text>
@@ -32,7 +30,8 @@
 			<!-- <u-select :mask-close-able="false" @cancel="clear" style=" color: #fff;" @confirm="confirm" v-model="showBrand"
 			 value-name="brandId" label-name="brandName" :list="brandList"></u-select> -->
 			 <u-action-sheet :mask-close-able="false" :list="list_a" @click="click" @close="close" v-model="showBrand"></u-action-sheet>
-			<u-calendar :mask-close-able="false" style=" color: #fff;" @click="calendar" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
+			<u-calendar :mask-close-able="false" style=" color: #fff;" @click="calendar" @change="changetime" v-model="showDate" :mode="mode">
+			</u-calendar>
 			<view>
 				<u-search style="width: 320rpx;" placeholder="请输入胎号或规格" v-model="input" :clearabled="true" @change="handleSearch"
 				 :show-action="false" :animation="true"></u-search>
@@ -143,9 +142,12 @@
 						data: {
 							storeId: this.$store.state.storeInfo.storeId,
 							userId: this.$store.state.storeInfo.userId,
-							'searchKey': this.input,
-							'current': this.current1,
-							'size': '10'
+							searchKey: this.input,
+							current: this.current1,
+							size: '10',
+							brandCode: this.label,
+							startTime: this.startTime,
+							endTime: this.endTime
 						}
 					}).then(res => {
 						this.count = res.data.count
@@ -163,24 +165,23 @@
 						
 					})
 					.finally(() => {
-						setTimeout(() => {
-							uni.hideLoading();
-							this.loading = false;
-						}, 1000)
-
+						uni.hideLoading();
+						this.loading = false;
 					})
 			},
 			calendar() {
 			},
 			// 全部事件
 			whole() {
+				this.datalist = []
+				this.label=null
+				this.startTime =null
+				this.endTime =null
 				this.bottoma = true
 				this.bottomb = false
 				this.bottomc = false
 				this.current1 = 1
 				this.data()
-				this.datalist = []
-
 			},
 			// 品牌事件
 			brand() {
@@ -188,8 +189,6 @@
 				this.bottomb = true
 				this.bottoma = false
 				this.bottomc = false
-				this.current1 = 1
-				this.datalist = []
 			},
 			// 时间事件
 			time_s() {
@@ -197,50 +196,17 @@
 				this.bottoma = false
 				this.bottomc = true
 				this.bottomb = false
-				this.current1 = 1
-				this.datalist = []
 			},
 			// 时间选择器获取时间
 			changetime(e) {
-				
-				this.startTime = e.startDate
-				this.endTime = e.endDate
+				this.current1 = 1
+				this.startTime = e.startDate + ' 00:00:00'
+				this.endTime = e.endDate + ' 23:59:59'
 				this.datalist = []
 				uni.showLoading({
 					title: '加载中...'
 				});
-				request({
-						url: '/myPage/getPageScanRewordList',
-						method: 'post',
-						data: {
-							storeId: this.$store.state.storeInfo.storeId,
-							userId: this.$store.state.storeInfo.userId,
-							'current': this.current1,
-							'size': '10',
-							'startTime': this.startTime + ' 00:00:00',
-							'endTime': this.endTime + ' 23:59:59'
-						}
-					}).then(res => {
-						this.datalist = this.datalist.concat(res.data.data)
-						this.count = res.data.count
-						// 判断扫码类型
-						for (var i = 0; i < res.data.data.length; i++) {
-							if (res.data.data[i].getWay == 0) {
-								this.getWay = "车主扫码"
-							} else {
-								this.getWay = "门店扫码"
-							}
-						}
-					}).catch(err => {
-						
-					})
-					.finally(() => {
-						setTimeout(() => {
-							uni.hideLoading();
-							this.loading = false;
-						}, 1000)
-
-					})
+				this.data()
 			},
 			// 获取品牌列表
 			getBrandList() {
@@ -274,47 +240,16 @@
 			},
 			// 搜索框
 			handleSearch(e) {
-				this.data()
 				this.datalist = []
+				this.current1=1
+				this.data()
 			},
 			// 点击获取品牌
 			click(e) {
+				this.datalist = []
+				
 				this.label = this.list_a[e].text
-				uni.showLoading({
-					title: '加载中...'
-				});
-				request({
-						url: '/myPage/getPageScanRewordList',
-						method: 'post',
-						data: {
-							storeId: this.$store.state.storeInfo.storeId,
-							userId: this.$store.state.storeInfo.userId,
-							'current': this.current1,
-							'size': '10',
-							'brandCode': this.label
-						}
-					}).then(res => {
-						this.count = res.data.count
-						this.datalength = res.data.data.length
-						this.datalist = this.datalist.concat(res.data.data)
-						// 判断扫码类型
-						for (var i = 0; i < res.data.data.length; i++) {
-							if (res.data.data[i].getWay == 0) {
-								this.getWay = "车主扫码"
-							} else {
-								this.getWay = "门店扫码"
-							}
-						}
-					}).catch(err => {
-						
-					})
-					.finally(() => {
-						setTimeout(() => {
-							uni.hideLoading();
-							this.loading = false;
-						}, 1000)
-
-					})
+				this.data()
 			},
 			// 点击取消按钮
 
@@ -337,15 +272,13 @@
 			}
 		},
 		onReachBottom() {
+			this.current1++
 			this.status = 'loading';
-			setTimeout(() => {
-				if (this.datalist.length >= this.count) {
-					this.status = 'nomore';
-				} else {
-					this.current1 = ++this.current1;
-					this.data()
-				}
-			}, 1000)
+			if (this.datalist.length >= this.count) {
+				this.status = 'nomore';
+			} else {
+				this.data()
+			}
 		}
 	}
 </script>

+ 5 - 1
uview-ui/components/u-upload/u-upload.vue

@@ -27,7 +27,7 @@
 				class="u-progress"
 				:percent="item.progress"
 			></u-line-progress>
-			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
+			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">{{reloadText}}</view>
 			<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
 		</view>
 		<slot name="file" :file="lists"></slot>
@@ -253,6 +253,10 @@ export default {
 		index: {
 			type: [Number, String],
 			default: ''
+		},
+		reloadText:{
+			type: String,
+			default: '点击重试'
 		}
 	},
 	mounted() {},