提交 217eda1f 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

上级 264be1d9
此差异已折叠。
{
"pages": [
"pages/map/index",
"pages/index",
"pages/pay/pay",
"pages/logs/logs",
"pages/login/login",
"pages/map/index"
"pages/login/login"
],
"__usePrivacyCheck__":true,
"window": {
......
const app = getApp();
Page({
data: {
userInfo:{},
longitude: 120.113514,
latitude: 30.339744,
markers: [{
......@@ -20,12 +22,55 @@ Page({
// },
}]
},
onLoad: function (options) {
this.getInfo()
},
makePhoneCall: function() {
wx.makePhoneCall({
phoneNumber: this.data.userInfo.contactPhone // 电话号码
})
},
getInfo(){
let that = this
let subdomain=''
let appId = wx.getAccountInfoSync().miniProgram.appId
if(appId=='wxdb3d8f9a94eca8d9'){
subdomain='jinyanxia'
}else if(appId=='wx175347bd3977d6a9'){
subdomain='21'
}else if(appId=='wx7dca103eaf35d1f7'){
subdomain='wuyoushop0571jg0001'
}else if(appId=='wxca8cfe95f6fa0e0b'){
subdomain='guoxindengshi'
}else if(appId=='wxbe067c202501e58a'){
subdomain='xmy888'
}
wx.request({
url: app.globalData.defurl + '/api/store/info?link='+subdomain,
success: function (res) {
let data = res.data.data
let list = [{
longitude: data.longitude,
latitude: data.latitude,
}]
that.setData({
userInfo:data,
latitude:data.latitude,
longitude:data.longitude,
markers:list,
})
},
complete(){
wx.hideLoading();
}
})
},
toIndex(){
wx.openLocation({
latitude: 30.339744,
longitude: 120.113514,
name: "佐萌科技旗舰店",
address: "杭州市拱墅区祥茂路166号 华滋科欣设计创意园2号楼701室",
latitude: Number(this.data.latitude),
longitude: Number(this.data.longitude),
name: this.data.userInfo.storeName,
address: this.data.userInfo.areaAddress,
scale: 14,
infoUrl: "",
});
......
<view class="homepage">
<view class="homepage" style="background: #f6f6f6;height: 100vh">
<map id="myMap" scale="18" longitude="{{longitude}}" latitude="{{latitude}}" markers="{{markers}}" show-location="{{true}}"
>
</map>
<image bindtap='toIndex' class='wxLogo' style="width: 50rpx;height: 50rpx;border-radius: 10rpx" src='/asstes/img/daohang.jpg'></image>
<view style="margin: 20rpx 0;background: #ffffff;padding-bottom: 10rpx">
<view style="margin: 30rpx 20rpx">
<view style="display: flex">
<view>
<image style="width: 150rpx;height: 150rpx;border-radius: 50%" src="{{userInfo.headImg}}"></image>
</view>
<view style="margin-left: 26rpx;margin-top: 30rpx">
<view>
<view>{{userInfo.storeName}}</view>
<view style="margin-top: 10rpx">
<text>{{userInfo.contacts}}</text> <text> {{userInfo.contactPhone}} </text> <text bindtap='makePhoneCall' style="border-radius: 10rpx;font-size: 25rpx;color: #a3c41d;background: #f7ffd6;border: 1px solid #a3c41d;padding: 1px 4px"> 拨打 </text>
</view>
</view>
</view>
</view>
<view style="">
<view >
{{userInfo.areaAddress}}
</view>
</view>
<view bindtap='toIndex' style="background: #ecddc0;width: 700rpx;height: 50rpx;line-height: 50rpx;text-align: center;margin: 30rpx auto">
导航到店
</view>
</view>
</view>
</view>
......@@ -127,5 +127,5 @@
"ignore": [],
"include": []
},
"appid": "wx175347bd3977d6a9"
"appid": "wxdb3d8f9a94eca8d9"
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册