抖音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.

55 lines
1.3 KiB

  1. const navigationBarHeight = (getApp().statusBarHeight + 50) + '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. list:[],
  10. teljpgUrl: imgurl.teljpg.url,
  11. },
  12. gotoDetail(e) {
  13. tt.navigateTo({
  14. url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}`
  15. })
  16. },
  17. phone: function (e) {
  18. let that = this;
  19. tt.makePhoneCall({
  20. phoneNumber: e.target.dataset.merchantlinkphone
  21. });
  22. },
  23. goCertification(e){
  24. tt.navigateTo({
  25. url: `/pages/shopCertification/shopCertification?id=${e.currentTarget.dataset.id}`
  26. })
  27. },
  28. goMap(e){
  29. let {latitude,longitude} = e.currentTarget.dataset.item
  30. console.log(latitude,longitude);
  31. tt.openLocation({
  32. latitude:Number(latitude),
  33. longitude:Number(longitude),
  34. scale: 18,
  35. success() {
  36. console.log("打开地图成功");
  37. },
  38. fail(err) {
  39. console.log("打开地图失败:", err.errMsg);
  40. },
  41. });
  42. },
  43. onLoad: function (options) {
  44. this.setData({
  45. list:JSON.parse(options.list)
  46. })
  47. console.log(this.data.list);
  48. },
  49. onReady(e) {
  50. },
  51. })