Просмотр исходного кода

配置修改、充值上传修改

kevin_zhangl 3 лет назад
Родитель
Сommit
274e5c3dd7
4 измененных файлов с 15 добавлено и 16 удалено
  1. 1 1
      .env.development
  2. 2 2
      .env.production
  3. 2 3
      .env.staging
  4. 10 10
      src/views/finance/recharge-list.vue

+ 1 - 1
.env.development

@@ -3,7 +3,7 @@ ENV = 'development'
 
 # base api
 VUE_APP_BASE_API = 'http://local.ng.frontend.api.com'
-VUE_APP_CDN_API = 'http://16.163.228.151:8036'
+VUE_APP_CDN_API = 'http://16.163.228.151:8041'
 VUE_APP_BASE_WEBSITE = 'http://local.ng.frontend.ele.com:8080'
 VUE_APP_BASE_PAY_STACK_PUBLIC_KEY = 'pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
 VUE_APP_ACCESS_TOKEN_PREFIX = 'Bearer '

+ 2 - 2
.env.production

@@ -2,8 +2,8 @@
 ENV = 'production'
 
 # base api
-VUE_APP_BASE_API = '/prod-api'
-VUE_APP_CDN_API = '/prod-cdn'
+VUE_APP_BASE_API = 'https://ng-frontend-api.elken.com'
+VUE_APP_CDN_API = 'http://ng-upload.elken.com'
 VUE_APP_BASE_WEBSITE = 'https://ngds.elken.com'
 VUE_APP_BASE_PAY_STACK_PUBLIC_KEY = 'pk_live_fae524f9d073d877beeb661fd825a37a9bc91f0a'
 ACCESS_TOKEN_PREFIX = 'Bearer '

+ 2 - 3
.env.staging

@@ -4,9 +4,8 @@ NODE_ENV = production
 ENV = 'staging'
 
 # base api
-# VUE_APP_BASE_API = '/stage-api'
-VUE_APP_BASE_API = 'http://16.163.228.151:8022'
-VUE_APP_CDN_API = 'http://16.163.228.151:8036'
+VUE_APP_BASE_API = 'http://16.163.228.151:8039'
+VUE_APP_CDN_API = 'http://16.163.228.151:8041'
 VUE_APP_BASE_WEBSITE = 'http://16.163.228.151:8035'
 VUE_APP_BASE_PAY_STACK_PUBLIC_KEY = 'pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
 VUE_APP_ACCESS_TOKEN_PREFIX = 'Bearer '

+ 10 - 10
src/views/finance/recharge-list.vue

@@ -220,6 +220,8 @@ export default {
 		},
 		uploadAgain(id) {
 			this.viewVoucher = false
+			this.auditId = id
+			this.uploadUrl = `${process.env.VUE_APP_BASE_API}/v1/finance/prove-add?id=${this.auditId}`
 			this.uploadVoucher = true
 		},
 		handleUpload(id) {
@@ -227,29 +229,27 @@ export default {
 				this.auditId = id
 				this.uploadUrl = `${process.env.VUE_APP_BASE_API}/v1/finance/prove-add?id=${this.auditId}`
 				this.uploadVoucher = true
-
-				this.listLoading = false
 			}, 0.5 * 1000)
 		},
-		uploaderHandleBefore() {
+		async uploaderHandleBefore() {
 			this.$message({
 				message: this.$t('common.uploadHints'),
 				type: 'warning',
 				duration: 500,
 			})
-			this.uploaderLoading = true
 
-			fetchToken().then(response => {
+			await fetchToken().then(response => {
 				this.uploaderHeaders.Authorization = process.env.VUE_APP_ACCESS_TOKEN_PREFIX + response.data
 				this.uploaderData.uploadToken = response.data
-
-				setTimeout(() => {
-					this.listLoading = false
-				}, 3 * 1000)
 			})
 		},
 		handleSuccess(res, file) {
-			this.imageUrl = URL.createObjectURL(file.raw);
+			this.imageUrl = URL.createObjectURL(file.raw)
+
+			setTimeout(() => {
+				this.uploadVoucher = false
+				this.getList()
+			}, 2 * 1000)
 		},
 		beforeUpload(file) {
 			const typeAllowed = ['image/jpeg', 'image/jpg', 'image/png']