添加日记、开放查看我的分享人

master
chen 2022-01-01 17:47:29 +08:00
commit d8651a5f01
29 changed files with 509 additions and 34 deletions

View File

@ -26,6 +26,7 @@
.home-quan-box{background: rgba(0,0,0,.54);position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11;display: flex;justify-content: center;flex-direction: column;align-items: center;} .home-quan-box{background: rgba(0,0,0,.54);position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 11;display: flex;justify-content: center;flex-direction: column;align-items: center;}
.home-quan-box image:first-child{width: 542rpx;height: 600rpx;} .home-quan-box image:first-child{width: 542rpx;height: 600rpx;}
.home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;} .home-quan-box image:last-child{width: 96rpx;height: 96rpx;margin-top: 56rpx;}
.shopKf{position: fixed;right: 16rpx;bottom: 140rpx;z-index: 999;}
/* 分类 */ /* 分类 */
.catemo{color: #4D4D4D;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;} .catemo{color: #4D4D4D;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;}
.cateActive{background-color: #F5F5F5;border-radius: 10rpx 0rpx 0rpx 10rpx;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;} .cateActive{background-color: #F5F5F5;border-radius: 10rpx 0rpx 0rpx 10rpx;padding: 20rpx 10rpx;text-align: center;margin-left: 10rpx;}
@ -76,6 +77,7 @@
.yutime{width: 160rpx;height: 130rpx;} .yutime{width: 160rpx;height: 130rpx;}
.timed{width: 210rpx;height: 80rpx;line-height: 80rpx;} .timed{width: 210rpx;height: 80rpx;line-height: 80rpx;}
.titlel{width: 18%;} .titlel{width: 18%;}
.titlel2{width: 20%;}
.height-68{height: 80rpx;} .height-68{height: 80rpx;}
.btnl{margin: 50rpx 80rpx;height: 90rpx;line-height: 90rpx;} .btnl{margin: 50rpx 80rpx;height: 90rpx;line-height: 90rpx;}
/* 客户列表 */ /* 客户列表 */
@ -136,7 +138,7 @@
.cart-box .posia,.detail-cart-box .posia{background: #F85050;width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;color: #FFFFFF;font-size: 24rpx;text-align: center;top: 20rpx;right: 20rpx;} .cart-box .posia,.detail-cart-box .posia{background: #F85050;width: 36rpx;height: 36rpx;line-height: 36rpx;border-radius: 100%;color: #FFFFFF;font-size: 24rpx;text-align: center;top: 20rpx;right: 20rpx;}
.cart-box .posia view,.detail-cart-box .posia view{transform: scale(.8);} .cart-box .posia view,.detail-cart-box .posia view{transform: scale(.8);}
.moban{background: rgba(0,0,0,.54);width: 100%;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 2;} .moban{background: rgba(0,0,0,.54);width: 100%;position: fixed;top: 0;left: 0;right: 0;bottom: 0;z-index: 2;}
.detail-cart-box{position: fixed;right: 30rpx;bottom: 300rpx;} .detail-cart-box{position: fixed;right: 30rpx;bottom: 300rpx;z-index: 999;}
/* 商品详情 */ /* 商品详情 */
.activelei,.molei{border-radius: 20rpx;padding: 10rpx 24rpx;color: #333333;margin-left: 20rpx;} .activelei,.molei{border-radius: 20rpx;padding: 10rpx 24rpx;color: #333333;margin-left: 20rpx;}
.activelei{color: #FFFFFF;} .activelei{color: #FFFFFF;}
@ -287,6 +289,22 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.message-status{border-radius: 5rpx;font-size: 24rpx;color: #FFFFFF;padding: 2rpx 8rpx 4rpx 6rpx;transform: scale(.8);} .message-status{border-radius: 5rpx;font-size: 24rpx;color: #FFFFFF;padding: 2rpx 8rpx 4rpx 6rpx;transform: scale(.8);}
/* 我的日记 */
.diary-img{margin-right: 13rpx;width: 32%; height: 212rpx;background-color: #F5F5F5;border-radius: 12rpx;}
.diary-img:nth-child(3n){
margin-right: 0;
}
.diary-item-img {
width: 32%;height: 168rpx;border-radius: 10rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.diary-item-img .addImg {
height: 168rpx;width: 100%;border-radius: 10rpx;
}
.diary-item-img:nth-child(3n){
margin-right: 0;
}
@media screen and (height:812px){ @media screen and (height:812px){
.blue-img{height: 500rpx;} .blue-img{height: 500rpx;}
} }

View File

@ -156,6 +156,24 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}
,{
"path" : "my-diary/my-diary",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "my-diary-edit/my-diary-edit",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
] ]
}, },

View File

@ -46,8 +46,8 @@
</view> </view>
</view> </view>
<view class="disja posir" style="z-index: 1;margin-top: 75rpx;"> <view class="disja posir" style="z-index: 1;margin-top: 75rpx;">
<view @tap="chooseone(indext)" class="disac fc flexs width33" v-for="(itemt,indext) in tongList" :key="indext"> <view @tap="chooseone(indext)" class="disac fc flexs width25" v-for="(itemt,indext) in tongList" :key="indext">
<view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2"></text></view> <view class="fon28 bold mar-sx20 clips1">{{itemt.num}}<text v-if="indext==2"></text><text v-if="indext==3"></text></view>
<view class="fon28 mar-x25">{{itemt.title}}</view> <view class="fon28 mar-x25">{{itemt.title}}</view>
</view> </view>
</view> </view>
@ -167,7 +167,8 @@
tongList:[ tongList:[
{num:'0',title:'我的积分'}, {num:'0',title:'我的积分'},
{num:'0',title:'孔雀币'}, {num:'0',title:'孔雀币'},
{num:'0',title:'连续签到'} {num:'0',title:'连续签到'},
{num:'0',title:'我的分享人'}
], ],
yuanList:[], //'customer-list','footmarks','scan' yuanList:[], //'customer-list','footmarks','scan'
zanCyuanList:[ zanCyuanList:[
@ -199,6 +200,7 @@
{src:'/static/public/staff-collection60.png',title:'收藏',num:''}, {src:'/static/public/staff-collection60.png',title:'收藏',num:''},
{src:'/static/public/staff-share.png',title:'分享中心',num:''}, {src:'/static/public/staff-share.png',title:'分享中心',num:''},
{src:'/static/public/staff-msg60.png',title:'消息通知',num:''}, {src:'/static/public/staff-msg60.png',title:'消息通知',num:''},
{src:'/static/public/diary.png',title:'我的日记',num:''},
{src:'/static/public/staff-tou60.png',title:'投诉与建议',num:''}, {src:'/static/public/staff-tou60.png',title:'投诉与建议',num:''},
{src:'/static/public/staff-about60.png',title:'关于我们',num:''}, {src:'/static/public/staff-about60.png',title:'关于我们',num:''},
], ],
@ -397,6 +399,7 @@
}, },
chooseone(index){ chooseone(index){
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})} if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
if(index==3){uni.navigateTo({url:'/pagesB/mysharer/mysharer'})}
}, },
goPageNew(index){ goPageNew(index){
if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})} if(index==0){uni.navigateTo({url:'/pagesA/pointsMall/pointsMall'})}
@ -408,16 +411,17 @@
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})} if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})} if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
}, },
goPageTwo(index){// goPageTwo(index){//
if(index!=7){ if(index!=8){
let newUrl = '' let newUrl = ''
if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment' if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
if(index==1) newUrl = '/pagesB/personalPoster/personalPoster' if(index==1) newUrl = '/pagesB/personalPoster/personalPoster'
if(index==2) newUrl = '/pagesB/myCollection/myCollection' if(index==2) newUrl = '/pagesB/myCollection/myCollection'
if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter' if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter'
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter' if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
if(index==5) newUrl = '/pagesA/suggestions/suggestions' if(index==5) newUrl = '/pagesA/my-diary/my-diary'
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs' if(index==6) newUrl = '/pagesA/suggestions/suggestions'
if(index==7) newUrl = '/pagesB/aboutUs/aboutUs'
uni.navigateTo({ uni.navigateTo({
url:newUrl url:newUrl
}) })

View File

@ -77,7 +77,8 @@
{{item1.zhePrice}} {{item1.zhePrice}}
</view> </view>
</view> </view>
<view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view> <!-- <view v-if="item1.isXian || item1.isPing || item1.isTuan" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view> -->
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view> </view>
<view v-if="item1.isPing" class="disjbac mar-s20"> <view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view> <view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>
@ -115,7 +116,8 @@
{{item1.zhePrice}} {{item1.zhePrice}}
</view> </view>
</view> </view>
<view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view> <!-- <view v-if="item1.isTuan || item1.isPing || item1.isXian" class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view> -->
<view class="fon24" style="text-decoration: line-through;color: #C7C7C7;">{{item1.yuanPrice}}</view>
</view> </view>
<view v-if="item1.isPing" class="disjbac mar-s20"> <view v-if="item1.isPing" class="disjbac mar-s20">
<view class="fon24 col80">已拼团{{item1.activity_group_num}}</view> <view class="fon24 col80">已拼团{{item1.activity_group_num}}</view>

View File

@ -94,7 +94,7 @@
</view> </view>
<view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;"> <view class="disjbac posixzy bacf pad-zy32" style="height: 124rpx;line-height: 124rpx;">
<!-- 去支付 --> <!-- 去支付 -->
<view class="fon36 colf8 bold" v-if="isNei!=3">{{allPrice}}<span v-if="isKq">+{{zf_kqPrice}}</span></view> <view class="fon36 colf8 bold" v-if="isNei!=3">{{allPrice<0?0:allPrice}}<span v-if="isKq">+{{zf_kqPrice}}</span></view>
<view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分</span>{{allPrice}}<span v-if="isExpress && expressInfo.default_price!=0">+ {{expressInfo.default_price}}</span></view> <view class="fon40 colf8 bold dis" v-else><span class="col3 fon28">合计积分</span>{{allPrice}}<span v-if="isExpress && expressInfo.default_price!=0">+ {{expressInfo.default_price}}</span></view>
<view @tap="goPayment" v-if="isNei!=3" class="goPayment"></view> <view @tap="goPayment" v-if="isNei!=3" class="goPayment"></view>
<view @tap="isDui=true" v-else class="goPayment">去兑换</view> <view @tap="isDui=true" v-else class="goPayment">去兑换</view>
@ -154,7 +154,7 @@
<view class="bacf radius20 mar-s20 mar-zy20 success-box"> <view class="bacf radius20 mar-s20 mar-zy20 success-box">
<image src="/static/public/pay-success.png" mode=""></image> <image src="/static/public/pay-success.png" mode=""></image>
<view class="fon28 col3 pad-s20 pad-x40">支付成功</view> <view class="fon28 col3 pad-s20 pad-x40">支付成功</view>
<view class="success-hj"><span v-if="isNei!=3">{{jsPrice}}</span><span v-else>{{jsPrice}}</span></view> <view class="success-hj"><span v-if="isNei!=3">{{jsPrice<0?0:jsPrice}}</span><span v-else>{{jsPrice}}</span></view>
<view class="disja success-btn"> <view class="disja success-btn">
<view @tap="goDetail"></view> <view @tap="goDetail"></view>
<view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view> <view @tap="goShop" class="colf" :style="{background:publicColor}">再逛一逛</view>

View File

@ -0,0 +1,274 @@
<template>
<view>
<auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile>
<!-- 状态栏 -->
<status-nav :titleVal="'写日记'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy20">
<view class="mar-s30 bacf pad20" style="border-radius: 20rpx 20rpx 0 0;">
<!-- 日记标题 -->
<view class="disac mar-s20">
<view class="mar-y20 flexs titlel2">日记标题</view>
<view class="width100 radius10 pad-zy20 borbot-cc height-68">
<input v-model="diary_title" class="fon28 height-68" type="text" value="" placeholder="今天是2021年的最后一天" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 详细内容 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs mar-s20 titlel2">详细内容</view>
<view class="width100 radius10 pad20 borbot-cc" style="height: 300rpx;">
<textarea v-model="diary_content" class="fon28" maxlength="500" style="height: 300rpx;width: auto;" placeholder="请输入详细内容" placeholder-style="color:#999999;"/>
</view>
</view>
<!-- 选择病种 -->
<view class="disac pad-s32">
<view class="flexs mar-y20 titlel2">选择病种</view>
<!-- 下拉列表 -->
<view @tap="openXial(0)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{disease}}</view>
<image :class="isdisease?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isdisease" class="posia bacf radius10 xial-box mar-s20">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl,0)" :class="diseaseCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in diseaseArr" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
</view>
<!-- 关联医生 -->
<view class="disac pad-s32">
<view class="flexs mar-y20 titlel2">关联医生</view>
<!-- 下拉列表 -->
<view @tap="openXial(1)" class="disjbac width100 radius10 pad-zy20 xiala posir">
<view>{{diary_doctor}}</view>
<image :class="isdiary_doctor?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<view v-if="isdiary_doctor" class="posia bacf radius10 xial-box mar-s20">
<view class="pad-zy20 xial-item-box">
<view @tap="chooseXia(indexl,1)" :class="diary_doctorCurrent==indexl?'pcol':''" v-for="(iteml,indexl) in diary_doctorArr" :key="indexl">{{iteml.title}}</view>
</view>
</view>
</view>
</view>
<!-- 添加封面 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs titlel2">添加封面</view>
<view class="width100">
<view class="posir" v-if="fengImg!=''" class="posir" style="width: 32%;">
<image :src="fengImg" class="diary-item-img" style="width: 100%;" mode="aspectFill"></image>
<image @tap="clearfengImg" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image>
</view>
<image v-else @tap="updataImg(0)" class="diary-item-img" src="../../static/public/diary-add.png" mode="aspectFill"></image>
</view>
</view>
<!-- 添加图片 -->
<view class="dis mar-s20">
<view class="mar-y20 flexs titlel2">添加图片</view>
<view class="width100 disac fw">
<view v-for="(item,index) in imgArr" :key="index" class="diary-item-img posir">
<image :src="item" mode="aspectFill" class="addImg"></image>
<image @tap="clearaddImg(index)" src="../../static/public/closequan.png" class="posia" style="width: 20px;height: 20px;right: 10rpx;top: 10rpx;" mode=""></image>
</view>
<image v-if="imgArr.length!=9" @tap="updataImg(1)" class="diary-item-img" src="../../static/public/diary-add.png" mode="aspectFill"></image>
</view>
</view>
<!-- 底部按钮 -->
<view style="margin-top: 87rpx;margin-bottom: 30rpx;">
<view @tap="goAddDiary" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">立即提交</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {base64ToPath} from '@/jsFile/base64-src.js';
import empower from '@/components/empower.vue';
import {checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{empower},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
optionObj:'',
diary_title:'',//
diary_content:'',//
disease:'请选择病种',//
disease_id:'',//id
isdisease:false,
diseaseArr:[],
diseaseCurrent:0,
diary_doctor:'请选择关联医生',//
diary_doctor_id:'',//id
isdiary_doctor:false,
diary_doctorArr:[],
diary_doctorCurrent:0,
fengImg:'',
imgArr:[],
}
},
onUnload: function() {
},
onShow() {
},
onLoad(options) {
this.diseaseEv();
this.chooseEv();
//
if(options.id!=undefined){
this.checkDiaryInfo(options.id);
}
},
methods: {
goAddDiary(){
uni.navigateTo({
url:'/pagesA/my-diary-edit/my-diary-edit'
})
},
openXial(index){
if(index==0) {
this.isdisease = !this.isdisease
}
if(index==1) {
this.isdiary_doctor = !this.isdiary_doctor
}
},
chooseXia(index,num){//
if(num==0){
this.diseaseCurrent = index
this.disease = this.diseaseArr[index].title
this.disease_id = this.diseaseArr[index].id
} else {
this.diary_doctorCurrent = index
this.diary_doctor = this.diary_doctorArr[index].title
this.diary_doctor_id = this.diary_doctorArr[index].id
}
},
//
diseaseEv(){
this.$requst.post('archives/disease').then(res=>{
// console.log('',res);
if(res.code==0 && res.data.length!=0){
this.diseaseArr=[]
res.data.forEach(item=>{
let obj = {
id:item.id,
title:item.name,
pid:item.pid,
sort:item.sort
}
this.diseaseArr.push(obj)
})
// this.disease = this.diseaseArr[0].title;
// this.disease_id = this.diseaseArr[0].id;
}
},error=>{})
},
chooseEv(){//
this.$requst.post('user/doctor-list',{page:1,size:1000}).then(res=>{
if(res.code==0){
this.diary_doctorArr = [];
if(res.data.list.length){
res.data.list.forEach(item=>{
let obj = {
id:item.id,
title:item.name
}
this.diary_doctorArr.push(obj)
})
// this.diary_doctor = this.diary_doctorArr[0].title
// this.diary_doctor_id = this.diary_doctorArr[0].id
} else this.$toolAll.tools.showToast('暂无医生可选');
} else this.$toolAll.tools.showToast(res.msg);
})
},
updataImg(index){
if(index==0){
uni.chooseImage({
count:1,
sourceType:['album'],
success: (res) => {
let tempImg = res.tempFilePaths[0];
this.$requst.upload('file/upload/image',{file:tempImg}).then(res=>{
this.fengImg = this.$http + res.data.src;
this.$toolAll.tools.showToast('图片上传成功(*^▽^*)')
},error=>{})
}
})
} else {
uni.chooseImage({
count:9,
sourceType:['album'],
success: (res) => {
let tempImg = res.tempFilePaths;
let num = 0;
for (var i = 0; i < tempImg.length; i++) {
num++;
this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{
if(this.imgArr.length!=9){
this.imgArr.push(this.$http + res.data.src);
}
if(num==tempImg.length){
this.$toolAll.tools.showToast('上传成功(*^▽^*)')
} else {
this.$toolAll.tools.showToast('上传中...')
}
},error=>{})
}
}
})
}
},
clearfengImg(){
this.fengImg = '';
},
clearaddImg(index){
this.imgArr.splice(index,1);
},
submit(){
if(this.diary_title==''){
this.$toolAll.tools.showToast('请输入日记标题');
} else if(this.diary_content==''){
this.$toolAll.tools.showToast('请输入详细内容');
} else if(this.disease_id==''){
this.$toolAll.tools.showToast('请选择病种');
} else if(this.diary_doctor_id==''){
this.$toolAll.tools.showToast('请关联医生');
} else if(this.fengImg==''){
this.$toolAll.tools.showToast('请添加封面图');
} else {
let params = {
title :this.diary_title,
images:this.imgArr.join(','),
cover:this.fengImg,
disease_id:this.disease_id,
disease_name:this.disease,
content:this.diary_content,
doctor_id:this.diary_doctor_id,
doctor_name:this.diary_doctor,
id:''
}
this.$requst.get('user/diary',params).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('保存成功');
uni.navigateBack({delta:1})
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
}
},
//
// checkDiaryInfo(id){
// this.$requst.get('user/diary-info',{id:id}).then(res=>{
// if(res.code==0){
// if(this.page==1) this.dataList = [];
// this.total = res.data.total;
// } else this.$toolAll.tools.showToast(res.msg);
// },error=>{})
// }
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,111 @@
<template>
<view>
<!-- <auth-userInfo-mobile :optionObj="optionObj"></auth-userInfo-mobile> -->
<!-- 状态栏 -->
<status-nav :titleVal="'我的日记'" :statusTitle="true"></status-nav>
<view :style="{paddingTop: statusHNH+'px'}" class="pad-zy30" style="padding-bottom: 160rpx;">
<view v-if="dataList.length!=0" class="mar-s30 bacf pad20" v-for="(item,index) in dataList" :key="index" style="border-radius: 28rpx;">
<view class="clips1">{{item.title}}</view>
<view class="mar-s20 fon24 col9">{{item.content}}</view>
<view class="disac fw mar-s20">
<image class="diary-img mar-x10" :src="item1" v-for="(item1,index1) in item.imgArr" :key="index1" mode="aspectFit"></image>
</view>
<view class="disjbac mar-s20">
<view class="fon28 pcol bold">{{item.doctorName}}</view>
<view class="fon24 col9">{{item.creatTime}}</view>
</view>
<view @tap="delDiaryEv(item.id,index)" class="disac mar-s20 pad-s20" style="border-top: 2rpx solid #E6E6E6;">
<image src="../../static/public/del-diary.png" style="width: 20px;height: 20px;vertical-align: bottom;" mode=""></image>
<view class="fon28 colf8 bold" style="margin-top: -4rpx;">删除</view>
</view>
</view>
<nothing-page v-if="dataList.length==0" :content="'暂无日记'"></nothing-page>
</view>
<!-- 底部按钮 -->
<view class="posixzy pad-sx25">
<view @tap="goAddDiary" class="fon30 radius20 tc colf bold" style="margin: 0 83rpx;height: 90rpx;line-height: 90rpx;" :style="{background:publicColor}">添加日记</view>
</view>
</view>
</template>
<script>
import {base64ToPath} from '@/jsFile/base64-src.js';
import empower from '@/components/empower.vue';
import {checkBanner} from '@/jsFile/publicAPI.js';
export default {
components:{empower},
data() {
return {
statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor'),
optionObj:'',
dataList:[
{
title:'今天是2021年的最后一天了今天也要开心哟~',
content:'今天是2021年的最后一天了今天也要开心哟~,新的一年新的气象新的你们,房哈哈韩哈哈哈是是是技术舒适版舒适感湖胡淑华户数保护户户城市时尚感随时会输就输公司号几号的坏叔叔闭式水实时。',
imgArr:['../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png'],
doctorName:'植发·杨明医生',
creatTime:'2021.12.31 12:25:36',
},
{
title:'今天是2021年的最后一天了今天也要开心哟~',
content:'今天是2021年的最后一天了今天也要开心哟~,新的一年新的气象新的你们,房哈哈韩哈哈哈是是是技术舒适版舒适感湖胡淑华户数保护户户城市时尚感随时会输就输公司号几号的坏叔叔闭式水实时。',
imgArr:['../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png','../../static/public/back-home.png'],
doctorName:'植发·杨明医生',
creatTime:'2021.12.31 12:25:36',
}
],
page:1,
size:20,
total:'',//
isZanw:true,
}
},
onReachBottom() {
if(this.total!=this.dataList.length){
this.page++
this.checkDiaryEv()//
} else {
if(this.isZanw) this.$toolAll.tools.showToast('暂无更多日记','none',1000)
this.isZanw = false
}
},
onUnload: function() {
},
onShow() {
console.log(123);
this.checkDiaryEv();
},
onLoad() {
},
methods: {
goAddDiary(){
uni.navigateTo({
url:'/pagesA/my-diary-edit/my-diary-edit'
})
},
checkDiaryEv(){
this.$requst.get('user/diary',{page:this.page,size:this.size}).then(res=>{
if(res.code==0){
if(this.page==1) this.dataList = [];
this.total = res.data.total;
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
},
delDiaryEv(id,index){
this.$requst.get('user/diary-del',{id:id}).then(res=>{
if(res.code==0){
this.$toolAll.tools.showToast('删除成功');
this.dataList.splice(index,1);
} else this.$toolAll.tools.showToast(res.msg);
},error=>{})
}
}
}
</script>
<style>
</style>

View File

@ -92,6 +92,51 @@
}).exec() }).exec()
if(options.index==undefined){this.isWen = false;this.ntype = 'message';} if(options.index==undefined){this.isWen = false;this.ntype = 'message';}
this.checkMsg(); this.checkMsg();
let that = this ;
wx.showModal({
title: '温馨提示',
content: '为及时通知到您,需要向您申请消息发送权限,不会骚扰您的生活!',
confirmText:"同意",
cancelText:"拒绝",
success: function (res) {
if (res.confirm) {
//
console.log('用户点击确定', '订阅消息授权成功');
//
wx.requestSubscribeMessage({
tmplIds: ['d0efR-Ga27c6eIvx9mAwJcnAqzhM_Sq68XiFvjvlBJM','eyxvInLLF3L_wmcSQc_O7XLKF7RoGK1dM3OwKj5fHio'],
success: (res) => {
console.log(res, 'success')
},
fail: (res) => {
console.log(res, 'fail')
},
complete: (res) => {
wx.getSetting({
withSubscriptions: true,
success: (res) => {
console.log(res, '获取设置信息')
}
})
console.log(res, 'complete')
}
})
} else if (res.cancel) {
console.log('用户点击取消', '订阅消息授权');
///
wx.showModal({
title: '温馨提示',
content: '拒绝后您将无法获得及时的消息通知哦',
confirmText:"知道了",
showCancel:false,
success: function (res) {
///
///
}
});
}
}
});
}, },
methods: { methods: {
readMsg(index1,index2){ readMsg(index1,index2){

View File

@ -19,7 +19,7 @@
<view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}"> <view class="pad-x180" :style="{paddingTop: isNei!=3?(statusHNH+60)+'px':statusHNH+'px'}">
<!-- 自定义轮播 --> <!-- 自定义轮播 -->
<view v-if="isLoading"> <view v-if="isLoading">
<swiper-pu v-if="cateCurrent==0" :isplay="isAutoPlay" :browseP="true" :bannerList="bannerList" :newHeight="'450'" :newRadius="'0'" :newBottom="'5'"></swiper-pu> <swiper-pu v-if="cateCurrent==0" :isplay="isAutoPlay" :browseP="true" :bannerList="bannerList" :newHeight="swiperHeight" :newRadius="'0'" :newBottom="'5'"></swiper-pu>
<!-- <view v-if="isNei==3" class="score-box">{{detailObj.score}}</view> --> <!-- <view v-if="isNei==3" class="score-box">{{detailObj.score}}</view> -->
<view v-show="cateCurrent==isNum"> <view v-show="cateCurrent==isNum">
<view class="pad20 bacf mar-zy20 radius20 mar-s20"> <view class="pad20 bacf mar-zy20 radius20 mar-s20">
@ -39,7 +39,8 @@
<view>团购累计参与人员{{detailObj.activity_order_num}}</view> <view>团购累计参与人员{{detailObj.activity_order_num}}</view>
<view>还剩余{{detailObj.group_surplus_num}}</view> <view>还剩余{{detailObj.group_surplus_num}}</view>
</view> </view>
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">:</span><span v-if="isNei==1">:</span>{{detailObj.price/100}} <span v-if="isNei!=10">{{detailObj.original_price/100}}</span></view> <!-- <view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">:</span><span v-if="isNei==1">:</span>{{detailObj.price/100}} <span v-if="isNei!=10">{{detailObj.original_price/100}}</span></view> -->
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">:</span><span v-if="isNei==1">:</span>{{detailObj.price/100}} <span>{{detailObj.original_price/100}}</span></view>
<view class="mar-s20 shop-price" v-else>{{detailObj.score}}</view> <view class="mar-s20 shop-price" v-else>{{detailObj.score}}</view>
<view class="disjbac shar-box" style="align-items: flex-end;"> <view class="disjbac shar-box" style="align-items: flex-end;">
<view> <view>
@ -190,8 +191,8 @@
</view> </view>
</view> </view>
<!-- 客服 --> <!-- 客服 -->
<view @tap="lianK" style="position: fixed;right: 16rpx;bottom: 140rpx;"> <view @tap="lianK" class="shopKf">
<view class="posir" style="width: 142rpx;height: 142rpx;"> <view class="posir">
<image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image> <image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image>
<button v-if="haveImg" open-type="contact" class="posia-op"></button> <button v-if="haveImg" open-type="contact" class="posia-op"></button>
</view> </view>
@ -204,7 +205,8 @@
<view class="disjbac width100"> <view class="disjbac width100">
<view v-if="isNei!=3"> <view v-if="isNei!=3">
<view class="fon40 mar-sx10 colf8">{{skuDetail.price/100}}</view> <view class="fon40 mar-sx10 colf8">{{skuDetail.price/100}}</view>
<view v-if="isNei!=10"><span class="yuan-price">{{skuDetail.original_price/100}}</span></view> <!-- <view v-if="isNei!=10"><span class="yuan-price">{{skuDetail.original_price/100}}</span></view> -->
<view><span class="yuan-price">{{skuDetail.original_price/100}}</span></view>
</view> </view>
<view v-else><view class="fon40 mar-sx10 colf8">积分{{skuDetail.score}}</view></view> <view v-else><view class="fon40 mar-sx10 colf8">积分{{skuDetail.score}}</view></view>
<image @tap.stop="showTK=false" src="/static/public/cha-close.png" style="margin-right: 0rpx;" mode=""></image> <image @tap.stop="showTK=false" src="/static/public/cha-close.png" style="margin-right: 0rpx;" mode=""></image>
@ -279,6 +281,7 @@
statusHNH:uni.getStorageSync('statusHNH'), statusHNH:uni.getStorageSync('statusHNH'),
publicColor:uni.getStorageSync('publicColor') || '#3875F6',// publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0, cateCurrent:0,
swiperHeight:uni.getSystemInfoSync().windowWidth,
haveImg:true, haveImg:true,
cateList:[{ cateList:[{
id:1, id:1,

BIN
static/public/del-diary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

BIN
static/public/diary-add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/public/diary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long