66
App.vue
66
App.vue
@@ -1,5 +1,8 @@
|
||||
<script>
|
||||
import {mapState,mapMutations} from 'vuex'
|
||||
import {
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
let that = this;
|
||||
@@ -11,8 +14,10 @@
|
||||
if (resLogin.errMsg === "login:ok") {
|
||||
// 获取jsCode成功,通过jsCode调用微信api获取用户openId
|
||||
console.log(resLogin)
|
||||
that.$ajax("Demo/test",{code:resLogin.code})
|
||||
.then(res=>{
|
||||
that.$ajax("Demo/test", {
|
||||
code: resLogin.code
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
that.saveOpenIdSession(res.data)
|
||||
@@ -40,13 +45,13 @@
|
||||
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
...mapMutations(['saveOpenIdSession'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss">
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
||||
@import './common/uni.css';
|
||||
@@ -69,6 +74,7 @@
|
||||
background-color: #F5F5F5 !important;
|
||||
min-height: 100% !important;
|
||||
height: auto !important;
|
||||
background: linear-gradient(to bottom right, pink, #a900ff7a, pink);
|
||||
}
|
||||
|
||||
.uni-top-window uni-tabbar .uni-tabbar {
|
||||
@@ -121,4 +127,54 @@
|
||||
}
|
||||
|
||||
/* #endif*/
|
||||
|
||||
.warp {
|
||||
margin: 10rpx 15rpx;
|
||||
}
|
||||
|
||||
.Grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-content: space-between;
|
||||
background: #f7f7f7;
|
||||
border-radius: 15rpx;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
|
||||
.Grid-Item {
|
||||
width: 25%;
|
||||
|
||||
.Grid-Item-1 {
|
||||
margin-left: 10rpx;
|
||||
margin-right: 10rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #efeded;
|
||||
border-radius: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 5rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.GSimg {
|
||||
width: 81rpx;
|
||||
height: 81rpx;
|
||||
}
|
||||
|
||||
.GStitle {
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #06121e;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user