master
wangxia 2 years ago
parent 3e892bc262
commit a25f4cb2b6

@ -1,3 +1,5 @@
const app = getApp();
// const commonUtil = require("../../utils/commonUtil");
// pages/company/company/index.js // pages/company/company/index.js
Page({ Page({
@ -5,14 +7,14 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
storeInfo: {}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad (options) { onLoad (options) {
this.getInfo()
}, },
/** /**
@ -23,17 +25,16 @@ Page({
}, },
goMap () { goMap () {
console.log("123") console.log("123")
let that = this
wx.getLocation({ wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度 type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success (res) { success (res) {
console.log(res); console.log(res);
const latitude = 34.757034;
const longitude = 113.772587;
wx.openLocation({ wx.openLocation({
latitude, latitude: Number(that.data.storeInfo.lat),
longitude, longitude: Number(that.data.storeInfo.lng),
name:'郑州一才企业管理有限公司', name: that.data.storeInfo.fullName,
address:'河南省郑州市管城回族区心怡路与东站南街交叉口郑东升龙广场2号楼5楼', address: that.data.storeInfo.address,
scale: 18 scale: 18
}) })
}, },
@ -48,7 +49,44 @@ Page({
onShow () { onShow () {
}, },
/**
* 获取企业信息
*/
getInfo () {
let that = this
wx.request({
url: app.globalData.ip + "/yishoudan/agency/getInfo",
method: "get",
header: app.globalData.headers,
success: function (res) {
console.log(res)
let data = res.data.data
if (res.data.status == 200) {
data.agency.imgList = data.agency.imgs.split(',')
that.setData({
storeInfo: data.agency
})
}
}
})
},
/**
* 拨打电话
*/
makePhoneCall () {
var that = this;
if (!that.data.storeInfo.contactTel) {
wx.showToast({
title: '暂无联系方式',
icon: 'none'
})
return
}
wx.makePhoneCall({
phoneNumber: that.data.storeInfo.contactTel,
});
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */

@ -1,10 +1,15 @@
<view class hover-class="none" hover-stop-propagation="false"> <view class hover-class="none" hover-stop-propagation="false">
<view class="pr p10"> <view class="pr p10">
<view class="br8 bgf"> <view class="br8 bgf">
<image show-menu-by-longpress src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/pugongying/yicai.png" mode="aspectFill" style="width: 100%;height:200px;display:block;border-radius: 6px 6px 0px 0px;" class="db toppic br8"></image> <swiper class="" indicator-dots="{{true}}" indicator-color="rgba(0,0,0,.3)" autoplay="{{true}}" interval='{{5000}}' circular='{{true}}'>
<swiper-item wx:for="{{storeInfo.imgList}}" class="" item-id="">
<image show-menu-by-longpress src="{{item}}" mode="aspectFill" style="width: 100%;height:200px;display:block;border-radius: 6px 6px 0px 0px;" class="db toppic br8"></image>
</swiper-item>
</swiper>
<view class="p16"> <view class="p16">
<view class="f16 c3 fwb">关于我们</view> <view class="f16 c3 fwb">关于我们</view>
<view class="c9 f16 mt8">郑州一才企业管理是一家我是一段公司简介很长的简介我是一段公司简介很长的简介我是一段公司简介很长的简介我是一段公司简介很长的简介我是一段公司简介很长的简介我是一段公司我是一段公司简介很长的简介我是一段公司</view> <view class="c9 f16 mt8">{{storeInfo.aboutUs || '对方还未介绍自己'}}</view>
</view> </view>
</view> </view>
@ -12,9 +17,9 @@
<view class="v-center"> <view class="v-center">
<view class="flex-1 pr20"> <view class="flex-1 pr20">
<view class="f16 c3 mt6"> <view class="f16 c3 mt6">
郑州一才企业管理有限公司 {{storeInfo.fullName || '-'}}
</view> </view>
<view class="f14 c9 mt8" style=" width: calc(100vw - 120px); white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">河南省郑州市管城回族区心怡路与东站南街交叉口郑东升龙广场2号楼5楼</view> <view class="f14 c9 mt8" style=" width: calc(100vw - 120px); white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">{{storeInfo.address || '-'}}</view>
</view> </view>
<view class="mr12 mt4 tc" hover-class="thover" bindtap="goMap"> <view class="mr12 mt4 tc" hover-class="thover" bindtap="goMap">
<image src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/pugongying/daohang.svg" style="width: 28px;height:28px;"></image> <image src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/pugongying/daohang.svg" style="width: 28px;height:28px;"></image>
@ -30,16 +35,16 @@
<image wx:else class="br_8" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/service.jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image> <image wx:else class="br_8" src="https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/service.jpg" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror bindload></image>
</view> </view>
<view class="servicenamebox"> <view class="servicenamebox">
<view class="mb2 f20 fw500">客户经理</view> <view class="mb2 f20 fw500"> {{serviceInfo.contactUserName || '暂无联系人' }}</view>
<view class="c3 f16"> <view class="c3 f16">
{{serviceInfo.userName || '李经理' }}
<i class="mr4"></i> <i class="mr4"></i>
<p class="f14">{{serviceInfo.tel || '0371-6611 3723'}}</p> <p class="f14">{{serviceInfo.contactTel || '暂无联系方式'}}</p>
</view> </view>
</view> </view>
</view> </view>
<view class hover-class="none" hover-stop-propagation="false"> <view class hover-class="none" hover-stop-propagation="false">
<view class="iconfont icon-weixin dib" bindtap="showdialog" hover-class="thover06" style="width:40px;height:40px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 20px;float: right;"></view> <!-- <view class="iconfont icon-weixin dib" bindtap="showdialog" hover-class="thover06" style="width:40px;height:40px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 20px;float: right;"></view> -->
<view class="iconfont icon-dianhua mr10 dib" bindtap="makePhoneCall" hover-class="thover06" style="width:40px;height:40px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 20px;float: right;"></view> <view class="iconfont icon-dianhua mr10 dib" bindtap="makePhoneCall" hover-class="thover06" style="width:40px;height:40px;border-radius: 50%;background-color: var(--color-ysd-bg);color:var(--color-hover);display: flex;align-items: center;justify-content: center;font-size: 20px;float: right;"></view>
</view> </view>
</view> </view>

Loading…
Cancel
Save