mine.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. <template>
  2. <view class="mine tn-safe-area-inset-bottom">
  3. <!-- 顶部自定义导航 -->
  4. <view class="top-backgroup">
  5. <image src='../../static/bg4.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. <!-- <tn-avatar src="../../static/me2.png" :badge="true" size="xl" badgeIcon="star"></tn-avatar> -->
  15. <image v-if="personInfo.profilePhotoUrl" class="tn-shadow-blur" style="width: 140rpx;height: 140rpx;background-size: cover;" :src="personInfo.profilePhotoUrl"></image>
  16. <image v-if="!personInfo.profilePhotoUrl" class="tn-shadow-blur" style="width: 140rpx;height: 140rpx;background-size: cover;" src="../../static/me2.png"></image>
  17. <!-- <view class="tn-shadow-blur" style="background-image:url('https://cdn.nlark.com/yuque/0/2022/jpeg/280373/1664005699053-assets/web-upload/8645ea3a-e0a9-4422-8364-cc5ede305c9f.jpeg');width: 110rpx;height: 110rpx;background-size: cover;">
  18. </view> -->
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 没有授权,则显示这个授权按钮-->
  25. <view class="tn-flex tn-flex-row-between" @click="tn('/pages/login/login')" v-if="showLogin">
  26. <view class="tn-flex-1 justify-content-item tn-margin-xs tn-text-center">
  27. <tn-button shape="round" backgroundColor="#1d60b1" fontColor="#ffffff" padding="20rpx 0" width="40%" shadow>
  28. <text class="tn-icon-wechat tn-padding-right-xs tn-text-xl"></text>
  29. <text class="">立即登录</text>
  30. </tn-button>
  31. </view>
  32. </view>
  33. <view class="about-shadow tn-margin-top-lg tn-padding-top-sm tn-padding-bottom-sm tn-bg-white" v-if="!showLogin">
  34. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" @click="showModal1">
  35. <view class="justify-content-item">
  36. <view class="tn-text-bold tn-text-lg">
  37. 用户名
  38. </view>
  39. </view>
  40. <view class="justify-content-item tn-text-lg tn-color-grey">
  41. <view class="tn-color-gray tn-padding-top-xs">
  42. {{personInfo.accountName||(personInfo.userName?'用户'+personInfo.userName.slice(-4):'')||'未登录'}}
  43. </view>
  44. </view>
  45. </view>
  46. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" @click="showModal1">
  47. <view class="justify-content-item">
  48. <view class="tn-text-bold tn-text-lg">
  49. 联系方式
  50. </view>
  51. </view>
  52. <view class="justify-content-item tn-text-lg tn-color-grey">
  53. <view class="tn-color-gray tn-padding-top-xs">
  54. {{personInfo.contactMethod||personInfo.userName||''}}
  55. </view>
  56. </view>
  57. </view>
  58. <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" @click="showModal1">
  59. <view class="justify-content-item">
  60. <view class="tn-text-bold tn-text-lg">
  61. 手机号
  62. </view>
  63. </view>
  64. <view class="justify-content-item tn-text-lg tn-color-grey">
  65. <view class="tn-color-gray tn-padding-top-xs">
  66. {{personInfo.userName||'未登录'}}
  67. </view>
  68. </view>
  69. </view>
  70. <!-- <view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" @click="showModal1">
  71. <view class="justify-content-item">
  72. <view class="tn-text-bold tn-text-lg">
  73. 所属公司
  74. </view>
  75. </view>
  76. <view class="justify-content-item tn-text-lg tn-color-grey">
  77. <view class="tn-color-gray tn-padding-top-xs">
  78. 未绑定
  79. </view>
  80. </view>
  81. </view> -->
  82. </view>
  83. <!-- 方式15 start-->
  84. <view class="tn-flex tn-flex-row-between tn-bg-white about-shadow tn-margin-top-xl">
  85. <view class="tn-padding-sm tn-margin-xs" @click="tn('/pages/mine/need')">
  86. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-margin-left">
  87. <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
  88. <view class="tn-icon-like"></view>
  89. </view>
  90. <view class="tn-text-center">
  91. <text class="tn-text-ellipsis">我的需求</text>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="tn-padding-sm tn-margin-xs" @click="tn('/pages/mine/share')">
  96. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
  97. <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
  98. <view class="tn-icon-share-triangle"></view>
  99. </view>
  100. <view class="tn-text-center">
  101. <text class="tn-text-ellipsis">我的共享</text>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="tn-padding-sm tn-margin-xs" @click="tn('/pages/mine/coll')">
  106. <view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-margin-right">
  107. <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
  108. <view class="tn-icon-star"></view>
  109. </view>
  110. <view class="tn-text-center">
  111. <text class="tn-text-ellipsis">我的收藏</text>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <!-- 方式15 end-->
  117. <view class="about-shadow tn-margin-top-lg tn-margin-bottom-lg tn-padding-top-sm tn-padding-bottom-sm">
  118. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30">
  119. <button class="tn-flex tn-flex-col-center tn-button--clear-style" @click="showFeedback">
  120. <view
  121. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  122. <view class="tn-icon-message-fill"></view>
  123. </view>
  124. <view class="tn-flex tn-flex-row-between" style="width: 100%;">
  125. <view class="tn-margin-left-sm">我有问题</view>
  126. <view class="tn-color-gray tn-icon-right"></view>
  127. </view>
  128. </button>
  129. </tn-list-cell>
  130. <!-- <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="callPhoneNumber" data-number="18266666666">
  131. <view class="tn-flex tn-flex-col-center">
  132. <view
  133. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  134. <view class="tn-icon-tel-circle-fill"></view>
  135. </view>
  136. <view class="tn-margin-left-sm tn-flex-1">技术支持</view>
  137. <view
  138. class="tn-margin-left-sm tn-color-cat tn-text-sm tn-padding-left-xs tn-padding-right-xs tn-bg-gray--light tn-round">
  139. 158****8888</view>
  140. </view>
  141. </tn-list-cell> -->
  142. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showInfo()">
  143. <view class="tn-flex tn-flex-col-center">
  144. <view
  145. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  146. <view class="tn-icon-safe-fill"></view>
  147. </view>
  148. <view class="tn-margin-left-sm tn-flex-1">协议展示</view>
  149. <view class="tn-color-gray tn-icon-right"></view>
  150. </view>
  151. </tn-list-cell>
  152. <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click=showAbout()>
  153. <view class="tn-flex tn-flex-col-center">
  154. <view
  155. class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
  156. <view class="tn-icon-help"></view>
  157. </view>
  158. <view class="tn-margin-left-sm tn-flex-1">了解速立保</view>
  159. <view class="tn-color-gray tn-icon-right"></view>
  160. </view>
  161. </tn-list-cell>
  162. </view>
  163. </view>
  164. <view class='tn-tabbar-height'></view>
  165. </view>
  166. </template>
  167. <script>
  168. import request from '../../utils/request'
  169. export default {
  170. name: 'Mine',
  171. data() {
  172. return {
  173. personInfo: uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')):{},
  174. showLogin: false
  175. }
  176. },
  177. onReady() {
  178. this.$nextTick(() => {
  179. if(!uni.getStorageSync('userNo')){
  180. this.showLogin = true;
  181. }
  182. console.error(JSON.parse(uni.getStorageSync('userInfo')))
  183. this.getContentRectInfo()
  184. })
  185. },
  186. methods: {
  187. // 获取内容容器的信息
  188. getContentRectInfo() {
  189. let that = this;
  190. request.post('/slbWxma/getPersonlInfo', {
  191. }).then(res => {
  192. console.warn(res);
  193. if(res&&res.success){
  194. that.personInfo = res.resultMap.userInfo||{};
  195. uni.setStorageSync('userInfo', JSON.stringify(res.resultMap.userInfo));
  196. that.showLogin = false;
  197. }
  198. console.warn(res);
  199. })
  200. },
  201. // 跳转到速立保官网
  202. navTuniaoWebsite() {
  203. uni.navigateToMiniProgram({
  204. appId: 'wxa698b1eee960632f'
  205. })
  206. },
  207. // 跳转到速立保UI
  208. navTuniaoUI() {
  209. uni.navigateToMiniProgram({
  210. appId: 'wxf3d81a452b88ff4b'
  211. })
  212. },
  213. // 跳转
  214. tn(e) {
  215. if(!uni.getStorageSync('userNo')){
  216. uni.navigateTo({
  217. url: '/pages/login/login',
  218. });
  219. return false;
  220. }
  221. uni.navigateTo({
  222. url: e,
  223. });
  224. },
  225. showFeedback(){
  226. uni.navigateTo({
  227. url: '/pages/mine/addFeed',
  228. });
  229. },
  230. // 收货地址
  231. navAddress() {
  232. uni.chooseAddress({
  233. })
  234. },
  235. // 震动跳转
  236. navThanks(e) {
  237. wx.vibrateShort();
  238. uni.navigateTo({
  239. url: '/pages/login/login'
  240. })
  241. },
  242. //拨打固定电话
  243. callPhoneNumber() {
  244. uni.navigateTo({
  245. url: '/pages/login/login'
  246. })
  247. // uni.makePhoneCall({
  248. // phoneNumber: "18219128888",
  249. // });
  250. },
  251. // 复制开源地址
  252. copySource() {
  253. uni.setClipboardData({
  254. data: "等待上传插件市场",
  255. })
  256. },
  257. showInfo(){
  258. uni.navigateTo({
  259. url:'/pages/webview/web-view?url='+'https://test-oss.lx-device.com/userFeedback/1732866523422nfH.docx',
  260. })
  261. },
  262. showAbout(){
  263. uni.navigateTo({
  264. url: '/pages/mine/about'
  265. })
  266. }
  267. }
  268. }
  269. </script>
  270. <style lang="scss" scoped>
  271. .mine{
  272. max-height: 100vh;
  273. }
  274. /* 底部安全边距 start*/
  275. .tn-tabbar-height {
  276. min-height: 120rpx;
  277. height: calc(140rpx + env(safe-area-inset-bottom) / 2);
  278. height: calc(140rpx + constant(safe-area-inset-bottom));
  279. }
  280. .tn-color-cat{
  281. color: #1D2541;
  282. }
  283. .tn-bg-cat{
  284. background-color: #1D2541;
  285. }
  286. /* 自定义导航栏内容 start */
  287. .custom-nav {
  288. height: 100%;
  289. &__back {
  290. margin: auto 5rpx;
  291. font-size: 40rpx;
  292. margin-right: 10rpx;
  293. flex-basis: 5%;
  294. width: 100rpx;
  295. position: absolute;
  296. }
  297. }
  298. /* 自定义导航栏内容 end */
  299. /* 顶部背景图 end */
  300. /* 用户头像 start */
  301. .logo-image {
  302. width: 140rpx;
  303. height: 140rpx;
  304. position: relative;
  305. overflow: hidden;
  306. border-radius: 50%;
  307. }
  308. .logo-pic {
  309. background-size: cover;
  310. background-repeat: no-repeat;
  311. // background-attachment:fixed;
  312. background-position: top;
  313. border: 8rpx solid rgba(255,255,255,0.05);
  314. box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
  315. border-radius: 50%;
  316. overflow: hidden;
  317. // background-color: #FFFFFF;
  318. }
  319. /* 页面 start*/
  320. .about-shadow {
  321. border-radius: 15rpx;
  322. box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
  323. }
  324. .about {
  325. &__wrap {
  326. position: relative;
  327. z-index: 1;
  328. margin: 20rpx 30rpx;
  329. }
  330. }
  331. /* 页面 end*/
  332. /* 图标容器15 start */
  333. .icon15 {
  334. &__item {
  335. width: 30%;
  336. background-color: #FFFFFF;
  337. border-radius: 10rpx;
  338. padding: 30rpx;
  339. margin: 20rpx 10rpx;
  340. transform: scale(1);
  341. transition: transform 0.3s linear;
  342. transform-origin: center center;
  343. &--icon {
  344. width: 100rpx;
  345. height: 100rpx;
  346. font-size: 60rpx;
  347. border-radius: 50%;
  348. margin-bottom: 18rpx;
  349. position: relative;
  350. z-index: 1;
  351. &::after {
  352. content: " ";
  353. position: absolute;
  354. z-index: -1;
  355. width: 100%;
  356. height: 100%;
  357. left: 0;
  358. bottom: 0;
  359. border-radius: inherit;
  360. opacity: 1;
  361. transform: scale(1, 1);
  362. background-size: 100% 100%;
  363. }
  364. }
  365. }
  366. }
  367. /* 图标容器12 start */
  368. .tn-three{
  369. position: absolute;
  370. top: 50%;
  371. right: 50%;
  372. bottom: 50%;
  373. left: 50%;
  374. transform: translate(-38rpx, -16rpx) rotateX(30deg) rotateY(20deg) rotateZ(-30deg);
  375. text-shadow: -1rpx 2rpx 0 #f0f0f0, -2rpx 4rpx 0 #f0f0f0, -10rpx 20rpx 30rpx rgba(0, 0, 0, 0.2);
  376. }
  377. .icon20 {
  378. &__item {
  379. width: 30%;
  380. background-color: #FFFFFF;
  381. border-radius: 10rpx;
  382. padding: 30rpx;
  383. margin: 20rpx 10rpx;
  384. transform: scale(1);
  385. transition: transform 0.3s linear;
  386. transform-origin: center center;
  387. &--icon {
  388. width: 100rpx;
  389. height: 100rpx;
  390. font-size: 60rpx;
  391. border-radius: 50%;
  392. margin-bottom: 18rpx;
  393. position: relative;
  394. z-index: 1;
  395. &::after {
  396. content: " ";
  397. position: absolute;
  398. z-index: -1;
  399. width: 100%;
  400. height: 100%;
  401. left: 0;
  402. bottom: 0;
  403. border-radius: inherit;
  404. opacity: 1;
  405. transform: scale(1, 1);
  406. background-size: 100% 100%;
  407. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg.png);
  408. }
  409. }
  410. }
  411. }
  412. .button-vip {
  413. width: 100%;
  414. height: 150rpx;
  415. border-radius: 15rpx;
  416. position: relative;
  417. z-index: 1;
  418. &::after {
  419. content: " ";
  420. position: absolute;
  421. z-index: -1;
  422. width: 100%;
  423. height: 100%;
  424. left: 0;
  425. bottom: 0;
  426. border-radius: inherit;
  427. opacity: 1;
  428. transform: scale(1, 1);
  429. background-size: 100% 100%;
  430. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg.png);
  431. }
  432. }
  433. /* 图标容器12 start */
  434. .icon12 {
  435. &__item {
  436. width: 30%;
  437. background-color: #FFFFFF;
  438. border-radius: 10rpx;
  439. padding: 30rpx;
  440. margin: 20rpx 10rpx;
  441. transform: scale(1);
  442. transition: transform 0.3s linear;
  443. transform-origin: center center;
  444. &--icon {
  445. width: 15rpx;
  446. height: 15rpx;
  447. font-size: 50rpx;
  448. border-radius: 50%;
  449. margin-bottom: 38rpx;
  450. position: relative;
  451. z-index: 1;
  452. &::after {
  453. content: " ";
  454. position: absolute;
  455. z-index: -1;
  456. width: 100%;
  457. height: 100%;
  458. left: 0;
  459. bottom: 0;
  460. border-radius: inherit;
  461. opacity: 1;
  462. transform: scale(1, 1);
  463. background-size: 100% 100%;
  464. }
  465. }
  466. }
  467. }
  468. /* 图标容器1 start */
  469. .icon1 {
  470. &__item {
  471. // width: 30%;
  472. background-color: #FFFFFF;
  473. border-radius: 10rpx;
  474. padding: 30rpx;
  475. margin: 20rpx 10rpx;
  476. transform: scale(1);
  477. transition: transform 0.3s linear;
  478. transform-origin: center center;
  479. &--icon {
  480. width: 40rpx;
  481. height: 40rpx;
  482. font-size: 40rpx;
  483. border-radius: 50%;
  484. position: relative;
  485. z-index: 1;
  486. &::after {
  487. content: " ";
  488. position: absolute;
  489. z-index: -1;
  490. width: 100%;
  491. height: 100%;
  492. left: 0;
  493. bottom: 0;
  494. border-radius: inherit;
  495. opacity: 1;
  496. transform: scale(1, 1);
  497. background-size: 100% 100%;
  498. background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg.png);
  499. }
  500. }
  501. }
  502. }
  503. /* 图标容器1 end */
  504. /* 顶部背景图 start */
  505. .top-backgroup {
  506. height: 450rpx;
  507. z-index: -1;
  508. .backgroud-image {
  509. width: 100%;
  510. height: 450rpx;
  511. // z-index: -1;
  512. }
  513. }
  514. /* 顶部背景图 end */
  515. </style>