查缺补漏
This commit is contained in:
@@ -85,8 +85,8 @@
|
||||
"maps" : {},
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "wx47134a8f15083734",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
|
||||
"appid" : "wx6b17b40171dea988",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
@@ -96,8 +96,8 @@
|
||||
"appleiap" : {},
|
||||
"weixin" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appid" : "wx47134a8f15083734",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__9788EB5/"
|
||||
"appid" : "wx6b17b40171dea988",
|
||||
"UniversalLinks" : "https://verification.nuttyreading.com/uni-universallinks/__UNI__C7475A8/"
|
||||
}
|
||||
},
|
||||
"oauth" : {},
|
||||
@@ -113,7 +113,7 @@
|
||||
// "UIBackgroundModes" : [ "audio" ], // 背景播放音乐
|
||||
"capabilities" : {
|
||||
"entitlements" : {
|
||||
"com.apple.developer.associated-domains" : []
|
||||
"com.apple.developer.associated-domains" : [ "applinks:verification.nuttyreading.com" ]
|
||||
}
|
||||
},
|
||||
"idfa" : false,
|
||||
|
||||
@@ -531,6 +531,13 @@
|
||||
"navigationBarTitleText": "webView预览页面",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/medicaldes/xueshuwebView",
|
||||
"style": {
|
||||
"navigationBarTitleText": "学术webView预览页面",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@@ -5,7 +5,12 @@
|
||||
>
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"></z-nav-bar>
|
||||
<!-- <z-nav-bar :title="pageTitle ? pageTitle : '课程详情'"> -->
|
||||
<z-nav-bar title="课程介绍">
|
||||
<view class="curseSet" slot="right" @click="newOnShare">
|
||||
<uni-icons type="redo" size="26"></uni-icons><text style="font-size: 26rpx;"></text> 分享课程</view>
|
||||
|
||||
</z-nav-bar>
|
||||
|
||||
<view class="contentBox commonPageContentBox">
|
||||
<u-alert
|
||||
@@ -458,6 +463,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
|
||||
<uni-popup-share @select="haveSelected"></uni-popup-share>
|
||||
</uni-popup>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -619,7 +628,7 @@ export default {
|
||||
onHide() {
|
||||
this.selectGoodsData = {};
|
||||
this.protocolShow = false;
|
||||
this.handleClickClose();
|
||||
// this.handleClickClose();
|
||||
this.$refs.commonSelectGoods.close();
|
||||
// this.showSearchList = false
|
||||
// this.searchList = []
|
||||
@@ -638,6 +647,47 @@ export default {
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
haveSelected(data) {
|
||||
console.log(data, " 选择的是");
|
||||
if (data.index == 0) {
|
||||
// 分享到好友
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
scene: "WXSceneSession",
|
||||
type: 0,
|
||||
href: this.$apkUrl,
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function (res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log("fail:" + JSON.stringify(err));
|
||||
},
|
||||
});
|
||||
} else if (data.index == 1) {
|
||||
// 分享到朋友圈
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
scene: "WXSceneTimeline",
|
||||
type: 0,
|
||||
href: this.$apkUrl,
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function (res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log("fail:" + JSON.stringify(err));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
newOnShare() {
|
||||
this.$refs.share.open();
|
||||
},
|
||||
goToGoodsList(data) {
|
||||
if (data.delFlag == -1) {
|
||||
this.$commonJS.showToast("商品已下架");
|
||||
@@ -663,18 +713,10 @@ export default {
|
||||
//课程详情
|
||||
async gotoDetail(v, video, index) {
|
||||
console.log("v at line 668:", v);
|
||||
// if (
|
||||
// this.cateList[this.currentCateIndex].isBuy == 1 ||
|
||||
// v.isAudition == 1 ||
|
||||
// this.vip.type != "0"
|
||||
// ) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&videoId=${video.id}`,
|
||||
});
|
||||
// } else {
|
||||
// this.$commonJS.showToast("请先购买课程");
|
||||
// }
|
||||
},
|
||||
handleClickSelectGoods(data) {
|
||||
this.selectGoodsData = data;
|
||||
@@ -2091,6 +2133,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.curseSet{margin-right: 10px;}
|
||||
.shitingLIst {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
this.courseList[index].courseList = this.courseList[index].courseList.concat(_list)
|
||||
this.courseList[index].subpage = res.res.current
|
||||
this.courseList[index].pages = res.res.pages
|
||||
console.log(this.courseList[index].courseList, 'this.courseList[index]')
|
||||
// console.log(this.courseList[index].courseList, 'this.courseList[index]')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -303,6 +303,12 @@
|
||||
// console.log(
|
||||
this.cartList = res.cartList
|
||||
this.isAddLink(val)
|
||||
}).catch( e => {
|
||||
console.log(e,'e')
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -344,6 +350,12 @@
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
}).catch( e => {
|
||||
console.log(e,'e')
|
||||
uni.showToast({
|
||||
title:`加入失败`,
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// 加入购物车
|
||||
@@ -362,6 +374,12 @@
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
}).catch( e => {
|
||||
console.log(e,'e')
|
||||
uni.showToast({
|
||||
title:`加入失败`,
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -381,6 +399,12 @@
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
}).catch( e => {
|
||||
console.log(e,'e')
|
||||
uni.showToast({
|
||||
title:`加入失败`,
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -397,8 +421,8 @@
|
||||
},
|
||||
],
|
||||
|
||||
navTitle: this.options.navTitle,
|
||||
title: this.options.title,
|
||||
navTitle: val.productName,
|
||||
title: val.productName,
|
||||
typeId: 0,
|
||||
}); // 这里转换成 字符串
|
||||
|
||||
@@ -420,12 +444,15 @@
|
||||
this.getMyCourseList()
|
||||
},
|
||||
search(res){
|
||||
console.log('点了搜索')
|
||||
// if (this.curTagId == 0) {
|
||||
// console.log('点了搜索')
|
||||
if(!this.MyCourseList.flag){
|
||||
this.MyCourseList.page = 1
|
||||
this.MyCourseList.list = []
|
||||
this.getMyCourseList()
|
||||
console.log(this.searchValue,'searchValue')
|
||||
}else{
|
||||
console.log('存在未执行完的程序')
|
||||
}
|
||||
},
|
||||
focus(res){
|
||||
this.oldValue = res
|
||||
@@ -502,11 +529,17 @@
|
||||
} else {
|
||||
this.MyCourseList.status = 3 // 暂无数据
|
||||
}
|
||||
console.log('status', this.MyCourseList.status)
|
||||
// console.log('status--------------------', this.MyCourseList.list)
|
||||
}
|
||||
this.MyCourseList.flag = false
|
||||
}).catch(e => {
|
||||
this.MyCourseList.flag = false
|
||||
this.MyCourseList.status = 3
|
||||
console.log(e, '数据报错')
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
getLearningCourseList() {
|
||||
@@ -539,6 +572,11 @@
|
||||
// this.LearningCourseList.flag = false
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
this.LearningCourseList.status = 3 // 暂无数据
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
getExpiredCourseList() {
|
||||
@@ -577,6 +615,11 @@
|
||||
// this.ExpiredCourseList.flag = false
|
||||
}).catch(e => {
|
||||
console.log(e, '数据报错')
|
||||
this.ExpiredCourseList.status = 3
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
})
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
@@ -620,6 +663,10 @@
|
||||
})
|
||||
.catch(e => {
|
||||
console.log('加入在学习', e)
|
||||
uni.showToast({
|
||||
title:'加入失败',
|
||||
icon:'error'
|
||||
})
|
||||
})
|
||||
},
|
||||
delCollection(val, index){
|
||||
|
||||
@@ -69,33 +69,13 @@
|
||||
<!-- 普通未购买 -->
|
||||
<view class="item">
|
||||
<text>您未购买此目录课程或已到期,购买后或开通 <text style="font-weight: bold;">超级VIP</text> 即可学习本目录课程</text> <view class="tag-view">
|
||||
<uni-tag text="购买课程" type="warning" /> <uni-tag style="margin-left: 20rpx;" text="开通VIP" type="success" />
|
||||
<uni-tag @click="goBuy()" text="购买课程" type="warning" style="larg" />
|
||||
<uni-tag @click="onPageJump('/pages/mine/vip/index')" style="margin-left: 20rpx;" text="开通VIP" type="success" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="item tbn flexbox">
|
||||
<view class="saveBtn buybtn flexbox" @click="goBuy('halfFee')">
|
||||
<u-icon name="bag" color="#fff" size="28"></u-icon>
|
||||
<text>立即购买</text>
|
||||
</view>
|
||||
<view class="saveBtn vipBtn flexbox" @click="goBuy('halfFee')">
|
||||
<uni-icons type="vip" size="28" color="#fff"></uni-icons>
|
||||
<text>开通超级VIP</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<u-divider v-else text="暂无数据"></u-divider>
|
||||
<!-- <view class="">
|
||||
<view class="" v-for="(item, index) in librayList" :key="index">
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<uni-section class="mb-10 completionBg" title="学习进度" type="line" v-if="librayList.length > 0 && librayList[curIndex].completion > 0">
|
||||
<view class="progress-box">
|
||||
<progress :percent="librayList[curIndex].completion" show-info stroke-width="3" />
|
||||
@@ -109,6 +89,8 @@
|
||||
<!-- 评论弹出 -->
|
||||
<public-module></public-module>
|
||||
<z-navigation></z-navigation>
|
||||
<buy-pup v-if="pricespop" :proPriceList="proPriceList" @closePup="closePup" @oprate="oprate"></buy-pup>
|
||||
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -116,6 +98,7 @@
|
||||
|
||||
<script>
|
||||
// import musicPlay from '@/components/music.vue'
|
||||
import buyPup from '@/components/buyPup.vue'
|
||||
import emojiList1 from '../../bkhumor-emojiplus/emoji/biaoqin.js'
|
||||
import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue';
|
||||
import $http from '@/config/requestConfig.js';
|
||||
@@ -226,10 +209,12 @@
|
||||
components: {
|
||||
// musicPlay
|
||||
emotion,
|
||||
buyPup
|
||||
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
|
||||
getUserInfo() {
|
||||
// 用户详情
|
||||
// if (this.userInfo.id != undefined) {
|
||||
@@ -242,18 +227,10 @@
|
||||
},
|
||||
gotoDetail(v, video, index) {
|
||||
console.log("v at line 668:", v);
|
||||
// if (
|
||||
// this.cateList[this.currentCateIndex].isBuy == 1 ||
|
||||
// v.isAudition == 1 ||
|
||||
// this.vip.type != "0"
|
||||
// ) {
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&videoId=${video.id}`,
|
||||
});
|
||||
// } else {
|
||||
// this.$commonJS.showToast("请先购买课程");
|
||||
// }
|
||||
},
|
||||
// 加载更多子评论
|
||||
showMoreChildren(i,val){
|
||||
@@ -507,18 +484,18 @@
|
||||
this.loadFlag = false
|
||||
})
|
||||
},
|
||||
previewImage(url) {
|
||||
console.log(url)
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
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,'+++++')
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
deletePic(val, i) {
|
||||
console.log('删除图片');
|
||||
this.uploadPicLIst.splice(i, 1)
|
||||
@@ -669,7 +646,7 @@
|
||||
url: "sociology/product/getProductListForCourse",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"id": this.curId
|
||||
"id": this.librayList[this.curIndex].id
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
@@ -679,22 +656,154 @@
|
||||
if (res.code == 0) {
|
||||
if (res.productList.length > 0) {
|
||||
this.proPriceList = res.productList
|
||||
this.curProId = this.proPriceList[0].productId
|
||||
// this.curProId = this.proPriceList[0].productId
|
||||
this.pricespop = true
|
||||
} else {
|
||||
this.proPriceList = []
|
||||
uni.showToast({
|
||||
title: '课程未绑定商品',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e, '获取商品列表报错')
|
||||
uni.showToast({
|
||||
title: '获取商品失败',
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
|
||||
this.pricespop = true
|
||||
|
||||
},
|
||||
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 += 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,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
closePup() {
|
||||
this.pricespop = false
|
||||
this.proPriceList = []
|
||||
},
|
||||
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}`,
|
||||
});
|
||||
},
|
||||
choosePrice(item) {
|
||||
console.log(item, 'choosePrice')
|
||||
this.curProId = item.productId
|
||||
|
||||
@@ -124,16 +124,19 @@
|
||||
}
|
||||
} else if(this.page > 1){
|
||||
this.status = 2 // 加载完成
|
||||
|
||||
}else{
|
||||
|
||||
this.status = 3 // 暂无数据
|
||||
}
|
||||
console.log('status',this.status)
|
||||
}
|
||||
this.flag = true
|
||||
}).catch(e => {
|
||||
this.status = 3
|
||||
console.log(e,'数据报错')
|
||||
uni.showToast({
|
||||
title:`获取数据失败`,
|
||||
icon:'error'
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -205,10 +205,17 @@
|
||||
console.log('this.curOneCateIndex', this.curOneCateIndex)
|
||||
console.log('this.curTwoCateIndex', this.curTwoCateIndex)
|
||||
if (this.curOneCateIndex == 0) {
|
||||
if(item.contentType == 2){
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshuwebView?id=' + item.id
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||
url: './xueshugongxianDetail?id=' + item.id
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
if (this.curOneCateIndex == 1) {
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</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>
|
||||
@@ -47,24 +46,6 @@ export default {
|
||||
},
|
||||
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();
|
||||
|
||||
178
pages/medicaldes/xueshuwebView.vue
Normal file
178
pages/medicaldes/xueshuwebView.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar :title="prescriptDetail.title"></z-nav-bar>
|
||||
<view class="fullscreen-webview">
|
||||
<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>
|
||||
@@ -254,34 +254,6 @@
|
||||
<view> </view>
|
||||
</template>
|
||||
</common-list>
|
||||
|
||||
<!-- <view class="nav_list" @click="onPageJump('../clock/clockList')">
|
||||
<text>我的打卡</text>
|
||||
</view> -->
|
||||
<!-- <view class="nav_list" @click="onPageJump('../listen/home')" v-if="iosHide">
|
||||
<text>我的听书</text>
|
||||
</view> -->
|
||||
<!-- 暂时去掉 -->
|
||||
<!-- <view class="nav_list" @click="onPageJump('../listen/setListen')" v-if="iosHide">
|
||||
<text>听书设置</text>
|
||||
</view> -->
|
||||
<!-- <view class="nav_list" @click="onPageJump('../peanut/myComments')">
|
||||
<text>我的评价</text>
|
||||
</view> -->
|
||||
|
||||
<!-- 暂时去掉 -->
|
||||
|
||||
<!-- <view v-if="showEbook" class="nav_list" @click="onPageJump('../eBook/bookBuy')">
|
||||
<text>电子书购买记录</text>
|
||||
</view> -->
|
||||
<!-- <view v-if="showEbook" class="nav_list" @click="onPageJump('../eBook/bookRecord')">
|
||||
<text>阅读记录</text>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="nav_list" @click="onGoing()">
|
||||
<text>帮助与反馈11111</text>
|
||||
</view> -->
|
||||
<!-- <view class="nav_list" @click="newOnShare" v-if="isAndorid"> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -341,6 +313,7 @@
|
||||
<!-- <u-modal :show="infoShow" title="提示信息" :content=""></u-modal> -->
|
||||
<music-play :playData="playData"></music-play>
|
||||
<z-navigation></z-navigation>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -397,10 +370,10 @@ export default {
|
||||
type: "pageJump",
|
||||
},
|
||||
|
||||
// {
|
||||
// name: "分享APP",
|
||||
// type: "share",
|
||||
// },
|
||||
{
|
||||
name: "分享APP",
|
||||
type: "share",
|
||||
},
|
||||
|
||||
{
|
||||
name: "关于我们",
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<rich-text v-if="news.content" class="content"
|
||||
:nodes="formatRichText(news.content)"></rich-text>
|
||||
</view>
|
||||
<web-view v-if="urlVisible" :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -60,15 +60,14 @@
|
||||
onShow() {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
if(this.type == 1 && this.surl != ''){
|
||||
// this.surl = this.newsObj.url
|
||||
this.urlVisible = true
|
||||
this.news = {}
|
||||
}else{
|
||||
// if(this.type == 1 && this.surl != ''){
|
||||
// // this.surl = this.newsObj.url
|
||||
// this.urlVisible = true
|
||||
// this.news = {}
|
||||
// }else{
|
||||
this.getData();
|
||||
this.urlVisible = false
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="新闻详情"></z-nav-bar>
|
||||
<web-view :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
<web-view v-if="urlVisible" :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
<!-- <music-play :playData="playData"></music-play> -->
|
||||
</view>
|
||||
</template>
|
||||
@@ -30,16 +30,20 @@
|
||||
type:null,
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: '#FF3333'
|
||||
color: '#55aaff'
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.newsId = e.newsId
|
||||
this.type = e.type
|
||||
this.surl = e.url
|
||||
this.source = e.source
|
||||
console.log(e, '------')
|
||||
// #ifdef APP-PLUS
|
||||
const pages = getCurrentPages()
|
||||
@@ -71,9 +75,6 @@
|
||||
// this.surl = this.newsObj.url
|
||||
this.urlVisible = true
|
||||
this.news = {}
|
||||
}else{
|
||||
this.getData();
|
||||
this.urlVisible = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -521,15 +521,15 @@
|
||||
},
|
||||
newsClick(item) {
|
||||
console.log('item', item)
|
||||
// if(item.type == 1){
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/news/newsForwebview?newsId=${item.id}&url=${item.url}&type=${item.type}`
|
||||
// })
|
||||
// }else{
|
||||
if(item.type == 1 && item.url != ''){
|
||||
uni.navigateTo({
|
||||
url: `/pages/news/newsForwebview?newsId=${item.id}&url=${item.url}&type=${item.type}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}`
|
||||
})
|
||||
// }
|
||||
}
|
||||
// }
|
||||
},
|
||||
openURL(url) {
|
||||
|
||||
@@ -493,9 +493,9 @@ export default {
|
||||
scene: "WXSceneSession",
|
||||
type: 0,
|
||||
href: this.$apkUrl,
|
||||
title: "疯子读书",
|
||||
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/fengziIcon.jpg",
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function (res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
@@ -510,9 +510,9 @@ export default {
|
||||
scene: "WXSceneTimeline",
|
||||
type: 0,
|
||||
href: this.$apkUrl,
|
||||
title: "疯子读书",
|
||||
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/fengziIcon.jpg",
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function (res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
|
||||
@@ -169,10 +169,17 @@
|
||||
});
|
||||
},
|
||||
newsClick(item) {
|
||||
console.log(454545)
|
||||
// console.log(454545,item)
|
||||
if(item.type == 1 && item.url != ''){
|
||||
uni.navigateTo({
|
||||
url: `/pages/news/newsForwebview?newsId=${item.id}&url=${item.url}&type=${item.type}`
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: `/pages/news/news?newsId=${item.id}&url=${item.url}&type=${item.type}&source='taihuzhiguang'`
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
getProData() {
|
||||
if (!this.pObj.pFlag) {
|
||||
|
||||
@@ -656,7 +656,7 @@
|
||||
href: this.$apkUrl,
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/fengziIcon.jpg",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function(res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
@@ -673,7 +673,7 @@
|
||||
href: this.$apkUrl,
|
||||
title: "吴门医述",
|
||||
summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!",
|
||||
imageUrl: "static/fengziIcon.jpg",
|
||||
imageUrl: "static/icon/home_icon_logo.png",
|
||||
success: function(res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
|
||||
@@ -40,25 +40,25 @@
|
||||
data() {
|
||||
return {
|
||||
bottomData: [{
|
||||
text: '微信',
|
||||
text: '微信消息',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
|
||||
name: 'wx'
|
||||
},
|
||||
{
|
||||
text: '支付宝',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
|
||||
text: '朋友圈',
|
||||
icon: 'http://ehh-public-01.oss-cn-beijing.aliyuncs.com/image/20240626131115.png',
|
||||
name: 'wx'
|
||||
},
|
||||
{
|
||||
text: 'QQ',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
|
||||
name: 'qq'
|
||||
},
|
||||
{
|
||||
text: '新浪',
|
||||
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
|
||||
name: 'sina'
|
||||
},
|
||||
// {
|
||||
// text: 'QQ',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
|
||||
// name: 'qq'
|
||||
// },
|
||||
// {
|
||||
// text: '新浪',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
|
||||
// name: 'sina'
|
||||
// },
|
||||
// {
|
||||
// text: '百度',
|
||||
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user