洛阳学员端
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.

71 lines
1.6 KiB

10 months ago
5 months ago
10 months ago
5 months ago
10 months ago
5 months ago
10 months ago
10 months ago
5 months ago
  1. <script>
  2. // import location from '@/common/js/location.js'
  3. export default {
  4. onLaunch: function() {
  5. // location.getLocation(()=>{
  6. // this.$store.dispatch('getCity')
  7. // });
  8. // this.getLocationAuthority()
  9. },
  10. onShow: function() {
  11. console.log('App Show')
  12. },
  13. onHide: function() {
  14. console.log('App Hide')
  15. },
  16. methods: {
  17. getLocationAuthority() {
  18. let _this = this
  19. uni.getLocation({
  20. type: 'wgs84',
  21. success: function(res) {
  22. _this.$store.dispatch('getCity')
  23. },
  24. fail: function(err) {
  25. console.log('为什么失败了')
  26. console.log(err)
  27. uni.showModal({
  28. content: '为了能够获取精确的数据,请去手机设置里手动开启app定位权限',
  29. showCancel: false,
  30. confirmText: '知道了,关闭弹窗',
  31. success: function(res) {
  32. if (res.confirm) {
  33. console.log('用户点击确定');
  34. } else if (res.cancel) {
  35. console.log('用户点击取消');
  36. }
  37. }
  38. });
  39. }
  40. });
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. /*每个页面公共css */
  47. @import '@/uni_modules/uview-ui/index.scss';
  48. @import 'common/css/app.scss';
  49. .pageBgImg {
  50. background: url('./static/images/bigImg/topBg.png') #F6F7FA no-repeat;
  51. background-size: 100% 278rpx;
  52. }
  53. .topBg{
  54. background: url('./static/images/bigImg/topBg.png') #F6F7FA no-repeat;
  55. background-size: 100% 100%;
  56. }
  57. .h1 {
  58. text {
  59. &.active {
  60. &::before {
  61. background: url('./static/images/bigImg/h1Active.png') #F6F7FA no-repeat;
  62. background-size: 100% 100%;
  63. }
  64. }
  65. }
  66. }
  67. </style>