my.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="page">
  3. <view class="top">
  4. <view class="wd">
  5. <image :src="user == '' ? '../../static/ls.jpg' : user.avatarUrl" class="head"></image>
  6. <view class="xs" @click="navigate('/pages/user/info')">
  7. <view class="nickName" v-if="user == ''">登录 / 注册</view>
  8. <view class="nickName" v-else>
  9. <text>{{ user.nickName }}</text>
  10. </view>
  11. <view class="nh">{{ user == '' ? '你还未登陆' : ' 您好,欢迎来到谢通门智慧旅游' }}</view>
  12. <view class="clear"></view>
  13. </view>
  14. </view>
  15. <view class="icon" @click="navigate('/pages/user/info')" v-if="user != ''">&#xe8b7;</view>
  16. <image src="../../static/my.png" mode="aspectFill"></image>
  17. </view>
  18. <view class="main">
  19. <view class="list flex">
  20. <view class="item f" @click="navigate('/pages/order/my')" style="padding-right: 0px;">
  21. <view style="border-right: 1px solid #f1f1f1;">
  22. <text class="icon ic" style="background-color: #2196F3;">&#xe705;</text>
  23. <view class="fon">我的预约</view>
  24. </view>
  25. </view>
  26. <view class="item f" @click="navigate('/pages/shop/list')">
  27. <text class="icon ic" style="background-color:#9727ec">&#xe616;</text>
  28. <view class="fon">商家中心</view>
  29. </view>
  30. </view>
  31. <view class="list" style="margin-top: 13px;">
  32. <view class="item hr" @click="call()">
  33. <text class="icon ic" style="background-color:#276fec">&#xe634;</text>
  34. <text>求助电话</text>
  35. <text class="icon arrow">&#xe62d;</text>
  36. </view>
  37. <view class="item hr" @click="navigate('/pages/other/feedback')">
  38. <text class="icon ic" style="background-color:#FF554B">&#xe610;</text>
  39. <text>投诉建议</text>
  40. <text class="icon arrow">&#xe62d;</text>
  41. </view>
  42. <view class="item hr">
  43. <button open-type="share" hover-class="none" class="button">
  44. <text class="icon ic" style="background-color:#34cf43">&#xe607;</text>
  45. <text>分享朋友</text>
  46. <text class="icon arrow">&#xe62d;</text>
  47. </button>
  48. </view>
  49. <view class="item" @click="navigate('/pages/other/about')">
  50. <text class="icon ic" style="background-color:#343f61">&#xe65f;</text>
  51. <text>关于我们</text>
  52. <text class="icon arrow">&#xe62d;</text>
  53. </view>
  54. </view>
  55. </view>
  56. <help ref="help"></help>
  57. </view>
  58. </template>
  59. <script>
  60. import help from '../../components/help.vue';
  61. export default {
  62. components: {
  63. help
  64. },
  65. data() {
  66. return {
  67. ip: this.$http.urls.ip,
  68. user: this.$getUser(),
  69. aboutUs: { showPictures: [] }
  70. };
  71. },
  72. onLoad() {
  73. this.aboutUs = uni.getStorageSync('aboutUs');
  74. },
  75. onShow() {
  76. this.user = this.$getUser();
  77. },
  78. methods: {
  79. navigate(url) {
  80. if (this.$hasLogin()) {
  81. uni.navigateTo({ url: url });
  82. } else {
  83. uni.navigateTo({ url: '/pages/user/login' });
  84. }
  85. },
  86. //拨打求助电话
  87. call() {
  88. this.$refs.help.init();
  89. }
  90. },
  91. onShareAppMessage: function(res) {
  92. return {
  93. title: '谢通门智慧旅游',
  94. path: '/pages/index/index2',
  95. imageUrl: '../../static/fx.jpg',
  96. success: res => {},
  97. fail: res => {}
  98. };
  99. }
  100. };
  101. </script>
  102. <style lang="scss">
  103. .top {
  104. position: relative;
  105. height: 270px;
  106. color: white;
  107. overflow: hidden;
  108. .wd {
  109. position: absolute;
  110. top: 80px;
  111. left: 20px;
  112. z-index: 11;
  113. .head {
  114. width: 75px;
  115. height: 75px;
  116. border-radius: 50%;
  117. }
  118. .xs {
  119. margin-left: 90px;
  120. font-weight: bold;
  121. margin-top: 10px;
  122. .nickName {
  123. width: 100%;
  124. font-size: 14px;
  125. margin-top: 20px;
  126. position: relative;
  127. }
  128. .nh {
  129. font-size: 12px;
  130. font-weight: normal;
  131. margin-top: 5px;
  132. }
  133. }
  134. }
  135. .icon {
  136. position: absolute;
  137. right: 14px;
  138. top: 93px;
  139. font-size: 25px;
  140. z-index: 1;
  141. }
  142. image {
  143. width: 100%;
  144. height: 270px;
  145. position: absolute;
  146. }
  147. }
  148. .main {
  149. padding: 15px 15px 50px 15px;
  150. width: 100%;
  151. overflow: hidden;
  152. position: absolute;
  153. margin-top: -100px;
  154. .list {
  155. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  156. width: 100%;
  157. background-color: white;
  158. border-radius: 5px;
  159. overflow: hidden;
  160. .fon {
  161. padding-top: 12px;
  162. }
  163. .item {
  164. padding: 16px;
  165. background-color: white;
  166. font-size: 16px;
  167. color: #222222;
  168. .ic {
  169. font-size: 20px;
  170. background-color: red;
  171. text-align: center;
  172. padding: 5px;
  173. border-radius: 5px;
  174. margin-right: 9px;
  175. color: white;
  176. }
  177. .arrow {
  178. font-size: 20px;
  179. }
  180. }
  181. }
  182. }
  183. .button {
  184. text-align: left;
  185. background-color: white;
  186. color: #2e2e2e !important;
  187. font-size: 16px;
  188. padding-left: 0px;
  189. padding-right: 2px;
  190. line-height: 20px;
  191. overflow: initial;
  192. &:hover {
  193. background-color: white;
  194. outline: none;
  195. }
  196. }
  197. </style>