myself.vue 4.7 KB

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