mine.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. <template>
  2. <view class="mine tn-safe-area-inset-bottom">
  3. <!-- 顶部自定义导航 -->
  4. <view class="top-backgroup">
  5. <image src='../../static/Group_1890181699.png' mode='widthFix' class='backgroud-image'></image>
  6. </view>
  7. <view class="about__wrap" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
  8. <!-- 图标logo/头像 -->
  9. <view class="tn-flex tn-flex-col-center tn-margin-bottom" @click="tn('/minePages/set')" style="margin-top: -450rpx;justify-content: center;">
  10. <view class="justify-content-item" >
  11. <view class="tn-flex tn-flex-col-center tn-flex-row-left">
  12. <view class="logo-pic tn-shadow">
  13. <view class="logo-image">
  14. <image v-if="personInfo.profilePhotoUrl" class="tn-shadow-blur" style="width: 140rpx;height: 140rpx;background-size: cover;" :src="personInfo.profilePhotoUrl"></image>
  15. <image v-if="!personInfo.profilePhotoUrl" class="tn-shadow-blur" style="width: 140rpx;height: 140rpx;background-size: cover;" src="../../static/me2.png"></image>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 没有授权,则显示这个授权按钮-->
  22. <view class="tn-flex tn-flex-row-between" @click="toLogin('/pages/login/login')" v-if="showLogin">
  23. <view class="tn-flex-1 justify-content-item tn-margin-xs tn-text-center">
  24. <tn-button shape="round" backgroundColor="#1d60b1" fontColor="#ffffff" padding="20rpx 0" width="40%" shadow>
  25. <text class="" :style="{fontSize:(wxFontSize-3)+'px'}">立即登录</text>
  26. </tn-button>
  27. </view>
  28. </view>
  29. <view class="about-shadow tn-margin-top-lg tn-padding-top-sm tn-padding-bottom-sm tn-bg-white" v-if="!showLogin">
  30. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding-sm" style="margin: 0 16px;border-bottom: 1px solid #e6e6e6;" @click="tn('/minePages/set')">
  31. <view class="justify-content-item">
  32. <view class="" style="font-size: 16px;color:#333" :style="{fontSize:(wxFontSize)+'px'}">
  33. 个人信息
  34. </view>
  35. </view>
  36. <view class="justify-content-item tn-text-lg tn-color-grey">
  37. <view class="tn-color-gray tn-padding-top-xs">
  38. <view class="tn-icon-right"></view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding-sm" style="margin: 0 16px;border-bottom: 1px solid #e6e6e6;">
  43. <view class="justify-content-item">
  44. <view class="" style="font-size: 16px;;color:#333" :style="{fontSize:(wxFontSize-1)+'px'}">
  45. 用户名
  46. </view>
  47. </view>
  48. <view class="justify-content-item tn-text-lg tn-color-grey">
  49. <view class="tn-color-gray tn-padding-top-xs" :style="{fontSize:(wxFontSize-2)+'px'}">
  50. {{personInfo.userRealName||personInfo.contactNickName||(personInfo.userName?'用户'+personInfo.userName.slice(-4):'')||'未登录'}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding-sm" style="border-bottom: 1px solid #e6e6e6;margin: 0 16px;">
  55. <view class="justify-content-item">
  56. <view class="" style="font-size: 16px;;color:#333" :style="{fontSize:(wxFontSize-1)+'px'}">
  57. 联系方式
  58. </view>
  59. </view>
  60. <view class="justify-content-item tn-text-lg tn-color-grey">
  61. <view class="tn-color-gray tn-padding-top-xs" :style="{fontSize:(wxFontSize-2)+'px'}">
  62. {{personInfo.contactMethod||personInfo.userName||''}}
  63. </view>
  64. </view>
  65. </view>
  66. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding-sm" style="margin: 0 16px;">
  67. <view class="justify-content-item">
  68. <view class="" style="font-size: 16px;color:#333" :style="{fontSize:(wxFontSize-1)+'px'}">
  69. 手机号
  70. </view>
  71. </view>
  72. <view class="justify-content-item tn-text-lg tn-color-grey">
  73. <view class="tn-color-gray tn-padding-top-xs" :style="{fontSize:(wxFontSize-2)+'px'}">
  74. {{personInfo.userName||'未登录'}}
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <!-- 方式15 start-->
  80. <view class="tn-flex tn-flex-row-between tn-bg-white about-shadow tn-margin-top-xl" style="padding-left: 12px;padding-right: 12px;">
  81. <view class="tn-padding" @click="tn('/pages/mine/need')">
  82. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
  83. <!-- <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;position: relative;"> -->
  84. <!-- <tn-badge absolute="true" v-if="needNum>0">
  85. <span style="color: #fff;font-size: 11px;
  86. background: #E83A30;
  87. width: 20px;
  88. height: 20px;
  89. text-align: center;
  90. border-radius: 20px;
  91. line-height: 20px;">{{needNum}}</span>
  92. </tn-badge> -->
  93. <!-- <view class="tn-icon-like"></view>
  94. </view> -->
  95. <view>
  96. <img style="width:38px;height: 38px; margin-bottom: 7px;" src='/static/Group_1890181704.png'/>
  97. </view>
  98. <view class="tn-text-center">
  99. <text class="tn-text-ellipsis" :style="{fontSize:(wxFontSize-1)+'px'}">我的需求</text>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="tn-padding" @click="tn('/pages/mine/share')">
  104. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
  105. <!-- <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;position: relative;"> -->
  106. <!-- <tn-badge absolute="true" v-if="shareNum>0">
  107. <span style="color: #fff;font-size: 11px;
  108. background: #E83A30;
  109. width: 20px;
  110. height: 20px;
  111. text-align: center;
  112. border-radius: 20px;
  113. line-height: 20px;">{{shareNum}}</span>
  114. </tn-badge> -->
  115. <!-- <view class="tn-icon-share-triangle"></view>
  116. </view> -->
  117. <view>
  118. <img style="width:38px;height: 38px; margin-bottom: 7px;" src='/static/Group_1890181703.png'/>
  119. </view>
  120. <view class="tn-text-center">
  121. <text class="tn-text-ellipsis" :style="{fontSize:(wxFontSize-1)+'px'}">我的供应</text>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="tn-padding" @click="tn('/pages/mine/coll')">
  126. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
  127. <!-- <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
  128. <view class="tn-icon-star"></view>
  129. </view> -->
  130. <view>
  131. <img style="width:38px;height: 38px; margin-bottom: 7px;" src='/static/Group_1890181702.png'/>
  132. </view>
  133. <view class="tn-text-center">
  134. <text class="tn-text-ellipsis" :style="{fontSize:(wxFontSize-1)+'px'}">我的收藏</text>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <!-- 方式15 end-->
  140. <view class="about-shadow tn-margin-top-lg tn-margin-bottom-lg tn-padding-top-sm tn-padding-bottom-sm">
  141. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30">
  142. <button class="tn-flex tn-flex-col-center tn-button--clear-style" @click="showFeedback" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  143. <view
  144. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  145. <!-- <view class="tn-icon-message-fill" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  146. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_890181710.png'/>
  147. </view>
  148. <view class="tn-flex tn-flex-row-between" style="width: 100%;">
  149. <view class="tn-margin-left-sm" :style="{fontSize:(wxFontSize-1)+'px'}">我有问题</view>
  150. <view class="tn-color-gray tn-icon-right"></view>
  151. </view>
  152. </button>
  153. </tn-list-cell>
  154. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showInfo()">
  155. <view class="tn-flex tn-flex-col-center" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  156. <view
  157. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  158. <!-- <view class="tn-icon-safe-fill" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  159. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181709.png'/>
  160. </view>
  161. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">用户声明</view>
  162. <view class="tn-color-gray tn-icon-right"></view>
  163. </view>
  164. </tn-list-cell>
  165. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showInfo2()">
  166. <view class="tn-flex tn-flex-col-center" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  167. <view
  168. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  169. <!-- <view class="tn-icon-lock" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  170. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181708.png'/>
  171. </view>
  172. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">隐私协议</view>
  173. <view class="tn-color-gray tn-icon-right"></view>
  174. </view>
  175. </tn-list-cell>
  176. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showAbout()">
  177. <view class="tn-flex tn-flex-col-center" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  178. <view
  179. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  180. <!-- <view class="tn-icon-help" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  181. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181707.png'/>
  182. </view>
  183. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">了解速立保</view>
  184. <view class="tn-color-gray tn-icon-right"></view>
  185. </view>
  186. </tn-list-cell>
  187. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showFont()" v-if="showLogin">
  188. <view class="tn-flex tn-flex-col-center" style="line-height: 50px;border-radius: 0;">
  189. <view
  190. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  191. <!-- <view class="tn-icon-font" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  192. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181706.png'/>
  193. </view>
  194. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">字体大小</view>
  195. <view class="tn-color-gray tn-icon-right"></view>
  196. </view>
  197. </tn-list-cell>
  198. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showFont()" v-if="!showLogin">
  199. <view class="tn-flex tn-flex-col-center" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  200. <view
  201. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  202. <!-- <view class="tn-icon-font" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  203. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181706.png'/>
  204. </view>
  205. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">字体大小</view>
  206. <view class="tn-color-gray tn-icon-right"></view>
  207. </view>
  208. </tn-list-cell>
  209. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" v-if="!showLogin" >
  210. <view class="tn-flex tn-flex-col-center" style="border-bottom: 1px solid #E6E6E6;line-height: 50px;border-radius: 0;">
  211. <view
  212. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  213. <view class="tn-icon-message" style="color: #333;" :style="{fontSize:(wxFontSize+2)+'px'}"></view>
  214. <!-- <img style="width:18px;height: 18px; margin-bottom: 0px;" src='/static/Group_1890181705.png'/> -->
  215. </view>
  216. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">接收通知</view>
  217. <view class="tn-color-gray">
  218. <switch color="#46c603" @change="switchChange" :style="{transform:'scale('+(0.9+((wxFontSize-17)/25))+')'}" :checked="personInfo.smsNotice==1" />
  219. </view>
  220. </view>
  221. </tn-list-cell>
  222. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" v-if="!showLogin" @click="showLog()">
  223. <view class="tn-flex tn-flex-col-center" style="line-height: 50px;border-radius: 0;">
  224. <view
  225. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  226. <!-- <view class="tn-icon-my-reduce" :style="{fontSize:(wxFontSize+1)+'px'}"></view> -->
  227. <img style="width:40rpx;height: 40rpx; margin-bottom: 0px;" src='/static/Group_1890181705.png'/>
  228. </view>
  229. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">注销账户</view>
  230. <view class="tn-color-gray tn-icon-right"></view>
  231. </view>
  232. </tn-list-cell>
  233. </view>
  234. <!-- <view class="about-shadow tn-margin-top-lg tn-margin-bottom-lg tn-padding-top-sm tn-padding-bottom-sm" v-if="!showLogin">
  235. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showLogout()">
  236. <view class="tn-flex tn-flex-col-center"> -->
  237. <!-- <view
  238. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  239. <view class="tn-icon-logout" :style="{fontSize:(wxFontSize+1)+'px'}"></view>
  240. </view>
  241. <view class="tn-margin-left-sm tn-flex-1" :style="{fontSize:(wxFontSize-1)+'px'}">退出登录</view>
  242. <view class="tn-color-gray tn-icon-right"></view> -->
  243. <!-- </view>
  244. </tn-list-cell>
  245. </view> -->
  246. <view v-if="!showLogin">
  247. <view :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showLogout()" >
  248. <view style="background-color: rgba(255, 98, 58, 0.1);height: 42px; color: #FF623A; width: 100%;text-align: center;line-height: 42px;border-radius: 8px;">
  249. 退出登录
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. <view class='tn-tabbar-height'></view>
  255. </view>
  256. </template>
  257. <script>
  258. import request from '../../utils/request'
  259. import {
  260. uniShowModal
  261. } from '../../utils/uni_api'
  262. export default {
  263. name: 'Mine',
  264. data() {
  265. return {
  266. personInfo: uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')):{},
  267. showLogin: false,
  268. msgType:'',
  269. shareNum:0,
  270. needNum:0,
  271. wxFontSize:17,
  272. }
  273. },
  274. onReady() {
  275. const appBaseInfo = wx.getAppBaseInfo();
  276. this.wxFontSize = uni.getStorageSync('fontSize')||appBaseInfo.fontSizeSetting||17;
  277. console.warn(this.wxFontSize===20);
  278. this.$nextTick(() => {
  279. if(!uni.getStorageSync('userNo')){
  280. this.showLogin = true;
  281. return false;
  282. }
  283. if(!uni.getStorageSync('loginOut')){
  284. this.getContentRectInfo()
  285. // this.loadNum();
  286. // this.loadNum2();
  287. }
  288. })
  289. },
  290. methods: {
  291. fetchData(){
  292. if(!uni.getStorageSync('userNo')){
  293. this.showLogin = true;
  294. return false;
  295. }
  296. if(!uni.getStorageSync('loginOut')){
  297. this.getContentRectInfo()
  298. // this.loadNum();
  299. // this.loadNum2();
  300. }
  301. },
  302. // 获取内容容器的信息
  303. getContentRectInfo() {
  304. let that = this;
  305. request.post('/slbWxma/getPersonlInfo', {
  306. }).then(res => {
  307. console.warn(res);
  308. if(res&&res.success){
  309. that.personInfo = res.resultMap.userInfo||{};
  310. uni.setStorageSync('userInfo', JSON.stringify(res.resultMap.userInfo));
  311. that.showLogin = false;
  312. }
  313. console.warn(res);
  314. })
  315. },
  316. loadNum(){
  317. let that = this;
  318. request.post('/slbResourceDemand/show/my', {
  319. }).then(res => {
  320. if(res&&res.resultMap){
  321. that.needNum = res.resultMap.passNum||0
  322. }
  323. })
  324. },
  325. loadNum2(){
  326. let that = this;
  327. request.post('/slbResourceShare/show/my', {
  328. }).then(res => {
  329. if(res&&res.resultMap){
  330. that.shareNum = res.resultMap.passNum||0
  331. }
  332. })
  333. },
  334. switchChange: function (e) {
  335. //修改smsNotice
  336. const that = this;
  337. let params= this.personInfo;
  338. params.smsNotice = e.detail.value?1:0;
  339. request.post('/slbWxma/changePersonlInfo',{userInfo:JSON.stringify(params)},{
  340. headers: {
  341. 'Content-Type': 'application/json', // 默认值
  342. },
  343. }).then(res=>{
  344. if(res.success){
  345. uni.showToast({
  346. title:e.detail.value?'开启成功':'关闭成功',
  347. icon:'none'
  348. })
  349. that.getContentRectInfo()
  350. }
  351. })
  352. },
  353. showFont(){
  354. let that = this;
  355. uni.showActionSheet({
  356. itemList: ['跟随微信','小','中','大'],
  357. success: function (res) {
  358. if(res.tapIndex==1){
  359. uni.setStorageSync('fontSize',16)
  360. that.wxFontSize = 16;
  361. uni.reLaunch({
  362. url:'/pages/index/index?index=3'
  363. })
  364. }
  365. if(res.tapIndex==2){
  366. // uni.removeStorageSync('fontSize');
  367. uni.setStorageSync('fontSize',17)
  368. that.wxFontSize = 17;
  369. uni.reLaunch({
  370. url:'/pages/index/index?index=3'
  371. })
  372. }
  373. if(res.tapIndex==3){
  374. uni.setStorageSync('fontSize',20)
  375. that.wxFontSize = 20;
  376. uni.reLaunch({
  377. url:'/pages/index/index?index=3'
  378. })
  379. }
  380. if(res.tapIndex==0){
  381. const appBaseInfo = wx.getAppBaseInfo();
  382. uni.removeStorageSync('fontSize');
  383. that.wxFontSize = appBaseInfo.fontSizeSetting||17;
  384. uni.reLaunch({
  385. url:'/pages/index/index?index=3'
  386. })
  387. }
  388. },
  389. fail: function (res) {
  390. console.log(res.errMsg);
  391. }
  392. });
  393. },
  394. // 跳转
  395. tn(e) {
  396. if(!uni.getStorageSync('userNo')){
  397. uni.setStorageSync('nextPage',e);
  398. uni.navigateTo({
  399. url: '/pages/login/login',
  400. });
  401. return false;
  402. }
  403. uni.navigateTo({
  404. url: e,
  405. });
  406. },
  407. toLogin(e){
  408. uni.navigateTo({
  409. url: e,
  410. });
  411. },
  412. showFeedback(){
  413. uni.navigateTo({
  414. url: '/pages/mine/addFeed',
  415. });
  416. },
  417. showInfo(){
  418. uni.navigateTo({
  419. url: '/pages/login/info?counted=1'
  420. })
  421. },
  422. showInfo2() {
  423. uni.navigateTo({
  424. url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title=隐私协议&url='+'https://oss.lx-device.com/userFeedback/1735201139460G1J.docx'),
  425. })
  426. },
  427. showAbout(){
  428. uni.navigateTo({
  429. url: '/pages/mine/about'
  430. })
  431. },
  432. showLog(){
  433. let that = this;
  434. uniShowModal('确定注销账户吗?', '', {
  435. showCancel: true,
  436. success: (res) => {
  437. console.error(res);
  438. if(res.confirm){
  439. that.logOff();
  440. }
  441. }
  442. })
  443. },
  444. showLogout(){
  445. let that = this;
  446. uniShowModal('确定退出登录吗?', '', {
  447. showCancel: true,
  448. success: (res) => {
  449. console.error(res);
  450. if(res.confirm){
  451. uni.setStorageSync('loginStatus', 'false');
  452. uni.setStorageSync('loginOut', 'true');
  453. uni.removeStorageSync('userMap');
  454. uni.removeStorageSync('userNo');
  455. uni.removeStorageSync('userInfo');
  456. that.showLogin = true;
  457. that.shareNum = 0;
  458. that.needNum = 0;
  459. that.personInfo = {};
  460. }
  461. }
  462. })
  463. },
  464. //注销
  465. logOff(){
  466. const that = this;
  467. request.post('/slbWxma/logOff', {
  468. userNo: uni.getStorageSync('userNo'),
  469. }).then(res => {
  470. if (res&&res.success) {
  471. uni.setStorageSync('loginStatus', 'false');
  472. uni.setStorageSync('loginOut', 'true');
  473. uni.removeStorageSync('userMap');
  474. uni.removeStorageSync('userNo');
  475. uni.removeStorageSync('userInfo');
  476. that.showLogin = true;
  477. that.personInfo = {};
  478. uni.showToast({
  479. title: '注销成功',
  480. icon: 'none'
  481. })
  482. uni.reLaunch({
  483. url: '/pages/index/index'
  484. })
  485. }else{
  486. uni.showToast({
  487. title: res.msg,
  488. icon: 'none'
  489. })
  490. }
  491. })
  492. }
  493. }
  494. }
  495. </script>
  496. <style lang="scss" scoped>
  497. .mine{
  498. min-height: 100vh;
  499. background-color: #f7f7f7;
  500. }
  501. /* 底部安全边距 start*/
  502. .tn-tabbar-height {
  503. min-height: 120rpx;
  504. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  505. height: calc(140rpx + constant(safe-area-inset-bottom));
  506. }
  507. .tn-color-cat{
  508. color: #1D2541;
  509. }
  510. .tn-bg-cat{
  511. background-color: #1D2541;
  512. }
  513. /* 自定义导航栏内容 start */
  514. .custom-nav {
  515. height: 100%;
  516. &__back {
  517. margin: auto 5rpx;
  518. font-size: 40rpx;
  519. margin-right: 10rpx;
  520. flex-basis: 5%;
  521. width: 100rpx;
  522. position: absolute;
  523. }
  524. }
  525. /* 自定义导航栏内容 end */
  526. /* 顶部背景图 end */
  527. /* 用户头像 start */
  528. .logo-image {
  529. width: 140rpx;
  530. height: 140rpx;
  531. position: relative;
  532. overflow: hidden;
  533. border-radius: 50%;
  534. }
  535. .logo-pic {
  536. background-size: cover;
  537. background-repeat: no-repeat;
  538. // background-attachment:fixed;
  539. background-position: top;
  540. border: 8rpx solid rgba(255,255,255,0.05);
  541. box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
  542. border-radius: 50%;
  543. overflow: hidden;
  544. // background-color: #FFFFFF;
  545. }
  546. /* 页面 start*/
  547. .about-shadow {
  548. border-radius: 15rpx;
  549. }
  550. .about {
  551. &__wrap {
  552. position: relative;
  553. z-index: 1;
  554. margin: 20rpx 30rpx;
  555. }
  556. }
  557. /* 页面 end*/
  558. /* 图标容器12 start */
  559. .tn-three{
  560. position: absolute;
  561. top: 50%;
  562. right: 50%;
  563. bottom: 50%;
  564. left: 50%;
  565. transform: translate(-38rpx, -16rpx) rotateX(30deg) rotateY(20deg) rotateZ(-30deg);
  566. text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
  567. }
  568. /* 图标容器12 start */
  569. .icon12 {
  570. &__item {
  571. width: 30%;
  572. background-color: #FFFFFF;
  573. border-radius: 10rpx;
  574. padding: 30rpx;
  575. margin: 20rpx 10rpx;
  576. transform: scale(1);
  577. transition: transform 0.3s linear;
  578. transform-origin: center center;
  579. &--icon {
  580. width: 15rpx;
  581. height: 15rpx;
  582. font-size: 50rpx;
  583. border-radius: 50%;
  584. margin-bottom: 38rpx;
  585. position: relative;
  586. z-index: 1;
  587. &::after {
  588. content: " ";
  589. position: absolute;
  590. z-index: -1;
  591. width: 100%;
  592. height: 100%;
  593. left: 0;
  594. bottom: 0;
  595. border-radius: inherit;
  596. opacity: 1;
  597. transform: scale(1, 1);
  598. background-size: 100% 100%;
  599. }
  600. }
  601. }
  602. }
  603. /* 图标容器1 start */
  604. .icon1 {
  605. &__item {
  606. // width: 30%;
  607. background-color: #FFFFFF;
  608. border-radius: 10rpx;
  609. padding: 30rpx;
  610. margin: 20rpx 10rpx;
  611. transform: scale(1);
  612. transition: transform 0.3s linear;
  613. transform-origin: center center;
  614. &--icon {
  615. width: 40rpx;
  616. height: 40rpx;
  617. font-size: 40rpx;
  618. border-radius: 50%;
  619. position: relative;
  620. z-index: 1;
  621. &::after {
  622. content: " ";
  623. position: absolute;
  624. z-index: -1;
  625. width: 100%;
  626. height: 100%;
  627. left: 0;
  628. bottom: 0;
  629. border-radius: inherit;
  630. opacity: 1;
  631. transform: scale(1, 1);
  632. background-size: 100% 100%;
  633. }
  634. }
  635. }
  636. }
  637. /* 图标容器1 end */
  638. /* 顶部背景图 start */
  639. .top-backgroup {
  640. height: 450rpx;
  641. z-index: -1;
  642. .backgroud-image {
  643. width: 100%;
  644. height: 450rpx;
  645. // z-index: -1;
  646. }
  647. }
  648. /* 顶部背景图 end */
  649. /deep/ .tn-list-cell{
  650. padding-top:0 !important;
  651. padding-bottom:0 !important;
  652. border-radius: 0 !important;
  653. }
  654. </style>