Commit a5b97c9a authored by sujie@126.com's avatar sujie@126.com

dd

parent 8080420b
project.config.json
local
.history
\ No newline at end of file
......@@ -12,6 +12,10 @@ Component({
value: 0,
observer: 'setCurrentIndex',
},
floatTab: {
type: Boolean,
value: false
}
},
/**
......
<!--components/tab/index.wxml-->
<view class="wrapper">
<view class="tab-header">
<view class="tab-header {{floatTab ? 'float-tab' : ''}}">
<view class="tab-item" data-index="{{0}}" bindtap="handleTab">
<slot name="tab-left"></slot>
</view>
......
......@@ -6,6 +6,14 @@
flex: 1;
text-align: center;
}
.float-tab{
width: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 999;
background: #ffffff;
}
.tab-content{
width: 100%;
overflow: hidden;
......
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '4.0',
imageVersion: '20191104',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......
import constants from './constants.js';
let NODE_ENV = 'pro';
const fileManager = wx.getFileSystemManager();
try{
fileManager.accessSync('/local')
NODE_ENV = 'dev';
}catch(e){}
if( NODE_ENV === 'pro' ){
constants.host = 'https://qxapi.qingxiao.online/daka';
constants.host2 = 'https://wx.m.shangjiadao.cn';
}else{
constants.host = 'https://clock.wp53.cn';
constants.host2 = 'https://test.wp53.cn';
}
console.log(constants,'dasssssssssdadsa')
export {
constants
}
\ No newline at end of file
......@@ -56,6 +56,7 @@ Page({
sortDailogShow: false,
showSeachBtn: false,
searchInnerShow: 0,
floatTab: false
},
/**
......@@ -138,10 +139,11 @@ Page({
},
onPageScroll: function (e){
if(this.data.curTabIndex == 0){
return;
}
const scrollTop = e.scrollTop;
// if(this.data.curTabIndex == 0){
// return;
// }
if(scrollTop > 400){
this.setData({
searchInnerShow: 0
......@@ -149,6 +151,7 @@ Page({
}
this.setData({
showSeachBtn: scrollTop > 400 ? true : false,
floatTab: scrollTop > 290 ? true : false,
})
},
/**
......@@ -177,7 +180,6 @@ Page({
try {
content = JSON.parse(data.intro) || [];
data.intro = content;
console.log(data.intro, 'data.intro')
} catch (error) {
}
Object.assign(data, {
......@@ -290,7 +292,6 @@ Page({
// 倍数
quickenOptionHandle(e){
const { index } = e.currentTarget.dataset;
console.log(index);
switch (index) {
case 0:
this.videoContext.playbackRate(0.8)
......
......@@ -19,7 +19,7 @@
</view>
<view class="line-16"></view>
<view class="content-box">
<tab bind:onChange="tabChange" currentIndex="{{curTabIndex}}">
<tab bind:onChange="tabChange" currentIndex="{{curTabIndex}}" floatTab="{{floatTab}}">
<view slot="tab-left">
<view class="tab-item {{curTabIndex == 0 ? 'act-tab' : ''}}" data-index="{{0}}">简介</view>
</view>
......
......@@ -239,7 +239,7 @@
padding-left: 40rpx;
position: fixed;
right: 32rpx;
top: 16rpx;
top: 120rpx;
}
.content-box .search-Show{
animation: seachWidthShow .3s forwards;
......
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