From 407386d10c7d5abba69cdce0a97991ed455b9e0b Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 7 Dec 2024 15:45:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 5 +- pages/user/bangding.vue | 269 +++++++++++++++++++++------------------- pages/user/index.vue | 116 ++++++++++------- pages/user/login.vue | 36 ++++-- 4 files changed, 241 insertions(+), 185 deletions(-) diff --git a/manifest.json b/manifest.json index 788ecd0..377f67b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "吧唧一番赏", - "appid" : "__UNI__0A3F586", + "appid" : "__UNI__46B4383", "description" : "", "versionName" : "1.0.1", "versionCode" : 101, @@ -189,5 +189,6 @@ "uniStatistics" : { "enable" : false } - } + }, + "fallbackLocale" : "zh-Hans" } diff --git a/pages/user/bangding.vue b/pages/user/bangding.vue index 45ae4cc..fa0002b 100644 --- a/pages/user/bangding.vue +++ b/pages/user/bangding.vue @@ -1,146 +1,159 @@ + .quxiao { + background: linear-gradient(90deg, #2dcbff 0%, #ff95fb 100%); + filter: grayscale(1); + width: 650rpx; + height: 78rpx; + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + border-radius: 80rpx; + margin: auto; + font-size: 36rpx; + font-family: zihun152hao-jijiachaojihei; + font-weight: 400; + color: #ffffff; + } + \ No newline at end of file diff --git a/pages/user/index.vue b/pages/user/index.vue index d676a8e..2a5de24 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -21,7 +21,7 @@ - + LV.{{userinfo.quan_yi_level.level}} @@ -31,8 +31,8 @@ {{userinfo.quan_yi_level.jindu+'%'}} - + 查看详情 @@ -49,7 +49,7 @@ --> - + @@ -58,12 +58,12 @@ 吧唧币 {{ userinfo.integral || 0 }} - + 积分 {{ userinfo.score || 0 }} - + 欧气券 {{ userinfo.coupon || 0 }} @@ -89,37 +89,37 @@ {{ item.title }} - + 欧气值+{{ item.z_number }} - + - + {{ item.ywc_count }}/{{ item.number }} - + 去完成 - + 待领取 - + 已领取 - + 其他服务 @@ -631,6 +631,7 @@ that.moneyArr = res.data.other.recharge that.userinfo = res.data.userinfo that.taskList = res.data.task_list + console.log(that.userinfo.mobile_is); uni.setStorageSync('userinfo', that.userinfo) uni.setStorageSync('jump_appid', res.data.other.jump_appid) uni.setStorageSync('wx_link', res.data.other.wx_link) @@ -652,8 +653,8 @@ res.data.userinfo.is_show_js == 1 ) { item.show = true - }else{ - if(item.id == 11){ + } else { + if (item.id == 11) { item.show = false } } @@ -955,18 +956,21 @@ height: 380px; position: relative; background: #B198E2; - box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(137,77,211,0.33); + box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(137, 77, 211, 0.33); border-radius: 44rpx; - >view:nth-child(1){ + + >view:nth-child(1) { padding-top: 40rpx; - >image{ + + >image { width: 430rpx; height: 430rpx; margin: 0 auto 0; background: #FFFFFF; } } - &-view{ + + &-view { position: absolute; left: 0; bottom: 0; @@ -975,21 +979,23 @@ box-sizing: border-box; padding: 68rpx 0 0 40rpx; background: url($imgurl+'index/hudu.png') no-repeat 0 0 / 100% 100%; - - >text:nth-child(1){ + + >text:nth-child(1) { font-weight: 400; font-size: 52rpx; color: #894DD3; text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0; } - >text:nth-child(2){ + + >text:nth-child(2) { font-weight: 400; font-size: 24rpx; color: #894DD3; margin-top: 10rpx; } } - &-liwu{ + + &-liwu { position: absolute; right: -160rpx; width: 380rpx; @@ -997,7 +1003,8 @@ bottom: -60rpx; z-index: 10; } - &-close{ + + &-close { width: 94rpx; height: 94rpx; position: absolute; @@ -1389,25 +1396,29 @@ box-sizing: border-box; background: url($imgurl+'my/userVip.png') no-repeat 0 0 / 100% 100%; padding-left: 136rpx; - &-dengji{ + + &-dengji { font-weight: 500; font-size: 40rpx; color: #FFFFFF; width: 100rpx; text-shadow: #121212 1rpx 0 0, #121212 0 1rpx 0, #121212 -1rpx 0 0, #121212 0 -1rpx 0; } - &-ouqi{ - >text{ + + &-ouqi { + >text { font-weight: 400; font-size: 24rpx; color: #FFFFFF; } - >view{ + + >view { width: 280rpx; // height: 24rpx; border-radius: 12rpx; border: 1px solid #111111; - >text{ + + >text { font-weight: 400; font-size: 20rpx; color: #D2DBFF; @@ -1420,8 +1431,8 @@ } } } - - &-detail{ + + &-detail { width: 140rpx; text-align: center; font-weight: 400; @@ -1452,11 +1463,12 @@ .money-card { width: 690rpx; margin: 0 auto 0; + .other-num { display: flex; justify-content: space-around; padding: 40rpx 0 0; - + .other-item { display: flex; flex-direction: column; @@ -1467,14 +1479,14 @@ background: #1C1B20; border: 4rpx solid #5B5B5D; border-radius: 20rpx; - + .title { font-size: 24rpx; font-family: Source Han Sans CN; font-weight: 400; color: #ffffff; } - + .num { margin-top: 10rpx; font-size: 40rpx; @@ -1484,11 +1496,13 @@ } } } - .moneyTitle{ + + .moneyTitle { font-weight: 500; font-size: 32rpx; color: #FFFFFF; } + .money { display: flex; align-items: flex-end; @@ -1500,17 +1514,20 @@ height: 120rpx; background: #313133; border: 6rpx solid #5B5B5D; - >view:nth-child(1){ - >image{ + + >view:nth-child(1) { + >image { width: 100rpx; height: 80rpx; } - >text:nth-of-type(1){ + + >text:nth-of-type(1) { font-weight: 400; font-size: 40rpx; color: #F8D300; } - >text:nth-of-type(2){ + + >text:nth-of-type(2) { font-weight: 500; font-size: 48rpx; color: #F8D300; @@ -1533,7 +1550,7 @@ width: 690rpx; box-sizing: border-box; padding: 0 0 20rpx; - + .task-title { position: relative; z-index: 1; @@ -1543,7 +1560,8 @@ font-weight: 400; color: #ffffff } - .task-list{ + + .task-list { background: #313133; border-radius: 20rpx; border: 4rpx solid #5B5B5D; @@ -1606,7 +1624,7 @@ justify-content: center; align-items: center; border: 1px solid #ff873a; - + text { font-weight: 400; font-size: 28rpx; @@ -1615,7 +1633,7 @@ &.act { background: #ff873a; - + text { font-weight: 400; font-size: 28rpx; @@ -1635,32 +1653,34 @@ } } } - .qita{ - &-title{ + + .qita { + &-title { font-weight: 500; font-size: 32rpx; color: #FFFFFF; padding-left: 40rpx; } + .menu-card { margin: 30rpx auto 0; width: 690rpx; padding: 1rpx 0 40rpx; display: flex; flex-flow: row wrap; - + .menu-item { margin-top: 40rpx; display: flex; flex-flow: column nowrap; align-items: center; width: 25%; - + .icon { width: 60rpx; height: 60rpx; } - + .title { margin-top: 10rpx; font-size: 28rpx; diff --git a/pages/user/login.vue b/pages/user/login.vue index 40032a9..10358ab 100644 --- a/pages/user/login.vue +++ b/pages/user/login.vue @@ -75,7 +75,7 @@ onLoad(option) { //默认加载 // this.login(); - console.log(window.location.href, option); + // console.log(window.location.href, option); if (option != null) { if (option.code != null) { //登录 @@ -137,15 +137,17 @@ uni.setStorageSync('lgurl', '') uni.setStorageSync('lgurldata', '') console.log(param) + setTimeout(() => { uni.reLaunch({ url: param }) }, 1000) } else { - uni.reLaunch({ - url: 'index' - }) + that.getdata(); + // uni.reLaunch({ + // url: 'index' + // }) } } } @@ -210,11 +212,31 @@ //http://api.zpc-xy.com/login.html //http://192.168.195.30:8080/#/pages/user/login?code=021gjuFa1F8OOH0uLeJa1T5fMh4gjuFA&state=STATE //http://192.168.195.30:8080/pages/user/login pages/user/wxlogin - + // var redirect_uri = escape(this.$loginPage); - window.location.href =this.$wxloginPage; - // `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0e33d80d35e4a3b1&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`; + window.location.href = this.$wxloginPage; + // `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0e33d80d35e4a3b1&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`; + }, + getdata() { + let that = this + that.req({ + url: 'user', + success(res) { + if (res.status == 1 && res.data.userinfo != null && res.data.userinfo.mobile_is == 0) { + console.log("判断用户有没有手机号", res.data.userinfo.mobile_is); + uni.reLaunch({ + url: 'bangding' + }) + } else { + uni.reLaunch({ + url: 'index' + }) + } + } + }) } + + } }