代码拉取完成,页面将自动刷新
同步操作将从 守敬/chatgpt-uniapp 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<script>
import {mapState,mapMutations} from 'vuex'
export default {
methods:{
async init(){
this.$request('/api/Baseconfig/getInfo').then(res => {
console.log(res)
this.$store.commit('setConfig', res)
})
var userInfo = uni.getStorageSync('userInfo');
if(userInfo){
await this.login(userInfo);
this.$request('/api/Member/checkNum', 'POST').then(res => {
userInfo.num = res.data.num // 更新数量
this.syncUserInfo(userInfo)
})
}
},
...mapMutations(['login', 'syncUserInfo'])
},
onLaunch: function() {
console.log('App Launch')
this.init()
/* #ifdef H5 */
// 接入百度统计
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
} else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
/* #endif */
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import url("./static/style/icon.css");
</style>
<style lang="scss">
/*每个页面公共css */
@import "@/uni_modules/uview-ui/index.scss";
.pix_box {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 10000;
}
.one {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.two {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.pdg {
width: fit-content;
}
.a {
position: relative;
}
.a image {
position: absolute;
width: 100%;
height: 100%;
}
.showt {
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.2);
position: fixed;
top: 0;
left: 0;
z-index: 100000;
display: flex;
align-items: center;
justify-content: center;
}
.showt_box {
width: 520rpx;
background: #FFFFFF;
border-radius: 24rpx;
overflow: hidden;
}
.showt_title {
font-size: 34rpx;
font-weight: 500;
color: #333333;
padding: 60rpx 30rpx;
text-align: center;
margin: auto;
}
.showt_btn {
width: 100%;
height: 88rpx;
border-top: 1rpx solid rgba(0, 0, 0, 0.12);
display: flex;
align-items: center;
justify-content: space-between;
}
.showt_btn view {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
font-weight: 500;
}
.showt_btnl {
color: #999999;
border-right: 1rpx solid rgba(0, 0, 0, 0.12);
margin-left: -1rpx;
}
.custom{
width: 100vw;
height: 100vh;
background: rgba(0,0,0,0.3);
display: flex;align-items: center;justify-content: center;
position: fixed;
top: 0;left: 0;z-index: 100000;
}
.custom_box{
width: 520rpx;
background: #FFFFFF;
border-radius: 24rpx;
}
.custom_title{
font-size: 34rpx;
font-weight: 500;
color: #333333;
padding: 60rpx 30rpx;
line-height: 42rpx;
text-align: center;
}
.custom_btn{
width: 100%;height: 88rpx;
border-top: 1rpx solid rgba(0,0,0,0.12);
display: flex;align-items: center;justify-content: space-between;
}
.custom_btn view{
width: 50%;
height: 100%;
display: flex;align-items: center;justify-content: center;
font-size: 30rpx;
font-weight: 500;
}
.custom_btn_l{
color: #999999;
margin-left: -1rpx;
border-right: 1rpx solid rgba(0,0,0,0.12);
}
.custom_btn_r{
color: #23A0F0;
}
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。