首页+我的

This commit is contained in:
2024-04-19 10:35:20 +08:00
parent 1bcb13ce7a
commit 8407d51fb6
538 changed files with 934456 additions and 1635 deletions

View File

@@ -0,0 +1,851 @@
<template>
<view class=" ">
<!-- 公共组件-每个页面必须引入 -->
<!-- <public-module></public-module>
<z-nav-bar title="确认订单" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar> -->
<u-popup :show="show" mode="bottom">
<view class="common_address_box">
<z-nav-bar
title="我的收货地址"
bgColor="#f0f0f0"
fontColor="#333"
></z-nav-bar>
<common-list
:dataList="addressList"
@hancleClick="handleClickTab"
label="name"
>
<template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success">{{
slotProps.row.content
}}</text>
<view> </view>
</template>
</common-list>
</view>
</u-popup>
</view>
</template>
<script>
import courseDescription from "@/pages/component/commonComponents/list";
import $http from "@/config/requestConfig.js";
import { mapState } from "vuex";
export default {
components: {
courseDescription, //课程说明
},
data() {
return {
addressData: {
address: "天津市河东区桃园西里2单元222号房",
userName: "张花花",
phone: "18834844849",
},
show: false,
addressList:[
{
name:'111',
}
],
urlList: {
list: "book/userAddress/getUserAddress",
curriculumInfo: "app/phone.do?getCourseInfo",
detailInfo: "app/phoneDoctor.do?getTaiHuClassInfo_new",
},
customButton: [
{
width: "340rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
color: "#fff",
},
],
};
},
onLoad(options) {
this.options = options;
this.getCourseDescriptionData();
// this.getUserInfo()
// this.getCateList()
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
onShow() {
this.selectPayIndex = 0;
},
computed: {
...mapState(["userInfo"]),
},
methods: {
open() {
this.show = true;
},
fnCopy(value, title) {
this.$commonJS.handleMakingPhoneCalls(value, title);
},
gotoPhone() {
this.$commonJS.handleMakingPhoneCalls("022-24142321");
},
goBuyJie() {
// if (this.addressList.length == 0) {
// this.dizhiShow = true // 如果没有地址信息
// }
// if (!this.nowClick) {
// return
// }
this.nowClick = false;
setTimeout(() => {
this.nowClick = true;
}, 5000);
let youPre = {
id: "",
coupons: {
amount: 0,
name: "",
},
};
if (this.youhuiContent.id != undefined) {
youPre = this.youhuiContent;
}
let xiaBiao = [];
for (let i = 0; i < this.cartList.length; i++) {
xiaBiao.push({
productId: this.cartList[i].productId,
quantity: this.cartList[i].productAmount,
});
}
let data = {
buyType: this.typeId, //0- 商品页直接下单 1- 购物车结算
userId: this.userInfo.id, //下单人ID
shippingUser: this.adressMoRen.consigneeName, //收货人姓名
userPhone: this.adressMoRen.consigneePhone, //收货人手机号
// province: this.adressMoRen.areaidpathtext.split(' ')[0], //省
// city: this.adressMoRen.areaidpathtext.split(' ')[1], //市
// district: this.adressMoRen.areaidpathtext.split(' ')[2], //区
//address: this.adressMoRen.useraddress, //地址
paymentMethod: this.payType, //支付方式 2支付宝1微信3ios内购 4天医币购买
orderMoney: this.totalPrice, //订单金额
realMoney: this.realPrice, //实收金额
shippingMoney: this.farePrice, //运费
couponId: youPre.id, //优惠券Id
isSend: this.isSend,
couponName: youPre.coupons.name, //优惠券名称
districtMoney: youPre.coupons.amount, //优惠金额
orderStatus: 0, //订单状态
productList: xiaBiao, //订单列表商品
orderType: "order", //订单类型
addressId: this.adressMoRen.id, // 地址ID
};
$http
.request({
// url: "book/buyOrder/buySave",
url: "book/buyOrder/placeOrder",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data,
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
if (res.orderSn == null) {
uni.showToast({
title: "失败,请重新下单",
icon: "none",
image: "../../static/icon/ic_close.png",
});
} else {
if (this.payType == 2) {
// 常规支付
uni.showToast({
title: "正在支付",
icon: "loading",
});
setPay(
{
typePay: "alipay",
subject: "order",
totalAmount: res.money,
type: 2,
relevanceoid: res.orderSn,
customerId: this.userInfo.id,
},
(res) => {
if (res.success) {
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
uni.switchTab({
url: "./orderList",
});
// uni.navigateTo({
// url: './orderList'
// });
}, 1000);
} else {
uni.showToast({
title: "支付失败",
icon: "none",
image: "../../static/icon/ic_close.png",
});
// setTimeout(() => {
// uni.navigateTo({
// url: './orderList'
// });
// }, 1000)
}
}
);
} else if (this.payType == 1) {
// 微信支付
let data1 = {
orderSn: res.orderSn,
buyOrderId: null,
totalAmount: res.money,
};
setWXPay(data1, (res) => {
if (res.success) {
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
uni.switchTab({
url: "./orderList",
});
}, 1000);
} else {
console.log(res);
if (res.data.errMsg.indexOf("User canceled") != -1) {
uni.showToast({
title: "用户取消支付",
icon: "none",
image: "../../static/icon/ic_close.png",
});
} else {
uni.showToast({
title: "支付失败",
icon: "none",
image: "../../static/icon/ic_close.png",
});
}
}
});
} else if (this.payType == 4) {
// 天医币支付
uni.showToast({
title: "购买成功",
icon: "success",
});
setTimeout(() => {
uni.switchTab({
url: "./orderList",
});
}, 1000);
}
}
}
});
},
radioChange(index) {
this.selectPayIndex = index;
console.log("this.selectPayIndex at line 315:", this.selectPayIndex);
this.$forceUpdate();
},
handleValChange(e) {
console.log("e at line 424:", e);
},
buttonClick(e) {
console.log(e);
this.options[2].info++;
},
hancleModalConfirm() {
var data = {
values: {
customerType: "D",
token: uni.getStorageSync("token"),
customerOid: uni.getStorageSync("customerOid"),
...this.taiHuClassInfo,
},
};
// $mars.progressBegin('申请中...');
// $mars.post(customerType, 'applyRelearn', data, function (ret) {
// api.hideProgress();
// fnLoadDataGrid();
// });
},
fnRelearn(oid, days, courseFee) {
//99和199课程复读一个月60三个月120; 299和399课程复读一个月80三个月180
//499和599课程复读一个月90三个月220; 699和799课程复读一个月100三个月248
var feeAs = [
[60, 120],
[80, 180],
[90, 220],
[100, 248],
];
var fee = 0;
if (courseFee < 206) {
fee = feeAs[0][days == 30 ? 0 : 1];
} else if (courseFee < 406) {
fee = feeAs[1][days == 30 ? 0 : 1];
} else if (courseFee < 606) {
fee = feeAs[2][days == 30 ? 0 : 1];
} else {
fee = feeAs[3][days == 30 ? 0 : 1];
}
this.modalInfo = {
title: "提示信息",
content:
"用户您好,该课程已到期,通过支付" +
fee +
"元,本门课程可获得" +
days +
"天延期学习时间,点击确认即完成自动扣费,感谢配合!",
};
this.taiHuClassInfo = {
taiHuClassOid: oid,
days: days,
fee: fee,
};
this.show = true;
// $aui.alert({
// title: ,
// content: '用户您好,该课程已到期,通过支付' + fee + '元,本门课程可获得' + days + '天延期学习时间,点击确认即完成自动扣费,感谢配合!',
// buttons: ['取消', '确认'],
// radius: 6,
// titleColor: '#ff3300',
// contColor: '#333',
// btnColor: ''
},
//课程详情
async gotoDetail(v) {
console.log(v);
var result = await this.$commonJS.getCheckCourseStatus({
oid: v.courseOid,
});
console.log("result at line 364:", result);
if (result.buyFlg == 0 && v.conditions != "01") {
this.$commonJS.showToast("请先购买课程");
return;
}
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/detail?navTitle=${v.title}&title=${v.title}&oid=${v.courseOid}&conditions=${v.conditions}&detailOid=${v.detailOid}`,
});
},
//相关课程
goCourseDescription(v) {
console.log(v);
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/curriculum/order/curriculum/index?navTitle=${v.title}&title=${v.title}&oid=${v.oid}`,
});
},
async getCourseDescriptionData() {
var data = {};
var that = this;
console.log(this.$store.state, "11111111111");
this.$http
.post(this.urlList.list, {
customerType: "D",
token: uni.getStorageSync("token"),
customerOid: uni.getStorageSync("customerOid"),
oid: this.options.oid,
})
.then(async (res) => {
that.curriculumData = res.obj;
if (
that.curriculumData.productImageList == null ||
that.curriculumData.productImageList == ""
) {
this.swiperList.push(that.curriculumData.explainsImg);
} else {
that.swiperList = that.curriculumData.productImageList.split(",");
// for (var i = 0; i < imgList.length; i++) {
// this.swiperList.push(imgList[i])
// }
}
that.dataList = res.obj.correlatedList;
await that.getDetailInfo();
// that.relatedCoursesList = res.obj.correlatedList
// await that.handleselectCate({ ...this.cateList[0], index: 0 })
// 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, "呼呼");
});
}
},
async handleselectCate(item, index) {
this.dataList = [];
var data = [];
console.log(item, index, 99999);
var that = this;
// curriculumInfo
this.$http
.post(this.urlList.curriculumInfo, {
customerType: "D",
token: uni.getStorageSync("token"),
customerOid: uni.getStorageSync("customerOid"),
oid: item.coid,
})
.then(async (res) => {
that.curriculumInfo = res.obj;
that.dataList = res.obj.courseList;
// socket.init();
});
// this.$nextTick(() => {
// switch (item.type) {
// case 1:
// // allDataList
// this.dataList = that.allDataList.result1Lst
// break;
// case 2:
// this.dataList = that.allDataList.result2Lst
// break;
// case 3:
// this.dataList = that.allDataList.result3Lst
// break;
// case 4:
// this.dataList = that.allDataList.result4Lst.filter(e =>
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
// )
// console.log(this.dataList.length, 6666666)
// break;
// }
// this.currentCateIndex = item.index
// })
console.log(this.allDataList, this.dataList, "1688");
// 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
// }
// this.currentStatusIndex = index
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
return data;
},
async getDetailInfo() {
var that = this;
// curriculumInfo
this.detailInfo = {
content:
"<img src='http://oss.taihumed.com/other/null_20210528102528870.jpg' ></img> <img src='http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170420143333621.png' ></img><p><p>没有中医基础想学中医难不难?中医学者治疗出现瓶颈怎么办?中西医究竟有什么不同呢?吴雄志教授将以全新的视角,完美整合中药学和西医学知识,让你领略当代中医生理学魅力。</p><p><br/><p></p><p><br/></p><p>【思考题】</p><p>1、简述中医的发展这些年出现了哪些变化</p><p>2、简述中西医学科的异同</p>",
};
// this.$http
// .post(this.urlList.detailInfo, {
// customerType
// :
// "D",
// token
// : uni.getStorageSync("token")
// ,
// customerOid
// : uni.getStorageSync("customerOid"),
// classOid: 'f81b558ca4ee406e97c4045c87c2539c'
// })
// .then(async res => {
// that.detailInfo = res.obj
// // that.dataList = res.obj.courseList
// // socket.init();
// });
// this.$nextTick(() => {
// switch (item.type) {
// case 1:
// // allDataList
// this.dataList = that.allDataList.result1Lst
// break;
// case 2:
// this.dataList = that.allDataList.result2Lst
// break;
// case 3:
// this.dataList = that.allDataList.result3Lst
// break;
// case 4:
// this.dataList = that.allDataList.result4Lst.filter(e =>
// e.oid != '5fcf991c027b11e7ae62008cfae40c18' && e.oid != 'b3d8a938b8e147bc877613bb712a9cb3' && e.oid != '4d4730163135420ea962bfac4805e026' && e.oid != '49fb76ca3d6b43718d78c6aa9a3003c2' && e.oid != 'c7b047ed9246469b9ae2b1013fc3df9c'
// )
// console.log(this.dataList.length, 6666666)
// break;
// }
// this.currentCateIndex = item.index
// })
console.log(this.allDataList, this.dataList, "1688");
// 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
// }
// this.currentStatusIndex = index
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').boundingClientRect(function (rect) {
// var height = rect.height
// console.log('元素高度:',);
// }).exec();
// } else {
// this.getJFList(dictType)
// }
return data;
},
async setOneCateIndex(item, index) {
this.allDataList = [];
console.log(index, 99999);
var that = this;
// 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
// }
this.currentStatusIndex = index;
// this.currentCateIndex = 0
this.searchValue = "";
this.searchList = [];
this.showSearchList = false;
this.$nextTick(async () => {
await that.getCourseDescriptionData();
this.$forceUpdate();
});
// this.handleselectCate(this.cateList[this.currentCateIndex])
// if (index != 2) {
// uni.createSelectorQuery().select('.statusList').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.statusList = res.list
// this.getTowCateList(this.statusList[0].type)
// } else {
// this.statusList = []
// }
// }).catch(e => {
// this.statusList = []
// 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.currentStatusIndex + 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>
.common_address_box {
width: 100vw;
height: 100vh;
background-color: #fff;
}
</style>

View File

@@ -0,0 +1,174 @@
<template>
<view style="width: 100%;height: 100%;" class="common_curriculum_list">
<scroll-view scroll-y="true" class="scroll-Y" v-if="dataList.length > 0">
<u-grid :col="col ? col : 1" style="overflow: hidden;justify-content:space-between">
<u-grid-item :class="`scroll-view-item list_item content_item `"
v-for="(item, index) in dataList" :key="item.id" @click="gotoDetail(item)">
<image :src="defaultUrl ? defaultUrl : item[imgUrl]" :mode="imgMode?imgMode:'aspectFil'" class="book_image"></image>
<view :class="['titleItem', 'common_curriculum_item']">
<slot name="leftSlot" :row="item"></slot>
<template v-if="isCondition">
<slot name="labelSlot" :row="item"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<slot name="rightSlot" :row="item"></slot>
</view>
<!-- <image src="@/static/icon/icon_right.png" class="rightArrow" style=""></image> -->
</u-grid-item>
</u-grid>
</scroll-view>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
export default {
props: ['dataList', 'label', 'isCondition', 'imgUrl','imgMode', 'className', 'col', 'defaultUrl', 'isScroll'],
data() {
return {
}
},
onLoad() {
},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(['userInfo']),
},
methods: {
gotoDetail(v) {
this.$emit('hancleClick', v)
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {
},
}
</script>
<style lang="scss" scoped>
.list_item {
width: 100%;
// padding: 20rpx 30rpx;
box-sizing: border-box;
// border-bottom: 1rpx solid #e0e0e0;
position: relative;
justify-content: space-around;
}
.scroll-view-item:nth-child(2n-1) {
// background-color: #f0f0f0 !important;
}
.rightArrow {
width: 30rpx;
height: 30rpx;
position: absolute;
right: 30rpx;
}
.scroll-Y {
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;
}
.titleItem {
width: 100%;
}
.common_curriculum_list {
// width: 100%;
// display: flex;
// overflow: hidden;
// height: auto;
// padding: 24rpx 19rpx 5rpx;
// box-sizing: border-box;
.content_item {
// float: left;
display: inline-block;
width: 49% !important;
margin-bottom: 30rpx;
overflow: hidden;
}
.book_image {
width: 100% !important;
height: 146rpx;
border-radius: 10rpx;
margin-bottom: 10rpx;
// background-color: #919191;
}
.book_name {
font-family: MicrosoftYaHei;
font-weight: 400;
font-size: 23rpx;
color: #000000;
line-height: 23rpx;
text-align: left;
margin-top: 14rpx;
}
.content_item:nth-child(2n) {
// float: right !important;
}
}
.common_curriculum_item {
display: flex !important;
align-items: center;
}
</style>

View File

@@ -0,0 +1,216 @@
<template>
<view class="richDetail">
<!-- 公共组件-每个页面必须引入 -->
<view class="detail_title video_box">
<view v-for="(v,i) in dataList" class="video_item">
视频0{{ i+1 }}
</view>
</view>
<slot name="richHeadImg"></slot>
<!-- <view>{{ detailInfo.content }}</view> -->
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props:['detailInfo','dataList'],
components: {
},
data() {
return {
}
},
onLoad(options) {
},
onHide() {
},
computed: {
...mapState(['userInfo']),
},
methods: {
// 放大图片
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>
.commonPageBox{
padding:40rpx 0;
}
.contentBox{
.headImage{
margin-bottom: 20rpx;
}
.detail_title{
padding:0 40rpx 0;
font-size: 26rpx;
line-height: 65rpx;
font-weight: bold;
text-align: center;
box-sizing:border-box ;
margin-bottom: 20rpx;
overflow: hidden;
}
.rich_box{
padding: 20rpx; box-sizing: border-box;
p{
display: block;text-indent: 2em;
letter-spacing: 2px !important;
line-height: 46rpx;
}
}
}
.richDetail{
width: 100%;
height: 100%;
}
.video_box{
width: 100%;
.video_item{
width: 24%;
margin-right: 1%;
float: left;
background:#018F89;
color: #fff;
text-align: center;
border-radius: 10rpx;
box-shadow: 0px 0px 6rpx 0px rgba(255,255,255,1);
}
.video_item:nth-child(4n){
margin-right: 0;
}
}
</style>

View File

@@ -0,0 +1,240 @@
<template>
<view class="goods_nav">
<!-- 公共组件-每个页面必须引入 -->
<view class="left">
<view v-for="(v,i) in iconList" class="icon_item" v-if="iconList.length>0">
<uni-icons :type="v.icon" size="22" :color="v.infoColor" style="margin:0 auto"></uni-icons>
<view :style="`color:${v.infoColor};`">{{ v.text }}</view>
</view>
<slot name="leftSlot"></slot>
</view>
<view class="right">
<view class="button" v-for="(v,i) in customButton" :style="`backgroundColor:${v.backgroundColor};width:${v.width}`" @click="submit">
{{ v.text }}
</view>
</view>
<!-- <view>{{ detailInfo.content }}</view> -->
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props: ['iconList','customButton'],
components: {
},
data() {
return {
}
},
onLoad(options) {
},
onHide() {
},
computed: {
...mapState(['userInfo']),
},
methods: {
submit(){
this.$emit('submit')
},
showPreview(e) {
console.log('e at line 56:', e)
let conimg = e.target.dataset.nodes;
let imgs = conimg.match(/<img[^>]+>/g);//选择节点中的img
console.log('imgs at line 59:', imgs)
let imgList = [];
//遍历img标签的src里面的内容放在定义的数组imgList中
for (var j = 0; j < imgs.length; j++) {
imgs[j].replace(/<img[^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
imgList.push(capture)
})
}
console.log('imgList.push at line 64:', imgList)
//最后一步就是所有图片放在预览的方法previewImage中就可以了
// uni.previewImage({
// current: imgList,
// urls: imgList,
// })
uni.previewImage({
urls: imgList,
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function (res) {
// console.log(res,'+++++')
}
}
});
},
// 放大图片
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>
.goods_nav {
background-color: #fff;
width: 100%;
padding: 20rpx 20rpx 20rpx 30rpx;
overflow: hidden;
display: flex;
align-items: center;
justify-content: space-between;
.left{
height: 100%;
float: left;
display: flex;
align-items: center;
}
}
.richDetail {
width: 100%;
height: 100%;
}
.button{
float: right;
width: 240rpx;
border-radius: 100rpx;
line-height: 80rpx;
text-align: center;
background: linear-gradient(90deg, rgb(254, 96, 53), rgb(239, 18, 36)); color: rgb(255, 255, 255);
}
.icon_item{
display: flex;
justify-content:center;
flex-direction: column;
}
</style>

View File

@@ -0,0 +1,132 @@
<template>
<view style="width: 100%; height: 100%">
<scroll-view @scrolltolower="lower" scroll-y="true" class="scroll-Y" v-if="dataList.length > 0">
<view
@click="gotoDetail(item)"
class="scroll-view-item list_item"
v-for="(item, index) in dataList"
:key="item.id"
:index="index"
style="align-items: flex-start"
>
<view
:class="['titleItem', '']"
:style="`width:${isNoIcon ? '100%' : 'calc(100% - 30rpx)'}`"
>
<slot name="leftSlot" :row="item" :item="item" :index="index"> </slot>
<template v-if="isCondition">
<slot name="labelSlot" :row="item"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<slot name="rightSlot" :row="item"></slot>
</view>
<image
v-if="!isNoIcon"
src="@/static/icon/icon_right.png"
class="rightArrow"
style=""
></image>
</view>
</scroll-view>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
</template>
<script>
import { mapState } from "vuex";
export default {
props: ["dataList", "label", "isCondition", "isNoIcon","pagination"],
data() {
return {};
},
onLoad() {},
onHide() {
// this.showSearchList = false
// this.searchList = []
},
computed: {
...mapState(["userInfo"]),
},
methods: {
lower(){
this.$emit('lower')
},
gotoDetail(data) {
console.log("index at line 53:", data);
this.$emit("hancleClick", data);
},
},
onBackPress() {
// #ifdef APP-PLUS
plus.key.hideSoftKeybord();
// #endif
},
components: {},
};
</script>
<style lang="scss" scoped>
.list_item {
width: 100%;
padding: 20rpx 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
align-items: center;
justify-content: space-between;
// position: relative;
}
.list_item :last-child(1) {
border-bottom: none;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f0f0f0 !important;
}
.rightArrow {
width: 30rpx;
height: 30rpx;
// position: absolute;
// right: 30rpx;
// top: 20rpx;
}
.scroll-Y {
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;
}
.titleItem {
width: calc(100% - 30rpx);
}
/deep/.scroll-view-item:nth-child(2n-1) {
background-color: transparent !important;
}
.list_item:last-child{
border-bottom: none !important;
}
</style>

View File

@@ -0,0 +1,241 @@
<template>
<view class="richDetail">
<!-- 公共组件-每个页面必须引入 -->
<view class="detail_title" v-if="detailInfo.title">{{ detailInfo.title }}</view>
<slot name="richHeadImg"></slot>
<view class="rich_box" v-if="detailInfo.content">
<rich-text :nodes="detailInfo.content" @click.stop="showPreview"
:data-nodes="detailInfo.content"></rich-text>
</view>
<!-- <view>{{ detailInfo.content }}</view> -->
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props: ['detailInfo',],
components: {
},
data() {
return {
}
},
onLoad(options) {
},
onHide() {
},
computed: {
...mapState(['userInfo']),
},
methods: {
showPreview(e) {
console.log('e at line 56:', e)
let conimg = e.target.dataset.nodes;
let imgs = conimg.match(/<img[^>]+>/g);//选择节点中的img
console.log('imgs at line 59:', imgs)
let imgList = [];
//遍历img标签的src里面的内容放在定义的数组imgList中
for (var j = 0; j < imgs.length; j++) {
imgs[j].replace(/<img[^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
imgList.push(capture)
})
}
console.log('imgList.push at line 64:', imgList)
//最后一步就是所有图片放在预览的方法previewImage中就可以了
// uni.previewImage({
// current: imgList,
// urls: imgList,
// })
uni.previewImage({
urls: imgList,
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function (res) {
// console.log(res,'+++++')
}
}
});
},
// 放大图片
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>
.commonPageBox {
padding: 40rpx 0;
}
.contentBox {
.headImage {
margin-bottom: 20rpx;
}
.detail_title {
padding: 20rpx 40rpx 0;
font-size: 38rpx;
line-height: 64rpx;
font-weight: bold;
text-align: center;
box-sizing: border-box;
margin-bottom: 20rpx;
}
.rich_box {
padding: 20rpx;
box-sizing: border-box;
::v-deep img{
width: 100%;
}
p {
display: block;
text-indent: 2em;
letter-spacing: 2px !important;
line-height: 46rpx;
img {
// margin-left: -2em;
}
}
}
}
.richDetail {
width: 100%;
height: 100%;
}
</style>

View File

@@ -0,0 +1,546 @@
<template>
<!-- <scroll-view class="scroll-view_H cateList" scroll-x="true" scroll-left="0"> -->
<view class="" style="background-color: #fff;">
<u-tabs lineWidth="30" lineColor="#3AB3AE" :activeStyle="{
color: '#3AB3AE',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#606266',
transform: 'scale(1)'
}" :itemStyle="itemStyle" :keyName="label" :list="list"
:is-scroll="false" :current="currentCateIndex" @change="handleselectCate"></u-tabs>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
props:['list','currentCateIndex','label','itemStyle'],
components: {
},
data() {
return {
detailInfo: {},
playData: {},
searchValue: '',
twoCateList: [], // 二级分类标题
dataList: [{}, {}], // 方剂标题
currentCateIndex: 0, // 当前选中的一级分类
curTwoCateIndex: 0, // 当前选中的二级分类
searchList: [], // 搜索结果数组
showSearchList: false,
userMes: {}, // 用户信息
searchDisable: false, // 搜索不可用
limitShow: false,
limitTitle: '提示',
limitContent: '',
scrollViewHeight: 0,
urlList:{
instructionsForUse:'app/phone.do?getMembershipGuide',
},
}
},
onLoad() {
this.getCourseDescriptionData()
// this.getUserInfo()
// this.getCateList()
},
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, {
customerOid
:
"94c043df9daa40278e86e79fbd149c8d",
customerType
:
"D",
token
: uni.getStorageSync("token")
,
oid: 'b07e45f6a5f3491db9854b16f3fd8b19',
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 handleselectCate(e) {
this.$emit('handleselectCate',e)
var that = this
},
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
},
}
</script>
<style lang="scss" scoped>
.headImage {
width: 100%;
height: 300rpx;
// margin-bottom: 20rpx;
}
.scroll-Y {
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;
box-sizing: border-box;
}
.cateList {
width: 100%;
margin-top: 15rpx;
}
.instructionsForUseBox{
height: calc(100%);
}
</style>