李万涛 2 роки тому
батько
коміт
f6c3320296

+ 1 - 1
common/config.js

xqd
@@ -1,3 +1,3 @@
 module.exports = {
-	baseUrl: 'https://t20.9026.com/api/'
+	baseUrl: 'https://www.ai5566.top/api/common/upload'
 }

+ 3 - 1
pages/user/commission/withdraw.vue

xqd xqd xqd
@@ -237,6 +237,7 @@
 </template>
 
 <script>
+	import uploadUrl from '@/common/config.js'
 	import {
 		mapState,
 		mapActions,
@@ -265,6 +266,7 @@
 
 		data() {
 			return {
+				upUrl: uploadUrl.baseUrl,
 				// isLoading:true,
 				isLoading: false,
 				tobheight: 45,
@@ -681,7 +683,7 @@
 						const tempFilePaths = res.tempFilePaths;
 						//上传服务器将服务器;
 						uni.uploadFile({
-							url: 'http://t20.9026.com/api/common/upload',
+							url: that.upUrl,
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {

+ 1 - 1
pages/user/signin.vue

xqd
@@ -151,7 +151,7 @@
 	const isWechat = () => {
 		return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
 	}
-
+	// import uploadUrl from '@/common/config.js'
 	export default {
 		components: {
 			TnuiWxUserInfo,

+ 3 - 2
pages/user/userinfo.vue

xqd xqd xqd
@@ -51,6 +51,7 @@
 </template>
 
 <script>
+	import uploadUrl from '@/common/config.js'
 	import {
 		mapMutations,
 		mapActions,
@@ -76,7 +77,7 @@
 		data() {
 			return {
 				// userInfo: {},
-
+				upUrl: uploadUrl.baseUrl,
 
 				avatar: '',
 				nickname: '默认用户',
@@ -303,7 +304,7 @@
 						const tempFilePaths = res.tempFilePaths;
 						//上传服务器将服务器;
 						uni.uploadFile({
-							url: 'http://t20.9026.com/api/common/upload',
+							url: that.upUrl,
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {

+ 5 - 6
pages/user/work/uploadTicket/index.vue

xqd xqd xqd xqd
@@ -54,8 +54,7 @@
 			<view class="chooscontainer" style="margin-left: 15rpx;">
 				<xfx-image-upload mediaType="video" :max="6" :chooseNum="6" v-model="video_url"
 					@uploadSuccess="ceshiUploadSuccess" @chooseSuccess="chooseMobile" @uploadFail="errorUpload"
-					@imgDelete="delMobile" name="file"
-					action="http://t20.9026.com/api/common/upload"></xfx-image-upload>
+					@imgDelete="delMobile" name="file" :action="upUrl"></xfx-image-upload>
 			</view>
 			<view class="line">
 				<view class="lineCon">
@@ -94,10 +93,12 @@
 	import {
 		postTicket
 	} from '@/api/tusk/index.js'
+	import uploadUrl from '@/common/config.js'
 	export default {
 		components: {},
 		data() {
 			return {
+				upUrl: uploadUrl.baseUrl,
 				pdfFileName: '',
 
 				tobheight: 45,
@@ -239,8 +240,7 @@
 						// console.log(res.tempFiles[0].name);
 
 						uni.uploadFile({
-							url: `http://t20.9026.com/api/` +
-								'common/upload', //仅为示例,非真实的接口地址
+							url: that.upUrl, //仅为示例,非真实的接口地址
 							filePath: res.tempFilePaths[0],
 							name: 'file',
 							formData: {
@@ -279,8 +279,7 @@
 							imgList.forEach(async (item, index) => {
 								uni.uploadFile({
 									//后端接口地址
-									url: `http://t20.9026.com/api/` +
-										'common/upload',
+									url: _this.upUrl,
 									filePath: imgList[index],
 									name: 'file',
 									//上传文件类型