代码拉取完成,页面将自动刷新
<script>
export default {
onLaunch: function() {
//地址加上?解决支付的时候URL未注册
if(!location.search){
location.replace(location.origin+location.pathname+"?from=web"+location.hash)
return
}
this.$comm.request({
url: 'api/web_config',
method: 'GET',
success: res => {
let jssdk = res.data.result.jssdk
this.$wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: jssdk.appId, // 必填,公众号的唯一标识
timestamp: jssdk.timestamp, // 必填,生成签名的时间戳
nonceStr: jssdk.nonceStr, // 必填,生成签名的随机串
signature: jssdk.signature, // 必填,签名
jsApiList: ['chooseImage', 'updateAppMessageShareData', 'updateTimelineShareData'] // 必填,需要使用的JS接口列表
});
}
});
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
},
globalData:{
login:true
}
};
</script>
<style>
/* @import url('/common/zcm-main.css');
@import url('/common/main.css'); */
/*每个页面公共css */
uni-page-head[uni-page-head-type='default'] ~ uni-page-wrapper {
height: auto;
}
uni-checkbox .uni-checkbox-input {
border-radius: 50% !important;
color: #ffffff !important;
border: 1px solid #777777;
width: 36rpx;
height: 36rpx;
}
uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
color: #fff;
background: #0ba29a !important;
border: 1px solid #0ba29a !important;
}
uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before{
font-size: 32rpx;
}
uni-checkbox:not([disabled]) .uni-checkbox-input:hover {
border: 1px solid #777777;
}
uni-radio .uni-radio-input {
border-radius: 50% !important;
color: #ffffff !important;
border: 1px solid #777777;
width: 32rpx;
height: 32rpx;
}
uni-radio .uni-radio-input.uni-radio-input-checked {
color: #fff;
background: #0ba29a !important;
border: 1px solid #0ba29a !important;
}
uni-radio .uni-radio-input.uni-radio-input-checked:before {
font-size: 26rpx;
}
uni-radio:not([disabled]) .uni-radio-input:hover {
border: 1px solid #777777;
}
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。