import Magix from 'magix' import * as View from 'dmp-new/view' Magix.applyStyle('@index.less') export default View.extend({ tmpl: '@login.html', init (options) { this.options = options }, async render () { const { isDeeplink } = this.options const { user } = this.updater.get() const { params: routeParams } = Magix.Router.parse() // 登录成功回跳页面 // let forward = window.location.origin + '/index_isv.html'; const forward = Magix.toUrl(window.location.origin + '/index_new.html', routeParams) const params = [ 'redirectURL=' + encodeURIComponent(forward), 'style=mini', 'css_style=mdmp', // css_style为主站那边给定的样式约定值 'full_redirect=true', 'newMini2=true', 'sub=true', 'enup=0', 'qrlogin=1', 'keyLogin=true' ] const taobaoHost = ~window.location.host.indexOf('daily') ? 'login.daily.taobao.net' : 'login.taobao.com' const src = 'https://' + taobaoHost + '/member/login.jhtml?' + params.join('&') // const bpUrl = forward.replace('/login.html', '/index_new.html') // 'https://login.taobao.com/member/login.jhtml?style=mini&css_style=mdmp&full_redirect=true&from=mdmp&sub=true&tpl_redirect_url=' // 已被清退标识 const hasBeenQuited = user.USER_STATE == '1' this.updater.digest({ hasBeenQuited, forward, isDeeplink, src // bpUrl }) }, 'join': function (e) { const viewName = 'dmp-new/views/pages/rights/join_dialog' const viewOptions = {} const dialogOptions = { top: 100, width: 600 } this.mxDialog(viewName, viewOptions, dialogOptions) }, 'showRequirements' (e) { const { user, hasBeenQuited } = this.updater.get() this._alert(hasBeenQuited ? '账号关闭原因' : '达摩盘开通门槛', user.prompt, null, { width: 380, top: 100 }) } })