mine.vue 17 KB

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