index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. <template>
  2. <view class="msg-box" :style="{ paddingTop: BarHeight + 'px' }">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-header">
  5. <view class="nav-left" @click="goSearch">
  6. <u-icon name="search" color="rgba(56, 58, 63, 1)" size="32"></u-icon>
  7. </view>
  8. <view class="nav-center">
  9. <text class="nav-title">消息</text>
  10. </view>
  11. <view class="nav-right">
  12. <u-icon name="bell" color="rgba(56, 58, 63, 1)" size="32" style="margin-right: 20rpx;"></u-icon>
  13. <u-icon name="setting" color="rgba(56, 58, 63, 1)" size="32" @click="showSettingsModal"></u-icon>
  14. </view>
  15. </view>
  16. <view class="chat-title">聊天</view>
  17. <view v-if="msgList.length" class="margin-topW">
  18. <view class="flex padding-tb radius padding-lr-sm bg" @click="goMsg" v-for="(item,index) in msgList"
  19. :key='index'>
  20. <view>
  21. <image style="width: 80rpx;height: 80rpx;border-radius: 80rpx;"
  22. src="../../static/images/msg/msg.png"></image>
  23. </view>
  24. <view class="flex-sub margin-left-sm">
  25. <view class="flex justify-between">
  26. <view class="text-white">{{item.title?item.title: '系统消息'}}</view>
  27. <view v-if="messageCount>0"
  28. style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
  29. {{messageCount}}
  30. </view>
  31. </view>
  32. <view>
  33. <view class="text-grey">{{item.content}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- <view class="margin-topW">
  39. <view class="flex padding-tb radius padding-lr-sm bg" @click="goChat">
  40. <view>
  41. <image style="width: 80rpx;height: 80rpx;border-radius: 80rpx;"
  42. src="../../static/images/msg/msgs.png"></image>
  43. </view>
  44. <view class="flex-sub margin-left-sm">
  45. <view class="flex justify-between">
  46. <view class="text-white">在线客服</view>
  47. <view v-if="userCount>0"
  48. style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
  49. {{userCount}}
  50. </view>
  51. </view>
  52. <view>
  53. <view class="text-grey">联系在线客服</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view> -->
  58. <view v-if="chatList.length" class="margin-top-sm content ">
  59. <view class="radius padding-lr-sm bg" style="margin-top: 4rpx;" @click="goIM(item)"
  60. v-for="(item,index) in chatList" :key='index'>
  61. <view class="flex padding-tb ">
  62. <view class="avatar-container">
  63. <u-image shape="circle" width='80rpx' height="80rpx" :src="item.avatar"></u-image>
  64. <view class="online-dot"></view>
  65. </view>
  66. <view class="flex-sub margin-left-sm">
  67. <view class="flex justify-between align-center">
  68. <view class="text-white flex align-center userNameleng">
  69. <view class="text-white" style="font-size: 28rpx;">
  70. {{item.userName}}
  71. </view>
  72. <text class="text-grey"
  73. style="font-size: 22rpx;margin-left: 10rpx;"><text v-if="item.companyName">{{item.companyName}} |</text> {{item.stationName}}
  74. </text>
  75. </view>
  76. <view class="text-grey">{{item.messageTime?getMonthOrDay(item.messageTime):''}}</view>
  77. </view>
  78. <view class="flex justify-between" style="margin-top: 10rpx;">
  79. <view class="text-grey" v-if="item.messageType == 1">{{item.content}}</view>
  80. <view class="text-grey" v-else-if="item.messageType == 18">位置</view>
  81. <view class="text-grey" v-else-if="item.messageType == 9">简历请求</view>
  82. <view class="text-grey" v-else-if="item.messageType == 6">微信请求</view>
  83. <view class="text-grey" v-else-if="item.messageType == 5">手机号请求</view>
  84. <view class="text-grey" v-else-if="item.messageType == 2">[图片]</view>
  85. <view class="text-grey" v-else-if="item.messageType == 4"><image class="chat-listitem-text"
  86. v-if="item.content && item.messageType === 4"
  87. :src="ossUrl +item.content"
  88. style="height: 40rpx;width: 40rpx;"></image></view>
  89. <view class="text-grey" v-else-if="item.messageType == 20">[视频通话]</view>
  90. <view class="text-grey" v-else-if="item.messageType == 21">[语音通话]</view>
  91. <view v-if="item.contentCount"
  92. style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
  93. {{item.contentCount}}
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- <view class="flex padding-tb" v-else>
  99. <view>
  100. <u-image shape="circle" width='80rpx' height="80rpx" :src="item.avatar"></u-image>
  101. </view>
  102. <view class="flex-sub margin-left-sm">
  103. <view class="flex justify-between">
  104. <view class="text-white">{{item.userName}}</view>
  105. <view class="text-grey">{{item.messageTime?item.messageTime:''}}</view>
  106. </view>
  107. <view class="flex justify-between">
  108. <view class="text-grey" v-if="item.messageType == 1">{{item.content}}</view>
  109. <view class="text-grey" v-else-if="item.messageType == 18">位置</view>
  110. <view class="text-grey" v-else-if="item.messageType == 9">简历请求</view>
  111. <view class="text-grey" v-else-if="item.messageType == 6">微信请求</view>
  112. <view class="text-grey" v-else-if="item.messageType == 5">手机号请求</view>
  113. <view class="text-grey" v-else>[图片]</view>
  114. <view v-if="item.contentCount"
  115. style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
  116. {{item.contentCount}}
  117. </view>
  118. </view>
  119. </view>
  120. </view> -->
  121. </view>
  122. </view>
  123. <empty v-if="!chatList.length" content='暂无消息'></empty>
  124. <!-- 消息设置弹窗 -->
  125. <u-popup v-model="showSettings" mode="bottom" :mask-close-able="true" border-radius="20">
  126. <view class="settings-modal">
  127. <view class="modal-drag-bar"></view>
  128. <view class="modal-title">消息设置</view>
  129. <!-- 消息通知开关 -->
  130. <view class="setting-item setting-item-first">
  131. <view class="setting-left">
  132. <view class="setting-title-row">
  133. <view class="setting-label">消息通知开关</view>
  134. <view class="setting-desc">关闭后将不再向你推送消息通知</view>
  135. </view>
  136. <view class="switch-status" :class="{ 'status-on': notificationEnabled, 'status-off': !notificationEnabled }">
  137. {{ notificationEnabled ? 'On' : 'Off' }}
  138. </view>
  139. </view>
  140. <view class="setting-right">
  141. <u-switch v-model="notificationEnabled" active-color="#007AFF" @change="toggleNotification"></u-switch>
  142. </view>
  143. </view>
  144. <!-- 招呼语设置 -->
  145. <view class="setting-item" @click="goGreetingSettings">
  146. <view class="setting-left">
  147. <view class="setting-label">招呼语设置</view>
  148. </view>
  149. <view class="setting-right">
  150. <view class="setting-desc">设置后,沟通时可自动发送设置的招呼语</view>
  151. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  152. </view>
  153. </view>
  154. <!-- 常用语设置 -->
  155. <view class="setting-item" @click="goCommonPhrases">
  156. <view class="setting-left">
  157. <view class="setting-label">常用语设置</view>
  158. </view>
  159. <view class="setting-right">
  160. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  161. </view>
  162. </view>
  163. </view>
  164. </u-popup>
  165. </view>
  166. </template>
  167. <script>
  168. import empty from '../../components/empty.vue'
  169. import configData from '../../common/config.js'
  170. export default {
  171. components: {
  172. empty
  173. },
  174. data() {
  175. return {
  176. BarHeight:'',
  177. page: 1,
  178. limit: 100,
  179. chatList: [],
  180. userId: '',
  181. msgList: [],
  182. time: '',
  183. messageCount: 0,
  184. userCount: 0,
  185. arr: [],
  186. showModal: true,
  187. showSettings: false, // 控制设置弹窗显示
  188. notificationEnabled: true, // 消息通知开关状态
  189. ossUrl:configData.ossUrl
  190. }
  191. },
  192. onLoad() {
  193. if (uni.getStorageSync('userId')) {
  194. this.getChatList()
  195. }
  196. },
  197. //下拉刷新
  198. onPullDownRefresh() {
  199. let that = this
  200. if (uni.getStorageSync('token')) {
  201. that.getweiduMsg();
  202. that.getChatList()
  203. that.getMsgList()
  204. that.$nextTick(function() {
  205. that.messageCount = uni.getStorageSync('messageCount')
  206. })
  207. }
  208. },
  209. onShow() {
  210. // #ifdef APP-PLUS
  211. let systemInfo = uni.getSystemInfoSync();
  212. this.BarHeight = systemInfo.statusBarHeight;
  213. // #endif
  214. let that = this
  215. that.userId = uni.getStorageSync('userId')
  216. if (that.userId) {
  217. that.time = setInterval(function() {
  218. that.getweiduMsg();
  219. that.getChatList()
  220. that.getMsgList()
  221. that.$nextTick(function() {
  222. that.messageCount = uni.getStorageSync('messageCount')
  223. })
  224. }, 3000)
  225. this.$Request.getT('/app/common/type/310').then(res => { //消息未读提醒
  226. if (res.code == 0) {
  227. if (res.data && res.data.value) {
  228. this.arr.push(res.data.value)
  229. }
  230. }
  231. })
  232. this.$Request.getT('/app/common/type/337').then(res => { //预约成功通知(通用)
  233. if (res.code == 0) {
  234. if (res.data && res.data.value) {
  235. this.arr.push(res.data.value)
  236. }
  237. }
  238. })
  239. this.$Request.getT('/app/common/type/338').then(res => { //订单状态通知
  240. if (res.code == 0) {
  241. if (res.data && res.data.value) {
  242. this.arr.push(res.data.value)
  243. }
  244. }
  245. })
  246. // #ifdef MP-WEIXIN
  247. if (this.showModal) {
  248. this.openMsg()
  249. }
  250. // #endif
  251. } else {
  252. that.chatList = []
  253. that.msgList = []
  254. }
  255. },
  256. onHide() {
  257. clearInterval(this.time)
  258. },
  259. methods: {
  260. //把时间转换为月日
  261. getMonthOrDay(time) {
  262. let date = new Date(time) // 获取时间
  263. // var year = date.getFullYear() // 获取年
  264. let month = date.getMonth() + 1 // 获取月
  265. let strDate = date.getDate() // 获取日
  266. return month + '月' + strDate + '日'
  267. },
  268. // 开启订阅消息
  269. openMsg() {
  270. console.log('订阅消息')
  271. var that = this
  272. uni.getSetting({
  273. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  274. success(ret) {
  275. console.log(ret.subscriptionsSetting.itemSettings, '*************************************')
  276. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  277. if (ret.subscriptionsSetting.itemSettings) {
  278. uni.setStorageSync('sendMsg', true)
  279. uni.openSetting({ // 打开设置页
  280. success(rea) {
  281. console.log(rea.authSetting)
  282. }
  283. });
  284. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  285. uni.setStorageSync('sendMsg', false)
  286. uni.showModal({
  287. title: '提示',
  288. content: '为了更好的体验,请绑定消息推送',
  289. confirmText: '确定',
  290. cancelText: '取消',
  291. confirmColor: '#016BF6',
  292. success: function(res) {
  293. if (res.confirm) {
  294. wx.requestSubscribeMessage({
  295. tmplIds: that.arr,
  296. success(re) {
  297. console.log(JSON.stringify(re),
  298. '++++++++++++++')
  299. var datas = JSON.stringify(re);
  300. if (datas.indexOf("accept") != -1) {
  301. console.log(re)
  302. // uni.setStorageSync('sendMsg', true)
  303. }
  304. },
  305. fail: (res) => {
  306. console.log(res)
  307. }
  308. })
  309. // uni.setStorageSync('sendMsg', true)
  310. console.log('确认')
  311. that.showModal = false
  312. } else if (res.cancel) {
  313. console.log('取消')
  314. // uni.setStorageSync('sendMsg', false)
  315. that.showModal = true
  316. }
  317. }
  318. })
  319. }
  320. }
  321. })
  322. },
  323. getweiduMsg() {
  324. this.$Request.get("/app/chats/userCount").then(res => {
  325. uni.stopPullDownRefresh()
  326. if (res.code == 0) {
  327. this.userCount = res.data
  328. }
  329. });
  330. },
  331. //在线客服
  332. goChat() {
  333. // uni.navigateTo({
  334. // url:'/my/setting/chat'
  335. // })
  336. // #ifdef MP-WEIXIN
  337. if (uni.getStorageSync('sendMsg')) {
  338. // console.log('授权+1')
  339. wx.requestSubscribeMessage({
  340. tmplIds: this.arr,
  341. success(re) {
  342. // console.log(JSON.stringify(re), 111111111111)
  343. var datas = JSON.stringify(re);
  344. if (datas.indexOf("accept") != -1) {
  345. // console.log(re)
  346. }
  347. },
  348. fail: (res) => {
  349. // console.log(res)
  350. }
  351. })
  352. }
  353. // #endif
  354. let that = this
  355. if (uni.getStorageSync('userType') == 1) { //用户端
  356. // #ifdef MP-WEIXIN
  357. wx.openCustomerServiceChat({
  358. extInfo: {
  359. url: that.$queue.getData('kefu')
  360. },
  361. corpId: that.$queue.getData('kefuAppid'),
  362. success(res) {
  363. console.log(res)
  364. },
  365. })
  366. // #endif
  367. // #ifdef H5
  368. window.location.href = that.$queue.getData('kefu');
  369. // #endif
  370. // #ifdef APP
  371. let kefu = that.$queue.getData('kefu')
  372. console.log(kefu)
  373. plus.runtime.openURL(kefu, function(res) {});
  374. // #endif
  375. } else { //企业端
  376. // #ifdef MP-WEIXIN
  377. wx.openCustomerServiceChat({
  378. extInfo: {
  379. url: that.$queue.getData('kefuq')
  380. },
  381. corpId: that.$queue.getData('kefuAppidq'),
  382. success(res) {
  383. console.log(res)
  384. },
  385. })
  386. // #endif
  387. // #ifdef H5
  388. window.location.href = that.$queue.getData('kefuq');
  389. // #endif
  390. // #ifdef APP
  391. let kefu = that.$queue.getData('kefuq')
  392. console.log(kefu)
  393. plus.runtime.openURL(kefu, function(res) {});
  394. // #endif
  395. }
  396. },
  397. getChatList() {
  398. this.$Request.get("/app/chat/selectChatConversationPage", {
  399. page: this.page,
  400. limit: this.limit
  401. }).then(res => {
  402. uni.stopPullDownRefresh()
  403. if (res.code == 0) {
  404. this.chatList = res.data.list
  405. }
  406. });
  407. },
  408. getMsgList() {
  409. this.$Request.get("/app/message/selectMessageByUserIdLimit1").then(res => {
  410. uni.stopPullDownRefresh()
  411. if (res.code == 0) {
  412. this.msgList = res.data.list
  413. }
  414. });
  415. },
  416. goIM(e) {
  417. // #ifdef MP-WEIXIN
  418. if (uni.getStorageSync('sendMsg')) {
  419. // console.log('授权+1')
  420. wx.requestSubscribeMessage({
  421. tmplIds: this.arr,
  422. success(re) {
  423. // console.log(JSON.stringify(re), 111111111111)
  424. var datas = JSON.stringify(re);
  425. if (datas.indexOf("accept") != -1) {
  426. // console.log(re)
  427. }
  428. },
  429. fail: (res) => {
  430. // console.log(res)
  431. }
  432. })
  433. }
  434. // #endif
  435. let userId = '';
  436. let userType = uni.getStorageSync('userType')
  437. console.log(e, 'aaaaaaaaa')
  438. if (userType == 2) { //当前登录用户为企业
  439. userId = e.userId
  440. } else { //当前登录用户为用户
  441. userId = e.focusedUserId
  442. }
  443. if (uni.getStorageSync('userType') == 1) {
  444. uni.navigateTo({
  445. url: '/pages/msg/im?chatConversationId=' + e.chatConversationId + '&byUserId=' + userId +
  446. '&postPushId=' + e.postPushId + '&resumesId=' + e.resumesId
  447. })
  448. } else {
  449. uni.navigateTo({
  450. url: '/pages/msg/im?chatConversationId=' + e.chatConversationId + '&byUserId=' + userId +
  451. '&resumesId=' + e.resumesId + '&postPushId=' + e.postPushId
  452. })
  453. }
  454. },
  455. goMsg() {
  456. // #ifdef MP-WEIXIN
  457. if (uni.getStorageSync('sendMsg')) {
  458. // console.log('授权+1')
  459. wx.requestSubscribeMessage({
  460. tmplIds: this.arr,
  461. success(re) {
  462. // console.log(JSON.stringify(re), 111111111111)
  463. var datas = JSON.stringify(re);
  464. if (datas.indexOf("accept") != -1) {
  465. // console.log(re)
  466. }
  467. },
  468. fail: (res) => {
  469. // console.log(res)
  470. }
  471. })
  472. }
  473. // #endif
  474. uni.navigateTo({
  475. url: '/pages/msg/message'
  476. })
  477. },
  478. // 显示设置弹窗
  479. showSettingsModal() {
  480. this.showSettings = true
  481. },
  482. // 切换通知开关
  483. toggleNotification() {
  484. // 开关状态已经通过v-model自动更新,这里可以添加其他逻辑
  485. console.log('通知开关状态:', this.notificationEnabled)
  486. },
  487. // 招呼语设置
  488. goGreetingSettings() {
  489. uni.navigateTo({
  490. url: '/pages/msg/addmsg'
  491. })
  492. },
  493. // 常用语设置
  494. goCommonPhrases() {
  495. uni.navigateTo({
  496. url: '/pages/msg/addmsg'
  497. })
  498. },
  499. // 搜索功能
  500. goSearch() {
  501. uni.navigateTo({
  502. url: '/pages/msg/search'
  503. })
  504. }
  505. }
  506. }
  507. </script>
  508. <style lang="scss">
  509. .msg-box {
  510. // padding-top: 80rpx;
  511. .chat-title {
  512. background: linear-gradient(180deg, rgba(13, 39, 247, 1) 0%, rgb(191, 194, 201) 100%);
  513. -webkit-background-clip: text;
  514. background-clip: text;
  515. -webkit-text-fill-color: transparent;
  516. color: transparent;
  517. font-family: DM Sans;
  518. font-size: 42rpx;
  519. font-weight: 500;
  520. line-height: 28px;
  521. letter-spacing: 0%;
  522. text-align: left;
  523. margin: 20rpx 0 20rpx 20rpx;
  524. }
  525. .margin-top-sm {
  526. margin-top: 0 !important;
  527. }
  528. .nav-header {
  529. height: 80rpx;
  530. display: flex;
  531. align-items: center;
  532. justify-content: space-between;
  533. padding: 0 20rpx;
  534. }
  535. .nav-left {
  536. width: 60rpx;
  537. display: flex;
  538. justify-content: flex-start;
  539. }
  540. .nav-center {
  541. flex: 1;
  542. display: flex;
  543. justify-content: center;
  544. }
  545. .nav-title {
  546. font-size: 36rpx;
  547. font-weight: 600;
  548. color: #333333;
  549. }
  550. .nav-right {
  551. width: 60rpx;
  552. display: flex;
  553. justify-content: flex-end;
  554. align-items: center;
  555. }
  556. .bg {
  557. background: #FFFFFF;
  558. }
  559. .userNameleng {
  560. width: 80%;
  561. overflow: hidden;
  562. white-space: nowrap;
  563. text-overflow: ellipsis;
  564. -o-text-overflow: ellipsis;
  565. }
  566. .avatar-container {
  567. position: relative;
  568. display: inline-block;
  569. }
  570. .online-dot {
  571. position: absolute;
  572. bottom: 2rpx;
  573. right: 2rpx;
  574. width: 20rpx;
  575. height: 20rpx;
  576. background-color: #00FF00;
  577. border-radius: 50%;
  578. border: 2rpx solid #FFFFFF;
  579. }
  580. }
  581. // 设置弹窗样式
  582. .settings-modal {
  583. background: #FFFFFF;
  584. border-radius: 20rpx 20rpx 0 0;
  585. padding: 0 30rpx 40rpx 30rpx;
  586. min-width: 100%;
  587. .modal-drag-bar {
  588. width: 60rpx;
  589. height: 8rpx;
  590. background: #E5E5E5;
  591. border-radius: 4rpx;
  592. margin: 20rpx auto 30rpx auto;
  593. }
  594. .modal-title {
  595. margin: 0 auto;
  596. color: rgba(34, 37, 42, 1);
  597. font-family: DM Sans;
  598. font-size: 36rpx;
  599. font-weight: 500;
  600. line-height: 23px;
  601. letter-spacing: 0px;
  602. text-align: center;
  603. padding-bottom: 20rpx;
  604. border-bottom: 1rpx solid rgba(219, 218, 218, 1);
  605. }
  606. .setting-item {
  607. display: flex;
  608. align-items: center;
  609. justify-content: space-between;
  610. padding: 12rpx 32rpx;
  611. margin-bottom: 30rpx;
  612. border: 1px solid rgba(227, 231, 236, 1);
  613. border-radius: 6px;
  614. &:active {
  615. background-color: #F8F8F8;
  616. }
  617. &.setting-item-first {
  618. border: none;
  619. padding: 40rpx 32rpx;
  620. }
  621. .setting-left {
  622. display: flex;
  623. flex-direction: column;
  624. align-items: flex-start;
  625. flex: 1;
  626. .setting-title-row {
  627. display: flex;
  628. align-items: center;
  629. justify-content: flex-start;
  630. width: 100%;
  631. margin-bottom: 16rpx;
  632. .setting-label {
  633. color: rgba(21, 22, 26, 1);
  634. font-family: DM Sans;
  635. font-size: 32rpx;
  636. font-weight: 600;
  637. line-height: 26px;
  638. letter-spacing: 0%;
  639. text-align: left;
  640. margin-right: 16rpx;
  641. }
  642. .setting-desc {
  643. color: rgba(153, 153, 153, 1);
  644. font-family: DM Sans;
  645. font-size: 22rpx;
  646. font-weight: 400;
  647. line-height: 13px;
  648. letter-spacing: 0%;
  649. text-align: left;
  650. }
  651. }
  652. .switch-status {
  653. font-size: 32rpx;
  654. &.status-on {
  655. color: #007AFF;
  656. }
  657. &.status-off {
  658. color: #999999;
  659. }
  660. }
  661. }
  662. .setting-right {
  663. display: flex;
  664. align-items: center;
  665. justify-content: flex-end;
  666. .u-switch {
  667. margin-top: 20rpx;
  668. transform: scale(1.2); // 放大开关到1.5倍
  669. }
  670. .setting-desc {
  671. color: rgba(153, 153, 153, 1);
  672. font-family: DM Sans;
  673. font-size: 22rpx;
  674. font-weight: 400;
  675. line-height: 13px;
  676. letter-spacing: 0%;
  677. text-align: left;
  678. margin-right: 16rpx;
  679. }
  680. }
  681. }
  682. }
  683. </style>