1.14提交

This commit is contained in:
zoujiandong 2026-01-14 17:41:42 +08:00
parent 56c645a75c
commit 00d0ec8a9b
32 changed files with 3068 additions and 1296 deletions

View File

@ -447,10 +447,10 @@ const api = {
return request('/expertAPI/consultListHis', data, 'post', false);
},
listNewInterrogation(data){
return request('/expertAPI/listNewInterrogation', data, 'post', false);
return request('/expertAPI/listNewInterrogation', data, 'post', true);
},
listMyAnsweredInterrogation(data){
return request('/expertAPI/listMyAnsweredInterrogation', data, 'post', false);
return request('/expertAPI/listMyAnsweredInterrogation', data, 'post', true);
},
getInterrogation(data){
return request('/expertAPI/getInterrogation', data, 'post', false);
@ -459,10 +459,10 @@ const api = {
return request('/expertAPI/InterrogationPatientInfo', data, 'post', false);
},
updateInterrogationAnswer(data){
return request('/expertAPI/updateInterrogationAnswerU', data, 'post', false);
return request('/expertAPI/updateInterrogationAnswerU', data, 'post', true);
},
addInterrogationAnswer(data){
return request('/expertAPI/addInterrogationAnswerU', data, 'post', false);
return request('/expertAPI/addInterrogationAnswerU', data, 'post', true);
},
videoDetail(data){
return request('/expertAPI/videoDetail', data, 'post', false);
@ -665,12 +665,29 @@ const api = {
return request('/expertAPI/downloadGanDanFileV2', data, 'post', false);
},
feedBack(data){
return request('/expert/feedBack', data, 'post', false);
return request('/expertAPI/addFeedBack', data, 'post', false);
},
getPointUnitPrice(data){
return request('/expertApp/getPointUnitPrice', data, 'post', false);
return request('/expertAPI/getPointUnitPrice', data, 'post', false);
},
welfareList(data){
return request('/expertAPI/welfareList', data, 'post', false);
},
getUGoods(data){
return request('/expertApp/getUGoods', data, 'post', false);
},
getUGoods(data){
return request('/expertAPI/getGoodsDetailU', data, 'post', false);
},
createGoodsOrder(data){
return request('/expertAPI/createGoodsOrder', data, 'post', false);
},
useWelfareNum(data){
return request('/expertAPI/useWelfareNum', data, 'post', false);
},
createBointsOrder(data){
return request('/expertPay/createBointsOrder', data, 'post', false);
},
}

View File

@ -2,8 +2,8 @@
"name" : "肝胆相照专家版",
"appid" : "__UNI__89F511F",
"description" : "",
"versionName" : "4.1.9",
"versionCode" :419,
"versionName" : "4.2.0",
"versionCode" : 420,
"transformPx" : false,
"app-plus" : {
/* 5+App */
@ -58,12 +58,17 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 21
"minSdkVersion" : 21,
"targetSdkVersion" :30
},
"ios" : {
"dSYMs" : false,
"idfa" : false,
"urlschemewhitelist" : [ "weixin", "wechat" ]
"urlschemewhitelist" : [ "weixin", "wechat" ],
"permission" : {
"NSPhotoLibraryUsageDescription" : "需要访问相册以选择图片",
"NSCameraUsageDescription" : "需要访问相机以拍照"
}
},
/* ios */
"sdkConfigs" : {

View File

@ -9,7 +9,16 @@
}
},
"pages": [
// {
// "path": "pages/upload/upload",
// "style": {
// "navigationBarTitleText": "",
// "navigationStyle": "custom",
// "app": {
// "bounce": "none"
// }
// }
// },
{
"path": "pages/loading/loading",
"style": {
@ -20,6 +29,7 @@
}
}
},
{
"path": "pages/index/index",
"style": {
@ -489,6 +499,16 @@
}
}
},
{
"path": "myCode/myCode",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "buyPoint/buyPoint",
"style": {
@ -499,6 +519,16 @@
}
}
},
{
"path": "myWelfare/welfareDetail",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "myWelfare/myWelfare",
"style": {
@ -509,6 +539,26 @@
}
}
},
{
"path": "buyUpan/buyUpan",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "buyUpan/address",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "myWelfareCard/myWelfareCard",
"style": {
@ -519,6 +569,16 @@
}
}
},
{
"path": "myWelfareCard/exchange",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "uni-app分页",
"app": {
"bounce": "none"
}
}
},
{
"path": "myPoint/myPoint",
"style": {
@ -931,16 +991,7 @@
// }
// }
// },
// {
// "path": "myCode/myCode",
// "style": {
// "navigationStyle": "custom",
// "navigationBarTitleText": "uni-app分页",
// "app": {
// "bounce": "none"
// }
// }
// },
// {
// "path": "myDownLoad/myDownLoad",

119
pages/upload/upload.vue Normal file
View File

@ -0,0 +1,119 @@
<template>
<view class="content">
<view class="img-grid">
<view
v-if="tempImageList.length>0"
v-for="(img, index) in tempImageList"
:key="index"
class="img-item"
@click="preview(index)"
>
<image :src="img" mode="aspectFill" class="img" />
<view class="del" @click.stop="remove(index)">×</view>
</view>
<view v-if="tempImageList.length < maxImages" class="img-item add" @click="beforeAddImages">
<view class="plus"></view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { pathToBase64} from "image-tools";
import { getCameraPermission } from "@/utils/permission.js";
import isAndroid from "@/utils/platform.js";
const uuid=ref('');
const answer_uuid=ref('');
const maxImages = 6;
const imgList = ref([]);
const isLock=ref(false);
const tempImageList = ref([]);
const beforeAddImages=()=>{
addImages();
};
const addImages=()=>{
console.log('执行选择图片')
uni.chooseImage({
count:6,
sizeType: ['original', 'compressed'],
sourceType: ['album','camera'],
success: (res)=>{
uni.showToast({
title: '选择图片成功',
icon: 'none'
})
//console.log(res.tempFilePaths)
// tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
// for (let i = 0; i < res.tempFilePaths.length; i++) {
// pathToBase64(res.tempFilePaths[i])
// .then((base64) => {
// console.log('base64')
// imgList.value.push(base64.split(',')[1]);
// })
// .catch((error) => {
// console.log('base64')
// console.error(error);
// });
// }
// console.log(tempImageList.value)
// console.log(imgList.value)
},
fail: (err)=>{
console.log(err)
uni.showToast({
title: '选择图片失败:'+err.errMsg,
icon: 'none'
})
//console.log(':'+err.errMsg)
}
})
}
function preview(index){
uni.previewImage({
urls:tempImageList.value,
current: index
})
}
</script>
<style>
.content{
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.img-grid{
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16rpx;
}
.img-item{
position: relative;
width:150rpx;
height: 150rpx;
border-radius: 12rpx;
overflow: hidden;
background: #f0f0f0;
}
.img{ width: 100%; height: 100%; }
.add{ display:flex; align-items:center; justify-content:center;}
.plus{ font-size: 80rpx; color:#c0c0c0; line-height: 1; }
.del{
position: absolute;
top: 8rpx;
right: 8rpx;
width: 44rpx;
height: 44rpx;
border-radius: 22rpx;
background: rgba(0,0,0,.5);
color: #fff;
text-align: center;
line-height: 44rpx;
font-size: 28rpx;
}
</style>

View File

@ -68,6 +68,19 @@
};
const freeConfirm = () => {
freeVisible.value = false;
api.createBointsOrder({
point: selectedPackageData.value.points
}).then(res => {
if(res.code==200){
uni.sendNativeEvent('payPonitPage', {
msg: {
"price":res.data.amount,
"order_id":res.data.order_id,
'jifen':res.data.point,
},
});
}
});
};
onLoad(() => {
getPointUnitPrice();
@ -85,7 +98,7 @@
const getPointUnitPrice = () => {
api.getPointUnitPrice().then(res => {
if(res.code==200){
pointUnitPrice.value=Number(res.PointUnitPrice);
pointUnitPrice.value=Number(res.data);
console.log(pointUnitPrice.value);
packages.value.forEach(pkg => {
pkg.price = pkg.points * pointUnitPrice.value / 100;

View File

@ -0,0 +1,268 @@
<template>
<view class="address-page">
<navBar :title="'收货地址'" />
<!-- <uni-nav-bar left-icon="left" title="收货地址" fixed color="#8B2316" height="180rpx" :border="false" backgroundColor="#ffffff" @clickLeft="goBack" /> -->
<scroll-view scroll-y class="content">
<view class="form-item">
<view class="label">收件人</view>
<input class="input" v-model="receiver" placeholder="请输入收货人名字" />
</view>
<view class="divider-line"></view>
<view class="form-item">
<view class="label">手机号</view>
<input class="input" v-model="mobile" type="number" placeholder="收货人的电话,方便联系" />
</view>
<view class="divider-line"></view>
<!-- <view class="form-item">
<view class="label">邮箱</view>
<input class="input" v-model="email" type="text" placeholder="用于接收电子卡等信息(可选)" />
</view> -->
<view class="divider-line"></view>
<view class="form-item select-item" @click="openAreaPicker">
<view class="label">地址</view>
<view class="input placeholder" v-if="!regionText">请选择地址</view>
<view class="input" v-else>{{ regionText }}</view>
<text class="arrow"></text>
</view>
<view class="divider-line"></view>
<view class="form-item">
<view class="label">详细地址</view>
<input class="input" v-model="detail" placeholder="请输入街道、门牌等详细地址信息" />
</view>
</scroll-view>
<view class="footer-bar" @click="submit">
<view class="confirm-btn" >确定兑换</view>
</view>
<!-- 省市区选择器 -->
<view v-if="showAreaPicker" class="picker-mask" @click="closeAreaPicker"></view>
<view v-if="showAreaPicker" class="picker-panel">
<view class="picker-header">
<text class="picker-btn" @click="closeAreaPicker">取消</text>
<text class="picker-title">选择地区</text>
<text class="picker-btn ok" @click="confirmArea">确定</text>
</view>
<picker-view v-if="provinces.length && cities.length && areas.length" class="picker-view" :indicator-style="indicatorStyle" :value="pickerIndex" @change="onAreaChange">
<picker-view-column>
<view v-for="(p,pi) in provinces" :key="pi" class="picker-item">{{ p.name }}</view>
</picker-view-column>
<picker-view-column>
<view v-for="(c,ci) in cities" :key="ci" class="picker-item">{{ c.name }}</view>
</picker-view-column>
<picker-view-column>
<view v-for="(a,ai) in areas" :key="ai" class="picker-item">{{ a.name }}</view>
</picker-view-column>
</picker-view>
<view v-else class="picker-empty">地区数据加载中...</view>
</view>
</view>
<unidialog
:title="'确认收货信息'"
:visible="freeVisible"
:content="freeContent"
@close="freeClose"
@confirm="freeConfirm"
>
<template #content>
<view>
<view class="row">
<view class="left">收件人:</view>
<view class="right">{{ receiver }}</view>
</view>
<view class="row">
<view class="left">手机号:</view>
<view class="right">{{ mobile }}</view>
</view>
<view class="row">
<view class="left">地址:</view>
<view class="right">{{ regionText+detail }}</view>
</view>
<view class="row">
<view class="left">兑换积分:</view>
<view class="right"><text class="price">0积分</text>(包邮)</view>
</view>
<view class="row">请确认此次兑换物品不退不换</view>
</view>
</template>
</unidialog>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import areaList from '@/utils/areaList.js'
import api from '@/api/api.js'
import unidialog from '@/components/dialog/dialog.vue';
const freeVisible = ref(false)
const freeContent = ref('')
const goods_order_id = ref('')
const freeClose = () => {
freeVisible.value = false
}
const freeConfirm = () => {
freeVisible.value = false;
api.useWelfareNum({
other_uuid: goods_order_id.value,
type: 5
}).then(res => {
if(res.code == 1 || res.code == 200){
uni.sendNativeEvent('goTabbarPage', {
msg: 'mine'
},ret => {
console.log(ret);
})
}
})
}
const receiver = ref('')
const mobile = ref('')
const regionText = ref('')
const detail = ref('')
const email = ref('')
const editingId = ref(null)
const goodsUuid = ref('')
const goodsNum = ref(0)
const goBack = () => uni.navigateBack()
// [{code,label,value,children:[...] }...]
const provinces = ref([])
const cities = ref([])
const areas = ref([])
const pickerIndex = ref([0,0,0])
const showAreaPicker = ref(false)
const indicatorStyle = `height: 80rpx;`
const normalizeNode = (node) => ({
code: node?.code || '',
name: node?.label || node?.value || node?.name || '',
children: Array.isArray(node?.children) ? node.children : []
})
const getAreaTree = () => {
const raw = areaList && (areaList.default || areaList)
return Array.isArray(raw) ? raw.map(normalizeNode) : []
}
const buildData = () => {
const tree = getAreaTree()
provinces.value = tree.length ? tree : [{ code: '', name: '', children: [] }]
const pIdx = Math.min(pickerIndex.value[0], Math.max(provinces.value.length - 1, 0))
const pNode = provinces.value[pIdx]
cities.value = (pNode?.children || []).map(normalizeNode)
if (!cities.value.length) cities.value = [{ code: '', name: '', children: [] }]
const cIdx = Math.min(pickerIndex.value[1], Math.max(cities.value.length - 1, 0))
const cNode = cities.value[cIdx]
areas.value = (cNode?.children || []).map(normalizeNode)
if (!areas.value.length) areas.value = [{ code: '', name: '' }]
}
const openAreaPicker = () => {
showAreaPicker.value = true
pickerIndex.value = [0,0,0]
buildData()
}
const closeAreaPicker = () => { showAreaPicker.value = false }
const onAreaChange = (e) => {
const val = (e && e.detail && e.detail.value) ? e.detail.value : [0,0,0]
const [pi, ci, ai] = val
if (pi !== pickerIndex.value[0]) {
pickerIndex.value = [pi, 0, 0]
buildData()
return
}
if (ci !== pickerIndex.value[1]) {
pickerIndex.value = [pi, ci, 0]
buildData()
return
}
pickerIndex.value = [pi, ci, ai]
}
const confirmArea = () => {
const p = provinces.value[pickerIndex.value[0]]
const c = cities.value[pickerIndex.value[1]]
const a = areas.value[pickerIndex.value[2]]
regionText.value = [p?.name, c?.name, a?.name].filter(Boolean).join(' ')
closeAreaPicker()
}
onLoad((opts) => {
console.log(22);
console.log(opts);
goodsUuid.value = opts.goodsUuid
goodsNum.value = opts.goodsNum
})
const submit = () => {
if (!receiver.value) return uni.showToast({ title: '请输入收件人', icon: 'none' })
if (!/^1\d{10}$/.test(mobile.value)) return uni.showToast({ title: '请输入正确手机号', icon: 'none' })
if (!regionText.value) return uni.showToast({ title: '请选择地址', icon: 'none' })
if (!detail.value) return uni.showToast({ title: '请输入详细地址', icon: 'none' })
api.createGoodsOrder({
goodsUuid: goodsUuid.value,
goodsNum: goodsNum.value,
user_name: receiver.value,
mobile: mobile.value,
email:'',
address: regionText.value+detail.value
}).then(res => {
if(res.code == 1 || res.code == 200){
freeVisible.value = true
goods_order_id.value = res.data.goods_order_id
}
})
}
</script>
<style scoped lang="scss">
.address-page { min-height: 100vh; background: #fff; }
.content { position: absolute; top: calc(var(--status-bar-height) + 44px); bottom: 120rpx; left: 0; right: 0; background: #fff; }
.form-item { display: flex; align-items: center; padding: 24rpx; }
.label { width: 160rpx; color: #333; font-size: 30rpx; }
.input { flex: 1; color: #333; font-size: 30rpx; }
.placeholder { color: #bbb; }
.divider-line { height: 2rpx; background: #eee; margin: 0 24rpx; }
.select-item { position: relative; }
.arrow { position: absolute; right: 24rpx; color: #999; font-size: 48rpx; }
.footer-bar { position: fixed; left: 0; right: 0; bottom: 0; height: 120rpx; background: #27c5b8; display: flex; align-items: center; justify-content: center; }
.confirm-btn { color: #fff; font-size: 34rpx; font-weight: 700; }
/* 地区选择器 */
.picker-mask { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0,0,0,0.4); }
.picker-panel { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; }
.picker-header { display: flex; align-items: center; justify-content: space-between; padding: 20rpx 24rpx; border-bottom: 1rpx solid #eee; }
.picker-title { font-size: 30rpx; color: #333; }
.picker-btn { color: #666; font-size: 28rpx; }
.picker-btn.ok { color: #38c1b1; }
.picker-view { height: 480rpx; }
.picker-item { height: 80rpx; line-height: 80rpx; text-align: center; color: #333; }
.picker-empty { padding: 40rpx; text-align: center; color: #999; }
.row{
display: flex;
align-items: center;
font-size: 28rpx;
padding: 12rpx 0;
max-width: 800rpx;
margin-left: -100rpx;
.left{
text-align: left;
max-width: 125rpx;
}
.price{
color: #FF4D4F;
}
}
.left{
width: 160rpx;
}
</style>

View File

@ -0,0 +1,291 @@
<template>
<navBar :title="'U盘在线兑换'" />
<view class="buy-upan-page">
<!-- 主要内容区域 -->
<view class="main-content">
<!-- 商品信息卡片 -->
<view class="product-card">
<!-- 商品描述 -->
<view class="product-title">超实用~肝胆相照知识U盘(2026年版)</view>
<!-- 兑换信息 -->
<view class="exchange-info">
<text class="info-left">免费兑换剩余{{ remainingCount }}</text>
<text class="info-right">已兑换{{ exchangedCount }}</text>
</view>
</view>
<!-- 兑换数量选择器 -->
<view class="quantity-section">
<text class="quantity-label">兑换数量</text>
<view class="quantity-selector">
<view
class="quantity-btn minus-btn"
:class="{ disabled: quantity <= 1 }"
@click="decreaseQuantity"
>
<text class="btn-text"></text>
</view>
<view class="quantity-display">
<text class="quantity-value">{{ quantity }}</text>
</view>
<view
class="quantity-btn plus-btn"
:class="{ disabled: quantity >= remainingCount }"
@click="increaseQuantity"
>
<text class="btn-text">+</text>
</view>
</view>
</view>
</view>
<!-- 底部兑换按钮 -->
<view class="bottom-actions">
<view class="exchange-btn" @click="handleExchange">
<text class="btn-text">我要兑换</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import navBar from '@/components/navBar/navBar.vue';
import api from '@/api/api';
import navTo from '@/utils/navTo';
const goodsUuid = ref('');
//
const remainingCount = ref(2); //
const exchangedCount = ref(1129); //
const quantity = ref(1); //
const goodsInfo = ref({});
//
const increaseQuantity = () => {
if (quantity.value < remainingCount.value) {
quantity.value += 1;
}
};
//
const decreaseQuantity = () => {
if (quantity.value > 1) {
quantity.value -= 1;
}
};
//
const handleExchange = () => {
if (quantity.value <= 0) {
uni.showToast({
title: '请选择兑换数量',
icon: 'none'
});
return;
}
if (quantity.value > remainingCount.value) {
uni.showToast({
title: '兑换数量不能超过剩余数量',
icon: 'none'
});
return;
}
// TODO:
navTo({
url:'/pages_app/buyUpan/address?goodsUuid='+goodsUuid.value+'&goodsNum='+quantity.value
})
};
// U
const getUpanWelfareCount = () => {
api.getUGoods().then(res => {
console.log(res);
if (res.code == 1 || res.code == 200) {
//
console.log(33);
console.log(res.data);
if (res.data) {
//remainingCount.value = res.data.remainingCount;
exchangedCount.value = res.data.times;
goodsUuid.value = res.data.uuid;
}
}
}).catch(err => {
console.error('获取U盘福利数量失败:', err);
});
};
onLoad((options) => {
remainingCount.value = options.restNum;
//
getUpanWelfareCount();
});
</script>
<style scoped lang="scss">
//
$bg-color: #ffffff;
$text-primary: #333333;
$text-secondary: #666666;
$text-light: #999999;
$border-color: #e5e5e5;
$white: #ffffff;
$teal-color: #00cbc0;
$light-teal: #e6f7f6;
$page-bg: #f5f6f7;
//
@mixin flex-center {
display: flex;
align-items: center;
justify-content: center;
}
@mixin flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.buy-upan-page {
overflow: hidden;
background-color: $page-bg;
margin-top: calc(var(--status-bar-height) + 44px);
//
}
.main-content {
padding: 40rpx 30rpx;
}
//
.product-card {
background-color: $white;
border-radius: 16rpx;
padding: 40rpx 30rpx;
margin-bottom: 40rpx;
.product-title {
font-size: 32rpx;
color: $text-primary;
font-weight: 500;
margin-bottom: 30rpx;
line-height: 1.5;
}
.exchange-info {
@include flex-between;
font-size: 28rpx;
.info-left {
color: $text-secondary;
}
.info-right {
color: $text-secondary;
}
}
}
//
.quantity-section {
background-color: $white;
border-radius: 16rpx;
padding: 40rpx 30rpx;
.quantity-label {
font-size: 32rpx;
color: $text-primary;
margin-bottom: 30rpx;
display: block;
}
.quantity-selector {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 20rpx;
.quantity-btn {
width: 60rpx;
height: 60rpx;
border: 2rpx solid $teal-color;
border-radius: 8rpx;
@include flex-center;
background-color: $white;
cursor: pointer;
transition: all 0.3s ease;
.btn-text {
font-size: 36rpx;
color: $teal-color;
font-weight: 500;
line-height: 1;
}
&.disabled {
opacity: 0.5;
border-color: $border-color;
cursor: not-allowed;
.btn-text {
color: $text-light;
}
}
&:not(.disabled):active {
background-color: $light-teal;
}
}
.quantity-display {
min-width: 120rpx;
height: 80rpx;
background-color: $teal-color;
border-radius: 8rpx;
@include flex-center;
margin: 0 10rpx;
.quantity-value {
font-size: 40rpx;
color: $white;
font-weight: 500;
}
}
}
}
//
.bottom-actions {
position: fixed;
bottom: 0;
left: 0;
right: 0;
.exchange-btn {
background-color: $teal-color;
height: 88rpx;
@include flex-center;
cursor: pointer;
transition: all 0.3s ease;
&:active {
opacity: 0.8;
}
.btn-text {
color: $white;
font-size: 32rpx;
font-weight: 500;
}
}
}
</style>

View File

@ -57,7 +57,7 @@
<script setup>
import { ref, computed } from 'vue'
import { onShow,onBackPress } from '@dcloudio/uni-app'
import { onShow,onBackPress,onLoad } from '@dcloudio/uni-app'
import navBar from '@/components/navBar/navBar.vue'
import empty from '@/components/empty/empty.vue'
import api from '@/api/api.js'
@ -284,7 +284,7 @@ const listMyAnsweredInterrogation=async(isRefresh=false)=>{
isRefreshing.value = false
}
};
onShow(()=>{
onLoad(()=>{
page.value = 1
hasMore.value = true;
listNew.value = [];
@ -432,7 +432,7 @@ function onReachBottom(){
display: flex;
justify-content: space-around;
align-items: center;
height: 56px;
height: 48px;
padding: 0 16px;
position: fixed;
top: calc(var(--status-bar-height) + 44px);
@ -470,7 +470,7 @@ function onReachBottom(){
.list-scroll {
flex: 1;
position: fixed;
top: calc(var(--status-bar-height) + 44px + 56px);
top: calc(var(--status-bar-height) + 44px + 48px);
bottom:56px;
margin: 20rpx rpx 0;
box-sizing: border-box;

View File

@ -53,9 +53,10 @@
:src="docUrl + img"
class="grid-image"
mode="aspectFill"
@click="previewImage(docUrl + img, index)"
@click="previewImageInfo(questionInfo.images,docUrl + img, index)"
/>
</view>
<view
class="lookmore"
v-if="
@ -90,6 +91,17 @@
</text>
</view>
<!-- 图片网格 -->
<view class="image-grid" v-if="item.imgs">
<image
v-for="(img, index) in item.imgs.split(',')"
:key="index"
:src="docUrl + img"
class="grid-image"
mode="aspectFill"
@click="previewImageSupplement(item.imgs,docUrl + img, index)"
/>
</view>
</view>
<!-- 补充信息查看更多 / 收起 -->
@ -144,8 +156,8 @@
<view class="namebox">
<view class="namecontet">
<view class="doctor-name">{{ item.realname }}</view>
<view class="bar"></view>
<view class="doctor-hospital" style="margin-left: 0rpx;color:#999">{{ item.name }}</view>
<view class="bar" v-if="item.realname!='账号已注销'"></view>
<view class="doctor-hospital" v-if="item.realname!='账号已注销'" style="margin-left: 0rpx;color:#999">{{ item.name }}</view>
</view>
</view>
@ -331,6 +343,8 @@ const displaySupplementList = computed(() => {
questionInfo.value.SupplementList.length === 0
) {
return [];
}else if(!questionInfo.value.SupplementList || questionInfo.value.SupplementList.length == 1){
return questionInfo.value.SupplementList;
}
return supplementShowAll.value
? questionInfo.value.SupplementList
@ -355,11 +369,96 @@ function goBack() {
//
function previewImage(current, index) {
uni.previewImage({
urls: questionInfo.value.images
let urls=questionInfo.value.images
? questionInfo.value.images.split(",").map((path) => docUrl + path)
: [],
: [];
uni.previewImage({
showmenu:true,
urls:urls,
current: index,
longPressActions: {
itemList:['保存图片'],
success:()=>{
uni.closePreviewImage();
uni.saveImageToPhotosAlbum({
filePath: urls[index],
success:()=>{
uni.showToast({
title: '图片保存成功',
icon: 'none'
})
},
fail:(err)=>{
uni.showToast({
title: '图片保存失败:'+err.errMsg,
icon: 'none'
})
}
})
},
},
});
}
const previewImageSupplement = (imgsStr,current, index) => {
let urls=imgsStr.split(",").map((path) => docUrl + path);
uni.previewImage({
showmenu:true,
urls: urls,
current: index,
longPressActions: {
itemList:['保存图片'],
success:()=>{
uni.closePreviewImage();
uni.saveImageToPhotosAlbum({
filePath: urls[index],
success:()=>{
uni.showToast({
title: '图片保存成功',
icon: 'none'
})
},
fail:(err)=>{
uni.showToast({
title: '图片保存失败:'+err.errMsg,
icon: 'none'
})
}
})
},
},
});
}
const previewImageInfo = (imgsStr,current, index) => {
let urls=imgsStr.split(",").map((path) => docUrl + path);
uni.previewImage({
showmenu:true,
urls: urls,
current: index,
longPressActions: {
itemList:['保存图片'],
success:()=>{
uni.closePreviewImage();
uni.saveImageToPhotosAlbum({
filePath: urls[index],
success:()=>{
uni.showToast({
title: '图片保存成功',
icon: 'none'
})
},
fail:(err)=>{
uni.showToast({
title: '图片保存失败:'+err.errMsg,
icon: 'none'
})
}
})
},
},
});
}
@ -370,8 +469,31 @@ function previewReplyImages(item, index) {
}
const urls = item.imgs.split(",").map((path) => docUrl + path);
uni.previewImage({
showmenu:true,
urls,
current: index,
longPressActions: {
itemList:['保存图片'],
success:()=>{
uni.closePreviewImage();
uni.saveImageToPhotosAlbum({
filePath: urls[index],
success:()=>{
uni.showToast({
title: '图片保存成功',
icon: 'none'
})
},
fail:(err)=>{
uni.showToast({
title: '图片保存失败:'+err.errMsg,
icon: 'none'
})
}
})
},
},
});
}
@ -507,6 +629,7 @@ function editQuestion() {
top: calc(var(--status-bar-height) + 44px);
width: auto;
box-sizing: border-box;
width: 100%;
padding: 30rpx 0;
bottom: 313rpx;
}
@ -663,9 +786,13 @@ function editQuestion() {
flex: 1;
.doctor-name {
font-size: 32rpx;
color: #333;
font-size: 34rpx;
color: #8B2316;
font-weight: 500;
max-width: 203rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hospital-time-row {
@ -726,7 +853,7 @@ function editQuestion() {
}
.disclaimer {
background-color: #fff5f5;
background-color: #f6f6f6;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 24rpx;
@ -754,4 +881,10 @@ function editQuestion() {
font-weight: 500;
border-radius: 16rpx;
}
.doctor-cell{
border-bottom: 12rpx solid #efefef;
}
.doctor-cell:last-child{
border-bottom: none;
}
</style>

View File

@ -272,7 +272,7 @@ const goDetail=(item)=>{
const encoded = encodeURIComponent(item.path);
let imgPath=encodeURIComponent('https://doc.igandan.com/app/html/img/2016/20160714132557.png');
uni.navigateTo({
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live_yugao&imgPath=${imgPath}&share=1&title=会议详情`
url: `/pages_app/webview/webview?url=${encoded}&sharetitle=${item.title}&bg=1&type=live_old&imgPath=${imgPath}&share=1&title=会议详情`
});
}
</script>

View File

@ -1,314 +1,469 @@
<template>
<view class="my-answer-page">
<navBar title="我的意见" />
<view class="my-answer-page">
<navBar title="我的意见" />
<scroll-view scroll-y class="content-scroll">
<!-- 文本输入 -->
<view class="card">
<view class="card-title">我的意见 <text class="required">*</text></view>
<view class="textarea-wrap">
<textarea
v-model="note"
class="textarea"
:maxlength="300"
placeholder="请依据患者的个人信息、疾病资料及患者所咨询的问题详细解答患者的问题信息仅提问患者及医生可见最多输入300个字"
placeholder-class="ph"
auto-height
/>
</view>
</view>
<scroll-view scroll-y class="content-scroll">
<!-- 文本输入 -->
<view class="card">
<view class="card-title">我的意见 <text class="required">*</text></view>
<view class="textarea-wrap">
<textarea
v-model="note"
class="textarea"
:maxlength="300"
placeholder="请依据患者的个人信息、疾病资料及患者所咨询的问题详细解答患者的问题信息仅提问患者及医生可见最多输入300个字"
placeholder-class="ph"
auto-height
/>
</view>
</view>
<!-- 图片上传 -->
<view class="card">
<view class="card-title">相关图片</view>
<view class="sub-tip">可以用部分科普或文献来协助回答问题最多6张</view>
<view class="img-grid">
<view
v-if="tempImageList.length>0"
v-for="(img, index) in tempImageList"
:key="index"
class="img-item"
@click="preview(index)"
>
<image :src="img" mode="aspectFill" class="img" />
<view class="del" @click.stop="remove(index)">×</view>
</view>
<view v-if="tempImageList.length < maxImages" class="img-item add" @click="addImages">
<view class="plus"></view>
</view>
</view>
</view>
</scroll-view>
<!-- 底部提交 -->
<view class="bottom-fixed">
<view class="submit-btn" @click="submit">提交</view>
</view>
</view>
<!-- 图片上传 -->
<view class="card">
<view class="card-title">相关图片</view>
<view class="sub-tip">可以用部分科普或文献来协助回答问题最多6张</view>
<!-- <view class="imgbox">
<uni-file-picker limit="6" v-model="tempImageList" file-mediatype="image" :auto-upload="false" @select="selectImages" @delete="deleteImages" ></uni-file-picker>
</view> -->
<view class="img-grid">
<view
v-if="tempImageList.length > 0"
v-for="(img, index) in tempImageList"
:key="index"
class="img-item"
@click="preview(index)"
>
<image :src="img" mode="aspectFill" class="img" />
<view class="del" @click.stop="remove(index)">×</view>
</view>
<view
v-if="tempImageList.length < maxImages"
class="img-item add"
@click="beforeAddImages"
>
<view class="plus"></view>
</view>
</view>
</view>
</scroll-view>
<!-- <button style="position: fixed;bottom: 200rpx;left: 50%;transform: translateX(-50%);z-index: 99999999999;" @click="test" >测试</button> -->
<!-- 底部提交 -->
<view class="bottom-fixed">
<view class="submit-btn" @click="submit">提交</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import navBar from '@/components/navBar/navBar.vue'
import api from '@/api/api'
import docUrl from '@/utils/docUrl'
import { onLoad,onShow } from '@dcloudio/uni-app'
import { pathToBase64} from "image-tools";
const uuid=ref('');
const answer_uuid=ref('');
import { ref } from "vue";
import navBar from "@/components/navBar/navBar.vue";
import api from "@/api/api";
import docUrl from "@/utils/docUrl";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { pathToBase64 } from "image-tools";
import { getCameraPermission } from "@/utils/permission.js";
import isAndroid from "@/utils/platform.js";
const uuid = ref("");
const answer_uuid = ref("");
const maxImages = 6;
const imgList = ref([]);
const isLock = ref(false);
const tempImageList = ref([]);
const note = ref('');
const note = ref("");
onLoad((options) => {
uuid.value = options.uuid || ''
answer_uuid.value = options.answer_uuid || ''
getInterrogation()
})
const getInterrogation=()=>{
api.getInterrogation({
uuid:uuid.value
}).then(res=>{
console.log(res)
if(res.code === '200' && res.data) {
let user=uni.getStorageSync('userInfo');
let arr=res.data.AnswerList.filter(item=>{
return user.uuid == item.expert_uuid
})
imgList.value=[];
if(arr && arr.length>0){
note.value= arr[0].note || '';
let imgs= arr[0].imgs?arr[0].imgs.split(','):[];
tempImageList.value= imgs.map(item=>docUrl+item);
for (let i = 0; i < imgs.length; i++) {
uni.request({
url: docUrl + imgs[i],
method: "GET",
responseType: "arraybuffer",
success: (res) => {
const base64 = `${uni.arrayBufferToBase64(res.data)}`;
imgList.value.push(base64);
},
fail: (err) => {
reject(err);
},
});
}
}
}
})
}
const updateInterrogationAnswer=()=>{
if(note.value.trim().length<5){
uni.showToast({title: '输入意见至少5个字', icon: 'none'})
return
}
let imgobj={};
if(imgList.value.length>0){
let count=0;
imgList.value.forEach((item,index)=>{
imgobj['img'+(index+1)]=item;
})
}
api.updateInterrogationAnswer({
uuid: answer_uuid.value,
note:note.value,
imgsBean: imgobj
}).then(res=>{
if(res.code == 200){
uni.showToast({title: '提交成功', icon: 'none'});
uni.$emit('updateStatus',1)
uni.navigateBack()
}
})
}
const addInterrogationAnswer=()=>{
if(note.value.trim().length<5){
uni.showToast({title: '输入意见至少5个字', icon: 'none'})
return
}
let imgobj={};
if(imgList.value.length>0){
imgList.value.forEach((item,index)=>{
imgobj['img'+(index+1)]=item;
})
}
api.addInterrogationAnswer({
step1_uuid:uuid.value,
note: note.value,
imgsBean: imgobj
}).then(res=>{
if(res.code == 200){
uni.$emit('updateStatus',1)
uni.showToast({title: '提交成功', icon: 'none'})
uni.navigateBack()
}
uuid.value = options.uuid || "";
answer_uuid.value = options.answer_uuid || "";
getInterrogation();
});
const beforeAddImages = () => {
if (isAndroid) {
getCameraPermission(addImages);
} else {
addImages();
}
};
const getInterrogation = () => {
api
.getInterrogation({
uuid: uuid.value,
})
}
function addImages(){
const remain = maxImages - imgList.value.length
if(remain <= 0){
uni.showToast({title: '最多6张', icon: 'none'})
return
}
uni.chooseImage({
count: remain,
sizeType: ['compressed'],
sourceType: ['album','camera'],
success: (res)=>{
console.log(res.tempFilePaths)
tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
for (let i = 0; i < res.tempFilePaths.length; i++) {
pathToBase64(res.tempFilePaths[i])
.then((base64) => {
imgList.value.push(base64.split(',')[1]);
})
.catch((error) => {
console.error(error);
.then((res) => {
console.log(res);
if (res.code === "200" && res.data) {
let user = uni.getStorageSync("userInfo");
let arr = res.data.AnswerList.filter((item) => {
return user.uuid == item.expert_uuid;
});
imgList.value = [];
if (arr && arr.length > 0) {
note.value = arr[0].note || "";
let imgs = arr[0].imgs ? arr[0].imgs.split(",") : [];
tempImageList.value = imgs.map((item, index) => {
return {
name: "图片" + index + 1,
url: docUrl + item,
};
});
tempImageList.value = imgs.map((item) => docUrl + item);
for (let i = 0; i < imgs.length; i++) {
uni.request({
url: docUrl + imgs[i],
method: "GET",
responseType: "arraybuffer",
success: (res) => {
const base64 = `${uni.arrayBufferToBase64(res.data)}`;
imgList.value.push(base64);
},
fail: (err) => {
reject(err);
},
});
}
}
}
console.log(tempImageList.value)
console.log(imgList.value)
}
})
});
};
const updateInterrogationAnswer = () => {
if (note.value.trim().length < 5) {
uni.showToast({ title: "输入意见至少5个字", icon: "none" });
return;
}
if (isLock.value) {
return;
}
isLock.value = true;
let imgobj = {};
if (imgList.value.length > 0) {
let count = 0;
imgList.value.forEach((item, index) => {
imgobj["img" + (index + 1)] = item;
});
}
api
.updateInterrogationAnswer({
uuid: answer_uuid.value,
note: note.value,
imgsBean: imgobj,
})
.then((res) => {
isLock.value = false;
if (res.code == 200) {
uni.showToast({ title: "提交成功", icon: "none" });
uni.$emit("updateStatus", 1);
uni.navigateBack();
}
});
};
const test = () => {
uni.navigateTo({
url: "/pages/upload/upload",
});
};
const addInterrogationAnswer = () => {
if (note.value.trim().length < 5) {
uni.showToast({ title: "输入意见至少5个字", icon: "none" });
return;
}
if (isLock.value) {
return;
}
isLock.value = true;
let imgobj = {};
if (imgList.value.length > 0) {
imgList.value.forEach((item, index) => {
imgobj["img" + (index + 1)] = item;
});
}
api
.addInterrogationAnswer({
step1_uuid: uuid.value,
note: note.value,
imgsBean: imgobj,
})
.then((res) => {
isLock.value = false;
if (res.code == 200) {
uni.$emit("updateStatus", 1);
uni.showToast({ title: "提交成功", icon: "none" });
uni.navigateBack();
}
});
};
const selectImages = (e) => {
let tempFilePaths = e.tempFiles;
console.log(e);
tempImageList.value = [...tempImageList.value, ...tempFilePaths];
for (let i = 0; i < tempFilePaths.length; i++) {
pathToBase64(tempFilePaths[i].url)
.then((base64) => {
console.log("转base64成功");
imgList.value.push(base64.split(",")[1]);
})
.catch((error) => {
console.log("转base64成功");
console.error(error);
});
}
console.log(tempImageList.value);
console.log(imgList.value);
};
const addImages = () => {
const remain = maxImages - imgList.value.length;
if (remain <= 0) {
uni.showToast({ title: "最多6张", icon: "none" });
return;
}
console.log("执行选择图片");
console.log('isAndroid:'+isAndroid)
if (isAndroid) {
uni.chooseImage({
count: remain,
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success: (res) => {
console.log("获取到照片");
console.log(res.tempFilePaths);
tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
for (let i = 0; i < res.tempFilePaths.length; i++) {
uni.saveFile({
tempFilePath: res.tempFilePaths[i],
success: (res1) => {
pathToBase64(res1.savedFilePath)
.then((base64) => {
console.log("转base64成功");
imgList.value.push(base64.split(",")[1]);
})
.catch((error) => {
console.log("转base64失败");
console.error(error);
});
}
})
}
},
});
} else {
uni.chooseImage({
count: remain,
sourceType: ["album", "camera"],
crop: {
width: 375,
height: 500,
resize: true,
quality:100,
},
success: (res) => {
console.log("获取到照片");
console.log(res.tempFilePaths);
tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
for (let i = 0; i < res.tempFilePaths.length; i++) {
uni.getImageInfo({
src: res.tempFilePaths[i],
success: (result) => {
console.log(result);
if (result.width > 1000) {
uni.compressImage({
quality:100,
src: res.tempFilePaths[i],
success: (result2) => {
console.log("压缩成功");
console.log(result2.tempFilePath);
pathToBase64(result2.tempFilePath)
.then((base64) => {
console.log("转base64成功");
imgList.value.push(base64.split(",")[1]);
})
.catch((error) => {
console.log("转base64失败");
console.error(error);
});
},
fail: (err) => {
console.log("压缩失败:" + err.errMsg);
},
});
} else {
pathToBase64(res.tempFilePaths[i])
.then((base64) => {
console.log("转base64成功");
imgList.value.push(base64.split(",")[1]);
})
.catch((error) => {
console.log("转base64失败");
console.error(error);
});
}
},
});
}
},
fail: (err) => {
console.log("获取图片信息失败:");
console.error(err.errMsg);
},
});
}
};
function preview(index) {
uni.previewImage({
urls: tempImageList.value,
current: index,
});
}
function preview(index){
uni.previewImage({
urls:tempImageList.value,
current: index
})
function remove(index) {
imgList.value.splice(index, 1);
tempImageList.value.splice(index, 1);
}
const deleteImages = (e) => {
let index = e.index;
imgList.value.splice(index, 1);
tempImageList.value.splice(index, 1);
};
function remove(index){
imgList.value.splice(index, 1)
tempImageList.value.splice(index, 1)
}
function submit(){
if(answer_uuid.value){
updateInterrogationAnswer()
}else{
addInterrogationAnswer()
}
function submit() {
if (answer_uuid.value) {
updateInterrogationAnswer();
} else {
addInterrogationAnswer();
}
}
</script>
<style lang="scss" scoped>
.my-answer-page{
background-color: #fff;
height: 100vh;
display: flex;
flex-direction: column;
.my-answer-page {
background-color: #fff;
height: 100vh;
display: flex;
flex-direction: column;
}
.content-scroll{
flex: 1;
position: fixed;
top: calc(var(--status-bar-height) + 44px);
left: 0;
right: 0;
bottom: 160rpx;
padding: 24rpx 24rpx 0;
box-sizing: border-box;
.content-scroll {
flex: 1;
position: fixed;
top: calc(var(--status-bar-height) + 44px);
left: 0;
right: 0;
bottom: 160rpx;
padding: 24rpx 24rpx 0;
box-sizing: border-box;
}
.card{
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 24rpx;
.card {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 24rpx;
}
.card-title{
font-size: 32rpx;
color: #8B2316;
font-weight: 500;
margin-bottom: 16rpx;
.card-title {
font-size: 32rpx;
color: #8b2316;
font-weight: 500;
margin-bottom: 16rpx;
}
.required{ color: #ff4d4f; }
.textarea-wrap{
position: relative;
background: #f7f7f7;
border-radius: 12rpx;
padding: 16rpx 88rpx 16rpx 16rpx;
}
.textarea{
min-height: 180rpx;
width: 100%;
font-size: 28rpx;
color: #333;
}
.ph{ color:#999; }
.voice-btn{
position: absolute;
right: 16rpx;
bottom: 16rpx;
width: 64rpx;
height: 64rpx;
border-radius: 32rpx;
background: #b90f0f;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
.required {
color: #ff4d4f;
}
.sub-tip{
font-size: 26rpx;
color: #999;
margin-bottom: 16rpx;
.textarea-wrap {
position: relative;
background: #f7f7f7;
border-radius: 12rpx;
padding: 16rpx 16rpx 16rpx 16rpx;
}
.textarea {
min-height: 180rpx;
width: 100%;
font-size: 28rpx;
color: #333;
}
.ph {
color: #999;
}
.voice-btn {
position: absolute;
right: 16rpx;
bottom: 16rpx;
width: 64rpx;
height: 64rpx;
border-radius: 32rpx;
background: #b90f0f;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.img-grid{
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16rpx;
}
.img-item{
position: relative;
width:150rpx;
height: 150rpx;
border-radius: 12rpx;
overflow: hidden;
background: #f0f0f0;
}
.img{ width: 100%; height: 100%; }
.add{ display:flex; align-items:center; justify-content:center; }
.plus{ font-size: 80rpx; color:#c0c0c0; line-height: 1; }
.del{
position: absolute;
top: 8rpx;
right: 8rpx;
width: 44rpx;
height: 44rpx;
border-radius: 22rpx;
background: rgba(0,0,0,.5);
color: #fff;
text-align: center;
line-height: 44rpx;
font-size: 28rpx;
.sub-tip {
font-size: 26rpx;
color: #999;
margin-bottom: 16rpx;
}
.bottom-fixed{
position: fixed;
left: 0; right: 0; bottom: 0;
background: #fff;
padding: 24rpx;
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,.06);
.img-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16rpx;
}
.submit-btn{
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #3cc7c0;
color: #fff;
font-size: 32rpx;
border-radius: 16rpx;
.img-item {
position: relative;
width: 150rpx;
height: 150rpx;
border-radius: 12rpx;
overflow: hidden;
background: #f0f0f0;
}
.img {
width: 100%;
height: 100%;
}
.add {
display: flex;
align-items: center;
justify-content: center;
}
.plus {
font-size: 80rpx;
color: #c0c0c0;
line-height: 1;
}
.del {
position: absolute;
top: 8rpx;
right: 8rpx;
width: 44rpx;
height: 44rpx;
border-radius: 22rpx;
background: rgba(0, 0, 0, 0.5);
color: #fff;
text-align: center;
line-height: 44rpx;
font-size: 28rpx;
}
.bottom-fixed {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #fff;
padding: 24rpx;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.06);
}
.submit-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #3cc7c0;
color: #fff;
font-size: 32rpx;
border-radius: 16rpx;
}
</style>

View File

@ -226,7 +226,8 @@ const onSave = () => {
}
}
.page-scroll {
height: calc(100vh - 100rpx);
margin-top: calc(var(--status-bar-height) + 44px);
height: calc(100vh - var(--status-bar-height) - 44px);
padding-bottom: 140rpx;
}

View File

@ -169,6 +169,13 @@
<script setup>
import { ref, onMounted } from "vue";
import api from "@/api/api.js";
import docUrl from '@/utils/docUrl.js';
import {onBackPress} from '@dcloudio/uni-app';
onBackPress(() => {
plus.runtime.quit();
return true;
});
import navTo from "@/utils/navTo.js";
import nosigninImg from "@/static/sign_day_false.png"
import signinImg from "@/static/sign_day_true.png"
import myjifen_big from "@/static/myjifen_big.png"
@ -217,21 +224,14 @@ const refresherTriggered = ref(false);
//
const goBack = () => {
uni.navigateBack({
fail() {
uni.redirectTo({
url: "/pages/index/index",
});
},
});
plus.runtime.quit();
};
const showRules = () => {
uni.showToast({
title: "积分规则",
icon: "none",
});
};
navTo({
url: '/pages_app/webview/webview?url='+encodeURIComponent(docUrl+'integral/integral_doctor.html')+'&title=积分规则'
})
};
const switchTab = (tab) => {
activeTab.value = tab;
@ -293,7 +293,7 @@ const goToBuyPoints = () => {
const goToPointsMall = () => {
uni.navigateTo({
url: "/pages_goods/pointMall/pointMall",
url: "/pages_goods/pointMall/pointMall?from=myPoint",
});
};

View File

@ -1,16 +1,24 @@
<template>
<!-- <uni-nav-bar
left-icon="left"
title="我的福利"
@clickLeft="goBack"
fixed
color="#8B2316"
height="180rpx"
:border="false"
backgroundColor="#eeeeee"
></uni-nav-bar> -->
<navBar :title="'我的福利'" />
<view class="navbox">
<view class="status_bar"></view>
<uni-nav-bar
left-icon="left"
:title="'我的福利'"
@clickLeft="goBack"
color="#8B2316"
:border="false"
backgroundColor="#eeeeee"
>
<template v-slot:right>
<view class="nav-right" @click="goRules" >
规则
</view>
</template>
</uni-nav-bar>
</view>
<view class="benefits-page">
@ -48,17 +56,23 @@
<scroll-view class="benefits-list" scroll-y="true" :show-scrollbar="false">
<view
class="benefit-card"
v-for="(benefit, index) in benefitsList"
:key="index"
:class="[benefit.type, { 'disabled': !benefit.flag }]"
:class="fotmatType(benefit.name)"
@click="claimBenefit(benefit)"
>
<view class="card-title">{{ benefit.title }}</view>
<!-- <view class="card-bg">
</view> -->
<view class="card-content">
<view class="card-content" >
<image :src="jifenBgImg" mode="widthFix" class="card-img" v-if="benefit.name == 'jifen'"></image>
<image :src="videoImg" mode="widthFix" class="card-img" v-if="benefit.name == 'video'"></image>
<image :src="kejianImg" mode="widthFix" class="card-img" v-if="benefit.name == 'kejian'"></image>
<image :src="upanImg" mode="widthFix" class="card-img" v-if="benefit.name == 'upan'"></image>
<image :src="wanfangImg" mode="widthFix" class="card-img" v-if="benefit.name == 'wanfang'"></image>
<image :src="wenxianImg" mode="widthFix" class="card-img" v-if="benefit.name == 'daicha'"></image>
<view class="card-details">
<view class="left-section">
<text class="condition">{{ benefit.left_tip }}</text>
@ -69,6 +83,7 @@
<text class="reward-value">{{ benefit.right_result }}</text>
</view>
</view>
<view class="panbox" v-if="benefit.name == 'upan'">知识U盘</view>
</view>
</view>
@ -78,20 +93,50 @@
<!-- 底部导航栏 -->
<view class="bottom-nav">
<view class="nav-item" @click="goPointsDetail">
<!-- <up-image :src="jifenImg" width="34rpx" height="34rpx" ></up-image> -->
<text class="nav-text">兑换福利卡</text>
<up-image :src="jifenImg" width="34rpx" height="34rpx" ></up-image>
<text class="nav-text">积分详情</text>
</view>
<view class="nav-item" @click="gofuliDetail">
<up-image :src="fuliImg" width="34rpx" height="34rpx" ></up-image>
<text class="nav-text">福利详情</text>
</view>
<view class="nav-item" @click="goAddPatient">
<up-image :src="addImg" width="34rpx" height="34rpx" ></up-image>
<text class="nav-text">添加患者</text>
</view>
</view>
</view>
<unidialog :visible="showDialog" :content="content" @close="showDialog=false" :showCancel="false" @confirm="confirmDialog"></unidialog>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import jifenImg from "@/static/duihuan.png"
import {onShow,onBackPress} from '@dcloudio/uni-app';
import docUrl from '@/utils/docUrl.js';
onBackPress(() => {
plus.runtime.quit();
return true;
});
//import jifenImg from "@/static/duihuan.png"
import api from '@/api/api';
import unidialog from '@/components/dialog/dialog.vue'
import navTo from "@/utils/navTo.js";
import navBar from '@/components/navBar/navBar.vue'
import fuliImg from "@/static/fulidetail.png"
import jifenImg from "@/static/jifendetail.png"
import addImg from "@/static/tianjiapatient.png"
import jifenBgImg from "@/static/fljifen_big.png"
import videoImg from "@/static/flshipin_big.png"
import kejianImg from "@/static/flkejian_big.png"
import upanImg from "@/static/flupan_big2.png"
import wanfangImg from "@/static/flwanfang_big.png"
import wenxianImg from "@/static/flwen_big.png"
const showDialog = ref(false);
const content = ref('肝胆相照平台协助查找文献次数已经用完,谢谢您的支持!');
const confirmDialog = () => {
showDialog.value = false;
}
//
const activeTab = ref(0);
@ -141,13 +186,7 @@
//
const goBack = () => {
uni.navigateBack({
fail() {
uni.redirectTo({
url: '/pages/index/index'
});
}
});
plus.runtime.quit();
};
const showRules = () => {
@ -156,7 +195,21 @@
icon: 'none'
});
};
const fotmatType = (name) => {
if(name == 'video'){
return 'video';
}else if(name == 'kejian'){
return 'kejian';
}else if(name == 'upan'){
return 'upan';
}else if(name == 'wanfang'){
return 'wanfang';
}else if(name=='jifen'){
return 'jifen';
}else if(name=='daicha'){
return 'wenxian';
}
}
const switchTab = (index) => {
activeTab.value = index;
@ -172,42 +225,62 @@
};
const claimBenefit = (benefit) => {
if (!benefit.flag) {
uni.showToast({
title: `${benefit.num}个新随访`,
icon: 'none'
});
return;
console.log(benefit);
console.log(activeTab.value);
if(activeTab.value == 1){
if(benefit.name == 'jifen'){
navTo({
url: '/pages_goods/pointMall/pointMall'
});
}else if(benefit.name == 'video'){
navTo({
url: '/pages_app/video/video'
});
}else if(benefit.name == 'kejian'){
navTo({
url: '/pages_app/ppt/ppt'
});
}else if(benefit.name == 'upan'){
navTo({
url: '/pages_app/buyUpan/buyUpan?restNum='+benefit.num
});
}else if(benefit.name == 'wanfang'){
navTo({
url: '/pages_app/zhinan/zhinan'
});
}else if(benefit.name == 'daicha'){
if(benefit.num == 0){
showDialog.value = true;
}else{
}
}
}
uni.showToast({
title: `领取${benefit.title}`,
icon: 'none'
});
};
const goPointsDetail = () => {
uni.showToast({
title: '积分详情',
icon: 'none'
});
navTo({
url: '/pages_app/myPoint/myPoint'
})
};
const goBenefitDetail = () => {
uni.showToast({
title: '福利详情',
icon: 'none'
});
const gofuliDetail = () => {
navTo({
url: '/pages_app/myPoint/myPoint'
})
};
const addPatient = () => {
uni.showToast({
title: '添加患者',
icon: 'none'
});
const goAddPatient = () => {
navTo({
url: '/pages_app/myCode/myCode'
})
};
const goRules = () => {
navTo({
url: '/pages_app/webview/webview?url='+encodeURIComponent(docUrl+'integral/integral_welfare.html')+'&title=福利规则'
})
};
const useWelfarePage = () => {
api.useWelfarePage().then(res => {
if (res.code === '200' && res.data) {
@ -395,8 +468,24 @@
position: relative;
overflow: hidden;
border:2rpx solid #fff;
&.jifen{
border:2rpx solid #ffad17;
}
&.wenxian{
border:2rpx solid #33c966;
}
&.video{
border:2rpx solid #ff951d;
}
&.kejian{
border:2rpx solid #f17dff;
}
&.upan{
border:2rpx solid #40cdc5;
}
&.wanfang{
border:2rpx solid #4aa2fe;
}
.disabled-text {
color: $text-light !important;
}
@ -411,11 +500,17 @@
.card-content {
margin-top: 30rpx;
background:url("@/static/fljifen_big.png") 0 0 no-repeat;
background-size: 100% 100%;
position: relative;
height: 220rpx;
min-height: 220rpx;
z-index: 1;
.card-img{
position: absolute;
top: 0;
left: 0;
z-index: 0;
width: 100%;
height: 100%;
}
.card-title {
font-size: 32rpx;
@ -424,8 +519,22 @@
margin-bottom: 30rpx;
line-height: 1.4;
}
.panbox{
margin-top: 20rpx;
font-size: 32rpx;
color: #fff;
font-weight: 600;
height: 84rpx;
line-height: 84rpx;
background: #40cdc5;
border-radius: 10rpx;
padding: 0 20rpx;
text-align: center;
}
.card-details {
position: relative;
z-index: 2;
display: flex;
justify-content: space-between;
align-items: center;
@ -435,17 +544,20 @@
.right-section {
display: flex;
flex-direction: column;
gap: 8rpx;
justify-content: center;
align-items: center!important;
.condition,
.reward-type {
font-size: 24rpx;
font-size: 32rpx;
color: rgba(255, 255, 255, 11);
}
.requirement,
.reward-value {
font-size: 36rpx;
margin-top: 8rpx;
font-size: 42rpx;
color: $white;
font-weight: bold;
}
@ -493,10 +605,11 @@
padding: 0 20rpx;
.nav-item {
display: flex;
align-items: center;
justify-content: center;
flex-direction: flex;
gap: 8rpx;
.nav-icon {
font-size: 40rpx;
@ -504,8 +617,13 @@
.nav-text {
font-size: 32rpx;
margin-left: 8rpx;
color: #fff;
}
}
}
.nav-right{
font-size: 28rpx;
color: #8B2316;
}
</style>

View File

@ -0,0 +1,391 @@
<template>
<navBar :title="'福利明细'" />
<view class="welfare-detail-page">
<!-- Tab 切换栏 -->
<view class="segmented-control">
<view
class="tab-item"
:class="{ active: activeTab === 1 }"
@click="switchTab(1)"
>
<text class="tab-text">视频下载</text>
</view>
<view class="divider"></view>
<view
class="tab-item"
:class="{ active: activeTab === 2 }"
@click="switchTab(2)"
>
<text class="tab-text">课件下载</text>
</view>
<view class="divider"></view>
<view
class="tab-item"
:class="{ active: activeTab === 6 }"
@click="switchTab(6)"
>
<text class="tab-text">查找文献</text>
</view>
</view>
<!-- 表格头部 -->
<view class="table-header">
<text class="col reason">原因</text>
<text class="col time">时间</text>
<text class="col count">次数</text>
</view>
<!-- 列表数据区域 -->
<scroll-view
class="table-body"
scroll-y
:show-scrollbar="false"
refresher-enabled
:refresher-triggered="refreshing"
@refresherrefresh="onRefresh"
@scrolltolower="onLoadMore"
:lower-threshold="100"
>
<view
class="row"
v-for="(item, index) in filteredList"
:key="index"
>
<text class="cell reason">{{ item.reason }}</text>
<text class="cell time">{{ item.time }}</text>
<text class="cell count" >{{ item.count }}</text>
</view>
<!-- 空数据状态 -->
<view v-if="!loading && filteredList.length === 0" class="empty-wrap">
<text class="empty-text">暂无数据</text>
</view>
<!-- 加载更多提示 -->
<view v-if="loading" class="loading">
<text>加载中...</text>
</view>
<!-- 没有更多数据提示 -->
<view v-if="isLastPage && filteredList.length > 0" class="no-more">
<text>没有更多数据了</text>
</view>
</scroll-view>
</view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import navBar from '@/components/navBar/navBar.vue';
import api from '@/api/api';
import dayjs from 'dayjs';
// Tab0: , 1: , 2:
const activeTab = ref(1);
const page = ref(1);
const pageSize = ref(10);
//
const welfareList = ref([]);
//
const loading = ref(false);
const refreshing = ref(false);
const isLastPage = ref(false);
// activeTab
const filteredList = computed(() => {
if (!welfareList.value || welfareList.value.length === 0) {
return [];
}
const typeMap = {
0: '视频下载',
1: '课件下载',
2: '查找文献'
};
const currentType = typeMap[activeTab.value];
return welfareList.value;
});
// Tab
const switchTab = (index) => {
if (activeTab.value === index) return;
activeTab.value = index;
page.value = 1;
pageSize.value = 10;
welfareList.value = [];
isLastPage.value = false;
loading.value = false;
refreshing.value = false;
// Tab
loadWelfareDetail();
};
//
const loadWelfareDetail = () => {
if (loading.value) return;
loading.value = true;
console.log(api);
// API
api.welfareList({
type: activeTab.value,
page: page.value,
pageSize: pageSize.value
}).then(res => {
console.log(res);
if (res.code ==1) {
// list
let rawList = [];
if (Array.isArray(res.data)) {
rawList = res.data;
isLastPage.value = false;
} else if (res.data.list && Array.isArray(res.data.list)) {
rawList = res.data.list;
isLastPage.value = !!res.data.isLastPage;
} else {
if (page.value === 1) {
welfareList.value = [];
}
isLastPage.value = false;
return;
}
//
const formattedList = rawList.map(item => {
let timeStr = item.create_date || item.time || '';
// 使 dayjs
if (timeStr) {
timeStr = dayjs(timeStr).format('YYYY-MM-DD');
}
return {
reason: item.name || item.reason || '',
time: timeStr,
count: item.count_num ? parseInt(item.count_num) : (item.count || 0)
};
});
//
if (page.value === 1 || refreshing.value) {
welfareList.value = formattedList;
} else {
welfareList.value = [...welfareList.value, ...formattedList];
}
} else {
if (page.value === 1) {
welfareList.value = [];
}
isLastPage.value = false;
}
}).catch(err => {
console.error('获取福利明细失败:', err);
if (page.value === 1) {
welfareList.value = [];
}
uni.showToast({
title: '获取福利明细失败',
icon: 'none'
});
}).finally(() => {
loading.value = false;
refreshing.value = false;
});
};
//
const onRefresh = () => {
refreshing.value = true;
page.value = 1;
isLastPage.value = false;
loadWelfareDetail();
};
//
const onLoadMore = () => {
if (isLastPage.value || loading.value) return;
page.value += 1;
loadWelfareDetail();
};
onMounted(() => {
loadWelfareDetail();
});
</script>
<style scoped lang="scss">
//
$bg-color: #f5f6f7;
$text-primary: #333333;
$text-secondary: #666666;
$text-light: #999999;
$border-color: #e5e5e5;
$white: #ffffff;
$theme-color: #8B2316;
$table-header-bg: #8B2316;
$divider-color: #cccccc;
$nav-height: 180rpx;
$segmented-height: 80rpx;
$table-header-height: 70rpx;
.welfare-detail-page {
min-height: 100vh;
background-color: $bg-color;
padding-top: $nav-height;
}
// Tab
.segmented-control {
position: fixed;
top: calc(var(--status-bar-height) + 44px);
left: 0;
right: 0;
z-index: 10;
height: $segmented-height;
background-color: $white;
display: flex;
align-items: center;
padding: 0 30rpx;
border-bottom: 1rpx solid $border-color;
.tab-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
height: 100%;
position: relative;
.tab-text {
font-size: 28rpx;
color: $text-secondary;
transition: all 0.3s ease;
}
&.active {
.tab-text {
color: $theme-color;
font-size: 30rpx;
font-weight: 500;
}
}
}
.divider {
width: 2rpx;
height: 40rpx;
background-color: $divider-color;
}
}
//
.table-header {
position: fixed;
top: calc(var(--status-bar-height) + 44px + $segmented-height);
left: 0;
right: 0;
z-index: 5;
background: $table-header-bg;
color: $white;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
font-size: 30rpx;
font-weight: 500;
height: $table-header-height;
box-sizing: border-box;
.col {
flex: 1;
text-align: center;
&.reason {
text-align: left;
}
&.time {
text-align: center;
}
&.count {
text-align: right;
}
}
}
//
.table-body {
position: fixed;
left: 0;
right: 0;
top: calc(var(--status-bar-height) + 44px + $segmented-height + $table-header-height);
height: calc(100vh - var(--status-bar-height) - 44px - $segmented-height - $table-header-height);
background-color: #f5f5f5;
}
//
.row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 30rpx;
border-bottom: 1rpx solid #f0f0f0;
background-color: #f5f5f5;
font-size: 28rpx;
color: $text-primary;
.cell {
flex: 1;
text-align: center;
&.reason {
text-align: left;
color: $text-primary;
}
&.time {
text-align: center;
color: $text-secondary;
}
&.count {
text-align: right;
color: $text-primary;
&.negative {
color: #e34d4d;
}
}
}
}
//
.empty-wrap {
padding-top: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
color: #bdbdbd;
.empty-text {
margin-top: 20rpx;
font-size: 30rpx;
}
}
//
.loading, .no-more {
text-align: center;
color: $text-light;
padding: 30rpx 0;
font-size: 26rpx;
text {
display: inline-block;
padding: 10rpx 20rpx;
border-radius: 20rpx;
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<uni-nav-bar
<!-- <uni-nav-bar
left-icon="left"
title="兑换福利卡"
@clickLeft="goBack"
@ -8,11 +8,13 @@
height="180rpx"
:border="false"
backgroundColor="#eeeeee"
></uni-nav-bar>
></uni-nav-bar> -->
<navBar :title="'兑换福利卡'" />
<view class="exchange-page">
<!-- 顶部红色横幅 -->
<view class="top-banner">
<image :src="bgImg" mode="widthFix" class="bg-img"></image>
<view class="banner-text">
<view class="line1">已兑换{{ exchangedCount }}</view>
<view class="line2" @click="goMyWelfare">查看现有权益</view>
@ -38,7 +40,8 @@
</view>
<!-- 输入提示 -->
<view class="tips">请输入16位福利卡密码不区分大小写<text class="paste-action" @click="pasteFromClipboard">粘贴</text></view>
<!-- <text class="paste-action" @click="pasteFromClipboard">粘贴</text> -->
<view class="tips">请输入16位福利卡密码不区分大小写</view>
<!-- 四段输入框 -->
<view class="code-inputs">
@ -58,6 +61,8 @@
<script setup>
import { ref, computed, nextTick } from 'vue'
import api from '@/api/api';
import navBar from '@/components/navBar/navBar.vue'
import bgImg from '@/static/fulicard_bg.png'
const exchangedCount = ref(5)
const code1 = ref('')
const code2 = ref('')
@ -164,22 +169,28 @@
}
.top-banner{
position: relative;
height: 280rpx;
background: linear-gradient(180deg,#ff6a4a 0%, #e93b2d 100%);
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
height: 286rpx;
margin-top: calc(var(--status-bar-height) + 44px);
.bg-img{
position: absolute;
width: 100%;
z-index:0;
height: 286rpx;
}
.banner-text{
position: absolute;
left: 48rpx;
top: 120rpx;
left: 50%;
transform: translateX(-50%);
top: 80rpx;
z-index:1;
color: #fff;
.line1{font-size: 44rpx;font-weight: 600;}
.line1{font-size: 44rpx;}
.line2{font-size: 36rpx;margin-top: 12rpx;}
}
.help-btn{
position: absolute;
right: 40rpx;
top: 90rpx;
right: 30rpx;
top: 20rpx;
background: rgba(255,255,255,.95);
color: #e04835;
border-radius: 999rpx;
@ -189,8 +200,8 @@
}
.tips{
margin: 48rpx;
color: #333;
font-size: 32rpx;
color: #000;
font-size: 30rpx;
.paste-action{
color: #007aff;
text-decoration: underline;

View File

@ -1,5 +1,5 @@
<template>
<uni-nav-bar
<!-- <uni-nav-bar
left-icon="left"
title="我的福利卡"
@clickLeft="goBack"
@ -8,11 +8,13 @@
height="180rpx"
:border="false"
backgroundColor="#eeeeee"
></uni-nav-bar>
></uni-nav-bar> -->
<navBar :title="'我的福利卡'" />
<view class="benefits-page">
<!-- 顶部红色横幅 -->
<view class="top-banner">
<image :src="bgImg" mode="widthFix" class="bg-img"></image>
<view class="banner-text">
<view class="line1">已兑换{{ cardInfo.length }}</view>
<view class="line2" @click="goMyWelfare">查看现有权益</view>
@ -39,9 +41,14 @@
<!-- 有卡展示多张 -->
<view v-if="hasCard" >
<view class="card-wrapper" v-for="(card, cIdx) in cardInfo" :key="card.id">
<image :src="cardImg" mode="widthFix" class="card-img"></image>
<view class="cardbox">
<view class="card-header">
<text>卡号{{ card.idcard }}</text>
<text class="time">兑换时间{{ card.exchange_date }}</text>
<image :src="logoImg" mode="widthFix" class="logo-img"></image>
<view class="headerbox">
<view>卡号{{ card.idcard }}</view>
<view class="time">兑换时间{{ card.exchange_date }}</view>
</view>
</view>
<view class="card-body">
<view class="benefit-line" v-for="(w, idx) in card.welfare_list" :key="idx">
@ -49,6 +56,7 @@
<text class="text">{{ w.type_name }}{{ w.num }}{{ w.type_unit }}</text>
</view>
</view>
</view>
</view>
<!-- 加载提示 -->
<view class="loadmore-tip" v-if="isLoading || isLastPage">
@ -76,7 +84,10 @@
import { ref, onMounted } from 'vue';
import jifenImg from "@/static/duihuan.png"
import emptyImg from "@/static/icon_empty.png"
import bgImg from '@/static/fulicard_bg.png'
import cardImg from '@/static/carditem_bg.png'
import api from '@/api/api';
import logoImg from '@/static/logo_gdxz.png'
import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
//
const hasCard = ref(true)
@ -147,6 +158,7 @@
};
const goPointsDetail = () => {
console.log('goPointsDetail')
uni.navigateTo({ url: '/pages_app/myWelfareCard/exchange' })
};
@ -398,23 +410,28 @@
/* 顶部横幅与卡片样式 */
.top-banner{
position: relative;
height: 280rpx;
background: linear-gradient(180deg,#ff6a4a 0%, #e93b2d 100%);
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
@include shadow;
height: 286rpx;
margin-top: calc(var(--status-bar-height) + 44px);
.bg-img{
position: absolute;
width: 100%;
z-index:0;
height: 286rpx;
}
.banner-text{
position: absolute;
left: 48rpx;
top: 120rpx;
left: 50%;
transform: translateX(-50%);
top: 80rpx;
z-index:1;
color: #fff;
.line1{font-size: 44rpx;font-weight: 600;}
.line1{font-size: 44rpx;}
.line2{font-size: 36rpx;margin-top: 12rpx;}
}
.help-btn{
position: absolute;
right: 40rpx;
top: 90rpx;
right: 30rpx;
top: 20rpx;
background: rgba(255,255,255,.95);
color: #e04835;
border-radius: 999rpx;
@ -424,27 +441,51 @@
}
.card-wrapper{
position: relative;
margin: 24rpx 30rpx;
background: #fff;
border-radius: 16rpx;
@include shadow;
overflow: hidden;
.cardbox{
position: relative;
z-index:2;
}
.card-img{
position: absolute;
width: 100%;
z-index:0;
height: 336rpx;
}
.card-header{
background: linear-gradient(90deg,#ff7e4a,#ff4d2e);
color: #fff;
padding: 24rpx 28rpx;
padding: 4rpx 28rpx;
font-size: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
.headerbox{
display: flex;
flex-direction: column;
justify-content: center;
}
.time{opacity:.95}
.logo-img{
width:94rpx;
height: 94rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 20rpx;
}
}
.card-body{
padding: 34rpx 28rpx 40rpx;
padding:92rpx 28rpx;
.benefit-line{
font-size: 30rpx;
color: #333;
color: #8B2316;
line-height: 56rpx;
.index{color:#333}
text-align: center;
.index{color:#8B2316;}
}
}
}

View File

@ -138,6 +138,22 @@
<script setup>
import { ref } from 'vue';
import {onBackPress,onLoad} from '@dcloudio/uni-app';
const from = ref('');
onBackPress(() => {
if(!from.vlaue){
plus.runtime.quit();
return true;
}else{
uni.navigateBack();
}
});
onLoad((options) => {
if(options.from){
from.value = options.from;
}
});
//
const bannerList = ref([
@ -207,13 +223,12 @@
//
const goBack = () => {
uni.navigateBack({
fail() {
uni.redirectTo({
url: '/pages/index/index'
});
}
});
if(!from.vlaue){
plus.runtime.quit();
return true;
}else{
uni.navigateBack();
}
};
const showSearch = () => {

View File

@ -71,9 +71,9 @@
<view class="priceImg" style="margin-top: -4rpx;">
<up-image :src="downLoadImg" width="32rpx" height="32rpx" ></up-image>
</view>
<text class="price-value" v-if="item.price>0 && item.discount>0"><text class="money-unit">¥</text>{{ item.price/100>item.discount?fromatPrice(item.discount):fromatPrice(item.price/100) }}</text>
<text class="yuanjia" v-if="item.price>0 && item.price/100>item.discount && item.discount>0">原价<text class="jiaprice">{{fromatPrice(item.price/100)}}</text></text>
<text v-if="item.price==0 || item.discount===0" class="free">免费</text>
<text class="price-value" v-if="item.price>0 && item.discount>0"><text class="money-unit">¥</text>{{fromatPrice(item.price/100*item.discount)}}</text>
<text class="yuanjia" v-if="item.price>0 && item.discount<1 && item.discount>0">原价<text class="jiaprice">{{fromatPrice(item.price/100)}}</text></text>
<text v-else-if="item.price<=0 || item.discount===0 || item.price*item.discount==0 " class="free">免费</text>
</view>
</view>
</view>
@ -756,7 +756,7 @@
z-index: 9999;
.filter-content {
margin-top:245rpx;
margin-top:calc(var(--status-bar-height) + 44px + 102rpx);
background-color: $white;
// border-radius: 20rpx 20rpx 0 0;
@ -767,7 +767,7 @@
.filter-tags {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
margin-bottom: 60rpx;
max-height: 65vh;
overflow-y: auto;
@ -775,7 +775,13 @@
.tag-item {
background-color: #f8f8f8;
color: #666;
padding: 8rpx 24rpx;
padding: 6rpx 0rpx;
width:150rpx;
margin:8rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
border-radius: 30rpx;
font-size: 26rpx;
border: 2rpx solid #efefef;

View File

@ -34,7 +34,8 @@
<view class="download-bar" @click="downloadGanDanFile('free')" v-if="orderInfo &&orderInfo.price==0 && downLoadStatus == 'start'">
<view class="download-inner">
<u-icon name="download" color="#fff" size="28"></u-icon>
<up-image :src="downloadImg" width="40rpx" height="40rpx"></up-image>
<!-- <u-icon name="download" color="#fff" size="28"></u-icon> -->
<text class="download-text">本课件</text>
<text class="download-text">免费</text>
<text class="download-unit">下载</text>
@ -69,7 +70,8 @@
</view>
<view class="download-bar" @click="downLoadByType" v-else-if="!order && price>0">
<view class="download-inner">
<u-icon name="download" color="#fff" size="28"></u-icon>
<up-image :src="downloadImg" width="40rpx" height="40rpx"></up-image>
<!-- <u-icon name="download" color="#fff" size="28"></u-icon> -->
<text class="download-text">本课件下载</text>
<text class="download-price">{{ price }}</text>
<text class="download-unit"></text>
@ -77,7 +79,7 @@
</view>
<view class="download-bar" v-else-if="!order && price<0">
<view class="download-inner">
<u-icon name="download" color="#fff" size="28"></u-icon>
<up-icon name="download" color="#fff" size="28"></up-icon>
<text class="download-text">本课件不支持下载</text>
</view>
</view>
@ -123,6 +125,7 @@ import friendImg from "@/static/share_wxc.png";
import logoImg from "@/static/weiboShare.png";
import downloadStore from "@/store/downloadStorePpt.js";
import unidialog from "@/components/dialog/dialog.vue";
import downloadImg from "@/static/ppt_dw.png";
const freeVisible = ref(false);
const freeContent = ref('');
const canDownload = ref(false);
@ -130,6 +133,8 @@ const orderId = ref('');
import otherHost from "@/utils/otherHost.js";
import docUrl from "@/utils/docUrl.js";
const isFirstDownload = ref(false);
const path=ref('');
const from=ref('');
const freeConfirm = () => {
freeVisible.value = false;
downloadGanDanFile();
@ -155,13 +160,23 @@ const goBack = () => {
if (taskIndex !== -1) {
removeTask(taskIndex);
}
uni.navigateBack();
if(from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
}
})
}else{
uni.navigateBack();
if(from.value){
plus.runtime.quit();
}else{
uni.navigateBack();
}
}
};
onBackPress((event)=>{
@ -182,12 +197,22 @@ onBackPress((event)=>{
if (taskIndex !== -1) {
removeTask(taskIndex);
}
uni.navigateBack();
if(from.value){
plus.runtime.quit();
return true;
}else{
uni.navigateBack();
}
}
}
})
return true;
}
if(from.value){
plus.runtime.quit();
return true;
}
}
});
@ -210,6 +235,8 @@ const shareTitle = ref("课件分享");
onLoad((options) => {
console.log(options);
uuid.value = options.uuid;
path.value =decodeURIComponent(options.src);
from.value = options.from;
checkUser(options);
//ganDanFileDetials();
});
@ -586,6 +613,8 @@ const collection = () => {
.collection({
other_uuid: uuid.value,
type: 6,
path: path.value,
title: orderInfo.value.name,
})
.then((res) => {
if (res.code == 200) {

File diff suppressed because it is too large Load Diff

View File

@ -1136,7 +1136,7 @@ $accent-color: #4a90e2;
z-index: 9999;
.filter-content {
margin-top: 247rpx;
margin-top: calc(var(--status-bar-height) + 44px + 108rpx);
overflow-y: scroll;
background-color: $white;
// border-radius: 20rpx 20rpx 0 0;

View File

@ -138,6 +138,7 @@
const innerSortTitle = ref("上传时间");
import downloadStore from "@/store/downloadStoreFile.js";
const downloadTasks=ref([]);
import isAndroid from "@/utils/platform.js";
const downLoadtaskList=computed(()=>{
return downloadTasks.value.filter((item)=>item.status == "completed" && item.type == "zhinan");
});
@ -238,6 +239,7 @@
if(item.id == cell.id) {
console.log(2222222222);
console.log(item.localPath);
if(isAndroid){
plus.runtime.openFile(item.localPath, function(e) {
console.log('打开成功');
}, function(e) {
@ -248,6 +250,29 @@
});
console.log('打开失败:' + e.message);
});
}else{
uni.openDocument({
filePath: item.localPath,
success: () => console.log('打开成功'),
fail: (err) => {
uni.showToast({
title: '打开失败:' + err.message,
icon: "none",
duration: 2000,
});
}
});
}
// plus.runtime.openFile(item.localPath, function(e) {
// console.log('');
// }, function(e) {
// uni.showToast({
// title: '' + e.message,
// icon: "none",
// duration: 2000,
// });
// console.log('' + e.message);
// });
// uni.openDocument({
// filePath: item.localPath,
// fileType: 'pdf',

View File

@ -103,13 +103,13 @@ const goBack = () => uni.navigateBack()
<style scoped>
.page { min-height: 100vh; background: #fff; }
.content { position: absolute; top: calc(var(--status-bar-height) + 44px); bottom: 0; left: 0; right: 0; background: #fff; }
.card { background: #fff; padding: 24rpx; border-bottom: 16rpx solid #f5f5f5; }
.card { background: #fff; padding: 24rpx; border-bottom: 2rpx solid #f5f5f5; }
.row { display: flex; align-items: center; padding: 10rpx 0; }
.label { color: #333; font-size: 30rpx; width: 180rpx; }
.value { color: #333; font-size: 30rpx; }
.value { color: #666; font-size: 30rpx; }
.status { font-size: 30rpx; }
.status.paid { color: #333; }
.status.unpaid { color: #333; }
.status.paid { color: #666; }
.status.unpaid { color: #666; }
.list-footer { text-align: center; color: #999; padding: 24rpx 0; }
.empty { text-align: center; color: #999; padding: 40rpx 0; }
</style>

BIN
static/carditem_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
static/flupan_big2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
static/logo_gdxz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
static/ppt_dw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -88,6 +88,13 @@

View File

@ -1,8 +1,9 @@
let isAndroid = false;
uni.getSystemInfo({
success: (res) => {
console.log('平台');
console.log(res);
if(res.os == 'android'){
if(res.platform == 'android'){
isAndroid = true;
}else{
isAndroid = false;

View File

@ -120,6 +120,9 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
if(process.env.UNI_PLATFORM == "mp-weixin"){
uni.redirectTo({url:'/pages_app/login/login'})
}
// else{
// uni.navigateTo({url:'/pages_app/login/login'})
// }
uni.sendNativeEvent('getNewToken', {
msg: 'getNewToken'
},ret => {

View File

@ -1,2 +1,2 @@
const version="4.1.9"
const version="4.2.0"
export default version