You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.0 KiB
89 lines
2.0 KiB
<script>
|
|
import APPUpdate from "plugins/APPUpdate/index.js";
|
|
export default {
|
|
globalData: {
|
|
// wxSilentLoginURL: "https://supervise.yxtsoft.com/portal/v1/wxuser/wxSilentLogin",
|
|
wxSilentLoginURL: "http://192.168.1.107:8112/portal/v1/wxuser/wxSilentLogin",
|
|
// wxSilentLoginURL: "http://192.168.1.110:8112/portal/v1/wxuser/wxSilentLogin",
|
|
wxAuthLoginURL: "https://supervise.yxtsoft.com/api/portal//v1/wxuser/wxAuthLogin",
|
|
SilentLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/SilentLogin",// 注册
|
|
token: "",
|
|
isLogin: false,
|
|
sid: "",
|
|
headImage: "",
|
|
username: "",
|
|
orgSidPath: "",
|
|
orgNamePath: "",
|
|
organizationSid: "",
|
|
}, //全局变量,
|
|
|
|
onLaunch: function() {
|
|
console.log("》》》》", 11111111);
|
|
/* #ifdef APP-PLUS */
|
|
APPUpdate();
|
|
/* #endif */
|
|
|
|
console.log("》》》》", 22222222222);
|
|
|
|
// // 不要删除
|
|
// console.log('高德地图定位Web服务key', '59970402d1c3f7dc1efff17d4dfcff21')
|
|
},
|
|
onShow: function() {
|
|
|
|
},
|
|
onHide: function() {},
|
|
|
|
methods: {
|
|
//登录的回调函数
|
|
handlerLogin() {
|
|
wx.login({
|
|
success: res => {
|
|
//获取code
|
|
const code = res.code
|
|
console.log(res);
|
|
//将code发给后端请求token
|
|
// wx.request({
|
|
// url: 'http://xxxxxxx/login',
|
|
// data: {
|
|
// code
|
|
// },
|
|
// method: 'post',
|
|
// success: (res) => {
|
|
// const token = res.data.token
|
|
// //将token保存本地
|
|
// wx.setStorageSync('token', token)
|
|
// console.log(res);
|
|
// }
|
|
// })
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/*每个页面公共css */
|
|
@import '@/uni_modules/uni-scss/index.scss';
|
|
|
|
/* #ifndef APP-NVUE */
|
|
@import '@/static/customicons.css';
|
|
|
|
// 设置整个项目的背景色
|
|
page {
|
|
height: 100%;
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* #endif */
|
|
|
|
@import '@/uni_modules/uview-ui/index.scss';
|
|
@import '@/common/app.scss';
|
|
|
|
.example-info {
|
|
font-size: 14px;
|
|
color: #333;
|
|
padding: 10px;
|
|
}
|
|
</style>
|