From a2504309aa632d7e78bb348012998f198d42dafd Mon Sep 17 00:00:00 2001 From: lqq Date: Wed, 23 Oct 2019 16:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=AA=8C=E8=AF=81=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/article/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/article/index.js b/pages/article/index.js index 56e2c00..4583d9a 100644 --- a/pages/article/index.js +++ b/pages/article/index.js @@ -1,6 +1,7 @@ // pages/article/index.js import {ArticeModel} from '../../models/artice.js' import dayjs from '../../utils/dayjs/index.js' +import { store } from '../../utils/store.js' let artice = new ArticeModel() Page({ @@ -27,7 +28,14 @@ Page({ }, onlineSubmit () { console.log('在线报名') - this.onlineSignApi() // 在线报名 + if (store.hasPhone()) { + this.onlineSignApi() // 在线报名 + } else { + wx.redirectTo({ + url: `/pages/register/index`, + }) + } + }, /** * 生命周期函数--监听页面加载