main.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import App from './App'
  2. import Vue from 'vue'
  3. import getOpenId from './apis/utils/init.js'
  4. import './assets/font/font.css'
  5. getOpenId.init()
  6. import mixin from './apis/utils/mixin.js'
  7. Vue.prototype.carhelp = mixin
  8. //import Vconsole from 'vconsole'
  9. //import uView from "uview-ui";
  10. import uView from '@/uni_modules/uview-ui'
  11. Vue.use(uView);
  12. Vue.mixin({
  13. updated: function() {
  14. },
  15. onReady() {
  16. },
  17. onLoad(option) {
  18. if (option.test == 'test') {
  19. //let vConsole = new Vconsole()
  20. }
  21. },
  22. methods: {
  23. getPersonName(name,item){
  24. var thisname=name
  25. if(item.isAnonymous){
  26. thisname=name.substring(0,1)+(item.gender==1?'先生':'女士');
  27. }
  28. return thisname
  29. },
  30. getTime(item){
  31. var time=item.updateTime?item.updateTime:item.createTime;
  32. if(time){
  33. return time.substring(0,10)
  34. }
  35. return ''
  36. },
  37. getUnit(item){
  38. var sz=['','元/日','元/周','元/月','error','']
  39. if(item.salary=='面议'){
  40. return ''
  41. }
  42. if(item.method){
  43. return sz[item.method]
  44. }
  45. if(item.settlementMethod){
  46. return sz[item.settlementMethod]
  47. }
  48. return ''
  49. },
  50. gotoUrl(url,tab) {
  51. uni.navigateTo({
  52. url: "/" + url
  53. })
  54. }
  55. }
  56. })
  57. Vue.config.productionTip = false
  58. App.mpType = 'app'
  59. const app = new Vue({
  60. ...App
  61. })
  62. app.$mount()