Pārlūkot izejas kodu

修改用户接口增加参数确保正确调用

liuyiran 1 nedēļu atpakaļ
vecāks
revīzija
cfd5a59590
5 mainītis faili ar 27 papildinājumiem un 19 dzēšanām
  1. 0 1
      App.vue
  2. 0 1
      api/login.js
  3. 6 0
      api/system/user.js
  4. 1 1
      config.js
  5. 20 16
      pages/index.vue

+ 0 - 1
App.vue

@@ -15,7 +15,6 @@
 			handleMessage(data) {
 				uni.showToast({
 					title: '加载中',
-					
 				})
 			},
       // 初始化应用

+ 0 - 1
api/login.js

@@ -60,7 +60,6 @@ export function getCodeImg() {
     'url': '/captchaImage',
     headers: {
       isToken: false,
-			// isClientId:true,
     },
     method: 'get',
     timeout: 20000

+ 6 - 0
api/system/user.js

@@ -9,6 +9,9 @@ export function updateUserPwd(oldPassword, newPassword) {
   }
   return request({
     url: '/system/user/profile/updatePwd',
+		headers: {
+			isClientId:true,
+		},
     method: 'put',
     data: data
   })
@@ -29,6 +32,9 @@ export function getUserProfile() {
 export function updateUserProfile(data) {
   return request({
     url: '/system/user/profile',
+		headers: {
+			isClientId:true,
+		},
     method: 'put',
     data: data
   })

+ 1 - 1
config.js

@@ -2,7 +2,7 @@
 module.exports = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
   // baseUrl: 'http://localhost:8080',
-	baseUrl:"http://192.168.149.19:8848/api",
+	baseUrl:"http://192.168.114.19:8848/api",
   // 应用信息
   appInfo: {
     // 应用名称

+ 20 - 16
pages/index.vue

@@ -2,15 +2,15 @@
 	<view class="content">
 		<view class="uni-margin-wrap">
 			<swiper class="swiper" circular :indicator-dots="true" indicator-color="#DE868F" indicator-active-color="#fff"
-				:autoplay="true" :interval="1000" :duration="500">
+				:autoplay="true" :interval="5000" :duration="1000">
 				<swiper-item>
-					<view class="swiper-item">功能介绍1</view>
+					<view class="swiper-item"><text>创建步骤1<br>填写视频名称</text></view>
 				</swiper-item>
 				<swiper-item>
-					<view class="swiper-item">功能介绍2</view>
+					<view class="swiper-item">创建步骤2<br>选择个人形象照片,最好是正面照</view>
 				</swiper-item>
 				<swiper-item>
-					<view class="swiper-item">功能介绍3</view>
+					<view class="swiper-item">创建步骤3<br>选择生成视频内容的方式:<br>若选择文字输入,则输入口播的文字内容及使用音色;<br>若选择语音录入则点击开始录音,录音结束后再点击停止录音,可在下方播放容器试听录音内容;<br>若选择音频选择,则选择本机的音频文件</view>
 				</swiper-item>
 			</swiper>
 		</view>
@@ -143,11 +143,20 @@
 			}
 		},
 		methods: {
+			// 选择音频文件
 			chooseFile() {
+				if(!this.imagePath) {
+					uni.showToast({
+						title: '请先选择形象照片',
+						icon: 'none'
+					});
+					return
+				}
 				uni.navigateTo({
 					url: "/pages/root-filelist/root-filelist",
 				});
 			},
+			// 选择图片文件
 			async chooseImage() {
 				const that = this;
 				uni.chooseImage({
@@ -166,15 +175,7 @@
 					}
 				});
 			},
-			radioChange(evt) {
-				for (let i = 0; i < this.videoContent.length; i++) {
-					if (this.videoContent[i].value === evt.detail.value) {
-						this.current = i;
-						break;
-					}
-				}
-			},
-
+			// 开始/停止录音
 			toggleRecording() {
 				if (this.isRecording) {
 					this.recorderManager.stop();
@@ -195,6 +196,7 @@
 					this.isRecording = true;
 				}
 			},
+			// 上传形象照片
 			uploadImagePath() {
 				let data = {
 					file: this.imagePath
@@ -203,6 +205,7 @@
 					this.personPath = response.data.url
 				})
 			},
+			// 上传音频文件
 			uploadAudioPath(url) {
 				let data = {
 					file: url
@@ -211,6 +214,7 @@
 					this.personAudio = response.data.url
 				})
 			},
+			// 点击生成视频,跳转生成页面
 			jumpToList() {
 				let missingFields = [];
 				if (!this.videoName.trim()) {
@@ -277,16 +281,16 @@
 	}
 
 	.swiper {
-		height: 300rpx;
+		height: 350rpx;
 	}
 
 	.swiper-item {
 		display: block;
-		height: 300rpx;
-		line-height: 300rpx;
+		height: 350rpx;
 		text-align: center;
 		background-color: #BD3124;
 		color: #fff;
+		padding-top:30px;
 	}
 
 	.form-area {