Browse Source

tijiao

branch0222
douzhuo 1 year ago
parent
commit
db942b90f7
2 changed files with 419 additions and 337 deletions
  1. +389
    -333
      pages/index/learning.vue
  2. +30
    -4
      pages/index/personal.vue

+ 389
- 333
pages/index/learning.vue View File

@@ -1,17 +1,17 @@
<template>
<view class="main">
<view class="main">
<view class="tab-box">
<view class="tab-item-wrap">
<view v-for="(item, index) in tablist" :key="index"
:class="activeClass == index ? 'bottom' : ''" @click="clocktab(index, item.id)">
<view v-for="(item, index) in tablist" :key="index" :class="activeClass == index ? 'bottom' : ''"
@click="clocktab(index, item.id)">
{{ item.name }}
<view class="bottomLine" v-if="activeClass == index"></view>
</view>
</view>
</view>
<view class="cented" v-if="activeClass==0">
<view class="ceninfo" v-for="(item,index) in alllist" @click="quclick(item)" :key="index">
<view class="infoview">
<view class="infozuo">
@@ -19,7 +19,7 @@
<view class="infozuochiud2">置业顾问</view>
</view>
<view class="infoyou">
<view class="infoyouchiud2" >去学习</view>
<view class="infoyouchiud2">去学习</view>
</view>
</view>
<view class="footerinfo">
@@ -39,375 +39,431 @@
</view>
</view>
</view>
</view>
<view class="biaoqianview" v-if="activeClass==1">
<view class="boxintention">
<view class="title">分点标签列表</view>
<view class="boxcenten" v-for="(item,index) in equinoctial" :key="index" @click="routerclick(item)">
<view class="boxcenteninfotext">{{item.name}}</view>
<view class="boxcenteninfoimg"><u-icon size="20px" name="arrow-right"></u-icon></view>
<view class="boxcenteninfoimg">
<u-icon size="20px" name="arrow-right"></u-icon>
</view>
</view>
</view>
</view>
<u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
</view>
</view>
</template>

<script>
var config = require("../../config");
var util = require("@/utils/util.js");
var config = require("../../config");
var util = require("@/utils/util.js");
import tabbarList from '@/utils/tabbar.js'
export default {
data() {
return {
tabbarList:tabbarList,
current: 0,
tablist:[
{name:"全文"},
{name:"分点"}
],
activeClass:0,
equinoctial:[],
alllist:[],
buildingID:''
};
},
onShow(){
var i=uni.getStorageSync('fendianindex')
this.buildingID=uni.getStorageSync('buildingID').id;
export default {
data() {
return {
tabbarList: tabbarList,
current: 0,
tablist: [{
name: "全文"
},
{
name: "分点"
}
],
activeClass: 0,
equinoctial: [],
alllist: [],
buildingID: ''

};
},
onShow() {
var i = uni.getStorageSync('fendianindex')
this.buildingID = uni.getStorageSync('buildingID').id;
this.clocktab(i)
this.updateInit()
},
onPullDownRefresh() {
var i=uni.getStorageSync('fendianindex')
this.clocktab(i)
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
updateInit() {
uni.request({
url: config.service.notReadNum,
method: "GET",
data: {
id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
projectId: uni.getStorageSync('buildingID').id,
},
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (res) => {
this.count = res.data.data
this.tabbarList[3].count = res.data.data || 0
}
})
},
//全部学习跳转
quclick(item){
uni.showLoading({
title: '加载中',
mask:true
});
const parames = {
pageNum: 1,
pageSize: 100,
query: {
customerId: item.carId,
}
}
var cet={
bg:0,
customerId:item.id,
id:''
}
this.$u.post("/corpus/findByPage", parames).then(res => {
setTimeout(function () {
uni.hideLoading();
}, 2000);
var newobj = res[0];
if(res[0].merge==0){
uni.navigateTo({
url: `/pages/learning/Thefulltext/index2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(cet)}&stateisshow=${"2"}`
})
}else{
uni.navigateTo({
url: `/pages/learning/Thefulltext/index?customerId=${newobj.customerId}`
})
}
})
this.initrealTimeStatistics()
},
//分点学习跳转
routerclick(item){
uni.navigateTo({
url: "/pages/learning/Equinoctiallearning?id="+item.marketingId+"&biaoqian="+item.name
})
onPullDownRefresh() {
var i = uni.getStorageSync('fendianindex')
this.clocktab(i)
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
// tab切换
clocktab(index) {
this.activeClass = index;
if(this.activeClass==0){
uni.setStorageSync("fendianindex", 0); //写入缓存
this.ceninit()
}else{
uni.setStorageSync("fendianindex", 1); //写入缓存
this.infoinit()
}
},
ceninit(){
let infoobj={
"pageNum":1,
"pageSize":100,
"query":{
"status":0,
'itemId':this.buildingID,
methods: {
//实时统计
initrealTimeStatistics() {
uni.request({
url: config.service.realTimeStatistics,
method: "POST",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
data: {
houseId: this.buildingID
},
success: (data) => {
if (data.data.data == null) {
return
} else {
this.tabbarList[1].count = data.data.data.receivingCustomer || 0
this.$forceUpdate()
}
},
fail: () => {}
})
},
updateInit() {
uni.request({
url: config.service.notReadNum,
method: "GET",
data: {
id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
projectId: uni.getStorageSync('buildingID').id,
},
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (res) => {
this.count = res.data.data
this.tabbarList[3].count = res.data.data || 0
}
})
},

//全部学习跳转
quclick(item) {
uni.showLoading({
title: '加载中',
mask: true
});
const parames = {
pageNum: 1,
pageSize: 100,
query: {
customerId: item.carId,
}
}
var cet = {
bg: 0,
customerId: item.id,
id: ''
}
this.$u.post("/corpus/findByPage", parames).then(res => {
setTimeout(function() {
uni.hideLoading();
}, 2000);
var newobj = res[0];
if (res[0].merge == 0) {
uni.navigateTo({
url: `/pages/learning/Thefulltext/index2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(cet)}&stateisshow=${"2"}`
})
} else {
uni.navigateTo({
url: `/pages/learning/Thefulltext/index?customerId=${newobj.customerId}`
})
}
})
},
//分点学习跳转
routerclick(item) {
uni.navigateTo({
url: "/pages/learning/Equinoctiallearning?id=" + item.marketingId + "&biaoqian=" + item.name
})
},
// tab切换
clocktab(index) {
this.activeClass = index;
if (this.activeClass == 0) {
uni.setStorageSync("fendianindex", 0); //写入缓存
this.ceninit()
} else {
uni.setStorageSync("fendianindex", 1); //写入缓存
this.infoinit()
}
},
ceninit() {
let infoobj = {
"pageNum": 1,
"pageSize": 100,
"query": {
"status": 0,
'itemId': this.buildingID,
}
}
uni.request({
url: config.service.findAllZATD,
method: "POST",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
data: infoobj,
success: (data) => {
if (data.data.code == 10000) {
this.alllist = data.data.data.results
} else {
uni.showToast({
title: data.data.message,
duration: 2000
});
}
}
})
},


infoinit() {
let obj = {
itemId: this.buildingID
}
uni.request({
url: config.service.findSelectedLabel,
method: "POST",
data: obj,
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
this.equinoctial = data.data.data
} else {
uni.showToast({
title: data.data.message,
duration: 2000
});
}
}
})
}
uni.request({
url: config.service.findAllZATD,
method:"POST",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
data:infoobj,
success: (data) => {
if(data.data.code==10000){
this.alllist=data.data.data.results
}else{
uni.showToast({
title: data.data.message,
duration: 2000
});
}
}
})
},
infoinit(){
let obj={
itemId:this.buildingID
}
uni.request({
url: config.service.findSelectedLabel,
method:"POST",
data:obj,
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if(data.data.code==10000){
this.equinoctial=data.data.data
}else{
uni.showToast({
title: data.data.message,
duration: 2000
});
}
}
})
}
},
}
},
}
</script>

<style lang="scss" scoped>
.main {
background: #F1F1F1;;
min-height: 100vh;
}
.tab-box {
height: auto;
overflow: auto;
width: 100%;
.tab-item-wrap {
height: 100rpx;
width: 80%;
margin: 0 auto;
line-height: 100rpx;
display: flex;
justify-content: space-around;
font-size: 36rpx;
color: #959dad;
.main {
background: #F1F1F1;
;
min-height: 100vh;
}
}
.bottom {
color: #008EF2;
position: relative;
}
.bottomLine {
position: absolute;
width: 96rpx;
height: 6rpx;
top: 80rpx;
background-color: #298dff;
border-radius: 8rpx 8rpx 0rpx 0rpx;
left: -13rpx;
}
.cented{
width: 100%;
padding-top: 14rpx;
.ceninfo{
width: 690rpx;
// height: 160rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding-top: 23rpx;
position: relative;
.infoview{
width: 100%;
height: 64rpx;

.tab-box {
height: auto;
overflow: auto;
width: 100%;

.tab-item-wrap {
height: 100rpx;
width: 80%;
margin: 0 auto;
line-height: 100rpx;
display: flex;
.infozuo{
width: 454rpx;
height: 100%;
justify-content: space-around;
font-size: 36rpx;
color: #959dad;
}
}

.bottom {
color: #008EF2;
position: relative;
}

.bottomLine {
position: absolute;
width: 96rpx;
height: 6rpx;
top: 80rpx;
background-color: #298dff;
border-radius: 8rpx 8rpx 0rpx 0rpx;
left: -13rpx;
}

.cented {
width: 100%;
padding-top: 14rpx;

.ceninfo {
width: 690rpx;
// height: 160rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 20rpx;
padding-top: 23rpx;
position: relative;

.infoview {
width: 100%;
height: 64rpx;
display: flex;
align-items: center;
.infozuochiud1{
font-size: 36rpx;
font-weight: 600;

.infozuo {
width: 454rpx;
height: 100%;
display: flex;
align-items: center;

.infozuochiud1 {
font-size: 36rpx;
font-weight: 600;
color: #0C0C0C;
text-indent: 28rpx;
}

.infozuochiud2 {
width: 113rpx;
height: 42rpx;
border-radius: 5rpx;
margin-left: 19rpx;
border: 1px solid #008EF2;
font-size: 24rpx;
font-weight: 400;
color: #008EF2;
line-height: 42rpx;
text-align: center;
}
}

.infoyou {
width: 236rpx;
height: 100%;
display: flex;
align-items: center;

.infoyouchiud1 {
display: block;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
}

.infoyouchiud2 {
width: 133rpx;
height: 56rpx;
background: #008EF2;
border-radius: 8rpx;
text-align: center;
color: #FFFFFF;
font-size: 30rpx;
line-height: 56rpx;
margin-left: 80rpx;
}
}
}

.footerinfo {
width: 100%;
height: 42rpx;
display: flex;
margin-top: 14rpx;

.footerinfozuo {
width: 454rpx;
font-size: 30rpx;
color: #0C0C0C;
text-indent: 28rpx;
line-height: 42rpx;
margin-left: 26rpx;
}
.infozuochiud2{
width: 113rpx;
height: 42rpx;
border-radius: 5rpx;
margin-left: 19rpx;
border: 1px solid #008EF2;

.footerinfoyou {
width: 236rpx;
font-size: 24rpx;
font-weight: 400;
color: #008EF2;
color: #999999;
line-height: 42rpx;
text-align: center;
text-indent: 42rpx;
}
}
.infoyou{
width:236rpx;
height: 100%;

.dingwei {
width: 100%;
height: 60rpx;
border: 1px solid red;
position: absolute;
top: 160rpx;
left: 0rpx;
}
}
}

.biaoqianview {
width: 100%;

.boxintention {
width: 690rpx;
margin: 0 auto;

.title {
font-size: 36upx;
color: #333333;
position: relative;
display: flex;
align-items: center;
.infoyouchiud1{
display: block;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
padding-left: 19upx;

&:before {
content: '';
position: absolute;
left: 0;
height: 30upx;
width: 9upx;
background: #008ef2;
border-radius: 5rpx;
}
.infoyouchiud2{
width: 133rpx;
height: 56rpx;
background: #008EF2;
border-radius: 8rpx;
text-align: center;
color: #FFFFFF;
}

.boxcenten {
width: 100%;
height: 100rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin-top: 22rpx;
display: flex;

.boxcenteninfotext {
width: 90%;
height: 100%;
text-indent: 20rpx;
line-height: 100rpx;
font-size: 30rpx;
line-height: 56rpx;
margin-left: 80rpx;
color: #0C0C0C;
}

.boxcenteninfoimg {
width: 10%;
height: 100%;
line-height: 100rpx;
}
}
}
.footerinfo{
width: 100%;
height: 42rpx;
display: flex;
margin-top: 14rpx;
.footerinfozuo{
width: 454rpx;
font-size: 30rpx;
color: #0C0C0C;
line-height: 42rpx;
margin-left: 26rpx;
}
.footerinfoyou{
width: 236rpx;
font-size: 24rpx;
color: #999999;
line-height: 42rpx;
text-indent: 42rpx;
}
}
.dingwei{
width: 100%;
height: 60rpx;
border: 1px solid red;
position: absolute;
top: 160rpx;
left: 0rpx;
}
}
}
.biaoqianview{
width: 100%;
.boxintention {
width: 690rpx;
margin: 0 auto;
.title {
font-size: 36upx;
color: #333333;
position: relative;
display: flex;
align-items: center;
padding-left: 19upx;
&:before {
content: '';
position: absolute;
left: 0;
height: 30upx;
width: 9upx;
background: #008ef2;
border-radius: 5rpx;
}

.footicon {
display: flex;
align-items: center;
margin-top: 30rpx;
padding: 20rpx;
flex-direction: row-reverse;

.icon {
margin-left: 20rpx;
}
.boxcenten{
width: 100%;
height: 100rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin-top: 22rpx;
display: flex;
.boxcenteninfotext{
width: 90%;
height: 100%;
text-indent: 20rpx;
line-height: 100rpx;
font-size: 30rpx;
color: #0C0C0C;
}
.boxcenteninfoimg{
width: 10%;
height: 100%;
line-height: 100rpx;
}

image {
width: 36rpx;
height: 36rpx;
margin-right: 20rpx;
vertical-align: -7rpx;
}
}
}
.footicon{
display: flex;
align-items: center;
margin-top: 30rpx;
padding:20rpx;
flex-direction: row-reverse;
.icon{
margin-left: 20rpx;
}
image{
width: 36rpx;
height: 36rpx;
margin-right: 20rpx;
vertical-align: -7rpx;
}
}
</style>


@@ -623,4 +679,4 @@
}
}
</style>
-->
-->

+ 30
- 4
pages/index/personal.vue View File

@@ -115,15 +115,39 @@
}
},

onShow: function() {
onShow() {
var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
this.name = userInfos.name,
this.photo = userInfos.picUrl,
this.mobile = userInfos.loginName
this.updateInit()
this.initrealTimeStatistics()
console.log(config.service.host.indexOf('xitong.pachira.cn') != -1)
},
methods: {
//实时统计
initrealTimeStatistics() {
uni.request({
url: config.service.realTimeStatistics,
method: "POST",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
data: {
houseId: uni.getStorageSync('buildingID').id
},
success: (data) => {
if (data.data.data == null) {
return
} else {
this.tabbarList[1].count = data.data.data.receivingCustomer || 0
this.$forceUpdate()
}
},
fail: () => {}
})
},
updateInit() {
uni.request({
url: config.service.notReadNum,
@@ -167,10 +191,12 @@
content: '确定要退出?',
cancelColor: "#999999",
showCancel: true,
success:(res) => {
success: (res) => {
if (res.confirm) {
uni.clearStorageSync(); //清除缓存
this.$u.post('/user/exitSystem', {id: uni.getStorageSync('exitSystemId')})
this.$u.post('/user/exitSystem', {
id: uni.getStorageSync('exitSystemId')
})
uni.showToast({
icon: "none",
title: "退出成功"
@@ -310,4 +336,4 @@
}
}
}
</style>
</style>

Loading…
Cancel
Save