From d3fa1d743c03b249699787b6b82420ab5ea11f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Sun, 27 Dec 2020 15:48:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E=E4=BC=81?= =?UTF-8?q?=E8=8E=B7=E5=AE=A2=E4=BB=8B=E7=BB=8D=E6=AC=A2=E8=BF=8E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2,=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E6=9C=89?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E7=99=BB=E5=BD=95=E7=9A=84=E5=BA=97=E9=93=BA?= =?UTF-8?q?id,=E6=AC=A2=E8=BF=8E=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 4 ++-- pages/company/index.js | 1 + pages/welcome/index.js | 41 ++++++++++++++++++++++++++++++++++++++-- pages/welcome/index.json | 3 ++- pages/welcome/index.wxml | 17 +++++++++++++++-- pages/welcome/index.wxss | 25 ++++++++++++++++++++++++ 6 files changed, 84 insertions(+), 7 deletions(-) diff --git a/app.json b/app.json index 68e8a60..5490fe0 100644 --- a/app.json +++ b/app.json @@ -1,5 +1,6 @@ { "pages": [ + "pages/welcome/index", "pages/company/index", "pages/shortVideo/index", "pages/richText/richText", @@ -10,8 +11,7 @@ "pages/mall/index", "pages/live/index", "pages/ticket/index", - "pages/company/search/search", - "pages/welcome/index" + "pages/company/search/search" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/company/index.js b/pages/company/index.js index 89dd7eb..cd18f54 100644 --- a/pages/company/index.js +++ b/pages/company/index.js @@ -32,6 +32,7 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { + wx.hideHomeButton() wx.getStorage({ key : "companyRecord", success : res=>{ diff --git a/pages/welcome/index.js b/pages/welcome/index.js index b269da1..311733d 100644 --- a/pages/welcome/index.js +++ b/pages/welcome/index.js @@ -6,18 +6,55 @@ */ Page({ - /** * 页面的初始数据 */ data: { + loding : true, }, /** * 生命周期函数--监听页面加载 */ - onLoad(options) { + onLoad() { + wx.getStorage({ + key : 'newUser', + success : ()=>{ + wx.getStorage({ + key : "storeId", + success : ()=>{ + wx.reLaunch({ + url: "/pages/shortVideo/index", + }) + }, + fail : ()=>{ + wx.reLaunch({ + url: "/pages/company/index", + }) + } + }) + }, + fail: ()=>{ + this.setData({ + loding: false + }) + } + }) + }, + /** + * 进入企获客 + */ + onNav(){ + wx.setStorage({ + key : "newUser", + data : true, + success : res=>{ + wx.redirectTo({ + url: "/pages/company/index" + }) + } + }) } }) \ No newline at end of file diff --git a/pages/welcome/index.json b/pages/welcome/index.json index 7af8b0a..f0f1934 100644 --- a/pages/welcome/index.json +++ b/pages/welcome/index.json @@ -1,4 +1,5 @@ { "usingComponents": {}, - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTextStyle": "white" } \ No newline at end of file diff --git a/pages/welcome/index.wxml b/pages/welcome/index.wxml index e51ae68..8451830 100644 --- a/pages/welcome/index.wxml +++ b/pages/welcome/index.wxml @@ -1,2 +1,15 @@ - -pages/welcome/index.wxml + + + + + + + + + + + + + + + diff --git a/pages/welcome/index.wxss b/pages/welcome/index.wxss index c4fcc69..cc7dcfd 100644 --- a/pages/welcome/index.wxss +++ b/pages/welcome/index.wxss @@ -5,4 +5,29 @@ * 碌碌无为枉半生,一朝惊醒万事空。 */ +.welcome-img{ + width: 100%; + vertical-align: top; +} +.footer-btn{ + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + padding: 50rpx 50rpx 80rpx; + background: linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.5)); + z-index: 99; +} + +.footer-btn button[size="default"]{ + width: 100%; + height: 90rpx; + line-height: 90rpx; + padding: 0; + border-radius: 0; + background: white; + color: #0b0041; + font-size: 32rpx; +}