Commit 14f4ecf0 authored by 郑秀明's avatar 郑秀明

bug 修改

parent bc960610
......@@ -5,7 +5,7 @@
// export const php = 'https://jingxiang.pet-dbc.cn/mobile/index.php?'
// php正式环境
export const php = 'https://shop.pet-dbc.cn/mobile/index.php?'
// export const php = 'https://shop.pet-dbc.cn/mobile/index.php?'
// go测试环境
// export const go = 'https://tm.pet-dbc.cn'
......@@ -14,4 +14,50 @@ export const php = 'https://shop.pet-dbc.cn/mobile/index.php?'
// export const go = 'https://jxm.pet-dbc.cn'
// go正式环境
export const go = 'https://m.pet-dbc.cn';
\ No newline at end of file
// export const go = 'https://m.pet-dbc.cn';
// 获取php正式环境
export const php = phpfunc();
// 获取跳转白条地址
export const go = gofunc();
/**
* 根据当前域名返回ecmall地址
* */
function phpfunc(){
const { origin } = window.location;
let url = '';
// 测试环境
if(origin.indexOf('localhost') > -1 || origin.indexOf('test') > -1){
if(origin.indexOf('test') > -1){
url = `${origin}/mobile/index.php?`;
}else{
url = 'https://test.pet-dbc.cn/mobile/index.php?';
}
}else if(origin.indexOf('jingxiang') > -1){
url = 'https://jingxiang.pet-dbc.cn/mobile/index.php?';
}else{
url = 'https://shop.pet-dbc.cn/mobile/index.php?';
}
return url;
}
/**
* 根据当前域名返回白条地址
* */
function gofunc(){
const { origin } = window.location;
let url = '';
// 测试环境
if(origin.indexOf('localhost') > -1 || origin.indexOf('test') > -1){
url = 'https://tm.pet-dbc.cn';
}else if(origin.indexOf('jingxiang') > -1){
url = 'https://jxm.pet-dbc.cn';
}else{
url = 'https://m.pet-dbc.cn';
}
return url;
}
<template>
<view class="navigation" :style="[{'height': style_setting.height*2+'rpx', 'height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]">
<view>
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="item.goods_type ? item.goods_type === goods_type : true" >
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="!item.goods_type || (item.goods_type > 0 && goods_type > 0)" >
<text class="navigation_text" :style="[{'color': item.title_color}, item.title_bg_show ? {'background-image': 'url('+item.title_bg_url+')'} : '']" @click="$jump(item.link)">
<i v-if="item.title_icon_show" class="navigation_icon" :style="{'background-image': 'url('+item.title_icon_url+')'}"></i>
<text v-if="item.title_show">{{item.title}}</text>
......@@ -22,12 +22,21 @@
return {
style_setting: this.wrapper_props.style_setting,
list: this.wrapper_props.list,
goods_type: ''
goods_type: '-1' //默认不可见
}
},
mounted() {
const goods_type = getCurrentPages()[0]['$route']['query']['goods_type'] || '';
this.goods_type = goods_type;
const goods_type = getCurrentPages()[0]['$route']['query']['goods_type'] || '-1';
const gt = uni.getStorageSync('goods_type');
// 判断goods_type是否有值
if(goods_type === '-1' && gt){
this.goods_type = gt;
}else{
this.goods_type = goods_type;
}
if(this.goods_type){
uni.setStorageSync('goods_type', this.goods_type);
}
}
}
</script>
......@@ -37,12 +46,12 @@
display: flex;
align-items: center;
white-space: nowrap;
overflow: scroll;
overflow-x: auto;
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0 24rpx;
box-sizing: border-box;
border-right: 10rpx solid rgba(0,0,0,0.4);
// border-right: 10rpx solid rgba(0,0,0,0.4);
.navigation_item {
width: 177.5rpx;
display: inline-block;
......
......@@ -30,11 +30,19 @@
}
},
mounted() {
const goods_type = getCurrentPages()[0]['$route']['query']['goods_type'] || '';
let goods_type = getCurrentPages()[0]['$route']['query']['goods_type'] || '-1';
const { infinite } = this.slide_setting;
const list = [];
const gt = uni.getStorageSync('goods_type');
// 判断goods_type是否有值
if(goods_type === '-1' && gt){
goods_type = gt;
}
if(goods_type){
uni.setStorageSync('goods_type', goods_type);
}
this.slide_list.map((item, index) => {
if((item.goods_type && item.goods_type === goods_type) || !item.goods_type) {
if((item.goods_type > 0 && goods_type > 0) || !item.goods_type) {
list.push(item)
}
});
......@@ -45,7 +53,6 @@
this.autoplay = false;
}, time);
}
},
methods: {
change(e) {
......
......@@ -11,7 +11,7 @@
:avatarShape='skeleton1.avatarShape'
:titleWidth='skeleton1.titleWidth'
>
<view class="homeContent">
<view class="homeContent" style="padding: 100rpx 0 110rpx;background-color: #f8f8f8;">
<component v-for="(item, index) in data" :key="index" :is="item.name" :wrapper_props="item.wrapper_props" :isLogin="isLogin" :ref="item.name"></component>
<BottomBar />
<uni-popup ref="popup" type="center" :maskClick="false">
......@@ -95,10 +95,10 @@
this.loading = false;
// 打开广告弹窗
const timestamp = new Date('2020/05/18 00:00:00').getTime() / 1000;
console.log(timestamp);
// console.log(timestamp);
if(res.data.login_flg === 1 && res.data.reg_time > timestamp){
setTimeout(() => {
this.$refs.popup.open();
// this.$refs.popup.open();
}, 600);
}
}else{
......@@ -137,8 +137,8 @@
}
</script>
<style lang="less" scoped>
.homeContent {
<style>
.homeContent{
padding: 100rpx 0 110rpx;
background-color: #f8f8f8;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment