indexs.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view>
  3. </view>
  4. </template>
  5. <script>
  6. import config from '@/config'
  7. const baseUrl = config.baseUrl
  8. import {uploadmore} from '@/utils/common.js'
  9. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  10. export default{
  11. components:{},
  12. data(){
  13. return{
  14. hrimg:require('@/work/static/images/hrimg.png'),
  15. }
  16. },
  17. methods:{
  18. checkPermi, checkRole,
  19. getNextFn(){
  20. this.$tab.navigateTo("/work/pages/business/add")
  21. },
  22. // 上传图片
  23. getaddImage(e){
  24. let that = this;
  25. let file =[],count=9
  26. // if(e=='zj'){
  27. // file = that.zjfile;
  28. // count=9
  29. // }else{
  30. // file = that.mjfile;
  31. // count=9
  32. // }
  33. uni.chooseImage({
  34. count: 1,
  35. success:function(res){
  36. let img= res.tempFilePaths;
  37. if(img.length + file.length > count){
  38. uni.showToast({
  39. title: '最多上传'+count+'张图片',
  40. icon: 'none',
  41. duration: 2000
  42. })
  43. }else{
  44. let imglen = res.tempFilePaths.length;
  45. var fuwufile = [];
  46. uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
  47. if(e=='zj'){
  48. that.zjfile = that.zjfile.concat(rs);
  49. that.datainfo.identificationPhoto=that.zjfile.join(',')
  50. }
  51. })
  52. }
  53. }
  54. });
  55. },
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. </style>