mine.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  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. <uni-popup ref="alertDialog" type="dialog">
  255. <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确定" title="确定注销账户吗?" content=" " @confirm="logOff()"
  256. @close="dialogClose"></uni-popup-dialog>
  257. </uni-popup>
  258. <view class='tn-tabbar-height'></view>
  259. </view>
  260. </template>
  261. <script>
  262. import request from '../../utils/request'
  263. import {
  264. uniShowModal
  265. } from '../../utils/uni_api'
  266. export default {
  267. name: 'Mine',
  268. data() {
  269. return {
  270. personInfo: uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')):{},
  271. showLogin: false,
  272. msgType:'',
  273. shareNum:0,
  274. needNum:0,
  275. wxFontSize:17,
  276. }
  277. },
  278. onReady() {
  279. const appBaseInfo = wx.getAppBaseInfo();
  280. this.wxFontSize = uni.getStorageSync('fontSize')||appBaseInfo.fontSizeSetting||17;
  281. console.warn(this.wxFontSize===20);
  282. this.$nextTick(() => {
  283. if(!uni.getStorageSync('userNo')){
  284. this.showLogin = true;
  285. return false;
  286. }
  287. if(!uni.getStorageSync('loginOut')){
  288. this.getContentRectInfo()
  289. // this.loadNum();
  290. // this.loadNum2();
  291. }
  292. })
  293. },
  294. methods: {
  295. fetchData(){
  296. if(!uni.getStorageSync('userNo')){
  297. this.showLogin = true;
  298. return false;
  299. }
  300. if(!uni.getStorageSync('loginOut')){
  301. this.getContentRectInfo()
  302. // this.loadNum();
  303. // this.loadNum2();
  304. }
  305. },
  306. // 获取内容容器的信息
  307. getContentRectInfo() {
  308. let that = this;
  309. request.post('/slbWxma/getPersonlInfo', {
  310. }).then(res => {
  311. console.warn(res);
  312. if(res&&res.success){
  313. that.personInfo = res.resultMap.userInfo||{};
  314. uni.setStorageSync('userInfo', JSON.stringify(res.resultMap.userInfo));
  315. that.showLogin = false;
  316. }
  317. console.warn(res);
  318. })
  319. },
  320. loadNum(){
  321. let that = this;
  322. request.post('/slbResourceDemand/show/my', {
  323. }).then(res => {
  324. if(res&&res.resultMap){
  325. that.needNum = res.resultMap.passNum||0
  326. }
  327. })
  328. },
  329. loadNum2(){
  330. let that = this;
  331. request.post('/slbResourceShare/show/my', {
  332. }).then(res => {
  333. if(res&&res.resultMap){
  334. that.shareNum = res.resultMap.passNum||0
  335. }
  336. })
  337. },
  338. switchChange: function (e) {
  339. //修改smsNotice
  340. const that = this;
  341. let params= this.personInfo;
  342. params.smsNotice = e.detail.value?1:0;
  343. request.post('/slbWxma/changePersonlInfo',{userInfo:JSON.stringify(params)},{
  344. headers: {
  345. 'Content-Type': 'application/json', // 默认值
  346. },
  347. }).then(res=>{
  348. if(res.success){
  349. uni.showToast({
  350. title:e.detail.value?'开启成功':'关闭成功',
  351. icon:'none'
  352. })
  353. that.getContentRectInfo()
  354. }
  355. })
  356. },
  357. showFont(){
  358. let that = this;
  359. uni.showActionSheet({
  360. itemList: ['跟随微信','小','中','大'],
  361. success: function (res) {
  362. if(res.tapIndex==1){
  363. uni.setStorageSync('fontSize',16)
  364. that.wxFontSize = 16;
  365. uni.reLaunch({
  366. url:'/pages/index/index?index=3'
  367. })
  368. }
  369. if(res.tapIndex==2){
  370. // uni.removeStorageSync('fontSize');
  371. uni.setStorageSync('fontSize',17)
  372. that.wxFontSize = 17;
  373. uni.reLaunch({
  374. url:'/pages/index/index?index=3'
  375. })
  376. }
  377. if(res.tapIndex==3){
  378. uni.setStorageSync('fontSize',20)
  379. that.wxFontSize = 20;
  380. uni.reLaunch({
  381. url:'/pages/index/index?index=3'
  382. })
  383. }
  384. if(res.tapIndex==0){
  385. const appBaseInfo = wx.getAppBaseInfo();
  386. uni.removeStorageSync('fontSize');
  387. that.wxFontSize = appBaseInfo.fontSizeSetting||17;
  388. uni.reLaunch({
  389. url:'/pages/index/index?index=3'
  390. })
  391. }
  392. },
  393. fail: function (res) {
  394. console.log(res.errMsg);
  395. }
  396. });
  397. },
  398. // 跳转
  399. tn(e) {
  400. if(!uni.getStorageSync('userNo')){
  401. uni.setStorageSync('nextPage',e);
  402. uni.navigateTo({
  403. url: '/pages/login/login',
  404. });
  405. return false;
  406. }
  407. uni.navigateTo({
  408. url: e,
  409. });
  410. },
  411. toLogin(e){
  412. uni.navigateTo({
  413. url: e,
  414. });
  415. },
  416. showFeedback(){
  417. uni.navigateTo({
  418. url: '/pages/mine/addFeed',
  419. });
  420. },
  421. showInfo(){
  422. uni.navigateTo({
  423. url: '/pages/login/info?counted=1'
  424. })
  425. },
  426. showInfo2() {
  427. uni.navigateTo({
  428. url:'/pages/webview/web-view?url='+encodeURIComponent('https://slb-m.lx-device.com/webview?title=隐私协议&url='+'https://oss.lx-device.com/userFeedback/1735201139460G1J.docx'),
  429. })
  430. },
  431. showAbout(){
  432. uni.navigateTo({
  433. url: '/pages/mine/about'
  434. })
  435. },
  436. showLog(){
  437. let that = this;
  438. uniShowModal('确定注销账户吗?', '', {
  439. showCancel: true,
  440. success: (res) => {
  441. console.error(res);
  442. if(res.confirm){
  443. that.logOff();
  444. }
  445. }
  446. })
  447. },
  448. showLogout(){
  449. let that = this;
  450. uniShowModal('确定退出登录吗?', '', {
  451. showCancel: true,
  452. success: (res) => {
  453. console.error(res);
  454. if(res.confirm){
  455. uni.setStorageSync('loginStatus', 'false');
  456. uni.setStorageSync('loginOut', 'true');
  457. uni.removeStorageSync('userMap');
  458. uni.removeStorageSync('userNo');
  459. uni.removeStorageSync('userInfo');
  460. that.showLogin = true;
  461. that.shareNum = 0;
  462. that.needNum = 0;
  463. that.personInfo = {};
  464. }
  465. }
  466. })
  467. },
  468. //注销
  469. logOff(){
  470. const that = this;
  471. request.post('/slbWxma/logOff', {
  472. userNo: uni.getStorageSync('userNo'),
  473. }).then(res => {
  474. if (res&&res.success) {
  475. uni.setStorageSync('loginStatus', 'false');
  476. uni.setStorageSync('loginOut', 'true');
  477. uni.removeStorageSync('userMap');
  478. uni.removeStorageSync('userNo');
  479. uni.removeStorageSync('userInfo');
  480. that.showLogin = true;
  481. that.personInfo = {};
  482. uni.showToast({
  483. title: '注销成功',
  484. icon: 'none'
  485. })
  486. uni.reLaunch({
  487. url: '/pages/index/index'
  488. })
  489. }else{
  490. uni.showToast({
  491. title: res.msg,
  492. icon: 'none'
  493. })
  494. }
  495. })
  496. }
  497. }
  498. }
  499. </script>
  500. <style lang="scss" scoped>
  501. .mine{
  502. min-height: 100vh;
  503. background-color: #f7f7f7;
  504. }
  505. /* 底部安全边距 start*/
  506. .tn-tabbar-height {
  507. min-height: 120rpx;
  508. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  509. height: calc(140rpx + constant(safe-area-inset-bottom));
  510. }
  511. .tn-color-cat{
  512. color: #1D2541;
  513. }
  514. .tn-bg-cat{
  515. background-color: #1D2541;
  516. }
  517. /* 自定义导航栏内容 start */
  518. .custom-nav {
  519. height: 100%;
  520. &__back {
  521. margin: auto 5rpx;
  522. font-size: 40rpx;
  523. margin-right: 10rpx;
  524. flex-basis: 5%;
  525. width: 100rpx;
  526. position: absolute;
  527. }
  528. }
  529. /* 自定义导航栏内容 end */
  530. /* 顶部背景图 end */
  531. /* 用户头像 start */
  532. .logo-image {
  533. width: 140rpx;
  534. height: 140rpx;
  535. position: relative;
  536. overflow: hidden;
  537. border-radius: 50%;
  538. }
  539. .logo-pic {
  540. background-size: cover;
  541. background-repeat: no-repeat;
  542. // background-attachment:fixed;
  543. background-position: top;
  544. border: 8rpx solid rgba(255,255,255,0.05);
  545. box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
  546. border-radius: 50%;
  547. overflow: hidden;
  548. // background-color: #FFFFFF;
  549. }
  550. /* 页面 start*/
  551. .about-shadow {
  552. border-radius: 15rpx;
  553. }
  554. .about {
  555. &__wrap {
  556. position: relative;
  557. z-index: 1;
  558. margin: 20rpx 30rpx;
  559. }
  560. }
  561. /* 页面 end*/
  562. /* 图标容器12 start */
  563. .tn-three{
  564. position: absolute;
  565. top: 50%;
  566. right: 50%;
  567. bottom: 50%;
  568. left: 50%;
  569. transform: translate(-38rpx, -16rpx) rotateX(30deg) rotateY(20deg) rotateZ(-30deg);
  570. text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
  571. }
  572. /* 图标容器12 start */
  573. .icon12 {
  574. &__item {
  575. width: 30%;
  576. background-color: #FFFFFF;
  577. border-radius: 10rpx;
  578. padding: 30rpx;
  579. margin: 20rpx 10rpx;
  580. transform: scale(1);
  581. transition: transform 0.3s linear;
  582. transform-origin: center center;
  583. &--icon {
  584. width: 15rpx;
  585. height: 15rpx;
  586. font-size: 50rpx;
  587. border-radius: 50%;
  588. margin-bottom: 38rpx;
  589. position: relative;
  590. z-index: 1;
  591. &::after {
  592. content: " ";
  593. position: absolute;
  594. z-index: -1;
  595. width: 100%;
  596. height: 100%;
  597. left: 0;
  598. bottom: 0;
  599. border-radius: inherit;
  600. opacity: 1;
  601. transform: scale(1, 1);
  602. background-size: 100% 100%;
  603. }
  604. }
  605. }
  606. }
  607. /* 图标容器1 start */
  608. .icon1 {
  609. &__item {
  610. // width: 30%;
  611. background-color: #FFFFFF;
  612. border-radius: 10rpx;
  613. padding: 30rpx;
  614. margin: 20rpx 10rpx;
  615. transform: scale(1);
  616. transition: transform 0.3s linear;
  617. transform-origin: center center;
  618. &--icon {
  619. width: 40rpx;
  620. height: 40rpx;
  621. font-size: 40rpx;
  622. border-radius: 50%;
  623. position: relative;
  624. z-index: 1;
  625. &::after {
  626. content: " ";
  627. position: absolute;
  628. z-index: -1;
  629. width: 100%;
  630. height: 100%;
  631. left: 0;
  632. bottom: 0;
  633. border-radius: inherit;
  634. opacity: 1;
  635. transform: scale(1, 1);
  636. background-size: 100% 100%;
  637. }
  638. }
  639. }
  640. }
  641. /* 图标容器1 end */
  642. /* 顶部背景图 start */
  643. .top-backgroup {
  644. height: 450rpx;
  645. z-index: -1;
  646. .backgroud-image {
  647. width: 100%;
  648. height: 450rpx;
  649. // z-index: -1;
  650. }
  651. }
  652. /* 顶部背景图 end */
  653. /deep/ .tn-list-cell{
  654. padding-top:0 !important;
  655. padding-bottom:0 !important;
  656. border-radius: 0 !important;
  657. }
  658. </style>