myself.vue 4.5 KB

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