开通会员微信支付功能开发,调整移动端设备禁止页面字体跟随系统变更

This commit is contained in:
唐明明
2021-09-29 14:42:46 +08:00
parent 86562924a5
commit de71b4cd58
84 changed files with 787 additions and 749 deletions

46
pages/wxAuth/wxAuth.vue Normal file
View File

@@ -0,0 +1,46 @@
<template>
<view class="content vertical">
<u-loading mode="flower"></u-loading>
</view>
</template>
<script>
import { wxCode, wxOpenid } from '@/apis/interfaces/wx'
export default {
data() {
return {
};
},
created() {
// 微信鉴权
if(!this.$Route.query.code){
wxCode({
pages: 'wechat-auth'
}).then(res => {
window.location.href = res
})
}else{
wxOpenid({
code: this.$Route.query.code
}).then(res => {
this.$store.commit('setCode', res.openid)
this.$Router.replaceAll({name: 'Index'})
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
}
}
</script>
<style lang="scss">
.content{
background: white;
height: 100vh;
text-align: center;
}
</style>