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

dd

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