about_we.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <div class="my_box boxs">
  3. <div class="my_cont">
  4. <img src="@/static/bg_mine.png" alt="" class="my_img">
  5. <div class="my_nr" @click="tx_btn">
  6. <div class="icon">
  7. <img :src="info_data.avatarUrl" v-if="flag" alt="" class="img">
  8. <!-- v-if="!flag" -->
  9. <img src="@/static/grzx_txw2x.png" v-if="!flag" alt="" class="img">
  10. </div>
  11. <div class="my_xq">
  12. <div class="my_name">{{flag?info_data.nickName:'未登录'}}</div>
  13. <div class="my_phone">{{flag?phone:'点击头像登录'}}</div>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="my_yj" @click="share_btn">
  18. <div class="my_yj_left">
  19. <img src="@/static/icon_mine_rycj.png" alt="" class="img imgse">
  20. <span>人员采集</span>
  21. </div>
  22. <div class="my_yj_rig">
  23. <img src="@/static/you@2x.png" alt="" class="img imgse">
  24. </div>
  25. </div>
  26. <div class="my_yj" @click = "guanlu">
  27. <!-- <button open-type="contact"></button> -->
  28. <div class="my_yj_left">
  29. <img src="@/static/icon_mine_rygl.png" alt="" class="img">
  30. <span>人员管理</span>
  31. </div>
  32. <div class="my_yj_rig">
  33. <img src="@/static/you@2x.png" alt="" class="img">
  34. </div>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. info_data: {}, // 用户信息
  43. flag: '', // 是否登录
  44. //手机号码
  45. phone:''
  46. }
  47. },
  48. onLoad() {
  49. },
  50. onPullDownRefresh() {
  51. },
  52. onShow() {
  53. let type = uni.getStorageSync('ztype')
  54. this.info_data = uni.getStorageSync('userInfo')
  55. this.phone = uni.getStorageSync('phone')
  56. console.log(this.info_data)
  57. if(type == 0){
  58. uni.redirectTo({
  59. url: '/pages/login/login'
  60. })
  61. this.flag = false
  62. }else{
  63. this.flag = true
  64. }
  65. },
  66. methods: {
  67. tx_btn() {
  68. if(!this.flag){
  69. uni.navigateTo({
  70. url: '/pages/login/login',
  71. })
  72. }
  73. },
  74. shop_btn(index){
  75. const token = uni.getStorageSync('token')
  76. if(!token){
  77. uni.redirectTo({
  78. url: '/pages/login/login',
  79. })
  80. return
  81. }
  82. uni.navigateTo({
  83. url: `/pages/my/order_list?index=${index}`
  84. })
  85. },
  86. share_btn() {
  87. console.log(23)
  88. const token = uni.getStorageSync('token')
  89. // if(!token){
  90. // uni.redirectTo({
  91. // url: '/pages/login/login',
  92. // })
  93. // return
  94. // }
  95. uni.switchTab({
  96. url:'/pages/tab/fw'
  97. })
  98. },
  99. //人员管理
  100. guanlu(){
  101. wx.navigateTo({
  102. // url: '/pages/home/management'
  103. })
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .my_box{
  110. background-color: #f0f0f0;
  111. min-height: 100vh;
  112. .my_cont{
  113. height: 340upx;
  114. position: relative;
  115. overflow: hidden;
  116. display: flex;
  117. align-items: center;
  118. padding: 0 46upx;
  119. background-color: #fff;
  120. .my_img{
  121. width: 100%;
  122. position: absolute;
  123. bottom: 0;
  124. left: 0;
  125. }
  126. .my_nr{
  127. position: relative;
  128. z-index: 1;
  129. display: flex;
  130. .icon{
  131. width: 160upx;
  132. height: 160upx;
  133. display: flex;
  134. justify-content: center;
  135. align-items: center;
  136. background: #fff;
  137. border-radius: 50%;
  138. margin-right: 21upx;
  139. .img{
  140. border-radius: 50%;
  141. width: 156upx;
  142. height: 156upx;
  143. vertical-align: 0;
  144. }
  145. }
  146. .my_xq{
  147. color: #fff;
  148. display: flex;
  149. justify-content: center;
  150. flex-direction: column;
  151. .my_name{
  152. font-size: 35upx;
  153. line-height: 1;
  154. margin-bottom: 27upx;
  155. }
  156. .my_phone{
  157. font-size: 28upx;
  158. line-height: 1;
  159. }
  160. }
  161. }
  162. }
  163. .my_gn{
  164. background: #fff;
  165. width: calc(100vw - 40upx);
  166. position: relative;
  167. z-index: 2;
  168. margin: -50upx auto 20upx;
  169. height: 253upx;
  170. box-sizing: border-box;
  171. background: #fff;
  172. border-radius: 6upx;
  173. display: flex;
  174. padding: 0 35upx;
  175. justify-content: space-between;
  176. align-items: center;
  177. .my_gn_item{
  178. .img{
  179. width: 103upx;
  180. height: 103upx;
  181. margin-bottom: 27upx;
  182. }
  183. p{
  184. color: #343434;
  185. font-size: 31upx;
  186. font-weight: 400;
  187. text-align: center;
  188. line-height: 1;
  189. }
  190. }
  191. }
  192. .my_yj{
  193. // width: calc(100vw - 40upx);
  194. box-sizing: border-box;
  195. // margin: 0 auto 20upx;
  196. height: 112upx;
  197. display: flex;
  198. align-items: center;
  199. justify-content: space-between;
  200. padding: 0 34upx;
  201. background: #fff;
  202. position: relative;
  203. button{
  204. width: 100%;
  205. height: 100%;
  206. position: absolute;
  207. left: 0;
  208. top: 0;
  209. background: transparent;
  210. &::after{
  211. border: none!important;
  212. }
  213. }
  214. .my_yj_left{
  215. display: flex;
  216. align-items: center;
  217. .img{
  218. width: 55upx;
  219. height: 55upx;
  220. margin-right: 34upx;
  221. }
  222. span{
  223. color: #343434;
  224. font-weight: 400;
  225. font-size: 31upx;
  226. }
  227. }
  228. .my_yj_rig{
  229. width: 46upx;
  230. height: 46upx;
  231. .img{
  232. width: 100%;
  233. height: 100%;
  234. }
  235. }
  236. }
  237. }
  238. .imgse{
  239. width: 56upx !important;
  240. height: 47upx !important;
  241. }
  242. </style>