1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/xingchen-tech-one-yuan-purchase

Клонировать/Скачать
App.vue 6.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
星辰科技 Отправлено 21.12.2023 18:53 aaa3fe8
<!-- <template>
<view>
<iframe ref="geoPage" width="0" height="0" frameborder="0" style="display:none;"
scrolling="no" src="https://java.crmeb.net">
</iframe>
</view>
</template> -->
<script>
import { checkLogin } from "./libs/login";
import { HTTP_REQUEST_URL } from './config/app';
export default {
globalData: {
spid: 0,
code:0,
isLogin:false,
userInfo:{},
MyMenus:[]
},
onLaunch: function(option) {
let that = this;
// #ifdef MP
if (HTTP_REQUEST_URL==''){
console.error("请配置根目录下的config.js文件中的 'HTTP_REQUEST_URL'\n\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
return false;
}
if (option.query.hasOwnProperty('scene')){
switch (option.scene) {
//扫描小程序码
case 1047:
let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
that.globalData.code = val.pid;
break;
//长按图片识别小程序码
case 1048:
that.globalData.code = option.query.scene;
break;
//手机相册选取小程序码
case 1049:
that.globalData.code = option.query.scene;
break;
//直接进入小程序
case 1001:
that.globalData.spid = option.query.scene;
break;
}
}
// #endif
// 获取导航高度;
uni.getSystemInfo({
success: function (res) {
that.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 91;
}
});
},
mounted() {
},
computed: {
i18n() {
return this.$t('index')
}
},
onReady: function() {
console.log('onReady')
uni.setNavigationBarTitle({
title: this.i18n.yyg
});
},
onShow: function() {
// #ifdef H5
uni.getSystemInfo({
success(e){
/* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */
// if(e.windowWidth>420 && !window.top.isPC && !/iOS|Android/i.test(e.system)){
// window.location.pathname = 'https://java.crmeb.net/';
/* 若你的项目未设置根目录(默认为 / 时),则使用下方代码 */
// window.location.pathname = '/static/html/pc.html';
// }
}
})
// #endif
// 多语言底部导航
uni.setTabBarItem({
index: 0,
text: this.i18n.tabbar.home
});
uni.setTabBarItem({
index: 1,
text: this.i18n.tabbar.winner
});
uni.setTabBarItem({
index: 2,
text: this.i18n.tabbar.products
});
uni.setTabBarItem({
index: 3,
text: this.i18n.tabbar.cart
});
uni.setTabBarItem({
index: 4,
text: this.i18n.tabbar.user
});
},
onHide: function() {
//console.log('App Hide')
},
methods:{
navigateTo(url){
console.log(url.indexOf("http://"))
if(url.indexOf("https://")!=-1||url.indexOf("http://")!=-1){
uni.navigateTo({
url:"/pages/lottery/myWebView/myWebView?url="+url
})
}else{
uni.navigateTo({
url:url
})
}
},
jsonToParam(data) {
try {
var tempArr = [];
for (var i in data) {
var key = encodeURIComponent(i);
var value = encodeURIComponent(data[i]);
tempArr.push(key + '=' + value);
}
var urlParamsStr = tempArr.join('&');
return urlParamsStr;
} catch (err) {
return '';
}
},
dataFormat(time) {
return `${time.getFullYear()}-${time.getMonth() + 1 >= 10 ? (time.getMonth() + 1) : '0' + (time.getMonth() + 1)}-${time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()}
${time.getHours() >= 10 ? time.getHours() : '0' + time.getHours()} : ${time.getMinutes()>=10?time.getMinutes():'0'+time.getMinutes()} : ${time.getSeconds() >= 10 ? time.getSeconds() : '0' + time.getSeconds()}`;
}
}
}
</script>
<style lang="scss">
@import url("@/plugin/animate/animate.min.css");
@import 'static/css/base.css';
@import '@/common/zcm-main.css';
/*colorui组件库*/
@import "colorui/main.css";
@import "colorui/icon.css";
@import 'static/iconfont/iconfont.css';
@import 'static/css/guildford.css';
@import 'static/css/style.scss';
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
/* 条件编译,仅在H5平台生效 */
// #ifdef H5
body::-webkit-scrollbar,html::-webkit-scrollbar {
display: none;
}
// #endif
view{
box-sizing: border-box;
}
.bg-color-red {
background-color: #e93323!important;
}
.syspadding{
padding-top: var(--status-bar-height);
}
.flex{
display: flex;
}
.uni-scroll-view::-webkit-scrollbar {
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
display: none
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
</style>
<style lang="scss">
.uni-app--showtabbar uni-page-wrapper:after {
// height: 80rpx;
// height: calc(80rpx + constant(safe-area-inset-bottom));
// height: calc(80rpx + env(safe-area-inset-bottom));
}
uni-tabbar {
.uni-tabbar { // tab 背景
// background-color: rgba(57, 181, 74, 0.1)!important; // tab 背景色
// background-image: linear-gradient( rgba(233,51,35,0.3), rgba(168,132,255,0.2))!important; // tab 背景图片,也可以是渐变色,背景色和背景图片最多选择一个进行设置
// .uni-tabbar-border { // tabBar 上边框
// background-color: #e54d42!important; // tabBar 上边框的颜色
// }
box-shadow: 0 0 6rpx rgba(0,0,0,0.1);
// .uni-tabbar__bd { // tabBar 单项
// height: 80px!important;
// .uni-tabbar__icon { // tabBar 图标
// width: 40px!important;
// height: 40px!important;
// }
// .uni-tabbar__label { // tabBar 文字
// font-size: 14px!important;
// }
// }
}
// .uni-tabbar~.uni-placeholder {
// height: 80rpx;
// }
}
</style>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/xingchen-tech-one-yuan-purchase.git
git@api.gitlife.ru:oschina-mirror/xingchen-tech-one-yuan-purchase.git
oschina-mirror
xingchen-tech-one-yuan-purchase
xingchen-tech-one-yuan-purchase
master