login-page.mixin.js 963 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
import loginSuccess from './loginSuccess.js';
import config from '@/uni_modules/uni-id-pages/config.js'
let mixin = {
	data() {
		return {
			config,
			isMounted:false
		}
	},
	onUnload() {
		// #ifdef H5
		document.onkeydown = false
		// #endif
	},
	mounted() {
		this.isMounted = true;
	},
	computed: {
		needAgreements(){
			if(this.isMounted){
				if (this.$refs.agreements) {
					return this.$refs.agreements.needAgreements
				} else {
					return false
				}
			}
		},
		agree: {
			get() {
				if(this.isMounted){
					if (this.$refs.agreements) {
						return this.$refs.agreements.isAgree
					} else {
						return true
					}
				}
			},
			set(agree) {
				if (this.$refs.agreements) {
					this.$refs.agreements.isAgree = agree
				}else{
					console.log('不存在 隐私政策协议组件');
				}
			}
		}
	},
	methods: {
		loginSuccess(e) {
			loginSuccess(e)
		}
51
	}
DCloud_JSON's avatar
DCloud_JSON 已提交
52 53
}
export default mixin