This commit is contained in:
18631081161 2025-02-22 16:47:10 +08:00
commit b5c49a127e
4 changed files with 241 additions and 185 deletions

View File

@ -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"
}

View File

@ -1,146 +1,159 @@
<template>
<view class="box">
<!-- <uni-popup ref="popup" type="bottom"> -->
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text>获得您的手机号</text>
</view>
<!-- type='primary' -->
<button
class="bottom"
withCredentials="true"
lang="zh_CN"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
授权手机号
</button>
<view class="quxiao" @click="back()">取消</view>
<!-- </uni-popup> -->
</view>
<view class="box">
<!-- <uni-popup ref="popup" type="bottom"> -->
<view class="header">
<image :src="$img1('common/logo.png?x=1')"></image>
</view>
<view class="content">
<view>申请获取以下权限</view>
<text>获得您的手机号</text>
</view>
<!-- type='primary' -->
<button class="bottom" withCredentials="true" lang="zh_CN" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
授权手机号
</button>
<view class="quxiao" @click="back()">取消</view>
<!-- </uni-popup> -->
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2
}
},
created() {
//
// this.login();
},
methods: {
back() {
uni.navigateBack()
},
getPhoneNumber(e) {
// console.log(e)
let that = this
uni.login({
success(res) {
// console.log(res)
uni.checkSession({
success() {
that.req({
url: 'login_bind_mobile',
data: {
code: e.detail.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
},
success(res) {
if (res.status == 1) {
// uni.setStorageSync('token', res.data)
uni.showToast({
title: '绑定成功~',
icon: 'success',
success() {
setTimeout(() => {
uni.navigateBack()
}, 1000)
}
})
}
}
})
}
})
}
})
}
}
}
export default {
data() {
return {
z_imgPath: this.$z_img2
}
},
created() {
//
// this.login();
},
methods: {
back() {
// uni.navigateBack()
uni.reLaunch({
url: 'index'
})
},
getPhoneNumber(e) {
// console.log(e)
let that = this
uni.login({
success(res) {
// console.log(res)
uni.checkSession({
success() {
that.req({
url: 'login_bind_mobile',
data: {
code: e.detail.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
},
success(res) {
if (res.status == 1) {
// uni.setStorageSync('token', res.data)
uni.showToast({
title: '绑定成功~',
icon: 'success',
success() {
// var pageurl = uni.getStorageSync(
// 'page');
setTimeout(() => {
uni.reLaunch({
url: 'index'
})
// console.log(pageurl);
// if (pageurl != null &&
// pageurl != '') {
// console.log(pageurl +
// "12321312");
// // uni.reLaunch({
// // url: pageurl
// // })
// } else {
// uni.navigateBack()
// }
}, 1000)
}
})
}
}
})
}
})
}
})
}
}
}
</script>
<style>
/* .box {
/* .box {
position: fixed;
bottom: 0;
} */
.header {
margin: 90rpx 0 90rpx 50rpx;
border-bottom: 1px solid #ccc;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header {
margin: 90rpx 0 90rpx 50rpx;
border-bottom: 1px solid #ccc;
text-align: center;
width: 650rpx;
height: 300rpx;
line-height: 450rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
}
.header image {
width: 200rpx;
height: 200rpx;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #fff;
}
.content {
margin-left: 50rpx;
margin-bottom: 90rpx;
color: #fff;
}
.content text {
display: block;
margin-top: 40rpx;
}
.content text {
display: block;
margin-top: 40rpx;
}
.bottom {
/* border-radius: 80rpx; */
margin: 70rpx 50rpx;
font-size: 35rpx;
}
.bottom {
/* border-radius: 80rpx; */
margin: 70rpx 50rpx;
font-size: 35rpx;
}
button::after {
border: none;
}
button::after {
border: none;
}
button {
background: #AD77EF;
font-size: 36rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #ffffff;
border-radius: 80rpx;
}
button {
background: #AD77EF;
font-size: 36rpx;
font-family: zihun152hao-jijiachaojihei;
font-weight: 400;
color: #ffffff;
border-radius: 80rpx;
}
.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;
}
</style>
.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;
}
</style>

View File

@ -21,7 +21,7 @@
</view>
</view>
</view>
<view v-if="userinfo" class="lv-box align-center justify-between">
<text class="lv-box-dengji">LV.{{userinfo.quan_yi_level.level}}</text>
<view class="lv-box-ouqi column">
@ -31,8 +31,8 @@
</text>
<view class="mt10 relative">
<text class="lv-box-num">{{userinfo.quan_yi_level.jindu+'%'}}</text>
<cmd-progress :percent="userinfo.quan_yi_level.jindu" :show-info="false"
stroke-color="#4BCAFF" :strokeWidth="12"></cmd-progress>
<cmd-progress :percent="userinfo.quan_yi_level.jindu" :show-info="false" stroke-color="#4BCAFF"
:strokeWidth="12"></cmd-progress>
</view>
</view>
<text class="lv-box-detail" @click="$c.to({ url: '/package/mine/equity' })">查看详情</text>
@ -49,7 +49,7 @@
</view> -->
</view>
<view class="">
</view>
<view class="money-card">
@ -58,12 +58,12 @@
<view class="title">吧唧币</view>
<view class="num" style="color: #ff873a;">{{ userinfo.integral || 0 }}</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/user/jf_jl' })">
<view class="title">积分</view>
<view class="num" style="color: #479EE3;">{{ userinfo.score || 0 }}</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/user/my_coupon' })">
<view class="title">欧气券</view>
<view class="num">{{ userinfo.coupon || 0 }}</view>
@ -89,37 +89,37 @@
<view class="task-item" v-for="(item, i) in taskList" :key="i">
<view class="task-l">
<view class="title">{{ item.title }}</view>
<view class="num">欧气值+{{ item.z_number }}</view>
<view class="progress">
<view class="progress-inner">
<cmd-progress :percent="item.percentage" :show-info="false"
stroke-color="linear-gradient(90deg, #7836FF 0%, #A465F2 100%)"
:strokeWidth="8"></cmd-progress>
</view>
{{ item.ywc_count }}/{{ item.number }}
</view>
</view>
<view class="task-r">
<view v-if="item.is_complete == 0" class="btn"
@click="$c.to({ type: 3, url: '/pages/shouye/index' })">
<text>去完成</text>
</view>
<view v-if="item.is_complete == 1" class="btn act" @click="completeTask(item)">
<text>待领取</text>
</view>
<view v-if="item.is_complete == 2" class="btn dis">
<text>已领取</text>
</view>
</view>
</view>
</view>
</view>
<view class="qita mt30">
<view class="qita-title">其他服务</view>
@ -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;

View File

@ -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'
})
}
}
})
}
}
}
</script>