index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <template>
  2. <view class="msg-box">
  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="'../../static/emoji/' +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. export default {
  170. components: {
  171. empty
  172. },
  173. data() {
  174. return {
  175. page: 1,
  176. limit: 100,
  177. chatList: [],
  178. userId: '',
  179. msgList: [],
  180. time: '',
  181. messageCount: 0,
  182. userCount: 0,
  183. arr: [],
  184. showModal: true,
  185. showSettings: false, // 控制设置弹窗显示
  186. notificationEnabled: true // 消息通知开关状态
  187. }
  188. },
  189. onLoad() {
  190. if (uni.getStorageSync('userId')) {
  191. this.getChatList()
  192. }
  193. },
  194. //下拉刷新
  195. onPullDownRefresh() {
  196. let that = this
  197. if (uni.getStorageSync('token')) {
  198. that.getweiduMsg();
  199. that.getChatList()
  200. that.getMsgList()
  201. that.$nextTick(function() {
  202. that.messageCount = uni.getStorageSync('messageCount')
  203. })
  204. }
  205. },
  206. onShow() {
  207. let that = this
  208. that.userId = uni.getStorageSync('userId')
  209. if (that.userId) {
  210. that.time = setInterval(function() {
  211. that.getweiduMsg();
  212. that.getChatList()
  213. that.getMsgList()
  214. that.$nextTick(function() {
  215. that.messageCount = uni.getStorageSync('messageCount')
  216. })
  217. }, 3000)
  218. this.$Request.getT('/app/common/type/310').then(res => { //消息未读提醒
  219. if (res.code == 0) {
  220. if (res.data && res.data.value) {
  221. this.arr.push(res.data.value)
  222. }
  223. }
  224. })
  225. this.$Request.getT('/app/common/type/337').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/338').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. // #ifdef MP-WEIXIN
  240. if (this.showModal) {
  241. this.openMsg()
  242. }
  243. // #endif
  244. } else {
  245. that.chatList = []
  246. that.msgList = []
  247. }
  248. },
  249. onHide() {
  250. clearInterval(this.time)
  251. },
  252. methods: {
  253. //把时间转换为月日
  254. getMonthOrDay(time) {
  255. let date = new Date(time) // 获取时间
  256. // var year = date.getFullYear() // 获取年
  257. let month = date.getMonth() + 1 // 获取月
  258. let strDate = date.getDate() // 获取日
  259. return month + '月' + strDate + '日'
  260. },
  261. // 开启订阅消息
  262. openMsg() {
  263. console.log('订阅消息')
  264. var that = this
  265. uni.getSetting({
  266. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  267. success(ret) {
  268. console.log(ret.subscriptionsSetting.itemSettings, '*************************************')
  269. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  270. if (ret.subscriptionsSetting.itemSettings) {
  271. uni.setStorageSync('sendMsg', true)
  272. uni.openSetting({ // 打开设置页
  273. success(rea) {
  274. console.log(rea.authSetting)
  275. }
  276. });
  277. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  278. uni.setStorageSync('sendMsg', false)
  279. uni.showModal({
  280. title: '提示',
  281. content: '为了更好的体验,请绑定消息推送',
  282. confirmText: '确定',
  283. cancelText: '取消',
  284. confirmColor: '#016BF6',
  285. success: function(res) {
  286. if (res.confirm) {
  287. wx.requestSubscribeMessage({
  288. tmplIds: that.arr,
  289. success(re) {
  290. console.log(JSON.stringify(re),
  291. '++++++++++++++')
  292. var datas = JSON.stringify(re);
  293. if (datas.indexOf("accept") != -1) {
  294. console.log(re)
  295. // uni.setStorageSync('sendMsg', true)
  296. }
  297. },
  298. fail: (res) => {
  299. console.log(res)
  300. }
  301. })
  302. // uni.setStorageSync('sendMsg', true)
  303. console.log('确认')
  304. that.showModal = false
  305. } else if (res.cancel) {
  306. console.log('取消')
  307. // uni.setStorageSync('sendMsg', false)
  308. that.showModal = true
  309. }
  310. }
  311. })
  312. }
  313. }
  314. })
  315. },
  316. getweiduMsg() {
  317. this.$Request.get("/app/chats/userCount").then(res => {
  318. uni.stopPullDownRefresh()
  319. if (res.code == 0) {
  320. this.userCount = res.data
  321. }
  322. });
  323. },
  324. //在线客服
  325. goChat() {
  326. // uni.navigateTo({
  327. // url:'/my/setting/chat'
  328. // })
  329. // #ifdef MP-WEIXIN
  330. if (uni.getStorageSync('sendMsg')) {
  331. // console.log('授权+1')
  332. wx.requestSubscribeMessage({
  333. tmplIds: this.arr,
  334. success(re) {
  335. // console.log(JSON.stringify(re), 111111111111)
  336. var datas = JSON.stringify(re);
  337. if (datas.indexOf("accept") != -1) {
  338. // console.log(re)
  339. }
  340. },
  341. fail: (res) => {
  342. // console.log(res)
  343. }
  344. })
  345. }
  346. // #endif
  347. let that = this
  348. if (uni.getStorageSync('userType') == 1) { //用户端
  349. // #ifdef MP-WEIXIN
  350. wx.openCustomerServiceChat({
  351. extInfo: {
  352. url: that.$queue.getData('kefu')
  353. },
  354. corpId: that.$queue.getData('kefuAppid'),
  355. success(res) {
  356. console.log(res)
  357. },
  358. })
  359. // #endif
  360. // #ifdef H5
  361. window.location.href = that.$queue.getData('kefu');
  362. // #endif
  363. // #ifdef APP
  364. let kefu = that.$queue.getData('kefu')
  365. console.log(kefu)
  366. plus.runtime.openURL(kefu, function(res) {});
  367. // #endif
  368. } else { //企业端
  369. // #ifdef MP-WEIXIN
  370. wx.openCustomerServiceChat({
  371. extInfo: {
  372. url: that.$queue.getData('kefuq')
  373. },
  374. corpId: that.$queue.getData('kefuAppidq'),
  375. success(res) {
  376. console.log(res)
  377. },
  378. })
  379. // #endif
  380. // #ifdef H5
  381. window.location.href = that.$queue.getData('kefuq');
  382. // #endif
  383. // #ifdef APP
  384. let kefu = that.$queue.getData('kefuq')
  385. console.log(kefu)
  386. plus.runtime.openURL(kefu, function(res) {});
  387. // #endif
  388. }
  389. },
  390. getChatList() {
  391. this.$Request.get("/app/chat/selectChatConversationPage", {
  392. page: this.page,
  393. limit: this.limit
  394. }).then(res => {
  395. uni.stopPullDownRefresh()
  396. if (res.code == 0) {
  397. this.chatList = res.data.list
  398. }
  399. });
  400. },
  401. getMsgList() {
  402. this.$Request.get("/app/message/selectMessageByUserIdLimit1").then(res => {
  403. uni.stopPullDownRefresh()
  404. if (res.code == 0) {
  405. this.msgList = res.data.list
  406. }
  407. });
  408. },
  409. goIM(e) {
  410. // #ifdef MP-WEIXIN
  411. if (uni.getStorageSync('sendMsg')) {
  412. // console.log('授权+1')
  413. wx.requestSubscribeMessage({
  414. tmplIds: this.arr,
  415. success(re) {
  416. // console.log(JSON.stringify(re), 111111111111)
  417. var datas = JSON.stringify(re);
  418. if (datas.indexOf("accept") != -1) {
  419. // console.log(re)
  420. }
  421. },
  422. fail: (res) => {
  423. // console.log(res)
  424. }
  425. })
  426. }
  427. // #endif
  428. let userId = '';
  429. let userType = uni.getStorageSync('userType')
  430. console.log(e, 'aaaaaaaaa')
  431. if (userType == 2) { //当前登录用户为企业
  432. userId = e.userId
  433. } else { //当前登录用户为用户
  434. userId = e.focusedUserId
  435. }
  436. if (uni.getStorageSync('userType') == 1) {
  437. uni.navigateTo({
  438. url: '/pages/msg/im?chatConversationId=' + e.chatConversationId + '&byUserId=' + userId +
  439. '&postPushId=' + e.postPushId + '&resumesId=' + e.resumesId
  440. })
  441. } else {
  442. uni.navigateTo({
  443. url: '/pages/msg/im?chatConversationId=' + e.chatConversationId + '&byUserId=' + userId +
  444. '&resumesId=' + e.resumesId + '&postPushId=' + e.postPushId
  445. })
  446. }
  447. },
  448. goMsg() {
  449. // #ifdef MP-WEIXIN
  450. if (uni.getStorageSync('sendMsg')) {
  451. // console.log('授权+1')
  452. wx.requestSubscribeMessage({
  453. tmplIds: this.arr,
  454. success(re) {
  455. // console.log(JSON.stringify(re), 111111111111)
  456. var datas = JSON.stringify(re);
  457. if (datas.indexOf("accept") != -1) {
  458. // console.log(re)
  459. }
  460. },
  461. fail: (res) => {
  462. // console.log(res)
  463. }
  464. })
  465. }
  466. // #endif
  467. uni.navigateTo({
  468. url: '/pages/msg/message'
  469. })
  470. },
  471. // 显示设置弹窗
  472. showSettingsModal() {
  473. this.showSettings = true
  474. },
  475. // 切换通知开关
  476. toggleNotification() {
  477. // 开关状态已经通过v-model自动更新,这里可以添加其他逻辑
  478. console.log('通知开关状态:', this.notificationEnabled)
  479. },
  480. // 招呼语设置
  481. goGreetingSettings() {
  482. uni.navigateTo({
  483. url: '/pages/msg/addmsg'
  484. })
  485. },
  486. // 常用语设置
  487. goCommonPhrases() {
  488. uni.navigateTo({
  489. url: '/pages/msg/addmsg'
  490. })
  491. },
  492. // 搜索功能
  493. goSearch() {
  494. uni.navigateTo({
  495. url: '/pages/msg/search'
  496. })
  497. }
  498. }
  499. }
  500. </script>
  501. <style lang="scss">
  502. .msg-box {
  503. padding-top: 80rpx;
  504. .chat-title {
  505. background: linear-gradient(180deg, rgba(13, 39, 247, 1) 0%, rgb(191, 194, 201) 100%);
  506. -webkit-background-clip: text;
  507. background-clip: text;
  508. -webkit-text-fill-color: transparent;
  509. color: transparent;
  510. font-family: DM Sans;
  511. font-size: 42rpx;
  512. font-weight: 500;
  513. line-height: 28px;
  514. letter-spacing: 0%;
  515. text-align: left;
  516. margin: 20rpx 0 20rpx 20rpx;
  517. }
  518. .margin-top-sm {
  519. margin-top: 0 !important;
  520. }
  521. .nav-header {
  522. height: 80rpx;
  523. display: flex;
  524. align-items: center;
  525. justify-content: space-between;
  526. padding: 0 20rpx;
  527. }
  528. .nav-left {
  529. width: 60rpx;
  530. display: flex;
  531. justify-content: flex-start;
  532. }
  533. .nav-center {
  534. flex: 1;
  535. display: flex;
  536. justify-content: center;
  537. }
  538. .nav-title {
  539. font-size: 36rpx;
  540. font-weight: 600;
  541. color: #333333;
  542. }
  543. .nav-right {
  544. width: 60rpx;
  545. display: flex;
  546. justify-content: flex-end;
  547. align-items: center;
  548. }
  549. .bg {
  550. background: #FFFFFF;
  551. }
  552. .userNameleng {
  553. width: 80%;
  554. overflow: hidden;
  555. white-space: nowrap;
  556. text-overflow: ellipsis;
  557. -o-text-overflow: ellipsis;
  558. }
  559. .avatar-container {
  560. position: relative;
  561. display: inline-block;
  562. }
  563. .online-dot {
  564. position: absolute;
  565. bottom: 2rpx;
  566. right: 2rpx;
  567. width: 20rpx;
  568. height: 20rpx;
  569. background-color: #00FF00;
  570. border-radius: 50%;
  571. border: 2rpx solid #FFFFFF;
  572. }
  573. }
  574. // 设置弹窗样式
  575. .settings-modal {
  576. background: #FFFFFF;
  577. border-radius: 20rpx 20rpx 0 0;
  578. padding: 0 30rpx 40rpx 30rpx;
  579. min-width: 100%;
  580. .modal-drag-bar {
  581. width: 60rpx;
  582. height: 8rpx;
  583. background: #E5E5E5;
  584. border-radius: 4rpx;
  585. margin: 20rpx auto 30rpx auto;
  586. }
  587. .modal-title {
  588. margin: 0 auto;
  589. color: rgba(34, 37, 42, 1);
  590. font-family: DM Sans;
  591. font-size: 36rpx;
  592. font-weight: 500;
  593. line-height: 23px;
  594. letter-spacing: 0px;
  595. text-align: center;
  596. padding-bottom: 20rpx;
  597. border-bottom: 1rpx solid rgba(219, 218, 218, 1);
  598. }
  599. .setting-item {
  600. display: flex;
  601. align-items: center;
  602. justify-content: space-between;
  603. padding: 12rpx 32rpx;
  604. margin-bottom: 30rpx;
  605. border: 1px solid rgba(227, 231, 236, 1);
  606. border-radius: 6px;
  607. &:active {
  608. background-color: #F8F8F8;
  609. }
  610. &.setting-item-first {
  611. border: none;
  612. padding: 40rpx 32rpx;
  613. }
  614. .setting-left {
  615. display: flex;
  616. flex-direction: column;
  617. align-items: flex-start;
  618. flex: 1;
  619. .setting-title-row {
  620. display: flex;
  621. align-items: center;
  622. justify-content: flex-start;
  623. width: 100%;
  624. margin-bottom: 16rpx;
  625. .setting-label {
  626. color: rgba(21, 22, 26, 1);
  627. font-family: DM Sans;
  628. font-size: 32rpx;
  629. font-weight: 600;
  630. line-height: 26px;
  631. letter-spacing: 0%;
  632. text-align: left;
  633. margin-right: 16rpx;
  634. }
  635. .setting-desc {
  636. color: rgba(153, 153, 153, 1);
  637. font-family: DM Sans;
  638. font-size: 22rpx;
  639. font-weight: 400;
  640. line-height: 13px;
  641. letter-spacing: 0%;
  642. text-align: left;
  643. }
  644. }
  645. .switch-status {
  646. font-size: 32rpx;
  647. &.status-on {
  648. color: #007AFF;
  649. }
  650. &.status-off {
  651. color: #999999;
  652. }
  653. }
  654. }
  655. .setting-right {
  656. display: flex;
  657. align-items: center;
  658. justify-content: flex-end;
  659. .u-switch {
  660. margin-top: 20rpx;
  661. transform: scale(1.2); // 放大开关到1.5倍
  662. }
  663. .setting-desc {
  664. color: rgba(153, 153, 153, 1);
  665. font-family: DM Sans;
  666. font-size: 22rpx;
  667. font-weight: 400;
  668. line-height: 13px;
  669. letter-spacing: 0%;
  670. text-align: left;
  671. margin-right: 16rpx;
  672. }
  673. }
  674. }
  675. }
  676. </style>