initiateCrowdfunding.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. <template>
  2. <view class="page">
  3. <view class="nav-bar">
  4. <view class="left">
  5. <view class="uni-btn-icon" @click="goBack">&#xe601;</view>
  6. <view class="center">发表想法</view>
  7. </view>
  8. <view class="right">
  9. <!-- <view class="btn" @click="onManage">管理</view> -->
  10. <view class="btn" @click="onSubmit" v-if="id && id < 1">发布</view>
  11. <view class="btn" @click="onSubmit" v-else>更新</view>
  12. </view>
  13. </view>
  14. <view class="enterContentDetails">
  15. <!-- 上限五张图片或一个视频 -->
  16. <view class="img_list">
  17. <view class="image" v-for="(item, index) in img_list" :key="index">
  18. <image class="upimg" :src="item" mode="aspectFill"></image>
  19. <image class="del" src="@/static/icon/img-del.png" @click="delIt(index)"></image>
  20. <view class="loading" v-if="item.startsWith('http') === false">
  21. <view class="loading-icon"></view>
  22. </view>
  23. </view>
  24. <view v-if="video_path" class="image">
  25. <video :src="video_path" controls style="width:100%;height:100%"></video>
  26. <image class="del" src="@/static/icon/img-del.png" @click="delVideo"></image>
  27. </view>
  28. <view class="image" @click="upload('list')" v-if="img_list.length < 9">
  29. <image class="txt" src="../../static/icon/sy_icon_jiahao02.png"></image>
  30. </view>
  31. </view>
  32. <view class="content-title">
  33. <input class="edit" v-model="ainfo.title" maxlength="20" placeholder="标题(必填)" />
  34. </view>
  35. <view class="content-textarea">
  36. <textarea class="edit2" auto-height v-model="ainfo.content" :maxlength="1000"
  37. placeholder="添加描述"></textarea>
  38. </view>
  39. <view class="agree">
  40. <text class="xy">{{ ainfo.content.length }}/1000</text>
  41. </view>
  42. </view>
  43. <view class="worksBox scale-tap" @click="upload4">
  44. <view class="optionalWorks">
  45. <view class="title">
  46. 上传详情页
  47. <text style="font-weight: normal;">(支持长图)</text>
  48. </view>
  49. </view>
  50. <view class="select-box">
  51. <image src="../../static/icon/upload-icon.png"></image>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import permission from '@/common/permission.js';
  58. export default {
  59. components: {},
  60. data() {
  61. return {
  62. skey: '',
  63. pop_sel: false,
  64. cid: 0,
  65. catename: '',
  66. img2: '',
  67. ainfo: {
  68. id: 0,
  69. title: '',
  70. content: '',
  71. name: '',
  72. telphone: '',
  73. address: '',
  74. contact: '',
  75. num: '',
  76. },
  77. img_list: [],
  78. video_path: '',
  79. is_agree: 0,
  80. selectedWork: {},
  81. content_images: [],
  82. }
  83. },
  84. onLoad(params) {
  85. if (getApp().globalData.skey != "") {
  86. this.skey = getApp().globalData.skey;
  87. } else {
  88. this.skey = params.skey || ''; //1234567xef
  89. }
  90. if (params.id) {
  91. this.id = params.id;
  92. } else {
  93. this.id = -1;
  94. }
  95. let that = this;
  96. // this.getCate();
  97. that.getInfo();
  98. // this.getData();
  99. // 添加事件监听
  100. uni.$on('selectItem', this.handleSelect);
  101. },
  102. onUnload() {
  103. uni.$off('selectItem', this.handleSelect);
  104. },
  105. onShow() {
  106. let that = this;
  107. },
  108. methods: {
  109. goBack() {
  110. uni.navigateBack();
  111. },
  112. handleSelect(item) {
  113. this.selectedWork = item;
  114. },
  115. delIt(ind) {
  116. let arr = [];
  117. if (this.img_list.length > 0) {
  118. for (let i = 0; i < this.img_list.length; i++) {
  119. if (i !== ind) {
  120. arr.push(this.img_list[i]);
  121. }
  122. }
  123. this.img_list = arr;
  124. }
  125. },
  126. getInfo() {
  127. var that = this;
  128. uni.request({
  129. url: this.$apiHost + '/Article/getinfo',
  130. data: {
  131. uuid: getApp().globalData.uuid,
  132. id: this.id
  133. },
  134. header: {
  135. 'content-type': 'application/json'
  136. },
  137. success: (res) => {
  138. this.ainfo = res.data.article;
  139. this.img_list = [];
  140. this.selectedWork = res.data.work_info;
  141. if (res.data.article.images.length > 1) {
  142. let arr = res.data.article.images.split("|");
  143. if (arr.length > 0) {
  144. for (let i = 0; i < arr.length; i++) {
  145. if (arr[i].length > 10) {
  146. this.img_list.push(arr[i]);
  147. }
  148. }
  149. }
  150. }
  151. }
  152. });
  153. },
  154. checkField(str, tips) {
  155. if (str.length < 2) {
  156. uni.showToast({
  157. title: tips,
  158. icon: 'none'
  159. });
  160. return false;
  161. }
  162. return true;
  163. },
  164. onSubmit() {
  165. if (this.checkField(this.ainfo.title, "请输入名称") == false) return;
  166. if (this.checkField(this.ainfo.content, "请输入具体内容") == false) return;
  167. if (this.is_submit > 0) return;
  168. let img_str = '';
  169. if (this.img_list.length > 0) {
  170. for (let i = 0; i < this.img_list.length; i++) {
  171. img_str += this.img_list[i] + "|";
  172. }
  173. }
  174. if (this.img_list.length < 1 && !this.selectedWork.id) {
  175. uni.showToast({
  176. title: '请上传 图片 或 选择一个作品',
  177. icon: 'none'
  178. });
  179. return;
  180. } else {
  181. if (!this.selectedWork.id) {
  182. if (!img_str || img_str.trim().length < 2) {
  183. uni.showToast({
  184. title: '请确保至少上传一张有效图片作为封面',
  185. icon: 'none'
  186. });
  187. return;
  188. }
  189. if (this.img_list.length > 5) {
  190. uni.showToast({
  191. title: '最多只能上传 5 张图片',
  192. icon: 'none'
  193. });
  194. return;
  195. }
  196. }
  197. }
  198. let that = this;
  199. let contentImagesStr = '';
  200. if (this.content_images.length > 0) {
  201. for (let i = 0; i < this.content_images.length; i++) {
  202. contentImagesStr += this.content_images[i] + "|";
  203. }
  204. }
  205. this.is_submit = 1;
  206. console.log({
  207. uuid: getApp().globalData.uuid,
  208. id: this.ainfo.id,
  209. title: this.ainfo.title,
  210. content: this.ainfo.content,
  211. images: img_str,
  212. content_images: contentImagesStr,
  213. video_url: this.video_path,
  214. }, 9999999999);
  215. uni.request({
  216. url: this.$apiHost + '/crowdfund/seji/save',
  217. data: {
  218. uuid: getApp().globalData.uuid,
  219. id: this.ainfo.id,
  220. title: this.ainfo.title,
  221. content: this.ainfo.content,
  222. images: img_str,
  223. content_images: contentImagesStr,
  224. video_url: this.video_path,
  225. },
  226. method: 'POST',
  227. header: {
  228. 'Content-Type': 'application/x-www-form-urlencoded',
  229. 'sign': getApp().globalData.headerSign
  230. },
  231. dataType: 'json',
  232. success: (res) => {
  233. uni.showToast({
  234. title: res.data.str,
  235. icon: 'none'
  236. });
  237. if (res.data.success == "yes") {
  238. setTimeout(function() {
  239. uni.$emit('switchToMyPage', {
  240. type: 'article'
  241. });
  242. uni.switchTab({
  243. url: '/pages/my/my'
  244. })
  245. }, 500);
  246. that.ainfo.title = '';
  247. that.ainfo.content = '';
  248. that.ainfo.num = '';
  249. that.img_list = [];
  250. }
  251. this.is_submit = 0;
  252. },
  253. fail: (err) => {
  254. this.is_submit = 0;
  255. },
  256. complete: (com) => {}
  257. })
  258. },
  259. async upload(type) {
  260. // 权限弹窗校验
  261. if (plus.os.name.toLowerCase() === 'android') {
  262. let hasPermission = false;
  263. try {
  264. hasPermission = await permission.request('photoLibrary', {
  265. title: '相册/视频权限说明',
  266. describe: '便于您上传图片或视频,请您确认授权,否则无法使用该功能'
  267. });
  268. if (!hasPermission) {
  269. uni.showToast({
  270. title: '未获得相册权限',
  271. icon: 'none'
  272. });
  273. return;
  274. }
  275. } catch (e) {
  276. uni.showToast({
  277. title: '权限检查失败',
  278. icon: 'none'
  279. });
  280. return;
  281. }
  282. } else {
  283. }
  284. if (this.img_list.length >= 9 && !this.video_path) {
  285. uni.showToast({
  286. title: '最多只能上传9张图片',
  287. icon: 'none'
  288. });
  289. return;
  290. }
  291. uni.showActionSheet({
  292. itemList: ['拍照', '从相册选择'],
  293. success: (res) => {
  294. const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
  295. this.upload_ext(sourceType);
  296. }
  297. });
  298. // uni.chooseMedia({
  299. // count: 9 - this.img_list.length,
  300. // mediaType: ['image', 'video'],
  301. // sourceType: ['album', 'camera'],
  302. // maxDuration: 60,
  303. // success: (res) => {
  304. // console.log(res, 'res');
  305. // }
  306. // });
  307. },
  308. upload_ext(sourceType) {
  309. console.log("----upload");
  310. var _self = this;
  311. uni.chooseMedia({
  312. count: 9 - this.img_list.length,
  313. mediaType: ['image'], //, 'video'
  314. sourceType: [sourceType],
  315. maxDuration: 60,
  316. success: function(res) {
  317. console.log('res:', res)
  318. if (res.tempFiles && res.tempFiles.length > 0) {
  319. // 根据文件类型判断
  320. let videoFiles = res.tempFiles.filter(file => file.fileType === 'video');
  321. let imageFiles = res.tempFiles.filter(file => file.fileType === 'image');
  322. if (videoFiles.length > 0) {
  323. // 如果多选视频,只处理第一个并提示
  324. if (videoFiles.length > 1) {
  325. uni.showToast({
  326. title: '只能上传一个视频,已自动选取第一个',
  327. icon: 'none'
  328. });
  329. }
  330. // 如果已存在视频,替换并提示
  331. if (_self.video_path) {
  332. uni.showToast({
  333. title: '已替换为新上传的视频',
  334. icon: 'none'
  335. });
  336. }
  337. _self.upload2('list', videoFiles[0].tempFilePath, 'video',
  338. '/Xweb/upload_video?skey=');
  339. console.log(videoFiles, 'videoFiles');
  340. }
  341. console.log(imageFiles, 'imageFiles');
  342. if (imageFiles.length > 0) {
  343. // 多图全部上传
  344. imageFiles.forEach(img => {
  345. _self.upload2('list', img.tempFilePath, 'image',
  346. '/Xweb/upload_img?skey=');
  347. });
  348. }
  349. }
  350. // for (let index = 0; index < res.tempFilePaths.length; index++) {
  351. // let filepath = "";
  352. // // #ifdef H5
  353. // filepath = res.tempFiles[index].path;
  354. // // #endif
  355. // // #ifdef APP-PLUS
  356. // filepath = res.tempFilePaths[index];
  357. // // #endif
  358. // _self.imglocal = filepath; //res.tempFilePaths[0]
  359. // const uploadTask = uni.uploadFile({
  360. // url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self
  361. // .skey, // post请求地址
  362. // filePath: filepath,
  363. // name: 'file', // 待确认
  364. // success: function(uploadFileRes) {
  365. // let resdata = JSON.parse(uploadFileRes.data)
  366. // console.log('Success1:', uploadFileRes);
  367. // if (resdata.success == 'no') {
  368. // uni.showToast({
  369. // title: resdata.str,
  370. // icon: 'none'
  371. // });
  372. // return;
  373. // }
  374. // if (resdata.code == 0) {
  375. // console.log('Success2:', resdata.data.path);
  376. // _self.content_images.push(resdata.data.path)
  377. // console.log('_self.content_images:', _self.content_images);
  378. // .0
  379. // }
  380. // },
  381. // fail: function(uploadFileFail) {
  382. // console.log('Error:', uploadFileFail.data);
  383. // },
  384. // complete: () => {
  385. // console.log('Complete:');
  386. // }
  387. // });
  388. // }
  389. },
  390. fail: function(e) {
  391. console.log(e);
  392. }
  393. });
  394. },
  395. delVideo() {
  396. this.video_path = '';
  397. },
  398. upload2(type, filepath, fileType, url) {
  399. console.log(filepath, 'filepath');
  400. console.log(fileType, 'fileType');
  401. // 上传前先显示临时图
  402. if (fileType === 'image') {
  403. this.img_list.push(filepath);
  404. } else if (fileType === 'video') {
  405. this.video_path = filepath;
  406. }
  407. let uploadUrl = this.$apiHost + url + this.skey;
  408. console.log({
  409. url: uploadUrl,
  410. filePath: filepath,
  411. name: 'file',
  412. }, 99999);
  413. let that = this;
  414. uni.uploadFile({
  415. url: uploadUrl,
  416. filePath: filepath,
  417. name: 'file',
  418. success: (uploadFileRes) => {
  419. console.log(uploadFileRes, 'uploadFileRes');
  420. let resdata = JSON.parse(uploadFileRes.data);
  421. if (resdata.success == 'no') {
  422. uni.showToast({
  423. title: resdata.str,
  424. icon: 'none'
  425. });
  426. // 上传失败时移除临时图
  427. if (fileType === 'image') {
  428. that.img_list.pop();
  429. } else if (fileType === 'video') {
  430. that.video_path = '';
  431. }
  432. return;
  433. }
  434. if (resdata.code == 0) {
  435. if (fileType === 'image') {
  436. // 替换临时图为服务端路径
  437. const index = that.img_list.indexOf(filepath);
  438. if (index !== -1) {
  439. // 使用 Vue.set 确保响应式更新
  440. that.$set(that.img_list, index, resdata.data.path);
  441. }
  442. // this.img_list.push(resdata.data.path);
  443. console.log("img_list-1", that.img_list);
  444. } else if (fileType === 'video') {
  445. that.video_path = resdata.data.path;
  446. }
  447. }
  448. },
  449. fail: () => {
  450. // 上传失败时移除临时图
  451. if (fileType === 'image') {
  452. that.img_list.pop();
  453. } else if (fileType === 'video') {
  454. that.video_path = '';
  455. }
  456. }
  457. });
  458. },
  459. upload4(type) {
  460. if (this.content_images.length >= 5) {
  461. uni.showToast({
  462. title: '最多只能上传5张图片',
  463. icon: 'none'
  464. });
  465. return
  466. }
  467. uni.showActionSheet({
  468. itemList: ['拍照', '从相册选择'],
  469. success: (res) => {
  470. const sourceType = res.tapIndex === 0 ? 'camera' : 'album';
  471. if (plus.os.name.toLowerCase() === 'android') {
  472. this.checkRights1(sourceType);
  473. } else {
  474. this.upload5('list', sourceType);
  475. }
  476. }
  477. });
  478. },
  479. async checkRights1(sourceType) {
  480. try {
  481. let hasPermission = false;
  482. if (sourceType === 'camera') {
  483. hasPermission = await permission.request(permission.PermissionType.CAMERA, {
  484. title: '“萌创星球”想访问你的相机',
  485. describe: '萌创星球想访问您的摄像头,便于拍摄获取图片来与其他用户进行交流'
  486. });
  487. if (!hasPermission) {
  488. uni.showToast({
  489. title: '未获得相机权限',
  490. icon: 'none'
  491. });
  492. return;
  493. }
  494. } else {
  495. hasPermission = await permission.request(permission.PermissionType.PHOTO_LIBRARY, {
  496. title: '“萌创星球”想访问你的照片图库',
  497. describe: '萌创星球想访问您本地照片图库,便于获取图片来与其他用户进行交流'
  498. });
  499. if (!hasPermission) {
  500. uni.showToast({
  501. title: '未获得相册权限',
  502. icon: 'none'
  503. });
  504. return;
  505. }
  506. }
  507. // 权限获取成功后,继续执行上传
  508. this.upload5('list', sourceType);
  509. } catch (error) {
  510. console.error('权限检查失败:', error);
  511. uni.showToast({
  512. title: '权限检查失败',
  513. icon: 'none'
  514. });
  515. }
  516. },
  517. upload5(type, sourceType) {
  518. console.log("----upload");
  519. var _self = this;
  520. uni.chooseImage({
  521. count: 5,
  522. sizeType: ['compressed'],
  523. sourceType: [sourceType],
  524. success: function(res) {
  525. console.log('res:', res)
  526. for (let index = 0; index < res.tempFilePaths.length; index++) {
  527. let filepath = "";
  528. // #ifdef H5
  529. filepath = res.tempFiles[index].path;
  530. // #endif
  531. // #ifdef APP-PLUS
  532. filepath = res.tempFilePaths[index];
  533. // #endif
  534. _self.imglocal = filepath; //res.tempFilePaths[0]
  535. const uploadTask = uni.uploadFile({
  536. url: _self.$apiHost + '/Xweb/upload_img?skey=' + _self
  537. .skey, // post请求地址
  538. filePath: filepath,
  539. name: 'file', // 待确认
  540. success: function(uploadFileRes) {
  541. let resdata = JSON.parse(uploadFileRes.data)
  542. console.log('Success1:', uploadFileRes);
  543. if (resdata.success == 'no') {
  544. uni.showToast({
  545. title: resdata.str,
  546. icon: 'none'
  547. });
  548. return;
  549. }
  550. if (resdata.code == 0) {
  551. console.log('Success2:', resdata.data.path);
  552. _self.content_images.push(resdata.data.path)
  553. console.log('_self.content_images:', _self.content_images);
  554. .0
  555. }
  556. },
  557. fail: function(uploadFileFail) {
  558. console.log('Error:', uploadFileFail.data);
  559. },
  560. complete: () => {
  561. console.log('Complete:');
  562. }
  563. });
  564. }
  565. },
  566. error: function(e) {
  567. console.log(e);
  568. }
  569. });
  570. },
  571. }
  572. }
  573. </script>
  574. <style scoped lang="scss">
  575. page {
  576. position: absolute;
  577. left: 0;
  578. top: 0;
  579. width: 100%;
  580. display: flex;
  581. background-color: #f2f6f2;
  582. min-height: 100vh;
  583. }
  584. .status_bar {
  585. height: 44rpx;
  586. width: 100%;
  587. }
  588. .page {
  589. background-color: #f2f6f2;
  590. display: flex;
  591. flex-direction: column;
  592. width: 750rpx;
  593. min-height: 100vh;
  594. }
  595. .nav-bar {
  596. width: calc(100ve - 73rpx);
  597. height: calc(96rpx + var(--status-bar-height));
  598. display: flex;
  599. align-items: center;
  600. justify-content: space-between;
  601. padding: 0;
  602. padding-right: 40rpx;
  603. padding-left: 33rpx;
  604. padding-top: var(--status-bar-height);
  605. box-sizing: border-box;
  606. .left {
  607. display: flex;
  608. align-items: center;
  609. font-family: PingFang SC-Bold;
  610. font-weight: 400;
  611. font-size: 32rpx;
  612. color: #1f1f1f;
  613. .uni-btn-icon {
  614. font-size: 45rpx;
  615. font-weight: bold;
  616. color: #1f1f1f;
  617. transition: color 0.2s;
  618. margin-right: 20rpx;
  619. &:active {
  620. color: #2b85e4;
  621. }
  622. }
  623. }
  624. .right {
  625. display: flex;
  626. align-items: center;
  627. font-size: 28rpx;
  628. font-family: "PingFang SC-Bold";
  629. font-weight: 400;
  630. .btn {
  631. border-radius: 26rpx;
  632. background: #1f1f1f;
  633. padding: 6rpx 32rpx;
  634. color: #acf934;
  635. font-size: 28rpx;
  636. }
  637. }
  638. }
  639. .enterContentDetails {
  640. width: calc(100% - 40rpx);
  641. min-height: 726rpx;
  642. background: #ffffff;
  643. border-radius: 20rpx;
  644. margin: 0 20rpx;
  645. padding: 0rpx 24rpx 24rpx 24rpx;
  646. box-sizing: border-box;
  647. .edit {
  648. height: 92rpx;
  649. border-bottom: 2rpx solid #f2f6f2;
  650. }
  651. .edit2 {
  652. min-height: 350rpx;
  653. width: 100%;
  654. }
  655. .content-textarea {
  656. padding-top: 24rpx;
  657. }
  658. ::v-deep.input-placeholder,
  659. ::v-deep.textarea-placeholder {
  660. font-family: PingFang SC;
  661. font-weight: 400;
  662. font-size: 32rpx;
  663. color: #999999;
  664. }
  665. .agree {
  666. font-family: PingFang SC, PingFang SC;
  667. font-weight: 400;
  668. font-size: 24rpx;
  669. color: #999999;
  670. display: flex;
  671. align-items: center;
  672. justify-content: flex-end;
  673. }
  674. .img_list {
  675. width: 100%;
  676. display: grid;
  677. grid-template-columns: repeat(3, 1fr);
  678. row-gap: 20rpx;
  679. flex-wrap: wrap;
  680. margin-top: 15rpx;
  681. .image {
  682. display: flex;
  683. width: 208rpx;
  684. height: 208rpx;
  685. position: relative;
  686. box-sizing: border-box;
  687. justify-content: center;
  688. align-items: center;
  689. background: #f2f6f2;
  690. border-radius: 16rpx;
  691. .txt {
  692. font-size: 120rpx;
  693. color: #999;
  694. width: 40rpx;
  695. height: 40rpx;
  696. }
  697. .upimg {
  698. position: absolute;
  699. left: 0;
  700. top: 0;
  701. width: 100%;
  702. height: 100%;
  703. border-radius: 8rpx;
  704. }
  705. .del {
  706. width: 40rpx;
  707. height: 40rpx;
  708. position: absolute;
  709. right: 0rpx;
  710. top: 0rpx;
  711. }
  712. .loading {
  713. position: absolute;
  714. left: 0;
  715. top: 0;
  716. width: 100%;
  717. height: 100%;
  718. background: rgba(0, 0, 0, 0.5);
  719. display: flex;
  720. align-items: center;
  721. justify-content: center;
  722. border-radius: 8rpx;
  723. .loading-icon {
  724. width: 40rpx;
  725. height: 40rpx;
  726. border: 4rpx solid #fff;
  727. border-top-color: transparent;
  728. border-radius: 50%;
  729. animation: spin 1s linear infinite;
  730. }
  731. }
  732. }
  733. }
  734. }
  735. .worksBox {
  736. border-radius: 20rpx;
  737. overflow: hidden;
  738. margin: 0 24rpx;
  739. background: #fff;
  740. margin-top: 20rpx;
  741. padding-left: 24rpx;
  742. display: flex;
  743. align-items: center;
  744. justify-content: space-between;
  745. .optionalWorks {
  746. display: flex;
  747. align-items: center;
  748. justify-content: space-between;
  749. padding: 24rpx;
  750. height: 88rpx;
  751. padding-left: 0;
  752. .title {
  753. font-family: "PingFang SC-Bold";
  754. font-weight: bold;
  755. font-size: 28rpx;
  756. text {
  757. color: #bbb;
  758. font-size: 24rpx;
  759. padding-left: 10rpx;
  760. }
  761. }
  762. }
  763. .select-box {
  764. width: 64rpx;
  765. height: 64rpx;
  766. image {
  767. width: 64rpx;
  768. height: 64rpx;
  769. }
  770. }
  771. }
  772. @keyframes spin {
  773. to {
  774. transform: rotate(360deg);
  775. }
  776. }
  777. </style>