xg
This commit is contained in:
parent
26b5e94d99
commit
257264b68a
@ -9,12 +9,6 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/startup/startup",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/message/message",
|
||||
"style": {
|
||||
@ -707,7 +701,7 @@
|
||||
"navigationBarTitleText": "微信运动",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "contractsigningprotocol/contractsigningprotocol",
|
||||
"style": {
|
||||
"navigationBarTitleText": "签约协议",
|
||||
|
||||
@ -1,121 +0,0 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<image src="@/static/logo.png" mode=""></image>
|
||||
<!-- <view class="title">
|
||||
新医路健康服务平台
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createMobileToken
|
||||
} from '@/api/pages/login/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '新医路健康服务平台',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '新医路健康服务平台',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
// // scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
|
||||
// const scene = decodeURIComponent(query.scene)
|
||||
// if (scene >= 0) {
|
||||
// uni.setStorageSync("invitationPatientId", scene)
|
||||
// }
|
||||
},
|
||||
onShow() {
|
||||
var that = this
|
||||
// if (!uni.getStorageSync('location') && !uni.getStorageSync('region')) {
|
||||
// this.getAddress()
|
||||
// }
|
||||
// this.getAddress();
|
||||
createMobileToken().then(res => {
|
||||
uni.setStorageSync("token", res.data.token)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/homepage/homepage'
|
||||
});
|
||||
}, 1000);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//获取当前位置
|
||||
getAddress() {
|
||||
let that = this;
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
let location = res.latitude + ',' + res.longitude
|
||||
//调用逆解析接口
|
||||
uni.request({
|
||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=location', //腾讯官方逆解析接口,可直接复制
|
||||
data: {
|
||||
location: location,
|
||||
'key': "Q4DBZ-UIMC2-B63UX-CUZ6A-S3UT7-TBF3V", //自己申请的Key
|
||||
},
|
||||
method: "GET",
|
||||
success(res) {
|
||||
uni.setStorageSync('location', res.data.result.address_component.city)
|
||||
},
|
||||
fail: res => {
|
||||
console.log(res.errMsg, '解析失败返回的错误信息');
|
||||
}
|
||||
})
|
||||
},
|
||||
//失败
|
||||
fail: (res) => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '获取地址失败,请打开定位',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 50%;
|
||||
height: 400rpx;
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 28%;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
height: 48rpx;
|
||||
font-size: 49rpx;
|
||||
text-align: center;
|
||||
font-family: DengXian;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 10%;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user