index.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //import * as WxJsApi from '@/utils/wxJsApi.js'
  2. import * as API from '@/apis/job/install.js'
  3. export default {
  4. data() {
  5. return {
  6. form: {
  7. name: '',
  8. sex: '',
  9. value:''
  10. },
  11. titleStyle:{
  12. fontWeight:'bold',
  13. },
  14. }
  15. },
  16. methods: {
  17. logout(){
  18. uni.showLoading({
  19. title:"加载中",mask:true,
  20. })
  21. API.logout().then((res)=>{
  22. this.carhelp.setToken("");
  23. this.carhelp.set("token_tdate","")
  24. this.carhelp.setPersonInfo("");
  25. uni.reLaunch({
  26. url: '/pages/job/index/index'
  27. });
  28. uni.hideLoading()
  29. }).catch(error => {
  30. uni.showToast({
  31. title:error
  32. })
  33. })
  34. },
  35. signOut(){
  36. var _this=this;
  37. uni.showModal({
  38. title:"提示",
  39. content:"确认是否退出",
  40. success: (res) => {
  41. if (res.confirm) {
  42. _this.logout()
  43. }
  44. }
  45. })
  46. },
  47. },
  48. onReady(){
  49. //document.getElementsByTagName('uni-page-wrapper')[0].style="background-color: #eff1f7;"
  50. }
  51. }