Commit f84dc333 authored by 李俊赕's avatar 李俊赕

change-base

parent 23860b66
...@@ -3,7 +3,6 @@ import App from './App' ...@@ -3,7 +3,6 @@ import App from './App'
import uView from "uview-ui"; import uView from "uview-ui";
import vuexStore from "@/store/$u.mixin.js"; import vuexStore from "@/store/$u.mixin.js";
import store from '@/store/index' import store from '@/store/index'
// let vuexStore = require('@/store/$u.mixin.js')
import {router,RouterMount} from '@/router/index.js' //路径换成自己的 import {router,RouterMount} from '@/router/index.js' //路径换成自己的
Vue.config.productionTip = false Vue.config.productionTip = false
......
...@@ -140,15 +140,6 @@ ...@@ -140,15 +140,6 @@
} }
} }
,{
"path" : "components/business-card/business-card",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
......
<template> <template>
<view class="content"> <view class="content">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" @scroll="handleScroll" <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom" @scroll="handleScroll"
refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh" scroll-anchoring refresher-enabled :refresher-triggered="triggered" @refresherrefresh="onRefresh" scroll-anchoring
@refresherrestore="onRestore"> @refresherrestore="onRestore">
<u-swiper :height="250" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000" <u-swiper :height="250" :list="list" :indicator-pos="indicatorPos" :mode="mode" :interval="3000"
@click="clickSwiper"> @click="clickSwiper">
</u-swiper> </u-swiper>
<view> <view>
<text class="title">最新消息</text> <text class="title">最新消息</text>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<view v-else> <view v-else>
<text class="title">当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text> <text class="title">当前订单{{ count }}笔\n入驻通过后,平台将向您推荐订单</text>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle"> :custom-style="buttonStyle">
立即入驻 立即入驻
</u-button> </u-button>
</view> </view>
...@@ -45,180 +45,179 @@ ...@@ -45,180 +45,179 @@
</template> </template>
<script> <script>
import util from '@/utils/util.js'; import util from '@/utils/util.js';
const app = getApp(); const app = getApp();
import OrderCell from '@/components/order/index.vue' import OrderCell from '@/components/order/index.vue'
export default { export default {
components: { components: {
OrderCell OrderCell
}, },
data() { data() {
return {
settled: false,
triggered: false,
list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
}
],
title: false,
mode: 'round',
indicatorPos: 'bottomCenter',
title: 'Hello',
count: 0, // 推荐订单数量
status: 0, // 入驻状态
messageList: [{
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}, {
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}, {
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}],
loadStatus: ['more', 'loading', 'noMore'],
currentLoadStatus: 'loading',
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
bottomLoading: false
}
},
computed: {
buttonStyle() {
return { return {
'width': '300rpx', settled: false,
triggered: false,
list: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
},
{
image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
},
{
image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
}
],
title: false,
mode: 'round',
indicatorPos: 'bottomCenter',
title: 'Hello',
count: 0, // 推荐订单数量
status: 0, // 入驻状态
messageList: [{
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}, {
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}, {
id: 1234,
type: '',
level: '',
title: '',
url: '',
body: '好消息',
}],
loadStatus: ['more', 'loading', 'noMore'],
currentLoadStatus: 'loading',
orderList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
bottomLoading: false
} }
} },
}, computed: {
onLoad() { buttonStyle() {
this._freshing = false; return {
this.triggered = true; 'width': '300rpx',
},
onShow() {
// 每次进入页面都刷新入驻状态
if (app.globalData.token) {
this.initSettleInfo()
}
},
methods: {
async initSettleInfo() {
const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过settled确定状态
if (result && result.settled) {
vm.settled = result.settled
} else {
vm.settled = false
} }
} }
await app.getBaseInfo(this, callBack)
}, },
onRefresh() { onLoad() {
if (this._freshing) return; this._freshing = false;
this._freshing = true; this.triggered = true;
// 加载数据
// ...
setTimeout(() => {
// 数据加载完成更新status和推荐列表
this.triggered = false;
this._freshing = false;
}, 1000)
}, },
onRestore() { onShow() {
this.triggered = 'restore'; // 每次进入页面都刷新入驻状态
}, if (app.globalData.token) {
reachBottom() { this.initSettleInfo()
console.log('-----bottom will-----')
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return
} }
console.log('-----bottom did-----') },
methods: {
async initSettleInfo() {
const callBack = (vm, result) => {
// 后台自动判断入驻流程是否完成,前台通过settled确定状态
if (result && result.settled) {
vm.settled = result.settled
} else {
vm.settled = false
}
}
await app.getBaseInfo(this, callBack)
},
onRefresh() {
if (this._freshing) return;
this._freshing = true;
// 加载数据
// ...
this.bottomLoading = true setTimeout(() => {
// 数据加载完成更新status和推荐列表
this.triggered = false;
this._freshing = false;
}, 1000)
},
onRestore() {
this.triggered = 'restore';
},
reachBottom() {
console.log('-----bottom will-----')
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return
}
console.log('-----bottom did-----')
setTimeout(() => { this.bottomLoading = true
// 加载更多数据
// ...
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}])
// 加载完成 setTimeout(() => {
this.currentLoadStatus = this.loadStatus[2] // 加载更多数据
this.$nextTick(function () { // ...
this.bottomLoading = false this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}])
})
}, 1000);
},
clickSwiper(index) {
}, // 加载完成
handleScroll() { this.currentLoadStatus = this.loadStatus[2]
console.log('-----scroll-------') this.$nextTick(function() {
}, this.bottomLoading = false
immediatelyIn() { })
if (util.getToken()) { }, 1000);
uni.navigateTo({ },
url: 'pages/settle/index' clickSwiper(index) {
});
} else { },
uni.navigateTo({ handleScroll() {
url: 'pages/login/index' console.log('-----scroll-------')
}); },
immediatelyIn() {
if (util.getToken()) {
uni.navigateTo({
url: 'pages/settle/index'
});
} else {
uni.navigateTo({
url: 'pages/login/index'
});
}
} }
} }
} }
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content { .content {
height: 100vh; height: 100vh;
} }
.logo { .logo {
height: 200 rpx; height: 200 rpx;
width: 100%; width: 100%;
margin: 0 rpx auto 50 rpx auto; margin: 0 rpx auto 50 rpx auto;
} }
.text-area { .text-area {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.title { .title {
font-size: 36 rpx; font-size: 36 rpx;
color: #8f8f94; color: #8f8f94;
} }
.sticky { .sticky {
height: 120 rpx; height: 120 rpx;
background-color: #2979ff; background-color: #2979ff;
color: #fff; color: #fff;
padding: 24 rpx; padding: 24 rpx;
text-align: left; text-align: left;
} }
.order-view { .order-view {
text-align: center; text-align: center;
} }
</style> </style>
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