抖音c端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 regels
1.4 KiB

  1. const navigationBarHeight = (getApp().statusBarHeight + 60) + 'px'
  2. const util = require("../../utils/util.js");
  3. const Http = require("../../utils/HttpBasics");
  4. const config = require("../../config/config");
  5. const imgurl = require("../../utils/imgurl");
  6. Page({
  7. data: {
  8. navigationBarHeight,
  9. imageList: [],
  10. },
  11. previewImage(e) {
  12. let index = e.currentTarget.dataset.index
  13. let { imageList } = this.data;
  14. let arr = []
  15. imageList.map(item=>{
  16. arr.push(item.url)
  17. })
  18. console.log(imageList[index].url,imageList);
  19. tt.previewImage({
  20. current: imageList[index].url,
  21. urls: arr,
  22. success: () => {
  23. console.log("previewImage success");
  24. },
  25. fail: (err) => {
  26. tt.showModal({
  27. title: "预览失败",
  28. content: err.errMsg,
  29. showCancel: false,
  30. });
  31. },
  32. complete: () => {
  33. console.log("预览完成");
  34. },
  35. });
  36. },
  37. getCertification(){
  38. Http.get({
  39. url:config.api.certification,
  40. data:{
  41. id:this.data.id
  42. }
  43. }).then(res=>{
  44. console.log(res);
  45. if(res.data&&res.data.corpContractPath){
  46. let arr = JSON.parse(res.data.corpContractPath)
  47. console.log(arr);
  48. this.setData({
  49. imageList:arr
  50. })
  51. }
  52. })
  53. },
  54. onLoad: function (options) {
  55. this.setData({
  56. id:options.id
  57. })
  58. this.getCertification()
  59. }
  60. })