课程指引+课程价格
This commit is contained in:
@@ -1,622 +1,394 @@
|
||||
<template>
|
||||
<view class="instructionsForUseBox">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<image src="@/static/image/headImg/top.png" mode="aspectFit" class="headImage"></image>
|
||||
|
||||
<!-- <scroll-view class="scroll-view_H cateList" scroll-x="true" scroll-left="0"> -->
|
||||
<view class="cateList flexbox">
|
||||
<common-sticky itemStyle="width:50%;padding-left: 15px; padding-right: 15px; height: 68rpx;" :list="cateList" label="title" :currentCateIndex="currentCateIndex" @handleselectCate="setOneCateIndex"></common-sticky>
|
||||
|
||||
</view>
|
||||
<view class="componentPage">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
|
||||
|
||||
<view :class="`instructionsForUse`"
|
||||
>
|
||||
|
||||
<scroll-view scroll-y="true" class="scroll-Y">
|
||||
<rich-text :nodes="detailInfo.guide" v-if="currentCateIndex==0"></rich-text>
|
||||
<rich-text :nodes="detailInfo.supervip" v-if="currentCateIndex==1"></rich-text>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
<view class="fixed">
|
||||
<block v-for="(v, index) in cateIconList" :key="index">
|
||||
<view :class="`bg${index} PM_font rightButton`" :data-index="index" @click="getViewId"
|
||||
>{{ v.title }}</view
|
||||
>
|
||||
</block>
|
||||
</view>
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="scroll"
|
||||
:scroll-into-view="viewid"
|
||||
scroll-with-animation
|
||||
>
|
||||
<block v-for="(v, index) in cateIconList" :key="index">
|
||||
|
||||
|
||||
<view :id="`cont${index}`" :class="`bg${index}`">
|
||||
|
||||
<view class="cate_item_box">
|
||||
<view class="cate_item_border">
|
||||
<image
|
||||
:src="
|
||||
cateIconList.find((e) => v.title == e.title)
|
||||
.imgUrl
|
||||
"
|
||||
mode="aspectFill"
|
||||
:style="
|
||||
cateIconList.find((e) => v.title == e.title)
|
||||
.style
|
||||
"
|
||||
></image>
|
||||
</view>
|
||||
<view class="cate_item_name">{{ v.title }}</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
<!-- <richDetail :detailInfo="detailInfo">
|
||||
|
||||
<template #richHeadImg>
|
||||
<image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image>
|
||||
|
||||
</template>
|
||||
</richDetail>
|
||||
-->
|
||||
|
||||
<!-- <view>{{ detailInfo.content }}</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import courseDescription from "@/pages/component/commonComponents/list";
|
||||
import richDetail from "@/pages/component/commonComponents/richDetail.vue";
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
components: {
|
||||
props: ["type", "oid"],
|
||||
components: {
|
||||
courseDescription, //课程说明
|
||||
richDetail,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewid: "",
|
||||
cateIconList: [
|
||||
{
|
||||
title: "儒",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_ru.png"),
|
||||
style: {
|
||||
width: "62rpx",
|
||||
height: "56rpx",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "释",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_shi.png"),
|
||||
|
||||
style: {
|
||||
width: "49rpx",
|
||||
height: "61rpx",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "道",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_dao.png"),
|
||||
|
||||
style: {
|
||||
width: "59rpx",
|
||||
height: "59rpx",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "医",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_yi.png"),
|
||||
|
||||
style: {
|
||||
width: "61rpx",
|
||||
height: "61rpx",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "美",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_mei.png"),
|
||||
|
||||
style: {
|
||||
width: "59rpx",
|
||||
height: "59rpx",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "文",
|
||||
url: "/pages/curriculum/cate/index",
|
||||
imgUrl: require("@/static/icon/homePage/cate_wen.png"),
|
||||
|
||||
style: {
|
||||
width: "61rpx",
|
||||
height: "60rpx",
|
||||
},
|
||||
},
|
||||
],
|
||||
options: {},
|
||||
detailInfo: {},
|
||||
playData: {},
|
||||
searchValue: "",
|
||||
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [{}, {}], // 方剂标题
|
||||
currentCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: "提示",
|
||||
limitContent: "",
|
||||
scrollViewHeight: 0,
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.options = options;
|
||||
// this.getData()
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
},
|
||||
onShow() {
|
||||
// this.getData()
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
getViewId(e) {
|
||||
console.log('e at line 88:', e)
|
||||
this.viewid = "cont" + e.currentTarget.dataset.index;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
detailInfo: {},
|
||||
playData: {},
|
||||
searchValue: '',
|
||||
cateList: [
|
||||
{
|
||||
title: "使用须知",
|
||||
type: 'instructionsForUse',
|
||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
||||
},
|
||||
{
|
||||
title: "超级VIP",
|
||||
type: 'vip',
|
||||
apiUrl: 'app/phoneDoctor.do?getTaiHuToShine'
|
||||
}
|
||||
|
||||
|
||||
|
||||
], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [{}, {}], // 方剂标题
|
||||
currentCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
showSearchList: false,
|
||||
userMes: {}, // 用户信息
|
||||
searchDisable: false, // 搜索不可用
|
||||
limitShow: false,
|
||||
limitTitle: '提示',
|
||||
limitContent: '',
|
||||
scrollViewHeight: 0,
|
||||
urlList:{
|
||||
instructionsForUse:'app/phone.do?getMembershipGuide',
|
||||
|
||||
},
|
||||
}
|
||||
goCourseDescription(v) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/courseInformation/courseDescription/detail?title=${v.nameCN}&oid=${v.oid}`,
|
||||
});
|
||||
},
|
||||
onLoad() {
|
||||
this.getCourseDescriptionData()
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
getData() {
|
||||
console.log(this.$store.state, "88888");
|
||||
this.$http
|
||||
.post("app/phoneDoctor.do?getTHTSDetail", {
|
||||
customerType: "D",
|
||||
token: uni.getStorageSync("token"),
|
||||
customerOid: uni.getStorageSync("customerOid"),
|
||||
// oid: '8a9fb99809e4428888aad6b56a3096a6',
|
||||
oid: this.oid,
|
||||
|
||||
},
|
||||
onHide() {
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
methods: {
|
||||
goCourseDescription(v) {
|
||||
console.log(v)
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/courseInformation/courseDescription/index?navTitle=${v.nameCN}&title=${v.nameCN}&oid=${v.oid}`
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
console.log(this.$store.state, '11111111111')
|
||||
this.$http
|
||||
.post(this.urlList.instructionsForUse, {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
:uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
:uni.getStorageSync("customerOid"),
|
||||
oid: 'b07e45f6a5f3491db9854b16f3fd8b19',
|
||||
step: 0,
|
||||
limit: 100,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res.obj.dataLst, "7777777777777777777");
|
||||
this.detailInfo = res.obj;
|
||||
|
||||
|
||||
step: 0,
|
||||
limit: 100
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
this.detailInfo = res.obj
|
||||
|
||||
// socket.init();
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
getPriceData() {
|
||||
var that = this;
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.priceDetail.getData()
|
||||
})
|
||||
}, 100)
|
||||
|
||||
|
||||
},
|
||||
// 检查是有权限使用搜索功能
|
||||
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.currentCateIndex', this.currentCateIndex)
|
||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
||||
if (this.currentCateIndex == 0) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshugongxianDetail?id=' + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentCateIndex == 1) {
|
||||
uni.navigateTo({
|
||||
url: "./medicaldesDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentCateIndex == 2) {
|
||||
console.log('111', item)
|
||||
uni.navigateTo({
|
||||
url: './video?title=' + item.name + '&src=' + item.url
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.currentCateIndex == 3) {
|
||||
console.log('111', item)
|
||||
uni.navigateTo({
|
||||
url: "./recordDetail?id=" + item.id
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
// 获取名称
|
||||
getTitles(dictType) {
|
||||
console.log('dictType', dictType)
|
||||
if (this.currentCateIndex == 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.dataList = res.result.records
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
if (this.currentCateIndex == 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.dataList = res.result.records
|
||||
for (let i = 0; i < this.dataList.length; i++) {
|
||||
this.dataList[i].imageslist = [];
|
||||
this.dataList[i].imageslist = this.dataList[i].img.split(";");
|
||||
}
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
if (this.currentCateIndex == 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.dataList = res.result
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
if (this.currentCateIndex == 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.dataList = res.result
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
}).catch(e => {
|
||||
this.dataList = []
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
setTwoCateIndex(item, index) {
|
||||
let dictType = item.dictType
|
||||
this.curTwoCateIndex = index
|
||||
this.getTitles(dictType)
|
||||
},
|
||||
async setOneCateIndex(e) {
|
||||
|
||||
var that = this
|
||||
switch (e.type) {
|
||||
case 'courseDescription':
|
||||
that.getCourseDescriptionData()
|
||||
|
||||
break;
|
||||
case 'price':
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.priceDetail.getData()
|
||||
})
|
||||
}, 100)
|
||||
break;
|
||||
case 'instructionsForUse':
|
||||
setTimeout(() => {
|
||||
that.$nextTick(() => {
|
||||
that.$refs.instructionsForUse.getData()
|
||||
})
|
||||
}, 100)
|
||||
// that.getPriceData()
|
||||
break;
|
||||
}
|
||||
// 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 = e.type
|
||||
this.currentCateIndex = e.index
|
||||
|
||||
this.searchValue = ''
|
||||
this.searchList = []
|
||||
this.showSearchList = false
|
||||
// if (index != 2) {
|
||||
|
||||
|
||||
|
||||
|
||||
// uni.createSelectorQuery().select('.cateList').boundingClientRect(function (rect) {
|
||||
// var height = rect.height
|
||||
// console.log('元素高度:',);
|
||||
|
||||
// }).exec();
|
||||
|
||||
|
||||
// } else {
|
||||
// this.getJFList(dictType)
|
||||
// }
|
||||
},
|
||||
|
||||
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.dataList = this.transformData(res.list)
|
||||
// console.log('JF经方', this.dataList)
|
||||
// } else {
|
||||
// this.twoCateList = []
|
||||
// this.dataList = []
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// this.twoCateList = []
|
||||
// this.dataList = []
|
||||
// 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.cateList = res.list
|
||||
this.getTowCateList(this.cateList[0].type)
|
||||
// } else {
|
||||
// this.cateList = []
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// this.cateList = []
|
||||
// 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.currentCateIndex + 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.dataList = []
|
||||
// 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
|
||||
// socket.init();
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
// 放大图片
|
||||
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.currentCateIndex + 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.dataList = []
|
||||
// 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
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.headImage {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
.commonPageBox {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.scroll-Y {
|
||||
.contentBox {
|
||||
.headImage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.scroll-view-item {
|
||||
// height: 300rpx;
|
||||
// line-height: 300rpx;
|
||||
// text-align: center;
|
||||
// font-size: 36rpx;
|
||||
}
|
||||
|
||||
.scroll-view-item_H {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
// height: 300rpx;
|
||||
// line-height: 300rpx;
|
||||
// text-align: center;
|
||||
// font-size: 36rpx;
|
||||
}
|
||||
|
||||
.dataList {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.titleList2 {
|
||||
height: calc(100% - 170rpx);
|
||||
}
|
||||
|
||||
.instructionsForUse {
|
||||
height: calc(100% - 380rpx);
|
||||
padding: 30rpx 30rpx 0;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.detail_title {
|
||||
padding: 0 20rpx !important;
|
||||
}
|
||||
.rich_box {
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
p {
|
||||
display: block;
|
||||
text-indent: 2em;
|
||||
letter-spacing: 2px !important;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cateList {
|
||||
.fixed {
|
||||
border: 3rpx solid #eee;
|
||||
width: 100rpx;
|
||||
line-height: 100rpx;
|
||||
position: fixed;
|
||||
bottom: 10%;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fixed view {
|
||||
width: 100rpx;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.scroll view {
|
||||
// width: 100%;
|
||||
// height: 1000rpx;
|
||||
}.rightButton{
|
||||
font-size: 48rpx;
|
||||
text-align: center;
|
||||
color: #3ab3ae;
|
||||
}
|
||||
.cate_item_box {
|
||||
width: 100%;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
.instructionsForUseBox{
|
||||
height: calc(100%);
|
||||
}
|
||||
</style>
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #3ab3ae; padding: 0 20rpx;
|
||||
.cate_item_border {
|
||||
|
||||
|
||||
|
||||
width: 60rpx;
|
||||
height: 78rpx;
|
||||
// padding: 10rpx;
|
||||
background-size: 100% 100%;
|
||||
// background-image: url("@/static/icon/homePage/cate_bg.png");
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
// height: 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cate_item_name {
|
||||
margin-left: 21rpx;
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
|
||||
font-weight: normal;
|
||||
font-size: 42rpx;
|
||||
color: #000000;
|
||||
// line-height: 46rpx;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user