2022-02-12 11:33:47 +00:00
|
|
|
<script>
|
|
|
|
import toolAll from '@/jsFile/tools.js';
|
|
|
|
import requst from '@/jsFile/requst.js';
|
|
|
|
export default {
|
|
|
|
// 全局域名配置
|
|
|
|
globalData:{
|
|
|
|
// domainName:'https://hengmei.scdxtc.cn/api/',
|
|
|
|
domainName:'https://hm.hmzfyy.cn/api/',
|
2022-02-13 13:38:30 +00:00
|
|
|
appletName:'佩丽商城'//小程序名称
|
2022-02-12 11:33:47 +00:00
|
|
|
},
|
2022-02-13 13:38:30 +00:00
|
|
|
// 优先于show方法
|
2022-02-12 11:33:47 +00:00
|
|
|
onLaunch: function() {
|
2022-02-13 13:38:30 +00:00
|
|
|
//去除体验版和正式版的所有输出日志
|
|
|
|
toolAll.tools.clearClog();
|
|
|
|
// 查询状态栏的高度、并设置导航栏的高度
|
|
|
|
this.statusBarH();
|
|
|
|
// 查询视频是否开启
|
|
|
|
toolAll.tools.isVedio();
|
2022-02-12 11:33:47 +00:00
|
|
|
// 主题颜色
|
2022-02-13 13:38:30 +00:00
|
|
|
// uni.request({
|
|
|
|
// url: `${this.globalData.domainName}index/mini-program-setting`,
|
|
|
|
// method: 'GET',
|
|
|
|
// data: '',
|
|
|
|
// header: {
|
|
|
|
// 'Content-Type': 'application/json; charset=UTF-8',
|
|
|
|
// 'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
|
|
|
// },
|
|
|
|
// success: res => {
|
|
|
|
// // console.log('反的结果===>',res);
|
|
|
|
// if (res.statusCode == 200) {
|
|
|
|
// if (res.data.code == 0) {
|
|
|
|
// uni.setStorageSync('publicColor', res.data.data.mainColor) //#3875F6 #2E8B57
|
|
|
|
// // uni.setStorageSync('publicColor', '#2E8B57') //#3875F6 #2E8B57
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// })
|
2022-02-12 11:33:47 +00:00
|
|
|
},
|
|
|
|
onShow: function() {
|
|
|
|
if(uni.getStorageSync('token')!='') {
|
2022-02-13 13:38:30 +00:00
|
|
|
// 开始埋点倒计时
|
2022-02-12 11:33:47 +00:00
|
|
|
toolAll.tools.daoTime();
|
|
|
|
}
|
2022-02-13 13:38:30 +00:00
|
|
|
//检查当前网络状态
|
|
|
|
toolAll.tools.networkStatus();
|
2022-02-12 11:33:47 +00:00
|
|
|
},
|
|
|
|
onHide: function() {
|
2022-02-13 13:38:30 +00:00
|
|
|
//清空埋点倒计时
|
|
|
|
toolAll.tools.closeTimer();
|
2022-02-12 11:33:47 +00:00
|
|
|
uni.removeStorageSync('isQuan');
|
|
|
|
uni.removeStorageSync('quanImg');
|
|
|
|
uni.removeStorageSync('quanId');
|
|
|
|
uni.removeStorageSync('isQuan');
|
|
|
|
uni.removeStorageSync('firstTime');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
/*每个页面公共css */
|
2022-02-13 13:38:30 +00:00
|
|
|
/* 阿里巴巴矢量图标库 start */
|
|
|
|
@import url("./commons/icon-font.css");
|
|
|
|
/* 阿里巴巴矢量图标库 end */
|
|
|
|
|
|
|
|
/* 项目主体样式 start */
|
2022-02-12 11:33:47 +00:00
|
|
|
@import url("./commons/hengmei.css");
|
2022-02-13 13:38:30 +00:00
|
|
|
/* 项目主体样式 end */
|
|
|
|
|
|
|
|
/* 动画样式 start */
|
2022-02-12 11:33:47 +00:00
|
|
|
@import url("./commons/animate.min.css");
|
2022-02-13 13:38:30 +00:00
|
|
|
/* 动画样式 end */
|
|
|
|
|
2022-02-12 11:33:47 +00:00
|
|
|
page {background-color: rgba(244, 244, 244, 1);}
|
|
|
|
</style>
|