about.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view>
  3. <!-- <view class="container">
  4. <view class="label">项目名称:</view>
  5. <view class="about-item">
  6. <view class="item-left">
  7. <text>{{name}}</text>
  8. </view>
  9. </view>
  10. <view class="label">公司地址:</view>
  11. <view class="about-item">
  12. <view class="item-left">
  13. <text>{{address}}</text>
  14. </view>
  15. <view class="item-right" bindtap="showLocation">
  16. <van-icon class="right-icon" name="location-o" />
  17. </view>
  18. </view>
  19. <view class="label">电话号码:</view>
  20. <view class="about-item">
  21. <view class="item-left">
  22. <text>{{phone}}</text>
  23. </view>
  24. <view class="item-right" bindtap="callPhone">
  25. <van-icon class="right-icon" name="phone-o" />
  26. </view>
  27. </view>
  28. </view> -->
  29. <image src="https://mall.zhaijieshi.cc/file/jzmall/weixin/introduce.jpeg?1" mode="widthFix" style="width: 100%">
  30. <!-- <image src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/company/introduce.png" mode="widthFix" style="width:100%"> -->
  31. </image>
  32. </view>
  33. </template>
  34. <script>
  35. const util = require('../../../utils/util.js');
  36. const api = require('../../../config/api.js');
  37. //获取应用实例
  38. const app = getApp();
  39. export default {
  40. data() {
  41. return {
  42. name: 'o2o商城',
  43. address: '',
  44. latitude: '31.201900',
  45. longitude: '121.587839',
  46. phone: '4009208718',
  47. qq: ''
  48. };
  49. }
  50. /**
  51. * 生命周期函数--监听页面加载
  52. */,
  53. onLoad: function (options) {
  54. // this.getAbout();
  55. },
  56. methods: {
  57. getAbout: function () {
  58. let that = this;
  59. util.request(api.AboutUrl).then(function (res) {
  60. if (res.errno === 0) {
  61. that.setData({
  62. name: res.data.name,
  63. address: res.data.address,
  64. phone: res.data.phone,
  65. qq: res.data.qq,
  66. latitude: res.data.latitude,
  67. longitude: res.data.longitude
  68. });
  69. }
  70. });
  71. },
  72. showLocation: function (e) {
  73. var that = this;
  74. uni.openLocation({
  75. latitude: parseFloat(that.latitude),
  76. longitude: parseFloat(that.longitude),
  77. name: that.name,
  78. address: that.address
  79. });
  80. },
  81. callPhone: function (e) {
  82. var that = this;
  83. uni.makePhoneCall({
  84. phoneNumber: that.phone
  85. });
  86. }
  87. }
  88. };
  89. </script>
  90. <style>
  91. /* about.ttss */
  92. .label {
  93. font-size: 26rpx;
  94. margin-left: 20rpx;
  95. padding: 10rpx 0;
  96. }
  97. .about-item {
  98. background: white;
  99. border-top: solid #f2f2f2 0.5rpx;
  100. border-bottom: solid #f2f2f2 0.5rpx;
  101. width: 100%;
  102. height: 100rpx;
  103. display: flex;
  104. flex-direction: row;
  105. justify-content: space-between;
  106. }
  107. .item-left {
  108. font-size: 24rpx;
  109. margin-left: 40rpx;
  110. margin-top: auto;
  111. margin-bottom: auto;
  112. }
  113. .item-right {
  114. margin-right: 15rpx;
  115. margin-top: auto;
  116. margin-bottom: auto;
  117. }
  118. .right-icon {
  119. width: 40rpx;
  120. height: 40rpx;
  121. }
  122. </style>