123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import {
- mapGetters
- } from "vuex"
- let App = getApp()
- export default {
- components: {},
- data() {
- return {
- appData: null,
- scrollTop: 0,
- areaMsgView: null,
- ywhId: ''
- }
- },
- computed: {
- ...mapGetters(["userComplete", "isLogin", "token", "userInfo", "userOrgid", "wxInfo", "financeMInfo",
- "financeYInfo", "userTotal"
- ])
- },
- watch: {
- userComplete: {
- handler(nval, oval) {
- if (nval) {
- this.loadData('rush')
- }
- },
- immediate: true,
- deep: true
- },
- userOrgid(val) {
- // console.log('mixins监测userOrgid', val)
- if (this.ywhId != val) {
- this.ywhId = val
- this.loadPageData('rush')
- // if (this.userInfo && this.userInfo.orgId) {
- // this.ywhId = this.userInfo.orgId
- // }
- }
- }
- },
- onShow() {
- this.appData = App.globalData ? App.globalData : getApp().globalData;
- // 关闭主导航
- uni.hideTabBar();
- },
- onLoad(op) {
- // 关闭分享
- uni.hideShareMenu();
- this.appData = App.globalData ? App.globalData : getApp().globalData;
- },
- created() {
- this.appData = App.globalData ? App.globalData : getApp().globalData;
- },
- onReady() {
- // 页面初次渲染完成
- },
- methods: {
- loadData(type) {
- // type="rush" 刷新
- },
- loadPageData(type) {
- },
- rushUserInfo() {
- if (this.isLogin && this.userComplete) {
- this.$store.dispatch('getUserInfo').then(res => {}).catch(res => {});
- }
- },
- openShare() {
- // 开启分享
- uni.showShareMenu();
- }
- },
- onPullDownRefresh() {},
- onReachBottom() {},
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- onShareAppMessage: function(res) {
- // 分享到好友
- if (res.from === 'button') {
- // 来自页面内转发按钮
- } else if (res.from === 'menu') {
- // 来自页面右上角的分享事件
- }
- },
- onShareTimeline() {
- // 分享到朋友圈
- // return {
- // title: '棱接龙',
- // path: '/pages/index/index',
- // imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg'
- // };
- }
- }
|