12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <script>
- export default {
- onLaunch: function() {
- //#ifdef APP-PLUS
- // console.log('App Launch')
- //判断客户端类别
- if (/MicroMessenger/.test(window.navigator.userAgent)) {
- uni.setStorage({
- key:'userAgent',
- data:'wxAgent'
- });
- // console.log('handleAliPay 微信客户端');
- } else if (/AlipayClient/.test(window.navigator.userAgent)) {
- uni.setStorage({
- key:'userAgent',
- data:'aliAgent'
- });
- // console.log('handleAliPay 支付宝客户端');
- } else {
- uni.setStorage({
- key:'userAgent',
- data:'otherAgent'
- });
- // console.log('handleAliPay 其他浏览器');
- };
- //#endif
- // this.$wxApi.config();
- },
- onShow: function() {
- // console.log('App Show')
- },
- onHide: function() {
- // console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import "./static/css/iconfont.css";
- @import "uview-ui/index.scss";
- @import "./mycss.scss";
- /*每个页面公共css */
- </style>
|