feat: 增加详情介绍链接

This commit is contained in:
2026-06-12 13:52:10 +08:00
parent a83e021cd7
commit ccd37e69d5
4 changed files with 49 additions and 4 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径" "src" : "图片路径"
} }
], ],
"versionName" : "2.0.52", "versionName" : "2.0.53",
"versionCode" : 2052, "versionCode" : 2053,
"sassImplementationName" : "node-sass", "sassImplementationName" : "node-sass",
"app-plus" : { "app-plus" : {
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",

View File

@@ -545,6 +545,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/medicaldes/medurl",
"style": {
"navigationBarTitleText": "详细介绍",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/medicaldes/recordDetail", "path": "pages/medicaldes/recordDetail",
"style": { "style": {

View File

@@ -26,11 +26,14 @@
<view class="item" v-html="prescriptDetail.city_name"> <view class="item" v-html="prescriptDetail.city_name">
</view> </view>
</uni-section> </uni-section>
<uni-section class="mb-10" titleFontSize="18px" title="详细介绍" type="line" <uni-section class="mb-10" titleFontSize="18px" title="说明" type="line"
v-if="prescriptDetail.content && prescriptDetail.content != ''"> v-if="prescriptDetail.content && prescriptDetail.content != ''">
<view class="item" v-html="prescriptDetail.content"> <view class="item" v-html="prescriptDetail.content">
</view> </view>
</uni-section> </uni-section>
<div class="detail-link-wrap" v-if="prescriptDetail.url && prescriptDetail.url != ''">
<text class="detail-link" @click="openDetailUrl">详细介绍&gt;&gt;</text>
</div>
<!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line"> <!-- <uni-section class="mb-10" titleFontSize="18px" title="配伍" type="line">
<view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility"> <view class="item" v-if="prescriptDetail.compatibility && prescriptDetail.compatibility != ''" v-html="prescriptDetail.compatibility">
@@ -92,6 +95,11 @@
} }
}); });
}, },
openDetailUrl() {
uni.navigateTo({
url: '/pages/medicaldes/medurl?url=' + encodeURIComponent(this.prescriptDetail.url)
})
},
// 方剂详情 // 方剂详情
getDetail() { getDetail() {
$http.request({ $http.request({
@@ -168,6 +176,18 @@
display: flex; display: flex;
} }
.detail-link-wrap {
padding: 10rpx 20rpx;
padding-bottom: 20rpx;
.detail-link {
font-size: 14px;
font-weight: bold;
color: #007aff;
text-decoration: none;
}
}
/deep/ .uni-section-header__decoration.line { /deep/ .uni-section-header__decoration.line {
background-color: #18bc37; background-color: #18bc37;
} }

View File

@@ -23,7 +23,25 @@
}; };
}, },
onLoad(e) { onLoad(e) {
this.id = uni.getStorageSync('prescriptUrl') this.id = e.url ? decodeURIComponent(e.url) : uni.getStorageSync('prescriptUrl')
// #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
}, },
computed: { computed: {