From 376ac09a54e8c95190d06bf39f295c890829c103 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期二, 03 九月 2024 15:43:25 +0800 Subject: [PATCH] 查看工人详情 --- src/pages/login/index.vue | 38 ++++++++++++++++++++++++++------------ 1 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 624bae4..e55ea4d 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -7,21 +7,21 @@ </view> <view class="login_btn"> <!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU --> - <button v-if="canIUseGetPhoneNumber" type="primary" class="uni-tip-button" + <button v-if="canIUseGetPhoneNumber" class="uni-tip-button" style="backgroundColor:#fece01;borderColor:#fece01" @click="mobileAuthLogin">鎺堟潈骞剁櫥褰�</button> - <button type="primary" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" + <button style="backgroundColor:#fece01;borderColor:#fece01" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="uni-tip-button">鎺堟潈骞剁櫥褰�</button> - <view class="no_login" @click="back"> + <view class="no_login" @click="back" style="color:#fece01;borderColor:#fece01"> 鏆備笉鎺堟潈 </view> <!-- #endif --> <checkbox-group @change="changeAgree"> <view class="regisiter-agreement"> <label> - <checkbox value="1" :checked="isChecked" color="#35A6FF" style="transform:scale(0.7)" /> + <checkbox value="1" :checked="isChecked" color="#fece01" style="transform:scale(0.7)" /> 宸查槄璇诲苟鍚屾剰浠ヤ笅鍗忚 - <text class="color-base-text" @click.stop="openPopup(1)">銆婄敤鎴锋湇鍔″崗璁��</text>鍜� <text - class="color-base-text" @click.stop="openPopup(2)">銆婇殣绉佹斂绛栥��</text> + <text class="color-base-text" @click.stop="toArticle(1)">銆婄敤鎴锋湇鍔″崗璁��</text> + <!-- 鍜� <text class="color-base-text" @click.stop="toArticle(2)">銆婇殣绉佹斂绛栥��</text> --> </label> </view> </checkbox-group> @@ -88,6 +88,7 @@ title: "鐧诲綍鎴愬姛", icon: "success" }) + uni.setStorage({ key: 'uid', data: res.data.id, @@ -143,10 +144,17 @@ } }, methods: { - openPopup(type) { - this.$util.redirectTo('/otherPages/member/webView/webView', { - link: type - }) + toArticle(type) { + if(type==1){ + uni.navigateTo({ + url:'/pages/article/article' + }) + }else{ + uni.navigateTo({ + url:'/pages/article/privacy' + }) + } + }, changeAgree(e) { console.log(e) @@ -184,6 +192,9 @@ this.$api.CreateUser(obj).then(result => { if (result.code == 1) { this.$db.set('userToken', result.data.accessToken); + this.$api.getUser().then(res => { + this.$db.set('userInfo', JSON.stringify(res.data)) + }) this.$util.redirectTo( '/pages/index/index', {}, 'tabbar') @@ -213,6 +224,9 @@ success: res => { this.$api.temLogin(res.code).then((result) => { if (result.code == 1) { + this.$api.getUser().then(res => { + this.$db.set('userInfo', JSON.stringify(res.data)) + }) this.$db.set('userToken', result.data.accessToken); this.$util.redirectTo( '/pages/index/index', {}, @@ -272,7 +286,7 @@ <style lang="scss" scoped> .wrap { - background: linear-gradient(to bottom, #B4DEFF, #ffffff); + background: linear-gradient(to bottom, #fbec99, #ffffff); display: flex; align-items: center; flex-direction: column; @@ -303,7 +317,7 @@ line-height: 60rpx; .color-base-text { - color: #35A6FF; + color: #fece01; } } -- Gitblit v1.9.1