Commit 5c0bea3f authored by jyx's avatar jyx

快手小程序

parent 9cf7f819
......@@ -29,7 +29,7 @@ function gotoBookContentPage(bookId, shortis) {
function gotoShortBookContentPage(bookId) {
// 短篇小说
uni.navigateTo({
url: `/page-subs/sub_A/book-content/book-content`,
url: `/page-subs/sub_A/book-content/book-content?bookId=` + bookId,
success: (res) => {
res.eventChannel.emit("openBookContentPage", {
bookId
......@@ -41,7 +41,7 @@ function gotoShortBookContentPage(bookId) {
// 长篇文章详情
function gotoLongBookContentPage(bookId) {
uni.navigateTo({
url: `/page-subs/sub_A/book-long-content/book-long-content`,
url: `/page-subs/sub_A/book-long-content/book-long-content?bookId=` + bookId,
success: (res) => {
res.eventChannel.emit("openBookContentPage", {
bookId
......
......@@ -114,7 +114,9 @@ function refreshUserInfo() {
id: userData.idcode,
memberExpirationDate: userData.expireTime
})
if (userData.nickname) {
saveNickname(userData.nickname);
}
saveUserInfo(user); // 存储用户数据
postNotification(KEY_NOTIFICATION_LOGIN_SUCCESS); // 通知登录成功
}
......
......@@ -103,8 +103,6 @@
}
})
} else if (this.listType == 2) {
console.log('DDDDDDDD')
getRecommendV1('newbook', 8, (success, data) => {
if (success) {
this.changeData(data)
......
......@@ -4,15 +4,15 @@
<view class="dialog-container">
<view class="dialog-content">
<text style="font-size: 42rpx; color: #6C6A6A;">
{{vipBean.topTitle}}
{{vipBean2.topTitle}}
</text>
<view style="display: flex;flex-direction: row;margin-top: 30rpx;">
<view style="font-size: 42rpx;color: #333232;margin-top: 18rpx;"></view>
<view style="font-size: 60rpx;color: #F32E2E;font-weight: 777;">{{vipBean.firstPayPrice}}</view>
<view style="font-size: 60rpx;color: #F32E2E;font-weight: 777;">{{vipBean2.firstPayPrice}}</view>
<view style="font-size: 42rpx;color: #333232;margin-top: 18rpx;"></view>
</view>
<text style="margin-top: 30rpx; font-size: 38rpx; color: #F32E2E">
{{vipBean.remarks}}
{{vipBean2.remarks}}
</text>
<image @click="handlePay"
......@@ -53,7 +53,8 @@
},
data() {
return {
os: 'android'
os: 'android',
vipBean2: {}
};
},
watch: {
......@@ -67,6 +68,9 @@
}
},
methods: {
onLoad(options) {
this.vipBean2 = this.vipBean
},
showdialog() {
this.$refs.vipback.open();
console.log('vipback-', this.vipBean);
......
<template>
<view>
<c-list ref='list' flag='warehouse' method="POST" :height="height" url='/book/articleList/'
:param="requestParam" @change='changeData'>
<c-list ref='list' flag='warehouse' method="POST" :height="height" url='/book/articleList/' :param="requestParam"
@change='changeData'>
<book-list-item v-for='(item, index) in dataList' :key='index' :item='item' :showClose='false'
@tapItem='tapItem($event, index)' @close='tapClose($event, index)'>
</book-list-item>
</c-list>
</view>
</template>
<script>
......@@ -50,7 +48,6 @@
watch: {},
methods: {
initRefresh() {
console.log('YYYYYYY')
if (isEmpty(this.dataList)) {
this.refreshList();
}
......
......@@ -3,7 +3,7 @@
<CategoryBar id='category' :range='categorys' :current='currentIndex' @change='changeCategory'
@ready='readyCategory'></CategoryBar>
<view :style="[listStyle]" v-if='showEmpty'>
<c-empty emptyTitle="暂无数据"></c-empty>
<c-empty emptyTitle="正在加载中~"></c-empty>
</view>
<view :style="[listStyle]" v-else>
<swiper :style="[listStyle]" :indicator-dots="false" :autoplay="false" :current="currentIndex"
......@@ -13,14 +13,12 @@
</swiper-item>
</swiper>
</view>
<view style="height: 20rpx;"></view>
</scroll-view>
</template>
<script>
import CategoryBar from "./components/category-bar.vue";
import WarehouseList from "./components/warehouse-list.vue";
import CEmpty from "@/components/c-empty/c-empty.vue";
import SystemInfoMixin from "../../common/mixins/system-info-mixin.js";
import Category from "./models/Category.js";
import {
......@@ -39,8 +37,7 @@
mixins: [SystemInfoMixin],
components: {
CategoryBar,
WarehouseList,
CEmpty
WarehouseList
},
data() {
return {
......@@ -49,9 +46,8 @@
currentIndex: 0,
};
},
onLoad(options) {},
onReady() {
this.getCategoryData()
onLoad(options) {
},
computed: {
showEmpty: function() {
......@@ -59,7 +55,7 @@
},
listStyle: function() {
return {
height: `${this.listHeight}px`,
height: `${this.listHeight}px`
}
},
categroyChange: function() {
......@@ -76,36 +72,20 @@
watch: {
categroyChange: {
handler: function(n, o) {
// if (this.$refs[`bookList${n.currentIndex}`]) {
// this.$refs[`bookList${n.currentIndex}`][0].initRefresh();
// }
this.$nextTick(() => {
let ref = this.$refs.bookList;
if (ref) {
console.log('TTTTTTT')
ref[n.currentIndex].initRefresh();
}
})
setTimeout(() => {
this.$refs[`bookList${n.currentIndex}`][0].initRefresh();
}, 500)
},
deep: true
}
},
methods: {
show() {
// if (this.$refs[`bookList${this.currentIndex}`][0].isEmpty()) {
// this.$refs[`bookList${this.currentIndex}`][0].initRefresh();
// }
this.$nextTick(() => {
let ref = this.$refs.bookList;
if (ref) {
console.log('TTTTTTT')
this.getCategoryData();
},
hide() {
ref[n.currentIndex].initRefresh();
}
})
},
hide() {},
readyCategory() {
setTimeout(() => {
this.initHeight()
......@@ -114,7 +94,7 @@
getCategoryData() {
getCategorys((success, data) => {
if (success) {
var result = data.records ? data.records.map(item => {
let result = data.records ? data.records.map(item => {
return new Category(item)
}).sort((a, b) => {
return a.sort - b.sort
......@@ -123,24 +103,21 @@
name: "全部",
id: ""
}))
console.log('KKKKKKKKKKKKKKK', result)
this.categorys = result;
console.log('KKKKKKKKKKKKKKK', this.categorys)
}
})
},
initHeight() {
const query = uni.createSelectorQuery().in(this);
query.select("#navi").boundingClientRect();
query.select("#search").boundingClientRect();
query.select("#category").boundingClientRect();
query.exec((res) => {
let result = 0;
var result = 0;
res.forEach(item => {
if (item) {
if (item.height) {
result = result + item.height;
}
}
})
this.listHeight = this.windowHeight - result - (this.windowHeight * 0.1);
})
......
......@@ -100,7 +100,7 @@
}
}, this)
// this.refreshBookData(this.bookId)
this.refreshBookData(this.bookId)
},
onShow() {
refreshUserInfo();
......
......@@ -301,8 +301,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -426,8 +426,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -186,8 +186,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -267,8 +267,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -272,8 +272,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -432,8 +432,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -184,7 +184,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
margin: 8rpx 15rpx 0 15rpx;
marign-bottom: 0;
}
......
......@@ -267,8 +267,7 @@
position: relative;
.row {
margin: 8rpx 15rpx;
marign-bottom: 0;
margin: 8rpx 15rpx 0 15rpx;
}
.row:last-child {
......
......@@ -4,7 +4,6 @@
<uni-easyinput v-model="searchKeyword" placeholder="请输入书名或者作者名" :focus='focus' confirmType="search"
trim="all" :inputBorder="true" @clear="clearInput" @change="changeInput"
@confirm="changeInput"></uni-easyinput>
</view>
<view class="button-box item" @click="tapSearch">
<view class="title">
......
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