myself.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="content">
  3. <view class="person">
  4. <image class="person_touxiang" v-if="touxiang==''" src="../../static/my/touxiang.svg"></image>
  5. <image class="person_touxiang" v-else :src="touxiang"></image>
  6. <text class="person_name">{{cardName}}
  7. <text class="person_identity">
  8. <text v-if="cardIdentity==0">其他</text>
  9. <text v-if="cardIdentity==1">学生</text>
  10. <text v-if="cardIdentity==4">教职工</text>
  11. <text v-if="cardIdentity==5">校友</text>
  12. </text>
  13. </text>
  14. <text class="person_phone">{{cardNum}}</text>
  15. </view>
  16. <!-- 第二部分,我的订单 -->
  17. <view class="my_order">
  18. <view class="order_title">我的订单</view>
  19. <view class="order_all" @click="navigateToAll">全部></view>
  20. <view class="item-list">
  21. <view class="item-list-one" @click="navigateToDaizhifu">
  22. <image src="../../static/my/no_zhifu.svg" class="img-btn"></image>
  23. <text class="list-txt">待支付</text>
  24. </view>
  25. <view class="item-list-one" @click="navigateToDairuzhu">
  26. <image src="../../static/my/dairuzhu.svg" class="img-btn"></image>
  27. <text class="list-txt">待入住</text>
  28. </view>
  29. <view class="item-list-one" @click="navigateToYiruzhu">
  30. <image src="../../static/my/yiruzhu.svg" class="img-btn"></image>
  31. <text class="list-txt">已入住</text>
  32. </view>
  33. <view class="item-list-one" @click="navigateToYiquxiao">
  34. <image src="../../static/my/yiquxiao.svg" class="img-btn"></image>
  35. <text class="list-txt">已取消</text>
  36. </view>
  37. </view>
  38. <view class="item-list">
  39. <view class="item-list-one" @click="navigateToYiwancheng">
  40. <image src="../../static/my/wancheng.svg" class="img-btn"></image>
  41. <text class="list-txt">已完成</text>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 第三部分,我的服务 -->
  46. <view class="my_help">
  47. <view class="help_title">我的服务</view>
  48. <view class="item-list">
  49. <view class="item-list-one" @click="telphone(phone)">
  50. <image src="../../static/my/person_phone.svg" class="img-btn"></image>
  51. <text class="list-txt">人工热线</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. phone:'0791-82293574',//客服热线电话
  62. cardName:'',//用户名
  63. cardIdentity:'',//身份
  64. cardNum:'',//卡号
  65. touxiang:'',
  66. }
  67. },
  68. onLoad() {
  69. this.getUserInfo()
  70. },
  71. methods: {
  72. // 获取用户信息
  73. getUserInfo() {
  74. let _self = this
  75. this.$axios.get("/hotel/ihotel-api/ihotel/hotelUser/userInfo",
  76. {
  77. headers:{
  78. 'user_token':localStorage.getItem('token')
  79. }
  80. }).then(res => {
  81. res = res.data
  82. if (res.success) {
  83. if (res.data.statu == '1') {
  84. _self.cardName=res.data.name
  85. _self.cardIdentity=res.data.identityType
  86. _self.cardNum=res.data.telPhone
  87. _self.touxiang=res.data.headImage
  88. }else {
  89. alert('您没有权限,请联系客服')
  90. }
  91. } else {
  92. console.log('获取用户信息失败')
  93. }
  94. });
  95. },
  96. //跳转到全部订单
  97. navigateToAll(){
  98. uni.navigateTo({
  99. url:"../my_orderlist/my_orderlist?Inv=6"
  100. })
  101. },
  102. //跳转到待支付订单
  103. navigateToDaizhifu(){
  104. uni.navigateTo({
  105. url: "../my_orderlist/my_orderlist?Inv=1",
  106. })
  107. },
  108. //跳转到待入住订单
  109. navigateToDairuzhu(){
  110. uni.navigateTo({
  111. url: "../my_orderlist/my_orderlist?Inv=2"
  112. })
  113. },
  114. //跳转到已入住订单
  115. navigateToYiruzhu(){
  116. uni.navigateTo({
  117. url: "../my_orderlist/my_orderlist?Inv=3"
  118. })
  119. },
  120. //跳转到已取消订单
  121. navigateToYiquxiao(){
  122. uni.navigateTo({
  123. url: "../my_orderlist/my_orderlist?Inv=0"
  124. })
  125. },
  126. //跳转到待结账订单
  127. navigateToDaijiezhang(){
  128. uni.navigateTo({
  129. url: "../my_orderlist/my_orderlist?Inv=4"
  130. })
  131. },
  132. //跳转到已完成订单
  133. navigateToYiwancheng(){
  134. uni.navigateTo({
  135. url: "../my_orderlist/my_orderlist?Inv=5"
  136. })
  137. },
  138. //拨打人工热线
  139. telphone(phone){
  140. uni.makePhoneCall({ phoneNumber: phone }) // 传参带入号码即可
  141. },
  142. //跳转到房间报修
  143. navigateToBaoxiu(){
  144. window.location.href='https://jtishfw.ncjti.edu.cn/baoxiu/repair-h5/#/'
  145. }
  146. }
  147. }
  148. </script>
  149. <style>
  150. @import url("./css/myself.css");
  151. </style>