company.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view>
  3. <image :src="'https://mall.zhaijieshi.cc/file/jzmall/zhaie.jpg' + '?' + randomNum" mode="widthFix" style="width: 100%"></image>
  4. </view>
  5. </template>
  6. <script>
  7. const util = require('../../../utils/util.js');
  8. const api = require('../../../config/api.js');
  9. //获取应用实例
  10. const app = getApp();
  11. export default {
  12. data() {
  13. return {
  14. randomNum: (Math.random() * 100000000).toFixed(0),
  15. name: 'o2o商城',
  16. address: '',
  17. latitude: '31.201900',
  18. longitude: '121.587839',
  19. phone: '4009208718',
  20. qq: ''
  21. };
  22. }
  23. /**
  24. * 生命周期函数--监听页面加载
  25. */,
  26. onLoad: function (options) {
  27. // this.getAbout();
  28. },
  29. methods: {
  30. getAbout: function () {
  31. let that = this;
  32. util.request(api.AboutUrl).then(function (res) {
  33. if (res.errno === 0) {
  34. that.setData({
  35. name: res.data.name,
  36. address: res.data.address,
  37. phone: res.data.phone,
  38. qq: res.data.qq,
  39. latitude: res.data.latitude,
  40. longitude: res.data.longitude
  41. });
  42. }
  43. });
  44. },
  45. showLocation: function (e) {
  46. var that = this;
  47. uni.openLocation({
  48. latitude: parseFloat(that.latitude),
  49. longitude: parseFloat(that.longitude),
  50. name: that.name,
  51. address: that.address
  52. });
  53. },
  54. callPhone: function (e) {
  55. var that = this;
  56. uni.makePhoneCall({
  57. phoneNumber: that.phone
  58. });
  59. }
  60. }
  61. };
  62. </script>
  63. <style>
  64. /* about.ttss */
  65. .label {
  66. font-size: 26rpx;
  67. margin-left: 20rpx;
  68. padding: 10rpx 0;
  69. }
  70. .about-item {
  71. background: white;
  72. border-top: solid #f2f2f2 0.5rpx;
  73. border-bottom: solid #f2f2f2 0.5rpx;
  74. width: 100%;
  75. height: 100rpx;
  76. display: flex;
  77. flex-direction: row;
  78. justify-content: space-between;
  79. }
  80. .item-left {
  81. font-size: 24rpx;
  82. margin-left: 40rpx;
  83. margin-top: auto;
  84. margin-bottom: auto;
  85. }
  86. .item-right {
  87. margin-right: 15rpx;
  88. margin-top: auto;
  89. margin-bottom: auto;
  90. }
  91. .right-icon {
  92. width: 40rpx;
  93. height: 40rpx;
  94. }
  95. </style>