Commit 8410ec71 authored by 珠峰架构's avatar 珠峰架构

微信支付

parent 85470940
......@@ -10,8 +10,7 @@
{
"navigationBarTitleText": "首页",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor":"#ffffff"
"navigationBarTextStyle": "black"
}
},{
"path": "pages/index/index",
......@@ -65,19 +64,9 @@
}
}
<<<<<<< HEAD
,{
"path" : "pages/h5/pay",
"name":"pay",
"style" :
{
"navigationBarTitleText": "支付",
"enablePullDownRefresh": false
}
}
=======
>>>>>>> f9aa0f8cb7d83071cf50743c971db8673eea303a
],
"subPackages":[],
......
<template>
<view>
<img src="../../static/img/screen/screen-bg.png" alt="">
<view class="screen-container">
<image class="bg" src="../../static/img/screen/screen-bg.png" mode="scaleToFill"/>
<button v-if="unregistered" @click="changeTabBar" class="btn" >
马上进入
</button>
<button v-else class="btn" open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber">
授权绑定
</button>
</view>
</template>
<script>
import http from '@/shopro/request/index';
import store from '@/shopro/store';
import {
mapActions,
mapGetters
} from 'vuex'
export default {
data() {
return {
unregistered:false,
tabBarVal: '步数',
registerPopup:true,
form:{name:'xxx'},
tips: '获取',
seconds: 10
}
},
computed: {
...mapGetters(['userInfo','todayNum'])
},
methods: {
...mapActions(['getPhoneNumber','registerInfoFn','getWeRunDataFn','authCheck','getUserInfo']),
// 切换底部tab;
changeTabBar(){
if(this.unregistered){
uni.navigateTo({
url: '/pages/h5/index',
})
}
},
// 获取手机号
async getInfoPhoneNumber (e) {
console.log(e)
let number = await this.getPhoneNumber(e);
let register = await this.registerInfoFn();
if(register){ //注册成功
this.unregistered = true;
}
},
async getAuth(){
let token = uni.getStorageSync('token');
// 如果有缓存信息
if (token) {
let auth = await this.authCheck();
if(auth == 0) {
this.unregistered = true;
}else if(auth == 2001){
this.unregistered = false;
}
} else {
let getUserInfo = await this.getUserInfo();
}
}
},
onHide(){
},
onShow() {
// uni.hideTabBar();
},
onReady() {
this.getAuth();
}
}
</script>
<style>
<style lang="scss" scoped>
.screen-container{
// position: fixed;
position: absolute;
width: 100%;
height: 100%;
top:0;
left: 0;
right: 0;
bottom: 0;
.bg{
width: 100%;
height: 100%;
}
.btn{
position: absolute;
transform: translateX(-50%);
left:50%;
bottom: 100rpx;
width: 640rpx;
height: 100rpx;
line-height: 100rpx;
background-color: #fff;
color:red;
border-radius: 30rpx;
font-size: 50rpx;
font-weight: 400;
color: #ff6427;
box-shadow: 0 10px 15px 0 rgba(255, 255, 255, 0.2);
}
}
</style>
static/img/screen/screen-bg.png

513 KB | W: | H:

static/img/screen/screen-bg.png

454 KB | W: | H:

static/img/screen/screen-bg.png
static/img/screen/screen-bg.png
static/img/screen/screen-bg.png
static/img/screen/screen-bg.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment