作者 李康

合并分支 'lk' 到 'master'

Lk



查看合并请求 !29
.fristBox {
padding-bottom: 30rpx;
border-bottom: 2rpx solid #F7F8FA;
}
.userInfo {
display: flex;
}
.userInfo image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 12rpx;
box-sizing: border-box;
}
.userName {
font-size: 32rpx;
font-weight: 500;
text-align: LEFT;
color: #323233;
display: flex;
justify-content: space-between;
}
.userTime {
font-size: 24rpx;
font-weight: 400;
text-align: LEFT;
color: #969799;
}
.content {
font-size: 28rpx;
color: #22272b;
margin-top: 24rpx;
line-height: 48rpx;
}
.listName {
display: inline-block;
min-width: 592rpx;
overflow: hidden;
text-overflow: ellipsis;
}
.zan {
display: inline-block;
}
.zan image {
width: 32rpx;
height: 30rpx;
}
.name {
display: flex;
align-items: center;
font-size: 28rpx;
align-items: flex-start;
color: #ff8d29;
display: inline-block;
position: relative;
}
.messageContent {
font-size: 28rpx;
color: #7d7e80;
margin-bottom: 6rpx;
line-height: 44rpx;
}
.messageTime {
font-size: 24rpx;
color: #c8c9cc;
}
.bottomInput {
display: flex;
align-items: center;
padding: 0 32rpx;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 120rpx;
background: #fff;
z-index: 999;
}
.bottomInput image {
width: 30rpx;
height: 24rpx;
position: fixed;
bottom: 48rpx;
right: 60rpx;
}
.inputs {
width: 680rpx;
height: 68rpx;
border: 2rpx solid #ebedf0;
border-radius: 8rpx;
padding: 0 16rpx;
box-sizing: border-box;
}
... ...
... ... @@ -345,7 +345,7 @@
position: absolute;
bottom: 4rpx;
left: 4rpx;
z-index: -2;
z-index: 0;
}
.vanniceIcon1 {
... ...
... ... @@ -19,13 +19,14 @@
.inoutBox {
position: fixed;
top: 190rpx;
top: 198rpx;
background-color: #fff;
border-radius: 160rpx;
width: 83%;
margin-left: 8%;
padding: 16rpx 32rpx;
box-sizing: border-box;
height: 68rpx;
}
/* 分类 */
... ... @@ -160,8 +161,14 @@
.pinglunBox {
margin-left: 60rpx;
}
.diatyFa {
position: fixed;
bottom: 40rpx;
right: 0;
}
\ No newline at end of file
}
.placss {
color: #C8C9CC;
font-size: 28rpx;
}
... ...
... ... @@ -110,7 +110,7 @@
width: 100%;
height: 120rpx;
background: #fff;
z-index: 999;
}
.bottomInput image {
... ...
... ... @@ -343,7 +343,7 @@
}
.faqing .date-head {
background: linear-gradient(180deg, #e6d2ff, #b8bdff);
background: linear-gradient(180deg, #ffb2a7, #ff9b97);
color: #fff !important;
border-radius: 16rpx;
width: 80rpx;
... ...
... ... @@ -6,7 +6,6 @@
}
.inputBox {
height: 108rpx;
display: flex;
align-items: center;
}
... ... @@ -90,3 +89,8 @@
color: #969799;
border-bottom: 2rpx solid #969799;
}
.placss {
color: #C8C9CC;
font-size: 28rpx;
}
... ...
... ... @@ -161,7 +161,7 @@
"style": {
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTitleText": "帖子详情"
"navigationBarTitleText": "评论详情页面"
}
}, {
... ...
... ... @@ -136,7 +136,7 @@
this.id = options.id;
this.todayDate() //当前日期
this.indexPage()
// this.dreedingRecord()
this.dreedingRecord()
},
}
</script>
... ...
... ... @@ -35,10 +35,10 @@
<text style="width:160rpx;font-size: 28rpx;color: #323233;">我的宠物:</text>
<picker @change="bindPickerPet" :value="petIndex" :range="petList" range-key="name">
<view style="display:flex;align-items: center;">
<!-- <view class="select" v-if="petIndex==''">
<view class="select" v-if="petList==''" @click="goLogin">
请选择宠物
</view>-->
<view class="uni-input" v-if="petIndex!==''">{{petList[petIndex].name}}</view>
</view>
<view class="uni-input" v-else>{{petList[petIndex].name}}</view>
<image src="../../static/image/xuanze_icon@2x.png" style="width: 12rpx;height: 12rpx;margin: 12rpx 0 0 12rpx;"
mode=""></image>
</view>
... ... @@ -71,12 +71,12 @@
</view>
</view>
<view class='date-box'>
<view v-for="(item,index) in dateArr" :key="index" :class="today==item.isToday?'today':faqingList.indexOf(item.isToday)!==-1?'faqing':earlyList.indexOf(item.isToday)!==-1?'early':middleList.indexOf(item.isToday)!==-1?'middle':lateList.indexOf(item.isToday)!==-1?'lateDate':sbDate.indexOf(item.isToday)!==-1?'shengbing':yimiao.indexOf(item.isToday)!==-1?'yimiao':''"
<view v-for="(item,index) in dateArr" :key="index" :class="faqingList.indexOf(item.isToday)!==-1 ?'faqing':earlyList.indexOf(item.isToday)!==-1?'early':middleList.indexOf(item.isToday)!==-1?'middle':lateList.indexOf(item.isToday)!==-1?'lateDate':sbDate.indexOf(item.isToday)!==-1?'shengbing':yimiao.indexOf(item.isToday)!==-1?'yimiao':today==item.isToday?'today':''"
:data-faqing='faqing'>
<view class='date-head' @click='lookHuoDong' :data-year='year' :data-month='month' :data-datenum='item.dateNum'
style="position: relative;">
<view v-if="item.dateNum">{{item.dateNum}}
<view class="" style="position: absolute;top: 40rpx;font-size: 20rpx;width: 26px;display: flex;align-items: center;left: 1px;"
<view class="" style="position: absolute;top: 82rpx;font-size: 20rpx;width: 26px;display: flex;align-items: center;color: #FF8936;"
v-if="today==item.isToday">
今日
</view>
... ... @@ -96,8 +96,6 @@
<scroll-view scroll-x="true" class="colorBox scroll-view_H">
<view class="colorItem">
<view class="" style="display: flex;align-items: center;">
<!-- <view class="circle circlePublic">
</view> -->
<image src="/static/image/shengbing_icon@2x.png" mode="" style="width:32rpx;height:32rpx;margin-right:10rpx;"></image>
生病
</view>
... ... @@ -141,11 +139,11 @@
</view>
</view>
</scroll-view>
<view class="" class="reminberBox" v-if="isFaTrue">
<view class="" class="reminberBox" v-if="petList!=''">
<image src="/static/image/zhuyi.png" mode=""></image>
孕期不能打疫苗
</view>
<view class="" v-if="isFaTrue">
<view class="" v-if="petList!=''">
<view class="cwInfo">
<view class="pickerItem">
<view class="">
... ... @@ -155,7 +153,7 @@
<switch @change="switch1Change" :checked="heat" style="transform: scale(0.7,0.7)" />
</view>
</view>
<view class="pickerItem">
<view class="pickerItem" v-if="perShow">
<view class="">
配种
</view>
... ... @@ -171,7 +169,7 @@
<switch @change="switch3Change" :checked="shengbing" style="transform: scale(0.7,0.7)" />
</view>
</view>
<view class="pickerItem">
<view class="pickerItem" v-if="peizhong">
<view class="">
配种记录
</view>
... ... @@ -205,8 +203,11 @@
</view>
<view class="" style="display: flex;max-width: 500rpx; overflow: hidden;text-overflow: ellipsis;">
<view v-if="!symptomList" style="display: flex;margin-left: 20rpx;color: #A3A3A3;" class="selectText">{{SelectSym}}</view>
<view v-else class="selectText" v-for="(item,index) in symptomList" :key="index" style="margin-left: 20rpx;color: #A3A3A3;">
{{item.title}}
<!-- <view v-else class="selectText" v-for="(item,index) in symptomList" :key="index" style="margin-left: 20rpx;color: #A3A3A3;">
{{item}}
</view> -->
<view v-else class="selectText" style="margin-left: 20rpx;color: #A3A3A3;">
{{symptomList}}
</view>
</view>
... ... @@ -214,7 +215,6 @@
<view class="pickerItem">
<view class="">
体长
<view class="zhuyi" style="display: inline-block;" @click="golenght">
<image src="/static/image/zhuyi.png" mode="" class="zhuyiPic"></image>
(体长标准)
... ... @@ -242,24 +242,24 @@
</view>
<view class="selectText">
<view class="" @click="face(1)">
<image src="/static/image/chongquan_icon@2x.png" mode="" class="biaoqing" v-if="!face1"></image>
<image src="/static/image/biaoqing1_icon@2x.png" mode="" class="biaoqing" v-if="face1"></image>
<image src="/static/image/wei1_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex!=1"></image>
<image src="/static/image/biaoqing1_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex==1"></image>
</view>
<view class="" @click="face(2)">
<image src="/static/image/chongquan_icon@2x.png" mode="" class="biaoqing" v-if="!face2"></image>
<image src="../../static/image/weixiao_icon@2x.png" mode="" class="biaoqing" v-if="face2"></image>
<image src="/static/image/wei2_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex!=2"></image>
<image src="../../static/image/weixiao_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex==2"></image>
</view>
<view class="" @click="face(3)">
<image src="/static/image/chongquan_icon@2x.png" mode="" class="biaoqing" v-if="!face3"></image>
<image src="../../static/image/wunai_icon@2x.png" mode="" class="biaoqing" v-if="face3"></image>
<image src="/static/image/wei3_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex!=3"></image>
<image src="../../static/image/wunai_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex==3"></image>
</view>
<view class="" @click="face(4)">
<image src="/static/image/chongquan_icon@2x.png" mode="" class="biaoqing" v-if="!face4"></image>
<image src="../../static/image/shengqi_icon@2x.png" mode="" class="biaoqing" v-if="face4"></image>
<image src="/static/image/wei4_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex!=4"></image>
<image src="../../static/image/shengqi_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex==4"></image>
</view>
<view class="" @click="face(5)">
<image src="/static/image/chongquan_icon@2x.png" mode="" class="biaoqing" v-if="!face5"></image>
<image src="/static/image/ku_icon@2x.png" mode="" class="biaoqing" v-if="face5"></image>
<image src="/static/image/wei5_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex!=5"></image>
<image src="/static/image/ku_icon@2x.png" mode="" class="biaoqing" v-if="faceIndex==5"></image>
</view>
</view>
</view>
... ... @@ -268,7 +268,7 @@
备注
</view>
<view class="textarea">
<textarea @blur="bindTextAreaBlur" placeholder="请输入内容" v-model="textareaInput" />
<textarea @blur="bindTextAreaBlur" placeholder="请输入内容" v-model="textareaInput" />
</view>
</view>
</view>
... ... @@ -276,10 +276,10 @@
保存
</view>
</view>
<view class="noToken" v-if="!isFaTrue">
<view class="noToken" v-if="petList==''">
<image src="/static/image/weitianjia_img@2x.png" mode=""></image>
尚未添加宠物
<view class="addCwBtn" @click="addCw">
<view class="addCwBtn" @click="addCw">
立即添加
</view>
</view>
... ... @@ -296,25 +296,17 @@
},
data() {
return {
isFaTrue:[],
//显示弹框
confr:'',
perShow:0,
isShowWenDu:true,
qing:'',
tqWedu:0,
mapData:amap,
petDataList:[],
petStateList:[],
//宠物
petId:'', //宠物id
status:'', //是否在孕期
petIndex:0,
petList:[],
petNameList:[],
petIdList:[],
SelectSym:'请选择症状',
//宠物温度
petWD:'请选择温度',
//日历开始
year: '2021',
flag: true,
... ... @@ -339,10 +331,7 @@
//日历结束
topHtint: '当前气温较低,请注意宠物的保暖问题。',
userData: {
address: '',
waetherText: '晴',
waetherNum: '-1/5C',
myPet: '琪琪'
address: ''
},
token:'',
heat:false, //发情
... ... @@ -356,14 +345,14 @@
arrayWd: ['20','30','40'],
indexWd: '',
disease:'',
symptomList:'' , //症状
symptomList:'', //症状
textareaInput:'', //备注
face1:false, //表情
face2:false,
face3:false,
face4:false,
face5:false,
faceIndex:-1,//表情字段
showWendu:'请选择温度',
//显示id
sysId:{},
//自定义汉字
cuList:{}
}
},
methods: {
... ... @@ -407,14 +396,11 @@
},
//判断是否有宠物
isPet(){
let ary=[];
let ary1=[];
request.postRequest('/api/Pet/petList',{},data=>{
if(data.code==1){
let list = data.data.list;
this.petList = list;
this.petId = data.data.list.length>0?list[0].id:'';
console.log(this.petId)
this.petId = list.length>0?list[0].id:'';
if(this.petId){
this.getPetInfo()
}
... ... @@ -429,22 +415,24 @@
eat:this.slInput,
temperature:this.showWendu,
is_sick:this.shengbing?2:1,
symptom_id:this.symptom.toString(),
symptom_id:this.sysId.toString(),
length:this.tcInput,
weight:this.tzInput,
energy:this.energy,
energy:this.faceIndex,
note:this.textareaInput,
is_breeding:this.peizhong?2:1,
symptom:this.cuList.toString(),
// is_confirm:this.peizhong?2:1,
is_rut:this.heat?2:1
}
request.postRequest('/api/Index/recordEdit',postData,data=>{
if(data.code==1){
uni.removeStorage('parData')
uni.removeStorageSync('parData');
uni.removeStorageSync('custom');
uni.showToast({
title:'保存成功'
})
this.indexPage()
this.getPetInfo()
}else{
uni.showToast({
icon:'none',
... ... @@ -456,35 +444,10 @@
},
//表情
face(index){
switch(index){
case index=1:
this.face1=!this.face1;
this.energy=1
break;
case index=2:
this.face2=!this.face2;
this.energy=2
break;
case index=3:
this.face3=!this.face3
this.energy=3
break;
case index=4:
this.face4=!this.face4
this.energy=4
break;
case index=5:
this.face5=!this.face5
this.energy=5
break;
}
this.faceIndex=index
},
//日历
change(e) {
console.log(e);
},
lastMonth(){
let year = this.month-2<0 ? this.year - 1 : this.year;
let year = this.month-1<0 ? this.year - 1 : this.year;
let month = this.month - 1 < 0 ? 11 : this.month - 1;
this.year=year;
this.month=month+3;
... ... @@ -512,75 +475,70 @@
var month = e.currentTarget.dataset.month < 10 ? '0' + e.currentTarget.dataset.month : e.currentTarget.dataset.month
var date = e.currentTarget.dataset.datenum
var YMD = e.currentTarget.dataset.year + '-' + month + '-' + date;
// this.setData({
// dates: YMD,
// show: !this.data.show,
// daskShow: !this.data.daskShow
// })
},
dateInit: function(setYear, setMonth) {
let _this = this;
//全部时间的月份都是按0~11基准,显示月份才+1
let dateArr = []; //需要遍历的日历数组数据
let arrLen = 0; //dateArr的数组长度
let now = setYear ? new Date(setYear, setMonth) : new Date();
let year = setYear || now.getFullYear();
let nextYear = 0;
let month = setMonth || now.getMonth(); //没有+1方便后面计算当月总天数
let nextMonth = (month + 1) > 11 ? 1 : (month + 1);
let startWeek = new Date(month + 1 + '/1' + '/' + year).getDay(); //目标月1号对应的星期
let dayNums = new Date(year, nextMonth, 0).getDate(); //获取目标月有多少天
let obj = {};
let num = 0;
_this.year = year;
_this.month = month;
if (month + 1 > 11) {
nextYear = year + 1;
dayNums = new Date(nextYear, nextMonth, 0).getDate();
}
arrLen = startWeek + dayNums;
for (let i = 0; i < arrLen; i++) {
if (i >= startWeek) {
let num = Number(i - startWeek + 1);
num = num > 9 ? num : ('0' + num)
obj = {
isToday: '' + year + (Number(month + 1) < 10 ? '0' + (month + 1) : (month + 1)) + num,
dateNum: num,
weight: 5,
flag: false
}
} else {
obj = {};
}
dateArr[i] = obj;
_this.dateArr = dateArr;
let _this = this;
//全部时间的月份都是按0~11基准,显示月份才+1
let dateArr = []; //需要遍历的日历数组数据
let arrLen = 0; //dateArr的数组长度
let now = setYear ? new Date(setYear, setMonth) : new Date();
let year = setYear || now.getFullYear();
let nextYear = 0;
let month = setMonth || now.getMonth(); //没有+1方便后面计算当月总天数
let nextMonth = (month + 1) > 11 ? 1 : (month + 1);
let startWeek = new Date(month + 1 + '/1' + '/' + year).getDay(); //目标月1号对应的星期
let dayNums = new Date(year, nextMonth, 0).getDate(); //获取目标月有多少天
let obj = {};
let num = 0;
_this.year = year;
_this.month = month;
if (month + 1 > 11) {
nextYear = year + 1;
dayNums = new Date(nextYear, nextMonth, 0).getDate();
}
arrLen = startWeek + dayNums;
for (let i = 0; i < arrLen; i++) {
if (i >= startWeek) {
let num = Number(i - startWeek + 1);
num = num > 9 ? num : ('0' + num)
obj = {
isToday: '' + year + (Number(month + 1) < 10 ? '0' + (month + 1) : (month + 1)) + num,
dateNum: num,
weight: 5,
flag: false
}
let nowDate = new Date();
let nowYear = nowDate.getFullYear();
let nowMonth = nowDate.getMonth() + 1;
let nowWeek = nowDate.getDay();
let getYear = setYear || nowYear;
let getMonth = setMonth >= 0 ? (setMonth + 1) : nowMonth;
if (nowYear == getYear && nowMonth == getMonth) {
_this.isTodayWeek = true;
_this.todayIndex = nowWeek;
} else {
_this.isTodayWeek = false;
_this.todayIndex = -1;
} else {
obj = {};
}
dateArr[i] = obj;
_this.dateArr = dateArr;
}
let nowDate = new Date();
let nowYear = nowDate.getFullYear();
let nowMonth = nowDate.getMonth() + 1;
let nowWeek = nowDate.getDay();
let getYear = setYear || nowYear;
let getMonth = setMonth >= 0 ? (setMonth + 1) : nowMonth;
if (nowYear == getYear && nowMonth == getMonth) {
_this.isTodayWeek = true;
_this.todayIndex = nowWeek;
} else {
_this.isTodayWeek = false;
_this.todayIndex = -1;
}
},
faqings:function(){
let list=this.dateArr;
let lists=this.faqingList;
lists.forEach((item,index)=>{
list.forEach((items,indexs)=>{
if(item==items.isToday){
items.faqing=true;
}
},
faqings:function(){
let list=this.dateArr;
let lists=this.faqingList;
lists.forEach((item,index)=>{
list.forEach((items,indexs)=>{
if(item==items.isToday){
items.faqing=true;
}
})
})
},
})
})
},
switch1Change: function (e) {
this.heat=e.target.value
},
... ... @@ -591,39 +549,45 @@
this.shengbing=e.target.value
},
bindPickerPet: function(e) {
console.log(e)
uni.removeStorage('parData')
this.petIndex = e.target.value;
this.petId=this.petList[this.petIndex].id
this.getPetInfo();
this.dateInit();
uni.removeStorageSync('parData');
uni.removeStorageSync('custom');
},
getPetInfo(){
let that = this;
let param ={
date:this.getTime(),
p_id:this.petId
}
request.postRequest('/api/Index/index',param,data=>{
this.petDataList=data.data.list
this.petStateList=data.data.sate
this.slInput=!data.data.list.eat?'':data.data.list.eat
this.tcInput=!data.data.list.length?'':data.data.list.length
this.tzInput=!data.data.list.weight?'':data.data.list.weight
this.peizhong=data.data.list.is_breeding==1? false :true
this.heat=data.data.list.is_rut==1?false:true
this.shengbing=data.data.list.is_sick==1?false:true
this.wendu=data.data.list.temperature
this.textareaInput=!data.data.list.note?'':data.data.list.note
this.sbDate=data.data.sick
this.yimiao=data.data.vaccine
this.faqingList=data.data.rut
this.earlyList=data.data.pregnant_one
this.middleList=data.data.pregnant_two
this.lateList=data.data.pregnant_three
this.expectList=data.data.pregnant_four
this.showWendu=data.data.list.temperature
this.energy=data.data.list.energy
this.SelectSym=data.data.list.symptom
let info = data.data.list;
that.faqingList=data.data.rut
that.symptomList=info?info.symptom:''
that.sbDate=data.data.sick
that.yimiao=data.data.vaccine
that.sysId=info?info.symptom_id:''
that.symptom=info?info.symptom:''
that.slInput=info?info.eat:''
that.tcInput=info?info.length:''
that.tzInput=info?info.weight:''
that.peizhong=info?(info.is_breeding==1? false :true):false
that.heat=info?(info.is_rut==1? false :true):false
that.shengbing=info?(info.is_sick==1? false :true):false
that.textareaInput=info?info.note:''
that.earlyList=data.data.pregnant_one
that.middleList=data.data.pregnant_two
that.lateList=data.data.pregnant_three
that.expectList=data.data.pregnant_four
that.showWendu=info&&info.temperature?info.temperature:'请选择温度'
that.faceIndex=info?info.energy:''
this.perShow=data.data.per
if(data.data.pet.is_confirm==1){
this.showModalT()
}
})
},
bindPickerChangeZl: function(e) {
... ... @@ -639,8 +603,7 @@
this.tcInput= e.detail.value
},
bindPickerChangeWd: function(e) {
this.indexWd = e.target.value;
// this.wendu=this.arrayWd[this.indexWd]
this.indexWd = e.target.value;
this.showWendu=this.arrayWd[this.indexWd]
},
bindTextAreaBlur: function (e) {
... ... @@ -693,12 +656,20 @@
})
},
showModalT(){
let that=this
uni.showModal({
title: '是否进入怀孕模式',
content: '进入怀孕模式未来的55-70天 为预产期',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
let postData={
time:that.getTime(),
p_id:that.petId,
}
request.postRequest('/api/Index/recordEdit',postData,data=>{
})
} else if (res.cancel) {
console.log('用户点击取消');
}
... ... @@ -731,6 +702,19 @@
}
})
},
//登录
goLogin(){
let token = uni.getStorageSync('token')
if(token){
this.getPetInfo()
}else{
uni.showToast({
title:'请先登录',
duration:2000,
icon:'none'
})
}
},
havaWeather(){
var myAmapFun = new this.mapData.AMapWX({key:'f046b73f34f95e78d65438b8ed5fc579'});
myAmapFun.getWeather({
... ... @@ -746,69 +730,47 @@
console.log(info)
}
})
}
}
},
created() {
this.token=uni.getStorageSync('token')
//宠物列表
this.isPet();
//天气
this.havaWeather()
//日历
this.dateInit();
this.faqings();
this.todayDate() //当前日期
this.token=uni.getStorageSync('token')
let token= uni.getStorageSync('token')
//宠物列表
if(token){
this.isPet();
}
},
onShow() {
this.isShowWenDu=this.tqWedu <20 ?true:false
this.userData.address=uni.getStorageSync('address')
if(!this.petId){
this.symptomList=''
}else{
this.symptomList=uni.getStorageSync('parData')
let token= uni.getStorageSync('token')
//宠物列表
let pList=this.petList
console.log(pList)
if(pList.length<=0){
this.isPet();
}
this.havaWeather()
// this.isPet();
let parId=''
let opar=uni.getStorageSync('parData')
if(opar){
let datas=opar.map(x=>{
return parId.concat(x.id);
this.isShowWenDu=this.tqWedu <20 ?true:false;
this.userData.address=uni.getStorageSync('address');
let symlist=uni.getStorageSync('parData');
let cuslist=uni.getStorageSync('custom');
let sysId=symlist.map(x=>{
return x.id
})
this.symptom=datas
}
// let address = uni.getStorageSync('address')
// if(address){
// console.log('有地址')
// }else{
// let that= this
// uni.authorize({
// scope: 'scope.userLocation',
// success(res) {
// this.getLocations()
// },
// fail(err) {
// console.log(err)
// wx.showModal({
// title: '是否授权当前位置',
// content: '需要获取您的地理位置,请确认授权',
// confirmColor: '#f16765',
// success: res => {
// if (res.confirm) {
// wx.openSetting({
// success: data => {
// if (data.authSetting["scope.userLocation"]) {
// that.getLocations()
// }
// }
// })
// }
// }
// })
// }
// })
// }
this.sysId=sysId
let list = symlist.map(x=>{
return x.title
})
let ziList=cuslist.map(x=>{
return x
})
this.cuList=ziList
this.symptomList=list.concat(ziList)
}
}
</script>
... ... @@ -817,9 +779,4 @@
@import url("/common/uni.css");
@import url("/common/index.css");
@import url("/common/rili.css");
/* .container {
padding: 20px;
font-size: 14px;
line-height: 24px;
} */
</style>
... ...
<template>
<view class="container">
<view class="">
<view class="">
体长增长标准
</view>
<rich-text :nodes="dataList"></rich-text>
</view>
</view>
</template>
<script>
import request from '../../utils/request.js'
export default {
data() {
return {
dataList: ''
}
},
methods: {
info() {
request.postRequest('/api/Index/standard', {}, data => {
if (data.code == 1) {
this.dataList = data.data.list.length_content
}
})
}
},
created() {
this.info()
}
}
</script>
... ...
... ... @@ -53,11 +53,9 @@
location: (r.latitude + "," + r.longitude)
},
success: res => {
console.log(res.data.result.address)
wx.setStorageSync('city', res.data.result.address_component.city)
wx.setStorageSync('address', res.data.result.address)
uni.switchTab({
url: '/pages/index/index'
});
uni.navigateBack()
}
})
},
... ... @@ -68,7 +66,7 @@
console.log(err, 'errs')
}
})
uni.setStorageSync('token', onOk.data.token)
}
})
... ...
... ... @@ -20,7 +20,7 @@
</view>
<view class="qiun-charts">
<canvas canvas-id='LineA' id='LineA' class="charts" disable-scroll=true @touchstart="touchColumn" @touchmove="moveMix"
<canvas canvas-id='LineA' id='LineA' class="charts" disable-scroll='true' @touchstart="touchColumn" @touchmove="moveMix"
@touchend="touchEndMix"></canvas>
</view>
</view>
... ... @@ -43,7 +43,7 @@
</view>
</view>
<view class="qiun-charts">
<canvas canvas-id='LineB' id='LineB' class="charts" disable-scroll="true" @touchstart="touchColumnB" @touchmove="moveMixB"
<canvas canvas-id='LineB' id='LineB' class="charts" disable-scroll='true' @touchstart="touchColumnB" @touchmove="moveMixB"
@touchend="touchEndMixB"></canvas>
</view>
</view>
... ... @@ -127,8 +127,8 @@
methods: {
init() {
this.showLineA('LineA', this.lineAdata)
this.showLineA('LineB', this.lineBdata)
this.showLineA('LineC', this.lineCdata)
this.showLineB('LineB', this.lineBdata)
this.showLineC('LineC', this.lineCdata)
},
//体重分析
getWeightData(id) {
... ... @@ -148,7 +148,7 @@
})
this.lineAdata.categories = timeAry
this.lineAdata.series = [{
name: '123',
name: '体重情况',
data: numAry
}]
this.showLineA('LineA', this.lineAdata)
... ... @@ -172,7 +172,7 @@
})
this.lineBdata.categories = timeAry
this.lineBdata.series = [{
name: '123',
name: '体长情况',
data: numAry
}]
this.showLineB('LineB', this.lineBdata)
... ... @@ -196,7 +196,7 @@
})
this.lineCdata.categories = timeAry
this.lineCdata.series = [{
name: '123',
name: '饮食情况',
data: numAry
}]
this.showLineC('LineC', this.lineCdata)
... ... @@ -398,7 +398,6 @@
},
moveMix(e) {
LineA.scroll(e);
console.log(e, 'e')
},
touchEndMix(e) {
LineA.scrollEnd(e);
... ... @@ -419,7 +418,6 @@
},
moveMixB(e) {
LineB.scroll(e);
console.log(e, 'e')
},
touchEndMixB(e) {
LineA.scrollEnd(e);
... ... @@ -440,7 +438,6 @@
},
moveMixC(e) {
LineC.scroll(e);
console.log(e, 'e')
},
touchEndMixC(e) {
LineC.scrollEnd(e);
... ...
... ... @@ -79,18 +79,31 @@
indexX: -1,
indexY: -1,
indexZ: -1,
indexZD: -1
indexZD: -1,
//头部
toubu: [],
//腹部
fubu: [],
//身体
shenti: []
}
},
methods: {
//保存症状
onSave() {
let data = this.parData.filter((element, index, self) => {
return self.indexOf(element) === index;
})
console.log(data)
uni.setStorageSync('parData', data)
let tempArry = [];
if(this.toubu){
tempArry.push(this.toubu)
}
if(this.fubu){
tempArry.push(this.fubu)
}
if(this.shenti){
tempArry.push(this.shenti)
}
uni.setStorageSync('parData', tempArry)
uni.setStorageSync('custom', this.list4)
uni.navigateBack()
},
//症状
... ... @@ -105,32 +118,36 @@
},
selectX(item, index) {
this.indexX = item.id
this.parData.push(item)
this.toubu = item
},
selectY(item, index) {
this.indexY = item.id
this.parData.push(item)
this.fubu = item
},
selectZ(item, index) {
this.indexZ = item.id
this.parData.push(item)
this.indexZ = item.id
this.shenti = item
},
selectZD(item, index) {
console.log(index)
this.indexZD = index
this.parData.push(item)
},
bindInput(e) {
this.inputValue = e.detail.value
},
add() {
this.list4.push(this.inputValue)
this.inputValue = ''
}
if (this.inputValue == '') {
uni.showToast({
title: '请先输入内容',
duration: 2000,
icon: 'none'
})
} else {
this.list4.push(this.inputValue)
this.inputValue = ''
}
}
},
onLoad(options) {
this.petId = options.id
... ...
<template>
<view class="container">
<view class="">
<view class="">
体重增长标准
</view>
<rich-text :nodes="dataList"></rich-text>
</view>
</view>
</template>
<script>
import request from '../../utils/request.js'
export default {
data() {
return {
dataList: ''
}
},
methods: {
info() {
request.postRequest('/api/Index/standard', {}, data => {
if (data.code == 1) {
this.dataList = data.data.list.weight_content
}
})
}
},
created() {
this.info()
}
}
</script>
... ...
... ... @@ -100,7 +100,7 @@
</van-cell-group>
</view>
<view class="addAii">
<van-cell title="疫苗时间" is-link @click="showPickervaccine = true" />
<van-cell title="第一针疫苗时间" is-link @click="showPickervaccine = true" />
<van-popup :show="showPickervaccine" position="bottom">
<van-datetime-picker type="date" :value="currentDate" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmvaccine"
@cancel="showPickervaccine = false" />
... ... @@ -183,7 +183,7 @@
//体长
petLenghtArray: ['35cm', '45cm', '55cm', '65cm'],
//Age
petAgeArray: ['1月', '2月', '3月', '4月', '5月', '6月','7月', '8月', '9月', '10月', '11月', '1岁','2岁','3岁','4岁','5岁','6岁','7岁','8岁','9岁','10岁','11岁','12岁','13岁','14岁','15岁','16岁','17岁','18岁','19岁','20岁','21岁'],
petAgeArray: ['1个月', '2个月', '3个月', '4个月', '5个月', '6个月','7个月', '8个月', '9个月', '10个月', '11个月', '1岁','2岁','3岁','4岁','5岁','6岁','7岁','8岁','9岁','10岁','11岁','12岁','13岁','14岁','15岁','16岁','17岁','18岁','19岁','20岁','21岁'],
petClass: '请选择宠物种类',
petHeight: "请选择身高",
petWeight: "请选择体重",
... ...
... ... @@ -55,7 +55,7 @@
<view class="addAii">
<van-cell title="出生日期" is-link @click="showPickerTimes = true" />
<van-popup :show="showPickerTimes" position="bottom" @click="showPickerTimes = true">
<van-datetime-picker type="date" :value="currentDate" :min-date="minDate" :max-date="maxDate" @confirm="onConfirmTiems"
<van-datetime-picker type="date" :value="currentDate" :min-date="minDate" :max-date="currentDate" @confirm="onConfirmTiems"
@cancel="showPickerTimes = false" />
</van-popup>
<view class="petClassText" @click="showPickerTimes = true">
... ... @@ -170,7 +170,9 @@
//体长
petLenghtArray: ['35cm', '45cm', '55cm', '65cm'],
//Age
petAgeArray: ['1月', '2月', '3月', '4月', '5月', '6月','7月', '8月', '9月', '10月', '11月', '1岁','2岁','3岁','4岁','5岁','6岁','7岁','8岁','9岁','10岁','11岁','12岁','13岁','14岁','15岁','16岁','17岁','18岁','19岁','20岁','21岁'],
petAgeArray: ['1个月', '2个月', '3个月', '4个月', '5个月', '6个月', '7个月', '8个月', '9个月', '10个月', '11个月', '1岁', '2岁', '3岁', '4岁',
'5岁', '6岁', '7岁', '8岁', '9岁', '10岁', '11岁', '12岁', '13岁', '14岁', '15岁', '16岁', '17岁', '18岁', '19岁', '20岁', '21岁'
],
petClass: '请选择宠物种类',
petHeight: "请选择身高",
petWeight: "请选择体重",
... ... @@ -184,7 +186,8 @@
JyRadio: '1',
//公母
XbRadio: '1',
urlImg: []
urlImg: [],
sum: 0
}
},
methods: {
... ... @@ -236,6 +239,7 @@
if (data.code == 1) {
uni.removeStorageSync('petImg');
uni.removeStorageSync('petUrlImg');
uni.removeStorageSync('sum');
uni.showToast({
title: '修改成功',
icon: "success",
... ... @@ -346,6 +350,8 @@
this.showPickerTimes = false
},
BtnXiangCe() {
this.sum = ++this.sum
uni.setStorageSync('sum', this.sum)
uni.navigateTo({
url: "/pages/me/photo?id=" + this.petId
})
... ...
... ... @@ -59,9 +59,14 @@
swiperIndex: 0,
indexRpx: '32rpx',
petData: [],
detailList: []
detailList: [],
page: 1
}
},
onReachBottom: function() {
this.page = this.page + 1
this.DiaryList()
},
methods: {
addDiary() {
uni.navigateTo({
... ... @@ -84,10 +89,11 @@
console.log(this.petData)
let paramList = {
id: this.petData[this.swiperIndex].id,
page: 1
page: this.page
}
request.postRequest('/api/Pet/diaryList', paramList, data => {
this.detailList = data.data.list
let list = this.page == 1 ? data.data.list : this.detailList.concat(data.data.list)
this.detailList = list
console.log(data)
})
}
... ...
... ... @@ -34,7 +34,9 @@
fileList: [],
urlImg: [],
petId: '',
PetList: []
PetList: [],
isShow: true
}
},
methods: {
... ... @@ -57,6 +59,8 @@
let uploadList = JSON.parse(uploadFileRes.data).data
that.fileList.push(uploadList.fullurl)
that.urlImg.push(uploadList.url)
uni.setStorageSync('petImg', this.fileList)
uni.setStorageSync('petUrlImg', this.urlImg)
}
});
}
... ... @@ -68,7 +72,6 @@
let dataUtl = this.urlImg.splice(index, 1);
uni.setStorageSync('petImg', this.fileList)
uni.setStorageSync('petUrlImg', this.urlImg)
},
//宠物详情
petInfo() {
... ... @@ -77,13 +80,15 @@
id: this.petId
}
request.postRequest('/api/Pet/petInfo', paramId, data => {
console.log(data)
console.log(data.data.list)
data.data.list.pet_images.map(x => {
that.fileList.push(x.image)
})
data.data.list.img.map(x => {
that.urlImg.push(x.image)
})
uni.setStorageSync('petImg', this.fileList)
uni.setStorageSync('petUrlImg', this.urlImg)
})
},
AddImg() {
... ... @@ -92,16 +97,17 @@
},
onLoad(options) {
this.petId = options.id
},
onShow() {
this.fileList = uni.getStorageSync('petImg')
this.urlImg = uni.getStorageSync('petUrlImg')
if (this.fileList.length <= 0 || this.urlImg.length <= 0) {
let sum = uni.getStorageSync('sum')
if (sum < 2) {
this.petInfo()
} else {
this.fileList = uni.getStorageSync('petImg')
this.urlImg = uni.getStorageSync('petUrlImg')
console.log('缓存详情')
this.fileList = uni.getStorageSync('petImg', this.fileList)
this.urlImg = uni.getStorageSync('petUrlImg', this.urlImg)
}
},
onShow() {
}
}
</script>
... ...
... ... @@ -14,8 +14,8 @@
<view class="releBodyTitle" @click="circleDetail(item.id)">
<text class="releBody">{{item.title}}</text>
</view>
<view class="releImageBox" @click="circleDetail(item.id)">
<view class="releImage">
<view class="releImageBox">
<view class="releImage" @click="circleDetail(item.id)">
<view class="" v-for="(imgItem,index) in item.images">
<image :src="imgItem" style="width: 188rpx;height: 188rpx;" mode=""></image>
</view>
... ... @@ -54,9 +54,14 @@
data() {
return {
isShow: false,
dataList: []
dataList: [],
page: 1
}
},
onReachBottom: function() {
this.page = this.page + 1
this.replyList()
},
methods: {
//点赞
zan(id) {
... ... @@ -71,16 +76,15 @@
content: data.msg,
duration: 3000
});
this.classifyList()
}
})
},
IssueList() {
request.postRequest('/api/User/issueList', {
page: 1
page: this.page
}, data => {
console.log(data)
this.dataList = data.data.list
let list = this.page == 1 ? data.data.list : this.dataList.concat(data.data.list)
this.dataList = list
})
},
//圈子详情
... ...
... ... @@ -13,7 +13,7 @@
<view class="" v-if="item.type == 3">
<text class="replyNavTitle">{{item.content}}</text>
</view>
<view class="" v-if="item.type == 2 || 1">
<view class="" v-if="item.type !=3">
<image src="../../static/image/dianzanzan_icon@2x.png" style="width: 40rpx;height: 40rpx;" />
</view>
</view>
... ... @@ -42,6 +42,10 @@
page: 1 //记录加载数据的页数参数
}
},
onReachBottom: function() {
this.page = this.page + 1
this.replyList()
},
methods: {
//圈子详情
circleDetail(id) {
... ... @@ -51,11 +55,12 @@
},
replyList() {
let param = {
page: 1
page: this.page
}
request.postRequest('/api/User/replyList', param, data => {
console.log(data)
this.dataList = data.data.list
let list = this.page == 1 ? data.data.list : this.dataList.concat(data.data.list)
this.dataList = list
})
},
loadMore(ee) {
... ...
... ... @@ -73,9 +73,14 @@
classifyDesc: '对于饲养幼猫的朋友来说,是需要付出更多的时间和精力去照顾它的。而且幼年的猫咪非常的开朗活泼,它们对生活充满的了好奇,它们在家里会随处的啃咬东西,探究这些东西的情况。',
},
tabIndex: '',
list: []
list: [],
page: 1
}
},
onReachBottom: function() {
this.page = this.page + 1
this.classifyList()
},
methods: {
//发布帖子
addDetail() {
... ... @@ -117,6 +122,7 @@
let postData = {
cid: this.classifyId,
up: 1
}
request.postRequest('/api/Circle/circleList', postData, data => {
if (data.code == 1) {
... ... @@ -151,15 +157,16 @@
classifyList() {
let that = this;
let postData = {
cid: this.classifyId
cid: this.classifyId,
page: this.page
}
request.postRequest('/api/Circle/circleList', postData, data => {
this.list = data.data.list;
if (data.code == 1) {
let list = this.page == 1 ? data.data.list : this.list.concat(data.data.list)
this.list = list;
}
})
}
},
created() {
}
}
</script>
... ...
... ... @@ -7,13 +7,14 @@
<view class="" style="width: 100%;">
<view class="userName">
{{postData.nickname}}
<view class="zan" v-model="isZan" @click="zan">
<image src="/static/image/zan_icon@2x.png" mode="" v-if="!isZan"></image>
<image src="/static/image/yizan_icon@2x.png" mode="" v-if="isZan"></image>
<view class="zan" v-model="isZan" @click="cricleZan(2,list.id)">
<image src="/static/image/zan_icon@2x.png" mode="" v-if="postData.up==0"></image>
<image src="/static/image/yizan_icon@2x.png" mode="" v-if="postData.up == 1"></image>
</view>
</view>
<view class="userTime">
{{postData.createtime}}
</view>
</view>
</view>
... ... @@ -31,9 +32,9 @@
<view class="listName">
{{list.nickname}}
</view>
<view class="zan" @click="zan">
<image src="/static/image/zan_icon@2x.png" mode="" v-if="!isZan"></image>
<image src="/static/image/yizan_icon@2x.png" mode="" v-if="isZan"></image>
<view class="zan" @click="cricleZan(2,list.id)">
<image src="/static/image/zan_icon@2x.png" mode="" v-if="list.up==0"></image>
<image src="/static/image/yizan_icon@2x.png" mode="" v-if="list.up==1"></image>
</view>
</view>
</view>
... ... @@ -49,29 +50,16 @@
</view>
<view class="messageTime">
{{list.createtime}}
<!-- <text style="margin-left: 16rpx;">回复</text> -->
</view>
</view>
<!-- <view class="secondBox" v-for="lists in list.lists" :key="lists.index" style="padding-left: 56rpx;margin-top: 36rpx;">
<view class="" style="display: flex;">
<image :src="lists.image" mode="" style="width: 48rpx;height: 48rpx;border-radius: 50%;margin-right: 10rpx;"></image>
<view class="name">{{lists.name}}</view>
</view>
<view class="" style="padding-left: 60rpx;">
<view class="messageContent">
{{lists.content}}
</view>
<view class="messageTime">
{{lists.time}}
<text>回复</text>
</view>
</view>
</view> -->
</view>
</view>
<view class="bottomInput">
<input type="text" value="" placeholder="写评论" class="inputs" @input="keyInput" v-model="inputValue" />
<image src="/static/image/fasong_icon@2x.png" mode=""></image>
<input type="text" value="" :placeholder="placeholder" class="inputs" @input="keyInput" v-model="inputValue" />
<view @click="evaluate" style="width: 80rpx;height: 60rpx;background-color: #fff;position: fixed;right: 44rpx;z-index: 666;">
<image src="/static/image/fasong_icon@2x.png" mode=""></image>
</view>
</view>
</view>
</template>
... ... @@ -80,230 +68,102 @@
import request from '../../utils/request.js'
export default {
onLoad(options) {
console.log(options,'options')
this.evaluateDetail(options.id,options.ids)
//帖子id
this.id = options.id
//主评论id
this.ids = options.ids
},
data() {
return {
isZan:false,
page: 1,
//帖子id
id: '',
//评论id
ids: '',
isZan: false,
inputValue: '',
postData: {
userName: '张璐瑶',
image: '',
userTime: '2020/10/10',
postData:{},
content: '送给我的小侄女的,刚生下来,布料很柔和。尺寸也刚刚好放,小婴儿没有问题。没有异味。颜色很可爱。好评好评!',
list: [{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
replayName: '辛巴的主人',
lists: [{
name: '张旭',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
}]
},
{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
},
{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
replayName: '辛巴的主人',
lists: [{
name: '张旭',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
}]
},
{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
},{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
replayName: '辛巴的主人',
lists: [{
name: '张旭',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
}]
},
{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
},{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
replayName: '辛巴的主人',
lists: [{
name: '张旭',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
}]
},
{
name: '张璐瑶',
image: '/static/image/meirishipin_icon@2x.png',
time: '2020/10/10',
content: '看起来不错啊',
},
]
}
postData: {},
placeholder: '写评论'
}
},
onReachBottom: function() {
this.page = this.page + 1
this.evaluateDetail()
},
methods: {
//评论详情
evaluateDetail(id,ids){
let postData={
id:id,
fid:ids
//回复用户信息
seleName(id, nickname, ids) {
console.log(id)
console.log(nickname)
console.log(ids)
this.placeholder = '回复' + " " + nickname
this.tid = id
this.ids = ids
},
//评论的评论
evaluate() {
let postData = {
id: this.id,
content: this.inputValue,
tid: this.tid,
parent_id: this.ids
}
request.postRequest('/api/Circle/circleComments', postData, data => {
if (data.code == 1) {
this.evaluateDetail();
this.inputValue = '';
this.placeholder = '写评论'
} else {
uni.showToast({
title: '请输入评论',
icon: 'none',
duration: 2000
})
}
request.postRequest('/api/Circle/commentsDetail',postData,data=>{
if(data.code==1){
this.postData=data.data
})
}
//评论点赞
cricleZan(type, rid) {
let postData = {
id: this.id,
rid: rid,
type: 2
}
request.postRequest('/api/Circle/Up', postData, data => {
if (data.code == 1) {
this.evaluateDetail()
uni.showToast({
title: '点赞成功',
duration: 2000,
icon: 'success'
})
}
})
},
//点赞
zan(){
this.isZan=!this.isZan
//评论详情
evaluateDetail(id, ids) {
let postData = {
id: this.id,
fid: this.ids,
page: this.page
}
request.postRequest('/api/Circle/commentsDetail', postData, data => {
if (data.code == 1) {
let list = this.page == 1 ? data.data : this.postData.push(data.data)
this.postData = list
}
})
},
keyInput(e) {
this.inputValue = e.detail.value
},
send() {
this.inputValue = ''
}
},
onShow() {
this.evaluateDetail()
}
}
</script>
<style>
.fristBox {
padding-bottom: 30rpx;
border-bottom: 2rpx solid #F7F8FA;
}
.userInfo {
display: flex;
}
.userInfo image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 12rpx;
box-sizing: border-box;
}
.userName {
font-size: 32rpx;
font-weight: 500;
text-align: LEFT;
color: #323233;
display: flex;
justify-content: space-between;
}
.userTime {
font-size: 24rpx;
font-weight: 400;
text-align: LEFT;
color: #969799;
}
.content {
font-size: 28rpx;
color: #22272b;
margin-top: 24rpx;
line-height: 48rpx;
}
.listName {
display: inline-block;
min-width: 592rpx;
overflow: hidden;
text-overflow: ellipsis;
}
.zan {
display: inline-block;
}
.zan image {
width: 32rpx;
height: 30rpx;
}
.name {
display: flex;
align-items: center;
font-size: 28rpx;
align-items: flex-start;
color: #ff8d29;
display: inline-block;
position: relative;
}
.messageContent {
font-size: 28rpx;
color: #7d7e80;
margin-bottom: 6rpx;
line-height: 44rpx;
}
.messageTime {
font-size: 24rpx;
color: #c8c9cc;
}
.bottomInput {
display: flex;
align-items: center;
padding: 0 32rpx;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 120rpx;
background: #fff;
}
.bottomInput image {
width: 30rpx;
height: 24rpx;
position: fixed;
bottom: 48rpx;
right: 60rpx;
}
.inputs {
width: 680rpx;
height: 68rpx;
border: 2rpx solid #ebedf0;
border-radius: 8rpx;
padding: 0 16rpx;
box-sizing: border-box;
}
@import url("/common/evaluate-detail.css");
</style>
... ...
... ... @@ -3,7 +3,8 @@
<view class="topBj">
<image src="/static/image/bg_icon@2x.png" mode=""></image>
<view class="inoutBox">
<input type="text" value="" placeholder="搜索" @focus="inputFocus" />
<image src="../../static/image/search.png" style="width: 28rpx;height: 28rpx;position: absolute;top: 24rpx;left: 244rpx;"></image>
<input style="text-align: center;" type="text" value="" placeholder="搜索" placeholder-class="placss" @focus="inputFocus" />
</view>
</view>
<view class="classifyBox">
... ... @@ -73,37 +74,14 @@
switchClassList: [],
//分类
ClassifyList: [],
list: [{
image: '/static/image/biaoqing1_icon@2x.png',
userName: '杰尼猫咪',
content: '新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
picList: [{
image: '/static/image/bg_icon@2x.png'
}, {
image: '/static/image/bg_icon@2x.png'
}, {
image: '/static/image/bg_icon@2x.png'
}],
time: '4',
zan: '666',
pinglun: '888'
}, {
image: '/static/image/biaoqing1_icon@2x.png',
userName: '杰尼猫咪',
content: '新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
picList: [{
image: '/static/image/bg_icon@2x.png'
}, {
image: '/static/image/bg_icon@2x.png'
}, {
image: '/static/image/bg_icon@2x.png'
}],
time: '4',
zan: '666',
pinglun: '888'
}]
list: [],
page: 1
}
},
onReachBottom: function() {
this.page = this.page + 1
this.postList()
},
methods: {
//发布帖子
addDetail() {
... ... @@ -138,10 +116,13 @@
},
//圈子列表
postList() {
let postData = {};
let postData = {
page: this.page
};
request.postRequest('/api/Circle/circleList', postData, data => {
if (data.code == 1) {
this.list = data.data.list
let list = this.page == 1 ? data.data.list : this.list.concat(data.data.list)
this.list = list
}
})
},
... ...
... ... @@ -37,7 +37,7 @@
({{postData.discuss_num}})
</view>
</view>
<view class="evaluateBox" v-for="(item,index) in postData.comments" :key="index">
<view class="evaluateBox" v-for="(item,index) in comments" :key="index">
<view class="evaluateLeft">
<image :src="item.avatar" mode=""></image>
</view>
... ... @@ -60,16 +60,15 @@
</view>
<view class="replayBox" v-if="item.child.length!==0" style="max-height: 200rpx;position: relative;">
<view class="">
<view class="" v-for="(items,indexs) in item.child" :key="indexs" style="font-size: 24rpx;margin-bottom: 6rpx;">
<view class="inlineA namePublic" @click="reId(items.id,items.nickname,item.id)">
<view class="inlineA namePublic" @click="reId(items.u_id,items.nickname,item.id)">
{{items.nickname}}:
</view>
<view class="inlineA " style="color: #323233;margin-right: 16rpx;" v-if="items.to_u_id!==0">
回复
</view>
<view class="inlineA namePublic" v-if="items.to_u_id!==0">
{{items.nickname}}
{{items.toname}}
</view>
<view class="inlineA ">
{{items.content}}
... ... @@ -102,6 +101,10 @@
},
data() {
return {
//评论
comments: [],
//评论分页
page: 1,
tid: '', //用户id
id: '', //帖子id
ids: '', //一级评论id
... ... @@ -124,40 +127,26 @@
},
evaluateData: {
pinglunNum: 88,
list: [{
head: '/static/image/biaoqing1_icon@2x.png',
userName: '金毛的主人',
evaluateContent: '新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
time: '2020-10-10 12:00',
lists: [{
secondName: '金毛的主人',
replayText: ' 新入手的小干啥的活动介绍的结构设计的股份数量的官方数据库的'
}, {
secondName: '金毛的主人',
replyName: '辛巴',
replayText: ' 新入手的小干啥的活动介绍的结构设计的库的'
}]
}, {
head: '/static/image/biaoqing1_icon@2x.png',
userName: '金毛的主人',
evaluateContent: '新入手的小猫咪,可爱不,有人也想要吗?这里有英短、橘猫。',
time: '2020-10-10 12:00',
lists: [{
secondName: '金毛的主人',
replayText: ' 新入手的小干啥的活动介绍的结构设计的股份数量的官方数据库的'
}]
}]
list: []
}
}
},
onReachBottom: function() {
this.page = this.page + 1
this.circleDetail()
},
methods: {
//圈子详情
circleDetail(id) {
let postData = {
id: id
id: this.id,
page: this.page
}
request.postRequest('/api/Circle/circleDetail', postData, data => {
if (data.code == 1) {
let list = this.page == 1 ? data.data.comments : this.comments.concat(data.data.comments)
this.comments = list
this.postData = data.data
}
})
... ... @@ -165,7 +154,7 @@
//圈子点赞
cricleZan(id, type, rid) {
let postData = {
id: id,
id: this.id,
rid: rid,
type: type
}
... ... @@ -188,10 +177,9 @@
reply(ids, nickname) {
this.placeholder = '回复' + " " + nickname
this.ids = ids
},
//回复用户信息
reId(id, nickname,ids) {
reId(id, nickname, ids) {
this.placeholder = '回复' + " " + nickname
this.tid = id
this.ids = ids
... ... @@ -200,7 +188,7 @@
allReply(ids) {
this.ids = ids
uni.navigateTo({
url: "/pages/pet/evaluate-detail?id=" + this.id + '&' + 'ids=' + this.ids
url: "/pages/pet/evaluate-detail?id=" + this.id + '&' + 'ids=' + ids
})
},
//发送评论
... ... @@ -241,7 +229,6 @@
parent_id: this.ids
}
request.postRequest('/api/Circle/circleComments', postData, data => {
console.log(data)
if (data.code == 1) {
this.circleDetail(this.id);
this.inputValue = '';
... ...
<template>
<view class="seaCon">
<view class="inputBox">
<input class="uni-input" @input="onKeyInput" placeholder="搜索" @blur="inputBlur" />
<view class="" @click="search">
<image src="../../static/image/search.png" style="width: 28rpx;height: 28rpx;position: absolute;top: 25px;left: 152px;"></image>
<input style="text-align: center;" placeholder-class="placss" class="uni-input" @confirm="search" @input="onKeyInput"
placeholder="搜索" @blur="inputBlur" />
<!-- <view class="" @click="search">
搜索
</view>
</view> -->
</view>
<view class="searchBox">
<view class="topBox">
... ...