myself.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="content">
  3. <view class="person">
  4. <image class="person_touxiang" v-if="touxiang==''" src="../../static/my/touxiang.png"></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="navigateToLiucheng">
  58. <image src="../../static/my/liucheng.png" class="img-btn"></image>
  59. <text class="list-txt">流程管理</text>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import {
  67. getuserinfo
  68. } from '../../utils/api_hotel.js'
  69. export default {
  70. data() {
  71. return {
  72. phone:'0791-82293574',//客服热线电话
  73. cardName:'',//用户名
  74. cardIdentity:'',//身份
  75. cardNum:'',//卡号
  76. touxiang:'',
  77. }
  78. },
  79. onLoad() {
  80. this.getUserInfo()
  81. },
  82. mounted() {
  83. // window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa46ef222053a1047&redirect_uri=https://chtech.ncjti.edu.cn/hotel/ihotel-api/ihotel/hotelUser/weixinAuth&response_type=code&scope=snsapi_base&state=pages/index/index#wechat_redirect';
  84. },
  85. methods: {
  86. // 获取用户信息
  87. getUserInfo() {
  88. let _self = this
  89. getuserinfo().then((res) => {
  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. return;
  100. } else {
  101. console.log('获取用户信息失败')
  102. }
  103. }).catch((err) => {
  104. this.$message.error(err.message)
  105. });
  106. // this.$axios.get("/hotel/ihotel-api/ihotel/hotelUser/userInfo",
  107. // {
  108. // headers:{
  109. // 'user_token':localStorage.getItem('token')
  110. // }
  111. // }).then(res => {
  112. // res = res.data
  113. // if (res.success) {
  114. // if (res.data.statu == '1') {
  115. // _self.cardName=res.data.name
  116. // _self.cardIdentity=res.data.identityType
  117. // _self.cardNum=res.data.telPhone
  118. // _self.touxiang=res.data.headImage
  119. // }else {
  120. // alert('您没有权限,请联系客服')
  121. // }
  122. // } else {
  123. // console.log('获取用户信息失败')
  124. // }
  125. // });
  126. },
  127. //跳转到全部订单
  128. navigateToAll(){
  129. uni.navigateTo({
  130. url:"../my_orderlist/my_orderlist?Inv=6"
  131. })
  132. },
  133. //跳转到待支付订单
  134. navigateToDaizhifu(){
  135. uni.navigateTo({
  136. url: "../my_orderlist/my_orderlist?Inv=1",
  137. })
  138. },
  139. //跳转到待入住订单
  140. navigateToDairuzhu(){
  141. uni.navigateTo({
  142. url: "../my_orderlist/my_orderlist?Inv=2"
  143. })
  144. },
  145. //跳转到已入住订单
  146. navigateToYiruzhu(){
  147. uni.navigateTo({
  148. url: "../my_orderlist/my_orderlist?Inv=3"
  149. })
  150. },
  151. //跳转到已取消订单
  152. navigateToYiquxiao(){
  153. uni.navigateTo({
  154. url: "../my_orderlist/my_orderlist?Inv=0"
  155. })
  156. },
  157. //跳转到待结账订单
  158. navigateToDaijiezhang(){
  159. uni.navigateTo({
  160. url: "../my_orderlist/my_orderlist?Inv=4"
  161. })
  162. },
  163. //跳转到已完成订单
  164. navigateToYiwancheng(){
  165. uni.navigateTo({
  166. url: "../my_orderlist/my_orderlist?Inv=5"
  167. })
  168. },
  169. //拨打人工热线
  170. telphone(phone){
  171. uni.makePhoneCall({ phoneNumber: phone }) // 传参带入号码即可
  172. },
  173. //跳转到流程管理
  174. navigateToLiucheng(){
  175. uni.navigateTo({
  176. // url: "../liuchengTeacher/liu_teach"
  177. // url: "../liuchengO/liu_other"
  178. url:"../liuchengManger/liu_manage"
  179. })
  180. },
  181. //跳转到房间报修
  182. navigateToBaoxiu(){
  183. window.location.href='https://jtishfw.ncjti.edu.cn/baoxiu/repair-h5/#/'
  184. }
  185. }
  186. }
  187. </script>
  188. <style>
  189. @import url("./css/myself.css");
  190. </style>