1.14提交
This commit is contained in:
parent
56c645a75c
commit
00d0ec8a9b
31
api/api.js
31
api/api.js
@ -447,10 +447,10 @@ const api = {
|
|||||||
return request('/expertAPI/consultListHis', data, 'post', false);
|
return request('/expertAPI/consultListHis', data, 'post', false);
|
||||||
},
|
},
|
||||||
listNewInterrogation(data){
|
listNewInterrogation(data){
|
||||||
return request('/expertAPI/listNewInterrogation', data, 'post', false);
|
return request('/expertAPI/listNewInterrogation', data, 'post', true);
|
||||||
},
|
},
|
||||||
listMyAnsweredInterrogation(data){
|
listMyAnsweredInterrogation(data){
|
||||||
return request('/expertAPI/listMyAnsweredInterrogation', data, 'post', false);
|
return request('/expertAPI/listMyAnsweredInterrogation', data, 'post', true);
|
||||||
},
|
},
|
||||||
getInterrogation(data){
|
getInterrogation(data){
|
||||||
return request('/expertAPI/getInterrogation', data, 'post', false);
|
return request('/expertAPI/getInterrogation', data, 'post', false);
|
||||||
@ -459,10 +459,10 @@ const api = {
|
|||||||
return request('/expertAPI/InterrogationPatientInfo', data, 'post', false);
|
return request('/expertAPI/InterrogationPatientInfo', data, 'post', false);
|
||||||
},
|
},
|
||||||
updateInterrogationAnswer(data){
|
updateInterrogationAnswer(data){
|
||||||
return request('/expertAPI/updateInterrogationAnswerU', data, 'post', false);
|
return request('/expertAPI/updateInterrogationAnswerU', data, 'post', true);
|
||||||
},
|
},
|
||||||
addInterrogationAnswer(data){
|
addInterrogationAnswer(data){
|
||||||
return request('/expertAPI/addInterrogationAnswerU', data, 'post', false);
|
return request('/expertAPI/addInterrogationAnswerU', data, 'post', true);
|
||||||
},
|
},
|
||||||
videoDetail(data){
|
videoDetail(data){
|
||||||
return request('/expertAPI/videoDetail', data, 'post', false);
|
return request('/expertAPI/videoDetail', data, 'post', false);
|
||||||
@ -665,12 +665,29 @@ const api = {
|
|||||||
return request('/expertAPI/downloadGanDanFileV2', data, 'post', false);
|
return request('/expertAPI/downloadGanDanFileV2', data, 'post', false);
|
||||||
},
|
},
|
||||||
feedBack(data){
|
feedBack(data){
|
||||||
return request('/expert/feedBack', data, 'post', false);
|
return request('/expertAPI/addFeedBack', data, 'post', false);
|
||||||
},
|
},
|
||||||
getPointUnitPrice(data){
|
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);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "肝胆相照专家版",
|
"name" : "肝胆相照专家版",
|
||||||
"appid" : "__UNI__89F511F",
|
"appid" : "__UNI__89F511F",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.1.9",
|
"versionName" : "4.2.0",
|
||||||
"versionCode" :419,
|
"versionCode" : 420,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
@ -58,12 +58,17 @@
|
|||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
],
|
],
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||||
"minSdkVersion" : 21
|
"minSdkVersion" : 21,
|
||||||
|
"targetSdkVersion" :30
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"dSYMs" : false,
|
"dSYMs" : false,
|
||||||
"idfa" : false,
|
"idfa" : false,
|
||||||
"urlschemewhitelist" : [ "weixin", "wechat" ]
|
"urlschemewhitelist" : [ "weixin", "wechat" ],
|
||||||
|
"permission" : {
|
||||||
|
"NSPhotoLibraryUsageDescription" : "需要访问相册以选择图片",
|
||||||
|
"NSCameraUsageDescription" : "需要访问相机以拍照"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
|
|||||||
73
pages.json
73
pages.json
@ -9,7 +9,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
|
// {
|
||||||
|
// "path": "pages/upload/upload",
|
||||||
|
// "style": {
|
||||||
|
// "navigationBarTitleText": "",
|
||||||
|
// "navigationStyle": "custom",
|
||||||
|
// "app": {
|
||||||
|
// "bounce": "none"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
"path": "pages/loading/loading",
|
"path": "pages/loading/loading",
|
||||||
"style": {
|
"style": {
|
||||||
@ -20,6 +29,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -489,6 +499,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "myCode/myCode",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "uni-app分页",
|
||||||
|
"app": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "buyPoint/buyPoint",
|
"path": "buyPoint/buyPoint",
|
||||||
"style": {
|
"style": {
|
||||||
@ -499,6 +519,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "myWelfare/welfareDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "uni-app分页",
|
||||||
|
"app": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "myWelfare/myWelfare",
|
"path": "myWelfare/myWelfare",
|
||||||
"style": {
|
"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",
|
"path": "myWelfareCard/myWelfareCard",
|
||||||
"style": {
|
"style": {
|
||||||
@ -519,6 +569,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "myWelfareCard/exchange",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "uni-app分页",
|
||||||
|
"app": {
|
||||||
|
"bounce": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "myPoint/myPoint",
|
"path": "myPoint/myPoint",
|
||||||
"style": {
|
"style": {
|
||||||
@ -931,16 +991,7 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// {
|
|
||||||
// "path": "myCode/myCode",
|
|
||||||
// "style": {
|
|
||||||
// "navigationStyle": "custom",
|
|
||||||
// "navigationBarTitleText": "uni-app分页",
|
|
||||||
// "app": {
|
|
||||||
// "bounce": "none"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// "path": "myDownLoad/myDownLoad",
|
// "path": "myDownLoad/myDownLoad",
|
||||||
|
|||||||
119
pages/upload/upload.vue
Normal file
119
pages/upload/upload.vue
Normal 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>
|
||||||
@ -68,6 +68,19 @@
|
|||||||
};
|
};
|
||||||
const freeConfirm = () => {
|
const freeConfirm = () => {
|
||||||
freeVisible.value = false;
|
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(() => {
|
onLoad(() => {
|
||||||
getPointUnitPrice();
|
getPointUnitPrice();
|
||||||
@ -85,7 +98,7 @@
|
|||||||
const getPointUnitPrice = () => {
|
const getPointUnitPrice = () => {
|
||||||
api.getPointUnitPrice().then(res => {
|
api.getPointUnitPrice().then(res => {
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
pointUnitPrice.value=Number(res.PointUnitPrice);
|
pointUnitPrice.value=Number(res.data);
|
||||||
console.log(pointUnitPrice.value);
|
console.log(pointUnitPrice.value);
|
||||||
packages.value.forEach(pkg => {
|
packages.value.forEach(pkg => {
|
||||||
pkg.price = pkg.points * pointUnitPrice.value / 100;
|
pkg.price = pkg.points * pointUnitPrice.value / 100;
|
||||||
|
|||||||
268
pages_app/buyUpan/address.vue
Normal file
268
pages_app/buyUpan/address.vue
Normal 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>
|
||||||
|
|
||||||
291
pages_app/buyUpan/buyUpan.vue
Normal file
291
pages_app/buyUpan/buyUpan.vue
Normal 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>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue'
|
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 navBar from '@/components/navBar/navBar.vue'
|
||||||
import empty from '@/components/empty/empty.vue'
|
import empty from '@/components/empty/empty.vue'
|
||||||
import api from '@/api/api.js'
|
import api from '@/api/api.js'
|
||||||
@ -284,7 +284,7 @@ const listMyAnsweredInterrogation=async(isRefresh=false)=>{
|
|||||||
isRefreshing.value = false
|
isRefreshing.value = false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onShow(()=>{
|
onLoad(()=>{
|
||||||
page.value = 1
|
page.value = 1
|
||||||
hasMore.value = true;
|
hasMore.value = true;
|
||||||
listNew.value = [];
|
listNew.value = [];
|
||||||
@ -432,7 +432,7 @@ function onReachBottom(){
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 56px;
|
height: 48px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: calc(var(--status-bar-height) + 44px);
|
top: calc(var(--status-bar-height) + 44px);
|
||||||
@ -470,7 +470,7 @@ function onReachBottom(){
|
|||||||
.list-scroll {
|
.list-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: calc(var(--status-bar-height) + 44px + 56px);
|
top: calc(var(--status-bar-height) + 44px + 48px);
|
||||||
bottom:56px;
|
bottom:56px;
|
||||||
margin: 20rpx rpx 0;
|
margin: 20rpx rpx 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@ -53,9 +53,10 @@
|
|||||||
:src="docUrl + img"
|
:src="docUrl + img"
|
||||||
class="grid-image"
|
class="grid-image"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
@click="previewImage(docUrl + img, index)"
|
@click="previewImageInfo(questionInfo.images,docUrl + img, index)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="lookmore"
|
class="lookmore"
|
||||||
v-if="
|
v-if="
|
||||||
@ -90,6 +91,17 @@
|
|||||||
</text>
|
</text>
|
||||||
|
|
||||||
</view>
|
</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>
|
</view>
|
||||||
<!-- 补充信息:查看更多 / 收起 -->
|
<!-- 补充信息:查看更多 / 收起 -->
|
||||||
|
|
||||||
@ -144,8 +156,8 @@
|
|||||||
<view class="namebox">
|
<view class="namebox">
|
||||||
<view class="namecontet">
|
<view class="namecontet">
|
||||||
<view class="doctor-name">{{ item.realname }}</view>
|
<view class="doctor-name">{{ item.realname }}</view>
|
||||||
<view class="bar"></view>
|
<view class="bar" v-if="item.realname!='账号已注销'"></view>
|
||||||
<view class="doctor-hospital" style="margin-left: 0rpx;color:#999">{{ item.name }}</view>
|
<view class="doctor-hospital" v-if="item.realname!='账号已注销'" style="margin-left: 0rpx;color:#999">{{ item.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -331,6 +343,8 @@ const displaySupplementList = computed(() => {
|
|||||||
questionInfo.value.SupplementList.length === 0
|
questionInfo.value.SupplementList.length === 0
|
||||||
) {
|
) {
|
||||||
return [];
|
return [];
|
||||||
|
}else if(!questionInfo.value.SupplementList || questionInfo.value.SupplementList.length == 1){
|
||||||
|
return questionInfo.value.SupplementList;
|
||||||
}
|
}
|
||||||
return supplementShowAll.value
|
return supplementShowAll.value
|
||||||
? questionInfo.value.SupplementList
|
? questionInfo.value.SupplementList
|
||||||
@ -355,11 +369,96 @@ function goBack() {
|
|||||||
|
|
||||||
// 预览图片
|
// 预览图片
|
||||||
function previewImage(current, index) {
|
function previewImage(current, index) {
|
||||||
uni.previewImage({
|
let urls=questionInfo.value.images
|
||||||
urls: questionInfo.value.images
|
|
||||||
? questionInfo.value.images.split(",").map((path) => docUrl + path)
|
? questionInfo.value.images.split(",").map((path) => docUrl + path)
|
||||||
: [],
|
: [];
|
||||||
|
uni.previewImage({
|
||||||
|
showmenu:true,
|
||||||
|
urls:urls,
|
||||||
current: index,
|
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);
|
const urls = item.imgs.split(",").map((path) => docUrl + path);
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
|
showmenu:true,
|
||||||
urls,
|
urls,
|
||||||
current: index,
|
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);
|
top: calc(var(--status-bar-height) + 44px);
|
||||||
width: auto;
|
width: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
padding: 30rpx 0;
|
padding: 30rpx 0;
|
||||||
bottom: 313rpx;
|
bottom: 313rpx;
|
||||||
}
|
}
|
||||||
@ -663,9 +786,13 @@ function editQuestion() {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.doctor-name {
|
.doctor-name {
|
||||||
font-size: 32rpx;
|
font-size: 34rpx;
|
||||||
color: #333;
|
color: #8B2316;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
max-width: 203rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hospital-time-row {
|
.hospital-time-row {
|
||||||
@ -726,7 +853,7 @@ function editQuestion() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.disclaimer {
|
.disclaimer {
|
||||||
background-color: #fff5f5;
|
background-color: #f6f6f6;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
@ -754,4 +881,10 @@ function editQuestion() {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
|
.doctor-cell{
|
||||||
|
border-bottom: 12rpx solid #efefef;
|
||||||
|
}
|
||||||
|
.doctor-cell:last-child{
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -272,7 +272,7 @@ const goDetail=(item)=>{
|
|||||||
const encoded = encodeURIComponent(item.path);
|
const encoded = encodeURIComponent(item.path);
|
||||||
let imgPath=encodeURIComponent('https://doc.igandan.com/app/html/img/2016/20160714132557.png');
|
let imgPath=encodeURIComponent('https://doc.igandan.com/app/html/img/2016/20160714132557.png');
|
||||||
uni.navigateTo({
|
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>
|
</script>
|
||||||
|
|||||||
@ -1,314 +1,469 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="my-answer-page">
|
<view class="my-answer-page">
|
||||||
<navBar title="我的意见" />
|
<navBar title="我的意见" />
|
||||||
|
|
||||||
<scroll-view scroll-y class="content-scroll">
|
<scroll-view scroll-y class="content-scroll">
|
||||||
<!-- 文本输入 -->
|
<!-- 文本输入 -->
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card-title">我的意见 <text class="required">*</text></view>
|
<view class="card-title">我的意见 <text class="required">*</text></view>
|
||||||
<view class="textarea-wrap">
|
<view class="textarea-wrap">
|
||||||
<textarea
|
<textarea
|
||||||
v-model="note"
|
v-model="note"
|
||||||
class="textarea"
|
class="textarea"
|
||||||
:maxlength="300"
|
:maxlength="300"
|
||||||
placeholder="请依据患者的个人信息、疾病资料及患者所咨询的问题详细解答患者的问题(信息仅提问患者及医生可见,最多输入300个字)"
|
placeholder="请依据患者的个人信息、疾病资料及患者所咨询的问题详细解答患者的问题(信息仅提问患者及医生可见,最多输入300个字)"
|
||||||
placeholder-class="ph"
|
placeholder-class="ph"
|
||||||
auto-height
|
auto-height
|
||||||
/>
|
/>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 图片上传 -->
|
<!-- 图片上传 -->
|
||||||
<view class="card">
|
<view class="card">
|
||||||
<view class="card-title">相关图片</view>
|
<view class="card-title">相关图片</view>
|
||||||
<view class="sub-tip">可以用部分科普或文献来协助回答问题,最多6张</view>
|
<view class="sub-tip">可以用部分科普或文献来协助回答问题,最多6张</view>
|
||||||
<view class="img-grid">
|
<!-- <view class="imgbox">
|
||||||
<view
|
<uni-file-picker limit="6" v-model="tempImageList" file-mediatype="image" :auto-upload="false" @select="selectImages" @delete="deleteImages" ></uni-file-picker>
|
||||||
v-if="tempImageList.length>0"
|
</view> -->
|
||||||
v-for="(img, index) in tempImageList"
|
<view class="img-grid">
|
||||||
:key="index"
|
<view
|
||||||
class="img-item"
|
v-if="tempImageList.length > 0"
|
||||||
@click="preview(index)"
|
v-for="(img, index) in tempImageList"
|
||||||
>
|
:key="index"
|
||||||
<image :src="img" mode="aspectFill" class="img" />
|
class="img-item"
|
||||||
<view class="del" @click.stop="remove(index)">×</view>
|
@click="preview(index)"
|
||||||
</view>
|
>
|
||||||
<view v-if="tempImageList.length < maxImages" class="img-item add" @click="addImages">
|
<image :src="img" mode="aspectFill" class="img" />
|
||||||
<view class="plus">+</view>
|
<view class="del" @click.stop="remove(index)">×</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view
|
||||||
</view>
|
v-if="tempImageList.length < maxImages"
|
||||||
</scroll-view>
|
class="img-item add"
|
||||||
|
@click="beforeAddImages"
|
||||||
<!-- 底部提交 -->
|
>
|
||||||
<view class="bottom-fixed">
|
<view class="plus">+</view>
|
||||||
<view class="submit-btn" @click="submit">提交</view>
|
</view>
|
||||||
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from "vue";
|
||||||
import navBar from '@/components/navBar/navBar.vue'
|
import navBar from "@/components/navBar/navBar.vue";
|
||||||
import api from '@/api/api'
|
import api from "@/api/api";
|
||||||
import docUrl from '@/utils/docUrl'
|
import docUrl from "@/utils/docUrl";
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||||
import { pathToBase64} from "image-tools";
|
import { pathToBase64 } from "image-tools";
|
||||||
const uuid=ref('');
|
import { getCameraPermission } from "@/utils/permission.js";
|
||||||
const answer_uuid=ref('');
|
import isAndroid from "@/utils/platform.js";
|
||||||
|
const uuid = ref("");
|
||||||
|
const answer_uuid = ref("");
|
||||||
const maxImages = 6;
|
const maxImages = 6;
|
||||||
const imgList = ref([]);
|
const imgList = ref([]);
|
||||||
|
const isLock = ref(false);
|
||||||
const tempImageList = ref([]);
|
const tempImageList = ref([]);
|
||||||
const note = ref('');
|
const note = ref("");
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
uuid.value = options.uuid || ''
|
uuid.value = options.uuid || "";
|
||||||
answer_uuid.value = options.answer_uuid || ''
|
answer_uuid.value = options.answer_uuid || "";
|
||||||
getInterrogation()
|
getInterrogation();
|
||||||
})
|
});
|
||||||
const getInterrogation=()=>{
|
const beforeAddImages = () => {
|
||||||
api.getInterrogation({
|
if (isAndroid) {
|
||||||
uuid:uuid.value
|
getCameraPermission(addImages);
|
||||||
}).then(res=>{
|
} else {
|
||||||
console.log(res)
|
addImages();
|
||||||
if(res.code === '200' && res.data) {
|
}
|
||||||
let user=uni.getStorageSync('userInfo');
|
};
|
||||||
let arr=res.data.AnswerList.filter(item=>{
|
const getInterrogation = () => {
|
||||||
return user.uuid == item.expert_uuid
|
api
|
||||||
})
|
.getInterrogation({
|
||||||
imgList.value=[];
|
uuid: uuid.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()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
function addImages(){
|
if (res.code === "200" && res.data) {
|
||||||
const remain = maxImages - imgList.value.length
|
let user = uni.getStorageSync("userInfo");
|
||||||
if(remain <= 0){
|
let arr = res.data.AnswerList.filter((item) => {
|
||||||
uni.showToast({title: '最多6张', icon: 'none'})
|
return user.uuid == item.expert_uuid;
|
||||||
return
|
});
|
||||||
}
|
imgList.value = [];
|
||||||
uni.chooseImage({
|
if (arr && arr.length > 0) {
|
||||||
count: remain,
|
note.value = arr[0].note || "";
|
||||||
sizeType: ['compressed'],
|
let imgs = arr[0].imgs ? arr[0].imgs.split(",") : [];
|
||||||
sourceType: ['album','camera'],
|
tempImageList.value = imgs.map((item, index) => {
|
||||||
success: (res)=>{
|
return {
|
||||||
console.log(res.tempFilePaths)
|
name: "图片" + index + 1,
|
||||||
tempImageList.value = [...tempImageList.value, ...res.tempFilePaths];
|
url: docUrl + item,
|
||||||
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);
|
|
||||||
});
|
});
|
||||||
|
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){
|
function remove(index) {
|
||||||
uni.previewImage({
|
imgList.value.splice(index, 1);
|
||||||
urls:tempImageList.value,
|
tempImageList.value.splice(index, 1);
|
||||||
current: index
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
const deleteImages = (e) => {
|
||||||
|
let index = e.index;
|
||||||
|
imgList.value.splice(index, 1);
|
||||||
|
tempImageList.value.splice(index, 1);
|
||||||
|
};
|
||||||
|
|
||||||
function remove(index){
|
function submit() {
|
||||||
imgList.value.splice(index, 1)
|
if (answer_uuid.value) {
|
||||||
tempImageList.value.splice(index, 1)
|
updateInterrogationAnswer();
|
||||||
}
|
} else {
|
||||||
|
addInterrogationAnswer();
|
||||||
function submit(){
|
}
|
||||||
if(answer_uuid.value){
|
|
||||||
updateInterrogationAnswer()
|
|
||||||
}else{
|
|
||||||
addInterrogationAnswer()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.my-answer-page{
|
.my-answer-page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-scroll{
|
.content-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: calc(var(--status-bar-height) + 44px);
|
top: calc(var(--status-bar-height) + 44px);
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 160rpx;
|
bottom: 160rpx;
|
||||||
padding: 24rpx 24rpx 0;
|
padding: 24rpx 24rpx 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card{
|
.card {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
.card-title{
|
.card-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #8B2316;
|
color: #8b2316;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
.required{ color: #ff4d4f; }
|
.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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-tip{
|
.textarea-wrap {
|
||||||
font-size: 26rpx;
|
position: relative;
|
||||||
color: #999;
|
background: #f7f7f7;
|
||||||
margin-bottom: 16rpx;
|
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{
|
.sub-tip {
|
||||||
display: grid;
|
font-size: 26rpx;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
color: #999;
|
||||||
gap: 16rpx;
|
margin-bottom: 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-fixed{
|
.img-grid {
|
||||||
position: fixed;
|
display: grid;
|
||||||
left: 0; right: 0; bottom: 0;
|
grid-template-columns: repeat(4, 1fr);
|
||||||
background: #fff;
|
gap: 16rpx;
|
||||||
padding: 24rpx;
|
|
||||||
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,.06);
|
|
||||||
}
|
}
|
||||||
.submit-btn{
|
.img-item {
|
||||||
width: 100%;
|
position: relative;
|
||||||
height: 88rpx;
|
width: 150rpx;
|
||||||
line-height: 88rpx;
|
height: 150rpx;
|
||||||
text-align: center;
|
border-radius: 12rpx;
|
||||||
background: #3cc7c0;
|
overflow: hidden;
|
||||||
color: #fff;
|
background: #f0f0f0;
|
||||||
font-size: 32rpx;
|
}
|
||||||
border-radius: 16rpx;
|
.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>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -226,7 +226,8 @@ const onSave = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.page-scroll {
|
.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;
|
padding-bottom: 140rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -169,6 +169,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import api from "@/api/api.js";
|
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 nosigninImg from "@/static/sign_day_false.png"
|
||||||
import signinImg from "@/static/sign_day_true.png"
|
import signinImg from "@/static/sign_day_true.png"
|
||||||
import myjifen_big from "@/static/myjifen_big.png"
|
import myjifen_big from "@/static/myjifen_big.png"
|
||||||
@ -217,21 +224,14 @@ const refresherTriggered = ref(false);
|
|||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack({
|
plus.runtime.quit();
|
||||||
fail() {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pages/index/index",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showRules = () => {
|
const showRules = () => {
|
||||||
uni.showToast({
|
navTo({
|
||||||
title: "积分规则",
|
url: '/pages_app/webview/webview?url='+encodeURIComponent(docUrl+'integral/integral_doctor.html')+'&title=积分规则'
|
||||||
icon: "none",
|
})
|
||||||
});
|
};
|
||||||
};
|
|
||||||
|
|
||||||
const switchTab = (tab) => {
|
const switchTab = (tab) => {
|
||||||
activeTab.value = tab;
|
activeTab.value = tab;
|
||||||
@ -293,7 +293,7 @@ const goToBuyPoints = () => {
|
|||||||
|
|
||||||
const goToPointsMall = () => {
|
const goToPointsMall = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages_goods/pointMall/pointMall",
|
url: "/pages_goods/pointMall/pointMall?from=myPoint",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,24 @@
|
|||||||
<template>
|
<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">
|
<view class="benefits-page">
|
||||||
|
|
||||||
|
|
||||||
@ -48,17 +56,23 @@
|
|||||||
<scroll-view class="benefits-list" scroll-y="true" :show-scrollbar="false">
|
<scroll-view class="benefits-list" scroll-y="true" :show-scrollbar="false">
|
||||||
<view
|
<view
|
||||||
class="benefit-card"
|
class="benefit-card"
|
||||||
|
|
||||||
v-for="(benefit, index) in benefitsList"
|
v-for="(benefit, index) in benefitsList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="[benefit.type, { 'disabled': !benefit.flag }]"
|
:class="fotmatType(benefit.name)"
|
||||||
@click="claimBenefit(benefit)"
|
@click="claimBenefit(benefit)"
|
||||||
>
|
>
|
||||||
<view class="card-title">{{ benefit.title }}</view>
|
<view class="card-title">{{ benefit.title }}</view>
|
||||||
<!-- <view class="card-bg">
|
<!-- <view class="card-bg">
|
||||||
|
|
||||||
</view> -->
|
</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="card-details">
|
||||||
<view class="left-section">
|
<view class="left-section">
|
||||||
<text class="condition">{{ benefit.left_tip }}</text>
|
<text class="condition">{{ benefit.left_tip }}</text>
|
||||||
@ -69,6 +83,7 @@
|
|||||||
<text class="reward-value">{{ benefit.right_result }}</text>
|
<text class="reward-value">{{ benefit.right_result }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="panbox" v-if="benefit.name == 'upan'">知识U盘</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -78,20 +93,50 @@
|
|||||||
<!-- 底部导航栏 -->
|
<!-- 底部导航栏 -->
|
||||||
<view class="bottom-nav">
|
<view class="bottom-nav">
|
||||||
<view class="nav-item" @click="goPointsDetail">
|
<view class="nav-item" @click="goPointsDetail">
|
||||||
<!-- <up-image :src="jifenImg" width="34rpx" height="34rpx" ></up-image> -->
|
<up-image :src="jifenImg" width="34rpx" height="34rpx" ></up-image>
|
||||||
<text class="nav-text">兑换福利卡</text>
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<unidialog :visible="showDialog" :content="content" @close="showDialog=false" :showCancel="false" @confirm="confirmDialog"></unidialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
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 api from '@/api/api';
|
||||||
|
import unidialog from '@/components/dialog/dialog.vue'
|
||||||
import navTo from "@/utils/navTo.js";
|
import navTo from "@/utils/navTo.js";
|
||||||
import navBar from '@/components/navBar/navBar.vue'
|
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);
|
const activeTab = ref(0);
|
||||||
|
|
||||||
@ -141,13 +186,7 @@
|
|||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack({
|
plus.runtime.quit();
|
||||||
fail() {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/index/index'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showRules = () => {
|
const showRules = () => {
|
||||||
@ -156,7 +195,21 @@
|
|||||||
icon: 'none'
|
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) => {
|
const switchTab = (index) => {
|
||||||
activeTab.value = index;
|
activeTab.value = index;
|
||||||
|
|
||||||
@ -172,42 +225,62 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const claimBenefit = (benefit) => {
|
const claimBenefit = (benefit) => {
|
||||||
if (!benefit.flag) {
|
console.log(benefit);
|
||||||
uni.showToast({
|
console.log(activeTab.value);
|
||||||
title: `需${benefit.num}个新随访`,
|
if(activeTab.value == 1){
|
||||||
icon: 'none'
|
if(benefit.name == 'jifen'){
|
||||||
});
|
navTo({
|
||||||
return;
|
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 = () => {
|
const goPointsDetail = () => {
|
||||||
uni.showToast({
|
navTo({
|
||||||
title: '积分详情',
|
url: '/pages_app/myPoint/myPoint'
|
||||||
icon: 'none'
|
})
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const goBenefitDetail = () => {
|
const gofuliDetail = () => {
|
||||||
uni.showToast({
|
navTo({
|
||||||
title: '福利详情',
|
url: '/pages_app/myPoint/myPoint'
|
||||||
icon: 'none'
|
})
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const addPatient = () => {
|
const goAddPatient = () => {
|
||||||
uni.showToast({
|
navTo({
|
||||||
title: '添加患者',
|
url: '/pages_app/myCode/myCode'
|
||||||
icon: 'none'
|
})
|
||||||
});
|
};
|
||||||
|
const goRules = () => {
|
||||||
|
navTo({
|
||||||
|
url: '/pages_app/webview/webview?url='+encodeURIComponent(docUrl+'integral/integral_welfare.html')+'&title=福利规则'
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
const useWelfarePage = () => {
|
const useWelfarePage = () => {
|
||||||
api.useWelfarePage().then(res => {
|
api.useWelfarePage().then(res => {
|
||||||
if (res.code === '200' && res.data) {
|
if (res.code === '200' && res.data) {
|
||||||
@ -395,8 +468,24 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border:2rpx solid #fff;
|
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 {
|
.disabled-text {
|
||||||
color: $text-light !important;
|
color: $text-light !important;
|
||||||
}
|
}
|
||||||
@ -411,11 +500,17 @@
|
|||||||
|
|
||||||
.card-content {
|
.card-content {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
background:url("@/static/fljifen_big.png") 0 0 no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 220rpx;
|
min-height: 220rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
.card-img{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@ -424,8 +519,22 @@
|
|||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
line-height: 1.4;
|
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 {
|
.card-details {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -435,17 +544,20 @@
|
|||||||
.right-section {
|
.right-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8rpx;
|
justify-content: center;
|
||||||
|
align-items: center!important;
|
||||||
|
|
||||||
|
|
||||||
.condition,
|
.condition,
|
||||||
.reward-type {
|
.reward-type {
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255, 255, 255, 11);
|
color: rgba(255, 255, 255, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
.requirement,
|
.requirement,
|
||||||
.reward-value {
|
.reward-value {
|
||||||
font-size: 36rpx;
|
margin-top: 8rpx;
|
||||||
|
font-size: 42rpx;
|
||||||
color: $white;
|
color: $white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -493,10 +605,11 @@
|
|||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: flex;
|
flex-direction: flex;
|
||||||
gap: 8rpx;
|
|
||||||
|
|
||||||
.nav-icon {
|
.nav-icon {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
@ -504,8 +617,13 @@
|
|||||||
|
|
||||||
.nav-text {
|
.nav-text {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.nav-right{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #8B2316;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
391
pages_app/myWelfare/welfareDetail.vue
Normal file
391
pages_app/myWelfare/welfareDetail.vue
Normal 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';
|
||||||
|
|
||||||
|
// 当前选中的 Tab(0: 视频下载, 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>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<uni-nav-bar
|
<!-- <uni-nav-bar
|
||||||
left-icon="left"
|
left-icon="left"
|
||||||
title="兑换福利卡"
|
title="兑换福利卡"
|
||||||
@clickLeft="goBack"
|
@clickLeft="goBack"
|
||||||
@ -8,11 +8,13 @@
|
|||||||
height="180rpx"
|
height="180rpx"
|
||||||
:border="false"
|
:border="false"
|
||||||
backgroundColor="#eeeeee"
|
backgroundColor="#eeeeee"
|
||||||
></uni-nav-bar>
|
></uni-nav-bar> -->
|
||||||
|
<navBar :title="'兑换福利卡'" />
|
||||||
|
|
||||||
<view class="exchange-page">
|
<view class="exchange-page">
|
||||||
<!-- 顶部红色横幅 -->
|
<!-- 顶部红色横幅 -->
|
||||||
<view class="top-banner">
|
<view class="top-banner">
|
||||||
|
<image :src="bgImg" mode="widthFix" class="bg-img"></image>
|
||||||
<view class="banner-text">
|
<view class="banner-text">
|
||||||
<view class="line1">已兑换{{ exchangedCount }}张</view>
|
<view class="line1">已兑换{{ exchangedCount }}张</view>
|
||||||
<view class="line2" @click="goMyWelfare">查看现有权益</view>
|
<view class="line2" @click="goMyWelfare">查看现有权益</view>
|
||||||
@ -38,7 +40,8 @@
|
|||||||
</view>
|
</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">
|
<view class="code-inputs">
|
||||||
@ -58,6 +61,8 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, nextTick } from 'vue'
|
import { ref, computed, nextTick } from 'vue'
|
||||||
import api from '@/api/api';
|
import api from '@/api/api';
|
||||||
|
import navBar from '@/components/navBar/navBar.vue'
|
||||||
|
import bgImg from '@/static/fulicard_bg.png'
|
||||||
const exchangedCount = ref(5)
|
const exchangedCount = ref(5)
|
||||||
const code1 = ref('')
|
const code1 = ref('')
|
||||||
const code2 = ref('')
|
const code2 = ref('')
|
||||||
@ -164,22 +169,28 @@
|
|||||||
}
|
}
|
||||||
.top-banner{
|
.top-banner{
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 280rpx;
|
height: 286rpx;
|
||||||
background: linear-gradient(180deg,#ff6a4a 0%, #e93b2d 100%);
|
margin-top: calc(var(--status-bar-height) + 44px);
|
||||||
border-bottom-left-radius: 40rpx;
|
.bg-img{
|
||||||
border-bottom-right-radius: 40rpx;
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
z-index:0;
|
||||||
|
height: 286rpx;
|
||||||
|
}
|
||||||
.banner-text{
|
.banner-text{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 48rpx;
|
left: 50%;
|
||||||
top: 120rpx;
|
transform: translateX(-50%);
|
||||||
|
top: 80rpx;
|
||||||
|
z-index:1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
.line1{font-size: 44rpx;font-weight: 600;}
|
.line1{font-size: 44rpx;}
|
||||||
.line2{font-size: 36rpx;margin-top: 12rpx;}
|
.line2{font-size: 36rpx;margin-top: 12rpx;}
|
||||||
}
|
}
|
||||||
.help-btn{
|
.help-btn{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 40rpx;
|
right: 30rpx;
|
||||||
top: 90rpx;
|
top: 20rpx;
|
||||||
background: rgba(255,255,255,.95);
|
background: rgba(255,255,255,.95);
|
||||||
color: #e04835;
|
color: #e04835;
|
||||||
border-radius: 999rpx;
|
border-radius: 999rpx;
|
||||||
@ -189,8 +200,8 @@
|
|||||||
}
|
}
|
||||||
.tips{
|
.tips{
|
||||||
margin: 48rpx;
|
margin: 48rpx;
|
||||||
color: #333;
|
color: #000;
|
||||||
font-size: 32rpx;
|
font-size: 30rpx;
|
||||||
.paste-action{
|
.paste-action{
|
||||||
color: #007aff;
|
color: #007aff;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<uni-nav-bar
|
<!-- <uni-nav-bar
|
||||||
left-icon="left"
|
left-icon="left"
|
||||||
title="我的福利卡"
|
title="我的福利卡"
|
||||||
@clickLeft="goBack"
|
@clickLeft="goBack"
|
||||||
@ -8,11 +8,13 @@
|
|||||||
height="180rpx"
|
height="180rpx"
|
||||||
:border="false"
|
:border="false"
|
||||||
backgroundColor="#eeeeee"
|
backgroundColor="#eeeeee"
|
||||||
></uni-nav-bar>
|
></uni-nav-bar> -->
|
||||||
|
<navBar :title="'我的福利卡'" />
|
||||||
|
|
||||||
<view class="benefits-page">
|
<view class="benefits-page">
|
||||||
<!-- 顶部红色横幅 -->
|
<!-- 顶部红色横幅 -->
|
||||||
<view class="top-banner">
|
<view class="top-banner">
|
||||||
|
<image :src="bgImg" mode="widthFix" class="bg-img"></image>
|
||||||
<view class="banner-text">
|
<view class="banner-text">
|
||||||
<view class="line1">已兑换{{ cardInfo.length }}张</view>
|
<view class="line1">已兑换{{ cardInfo.length }}张</view>
|
||||||
<view class="line2" @click="goMyWelfare">查看现有权益</view>
|
<view class="line2" @click="goMyWelfare">查看现有权益</view>
|
||||||
@ -39,9 +41,14 @@
|
|||||||
<!-- 有卡展示(多张) -->
|
<!-- 有卡展示(多张) -->
|
||||||
<view v-if="hasCard" >
|
<view v-if="hasCard" >
|
||||||
<view class="card-wrapper" v-for="(card, cIdx) in cardInfo" :key="card.id">
|
<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">
|
<view class="card-header">
|
||||||
<text>卡号:{{ card.idcard }}</text>
|
<image :src="logoImg" mode="widthFix" class="logo-img"></image>
|
||||||
<text class="time">兑换时间:{{ card.exchange_date }}</text>
|
<view class="headerbox">
|
||||||
|
<view>卡号:{{ card.idcard }}</view>
|
||||||
|
<view class="time">兑换时间:{{ card.exchange_date }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-body">
|
<view class="card-body">
|
||||||
<view class="benefit-line" v-for="(w, idx) in card.welfare_list" :key="idx">
|
<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>
|
<text class="text">{{ w.type_name }}{{ w.num }}{{ w.type_unit }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 加载提示 -->
|
<!-- 加载提示 -->
|
||||||
<view class="loadmore-tip" v-if="isLoading || isLastPage">
|
<view class="loadmore-tip" v-if="isLoading || isLastPage">
|
||||||
@ -76,7 +84,10 @@
|
|||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import jifenImg from "@/static/duihuan.png"
|
import jifenImg from "@/static/duihuan.png"
|
||||||
import emptyImg from "@/static/icon_empty.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 api from '@/api/api';
|
||||||
|
import logoImg from '@/static/logo_gdxz.png'
|
||||||
import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||||
// 是否有福利卡以及示例卡信息
|
// 是否有福利卡以及示例卡信息
|
||||||
const hasCard = ref(true)
|
const hasCard = ref(true)
|
||||||
@ -147,6 +158,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const goPointsDetail = () => {
|
const goPointsDetail = () => {
|
||||||
|
console.log('goPointsDetail')
|
||||||
uni.navigateTo({ url: '/pages_app/myWelfareCard/exchange' })
|
uni.navigateTo({ url: '/pages_app/myWelfareCard/exchange' })
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -398,23 +410,28 @@
|
|||||||
/* 顶部横幅与卡片样式 */
|
/* 顶部横幅与卡片样式 */
|
||||||
.top-banner{
|
.top-banner{
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 280rpx;
|
height: 286rpx;
|
||||||
background: linear-gradient(180deg,#ff6a4a 0%, #e93b2d 100%);
|
margin-top: calc(var(--status-bar-height) + 44px);
|
||||||
border-bottom-left-radius: 40rpx;
|
.bg-img{
|
||||||
border-bottom-right-radius: 40rpx;
|
position: absolute;
|
||||||
@include shadow;
|
width: 100%;
|
||||||
|
z-index:0;
|
||||||
|
height: 286rpx;
|
||||||
|
}
|
||||||
.banner-text{
|
.banner-text{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 48rpx;
|
left: 50%;
|
||||||
top: 120rpx;
|
transform: translateX(-50%);
|
||||||
|
top: 80rpx;
|
||||||
|
z-index:1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
.line1{font-size: 44rpx;font-weight: 600;}
|
.line1{font-size: 44rpx;}
|
||||||
.line2{font-size: 36rpx;margin-top: 12rpx;}
|
.line2{font-size: 36rpx;margin-top: 12rpx;}
|
||||||
}
|
}
|
||||||
.help-btn{
|
.help-btn{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 40rpx;
|
right: 30rpx;
|
||||||
top: 90rpx;
|
top: 20rpx;
|
||||||
background: rgba(255,255,255,.95);
|
background: rgba(255,255,255,.95);
|
||||||
color: #e04835;
|
color: #e04835;
|
||||||
border-radius: 999rpx;
|
border-radius: 999rpx;
|
||||||
@ -424,27 +441,51 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card-wrapper{
|
.card-wrapper{
|
||||||
|
position: relative;
|
||||||
margin: 24rpx 30rpx;
|
margin: 24rpx 30rpx;
|
||||||
background: #fff;
|
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@include shadow;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
.cardbox{
|
||||||
|
position: relative;
|
||||||
|
z-index:2;
|
||||||
|
}
|
||||||
|
.card-img{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
z-index:0;
|
||||||
|
height: 336rpx;
|
||||||
|
}
|
||||||
.card-header{
|
.card-header{
|
||||||
background: linear-gradient(90deg,#ff7e4a,#ff4d2e);
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 24rpx 28rpx;
|
padding: 4rpx 28rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
align-items: center;
|
||||||
|
.headerbox{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
.time{opacity:.95}
|
.time{opacity:.95}
|
||||||
|
.logo-img{
|
||||||
|
width:94rpx;
|
||||||
|
height: 94rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.card-body{
|
.card-body{
|
||||||
padding: 34rpx 28rpx 40rpx;
|
padding:92rpx 28rpx;
|
||||||
.benefit-line{
|
.benefit-line{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #333;
|
color: #8B2316;
|
||||||
line-height: 56rpx;
|
line-height: 56rpx;
|
||||||
.index{color:#333}
|
text-align: center;
|
||||||
|
.index{color:#8B2316;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -138,6 +138,22 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
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([
|
const bannerList = ref([
|
||||||
@ -207,13 +223,12 @@
|
|||||||
|
|
||||||
// 方法
|
// 方法
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack({
|
if(!from.vlaue){
|
||||||
fail() {
|
plus.runtime.quit();
|
||||||
uni.redirectTo({
|
return true;
|
||||||
url: '/pages/index/index'
|
}else{
|
||||||
});
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSearch = () => {
|
const showSearch = () => {
|
||||||
|
|||||||
@ -71,9 +71,9 @@
|
|||||||
<view class="priceImg" style="margin-top: -4rpx;">
|
<view class="priceImg" style="margin-top: -4rpx;">
|
||||||
<up-image :src="downLoadImg" width="32rpx" height="32rpx" ></up-image>
|
<up-image :src="downLoadImg" width="32rpx" height="32rpx" ></up-image>
|
||||||
</view>
|
</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="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.price/100>item.discount && item.discount>0">原价<text class="jiaprice">{{fromatPrice(item.price/100)}}</text></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-if="item.price==0 || item.discount===0" class="free">免费</text>
|
<text v-else-if="item.price<=0 || item.discount===0 || item.price*item.discount==0 " class="free">免费</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -756,7 +756,7 @@
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
|
|
||||||
.filter-content {
|
.filter-content {
|
||||||
margin-top:245rpx;
|
margin-top:calc(var(--status-bar-height) + 44px + 102rpx);
|
||||||
|
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
// border-radius: 20rpx 20rpx 0 0;
|
// border-radius: 20rpx 20rpx 0 0;
|
||||||
@ -767,7 +767,7 @@
|
|||||||
.filter-tags {
|
.filter-tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 20rpx;
|
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
max-height: 65vh;
|
max-height: 65vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -775,7 +775,13 @@
|
|||||||
.tag-item {
|
.tag-item {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
color: #666;
|
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;
|
border-radius: 30rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
border: 2rpx solid #efefef;
|
border: 2rpx solid #efefef;
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
|
|
||||||
<view class="download-bar" @click="downloadGanDanFile('free')" v-if="orderInfo &&orderInfo.price==0 && downLoadStatus == 'start'">
|
<view class="download-bar" @click="downloadGanDanFile('free')" v-if="orderInfo &&orderInfo.price==0 && downLoadStatus == 'start'">
|
||||||
<view class="download-inner">
|
<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-text">免费</text>
|
<text class="download-text">免费</text>
|
||||||
<text class="download-unit">下载</text>
|
<text class="download-unit">下载</text>
|
||||||
@ -69,7 +70,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="download-bar" @click="downLoadByType" v-else-if="!order && price>0">
|
<view class="download-bar" @click="downLoadByType" v-else-if="!order && price>0">
|
||||||
<view class="download-inner">
|
<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-price">{{ price }}</text>
|
<text class="download-price">{{ price }}</text>
|
||||||
<text class="download-unit">元</text>
|
<text class="download-unit">元</text>
|
||||||
@ -77,7 +79,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="download-bar" v-else-if="!order && price<0">
|
<view class="download-bar" v-else-if="!order && price<0">
|
||||||
<view class="download-inner">
|
<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>
|
<text class="download-text">本课件不支持下载</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -123,6 +125,7 @@ import friendImg from "@/static/share_wxc.png";
|
|||||||
import logoImg from "@/static/weiboShare.png";
|
import logoImg from "@/static/weiboShare.png";
|
||||||
import downloadStore from "@/store/downloadStorePpt.js";
|
import downloadStore from "@/store/downloadStorePpt.js";
|
||||||
import unidialog from "@/components/dialog/dialog.vue";
|
import unidialog from "@/components/dialog/dialog.vue";
|
||||||
|
import downloadImg from "@/static/ppt_dw.png";
|
||||||
const freeVisible = ref(false);
|
const freeVisible = ref(false);
|
||||||
const freeContent = ref('');
|
const freeContent = ref('');
|
||||||
const canDownload = ref(false);
|
const canDownload = ref(false);
|
||||||
@ -130,6 +133,8 @@ const orderId = ref('');
|
|||||||
import otherHost from "@/utils/otherHost.js";
|
import otherHost from "@/utils/otherHost.js";
|
||||||
import docUrl from "@/utils/docUrl.js";
|
import docUrl from "@/utils/docUrl.js";
|
||||||
const isFirstDownload = ref(false);
|
const isFirstDownload = ref(false);
|
||||||
|
const path=ref('');
|
||||||
|
const from=ref('');
|
||||||
const freeConfirm = () => {
|
const freeConfirm = () => {
|
||||||
freeVisible.value = false;
|
freeVisible.value = false;
|
||||||
downloadGanDanFile();
|
downloadGanDanFile();
|
||||||
@ -155,13 +160,23 @@ const goBack = () => {
|
|||||||
if (taskIndex !== -1) {
|
if (taskIndex !== -1) {
|
||||||
removeTask(taskIndex);
|
removeTask(taskIndex);
|
||||||
}
|
}
|
||||||
uni.navigateBack();
|
if(from.value){
|
||||||
|
plus.runtime.quit();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
uni.navigateBack();
|
if(from.value){
|
||||||
|
plus.runtime.quit();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onBackPress((event)=>{
|
onBackPress((event)=>{
|
||||||
@ -182,12 +197,22 @@ onBackPress((event)=>{
|
|||||||
if (taskIndex !== -1) {
|
if (taskIndex !== -1) {
|
||||||
removeTask(taskIndex);
|
removeTask(taskIndex);
|
||||||
}
|
}
|
||||||
uni.navigateBack();
|
if(from.value){
|
||||||
|
plus.runtime.quit();
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(from.value){
|
||||||
|
plus.runtime.quit();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -210,6 +235,8 @@ const shareTitle = ref("课件分享");
|
|||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options);
|
console.log(options);
|
||||||
uuid.value = options.uuid;
|
uuid.value = options.uuid;
|
||||||
|
path.value =decodeURIComponent(options.src);
|
||||||
|
from.value = options.from;
|
||||||
checkUser(options);
|
checkUser(options);
|
||||||
//ganDanFileDetials();
|
//ganDanFileDetials();
|
||||||
});
|
});
|
||||||
@ -586,6 +613,8 @@ const collection = () => {
|
|||||||
.collection({
|
.collection({
|
||||||
other_uuid: uuid.value,
|
other_uuid: uuid.value,
|
||||||
type: 6,
|
type: 6,
|
||||||
|
path: path.value,
|
||||||
|
title: orderInfo.value.name,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1136,7 +1136,7 @@ $accent-color: #4a90e2;
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
|
|
||||||
.filter-content {
|
.filter-content {
|
||||||
margin-top: 247rpx;
|
margin-top: calc(var(--status-bar-height) + 44px + 108rpx);
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
// border-radius: 20rpx 20rpx 0 0;
|
// border-radius: 20rpx 20rpx 0 0;
|
||||||
|
|||||||
@ -138,6 +138,7 @@
|
|||||||
const innerSortTitle = ref("上传时间");
|
const innerSortTitle = ref("上传时间");
|
||||||
import downloadStore from "@/store/downloadStoreFile.js";
|
import downloadStore from "@/store/downloadStoreFile.js";
|
||||||
const downloadTasks=ref([]);
|
const downloadTasks=ref([]);
|
||||||
|
import isAndroid from "@/utils/platform.js";
|
||||||
const downLoadtaskList=computed(()=>{
|
const downLoadtaskList=computed(()=>{
|
||||||
return downloadTasks.value.filter((item)=>item.status == "completed" && item.type == "zhinan");
|
return downloadTasks.value.filter((item)=>item.status == "completed" && item.type == "zhinan");
|
||||||
});
|
});
|
||||||
@ -238,6 +239,7 @@
|
|||||||
if(item.id == cell.id) {
|
if(item.id == cell.id) {
|
||||||
console.log(2222222222);
|
console.log(2222222222);
|
||||||
console.log(item.localPath);
|
console.log(item.localPath);
|
||||||
|
if(isAndroid){
|
||||||
plus.runtime.openFile(item.localPath, function(e) {
|
plus.runtime.openFile(item.localPath, function(e) {
|
||||||
console.log('打开成功');
|
console.log('打开成功');
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
@ -248,6 +250,29 @@
|
|||||||
});
|
});
|
||||||
console.log('打开失败:' + e.message);
|
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({
|
// uni.openDocument({
|
||||||
// filePath: item.localPath,
|
// filePath: item.localPath,
|
||||||
// fileType: 'pdf',
|
// fileType: 'pdf',
|
||||||
|
|||||||
@ -103,13 +103,13 @@ const goBack = () => uni.navigateBack()
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.page { min-height: 100vh; background: #fff; }
|
.page { min-height: 100vh; background: #fff; }
|
||||||
.content { position: absolute; top: calc(var(--status-bar-height) + 44px); bottom: 0; left: 0; right: 0; 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; }
|
.row { display: flex; align-items: center; padding: 10rpx 0; }
|
||||||
.label { color: #333; font-size: 30rpx; width: 180rpx; }
|
.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 { font-size: 30rpx; }
|
||||||
.status.paid { color: #333; }
|
.status.paid { color: #666; }
|
||||||
.status.unpaid { color: #333; }
|
.status.unpaid { color: #666; }
|
||||||
.list-footer { text-align: center; color: #999; padding: 24rpx 0; }
|
.list-footer { text-align: center; color: #999; padding: 24rpx 0; }
|
||||||
.empty { text-align: center; color: #999; padding: 40rpx 0; }
|
.empty { text-align: center; color: #999; padding: 40rpx 0; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
static/carditem_bg.png
Normal file
BIN
static/carditem_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
BIN
static/flupan_big2.png
Normal file
BIN
static/flupan_big2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
BIN
static/logo_gdxz.png
Normal file
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
BIN
static/ppt_dw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@ -88,6 +88,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
let isAndroid = false;
|
let isAndroid = false;
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log('平台');
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if(res.os == 'android'){
|
if(res.platform == 'android'){
|
||||||
isAndroid = true;
|
isAndroid = true;
|
||||||
}else{
|
}else{
|
||||||
isAndroid = false;
|
isAndroid = false;
|
||||||
|
|||||||
@ -120,6 +120,9 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
|||||||
if(process.env.UNI_PLATFORM == "mp-weixin"){
|
if(process.env.UNI_PLATFORM == "mp-weixin"){
|
||||||
uni.redirectTo({url:'/pages_app/login/login'})
|
uni.redirectTo({url:'/pages_app/login/login'})
|
||||||
}
|
}
|
||||||
|
// else{
|
||||||
|
// uni.navigateTo({url:'/pages_app/login/login'})
|
||||||
|
// }
|
||||||
uni.sendNativeEvent('getNewToken', {
|
uni.sendNativeEvent('getNewToken', {
|
||||||
msg: 'getNewToken'
|
msg: 'getNewToken'
|
||||||
},ret => {
|
},ret => {
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
const version="4.1.9"
|
const version="4.2.0"
|
||||||
export default version
|
export default version
|
||||||
Loading…
x
Reference in New Issue
Block a user