This commit is contained in:
2024-06-24 17:39:35 +08:00
20 changed files with 3313 additions and 287 deletions

200
components/buyPup.vue Normal file
View File

@@ -0,0 +1,200 @@
<template>
<view>
<u-popup key="1" :show="pricespop" :round="10" @close="closePup">
<view class="proListPrice" v-if="proPriceList.length > 0">
<view class="title">
请选择
</view>
<view class="list">
<view :class="['item',curProId == item.productId ? 'active' : '']"
v-for="(item,index) in proPriceList" :key="index" @click="choosePrice(item)">
{{item.productName}} - {{item.price}}
</view>
</view>
<view class="tbn flexbox" style="padding-bottom: 20px;">
<view class="saveBtnss buybtn flexbox" @click="oprate('buy')">
<u-icon name="bag" color="#fff" size="28"></u-icon>
<text>立即购买</text>
</view>
<!-- <view class="saveBtnss gouwuche flexbox" @click="oprate('gouwuche')">
<uni-icons type="cart" size="28" style="color: #666;"></uni-icons>
<text>加入购物车</text>
</view> -->
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
name:"buyPup",
props:['proPriceList'],
data() {
return {
pricespop:true,
curProId:null,
curPro:{}
};
},methods:{
closePup() {
this.pricespop = false
this.$emit('closePup')
},
choosePrice(item) {
console.log(item, 'choosePrice')
this.curProId = item.productId
this.curPro = item
},
oprate(val){
if(!this.curProId){
uni.showToast({
title:'请选择您的课程',
icon:'none'
})
return
}
if(val=='buy'){
console.log('直接购买');
this.$emit('oprate',{name:val,item:this.curPro})
}else if(val == 'gouwuche'){
console.log('加入购物车');
this.$emit('oprate',{name:val,item:this.curPro})
}
this.closePup()
}
}
}
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.flexbox {
display: flex;
}
.saveBtn {
align-items: center;
justify-content: center;
height: 80rpx;
background-color: #00d8df;
// width: 46%;
overflow: hidden;
border-radius: 30rpx;
text {
padding-left: 10rpx;
font-size: 28rpx;
color: #fff;
}
}
.vipBtn {
@include theme("vipbtnbg");
border-radius: 100rpx;
justify-content: center;
width: 150px;
color: #fff;
margin: 10rpx auto;
}
.buyBox {
// position: fixed;
// z-index: 2;
// bottom: 100rpx;
// left: 0;
@include pleft_right(4px);
// @include mshadow(10px, 1);
padding: 20rpx 10rpx;
width: 100%;
font-size: 28rpx;
flex-wrap: wrap;
background-image: linear-gradient(60deg, #e0e9f6 0%,#ece6fa 30%,#d7e8f0 60%, #fff 100%);
// background: rgba(255, 255, 255, 0.9);
.item {
width: 100%;
text-align: center; line-height: 70rpx !important;
}
.tbn {
align-items: center;
}
.buybtn {
color: #fff;
}
}
.proListPrice {
text-align: center;
.title {
font-size: 28rpx;
margin: 10px 0;
}
.list {
padding: 0 10px;
padding-bottom: 20rpx;
.item {
font-size: 26rpx;
color: #333;
margin-bottom: 10rpx;
line-height: 80rpx;
border-radius: 50rpx;
border: 1px solid #eee;
}
.item.active {
color: $themeColor;
border: 1px solid $themeColor;
}
.item:last-child {
// border-bottom: none
}
}
.tbn {
justify-content: center;
}
.buybtn { padding: 0 20rpx;
background-color: #00d8df;
margin: 0;
margin-right: 20rpx;
text {
color: #fff;
}
}
.saveBtnss {
align-items: center;
justify-content: center;
height: 80rpx;
// width: 46%;
overflow: hidden;
border-radius: 50rpx;
text {
padding-left: 10rpx;
font-size: 28rpx;
}
}
.gouwuche {
border: 1px solid #666;
padding-right: 20rpx;
text {
// color: #fff;
}
}
}
</style>

View File

@@ -14,7 +14,7 @@
<view class="content">
<!-- <text class="text">{{item.title}}</text> -->
<view class="sub1List">
<view class="item leve2" @click.stop="clickCourseInfo(item)">
<view class="item leve2" @click.stop="clickCourseInfo(item)" v-if="item.isLast == 1">
<text class="textss"> 本目录下全部课程</text>
</view>
<view :class="['item', 'leve2']"

View File

@@ -80,24 +80,24 @@ export default {
selectedIconPath: "static/tab/icon1_y.png",
text: "首页",
},
// {
// pagePath: "pages/peanut/shopping",
// iconPath: "static/tab/tab_nor_02.png",
// selectedIconPath: "static/tab/tab_cur_02.png",
// text: "购物车",
// },
{
pagePath: "pages/peanut/shopping",
iconPath: "static/tab/tab_nor_02.png",
selectedIconPath: "static/tab/tab_cur_02.png",
text: "购物车",
},
{
pagePath: "pages/bookShop/orderList",
iconPath: "static/tab/order.png",
selectedIconPath: "static/tab/order_active.png",
text: "订单",
},
{
pagePath: "pages/taihu/index",
iconPath: "static/tab/tab_nor_03.png",
selectedIconPath: "static/tab/tab_cur_03.png",
text: "太湖公益",
},
{
pagePath: "pages/bookShop/orderList",
iconPath: "static/tab/order.png",
selectedIconPath: "static/tab/order_active.png",
text: "订单",
},
},
{
pagePath: "pages/mine/mine/index",
iconPath: "static/tab/tab_nor_04.png",

View File

@@ -5,8 +5,8 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑

View File

@@ -468,7 +468,49 @@
"popGesture": "none"
}
}
}
},
{
"path": "pages/medicaldes/medicaldes",
"style": {
"navigationBarTitleText": "吴门医述",
"enablePullDownRefresh": false
}
},
{
"path": "pages/medicaldes/zhuanzhuchuban",
"style": {
"navigationBarTitleText": "专著出版",
"enablePullDownRefresh": false
}
},
{
"path": "pages/medicaldes/xueshugongxianDetail",
"style": {
"navigationBarTitleText": "学术贡献详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/medicaldes/medicaldesDetail",
"style": {
"navigationBarTitleText": "医述详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/medicaldes/recordDetail",
"style": {
"navigationBarTitleText": "纪实详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/medicaldes/video",
"style": {
"navigationBarTitleText": "医述详情",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
@@ -491,17 +533,11 @@
"selectedIconPath": "static/tab/icon1_y.png",
"text": "首页"
},
// {
// "pagePath": "pages/peanut/shopping",
// "iconPath": "static/tab/tab_nor_02.png",
// "selectedIconPath": "static/tab/tab_cur_02.png",
// "text": "购物车"
// },
{
"pagePath": "pages/taihu/index",
"iconPath": "static/tab/tab_nor_03.png",
"selectedIconPath": "static/tab/tab_cur_03.png",
"text": "太湖公益"
"pagePath": "pages/peanut/shopping",
"iconPath": "static/tab/tab_nor_02.png",
"selectedIconPath": "static/tab/tab_cur_02.png",
"text": "购物车"
},
{
"pagePath": "pages/bookShop/orderList",
@@ -509,6 +545,12 @@
"selectedIconPath": "static/tab/order_active.png",
"text": "订单"
},
{
"pagePath": "pages/taihu/index",
"iconPath": "static/tab/tab_nor_03.png",
"selectedIconPath": "static/tab/tab_cur_03.png",
"text": "太湖公益"
},
{
"pagePath": "pages/mine/mine/index",
"iconPath": "static/tab/tab_nor_04.png",

View File

@@ -906,6 +906,7 @@ export default {
this.htmlContent = data.html;
console.log(data, this.htmlContent, "this.htmlContent--++++");
<<<<<<< HEAD
if (
(this.htmlContent == "" || this.htmlContent == "<p><br></p>") &&
this.uploadPicLIst.length == 0
@@ -916,6 +917,19 @@ export default {
});
return;
}
=======
if ((this.htmlContent == '' || this.htmlContent == '<p><br></p>') && this.uploadPicLIst.length == 0) {
uni.showToast({
icon: 'none',
title: '您未输入内容哦'
})
return
}
let images = ''
if (this.uploadPicLIst.length > 0) {
let list = this.uploadPicLIst.map(item => item.url)
>>>>>>> b988ec5ba4c35d1a3e1bed5bd9907a93aaeeb559
let images = "";
if (this.uploadPicLIst.length > 0) {

View File

@@ -139,7 +139,7 @@
uni.stopPullDownRefresh()
},
onReachBottom() {
if (this.status != 2) {
if (this.status != 2 && this.flag) {
this.page++
this.getData(this.subTabId)
}
@@ -245,10 +245,10 @@
this.getData(this.subTabId);
},
getData(id) {
if (!this.flag) {
console.log('正在执行,未完成')
return
}
// if (!this.flag) {
// console.log('正在执行,未完成')
// return
// }
this.status = 1
this.flag = false
$http.request({
@@ -277,7 +277,6 @@
this.status = 2 // 加载完成
} else {
this.status = 3 // 暂无数据
}
console.log('status', this.status)

View File

@@ -9,42 +9,51 @@
itemStyle="padding-left: 15px; padding-right: 15px; height: 50px;"></u-tabs>
</view>
<view class="containerBg1">
<!-- 我的课程 -->
<view class="MyCourseBox" v-show="this.curTagId == 0">
<view class="search" style="margin-top: 20rpx;">
<u-search placeholder="请输入课程名" @clear="clear" v-model="searchValue"
<u-search placeholder="请输入课程名" @focus="focus" @clear="clear" v-model="searchValue" @blur="blur"
@search="search" @custom="search"></u-search>
</view>
<uni-section class="mb-10" title="课程列表" type="line">
<template v-slot:right>
<u-icon name="grid" color="#2979ff" size="28" @click="showDrawer"></u-icon>
</template>
</uni-section>
<view class="sectionTitle flexbox">
<view class="selectCateText" >
<view class="" >
<text v-if="selectCat == ''">已显示全部课程</text>
<text v-else>已选中分类{{selectCat}}</text>
<text class="del" @click="delselectCat" v-if="selectCat != ''">清除</text>
</view>
</view>
<view class="flexbox rightIcon" @click="showDrawer">
<u-icon name="grid" color="#2979ff" size="28" ></u-icon><text>按分类筛选</text>
</view>
</view>
<!-- <view class="containerBg"> -->
<view class="newBox">
<view class="item flexbox" v-for="(item, index) in MyCourseList.list" :key="index"
@click="onPageJump('/pages/course/courseDetail',item.id)">
<view :class="['item','flexbox', userMsg.vip != '0'&& item.isBuy != 1 ? 'blueBorder':'']" v-for="(item, index) in MyCourseList.list" :key="index"
>
<view class="vipTag" v-if="userMsg.vip != '0' && item.isBuy != 1">
VIP畅学
</view>
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer">
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
<image :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems">
<view class="txt555">
{{item.title}}
</view>
<view class="" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
{{item.title}}
</view>
</view>
<view class="jianjie" v-html="item.content">
</view>
<view class="tag-view">
<uni-tag v-if="item.level != 0" style="margin-right: 10rpx;"
:text="item.level == 1 ? '初级':'高级'" type="primary" size="small" />
<uni-tag v-if="item.selective != 0 && item.selective == 1" style="margin-right: 10rpx;"
text="必修" size="small" type="warning" />
<uni-tag v-if="item.selective != 0 && item.selective == 2" style="margin-right: 10rpx;"
text="选修" size="small" type="success" />
</view>
<view class="btn_box">
<text>了解课程</text>
</view>
<view class="collection">
<!-- 收藏状态{{item.isStudying}} -->
<text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text>
<text class="del citem" v-else @click="delCollection(item,index)">取消在学习</text>
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text>
</view>
</view>
</view>
@@ -52,6 +61,69 @@
<u-divider v-show="MyCourseList.status == 2" text="已加载全部"></u-divider>
<u-divider v-show="MyCourseList.status == 3" text="暂无数据"></u-divider>
<u-divider v-show="MyCourseList.status == 1" text="加载中..."></u-divider>
</view>
<!-- 在学习 -->
<view class="LearningCourseBox" v-show="this.curTagId == 1">
<!-- <view class="containerBg"> -->
<view class="newBox">
<view :class="['item','flexbox', userMsg.vip != '0' && item.isBuy != 1 ? 'blueBorder':'']" v-for="(item, index) in LearningCourseList.list" :key="index"
>
<view class="vipTag" v-if="userMsg.vip != '0' && item.isBuy != 1">
VIP畅学
</view>
<!-- {{userMsg}} -->
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
<image :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems">
<view class="txt555" @click="onPageJump('/pages/course/myCourseLearn',item.id)">
{{item.title}}
</view>
<view class="jianjie" v-html="item.content">
</view>
<view class="collection">
<!-- <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> -->
<text class="del citem" @click="delCollection(item,index)">取消在学习</text>
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text>
</view>
</view>
</view>
</view>
<u-divider v-show="LearningCourseList.status == 2" text="已加载全部"></u-divider>
<u-divider v-show="LearningCourseList.status == 3" text="暂无数据"></u-divider>
<u-divider v-show="LearningCourseList.status == 1" text="加载中..."></u-divider>
</view>
<!-- 已过期 -->
<view class="ExpiredCourseBox" v-show="this.curTagId == 2">
<!-- <view class="containerBg"> -->
<view class="newBox">
<view class="item flexbox" v-for="(item, index) in ExpiredCourseList.list" :key="index"
>
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" @click="onPageJump('/pages/course/courseDetail',item.id)">
<image :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems">
<view class="txt555" @click="onPageJump('/pages/course/courseDetail',item.id)">
{{item.title}}-{{item.catalogueTitle}}
</view>
<view class="jianjie" v-html="item.content">
</view>
<view class="btn_box" @click="xufei(item)">
<text>续费课程</text>
</view>
</view>
</view>
</view>
<u-divider v-show="ExpiredCourseList.status == 2" text="已加载全部"></u-divider>
<u-divider v-show="ExpiredCourseList.status == 3" text="暂无数据"></u-divider>
<u-divider v-show="ExpiredCourseList.status == 1" text="加载中..."></u-divider>
</view>
</view>
<view>
@@ -62,7 +134,7 @@
<!-- 评论弹出 -->
<public-module></public-module>
<tree-list ref="treeList" v-if="treeListVisible" @clickCourseInfo="clickCourseInfo"></tree-list>
<buy-pup v-if="pricespop" :proPriceList="proPriceList" @closePup="closePup" @oprate="oprate"></buy-pup>
<z-navigation></z-navigation>
<!-- <music-play :playData="playData"></music-play> -->
</view>
@@ -71,6 +143,7 @@
<script>
// import musicPlay from '@/components/music.vue'
import buyPup from '@/components/buyPup.vue'
import treeList from '@/components/tagTree.vue'
import commentsList from '@/components/commentsList.vue'
import emojiList1 from '../../bkhumor-emojiplus/emoji/biaoqin.js'
@@ -83,9 +156,12 @@
export default {
data() {
return {
proPriceList: [],
pricespop:false,
curTagId: 0,
playData: {},
searchValue:'',
searchValue:'',
selectCat:'', // 选中的分类名称
// fixed: false,
bgiStyle: {
background: '#fff'
@@ -113,7 +189,7 @@
name: '我的课程'
}, {
id: 2,
name: '我收藏的'
name: '正在学习'
}, {
id: 3,
name: '已过期'
@@ -138,7 +214,9 @@
status: 88,
page: 1,
flag: false
}
},
oldValue : '',
cartList:[]
};
},
@@ -151,9 +229,7 @@
console.log(e, '传入分类id')
this.getUserInfo()
// this.fatherClick()
this.getMyCourseList()
// this.getLearningCourseList()
// this.getExpiredCourseList()
this.getMyCourseList()
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
@@ -163,6 +239,15 @@
this.fixed = false
}
},
onPullDownRefresh() {
this.selectCat = ''
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
this.getLearningCourseList()
this.getExpiredCourseList()
uni.stopPullDownRefresh()
},
computed: {
...mapState(['userInfo'])
},
@@ -176,40 +261,207 @@
console.log('触底');
if (this.curTagId == 0) {
if(this.MyCourseList.status != 2){
if(!this.MyCourseList.flag){
this.MyCourseList.page++
this.getMyCourseList()
}
}
}else if(this.curTagId == 1){
}else if(this.curTagId == 2){
}
}
},
components: {
// musicPlay
emotion,
treeList
treeList,
buyPup
// commentsList
},
//方法
methods: {
oprate(data){
console.log(data,'得到的内容')
if(data.name == 'buy'){
this.buy(data.item)
}else if(data.name == 'gouwuche'){
this.addCart(data.item)
}
},
// 购物车
addCart(val){
console.log(val)
if (val.productStock == 0) {
uni.showToast({
title: '商品库存不足',
icon: "none"
});
} else {
console.log(this.userInfo, '222')
this.$http
.post(`book/ordercart/getCartList?userId=${this.userInfo.id}`)
.then(res => {
// console.log(
this.cartList = res.cartList
// this.isAddLink(val)
})
}
},
// 加入购物车
isAddLink(item) {
// 统计商品信息
let data = {
"userId": this.userInfo.id,
"productId": item.productId,
"productAmount": this.productAmount,
"price": item.price
}
// 判断列表是否为空
if (this.cartList.length > 0) {
let flag = ''
let shagnpin = {}
// 循环购物车列表
flag = this.cartList.some((item, index) => {
if (item.productId == data.productId) {
shagnpin = item
shagnpin.productAmount = item.productAmount + 1
return true
}
})
if (flag) {
// 已在购物车中添加
$http.request({
url: "book/ordercart/update",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: shagnpin,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
this.upoShow = false
uni.showToast({
title: '加入购物车成功',
duration: 1000,
});
}
})
} else {
// 加入购物车
$http.request({
url: "book/ordercart/save",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
this.upoShow = false
uni.showToast({
title: '加入购物车成功',
duration: 1000,
});
}
})
}
} else {
// 购物车列表为空时直接加入购物车
$http.request({
url: "book/ordercart/save",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
uni.showToast({
title: '加入购物车成功',
duration: 1000,
});
}
})
}
},
// 直接购买
buy(val){
var mynavData = JSON.stringify({
        goods: [
          {
            productImages: val.productImages,
            productId: val.productId,
            productName: val.productName,
            price: val.activityPrice && val.activityPrice != 0 ? val.activityPrice:val.price,
            goodsType: val.goodsType,
          },
        ],
        navTitle: this.options.navTitle,
        title: this.options.title,
        typeId: 0,
      }); // 这里转换成 字符串
      uni.navigateTo({
        url: `/pages/goods/order/index?data=${mynavData}`,
      });
// uni.navigateTo({
// url:`/pages/bookShop/settlement?type=2&list=${val.id}`
// })
},
closePup(e){
this.pricespop = false
},
delselectCat(){
this.selectCat = ''
this.medicalId = ''
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
},
search(res){
console.log('点了搜索')
// if (this.curTagId == 0) {
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
console.log(this.searchValue,'searchValue')
},
focus(res){
this.oldValue = res
// console.log(res,this.oldValue,'聚焦');
},
blur(res){
// console.log(res,this.searchValue,'res');
if(this.oldValue != res){ // 重新请求
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
this.oldValue = ''
}
},
cancel(res){},
clear(){
// console.log('++++++++++++++++++++++')
this.searchValue = ''
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
},
clickCourseInfo(val){
console.log(val,'选择的分类数据');
if(val && val.id){
this.medicalId = val.id
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.selectCat = val.title
this.getMyCourseList()
}
},
fatherClick(e) {
console.log(e,'tabitem')
this.curTagId = e.index
},
showDrawer(){
showDrawer(){
this.treeListVisible = true
this.$nextTick( ()=> {
this.$refs['treeList'].getData()
@@ -218,11 +470,11 @@
},
getMyCourseList() {
this.MyCourseList.status = 1
if (this.MyCourseList.flag) {
console.log('正在执行,未完成')
return
}
this.MyCourseList.flag = false
// if (this.MyCourseList.flag) {
// console.log('正在执行,未完成')
// return
// }
this.MyCourseList.flag = true
$http.request({
url: "medical/course/getUserCourseBuy",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
@@ -247,91 +499,84 @@
this.MyCourseList.status = 2
}
} else {
this.MyCourseList.status = 3 // 暂无数据
}
console.log('status', this.MyCourseList.status)
}
this.MyCourseList.flag = true
this.MyCourseList.flag = false
}).catch(e => {
console.log(e, '数据报错')
});
},
getLearningCourseList() {
if (!this.pObj.pFlag) {
return
}
this.pObj.pFlag = false
this.pObj.status = 1
this.LearningCourseList.status = 1
// this.LearningCourseList.flag = true
$http.request({
url: "common/taihuWelfare/getTaihuWelfareProductList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"page": this.pObj.page,
"limit": 14
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
if (res.page.records.length > 0) {
var _list = res.page.records
this.productList = this.productList.concat(_list)
if (res.page.pages > this.pObj.page) {
this.pObj.status = 88
url: "medical/course/getUserCourseStudying",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"userId": this.userMsg.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if (res.courseList.length > 0) {
this.LearningCourseList.list = res.courseList
// if (res.courseList.pages > this.LearningCourseList.page) {
// this.LearningCourseList.status = 0
// } else {
this.LearningCourseList.status = 2
// }
} else {
// 加载完毕
this.pObj.status = 2
this.LearningCourseList.status = 3 // 暂无数据
}
} else {
this.pObj.status = 3
console.log('status', this.LearningCourseList.status)
}
}
this.pObj.pFlag = true
}).catch(e => {
console.log(e, '商品列表')
this.pObj.status = 88
this.pObj.pFlag = true
});
// this.LearningCourseList.flag = false
}).catch(e => {
console.log(e, '数据报错')
});
},
getExpiredCourseList() {
if (!this.pObj.pFlag) {
return
}
this.pObj.pFlag = false
this.pObj.status = 1
this.ExpiredCourseList.status = 1
// if (this.ExpiredCourseList.flag) {
// console.log('正在执行,未完成')
// return
// }
// this.ExpiredCourseList.flag = true
$http.request({
url: "common/taihuWelfare/getTaihuWelfareProductList",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"page": this.pObj.page,
"limit": 14
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
if (res.code == 0) {
if (res.page.records.length > 0) {
var _list = res.page.records
this.productList = this.productList.concat(_list)
if (res.page.pages > this.pObj.page) {
this.pObj.status = 88
url: "medical/course/getCourseExpire",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"userId": this.userMsg.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0 && res.courseList != null) {
if (res.courseList.length > 0) {
this.ExpiredCourseList.list = res.courseList
// if (res.courseList.pages > this.ExpiredCourseList.page) {
// this.ExpiredCourseList.status = 0
// } else {
this.ExpiredCourseList.status = 2
// }
} else {
// 加载完毕
this.pObj.status = 2
this.ExpiredCourseList.status = 3 // 暂无数据
}
} else {
this.pObj.status = 3
console.log('status-------------------', this.ExpiredCourseList.status)
}else{
this.ExpiredCourseList.status = 3 // 暂无数据
}
}
this.pObj.pFlag = true
}).catch(e => {
console.log(e, '商品列表')
this.pObj.status = 88
this.pObj.pFlag = true
});
// this.ExpiredCourseList.flag = false
}).catch(e => {
console.log(e, '数据报错')
});
},
getUserInfo() {
// 用户详情
@@ -340,10 +585,111 @@
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMsg = res.user
// this.userInfo = res.user
this.getLearningCourseList()
this.getExpiredCourseList()
});
// }
},
addCollection(val,index){
$http.request({
url: "medical/course/addUserCourseStudying",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"userId": this.userInfo.id,
"courseId": val.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if(res.code == 0){
uni.showToast({
title:'加入成功',
icon:'success'
})
if(this.curTagId == 0){
console.log(this.MyCourseList.list[index],'this.MyCourseList[index]')
this.MyCourseList.list[index].isStudying = 1
this.getLearningCourseList() // 刷新收藏列表
}
}
})
.catch(e => {
console.log('加入在学习', e)
})
},
delCollection(val, index){
// console.log(val,'val');
$http.request({
url: "medical/course/delUserCourseStudying",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// "userId": this.userInfo.id,
"courseId": val.id
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if(res.code == 0){
uni.showToast({
title:'取消成功',
icon:'success'
})
if(this.curTagId == 0){
console.log(this.MyCourseList.list[index],'this.MyCourseList[index]')
this.MyCourseList.list[index].isStudying = 0
this.getLearningCourseList() // 刷新收藏列表
}else if(this.curTagId == 1){
this.LearningCourseList.list.splice(index,1)
this.MyCourseList.page = 1
this.MyCourseList.list = []
this.getMyCourseList()
}
}
})
.catch(e => {
console.log('取消收藏报错', e)
uni.showToast({
title:'取消失败',
icon:'error'
})
})
},
xufei(val){
console.log('去续费,获取商品列表')
$http.request({
url: "sociology/product/getProductListForCourse",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
"id": val.catalogueId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
if (res.code == 0) {
if (res.productList.length > 0) {
this.proPriceList = res.productList
// this.curProId = this.proPriceList[0].productId
} else {
this.proPriceList = []
}
}
}).catch(e => {
console.log(e, '获取商品列表报错')
});
this.pricespop = true
},
// 跳转
onPageJump(url, id) {
uni.navigateTo({
@@ -356,6 +702,29 @@
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.LearningCourseBox,.ExpiredCourseBox{margin-top: 20rpx;}
.collection{ margin-top: 20rpx; overflow: hidden; text-align: right;
.btn_box{border: 1px solid $themeColor !important; color:$themeColor !important; margin-left: 20rpx;}
.citem{ display: inline-block;
border-radius: 10rpx;
// background-color: #ff7446;
border: 1px solid #ff7446;
padding: 10rpx; font-size:24rpx;
color: #ff7446;
}
.del{
background-color: #ffe6db; color: #ff7446;
}
}
.sectionTitle{
justify-content: space-between; margin-bottom: 20rpx; margin-top: 20rpx;
.rightIcon{color:#2979ff ; align-items: center;}
}
.selectCateText{ min-width:20rpx ;
.del{color: #ff7446; padding-left: 20rpx;}
}
.search{background-color: $containerColor; padding: 10rpx; }
.containerBg1{padding:0 10px;}
.containerBg {
@@ -366,12 +735,23 @@
.curseSet{margin-right: 20rpx; font-size: 28rpx; display: flex; align-items: center;}
.fixed {
position: fixed;
z-index: 1; width: 100%; background-color: #fff;
z-index: 2; width: 100%; background-color: #fff;
}
.newBox {
.item {
.blueBorder{border: 1px solid #2979ff !important;}
.item { overflow: hidden;
border: #fff 1px solid ;
.vipTag{position: absolute; padding:10rpx 80rpx;
left: -60rpx; top: 10rpx;
transform: rotate(-30deg);
-o-transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
z-index: 1;
@include theme("btn_bg") ;
color: #fff;}
position: relative;
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
@@ -394,6 +774,7 @@
width: 100%;
height: 200rpx;
}
}
.btn_box{ text-align: right;
text{

View File

@@ -2,13 +2,13 @@
<view style="background-color: #f4f7ff;">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"></z-nav-bar>
<z-nav-bar title="在学习"></z-nav-bar>
<view class="containerBg1">
<!-- <view class="vipSee"> -->
<view :class="[userInfo.vip != 0 ? 'vipBox' : '']" style="padding:0 10px;">
<view :class="[userMsg && userMsg.vip != 0 ? 'vipBox' : '']" style="padding:0 10px;">
<view class="courseTitle flexbox" v-if="course.id">
<view class="vipSee" v-if="userInfo.vip != 0">
<view class="vipSee" v-if="userMsg && userMsg.vip != 0">
<text>VIP畅学权益生效中</text>
</view>
<view class="curseImg flexbox imgcontainer" style="align-items: center;">

View File

@@ -17,10 +17,10 @@
<view class="jianjie" v-html="item.content">
</view>
<view class="tag-view">
<!-- <view class="tag-view">
<uni-tag style="margin-right: 10rpx;" text="高级" type="primary" size="small" />
<uni-tag style="margin-right: 10rpx;" text="选修" size="small" type="success" />
</view>
</view> -->
<view class="btn_box">
<text>课程详情</text>
</view>

View File

@@ -0,0 +1,759 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="吴门医述"></z-nav-bar>
<!-- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus" @input="input"
@cancel="cancel" @clear="clear">
</uni-search-bar> -->
<view class="contentBox">
<!-- <scroll-view class="scroll-view_H oneCateList" scroll-x="true" scroll-left="0"> -->
<view class="oneCateList flexbox">
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
v-for="(item, index) in oneCateList" :key="item.type">{{item.title}}</text>
</view>
<!-- <view class="search_box" v-if="oneCateList.length > 0">
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" v-model="searchValue"
@input="input" @blur="blur" @search="search" @custom="search"></u-search>
</view> -->
<!-- <view class="searchList" v-show="showSearchList">
<view class="itemBox" v-if="searchList.length > 0">
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
{{item.title}}
</view>
</view>
<view v-else class="">
<u-divider text="未找到相关方剂哦~"></u-divider>
</view>
</view> -->
<!-- </scroll-view> -->
<view v-show="!showSearchList">
<view class="grid twoCateList" v-if="twoCateList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in twoCateList" :key="item.dictType"
@click="setTwoCateIndex(item, index)">
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.dictValue}}</view>
</u-grid-item>
</u-grid>
</view>
<!-- 吴门缘起-吴门之徽 -->
<view class="titleList" v-if="curOneCateIndex == 2&&curTwoCateIndex == 2">
<u-grid :col="3" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="previewImage(item.url)"
style="align-items: flex-start;">
<!-- <view :class="['titleItem']">{{item.name}}</view> -->
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
</u-grid-item>
</u-grid>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
<!-- 学术贡献-学术思想和学术平台 -->
<view class="titleList" v-else-if="curOneCateIndex == 0&&(curTwoCateIndex == 0||curTwoCateIndex == 2)">
<u-grid :col="1" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.title}}</view>
</u-grid-item>
</u-grid>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
<!-- 学术贡献-出版专著 -->
<view class="titleList" v-else-if="curOneCateIndex == 0&&(curTwoCateIndex == 1)">
<u-divider text="点击标签进入出版专著"></u-divider>
</view>
<!-- 其他 -->
<view class="titleList" v-else>
<u-grid :col="1" v-if="titleList.length > 0&&(curOneCateIndex==0||curOneCateIndex==2)">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view>
</u-grid-item>
</u-grid>
<u-grid :col="1" v-if="titleList.length > 0&&curOneCateIndex==3">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.title}}</view>
</u-grid-item>
</u-grid>
<view :col="1" v-if="titleList.length > 0&&curOneCateIndex==1">
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;display: flex;padding: 20rpx 0;">
<view style="width: 280rpx;text-align: center;">
<img src="" v-if="item.imageslist&&item.imageslist.length==0" class="chImage">
<img :src="item.imageslist&&item.imageslist[0]" v-else class="chImage">
</view>
<view :class="['titleItem']">{{item.name}}</view>
</view>
</view>
<u-divider text="暂无数据哦~" v-if="titleList.length==0"></u-divider>
</view>
</view>
</view>
<!-- <view class="search_box flexbox" @click="">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入方剂名</text>
</view>
</view> -->
<!-- <u-modal :show="limitShow" :title="limitTitle" :content='limitContent' @confirm="limitShow=false">
<view class="limiTy">
<view v-if="curOneCateIndex == 0">
此功能使用权限仅对同一手机账号注册过一路健康APP且开通吴门验方基础班上中下吴门验方提高班上下五部课程的疯子读书APP学员开通
<br>如果您符合条件请联系微信客服开通
<br>客服微信<b>yilujiankangkefu</b>
</view>
<view v-if="curOneCateIndex == 3">
此功能使用权限仅对在疯子读书APP购买肿瘤六经辨证法书籍的学员开通
<br>如果您符合条件请联系微信客服开通
<br>客服微信<b>yilujiankangkefu</b>
</view>
</view>
</u-modal> -->
<z-navigation></z-navigation>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
data() {
return {
playData: {},
searchValue: '',
oneCateList: [{
title: "学术贡献",
type: 'medicaldesBookType'
}, {
title: "学术传承",
type: 'inheritType'
}, {
title: "吴门缘起",
type: 'lightType'
// }, {
// title: "吴门纪实",
// type: 'recordType'
}], // 一级分类标题1
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: '提示',
limitContent: ''
}
},
onLoad() {
this.getUserInfo()
// this.getCateList()
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(['userInfo']),
},
methods: {
// 检查是有权限使用搜索功能
checkDisable() {
console.log('点击了')
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
if (this.userInfo.id != undefined) {
this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
this.getCateList()
console.log(this.userMes, '呼呼')
});
}
},
// 详情
gotoDetail(item) {
console.log('111', item)
console.log('this.curOneCateIndex', this.curOneCateIndex)
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
if (this.curOneCateIndex == 0) {
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: './xueshugongxianDetail?id=' + item.id
})
return
}
if (this.curOneCateIndex == 1) {
uni.navigateTo({
url: "./medicaldesDetail?id=" + item.id
})
return
}
if (this.curOneCateIndex == 2) {
console.log('111', item)
uni.navigateTo({
url: './video?title=' + item.name + '&src=' + item.url
})
return
}
if (this.curOneCateIndex == 3) {
console.log('111', item)
uni.navigateTo({
url: "./recordDetail?id=" + item.id
})
return
}
},
// 获取名称
getTitles(dictType) {
console.log('dictType', dictType)
if (this.curOneCateIndex == 0) {
if(dictType == 2){
uni.navigateTo({
url: './zhuanzhuchuban'
})
return
}
$http.request({
url: "book/generalArticle/articleByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"type": dictType==1?'1':'2',
"limit": 1000,
"current": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result && res.result.records.length > 0) {
this.titleList = res.result.records
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 1) {
$http.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
'dictType': dictType,
"limit": 1000,
"current": 1
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records
for (let i = 0; i < this.titleList.length; i++) {
this.titleList[i].imageslist = [];
this.titleList[i].imageslist = this.titleList[i].img.split(";");
}
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 2) {
$http.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 3) {
$http.request({
url: "book/medicaldes/recordByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
},
setTwoCateIndex(item, index) {
let dictType = item.dictType
this.curTwoCateIndex = index
this.getTitles(dictType)
},
setOneCateIndex(item, index) {
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
let type = item.type
this.curOneCateIndex = index
this.curTwoCateIndex = 0
this.searchValue = ''
this.searchList = []
this.showSearchList = false
// if (index != 2) {
this.getTowCateList(type)
// } else {
// this.getJFList(dictType)
// }
},
getTowCateList(type) {
$http.request({
url: "book/medicaldes/typeList?label=" + type,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
},
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
}).then(res => {
console.log(res, '二级分类获取成功')
if (res.code == 0 && res.result.length >= 0) {
this.twoCateList = res.result
if (this.curOneCateIndex == 0) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "学术思想"
}, {
'dictType': "2",
"dictValue": "出版专著"
}, {
'dictType': "3",
"dictValue": "学术平台"
}]
}
if (this.curOneCateIndex == 2) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "吴门之歌"
}, {
'dictType': "2",
"dictValue": "巴山夜语"
}, {
'dictType': "3",
"dictValue": "吴门之徽"
}]
}
if (this.curOneCateIndex == 3) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "学术贡献"
}, {
'dictType': "2",
"dictValue": "抗疫纪实"
}, {
'dictType': "3",
"dictValue": "吴门公益"
}]
}
this.getTitles(this.twoCateList[0].dictType)
} else {
this.twoCateList = []
this.titleList = []
}
}).catch(e => {
this.twoCateList = []
this.titleList = []
console.log(e)
})
},
transformData(inputData) {
const result = {};
inputData.forEach(item => {
const {
letter
} = item;
if (!result[letter]) {
result[letter] = [];
}
result[letter].push(item);
});
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
return result;
},
// getJFList(id) {
// $http.request({
// url: "book/prescript/prescriptListForJF",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// if (res.code == 0 && res.list.length > 0) {
// this.twoCateList = []
// this.titleList = this.transformData(res.list)
// console.log('JF经方', this.titleList)
// } else {
// this.twoCateList = []
// this.titleList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.titleList = []
// console.log(e)
// })
// },
getCateList(id) {
id ? '' : id = 0
this.twoCateList = []
this.curTwoCateIndex = 0
// 0为获取顶级分类其他为搜索下级分类目前的逻辑顶级是写死的所以可能只会涉及到搜索第二级
// $http.request({
// url: "book/prescript/prescriptCategoryList",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type)
// } else {
// this.oneCateList = []
// }
// }).catch(e => {
// this.oneCateList = []
// console.log(e)
// })
},
// 放大图片
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
// getSearch() {
// $http.request({
// url: "book/prescript/searchPrescript",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'keywords': this.searchValue,
// type: this.curOneCateIndex + 1
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '搜索结果')
// if (res.code == 0 && res.list.length >= 0) {
// this.showSearchList = true
// this.searchList = res.list
// } else {
// this.searchList = []
// }
// }).catch(e => {
// // this.titleList = []
// this.searchList = []
// console.log(e)
// })
// },
// search(res) {
// console.log(res, 'res')
// // uni.showToast({
// // title: '搜索:' + res,
// // icon: 'none'
// // })
// if (res == '') {
// this.showSearchList = false
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// input(res) {
// console.log('----input:', res)
// if (res == '') {
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// clear(res) {
// console.log('----clear:', res)
// // uni.showToast({
// // title: 'clear事件清除值为',
// // icon: 'none'
// // })
// this.searchValue = ''
// this.showSearchList = false
// },
// blur(res) {
// // console.log('----blur:', res)
// // if (res == '') {
// // this.showSearchList = false
// // this.searchList = []
// // } else {
// // this.getSearch()
// // }
// },
// focus(e) {
// console.log('----focus:')
// // uni.showToast({
// // title: 'focus事件输出值为' + e.value,
// // icon: 'none'
// // })
// // 等于1 就是有权限
// // this.showSearchList = true
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {
},
}
</script>
<style lang="scss" scoped>
.searchList {
.item {
font-size: 28rpx;
padding: 20rpx;
border-bottom: 1px solid #dadbde;
}
}
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.contentBox {
.oneCateList {
justify-content: space-between;
text {
text-align: center;
display: inline-block;
width: 32%;
padding: 20rpx 0;
font-size: 34rpx;
border-radius: 10rpx;
}
.cur {
background-color: #55aaff;
color: #fff;
}
}
.twoCateList {
font-size: 28rpx;
margin-top: 20rpx;
.grid-text {
padding: 30rpx 20rpx;
text-align: center;
}
.cur {
color: #55aaff;
}
// .u-grid-list{border: 0.5px solid #dadbde;}
}
.titleList {
font-size: 26rpx;
margin-top: 20rpx;
padding: 0 10rpx;
border-radius: 10rpx;
background-color: #f8f9fa;
.titleItem {
padding: 20rpx 10rpx;
}
.JFtitleItem {
background-color: #ffffff;
padding: 20rpx 10rpx;
width: 100%;
border-bottom: 0.5px solid #f8f9fa;
}
.wmzhimg {
width: 220rpx;
height: 220rpx;
}
}
}
.container {
padding: 10rpx;
height: 100vh;
background-color: #fff;
}
.search_box {
margin: 0 auto;
overflow: hidden;
align-items: center;
width: calc(100% - 10px);
margin-top: 20rpx;
margin-bottom: 20rpx;
.search {
height: 56upx;
display: flex;
width: 86%;
margin: 0 auto;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;
border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633;
}
.prompt {
color: #838383;
font-size: 24rpx;
}
.icon_search {
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width: 36upx;
height: 36upx;
margin-right: 20upx;
}
}
.flexbox {
display: flex;
}
.uni-modal .uni-modal__bd {
text-align: left;
}
.limiTy {
font-size: 28rpx;
line-height: 46rpx;
}
.chImage {
height: 100rpx;
}
</style>

View File

@@ -0,0 +1,174 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="prescriptDetail.name"></z-nav-bar>
<view class="uni-margin-wrap"
v-if="prescriptDetail && prescriptDetail.images && prescriptDetail.images.length > 0">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item, index) in prescriptDetail.images" :key="index">
<view class="swiper-item">
<image :src="item" mode="aspectFit" @click="previewImage(item)"></image>
</view>
</swiper-item>
</swiper>
</view>
<view class="contentBox">
<view class="content">
<uni-section class="mb-10" titleFontSize="18px" title="姓名" type="line">
<view class="item">
{{prescriptDetail.name}}
</view>
</uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="城市" type="line"
v-if="prescriptDetail.city_name && prescriptDetail.city_name != ''">
<view class="item" v-html="prescriptDetail.city_name">
</view>
</uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="详细介绍" type="line"
v-if="prescriptDetail.content && prescriptDetail.content != ''">
<view class="item" v-html="prescriptDetail.content">
</view>
</uni-section>
<!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line">
<view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility">
</view>
<view class="item" v-else>
暂无
</view>
</uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="文献" type="line">
<view class="item" v-if="prescriptDetail.literature && prescriptDetail.literature != ''" v-html="prescriptDetail.literature">
</view>
<view class="item" v-else>
暂无
</view>
</uni-section> -->
</view>
</view>
<music-play :playData="playData"></music-play>
<!-- <z-navigation></z-navigation> -->
</view>
</template>
<script>
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
export default {
data() {
return {
playData: {},
prescriptDetail: {
images: []
},
id: null,
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 500,
}
},
onLoad(e) {
this.id = e.id
},
onShow() {
this.getDetail()
},
methods: {
// 放大图片
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
// 方剂详情
getDetail() {
$http.request({
url: "book/medicaldes/getInheritById?id=" + this.id,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// loadAnimate: 'none', // 请求加载动画
// 'prescriptId': this.prescriptId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0) {
this.prescriptDetail = res.result
if (this.prescriptDetail.img) {
this.prescriptDetail.images = this.prescriptDetail.img.split(';');
}
}
}).catch(e => {
// this.titleList = []
console.log(e)
})
},
},
components: {
musicPlay
},
}
</script>
<style lang="scss" scoped>
.contentBox {
padding-bottom: 20rpx;
}
.mb-10 {
margin-bottom: 10px;
}
.content {
font-size: 28rpx;
}
.swiper-item {
image {
margin: 0 auto;
height: 250rpx;
}
}
.uni-margin-wrap {
margin-bottom: 20rpx;
padding-top: 20rpx;
background-color: #fff;
}
.container {
padding: 10rpx;
// background-color: #fff;
.item {
color: #666;
padding: 10rpx 20rpx;
padding-bottom: 20rpx;
line-height: 46rpx;
}
}
.flexbox {
display: flex;
}
/deep/ .uni-section-header__decoration.line {
background-color: #18bc37;
}
</style>

View File

@@ -0,0 +1,45 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar></z-nav-bar>
<view class="contentBox">
<web-view :webview-styles="webviewStyles" :src="id"></web-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
webviewStyles: {
progress: {
color: '#000'
}
}
};
},
onLoad(e) {
this.id = uni.getStorageSync('prescriptUrl')
},
computed: {
},
watch: {
},
mounted() {
},
methods: {
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
</style>

View File

@@ -0,0 +1,169 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="prescriptDetail.title"></z-nav-bar>
<view class="uni-margin-wrap"
v-if="prescriptDetail && prescriptDetail.images && prescriptDetail.images.length > 0">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item, index) in prescriptDetail.images" :key="index">
<view class="swiper-item">
<image :src="item" mode="aspectFit" @click="previewImage(item)"></image>
</view>
</swiper-item>
</swiper>
</view>
<view class="contentBox">
<view class="content">
<uni-section class="mb-10" titleFontSize="18px" title="标题" type="line">
<view class="item">
{{prescriptDetail.title}}
</view>
</uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="内容" type="line"
v-if="prescriptDetail.content && prescriptDetail.content != ''">
<view class="item" v-html="prescriptDetail.content">
</view>
</uni-section>
<!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line">
<view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility">
</view>
<view class="item" v-else>
暂无
</view>
</uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="文献" type="line">
<view class="item" v-if="prescriptDetail.literature && prescriptDetail.literature != ''" v-html="prescriptDetail.literature">
</view>
<view class="item" v-else>
暂无
</view>
</uni-section> -->
</view>
</view>
<music-play :playData="playData"></music-play>
<!-- <z-navigation></z-navigation> -->
</view>
</template>
<script>
import musicPlay from '@/components/music.vue'
import $http from '@/config/requestConfig.js';
export default {
data() {
return {
playData: {},
prescriptDetail: {
images: []
},
id: null,
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 500,
}
},
onLoad(e) {
this.id = e.id
},
onShow() {
this.getDetail()
},
methods: {
// 放大图片
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
// 方剂详情
getDetail() {
$http.request({
url: "book/medicaldes/getRecordById?id=" + this.id,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// loadAnimate: 'none', // 请求加载动画
// 'prescriptId': this.prescriptId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0) {
this.prescriptDetail = res.result
if (this.prescriptDetail.image) {
this.prescriptDetail.images = this.prescriptDetail.image.split(';');
}
}
}).catch(e => {
// this.titleList = []
console.log(e)
})
},
},
components: {
musicPlay
},
}
</script>
<style lang="scss" scoped>
.contentBox {
padding-bottom: 20rpx;
}
.mb-10 {
margin-bottom: 10px;
}
.content {
font-size: 28rpx;
}
.swiper-item {
image {
margin: 0 auto;
height: 250rpx;
}
}
.uni-margin-wrap {
margin-bottom: 20rpx;
padding-top: 20rpx;
background-color: #fff;
}
.container {
padding: 10rpx;
// background-color: #fff;
.item {
color: #666;
padding: 10rpx 20rpx;
padding-bottom: 20rpx;
line-height: 46rpx;
}
}
.flexbox {
display: flex;
}
/deep/ .uni-section-header__decoration.line {
background-color: #18bc37;
}
</style>

201
pages/medicaldes/video.vue Normal file
View File

@@ -0,0 +1,201 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="title"></z-nav-bar>
<view class="contentBox">
<!-- <view class="video_box" :style="{ height: screenHeight + 'px'}"> -->
<video
class="video_file"
:id="`video_${objId}`"
:ref="`video_${objId}`"
:src="src"
:poster="poster"
loop
object-fit="contain"
:show-play-btn="false"
:show-center-play-btn="false"
:controls="false"
:enable-progress-gesture="false"
:autoplay="videoPlayId == objId"
:style="'height: '+screenHeight + 'px'"
@timeupdate="onScheduleChange"
@waiting="onWaiting"
></video>
<!-- <view class="bottom_mask"></view> -->
<!-- 播放按钮 -->
<view class="play_btn" @click="onPlay">
<image class="icon_play" v-if="playState == 1000" src="http://qn.kemean.cn/upload/202103/08/1615183536616rn7yfe5g.png" mode="aspectFit"></image>
</view>
<view class="play_schedule" :style="{bottom: progressBottom + 'rpx'}">
<view class="schedule_bg"></view>
<view class="schedule" :style="{ width: schedule + 'rpx' }"></view>
<view class="progress_drag_dot" v-if="progressDrag"></view>
</view>
<!-- </view> -->
</view>
</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
data() {
return {
schedule: 0,
// 1000 待播放
// 2000 播放中
// 3000 播放缓冲中
playState: 1000,
// 是否拖动进度
progressDrag: false,
// 视频总长度
duration: 0,
videoCtx: null,
objId:''
};
},
onLoad(e) {
console.log('1111',e)
this.src = e.src
this.title = e.title
},
computed: {
...mapState(['videoPlayId'])
},
watch: {
videoPlayId(val) {
if (val == this.objId) {
setTimeout(() => {
this.videoCtx.play();
this.playState = 2000;
}, 200);
} else {
setTimeout(() => {
this.videoCtx.pause();
this.videoCtx.seek(0);
this.playState = 1000;
this.schedule = 0;
},100);
}
}
},
mounted() {
console.log('src', this.src)
this.videoCtx = uni.createVideoContext(`video_${this.objId}`, this);
if(this.videoPlayId == this.objId){
setTimeout(() => {
this.videoCtx.play();
this.playState = 2000;
}, 200);
}
let throttling = true;
uni.$on("videoProgress", res => {
if(throttling){
throttling = false;
setTimeout(() => {
throttling = true;
if (res.progress == 1) {
this.progressDrag = true;
} else {
this.progressDrag = false;
}
if (this.videoPlayId == this.objId && res.progressValue) {
this.schedule = res.progressValue * 750;
this.videoCtx.seek(this.duration * res.progressValue);
}
}, 100);
}
});
},
methods: {
onScheduleChange(e) {
this.duration = e.detail.duration;
if (!this.progressDrag) {
this.schedule = (parseFloat(e.detail.currentTime) / e.detail.duration) * 750;
}
},
onPlay() {
if (this.playState == 2000) {
this.videoCtx.pause();
this.playState = 1000;
} else if (this.playState == 1000) {
this.videoCtx.play();
this.playState = 2000;
} else if (this.playState == 3000) {
this.videoCtx.play();
this.playState = 2000;
}
},
// 视频进入缓冲中
onWaiting() {
this.playState = 3000;
},
onError(e){
console.log("视频播放出错", e);
}
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.video_box {
position: relative;
width: 750rpx;
}
.bottom_mask {
position: absolute;
left: 0rpx;
bottom: 0rpx;
right: 0rpx;
height: 300rpx;
width: 750rpx;
background-image: linear-gradient(to bottom, rgba(0,0,0,0) , rgba(0,0,0,0.7));
}
.video_file {
width: 750rpx;
}
.play_schedule {
position: absolute;
bottom: 6rpx;
left: 0;
height: 16rpx;
width: 750rpx;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.schedule_bg {
position: absolute;
top: 7rpx;
left: 0;
right: 0;
height: 2rpx;
background-color: rgba(255, 255, 255, 0.3);
}
.schedule {
background-color: #fff;
height: 2rpx;
position: relative;
}
.progress_drag_dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #fff;
}
.play_btn {
position: absolute;
top: 50%;
left: 45%;
right: 0;
bottom: 0;
justify-content: center;
align-items: center;
}
.icon_play {
width: 90rpx;
height: 90rpx;
}
</style>

View File

@@ -0,0 +1,196 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar :title="prescriptDetail.title"></z-nav-bar>
<view
class="contentBox"
v-if="prescriptDetail.content && prescriptDetail.contentType == 1"
>
<view class="content">
<!-- <uni-section class="mb-10" titleFontSize="18px" title="标题" type="line"> -->
<view class="item title-center">
{{ prescriptDetail.title }}
</view>
<!-- </uni-section> -->
<!-- <uni-section class="mb-10" titleFontSize="18px" title="内容" type="line"> -->
<view class="item" v-html="prescriptDetail.content"> </view>
<!-- </uni-section> -->
<!-- <view class="item" v-html="prescriptDetail.content">
</view> -->
</view>
</view>
<view class="fullscreen-webview" v-else>
<span style="z-index: 2; position: fixed; top: 0; left: 0; background-color: red;">< 返回</span>
<web-view :src="prescriptDetail.url"> </web-view>
</view>
<music-play :playData="playData"></music-play>
</view>
</template>
<script>
import musicPlay from "@/components/music.vue";
import $http from "@/config/requestConfig.js";
export default {
data() {
return {
playData: {},
prescriptDetail: {
images: [],
},
id: null,
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 500,
};
},
onLoad(e) {
this.id = e.id;
// #ifdef APP-PLUS
const pages = getCurrentPages()
const page = pages[pages.length - 1];
const currentWebview = page.$getAppWebview()
currentWebview.setStyle({
titleNView: {
buttons: [{
float: 'right',
type: 'close',
onclick: function() {
uni.navigateBack({
delta: 1
});
}
}]
}
})
// #endif
},
onShow() {
this.getDetail();
},
methods: {
// 放大图片
previewImage(url) {
console.log(url);
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ["很抱歉,暂不支持保存图片到本地"],
success: function (res) {
// console.log(res,'+++++')
},
},
});
},
// 方剂详情
getDetail() {
$http
.request({
url: "book/generalArticle/getArticleById?id=" + this.id,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
// loadAnimate: 'none', // 请求加载动画
// 'prescriptId': this.prescriptId
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
console.log(res, "内容获取成功");
if (res.code == 0) {
this.prescriptDetail = res.result;
if (
this.prescriptDetail.content &&
this.prescriptDetail.contentType == 1
) {
this.prescriptDetail.content = res.result.content.replace(
/<img/g,
'<img style="max-width: 100%;"'
);
}
// if (this.prescriptDetail.image) {
// this.prescriptDetail.images = this.prescriptDetail.image.split(';');
// }
}
})
.catch((e) => {
// this.titleList = []
console.log(e);
});
},
},
components: {
musicPlay,
},
};
</script>
<style lang="scss" scoped>
.contentBox {
padding-bottom: 20rpx;
}
.contentBoxwebwiew {
height: 100%;
// .webwiew{
// height: 100%;
// }
}
.fullscreen-webview {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.mb-10 {
margin-bottom: 10px;
}
.content {
font-size: 28rpx;
}
.swiper-item {
image {
margin: 0 auto;
height: 250rpx;
}
}
.uni-margin-wrap {
margin-bottom: 20rpx;
padding-top: 20rpx;
background-color: #fff;
}
.container {
padding: 10rpx;
// background-color: #fff;
.item {
// color: #666;
padding: 10rpx 20rpx;
padding-bottom: 20rpx;
line-height: 46rpx;
}
.title-center {
text-align: center;
font-size: 32rpx;
font-weight: 700 !important;
}
}
.flexbox {
display: flex;
}
/deep/ .uni-section-header__decoration.line {
background-color: #18bc37;
}
</style>

View File

@@ -0,0 +1,808 @@
<template>
<view class="container">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="专著出版"></z-nav-bar>
<!-- <uni-search-bar @confirm="search" :focus="true" v-model="searchValue" @blur="blur" @focus="focus" @input="input"
@cancel="cancel" @clear="clear">
</uni-search-bar> -->
<view class="contentBox">
<!-- <scroll-view class="scroll-view_H oneCateList" scroll-x="true" scroll-left="0"> -->
<!-- <view class="oneCateList flexbox">
<text :class="[curOneCateIndex == index ? 'cur' : '']" @click="setOneCateIndex(item,index)"
v-for="(item, index) in oneCateList" :key="item.type">{{item.title}}</text>
</view> -->
<!-- <view class="search_box" v-if="oneCateList.length > 0">
<u-search @click="checkDisable" placeholder="请输入方剂名" @focus="focus" @clear="clear" v-model="searchValue"
@input="input" @blur="blur" @search="search" @custom="search"></u-search>
</view> -->
<!-- <view class="searchList" v-show="showSearchList">
<view class="itemBox" v-if="searchList.length > 0">
<view class="item" v-for="(item, index) in searchList" :key="index" @click="gotoDetail(item)">
{{item.title}}
</view>
</view>
<view v-else class="">
<u-divider text="未找到相关方剂哦~"></u-divider>
</view>
</view> -->
<!-- </scroll-view> -->
<view v-show="!showSearchList">
<view class="grid twoCateList" v-if="twoCateList.length > 0">
<u-grid :col="3" border class="u-grid-list">
<u-grid-item v-for="(item, index) in twoCateList" :key="item.dictType"
@click="setTwoCateIndex(item, index)">
<view :class="['grid-text',curTwoCateIndex == index ? 'cur' : '']">{{item.dictValue}}</view>
</u-grid-item>
</u-grid>
</view>
<!-- 吴门缘起-吴门之徽 -->
<view class="titleList" v-if="curOneCateIndex == 2&&curTwoCateIndex == 2">
<u-grid :col="3" v-if="titleList.length > 0">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="previewImage(item.url)"
style="align-items: flex-start;">
<!-- <view :class="['titleItem']">{{item.name}}</view> -->
<img :src="item.url" alt="" class="wmzhimg" mode="aspectFit">
</u-grid-item>
</u-grid>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
<!-- 其他 -->
<view class="titleList" v-else>
<u-grid :col="1" v-if="titleList.length > 0&&(curOneCateIndex==0||curOneCateIndex==2)">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.name}}</view>
</u-grid-item>
</u-grid>
<u-grid :col="1" v-if="titleList.length > 0&&curOneCateIndex==3">
<u-grid-item v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;">
<view :class="['titleItem']">{{item.title}}</view>
</u-grid-item>
</u-grid>
<view :col="1" v-if="titleList.length > 0&&curOneCateIndex==1">
<view v-for="(item, index) in titleList" :key="item.id" @click="gotoDetail(item)"
style="align-items: flex-start;border-bottom: 2px solid #fff;display: flex;padding: 20rpx 0;">
<view style="width: 280rpx;text-align: center;">
<img src="" v-if="item.imageslist&&item.imageslist.length==0" class="chImage">
<img :src="item.imageslist&&item.imageslist[0]" v-else class="chImage">
</view>
<view :class="['titleItem']">{{item.name}}</view>
</view>
</view>
<u-divider text="暂无数据哦~" v-if="titleList.length==0"></u-divider>
</view>
</view>
</view>
<!-- <view class="search_box flexbox" @click="">
<view class="search">
<text class="icon_search"></text>
<text class="prompt">请输入方剂名</text>
</view>
</view> -->
<!-- <u-modal :show="limitShow" :title="limitTitle" :content='limitContent' @confirm="limitShow=false">
<view class="limiTy">
<view v-if="curOneCateIndex == 0">
此功能使用权限仅对同一手机账号注册过一路健康APP且开通吴门验方基础班上中下吴门验方提高班上下五部课程的疯子读书APP学员开通
<br>如果您符合条件请联系微信客服开通
<br>客服微信<b>yilujiankangkefu</b>
</view>
<view v-if="curOneCateIndex == 3">
此功能使用权限仅对在疯子读书APP购买肿瘤六经辨证法书籍的学员开通
<br>如果您符合条件请联系微信客服开通
<br>客服微信<b>yilujiankangkefu</b>
</view>
</view>
</u-modal> -->
<!-- <z-navigation></z-navigation> -->
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
data() {
return {
playData: {},
searchValue: '',
oneCateList: [{
title: "专著出版",
type: 'medicaldesBookType'
}, {
title: "学术传承",
type: 'inheritType'
}, {
title: "吴门缘起",
type: 'lightType'
}, {
title: "吴门纪实",
type: 'recordType'
}], // 一级分类标题1
twoCateList: [], // 二级分类标题
titleList: [], // 方剂标题
curOneCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: '提示',
limitContent: ''
}
},
onLoad() {
this.getUserInfo()
// this.getCateList()
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(['userInfo']),
},
methods: {
// 检查是有权限使用搜索功能
checkDisable() {
console.log('点击了')
},
// 显示无权限弹窗
// showNoRights() {
// let that = this
// uni.showModal({
// content: "",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// that.clear()
// }
// }
// })
// },
// 获取用户详情
getUserInfo() {
// 用户详情
if (this.userInfo.id != undefined) {
this.$http
.post('book/user/info/' + this.userInfo.id)
.then(res => {
this.userMes = res.user
this.getCateList()
console.log(this.userMes, '呼呼')
});
}
},
appjumpfun() {
let bagName = 'com.cn.nuttyreading'
let schemes = 'nuttyreading'
// if(name == 'everhealth'){
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
} else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(
res) {
console.log(res);
});
});
// }
}
},
// 详情
gotoDetail(item) {
console.log('111', item)
console.log('this.curOneCateIndex', this.curOneCateIndex)
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
if (this.curOneCateIndex == 0) {
console.log('点我了');
uni.showModal({
content:'详细内容请跳转至"疯子读书app"内查看',
cancelText:'知道了',
confirmText:'打开疯子读书',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
// this.appjumpfun()
let bagName = 'com.cn.nuttyreading'
let schemes = 'nuttyreading'
// if(name == 'everhealth'){
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
} else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(
res) {
console.log(res);
});
});
// }
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: '../eBook/bookContent?Id=' + item.id
})
return
}
if (this.curOneCateIndex == 1) {
uni.navigateTo({
url: "./medicaldesDetail?id=" + item.id
})
return
}
if (this.curOneCateIndex == 2) {
console.log('111', item)
uni.navigateTo({
url: './video?title=' + item.name + '&src=' + item.url
})
return
}
if (this.curOneCateIndex == 3) {
console.log('111', item)
uni.navigateTo({
url: "./recordDetail?id=" + item.id
})
return
}
},
// 获取名称
getTitles(dictType) {
console.log('dictType', dictType)
if (this.curOneCateIndex == 0) {
$http.request({
url: "book/medicaldes/bookListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 1) {
$http.request({
url: "book/medicaldes/inheritListByPage",
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
'dictType': dictType,
"limit": 1000,
"current": 1
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.records.length > 0) {
this.titleList = res.result.records
for (let i = 0; i < this.titleList.length; i++) {
this.titleList[i].imageslist = [];
this.titleList[i].imageslist = this.titleList[i].img.split(";");
}
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 2) {
$http.request({
url: "book/medicaldes/lightListByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
if (this.curOneCateIndex == 3) {
$http.request({
url: "book/medicaldes/recordByType?type=" + dictType,
method: "POST",
data: {
// loadAnimate: 'none', // 请求加载动画
"limit": 1000,
"page": 1,
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
}).then(res => {
console.log(res, '内容获取成功')
if (res.code == 0 && res.result.length > 0) {
this.titleList = res.result
} else {
this.titleList = []
}
}).catch(e => {
this.titleList = []
console.log(e)
})
}
},
setTwoCateIndex(item, index) {
let dictType = item.dictType
this.curTwoCateIndex = index
this.getTitles(dictType)
},
setOneCateIndex(item, index) {
// if(this.userMes.tgdzPower == 0){
// let that = this
// uni.showModal({
// content: "购买 针灸六经法要上册和下册 后方可使用此功能",
// confirmText: '好的',
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// // console.log('用户点击确定');
// }
// }
// })
// return
// }
// if(item.title == "时辰取穴"){
// uni.navigateTo({
// url: "../timeAcupoint/timeAcupoint"
// })
// return
// }
let type = item.type
this.curOneCateIndex = index
this.curTwoCateIndex = 0
this.searchValue = ''
this.searchList = []
this.showSearchList = false
// if (index != 2) {
this.getTowCateList(type)
// } else {
// this.getJFList(dictType)
// }
},
getTowCateList(type) {
$http.request({
url: "book/medicaldes/typeList?label=" + type,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data: {
loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
},
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
}).then(res => {
console.log(res, '二级分类获取成功')
if (res.code == 0 && res.result.length >= 0) {
this.twoCateList = res.result
if (this.curOneCateIndex == 2) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "吴门之歌"
}, {
'dictType': "2",
"dictValue": "巴山夜语"
}, {
'dictType': "3",
"dictValue": "吴门之徽"
}]
}
if (this.curOneCateIndex == 3) {
this.twoCateList = [{
'dictType': "1",
"dictValue": "学术贡献"
}, {
'dictType': "2",
"dictValue": "抗疫纪实"
}, {
'dictType': "3",
"dictValue": "吴门公益"
}]
}
this.getTitles(this.twoCateList[0].dictType)
} else {
this.twoCateList = []
this.titleList = []
}
}).catch(e => {
this.twoCateList = []
this.titleList = []
console.log(e)
})
},
transformData(inputData) {
const result = {};
inputData.forEach(item => {
const {
letter
} = item;
if (!result[letter]) {
result[letter] = [];
}
result[letter].push(item);
});
// const finalResult = Object.keys(result).map(key => ({ [key]: result[key] }));
return result;
},
// getJFList(id) {
// $http.request({
// url: "book/prescript/prescriptListForJF",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// if (res.code == 0 && res.list.length > 0) {
// this.twoCateList = []
// this.titleList = this.transformData(res.list)
// console.log('JF经方', this.titleList)
// } else {
// this.twoCateList = []
// this.titleList = []
// }
// }).catch(e => {
// this.twoCateList = []
// this.titleList = []
// console.log(e)
// })
// },
getCateList(id) {
id ? '' : id = 0
this.twoCateList = []
this.curTwoCateIndex = 0
// 0为获取顶级分类其他为搜索下级分类目前的逻辑顶级是写死的所以可能只会涉及到搜索第二级
// $http.request({
// url: "book/prescript/prescriptCategoryList",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'categoryId': id
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '脉穴分类获取成功')
// if (res.code == 0 && res.list.length > 0) {
// this.oneCateList = res.list
this.getTowCateList(this.oneCateList[0].type)
// } else {
// this.oneCateList = []
// }
// }).catch(e => {
// this.oneCateList = []
// console.log(e)
// })
},
// 放大图片
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
// getSearch() {
// $http.request({
// url: "book/prescript/searchPrescript",
// method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
// data: {
// loadAnimate: 'none', // 请求加载动画
// 'keywords': this.searchValue,
// type: this.curOneCateIndex + 1
// },
// header: { //默认 无 说明:请求头
// 'Content-Type': 'application/json'
// },
// }).then(res => {
// console.log(res, '搜索结果')
// if (res.code == 0 && res.list.length >= 0) {
// this.showSearchList = true
// this.searchList = res.list
// } else {
// this.searchList = []
// }
// }).catch(e => {
// // this.titleList = []
// this.searchList = []
// console.log(e)
// })
// },
// search(res) {
// console.log(res, 'res')
// // uni.showToast({
// // title: '搜索:' + res,
// // icon: 'none'
// // })
// if (res == '') {
// this.showSearchList = false
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// input(res) {
// console.log('----input:', res)
// if (res == '') {
// this.searchList = []
// } else {
// this.getSearch()
// }
// },
// clear(res) {
// console.log('----clear:', res)
// // uni.showToast({
// // title: 'clear事件清除值为',
// // icon: 'none'
// // })
// this.searchValue = ''
// this.showSearchList = false
// },
// blur(res) {
// // console.log('----blur:', res)
// // if (res == '') {
// // this.showSearchList = false
// // this.searchList = []
// // } else {
// // this.getSearch()
// // }
// },
// focus(e) {
// console.log('----focus:')
// // uni.showToast({
// // title: 'focus事件输出值为' + e.value,
// // icon: 'none'
// // })
// // 等于1 就是有权限
// // this.showSearchList = true
// },
// cancel(res) {
// uni.showToast({
// title: '点击取消,输入值为:' + res.value,
// icon: 'none'
// })
// }
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {
},
}
</script>
<style lang="scss" scoped>
.searchList {
.item {
font-size: 28rpx;
padding: 20rpx;
border-bottom: 1px solid #dadbde;
}
}
.scroll-view_H {
background-color: #fff;
white-space: nowrap;
padding: 10rpx;
}
.contentBox {
.oneCateList {
justify-content: space-between;
text {
text-align: center;
display: inline-block;
width: 32%;
padding: 20rpx 0;
font-size: 34rpx;
border-radius: 10rpx;
}
.cur {
background-color: #55aa7f;
color: #fff;
}
}
.twoCateList {
font-size: 28rpx;
margin-top: 20rpx;
.grid-text {
padding: 30rpx 20rpx;
text-align: center;
}
.cur {
color: #5aaff3;
}
// .u-grid-list{border: 0.5px solid #dadbde;}
}
.titleList {
font-size: 26rpx;
margin-top: 20rpx;
padding: 0 10rpx;
border-radius: 10rpx;
background-color: #f8f9fa;
.titleItem {
padding: 20rpx 10rpx;
}
.JFtitleItem {
background-color: #ffffff;
padding: 20rpx 10rpx;
width: 100%;
border-bottom: 0.5px solid #f8f9fa;
}
.wmzhimg {
width: 220rpx;
height: 220rpx;
}
}
}
.container {
padding: 10rpx;
height: 100vh;
background-color: #fff;
}
.search_box {
margin: 0 auto;
overflow: hidden;
align-items: center;
width: calc(100% - 10px);
margin-top: 20rpx;
margin-bottom: 20rpx;
.search {
height: 56upx;
display: flex;
width: 86%;
margin: 0 auto;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;
border-radius: 20upx;
box-shadow: 0 0px 10px 1px #54a96633;
}
.prompt {
color: #838383;
font-size: 24rpx;
}
.icon_search {
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width: 36upx;
height: 36upx;
margin-right: 20upx;
}
}
.flexbox {
display: flex;
}
.uni-modal .uni-modal__bd {
text-align: left;
}
.limiTy {
font-size: 28rpx;
line-height: 46rpx;
}
.chImage {
height: 100rpx;
}
</style>

View File

@@ -11,28 +11,33 @@
@click="onPageJump('/pages/peanut/searchFor')"></image>
</view>
</view>
</view>
<view class="fourBox">
<view class="fourIcon flexbox" style="justify-content: space-around;">
<div class="item flexbox" @click="onPageJump('/pages/course/myCourse')">
<image src="../../static/my_02.png" mode="aspectFit"></image>
<text>我的课程</text>
</div>
</view>
<view class="fourBox nopadding ">
<view class="fourIcon flexbox noRadius" style="justify-content: space-around;">
<div class="item flexbox" @click="onPageJump('/pages/course/outline')">
<image src="../../static/my_01.png" mode="aspectFit"></image>
<text>学习大纲</text>
</div>
<div class="item flexbox" @click="onPageJump('/pages/course/myCourse')">
<image src="../../static/my_02.png" mode="aspectFit"></image>
<text>我的课程</text>
</div>
<!-- <div class="item flexbox" @click="onPageJump()">
<image src="../../static/my_03.png" mode="aspectFit"></image>
<text>超V专享</text>
</div> -->
<!-- <div class="item flexbox" @click="onPageJump()">
<image src="../../static/my_03.png" mode="aspectFit"></image>
<text>太湖讲堂</text>
</div> -->
<div class="item flexbox" @click="onPageJump()">
<div class="item flexbox" @click="onPageJump('/pages/medicaldes/medicaldes')">
<image src="../../static/my_04.png" mode="aspectFit"></image>
<text>吴门医述</text>
</div>
</div>
</view>
</view>
<view class="home_nar ">
<view class="newLeve2">
<view class="home_nar " style="padding: 0; background-color: #fff;">
<view class="flexbox">
<view :class="['hn_cl_tit',tabsid==item.id?'active':'']" @click="curseClick(item)"
v-for="(item, index) in curseTagList" :key="index">
@@ -41,7 +46,7 @@
</view>
</view>
</view>
<view class="fourBox" v-if="sbuMedicalTagsList && sbuMedicalTagsList.length > 0">
<view class="fourBox" style="padding: 0;" v-if="sbuMedicalTagsList && sbuMedicalTagsList.length > 0">
<view class="childrenBox fourIcon flexbox" style="justify-content: space-around;">
<div class="item flexbox" @click="curseClickJump(item)" v-for="(item, index) in sbuMedicalTagsList"
:key="index">
@@ -49,7 +54,7 @@
<text>{{item.title}}</text>
</div>
</view>
</view>
</view></view>
<!-- 新闻播报 -->
<view class="fourBox " v-if="newsList.length > 0">
<view class="newsBox flexbox">
@@ -142,6 +147,7 @@
<scroll-view class="scroll-view_H" scroll-x="true">
<!-- <view class=""> -->
<view class="item" v-for="(item, index) in seckillList" :key="index" @click="goGoodsDetail(item,1)">
<view class="imgcontainer">
<image :src="item.productImages" mode="aspectFit"></image>
</view>
@@ -167,34 +173,35 @@
</view>
</view>
</view>
<view class="fourBox" v-if="tryListenList.length > 0">
<view class="learnBox" >
<view class="titleBox flexbox">
<image src="../../static/try_listen.png" mode="aspectFit"></image>
<text>精彩试听</text>
</view>
<view class="learn flexbox shiting">
<view class="item" v-for="(item, index) in tryListenList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
<view class="imgcontainer">
<image v-if="item.image==''" src="@/static/nobg.jpg" mode="aspectFit"></image>
<image v-else :src="item.image" mode="aspectFit"></image>
</view>
<view class="buyItems flexbox">
<view class="txt555">
{{item.title}}
<view class="fourBox" v-if="tryListenList.length > 0">
<view class="learnBox">
<view class="titleBox flexbox">
<image src="../../static/try_listen.png" mode="aspectFit"></image>
<text>精彩试听</text>
</view>
<view class="learn flexbox shiting">
<view class="item" v-for="(item, index) in tryListenList" :key="index"
@click="onPageJump('/pages/course/courseDetail',item.id, item.title)">
<view class="imgcontainer">
<image v-if="item.image==''" src="@/static/nobg.jpg" mode="aspectFit"></image>
<image v-else :src="item.image" mode="aspectFit"></image>
</view>
<view class="buybtn" @click.stop="onPageJump()">
<span>购买</span>
<view class="buyItems flexbox">
<view class="txt555">
{{item.title}}
</view>
<view class="buybtn" @click.stop="onPageJump()">
<span>购买</span>
</view>
</view>
</view>
</view>
</view>
<view class="moreBox shiting">
<text @click="onPageJump('/pages/course/tryListen',1,'精彩试听')">更多试听</text>
</view>
</view>
<view class="moreBox shiting">
<text @click="onPageJump('/pages/course/tryListen',1,'精彩试听')">更多试听</text>
</view>
</view>
</view>
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
@@ -215,8 +222,8 @@
<text>众妙之门</text>
</view>
</view>
</view>
<!-- 公共组件-每个页面必须引入 -->
</view>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-navigation></z-navigation>
<music-play :playList="myList"></music-play>
@@ -248,7 +255,7 @@
data() {
return {
myList: [],
showEbook: false, // 显示电子书相关
transaction: { // 成功回调
@@ -379,28 +386,28 @@
id ? ftag = id : ftag = 0
this.$http
.post('medical/home/getCourseMedicalTree')
.then(res => {
console.log(res)
if (res.code == 0) {
if (res.labels.length > 0) {
this.curseTagList = res.labels
this.tabsid = res.labels[0].id
// this.curseClick(res.labels[0])
if (res.labels[0].isLast == 0) { // 非终极
if (res.labels[0].children && res.labels[0].children.length > 0) {
this.sbuMedicalTagsList = res.labels[0].children
} else {
this.sbuMedicalTagsList = []
.then(res => {
console.log(res)
if (res.code == 0) {
if (res.labels.length > 0) {
this.curseTagList = res.labels
this.tabsid = res.labels[0].id
// this.curseClick(res.labels[0])
if (res.labels[0].isLast == 0) { // 非终极
if (res.labels[0].children && res.labels[0].children.length > 0) {
this.sbuMedicalTagsList = res.labels[0].children
} else {
this.sbuMedicalTagsList = []
}
}
} else {
this.tabsid = null
this.curseTagList = []
}
} else {
this.tabsid = null
this.curseTagList = []
}
}
}).catch(e => {
console.log(e, '获取医学标签列表报错')
});
}).catch(e => {
console.log(e, '获取医学标签列表报错')
});
},
// 获取精彩试听课程列表
getTryListenList() {
@@ -518,11 +525,11 @@
});
},
newsClick(item) {
console.log('item',item)
uni.navigateTo({
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
})
newsClick(item) {
console.log('item', item)
uni.navigateTo({
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
})
// }
},
openURL(url) {
@@ -547,7 +554,7 @@
});
}
},
curseClickJump(item){
curseClickJump(item) {
uni.navigateTo({
// url: `/pages/course/index?id=${item.id}&title=中医学`
url: `/pages/course/index?id=${item.id}&title=${item.title}&pid=${item.pid}`
@@ -566,11 +573,11 @@
},
// 跳转
onPageJump(url,thatId,title) {
onPageJump(url, thatId, title) {
uni.navigateTo({
url: `${url}?id=${thatId}&title=${title}`
});
},
},
onPageJumpData(url, data) {
uni.navigateTo({
@@ -610,58 +617,58 @@
url: '../bookShop/bookShopType?type=' + e
});
},
appjumpfun(name){
let bagName = ''
let schemes = ''
if(name == 'zmzm'){
bagName = 'com.cn.zmzm'
schemes = 'zmzm'
}
if(name == 'nuttyreading'){
bagName = 'com.cn.nuttyreading'
schemes = 'nuttyreading'
}
appjumpfun(name) {
let bagName = ''
let schemes = ''
if (name == 'zmzm') {
bagName = 'com.cn.zmzm'
schemes = 'zmzm'
}
if (name == 'nuttyreading') {
bagName = 'com.cn.nuttyreading'
schemes = 'nuttyreading'
}
// if(name == 'everhealth'){
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
}
else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
//这链接会判断你手机是ios还是AndroidAndroid进入应用宝下载app
//跟下面的是一个链接
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
//因为ios查不到B款app在ios系统手机里面其实下载了也是检测不到所以就不检测了
//直接打开B款appB款app没有的话会进入回调报错我们在回调去打开下载链接
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的appStore下载app链接让你们后台给你
//这链接会判断你手机是ios还是Androidios进入应用宝下载app
//跟上面的是一个链接
console.log(res);
});
});
// }
}
if (plus.os.name == "Android") { //安卓
if (plus.runtime.isApplicationExist({ //查看安卓系统手机有没有下载这款app
pname: bagName, //B款app云打包的包名
})) { //安装了app
plus.runtime.launchApplication({ //打开app
pname: bagName, //B款app云打包的包名
extra: {
url: `${schemes}://${bagName}` //B款app配置的schemes+云打包的包名
},
function(e) {
console.log("Open system default browser failed: " + e.message);
}
})
} else { //未安装app
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(res) {
//进入后台小哥哥给我的应用宝下载链接,让你们后台给你
//这链接会判断你手机是ios还是AndroidAndroid进入应用宝下载app
//跟下面的是一个链接
console.log(res);
});
}
} else if (plus.os.name == "iOS") { //苹果
//因为ios查不到B款app在ios系统手机里面其实下载了也是检测不到所以就不检测了
//直接打开B款appB款app没有的话会进入回调报错我们在回调去打开下载链接
plus.runtime.launchApplication({
action: "${schemes}://"
}, function(e) {
plus.runtime.openURL(`https://a.app.qq.com/o/simple.jsp?pkgname=${bagName}`, function(
res) {
//进入后台小哥哥给我的appStore下载app链接让你们后台给你
//这链接会判断你手机是ios还是Androidios进入应用宝下载app
//跟上面的是一个链接
console.log(res);
});
});
// }
}
},
// 三个列表跳页
onBookMore(e) {
uni.navigateTo({
@@ -678,15 +685,37 @@
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.appJump{position: fixed; right: 0; top: 8%; z-index: 1;
.item{background: rgba(255, 255, 255, .6); margin-bottom: 20rpx; border: 1px solid #fff;
align-items: center; padding-right: 10rpx;
overflow: hidden; border-radius: 50rpx 0 0 50rpx;
text{font-size: 20rpx;}
.img{
.nopadding{padding: 0 !important;}
.noRadius{border-radius: 0 !important;}
.appJump {
position: fixed;
right: 0;
top: 8%;
z-index: 1;
.item {
background: rgba(255, 255, 255, .6);
margin-bottom: 20rpx;
border: 1px solid #fff;
align-items: center;
padding-right: 10rpx;
overflow: hidden;
border-radius: 50rpx 0 0 50rpx;
text {
font-size: 20rpx;
}
.img {
// width: 60rpx; height: 60rpx;
padding: 6rpx; overflow: hidden;
image{width: 36rpx; height: 36rpx; border-radius: 100%;}
padding: 6rpx;
overflow: hidden;
image {
width: 36rpx;
height: 36rpx;
border-radius: 100%;
}
}
}
}
@@ -965,10 +994,12 @@
.learnBox {
background-color: #fff;
margin-top: 10px; border-radius: 20rpx;
margin-top: 10px;
border-radius: 20rpx;
@include ptop_bottm(10px);
@include pleft_right(10px);
@include mshadow(10px, 1);margin-bottom: 10px;
@include mshadow(10px, 1);
margin-bottom: 10px;
.learn {
justify-content: space-between;
@@ -1016,11 +1047,13 @@
@include pleft_right(4px)
}
.childrenBox {
@include mshadow(10px, 1);
.childrenBox {
background-color: #e4eefa !important;
// @include mshadow(10px, 1);
background-color: #fff;
justify-content: center;
margin-top: 10px;
box-shadow: none !important;
border-radius: 0 !important;
.item {
text {
@@ -1071,7 +1104,7 @@
.fourIcon {
justify-content: space-between;
box-shadow: 0px 0px 10px 0px rgba(167, 187, 228, 1);
margin: 8px 0;
margin-bottom: 8px;
// border: 1px solid #fff;
text-align: center;
height: 60px;
@@ -1211,9 +1244,9 @@
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
padding: 20rpx;
padding:30rpx 20rpx;
position: relative;
padding-bottom: 40rpx;
// margin-bottom:60rpx;
// height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 {
@@ -1302,7 +1335,12 @@
}
.newLeve2{
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
background-color: #fff;
padding: 0 10rpx;
// padding-bottom:2rpx;
}
.home_nar {
margin: 10px 0;
justify-content: space-between;
@@ -1314,11 +1352,11 @@
width: 100%;
background-color: #fff;
text-align: center;
border-radius: 20rpx;
// border-radius: 20rpx;
align-content: center;
justify-content: center;
margin-right: 8rpx;
box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
// box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.3);
image {
width: 120rpx;
@@ -1345,10 +1383,10 @@
}
.hn_cl_tit.active {
background-color: #9dc1ff;
background-color: #e4eefa;
text {
color: #fff;
color: #3361a5;
font-weight: bold;
}
}

View File

@@ -123,7 +123,7 @@
onReachBottom() {
console.log('触底加载')
if (this.tabId == 1) { // 商品
if (this.pObj.status != 2) {
if (this.pObj.status != 2 && this.pObj.pFlag) {
this.pObj.page++
this.getProData()
} else {
@@ -131,7 +131,7 @@
}
}
if (this.tabId == 2) { // 资讯
if (this.nObj.status != 2) {
if (this.nObj.status != 2 && this.nObj.nFlag) {
this.nObj.page++
this.getnewsData()
} else {

BIN
static/my_05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB