index1.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <view class="container">
  3. <tn-nav-bar :isBack="true" backgroundColor="#fff" :bottomShadow="false">数字人创建</tn-nav-bar>
  4. <view class="pos">
  5. </view>
  6. <view class="context">
  7. <view class="top" @click="show4=true">
  8. <view class="videoBox1" v-if="bgItem.scale==1&&selBgPic">
  9. <view class="img16" style="background-size: 100% 100%;background-repeat:no-repeat;"
  10. :style="{background:'url('+selBgPic+')',backgroundSize:selBgPic?'100% 100%':'100% 100%'}">
  11. <image class="role" :src="selRoleItem.url" mode=""></image>
  12. </view>
  13. </view>
  14. <view class="videoBox2" v-if="bgItem.scale==2&&selBgPic" :style="{}">
  15. <view class="img16" style="background-size: 100% 100%;background-repeat:no-repeat;"
  16. :style="{background:'url('+selBgPic+') ',backgroundSize:'100% 100%'}">
  17. <image class="role" :src="selRoleItem.url" mode=""></image>
  18. </view>
  19. </view>
  20. <view class="videoBox" v-if="!bgItem.scale&&!selBgPic" :style="{minHeight:!selBgPic?'465rpx':''}">
  21. <view class="emptyVideo" style="background: #ccc;height: 100%;"></view>
  22. </view>
  23. </view>
  24. <view class="selCon">
  25. <view class="item" @click="show=true" v-if="!audioUrl">
  26. <view class="label">
  27. 语速:
  28. </view>
  29. <view class="con">
  30. {{roundRate}}X
  31. </view>
  32. </view>
  33. <view class="item" @click="show1=true" v-if="!audioUrl">
  34. <view class="label">
  35. 声音:{{selVoiceItem.name}}
  36. </view>
  37. <image class="conImg" :src="selVoiceItem.url">
  38. </image>
  39. </view>
  40. <view class="item" @click="show3=true">
  41. <view class="label">
  42. 角色:{{selRoleItem.name}}
  43. </view>
  44. <image class="conImg" :src="selRoleItem.url">
  45. </image>
  46. </view>
  47. </view>
  48. <view class="centerMenuBar">
  49. <view class="barItem" v-for="(item,index) in menuList" @click="handleSetBox(item)">
  50. <view class="left" style="display: flex;justify-content: flex-end;align-items: center;">
  51. <!-- <text class="iconfont " :class="[item.icon]" style="color: #26b3a0;font-weight: 600;"></text> -->
  52. <image :src="item.icon" mode=""></image>
  53. </view>
  54. <view class="right">
  55. {{item.name}}
  56. </view>
  57. </view>
  58. </view>
  59. <view class="robotNameBox">
  60. <!-- <view class="name">
  61. 播报标题:
  62. </view> -->
  63. <uni-easyinput :inputBorder="true" :clearable="false" v-model="robotName"
  64. placeholder="请输入播报标题"></uni-easyinput>
  65. </view>
  66. <u--textarea height="" :disabled="audioUrl?true:false" border="none" :autoHeight="true" maxlength="9999"
  67. v-model="textAreaValue" placeholder="请输入播报内容"></u--textarea>
  68. <button @click="uploadVideo">上传录音文件</button>
  69. <view class="audioList" v-if="audioUrl">
  70. <view class="">
  71. 已上传的音频:
  72. </view>
  73. <view class="audioListBox">
  74. <view class="con">
  75. {{audioUrl}}
  76. </view>
  77. <text @click="audioUrl=''" class="iconfont icon-shanchu rightIcon"
  78. :style="{fontSize:isPc?'64rpx':'32rpx'}"></text>
  79. </view>
  80. </view>
  81. <view class="btnBox">
  82. <view class="btn draft" @click="saveDraft">
  83. 存草稿
  84. </view>
  85. <view class="btn" @click="genRobot" style="background: linear-gradient(to right,#06C68E,#02BCCD);">
  86. 合成
  87. </view>
  88. </view>
  89. </view>
  90. <u-picker :showIcon="true" :show="showMoreMenu" :columns="columns" title="更多" confirmColor=""
  91. @cancel="showMoreMenu=false" @confirm="handleConfirm"></u-picker>
  92. <u-popup :show="show" @close="close" @open="open">
  93. <view class="contentBox">
  94. <view class="toolBar">
  95. <view class="cancel" @click="show=false">
  96. <image src="/static/images/closeBtn.png" mode=""></image>
  97. </view>
  98. <view class="center">
  99. 全局语速
  100. </view>
  101. <view class="confirm" @click="handleBtnConfirm">
  102. <image src="/static/images/selected.png" mode=""></image>
  103. </view>
  104. </view>
  105. <view class="content" style="min-height: 300rpx;">
  106. <u-slider height="50" min="0.7" max="1.3" step="0.1" class="slider" :showValue='false'
  107. @change="handleChange" activeColor="#26b3a0" v-model="voiceRate"></u-slider>
  108. <view class="sliderValue">
  109. {{roundRate}}X
  110. </view>
  111. </view>
  112. </view>
  113. </u-popup>
  114. <!-- 声音 -->
  115. <u-popup :show="show1" @close="close1" @open="open">
  116. <view class="contentBox">
  117. <view class="toolBar">
  118. <view class="cancel" @click="show1=false">
  119. <image src="/static/images/closeBtn.png" mode=""></image>
  120. </view>
  121. <view class="center">
  122. 声音
  123. </view>
  124. <view class="confirm" @click="handleBtnConfirm1">
  125. <image src="/static/images/selected.png" mode=""></image>
  126. </view>
  127. </view>
  128. <view class="content">
  129. <!-- <view class="filterBox">
  130. <view class="tabList">
  131. <view class="item1" v-for="(item,index) in voiceList"
  132. :class="[currTabIndex==index?'tabActive':'']" @click="currTabIndex=index">
  133. {{item}}
  134. </view>
  135. </view>
  136. <view class="filterBtn" @click="handleFilter">
  137. <text class="iconfont icon-shaixuanguolv" style="font-size: 44rpx; color: #26b3a0;"></text>
  138. </view>
  139. </view> -->
  140. <view class="filterConList" style="max-height: 500rpx;min-height: 500rpx;overflow-y: scroll;">
  141. <view class="item" v-for="(item,index) in allList" @click="handleVoiceSel(item,index)">
  142. <view class="imgBox">
  143. <image :class="[currTabIndexAll==index?'sel':'']" :src="item.url" mode="">
  144. </view>
  145. </image>
  146. <view class="nameDes">
  147. {{item.title}}
  148. </view>
  149. <view class="name" :class="[currTabIndexAll==index?'selTxt':'']">
  150. {{item.name}}
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </u-popup>
  157. <!-- 模型 -->
  158. <u-popup :show="show3" @close="close3" @open="open">
  159. <view class="contentBox2">
  160. <view class="toolBar">
  161. <view class="cancel" @click="show3=false">
  162. <image src="/static/images/closeBtn.png" mode=""></image>
  163. </view>
  164. <view class="center">
  165. 角色
  166. </view>
  167. <view class="confirm" @click="handleBtnConfirm2">
  168. <image src="/static/images/selected.png" mode=""></image>
  169. </view>
  170. </view>
  171. <view class="content">
  172. <view class="filterConList">
  173. <view class="item" v-for="(item,index) in roleList" @click="handleRoleSel(item,index)">
  174. <image :class="[currTabIndexModal==index?'sel':'']" :src="item.url" mode="">
  175. </image>
  176. <view class="name" :class="[currTabIndexModal==index?'selTxt':'']">
  177. {{item.name}}
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. </u-popup>
  184. <!-- 背景 -->
  185. <u-popup :show="show4" @close="close4" @open="open">
  186. <view class="contentBox2">
  187. <view class="toolBar">
  188. <view class="cancel" @click="show4=false">
  189. <image src="/static/images/closeBtn.png" mode=""></image>
  190. </view>
  191. <view class="center">
  192. 背景
  193. </view>
  194. <view class="confirm" @click="handleBtnConfirm3">
  195. <image src="/static/images/selected.png" mode=""></image>
  196. </view>
  197. </view>
  198. <view class="content">
  199. <!-- <view class="filterBox">
  200. <view class="tabList">
  201. <view class="item1" style="padding-left: 40rpx;padding-right: 40rpx;"
  202. v-for="(item,index) in bgList" :class="[currTabIndex2==index?'tabActive':'']"
  203. @click="currTabIndex2=index">
  204. {{item}}
  205. </view>
  206. </view>
  207. </view> -->
  208. <view class="filterConList2" style="max-height: 500rpx;min-height: 500rpx;overflow-y: scroll;">
  209. <view class="pictureBox" v-if="currTabIndex2==0">
  210. <image :class="[currTabIndexBg==index?'sel':'']" :src="item.url" mode=""
  211. v-for="(item,index) in bgPicList" @click="handleSelBg(item,index)"></image>
  212. </view>
  213. <view class="pictureBox" v-if="currTabIndex2==1">
  214. <view class="color" :style="{background:item}" :class="[currTabIndexBgc==index?'sel':'']"
  215. v-for="(item,index) in bgColorList" @click="currTabIndexBgc=index"></view>
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. </u-popup>
  221. <!-- 声音筛选弹框 -->
  222. <u-popup :show="show2" @close="close" @open="open">
  223. <view class="contentBox">
  224. <view class="toolBar2">
  225. <view class="closeBtn" @click="show2=false">
  226. <!-- <image src="/static/images/selected.png" mode=""></image> -->
  227. X
  228. </view>
  229. </view>
  230. <view class="content">
  231. <!-- 场景 -->
  232. <view class="scenList">
  233. <view class="item " v-for="(item, index) in scenList"
  234. :class="[currScenIndex==index?'active':'']" @click="currScenIndex=index">
  235. {{item}}
  236. </view>
  237. </view>
  238. <!-- 性别-->
  239. <view class="sexList">
  240. <view class="item " v-for="(item, index) in sexList" :class="[currSexIndex==index?'active':'']"
  241. @click="currSexIndex=index">
  242. {{item}}
  243. </view>
  244. </view>
  245. <!-- 年龄-->
  246. <view class="ageList">
  247. <view class="item " v-for="(item, index) in ageList" :class="[currAgeIndex==index?'active':'']"
  248. @click="currAgeIndex=index">
  249. {{item}}
  250. </view>
  251. </view>
  252. <view class="filterBtn2" @click="filter">
  253. 确认
  254. </view>
  255. </view>
  256. </view>
  257. </u-popup>
  258. <!-- 备用-视频尺寸 -->
  259. <u-popup :show="show5" @close="close" @open="open">
  260. <view class="contentBox">
  261. <!-- <view class="toolBar2">
  262. <view class="closeBtn" @click="show5=false">
  263. X
  264. </view>
  265. </view> -->
  266. <view class="toolBar toolBar2">
  267. <view class="cancel">
  268. </view>
  269. <view class="center">
  270. 视频尺寸
  271. </view>
  272. <view class="confirm" @click="handleBtnConfirm2">
  273. <!-- <image src="/static/images/selected.png" mode=""></image> -->
  274. <view class="closeBtn" @click="show5=false">
  275. X
  276. </view>
  277. </view>
  278. </view>
  279. <view class="content">
  280. <view class="videoRatioBox">
  281. <view class="item">
  282. <view class="top">
  283. 竖版视频
  284. </view>
  285. <view class="bottom">
  286. 9:16
  287. </view>
  288. </view>
  289. <view class="item">
  290. <view class="top">
  291. 横版视频
  292. </view>
  293. <view class="bottom">
  294. 16:9
  295. </view>
  296. </view>
  297. </view>
  298. <view class="filterBtn2" @click="show5=false">
  299. 确认
  300. </view>
  301. </view>
  302. </view>
  303. </u-popup>
  304. <!-- <wike-tabbar :onTabbar="true" :isShowAnimate="true"></wike-tabbar> -->
  305. </view>
  306. </view>
  307. </template>
  308. <script>
  309. import {
  310. generateWork,
  311. roleList,
  312. voiceList,
  313. backList
  314. } from '@/api/robot/index.js'
  315. import indexVue from './index.vue';
  316. import
  317. uploadImgUrl
  318. from '@/common/config.js';
  319. export default {
  320. data() {
  321. return {
  322. audioUrl: '',
  323. bgItem: {
  324. },
  325. show5: false,
  326. show4: false,
  327. bgList: ['图片', '颜色'],
  328. currTabIndex2: 0,
  329. currTabIndexBg: -1,
  330. currTabIndexBgc: -1,
  331. bgPicList: [],
  332. bgColorList: ['red', 'green', 'blue', 'orange', 'green', 'blue', 'orange'],
  333. show3: false,
  334. viewList: ['2D', '3D'],
  335. currTabIndex1: 0,
  336. currTabIndexModal: -1,
  337. modalList: [{
  338. img: '',
  339. name: '模型名称'
  340. },
  341. {
  342. img: '',
  343. name: '模型名称'
  344. },
  345. {
  346. img: '',
  347. name: '模型名称'
  348. },
  349. {
  350. img: '',
  351. name: '模型名称'
  352. },
  353. {
  354. img: '',
  355. name: '模型名称'
  356. },
  357. {
  358. img: '',
  359. name: '模型名称'
  360. },
  361. {
  362. img: '',
  363. name: '模型名称'
  364. },
  365. ],
  366. show2: false,
  367. currTabIndexAll: -1,
  368. scenList: ['全部场景', '热门', '新闻咨询', '影视咨询', '热门', '新闻咨询', '影视咨询'],
  369. currScenIndex: 0,
  370. sexList: ['全部性别', '男声', '女声'],
  371. currSexIndex: 0,
  372. ageList: ['全部年龄', '儿童', '少年', '青年', '中年', '老年'],
  373. currAgeIndex: 0,
  374. allList: [],
  375. // voiceList: ['全部', '热门', '新闻咨询', '影视综艺', '其他'],
  376. show1: false,
  377. currTabIndex: 0,
  378. robotName: '',
  379. textAreaValue: '',
  380. voiceRate: 1,
  381. selRoleId: -1,
  382. selVoiceId: -1,
  383. selBgId: -1,
  384. selBgPic: '',
  385. roleList: [],
  386. value: 1,
  387. show: false,
  388. menuList: [{
  389. icon: require('@/static/images/yusu.png'),
  390. name: '全局语速'
  391. },
  392. {
  393. icon: require('@/static/images/audio.png'),
  394. name: '声音'
  395. },
  396. {
  397. icon: require('@/static/images/bg.png'),
  398. name: '背景'
  399. },
  400. {
  401. icon: require('@/static/images/role.png'),
  402. name: '角色'
  403. },
  404. ],
  405. videoSrc: '',
  406. showMoreMenu: false,
  407. columns: [
  408. []
  409. ],
  410. selVoiceItem: {
  411. name: '',
  412. url: ''
  413. },
  414. selRoleItem: {
  415. name: '',
  416. url: ''
  417. },
  418. detail: {},
  419. roundRate: 1,
  420. isGenerate: false,
  421. isCreate: false
  422. };
  423. },
  424. computed: {
  425. },
  426. onReady() {
  427. },
  428. onUnload() {
  429. },
  430. onLoad(o) {
  431. if (o.type == 'create') {
  432. this.isCreate = true
  433. this.selRoleId = 5
  434. this.selBgId = 0
  435. this.selVoiceId = 9
  436. this.roundRate = 1
  437. this.voiceRate = 1
  438. return
  439. console.log('create')
  440. }
  441. this.detail = getApp().draftDetail
  442. this.robotName = getApp().draftDetail.name
  443. this.textAreaValue = getApp().draftDetail.content
  444. this.selRoleId = getApp().draftDetail.role - 1
  445. this.selBgId = getApp().draftDetail.back - 1
  446. this.selVoiceId = getApp().draftDetail.audio - 1
  447. this.voiceRate = getApp().draftDetail.stage
  448. this.selBgPic = getApp().draftDetail.backs.url
  449. this.bgItem = getApp().draftDetail.backs
  450. this.roundRate = getApp().draftDetail.stage
  451. this.selVoiceItem = getApp().draftDetail.audios
  452. this.selRoleItem = getApp().draftDetail.roles
  453. this.audioUrl = getApp().draftDetail.audio_url
  454. console.log('传过来的草稿项:', this.detail);
  455. },
  456. async onShow() {
  457. let res = await roleList({})
  458. if (res.code == 0) {
  459. this.roleList = res.msg
  460. console.log('数字人角色列表返回值:', res);
  461. this.currTabIndexModal = res.msg.findIndex((item, index) => {
  462. return item.id == this.selRoleId + 1
  463. })
  464. if (this.isCreate) {
  465. this.selRoleItem = this.roleList[5]
  466. }
  467. } else {
  468. uni.showToast({
  469. title: res.msg,
  470. icon: 'none'
  471. })
  472. }
  473. let res1 = await voiceList({})
  474. if (res1.code == 0) {
  475. // this.roleList = res.data
  476. this.allList = res1.msg
  477. console.log('数字人声音列表返回值:', res1);
  478. this.currTabIndexAll = res1.msg.findIndex((item, index) => {
  479. return item.id == this.selVoiceId + 1
  480. })
  481. if (this.isCreate) {
  482. this.selVoiceItem = this.allList[9]
  483. }
  484. } else {
  485. uni.showToast({
  486. title: res1.msg,
  487. icon: 'none'
  488. })
  489. }
  490. let res3 = await backList({})
  491. if (res3.code == 0) {
  492. // this.roleList = res.data
  493. this.bgPicList = res3.msg
  494. console.log('数字人背景列表返回值:', res3);
  495. this.currTabIndexBg = res3.msg.findIndex((item, index) => {
  496. return item.id == this.selBgId + 1
  497. })
  498. if (this.isCreate) {
  499. this.selBgPic = this.bgPicList[0].url
  500. this.bgItem = this.bgPicList[0]
  501. }
  502. console.log('index3', this.currTabIndexBgc);
  503. } else {
  504. uni.showToast({
  505. title: res3.msg,
  506. icon: 'none'
  507. })
  508. }
  509. },
  510. onShareAppMessage: function(res) {
  511. },
  512. methods: {
  513. uploadVideo() {
  514. let _this = this
  515. uni.chooseFile({
  516. count: 1, //默认100
  517. extension: ['.mp3'],
  518. success: function(res) {
  519. let tempFilePaths = res.tempFilePaths;
  520. uni.showLoading({
  521. title: "上传中...",
  522. });
  523. uni.uploadFile({
  524. url: uploadImgUrl.baseImgUrl,
  525. filePath: tempFilePaths[0],
  526. // filePath: JSON.stringify(res.tempFilePaths),
  527. name: 'file',
  528. fileType: "audio",
  529. formData: {
  530. accept: 'audio',
  531. upload_type: 'ali-oss'
  532. },
  533. success: (uploadFileRes) => {
  534. uni.hideLoading();
  535. const ret = JSON.parse(uploadFileRes.data);
  536. if (ret.code == 0) {
  537. _this.audioUrl = ret.data.path
  538. console.log(ret);
  539. }
  540. }
  541. });
  542. }
  543. });
  544. },
  545. close() {
  546. this.show = false
  547. },
  548. close1() {
  549. this.show1 = false
  550. },
  551. close3() {
  552. this.show3 = false
  553. },
  554. close4() {
  555. this.show4 = false
  556. },
  557. handleSelBg(item, index) {
  558. this.selRoleItem = {}
  559. this.bgItem = item
  560. this.selBgPic = item.url
  561. this.selBgId = item.id - 1
  562. this.currTabIndexBg = index
  563. },
  564. handleVoiceSel(item, index) {
  565. this.selVoiceItem = item
  566. this.selVoiceId = item.id - 1
  567. this.currTabIndexAll = index
  568. },
  569. handleRoleSel(item, index) {
  570. this.selRoleItem = item
  571. this.selRoleId = item.id - 1
  572. this.currTabIndexModal = index
  573. },
  574. async saveDraft() {
  575. let parmas = {
  576. name: this.robotName,
  577. content: this.textAreaValue,
  578. // role: this.selRoleId,
  579. // back: this.selBgId,
  580. // audio: this.selVoiceId,
  581. stage: this.roundRate,
  582. audio_url: this.audioUrl,
  583. is_draft: 1
  584. }
  585. if (this.selRoleId != -1) {
  586. parmas['role'] = this.selRoleId
  587. }
  588. if (this.selBgId != -1) {
  589. parmas['back'] = this.selBgId
  590. }
  591. if (this.selVoiceId != -1) {
  592. parmas['audio'] = this.selVoiceId
  593. }
  594. console.log('保存数字人草稿参数:', parmas);
  595. // return
  596. let res = await generateWork(parmas)
  597. if (res.code == 0) {
  598. uni.showToast({
  599. title: '保存成功!',
  600. icon: 'success'
  601. })
  602. setTimeout(() => {
  603. uni.navigateBack()
  604. }, 1500)
  605. } else {
  606. uni.showToast({
  607. title: res.msg,
  608. icon: 'none'
  609. })
  610. }
  611. console.log('保存数字人草稿返回值:', res);
  612. },
  613. async genRobot() {
  614. if (this.isGenerate) {
  615. uni.showToast({
  616. title: '请等待上一次生成完成后提交!',
  617. icon: 'none'
  618. })
  619. return
  620. }
  621. let parmas = {}
  622. if (this.audioUrl) {
  623. parmas = {
  624. name: this.robotName,
  625. // content: this.textAreaValue,
  626. role: this.selRoleId,
  627. back: this.selBgId,
  628. // audio: this.selVoiceId,
  629. // stage: this.roundRate,
  630. audio_url: this.audioUrl
  631. }
  632. } else {
  633. parmas = {
  634. name: this.robotName,
  635. content: this.textAreaValue,
  636. role: this.selRoleId,
  637. back: this.selBgId,
  638. audio: this.selVoiceId,
  639. stage: this.roundRate,
  640. audio_url: this.audioUrl
  641. }
  642. }
  643. console.log('创建数字人参数:', parmas);
  644. // return
  645. let res = await generateWork(parmas)
  646. if (res.code == 0) {
  647. this.isGenerate = true
  648. uni.showToast({
  649. title: '创建数字人成功!',
  650. icon: 'success'
  651. })
  652. getApp().from = 'create'
  653. setTimeout(() => {
  654. uni.navigateBack()
  655. }, 1500)
  656. } else {
  657. uni.showToast({
  658. title: res.msg,
  659. icon: 'none'
  660. })
  661. }
  662. console.log('生成数字人返回值:', res);
  663. },
  664. filter() {
  665. this.show2 = false
  666. },
  667. handleFilter() {
  668. // this.show1 = false
  669. this.show2 = true
  670. },
  671. handleBtnConfirm1() {
  672. this.show1 = false
  673. },
  674. handleBtnConfirm2() {
  675. this.show3 = false
  676. },
  677. handleBtnConfirm3() {
  678. this.show4 = false
  679. },
  680. handleSetBox(item) {
  681. if (item.name == '全局语速') {
  682. if (this.audioUrl) {
  683. return uni.showToast({
  684. title: '上传音频不支持全局语速',
  685. icon: 'none'
  686. })
  687. }
  688. this.show = true
  689. } else if (item.name == '声音') {
  690. if (this.audioUrl) {
  691. return uni.showToast({
  692. title: '上传音频不支持声音选择',
  693. icon: 'none'
  694. })
  695. }
  696. this.show1 = true
  697. } else if (item.name == '角色') {
  698. this.show3 = true
  699. } else if (item.name == '背景') {
  700. this.show4 = true
  701. }
  702. },
  703. handleChange(e) {
  704. console.log(e);
  705. this.roundRate = e.toFixed(1)
  706. },
  707. handleBtnConfirm() {
  708. this.show = false
  709. },
  710. handleCreatePro() {
  711. uni.navigateTo({
  712. url: ''
  713. })
  714. },
  715. handleShowMoreMenu() {
  716. this.showMoreMenu = true
  717. },
  718. handleConfirm(e) {
  719. this.showMoreMenu = false
  720. },
  721. open() {
  722. // console.log('open() ');
  723. }
  724. }
  725. };
  726. </script>
  727. <style lang="scss" scoped>
  728. @import './index.scss';
  729. </style>