mine.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="supplierCylinderManagement-mine">
  3. <!-- 背景渐变色 -->
  4. <view class="back-img-box"></view>
  5. <!-- 信息面板 -->
  6. <view class="user-info-box">
  7. <view class="left-img-box">
  8. <img v-if="userData.avatar" class="avatar-img" :src="baseUrl+userData.avatar">
  9. <img v-else class="avatar-img" :src="imagesUrl('commonality/icon_01.png')">
  10. <!-- <img class="edit-img" :src="imagesUrl('commonality/icon_wd_bj@1x.png')"> -->
  11. </view>
  12. <view class="right-name-box">
  13. <view class="right-name-top-box">
  14. <view>{{userData.userName}}</view>
  15. </view>
  16. <view class="right-name-bottom-box">{{userData.deptName}}</view>
  17. </view>
  18. </view>
  19. <view class="null-flex-p"></view>
  20. <view class="out-button" @click="clickOut">退出登录</view>
  21. <tab-bar></tab-bar>
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. config
  27. } from '@/api/request/config.js'
  28. import {
  29. logout,
  30. systemUserProfile,
  31. studentinfoFacemy,
  32. creditAppletGetMyPointsLogInfo,
  33. } from '@/pages/api/index.js'
  34. import {
  35. pageRestrictVerify
  36. } from '@/utils/index'
  37. import {
  38. tabBar
  39. } from '@/pages/views/supplierCylinderManagement/tabBar.vue'
  40. export default {
  41. name: "supplierCylinderManagement-mine",
  42. components: {
  43. tabBar,
  44. },
  45. data() {
  46. return {
  47. baseUrl: config.base_url,
  48. userData: {
  49. userName:'',
  50. },
  51. bonusPoints: null,
  52. creditScore: null,
  53. faceImg:'',
  54. signatureUrl:'',
  55. }
  56. },
  57. created() {
  58. },
  59. mounted() {
  60. this.$set(this.userData,'userName',uni.getStorageSync('supplierUserName'));
  61. },
  62. onShow(){
  63. },
  64. methods: {
  65. //退出按钮
  66. clickOut() {
  67. let self = this;
  68. uni.showModal({
  69. // title: '确认要退出吗?',
  70. content: '确认要退出吗',
  71. cancelColor: "#999",
  72. confirmColor: "#0183FA",
  73. success: function(res) {
  74. if (res.confirm) {
  75. self.logout();
  76. } else if (res.cancel) {}
  77. }
  78. });
  79. },
  80. //退出登录
  81. async logout() {
  82. let self = this;
  83. const {
  84. data
  85. } = await logout();
  86. if (data.code == 200) {
  87. uni.removeStorageSync('token');
  88. uni.removeStorageSync('userId');
  89. uni.removeStorageSync('userType');
  90. uni.redirectTo({
  91. url: '/pages/views/login/login',
  92. });
  93. }
  94. },
  95. }
  96. }
  97. </script>
  98. <style lang="stylus" scoped>
  99. .supplierCylinderManagement-mine {
  100. flex: 1;
  101. display: flex;
  102. flex-direction: column;
  103. overflow-y: scroll;
  104. overflow-x: hidden;
  105. padding-bottom:200rpx;
  106. .back-img-box {
  107. z-index: 0;
  108. position: absolute;
  109. top: 0;
  110. left: 0;
  111. width: 750rpx;
  112. height: 291rpx;
  113. background: linear-gradient(180deg, rgba(1, 131, 250, 1) 0%, rgba(255, 255, 255, 0) 100%);
  114. }
  115. .user-info-box {
  116. z-index: 10;
  117. margin: 39rpx 24rpx 0;
  118. display: flex;
  119. .left-img-box {
  120. width: 132rpx;
  121. height: 132rpx;
  122. position: relative;
  123. margin-right: 22rpx;
  124. .avatar-img {
  125. position: absolute;
  126. top: 6rpx;
  127. left: 6rpx;
  128. width: 116rpx;
  129. height: 116rpx;
  130. border-radius: 50%;
  131. border: 2rpx solid #fff;
  132. }
  133. .edit-img {
  134. z-index: 5;
  135. position: absolute;
  136. right: 0;
  137. bottom: 6rpx;
  138. width: 40rpx;
  139. height: 40rpx;
  140. }
  141. }
  142. .right-name-box {
  143. padding-top: 6rpx;
  144. .right-name-top-box {
  145. display: flex;
  146. margin-top:30rpx;
  147. view:nth-child(1) {
  148. height: 68rpx;
  149. line-height: 62rpx;
  150. font-size: 32rpx;
  151. color: #fff;
  152. }
  153. view:nth-child(2) {
  154. margin-top: 14rpx;
  155. margin-left: 30rpx;
  156. width: 120rpx;
  157. height: 40rpx;
  158. line-height: 40rpx;
  159. background: #FF8C00;
  160. border-radius: 50rpx;
  161. font-size: 24rpx;
  162. color: #fff;
  163. text-align: center;
  164. }
  165. }
  166. .right-name-bottom-box {
  167. height: 50rpx;
  168. line-height: 50rpx;
  169. font-size: 28rpx;
  170. color: #fff;
  171. }
  172. }
  173. }
  174. .points-max-box {
  175. z-index: 10;
  176. width: 690rpx;
  177. height: 160rpx;
  178. background: #FFFFFF;
  179. border-radius: 20rpx;
  180. margin: 38rpx 30rpx 0;
  181. display: flex;
  182. .points-big-box {
  183. flex: 1;
  184. .num-p {
  185. margin: 39rpx 0 19rpx 0;
  186. text-align: center;
  187. font-size: 28rpx;
  188. line-height: 39rpx;
  189. }
  190. .img-box {
  191. display: flex;
  192. img {
  193. width: 30rpx;
  194. height: 30rpx;
  195. display: block;
  196. margin: 0 20rpx 0 42rpx;
  197. }
  198. view {
  199. color: #333333;
  200. line-height: 30rpx;
  201. font-size: 28rpx;
  202. }
  203. }
  204. .colorA {
  205. color: #0183FA;
  206. }
  207. .colorB {
  208. color: #26C736;
  209. }
  210. .colorC {
  211. color: #333333;
  212. }
  213. }
  214. .border-null-p {
  215. width: 1rpx;
  216. height: 40rpx;
  217. margin: 60rpx 0 0;
  218. background-color: #e0e0e0;
  219. }
  220. }
  221. .button-max-big-box {
  222. background-color: #fff;
  223. border-radius: 20rpx;
  224. margin: 20rpx 30rpx 0;
  225. .button-big-box:nth-child(1) {
  226. border-top: none;
  227. }
  228. .button-big-box {
  229. border-top: 1px solid #E0E0E0;
  230. display: flex;
  231. padding: 0 30rpx 0 26rpx;
  232. .left-img {
  233. display: block;
  234. width: 36rpx;
  235. height: 36rpx;
  236. margin-top: 25rpx;
  237. margin-right: 21rpx;
  238. }
  239. .left-text-p {
  240. flex: 1;
  241. front-size: 30rpx;
  242. line-height: 40rpx;
  243. margin: 20rpx 0;
  244. }
  245. .right-text-p {
  246. front-size: 30rpx;
  247. line-height: 40rpx;
  248. margin: 20rpx 0;
  249. }
  250. .right-img {
  251. display: block;
  252. width: 30rpx;
  253. height: 30rpx;
  254. margin-top: 28rpx;
  255. }
  256. }
  257. .color-D{
  258. color:#0183FA!important;
  259. }
  260. }
  261. .null-flex-p{
  262. flex:1;
  263. }
  264. .out-button {
  265. // position absolute;
  266. // bottom: 140rpx;
  267. // left: 75rpx;
  268. margin:20rpx 0 20rpx 75rpx;
  269. width: 600rpx;
  270. height: 80rpx;
  271. line-height: 80rpx;
  272. border-radius: 100rpx;
  273. text-align center;
  274. background #0183FA;
  275. color: #ffffff;
  276. font-size: 30rpx;
  277. }
  278. }
  279. </style>