mine.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <template>
  2. <view class="">
  3. <view class="pageBg">
  4. <view class="mine_order_statue">
  5. <view class="flex justify-between" style="padding: 20rpx;">
  6. <view class="flex">
  7. <image :src="userInfo.avatarUrl?userInfo.avatarUrl:'http://139.9.103.171:8888/group1/M00/00/01/iwlnq1_AYZqAb30pAAAQNvkj3Wk302.png'" style="background-color: #FFFFFF;width: 110rpx;height: 110rpx;border-radius: 50%;" ></image>
  8. <view class="flex flex-direction padding-left-30">
  9. <text class="text-lg text-bold" v-text="userInfo.nickName?userInfo.nickName:'暂无昵称'"></text>
  10. <button v-if="$isEmpty(userInfo)" open-type="getUserInfo" @getuserinfo="getUserInfo" class="cu-btn bg-white text-blue margin-top-20 df" style="margin-left: -20rpx;">
  11. 点击获取微信昵称和头像
  12. </button>
  13. <view v-else class="padding-20" >
  14. <text class="margin-top-30 text-df">{{phone}}</text>
  15. </view>
  16. </view>
  17. </view>
  18. <view @click="goUserInfo" class="flex align-center justify-center">
  19. <text class="cuIcon-right"></text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="item_list">
  24. <view class=" flex justify-between" style="padding: 40rpx 20rpx;">
  25. <view class="text-bold">所属公司</view>
  26. <view class="text-gray">
  27. <text>暂无公司信息</text>
  28. <text class="cuIcon-playfill padding-left-20" style="font-size: 28rpx;"></text>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="item_list" >
  33. <view class="item" v-for="(item, index) in systemItemList" :key="index" @tap="tapToMenu(item.name)">
  34. <view class="item_content">
  35. <image :src="item.itemIcon"></image>
  36. <text>{{ item.itemName }}</text>
  37. </view>
  38. <view class="">
  39. <image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. var app=getApp()
  48. import DtCustomBar from '@/components/dt_custom_bar.vue'
  49. let that
  50. export default {
  51. components: {
  52. DtCustomBar
  53. },
  54. data() {
  55. return {
  56. background: {
  57. backgroundColor: '#f5f6f8',
  58. },
  59. phone:'',
  60. userInfo:{},
  61. systemItemList:[
  62. // {
  63. // itemName: '物业报修',
  64. // itemIcon: '/static/index/blue/wuye.png',
  65. // index:10
  66. // },
  67. // {
  68. // itemName: '人员认证',
  69. // itemIcon: '/static/index/blue/shenfen.png',
  70. // index:10
  71. // },
  72. {
  73. itemName: '我的消息',
  74. itemIcon: '/static/index/blue/msg.png',
  75. name:'msg'
  76. },
  77. {
  78. itemName: '问题反馈',
  79. itemIcon: '/static/index/blue/fankui.png',
  80. name:'feedback'
  81. },
  82. {
  83. itemName: '帮助中心',
  84. itemIcon: '/static/index/blue/shuoming.png',
  85. name:'help'
  86. },
  87. {
  88. itemName: '用户协议',
  89. itemIcon: '/static/index/blue/xieyi1.png',
  90. name:'protocol'
  91. }
  92. ],
  93. memberId: '',
  94. dataDetail: {},
  95. orderStatusNum: {},
  96. userDetail: {},
  97. isLogin: false,
  98. };
  99. },
  100. onShow() {
  101. this.apiGetUserInfo()
  102. },
  103. onLoad() {
  104. that=this
  105. },
  106. computed: {
  107. },
  108. methods: {
  109. //功能跳转
  110. tapToMenu(name){
  111. let url='/pages/mine/protocol/protocol'
  112. switch (name){
  113. case 'feedback':
  114. url="/pages/mine/feedback/feedback"
  115. break;
  116. default:
  117. break;
  118. }
  119. if (!this.$isEmpty(url)) {
  120. uni.navigateTo({
  121. url:url
  122. })
  123. }
  124. },
  125. //获取微信昵称和头像
  126. getUserInfo(e){
  127. this.userInfo=e.detail.userInfo
  128. console.log(this.userInfo.avatarUrl)
  129. this.$cache.put('userInfo',this.userInfo)
  130. },
  131. //从缓存中获取用户信息
  132. apiGetUserInfo(){
  133. this.phone=this.$cache.get('phone') || ''
  134. this.userInfo= this.$cache.get('userInfo') || {}
  135. },
  136. //跳转到用户信息
  137. goUserInfo(){
  138. uni.navigateTo({
  139. url:"/pages/mine/mine-info/mine-info"
  140. })
  141. }
  142. },
  143. };
  144. </script>
  145. <style lang="scss" scoped>
  146. page{
  147. min-height: 100vh;
  148. background-color: #f5f6f8;
  149. }
  150. button::after {
  151. border: none;
  152. }
  153. .header {
  154. // border-bottom-right-radius: 100rpx;
  155. // border-bottom-left-radius: 100rpx;
  156. //todo
  157. height: 260upx;
  158. background-repeat: no-repeat;
  159. background-size: 100% 100%;
  160. .member_head_img {
  161. margin-right: 30upx;
  162. image {
  163. //todo
  164. width: 110upx;
  165. height:110upx;
  166. border-radius: 59rpx;
  167. }
  168. .avatar-wrap {
  169. display: inline-flex;
  170. border: 0;
  171. background-color: transparent;
  172. }
  173. }
  174. .no_login {
  175. display: flex;
  176. flex-direction: column;
  177. .no_login_btn {
  178. border-radius: 25px;
  179. //todo
  180. font-size: 32upx;
  181. color: #fff;
  182. width: fit-content;
  183. padding: 0 15upx;
  184. height: 60upx;
  185. line-height: 60upx;
  186. background: transparent;
  187. }
  188. }
  189. .member_info {
  190. display: flex;
  191. flex-direction: column;
  192. .member_name_box {
  193. display: flex;
  194. flex-direction: row;
  195. align-items: center;
  196. .member_name {
  197. font-size: 40upx;
  198. color: #fff;
  199. font-weight: bold;
  200. }
  201. .member_level {
  202. background: #ffc600;
  203. color: #fff;
  204. font-size: 22upx;
  205. border-radius: 4upx;
  206. padding: 5upx 10upx;
  207. margin-left: 10upx;
  208. }
  209. }
  210. .member_phone_box {
  211. display: flex;
  212. flex-direction: row;
  213. align-items: center;
  214. .member_phone {
  215. font-size: 24upx;
  216. color: #FFFFFF;
  217. }
  218. image {
  219. width: 19upx;
  220. height: 19upx;
  221. padding: 20upx;
  222. }
  223. }
  224. }
  225. .member_benefits {
  226. background: #fff;
  227. width: 180upx;
  228. display: flex;
  229. flex-direction: row;
  230. align-items: center;
  231. text-align: center;
  232. border-radius: 27upx 0px 0px 27upx;
  233. height: 54upx;
  234. text-align: center;
  235. position: absolute;
  236. right: 0;
  237. image {
  238. width: 26upx;
  239. height: 23upx;
  240. padding: 0 10upx 0 30upx;
  241. }
  242. .member_benefits_text {
  243. font-size: 24upx;
  244. color: #2f7ff5;
  245. letter-spacing: 2upx;
  246. }
  247. }
  248. button::after {
  249. border: none;
  250. }
  251. }
  252. .coupon_point {
  253. display: flex;
  254. flex-direction: row;
  255. align-items: center;
  256. height: 110upx;
  257. background: #fff;
  258. justify-content: space-around;
  259. .item {
  260. display: flex;
  261. flex-direction: column;
  262. align-items: center;
  263. width: 50%;
  264. .item_box {
  265. display: flex;
  266. flex-direction: row;
  267. align-items: center;
  268. letter-spacing: 2upx;
  269. .item_content {
  270. color: #2f7ff5;
  271. font-size: 34upx;
  272. }
  273. .item_unit {
  274. color: #2f7ff5;
  275. font-size: 22upx;
  276. margin-top: 6upx;
  277. }
  278. }
  279. .item_text {
  280. color: #333333;
  281. font-size: 22upx;
  282. }
  283. }
  284. .line {
  285. width: 1upx;
  286. height: 50upx;
  287. background: #e5e5e5;
  288. }
  289. }
  290. .mine_order_statue {
  291. //todo
  292. box-shadow: 0 10rpx #e7f1fd ;
  293. margin: 20upx 20upx 0;
  294. background: #fff;
  295. padding: 10upx 20upx;
  296. border-radius: 20rpx;
  297. }
  298. .item_list {
  299. display: flex;
  300. flex-direction: column;
  301. background: #fff;
  302. margin-top: 20upx;
  303. margin-left: 20rpx;
  304. margin-right: 20rpx;
  305. border-radius: 10rpx;
  306. .item {
  307. display: flex;
  308. flex-direction: row;
  309. align-items: center;
  310. justify-content: space-between;
  311. padding: 0 30upx;
  312. height: 90upx;
  313. border-bottom: 1upx solid #f1f1f1;
  314. .item_content {
  315. display: flex;
  316. flex-direction: row;
  317. align-items: center;
  318. image {
  319. width: 42upx;
  320. height: 42upx;
  321. }
  322. text {
  323. font-size: 28upx;
  324. color: #333333;
  325. margin-left: 20upx;
  326. }
  327. }
  328. image {
  329. width: 10upx;
  330. height: 18upx;
  331. }
  332. }
  333. .item:last-child {
  334. border: none;
  335. }
  336. }
  337. </style>