create.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <template>
  2. <view class="container">
  3. <view class="form-card">
  4. <view class="form-title">{{ isNew ? '创建活动' : '编辑活动' }}</view>
  5. <!-- 活动标题 -->
  6. <view class="form-item">
  7. <text class="form-label">活动标题 *</text>
  8. <input class="form-input" v-model="form.title" placeholder="请输入活动标题" maxlength="50" />
  9. </view>
  10. <!-- 活动维度 -->
  11. <view class="form-item">
  12. <text class="form-label">所属维度 *</text>
  13. <picker class="form-picker" :value="dimIdx" :range="dimensionOptions" range-key="label" @change="onDimChange">
  14. <text class="picker-text">{{ form.dimensionCode ? dimLabel(form.dimensionCode) : '请选择维度' }}</text>
  15. </picker>
  16. </view>
  17. <!-- 活动类型 -->
  18. <view class="form-item">
  19. <text class="form-label">活动类型 *</text>
  20. <picker class="form-picker" :value="typeIdx" :range="typeOptions" range-key="label" @change="onTypeChange">
  21. <text class="picker-text">{{ form.activityType ? typeLabel(form.activityType) : '请选择类型' }}</text>
  22. </picker>
  23. </view>
  24. <!-- 开始时间 -->
  25. <view class="form-item">
  26. <text class="form-label">开始时间 *</text>
  27. <picker class="form-picker" mode="date" :value="datePart" @change="onStartDateChange">
  28. <text class="picker-text">{{ datePart || '选择日期' }}</text>
  29. </picker>
  30. <picker class="form-picker" mode="time" :value="timePart" @change="onStartTimeChange" style="margin-top: 16rpx;">
  31. <text class="picker-text">{{ timePart || '选择时间' }}</text>
  32. </picker>
  33. </view>
  34. <!-- 结束时间 -->
  35. <view class="form-item">
  36. <text class="form-label">结束时间</text>
  37. <picker class="form-picker" mode="date" :value="endDatePart" @change="onEndDateChange">
  38. <text class="picker-text">{{ endDatePart || '选择日期(可选)' }}</text>
  39. </picker>
  40. <picker class="form-picker" mode="time" :value="endTimePart" @change="onEndTimeChange" style="margin-top: 16rpx;">
  41. <text class="picker-text">{{ endTimePart || '选择时间(可选)' }}</text>
  42. </picker>
  43. </view>
  44. <!-- 报名截止时间 -->
  45. <view class="form-item">
  46. <text class="form-label">报名截止时间</text>
  47. <picker class="form-picker" mode="date" :value="regDatePart" @change="onRegDateChange">
  48. <text class="picker-text">{{ regDatePart || '选择日期(不填=活动开始前)' }}</text>
  49. </picker>
  50. <picker class="form-picker" mode="time" :value="regTimePart" @change="onRegTimeChange" style="margin-top: 16rpx;">
  51. <text class="picker-text">{{ regTimePart || '选择时间' }}</text>
  52. </picker>
  53. </view>
  54. <!-- 活动地点 -->
  55. <view class="form-item">
  56. <text class="form-label">活动地点</text>
  57. <input class="form-input" v-model="form.location" placeholder="请输入活动地点" maxlength="100" />
  58. </view>
  59. <!-- 人数 + 价格 -->
  60. <view class="form-item-row">
  61. <view class="form-item half">
  62. <text class="form-label">最大人数</text>
  63. <input class="form-input" type="number" v-model="maxParticipantsStr" placeholder="0=不限" />
  64. </view>
  65. <view class="form-item half">
  66. <text class="form-label">孩子费用(元)</text>
  67. <input class="form-input" type="digit" v-model="childFeeYuan" placeholder="0=免费" />
  68. </view>
  69. </view>
  70. <view class="form-item-row">
  71. <view class="form-item half">
  72. <text class="form-label">孩子会员费(元)</text>
  73. <input class="form-input" type="digit" v-model="childMemberFeeYuan" placeholder="0=免费" />
  74. </view>
  75. <view class="form-item half">
  76. <text class="form-label">家长费用(元)</text>
  77. <input class="form-input" type="digit" v-model="parentFeeYuan" placeholder="0=免费" />
  78. </view>
  79. </view>
  80. <view class="form-item">
  81. <text class="form-label">家长会员费(元)</text>
  82. <input class="form-input" type="digit" v-model="parentMemberFeeYuan" placeholder="0=免费" />
  83. </view>
  84. <!-- 封面图片 -->
  85. <view class="form-item">
  86. <text class="form-label">封面图片</text>
  87. <input class="form-input" v-model="form.coverImage" placeholder="输入图片URL(可选)" />
  88. <view class="cover-preview" v-if="form.coverImage">
  89. <image class="preview-img" :src="form.coverImage" mode="aspectFill" @error="onImgError" />
  90. </view>
  91. </view>
  92. <!-- 活动描述 -->
  93. <view class="form-item">
  94. <text class="form-label">活动描述</text>
  95. <textarea class="form-textarea" v-model="form.description" placeholder="请输入活动详细介绍" maxlength="500"
  96. auto-height />
  97. </view>
  98. <!-- 操作按钮 -->
  99. <view class="form-actions">
  100. <view class="btn-save" @click="handleSave">
  101. <text>保存为草稿</text>
  102. </view>
  103. <view class="btn-publish" @click="handlePublish">
  104. <text>{{ isAdmin ? '保存并发布' : '保存并提交审核' }}</text>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="loading" v-if="loading">
  109. <view class="loading-spinner"></view>
  110. <text>加载中...</text>
  111. </view>
  112. </view>
  113. </template>
  114. <script>
  115. import { adminCreateActivity, adminUpdateActivity, adminPublishActivity, submitActivityForReview, getActivityDetail } from '../../utils/api.js'
  116. import config from '../../config.js'
  117. var BASE_URL = config.api('')
  118. export default {
  119. computed: {
  120. isAdmin: function() {
  121. var userInfo = uni.getStorageSync('userInfo')
  122. return userInfo && (userInfo.role === 'admin' || userInfo.role === 'activity_admin' || (userInfo.roles && userInfo.roles.indexOf('activity_admin') >= 0))
  123. }
  124. },
  125. data() {
  126. return {
  127. isNew: true,
  128. activityId: null,
  129. loading: false,
  130. memberId: '',
  131. form: {
  132. title: '',
  133. description: '',
  134. coverImage: '',
  135. dimensionCode: '',
  136. activityType: '',
  137. status: 'draft',
  138. startTime: null,
  139. endTime: null,
  140. registrationDeadline: null,
  141. location: '',
  142. maxParticipants: 0,
  143. childFee: 0,
  144. childMemberFee: 0,
  145. parentFee: 0,
  146. parentMemberFee: 0,
  147. visibility: 'public',
  148. requireRegistration: 1,
  149. requireCheckinReview: 0,
  150. checkinPoints: 0
  151. },
  152. childFeeYuan: '0',
  153. childMemberFeeYuan: '0',
  154. parentFeeYuan: '0',
  155. parentMemberFeeYuan: '0',
  156. maxParticipantsStr: '0',
  157. datePart: '',
  158. timePart: '',
  159. endDatePart: '',
  160. endTimePart: '',
  161. regDatePart: '',
  162. regTimePart: '',
  163. dimIdx: 0,
  164. typeIdx: 0,
  165. dimensionOptions: [
  166. { key: 'body', label: '身 · 主动健康' },
  167. { key: 'mind', label: '心 · 情感丰盈' },
  168. { key: 'wisdom', label: '智 · 赋能未来' },
  169. { key: 'action', label: '行 · 知行合一' },
  170. { key: 'wealth', label: '富 · 物质精神' }
  171. ],
  172. typeOptions: [
  173. { key: 'offline', label: '线下活动' },
  174. { key: 'online', label: '线上活动' },
  175. { key: 'campaign', label: '营销活动' }
  176. ]
  177. }
  178. },
  179. onLoad(options) {
  180. if (options.id) {
  181. this.activityId = parseInt(options.id)
  182. this.isNew = false
  183. uni.setNavigationBarTitle({ title: '编辑活动' })
  184. this.loadDetail()
  185. } else {
  186. uni.setNavigationBarTitle({ title: '创建活动' })
  187. }
  188. },
  189. methods: {
  190. loadDetail() {
  191. var self = this
  192. self.loading = true
  193. getActivityDetail(self.activityId).then(function(res) {
  194. self.loading = false
  195. if (res && res.code === 200 && res.data) {
  196. var d = res.data
  197. self.form.title = d.title || ''
  198. self.form.description = d.description || ''
  199. self.form.coverImage = d.coverImage || ''
  200. self.form.dimensionCode = d.dimensionCode || ''
  201. self.form.activityType = d.activityType || ''
  202. self.form.location = d.location || ''
  203. self.form.maxParticipants = d.maxParticipants || 0
  204. self.form.childFee = d.childFee || 0
  205. self.form.childMemberFee = d.childMemberFee || 0
  206. self.form.parentFee = d.parentFee || 0
  207. self.form.parentMemberFee = d.parentMemberFee || 0
  208. self.form.status = d.status || 'draft'
  209. self.form.visibility = d.visibility || 'public'
  210. self.maxParticipantsStr = String(self.form.maxParticipants)
  211. self.childFeeYuan = self.form.childFee ? (self.form.childFee / 100).toString() : '0'
  212. self.childMemberFeeYuan = self.form.childMemberFee ? (self.form.childMemberFee / 100).toString() : '0'
  213. self.parentFeeYuan = self.form.parentFee ? (self.form.parentFee / 100).toString() : '0'
  214. self.parentMemberFeeYuan = self.form.parentMemberFee ? (self.form.parentMemberFee / 100).toString() : '0'
  215. if (d.startTime) {
  216. var sd = new Date(d.startTime.replace ? d.startTime.replace(/-/g, '/') : d.startTime)
  217. self.datePart = self.fmtDate(sd)
  218. self.timePart = self.fmtTime(sd)
  219. self.form.startTime = sd.toISOString()
  220. }
  221. if (d.endTime) {
  222. var ed = new Date(d.endTime.replace ? d.endTime.replace(/-/g, '/') : d.endTime)
  223. self.endDatePart = self.fmtDate(ed)
  224. self.endTimePart = self.fmtTime(ed)
  225. self.form.endTime = ed.toISOString()
  226. }
  227. if (d.registrationDeadline) {
  228. var rd = new Date(d.registrationDeadline.replace ? d.registrationDeadline.replace(/-/g, '/') : d.registrationDeadline)
  229. self.regDatePart = self.fmtDate(rd)
  230. self.regTimePart = self.fmtTime(rd)
  231. self.form.registrationDeadline = rd.toISOString()
  232. }
  233. // sync pickers
  234. for (var i = 0; i < self.dimensionOptions.length; i++) {
  235. if (self.dimensionOptions[i].key === self.form.dimensionCode) self.dimIdx = i
  236. }
  237. for (var j = 0; j < self.typeOptions.length; j++) {
  238. if (self.typeOptions[j].key === self.form.activityType) self.typeIdx = j
  239. }
  240. }
  241. }).catch(function() { self.loading = false })
  242. },
  243. onDimChange(e) {
  244. this.dimIdx = e.detail.value
  245. this.form.dimensionCode = this.dimensionOptions[this.dimIdx].key
  246. },
  247. onTypeChange(e) {
  248. this.typeIdx = e.detail.value
  249. this.form.activityType = this.typeOptions[this.typeIdx].key
  250. },
  251. onStartDateChange(e) {
  252. this.datePart = e.detail.value
  253. this.syncStartTime()
  254. },
  255. onStartTimeChange(e) {
  256. this.timePart = e.detail.value
  257. this.syncStartTime()
  258. },
  259. onEndDateChange(e) {
  260. this.endDatePart = e.detail.value
  261. this.syncEndTime()
  262. },
  263. onEndTimeChange(e) {
  264. this.endTimePart = e.detail.value
  265. this.syncEndTime()
  266. },
  267. onRegDateChange(e) {
  268. this.regDatePart = e.detail.value
  269. this.syncRegDeadline()
  270. },
  271. onRegTimeChange(e) {
  272. this.regTimePart = e.detail.value
  273. this.syncRegDeadline()
  274. },
  275. syncStartTime() {
  276. if (this.datePart && this.timePart) {
  277. this.form.startTime = this.datePart + 'T' + this.timePart + ':00'
  278. }
  279. },
  280. syncEndTime() {
  281. if (this.endDatePart && this.endTimePart) {
  282. this.form.endTime = this.endDatePart + 'T' + this.endTimePart + ':00'
  283. } else {
  284. this.form.endTime = null
  285. }
  286. },
  287. syncRegDeadline() {
  288. if (this.regDatePart && this.regTimePart) {
  289. this.form.registrationDeadline = this.regDatePart + 'T' + this.regTimePart + ':00'
  290. } else {
  291. this.form.registrationDeadline = null
  292. }
  293. },
  294. chooseImage() {
  295. var self = this
  296. uni.chooseImage({
  297. count: 1,
  298. sizeType: ['compressed'],
  299. success: function(res) {
  300. self.uploadCover(res.tempFilePaths[0])
  301. }
  302. })
  303. },
  304. uploadCover(filePath) {
  305. var self = this
  306. uni.uploadFile({
  307. url: BASE_URL + '/api/admin/articles/upload/image',
  308. filePath: filePath,
  309. name: 'file',
  310. header: { 'Authorization': 'Bearer ' + (uni.getStorageSync('token') || '') },
  311. success: function(res) {
  312. try {
  313. var data = JSON.parse(res.data)
  314. if (data.code === 200 && data.data) {
  315. self.form.coverImage = data.data
  316. } else {
  317. uni.showToast({ title: '上传失败', icon: 'none' })
  318. }
  319. } catch (e) {
  320. uni.showToast({ title: '上传失败', icon: 'none' })
  321. }
  322. },
  323. fail: function() {
  324. uni.showToast({ title: '上传失败', icon: 'none' })
  325. }
  326. })
  327. },
  328. onImgError() {
  329. this.form.coverImage = ''
  330. },
  331. validate() {
  332. if (!this.form.title) {
  333. uni.showToast({ title: '请输入活动标题', icon: 'none' })
  334. return false
  335. }
  336. if (!this.form.dimensionCode) {
  337. uni.showToast({ title: '请选择所属维度', icon: 'none' })
  338. return false
  339. }
  340. if (!this.form.activityType) {
  341. uni.showToast({ title: '请选择活动类型', icon: 'none' })
  342. return false
  343. }
  344. if (!this.datePart || !this.timePart) {
  345. uni.showToast({ title: '请选择开始时间', icon: 'none' })
  346. return false
  347. }
  348. return true
  349. },
  350. buildPayload() {
  351. var payload = Object.assign({}, this.form)
  352. payload.maxParticipants = parseInt(this.maxParticipantsStr) || 0
  353. payload.childFee = Math.round((parseFloat(this.childFeeYuan) || 0) * 100)
  354. payload.childMemberFee = Math.round((parseFloat(this.childMemberFeeYuan) || 0) * 100)
  355. payload.parentFee = Math.round((parseFloat(this.parentFeeYuan) || 0) * 100)
  356. payload.parentMemberFee = Math.round((parseFloat(this.parentMemberFeeYuan) || 0) * 100)
  357. if (this.activityId) payload.id = this.activityId
  358. return payload
  359. },
  360. handleSave() {
  361. if (!this.validate()) return
  362. this.submit(false)
  363. },
  364. handlePublish() {
  365. if (!this.validate()) return
  366. this.submit(true)
  367. },
  368. submit(publishAfter) {
  369. var self = this
  370. self.loading = true
  371. var payload = self.buildPayload()
  372. var userInfo = uni.getStorageSync('userInfo')
  373. var isAdmin = userInfo && (userInfo.role === 'admin' || userInfo.role === 'activity_admin' || (userInfo.roles && userInfo.roles.indexOf('activity_admin') >= 0))
  374. var doPublish = function(id) {
  375. if (isAdmin) {
  376. adminPublishActivity(id).then(function(r) {
  377. self.loading = false
  378. if (r && r.code === 200) {
  379. uni.showToast({ title: '已发布', icon: 'success' })
  380. setTimeout(function() {
  381. uni.navigateBack()
  382. }, 1200)
  383. } else {
  384. uni.showToast({ title: (r && r.message) || '发布失败', icon: 'none' })
  385. }
  386. }).catch(function() {
  387. self.loading = false
  388. uni.showToast({ title: '发布失败', icon: 'none' })
  389. })
  390. } else {
  391. submitActivityForReview(id).then(function(r) {
  392. self.loading = false
  393. if (r && r.code === 200) {
  394. uni.showToast({ title: '已提交审核', icon: 'success' })
  395. setTimeout(function() {
  396. uni.navigateBack()
  397. }, 1200)
  398. } else {
  399. uni.showToast({ title: (r && r.message) || '提交审核失败', icon: 'none' })
  400. }
  401. }).catch(function() {
  402. self.loading = false
  403. uni.showToast({ title: '提交审核失败', icon: 'none' })
  404. })
  405. }
  406. }
  407. if (self.isNew) {
  408. adminCreateActivity(payload).then(function(res) {
  409. if (res && res.code === 200) {
  410. var newId = res.data.id || res.data
  411. if (publishAfter) {
  412. doPublish(newId)
  413. } else {
  414. self.loading = false
  415. uni.showToast({ title: '已保存草稿', icon: 'success' })
  416. setTimeout(function() { uni.navigateBack() }, 1200)
  417. }
  418. } else {
  419. self.loading = false
  420. uni.showToast({ title: (res && res.message) || '保存失败', icon: 'none' })
  421. }
  422. }).catch(function() {
  423. self.loading = false
  424. uni.showToast({ title: '网络异常', icon: 'none' })
  425. })
  426. } else {
  427. adminUpdateActivity(payload).then(function(res) {
  428. if (res && res.code === 200) {
  429. if (publishAfter && (self.form.status === 'draft' || self.form.status === 'rejected')) {
  430. doPublish(self.activityId)
  431. } else {
  432. self.loading = false
  433. uni.showToast({ title: '已保存', icon: 'success' })
  434. setTimeout(function() { uni.navigateBack() }, 1200)
  435. }
  436. } else {
  437. self.loading = false
  438. uni.showToast({ title: (res && res.message) || '保存失败', icon: 'none' })
  439. }
  440. }).catch(function() {
  441. self.loading = false
  442. uni.showToast({ title: '网络异常', icon: 'none' })
  443. })
  444. }
  445. },
  446. dimLabel(key) {
  447. for (var i = 0; i < this.dimensionOptions.length; i++) {
  448. if (this.dimensionOptions[i].key === key) return this.dimensionOptions[i].label
  449. }
  450. return '请选择维度'
  451. },
  452. typeLabel(key) {
  453. for (var i = 0; i < this.typeOptions.length; i++) {
  454. if (this.typeOptions[i].key === key) return this.typeOptions[i].label
  455. }
  456. return '请选择类型'
  457. },
  458. fmtDate(d) {
  459. var y = d.getFullYear()
  460. var m = ('0' + (d.getMonth() + 1)).slice(-2)
  461. var day = ('0' + d.getDate()).slice(-2)
  462. return y + '-' + m + '-' + day
  463. },
  464. fmtTime(d) {
  465. var h = ('0' + d.getHours()).slice(-2)
  466. var mi = ('0' + d.getMinutes()).slice(-2)
  467. return h + ':' + mi
  468. }
  469. }
  470. }
  471. </script>
  472. <style scoped>
  473. .container {
  474. min-height: 100vh;
  475. background: #F5F7FA;
  476. padding: 24rpx;
  477. }
  478. .form-card {
  479. background: #fff;
  480. border-radius: 20rpx;
  481. padding: 32rpx 28rpx;
  482. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
  483. }
  484. .form-title {
  485. font-size: 36rpx;
  486. font-weight: bold;
  487. color: #1E293B;
  488. margin-bottom: 24rpx;
  489. }
  490. .form-item {
  491. margin-bottom: 28rpx;
  492. }
  493. .form-item-row {
  494. display: flex;
  495. flex-direction: row;
  496. gap: 20rpx;
  497. margin-bottom: 28rpx;
  498. }
  499. .form-item.half {
  500. flex: 1;
  501. }
  502. .form-label {
  503. font-size: 26rpx;
  504. color: #475569;
  505. font-weight: 600;
  506. margin-bottom: 12rpx;
  507. display: block;
  508. }
  509. .form-input {
  510. width: 100%;
  511. height: 80rpx;
  512. border: 1rpx solid #E2E8F0;
  513. border-radius: 12rpx;
  514. padding: 0 20rpx;
  515. font-size: 28rpx;
  516. color: #1E293B;
  517. box-sizing: border-box;
  518. }
  519. .form-picker {
  520. width: 100%;
  521. height: 80rpx;
  522. border: 1rpx solid #E2E8F0;
  523. border-radius: 12rpx;
  524. padding: 0 20rpx;
  525. font-size: 28rpx;
  526. color: #1E293B;
  527. box-sizing: border-box;
  528. display: flex;
  529. align-items: center;
  530. }
  531. .picker-text {
  532. font-size: 28rpx;
  533. color: #1E293B;
  534. }
  535. .form-textarea {
  536. width: 100%;
  537. min-height: 160rpx;
  538. border: 1rpx solid #E2E8F0;
  539. border-radius: 12rpx;
  540. padding: 16rpx 20rpx;
  541. font-size: 28rpx;
  542. color: #1E293B;
  543. box-sizing: border-box;
  544. }
  545. .cover-upload {
  546. width: 100%;
  547. height: 320rpx;
  548. border: 2rpx dashed #CBD5E1;
  549. border-radius: 12rpx;
  550. display: flex;
  551. align-items: center;
  552. justify-content: center;
  553. overflow: hidden;
  554. }
  555. .preview-img {
  556. width: 100%;
  557. height: 100%;
  558. }
  559. .upload-placeholder {
  560. display: flex;
  561. flex-direction: column;
  562. align-items: center;
  563. }
  564. .upload-icon {
  565. font-size: 64rpx;
  566. color: #94A3B8;
  567. }
  568. .upload-text {
  569. font-size: 24rpx;
  570. color: #94A3B8;
  571. margin-top: 8rpx;
  572. }
  573. .form-actions {
  574. display: flex;
  575. flex-direction: row;
  576. gap: 20rpx;
  577. margin-top: 40rpx;
  578. }
  579. .btn-save,
  580. .btn-publish {
  581. flex: 1;
  582. height: 88rpx;
  583. border-radius: 44rpx;
  584. display: flex;
  585. align-items: center;
  586. justify-content: center;
  587. font-size: 30rpx;
  588. font-weight: 600;
  589. }
  590. .btn-save {
  591. background: #fff;
  592. color: #F97316;
  593. border: 2rpx solid #F97316;
  594. }
  595. .btn-publish {
  596. background: linear-gradient(135deg, #F97316, #FB923C);
  597. color: #fff;
  598. }
  599. .loading {
  600. position: fixed;
  601. top: 0;
  602. left: 0;
  603. right: 0;
  604. bottom: 0;
  605. background: rgba(255, 255, 255, 0.6);
  606. display: flex;
  607. flex-direction: column;
  608. align-items: center;
  609. justify-content: center;
  610. z-index: 999;
  611. }
  612. .loading-spinner {
  613. width: 60rpx;
  614. height: 60rpx;
  615. border: 4rpx solid #FED7AA;
  616. border-top: 4rpx solid #F97316;
  617. border-radius: 50%;
  618. animation: spin 0.8s linear infinite;
  619. margin-bottom: 16rpx;
  620. }
  621. @keyframes spin {
  622. to { transform: rotate(360deg); }
  623. }
  624. </style>