myself.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <view class="content">
  3. <view class="person">
  4. <!-- {{touxiang}} -->
  5. <!-- <image class="person_touxiang" v-else v-if="touxiang=='' || touxiang==null" src="../../static/my/touxiang.png"></image> -->
  6. <image class="person_touxiang" :src="touxiang"></image>
  7. <!-- <image class="person_touxiang" src="//wxprivate-1251448646.file.myqcloud.com/campus/avatars/26957/tmp/a2aa26a56e684bcbdc3ceb8c1e791a6b.png?sign=ROA9R0Ny4POhoBnYy00uhMkznzthPTEyNTE0NDg2NDYmYj13eHByaXZhdGUmaz1BS0lEcGFEZzNYNFJhWUs2dVZ0NkI4MnFZN1ZrbGJKckhUVk0mZT0xNzIzMTkwNTU0JnQ9MTcyMzE5MDI1NCZyPTEzNTUxMzc4OTYmZj0vMTI1MTQ0ODY0Ni93eHByaXZhdGUvY2FtcHVzL2F2YXRhcnMvMjY5NTcvdG1wL2EyYWEyNmE1NmU2ODRiY2JkYzNjZWI4YzFlNzkxYTZiLnBuZw==">ww</image> -->
  8. <text class="person_name">{{cardName}}</text>
  9. <text class="person_phone">{{cardNum}}</text>
  10. <text class="person_identity">
  11. <text v-if="cardIdentity=='0'">其他</text>
  12. <text v-if="cardIdentity=='1'">学生</text>
  13. <text v-if="cardIdentity=='4'">教职工</text>
  14. <text v-if="cardIdentity=='5'">校友</text>
  15. <text v-if="cardIdentity=='7'">临时人员</text>
  16. </text>
  17. </view>
  18. <!-- 第二部分,我的订单 -->
  19. <view class="my_order">
  20. <view class="order_title">我的订单</view>
  21. <view class="order_all" @click="navigateToAll">全部></view>
  22. <view class="item-list">
  23. <view class="item-list-one" @click="navigateToDaizhifu">
  24. <image src="../../static/my/no_zhifu.svg" class="img-btn"></image>
  25. <text class="list-txt">待支付</text>
  26. </view>
  27. <view class="item-list-one" @click="navigateToDairuzhu">
  28. <image src="../../static/my/dairuzhu.svg" class="img-btn"></image>
  29. <text class="list-txt">待入住</text>
  30. </view>
  31. <view class="item-list-one" @click="navigateToYiruzhu">
  32. <image src="../../static/my/yiruzhu.svg" class="img-btn"></image>
  33. <text class="list-txt">已入住</text>
  34. </view>
  35. <view class="item-list-one" @click="navigateToYiquxiao">
  36. <image src="../../static/my/yiquxiao.svg" class="img-btn"></image>
  37. <text class="list-txt">已取消</text>
  38. </view>
  39. </view>
  40. <view class="item-list">
  41. <view class="item-list-one" @click="navigateToYiqtuikuan">
  42. <image src="../../static/my/yiquxiao.svg" class="img-btn"></image>
  43. <text class="list-txt">已退款</text>
  44. </view>
  45. <view class="item-list-one" @click="navigateToDaijiezhang">
  46. <image src="../../static/my/no_pay.svg" class="img-btn"></image>
  47. <text class="list-txt">待结账</text>
  48. </view>
  49. <view class="item-list-one" @click="navigateToYiwancheng">
  50. <image src="../../static/my/wancheng.svg" class="img-btn"></image>
  51. <text class="list-txt">已完成</text>
  52. </view>
  53. </view>
  54. <view style="height: 10px;"></view>
  55. </view>
  56. <!-- 第三部分,我的服务 -->
  57. <view class="my_help">
  58. <view class="help_title">我的服务</view>
  59. <view class="item-list">
  60. <view class="item-list-one" @click="telphone(phone)">
  61. <image src="../../static/my/person_phone.svg" class="img-btn"></image>
  62. <text class="list-txt">人工热线</text>
  63. </view>
  64. <!-- -->
  65. <view class="item-list-one" @click="navigateToLiucheng" v-if="cardIdentity=='4'">
  66. <!-- -->
  67. <image src="../../static/my/liucheng.png" class="img-btn"></image>
  68. <text class="list-txt">流程管理</text>
  69. </view>
  70. <!-- -->
  71. <!-- <view class="item-list-one" @click="navigateToLiucheng2" v-if="cardIdentity=='4'">
  72. <image src="../../static/my/liucheng.png" class="img-btn"></image>
  73. <text class="list-txt">教师流程</text>
  74. </view> -->
  75. <view class="item-list-one" @click="navigateToLiucheng3" v-if="manager=='1'">
  76. <!-- -->
  77. <image src="../../static/my/liucheng.png" class="img-btn"></image>
  78. <text class="list-txt">管理员流程</text>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. import {
  86. getuserinfo,
  87. apartSet
  88. } from '../../utils/api_hotel.js'
  89. export default {
  90. data() {
  91. return {
  92. phone:'',//客服热线电话
  93. cardName:localStorage.getItem('name'),//用户名
  94. cardIdentity:localStorage.getItem('department'),//身份
  95. cardNum:localStorage.getItem('telephone'),//卡号
  96. touxiang:localStorage.getItem('head_image'),
  97. manager:localStorage.getItem('manager'),//1管理员,0不是管理员
  98. }
  99. },
  100. onLoad() {
  101. },
  102. onShow() {
  103. // alert(localStorage.getItem('manager'))
  104. this.getAllset()
  105. // alert(localStorage.getItem('usersId'),'id')
  106. // this.getUserInfo()
  107. },
  108. mounted() {
  109. },
  110. methods: {
  111. // 授权获取code
  112. handleAuthCode() {
  113. alert('aaa')
  114. let authCode = this.handleUrlCode().code(); // 截取页面code
  115. let appId = 'wxd87cbe1db0437303'; // 微信公众号的AppId
  116. let scope = 'snsapi_userinfo' // 授权
  117. let redirectUri = 'https%3A%2F%2Fchtech.ncjti.edu.cn%2Fhotel%2Fh5%2F%23%2Fpages%2Fmyself%2Fmyself';//回调地址
  118. let path = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appId +
  119. '&redirect_uri=' + redirectUri + '&response_type=code&scope=' + scope +
  120. '&state=STATE#wechat_redirect';
  121. if (authCode == null || authCode == '' || authCode == undefined) {
  122. alert('a')
  123. window.location.href = path;
  124. } else {
  125. alert('b')
  126. // this.handleOpenId(authCode);
  127. }
  128. },
  129. // 获取用户信息
  130. getUserInfo() {
  131. let _self = this
  132. var data="?userId="+localStorage.getItem('usersId')
  133. getuserinfo(data).then((res) => {
  134. if (res.success) {
  135. _self.cardName=res.data.userName
  136. _self.cardIdentity=res.data.idCardInformation
  137. // _self.touxiang=res.data.headImage
  138. return;
  139. } else {
  140. console.log('获取用户信息失败')
  141. }
  142. }).catch((err) => {
  143. this.$message.error(err.message)
  144. });
  145. },
  146. //公寓整体配置
  147. getAllset(){
  148. let _self = this
  149. _self.roomType = []
  150. apartSet().then((res) => {
  151. if (res.success) {
  152. this.phone=res.data.phoneNumbr
  153. return;
  154. } else {
  155. }
  156. }).catch((err) => {
  157. // uni.showModal({
  158. // content:err.message
  159. // })
  160. });
  161. },
  162. //跳转到全部订单
  163. navigateToAll(){
  164. uni.navigateTo({
  165. url:"/pages/my_orderlist/my_orderlist?Inv=6"
  166. })
  167. },
  168. //跳转到待支付订单
  169. navigateToDaizhifu(){
  170. uni.navigateTo({
  171. url: "/pages/my_orderlist/my_orderlist?Inv=1",
  172. })
  173. },
  174. //跳转到待入住订单
  175. navigateToDairuzhu(){
  176. uni.navigateTo({
  177. url: "/pages/my_orderlist/my_orderlist?Inv=3"
  178. })
  179. },
  180. //跳转到已入住订单
  181. navigateToYiruzhu(){
  182. uni.navigateTo({
  183. url: "/pages/my_orderlist/my_orderlist?Inv=4"
  184. })
  185. },
  186. //跳转到已取消订单
  187. navigateToYiquxiao(){
  188. uni.navigateTo({
  189. url: "/pages/my_orderlist/my_orderlist?Inv=9"
  190. })
  191. },
  192. //已退款
  193. navigateToYiqtuikuan(){
  194. uni.navigateTo({
  195. url: "/pages/my_orderlist/my_orderlist?Inv=7"
  196. })
  197. },
  198. //跳转到待结账订单
  199. navigateToDaijiezhang(){
  200. uni.navigateTo({
  201. url: "/pages/my_orderlist/my_orderlist?Inv=5"
  202. })
  203. },
  204. //跳转到已完成订单
  205. navigateToYiwancheng(){
  206. uni.navigateTo({
  207. url: "/pages/my_orderlist/my_orderlist?Inv=8"
  208. })
  209. },
  210. //拨打人工热线
  211. telphone(phone){
  212. uni.makePhoneCall({ phoneNumber: phone }) // 传参带入号码即可
  213. },
  214. //跳转到临时人员流程管理
  215. navigateToLiucheng(){
  216. uni.navigateTo({
  217. url: "/pages/liuchengO/liu_other"
  218. })
  219. },
  220. //跳转到流程管理
  221. navigateToLiucheng2(){
  222. uni.navigateTo({
  223. url: "/pages/liuchengTeacher/liu_teach"
  224. // url: "../liuchengO/liu_other"
  225. // url:"../liuchengManger/liu_manage"
  226. })
  227. },
  228. //跳转到流程管理
  229. navigateToLiucheng3(){
  230. uni.navigateTo({
  231. // url: "../liuchengTeacher/liu_teach"
  232. // url: "../liuchengO/liu_other"
  233. url:"/pages/liuchengManger/liu_manage"
  234. })
  235. },
  236. //跳转到房间报修
  237. navigateToBaoxiu(){
  238. window.location.href='https://jtishfw.ncjti.edu.cn/baoxiu/repair-h5/#/'
  239. }
  240. }
  241. }
  242. </script>
  243. <style>
  244. @import url("./css/myself.css");
  245. </style>