Browse Source

出版

master
jianglong 2 years ago
parent
commit
82c9cca892
  1. 1
      api/user.js
  2. 29
      bundle/pages/user/vip.vue
  3. 9
      components/components/explore.vue
  4. 8
      components/components/like-header.vue
  5. 25
      components/components/organ.vue
  6. 16
      components/components/team.vue
  7. 2
      components/tab/tab.vue
  8. 6
      components/tabs/tabs.vue
  9. 59
      pages.json
  10. 13
      pages/community/community.vue
  11. 16
      pages/community/organ_team_details.vue
  12. 5
      pages/news_list/news_list.vue
  13. 138
      pages/resource_list/resource_list.vue
  14. BIN
      static/images/icon_toutiao.png
  15. 4
      store/modules/city.js

1
api/user.js

@ -348,3 +348,4 @@ export function organDetail(id) {
return request.get('user/organDetail', {params:{id}})
}

29
bundle/pages/user/vip.vue

@ -264,6 +264,22 @@
getUserShip().then(res => {
let data = res.data;
this.memberType = data;
console.log("套餐数据",data.length)
if (data.length > 0 ){
let svip = data[0]
console.log("套餐数据",svip)
this.type = svip.type;
this.svip = svip;
this.totalPrice = svip.pre_price
this.mc_id = svip.id
this.org_id = svip.id
getUserVipTime({
id: svip.id,
}).then(res => {
this.memberEndTime = res.data.time;
});
}
}).catch(err => {
});
@ -342,6 +358,12 @@
});
},
async orderFreeBuyFun() {
if(!this.org_id){
this.$toast({
title: "请选择会员套餐"
})
return;
}
const submitObj = {
org_id: this.org_id //id
};
@ -368,6 +390,13 @@
async orderBuyFun() {
//true
if(!this.org_id){
this.$toast({
title: "请选择会员套餐"
})
return;
}
this.inPay = true;
const submitObj = {
org_id: this.org_id //id

9
components/components/explore.vue

@ -13,14 +13,14 @@
<view class="content" v-if="type==1">
<tabs :current="current" @change="changeTabs" height="100" >
<tab v-for="(item, index) in tabList1" :key="index" :name="item.name">
<lists :cateId="item.id" :typeId="1" :i="index" :index="current"></lists>
<lists :cateId="item.id" :typeId="1" ></lists>
</tab>
</tabs>
</view>
<view class="content" v-if="type==0">
<tabs :current="current" @change="changeTabs" height="100" >
<tab v-for="(item, index) in tabList" :key="index" :name="item.name">
<lists :cateId="item.id" :typeId="0" :i="index" :index="current"></lists>
<lists :cateId="item.id" :typeId="0" ></lists>
</tab>
</tabs>
</view>
@ -56,7 +56,7 @@
name: '全部',
id: ''
}],
current: 0.,
current: 0,
type:this.active == 2?0:1,
cate_id : 0,
}
@ -126,10 +126,9 @@
id: ''
}, ...res.data]
}
console.log("cate数据:",this.cid)
this.tabList1.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.current = index
this.current = index+1
}
})
} else {

8
components/components/like-header.vue

@ -16,13 +16,6 @@
<text>需求</text>
</view>
<!-- <view class="mainnav--item" :class="{'active': current === 3}" @click="changeNav(3)">
<text>机构</text>
</view>
<view class="mainnav--item" :class="{'active': current === 4}" @click="changeNav(4)">
<text>专家</text>
</view> -->
</view>
<view class="user flex row-right">
@ -65,7 +58,6 @@
},
methods: {
changeNav(index) {
console.log("当前页面cid",this.cid)
if(!this.isLogin) return this.$Router.push('/pages/login/login')
this.$emit('change', index);
}

25
components/components/organ.vue

@ -1,7 +1,7 @@
<template>
<view class="news-list organ">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption">
<mescroll-body ref="mescrollRef1" @init="mescrollInit" @down="downCallback2" @up="upCallback2"
:up="upOption1">
<view class="contain">
<view class="banner">
<ad-swipers :pid="32" height="340rpx">
@ -27,7 +27,7 @@
<view class="info flex-1">
<view class="title lg line-2 m-b-20">{{ item.name }}</view>
<view class="lighter line-2">
<view>{{ item.intro }}</view>
<view>检测站之一{{ item.intro }}</view>
</view>
<view class="flex row-between m-t-20 price">
<view class="xs muted">区域: <text style="color: red;">{{item.address}}</text></view>
@ -53,6 +53,7 @@
</template>
<script>
import {
mapGetters,
mapActions
@ -66,12 +67,12 @@
props: {
active: {
type: Number
}
},
},
data() {
return {
active: 0,
upOption: {
upOption1: {
auto: false,
empty: {
icon: '/static/images/news_null.png',
@ -93,7 +94,7 @@
cityInfo(){
console.log(111)
//
this.downCallback();
this.downCallback2();
}
},
async onShow() {
@ -101,7 +102,7 @@
title: '检测机构'
});
//
await this.downCallback();
await this.downCallback2();
},
async onLoad(options) {
@ -110,7 +111,7 @@
title: '检测机构'
});
//
await this.downCallback();
await this.downCallback2();
},
@ -120,10 +121,12 @@
this.newsList = [] // ,
this.mescroll.resetUpScroll() //
},
async downCallback() {
async downCallback2() {
console.log(1122334455)
this.mescroll.resetUpScroll();
},
upCallback(page) {
upCallback2(page) {
console.log("organPage",1111)
let {
cityInfo,
isLogin,
@ -145,6 +148,8 @@
let curPageLen = curPageData.length;
let hasNext = !!data.more;
this.newsList = this.newsList.concat(curPageData);
console.log(hasNext,"是否下一页")
console.log(curPageLen,"curPageLen")
this.mescroll.endSuccess(curPageLen, hasNext);
}).catch(() => {
this.mescroll.endErr()

16
components/components/team.vue

@ -1,7 +1,7 @@
<template>
<view class="news-list team">
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption">
<!-- <mescroll-body ref="mescrollRef2" @init="mescrollInit" @down="downCallback3" @up="upCallback3"
:up="upOption"> -->
<view class="contain">
<view class="banner">
<ad-swipers :pid="31" height="340rpx">
@ -48,7 +48,7 @@
</view>
</view>
</mescroll-body>
<!-- </mescroll-body> -->
</view>
</template>
@ -91,7 +91,7 @@
},
cityInfo(){
//
this.downCallback();
this.downCallback3();
}
},
async onShow() {
@ -99,7 +99,7 @@
title: '专家信息'
});
//
await this.downCallback();
await this.downCallback3();
},
async onLoad(options) {
@ -107,7 +107,7 @@
title: '专家信息'
});
//
await this.downCallback();
await this.downCallback3();
},
@ -117,10 +117,10 @@
this.newsList = [] // ,
this.mescroll.resetUpScroll() //
},
async downCallback() {
async downCallback3() {
this.mescroll.resetUpScroll();
},
upCallback(page) {
upCallback3(page) {
let {
cityInfo,
isLogin,

2
components/tab/tab.vue

@ -25,8 +25,6 @@
}
},
created(){
console.log('this----------------')
console.log(this.tabs.childrens)
this.tabs.childrens=[]
},
// mounted () {

6
components/tabs/tabs.vue

@ -122,7 +122,7 @@
//
showBar: {
type: Boolean,
default: true
default: false
},
//
barStyle: {
@ -159,7 +159,7 @@
// 使
async: {
type: Boolean,
default: false
default: true
}
},
provide() {
@ -185,6 +185,7 @@
// tabtab使
// applist
list(n, o) {
console.log("接受到的数组",this.list)
// list
if (!this.barFirstTimeMove && n.length !== o.length) {
this.currentIndex = 0;
@ -256,7 +257,6 @@
},
methods: {
updateTabs() {
console.log(this.childrens)
this.list = this.childrens.map((item) => {
const {
name,

59
pages.json

@ -1,5 +1,6 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"name": "index",
@ -241,6 +242,41 @@
"root": "bundle",
"pages": [
{
"path": "pages/user/team",
"name": "user_team",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "专家申请",
"disableScroll": true
}
},
{
"path": "pages/user/team_recode",
"name": "team_recode",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "专家申请记录",
"disableScroll": true
}
},{
"path": "pages/user/team_result",
"name": "team_result",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "专家申请结果",
"disableScroll": true
}
},
{
"path": "pages/user/organ",
"name": "user_organ",
"meta": {
@ -871,6 +907,28 @@
"root": "bundle_b",
"pages": [
{
"path": "pages/resource_list/ogran_list",
"name": "ogran_list",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "机构"
}
},
{
"path": "pages/resource_list/team_list",
"name": "team_list",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "专家"
}
},
{
"path": "pages/resource_search/resource_search",
"meta": {
"auth": true
@ -879,6 +937,7 @@
"navigationBarTitleText": "资料搜索"
}
},
{
"path": "pages/confirm_order/confirm_order",
"meta": {

13
pages/community/community.vue

@ -20,25 +20,24 @@
<view class="muted mt20">当前页面暂无内容</view>
</view>
</template>
<tabbar></tabbar>
<!-- <tabbar></tabbar> -->
</view>
</template>
<script>
import LikeHeader from "../../components/components/like-header.vue"
import Explore from "../../components/components/explore.vue"
// import Xuqiu from "../../components/components/xuqiu.vue"
import Organ from "../../components/components/organ.vue"
// import Organ from "../../components/components/organ.vue"
import Follow from "../../components/components/follow.vue"
import Team from "../../components/components/team.vue"
// import Team from "../../components/components/team.vue"
export default {
components: {
LikeHeader,
Explore,
Follow,
// Xuqiu,
Organ,
Team
// Organ,
// Team
},
data() {
return {
@ -64,7 +63,7 @@
let p_cate = params['cate'];
if(p_index !=undefined && p_index!=""){
this.current = parseInt(p_index)
// this.current = parseInt(p_index)
this.currentNav = parseInt(p_index)
}
if(p_cate !=undefined && p_cate!=""){

16
pages/community/organ_team_details.vue

@ -7,14 +7,19 @@
<view class="title xl m-t-30">{{ articleDetail.name }}</view>
<view class="row-between">
<view class="flex lighter" style="justify-content: space-between;">
<view class="xs">公司名称{{ articleDetail.company }}</view>
<view class="xs m-t-10">所属地区{{ articleDetail.address }}</view>
<view class="flex">
<image class="icon-sm" src="/static/images/icon_see.png"></image>
<view class="m-l-10 xs muted">{{ articleDetail.visit }}人浏览</view>
</view>
</view>
<view class="xs lighter m-t-10">地区{{ articleDetail.address }}</view>
<view v-if="type == 1" class="xs lighter m-t-10">所属企业{{ articleDetail.company }}</view>
<view class="xs lighter m-t-10">联系方式{{ articleDetail.contact }}</view>
<view v-if="type == 1 " class="xs lighter m-t-10">专家简介{{ articleDetail.intro }}</view>
<view v-if="type == 0 " class="xs lighter m-t-10">机构位置{{ articleDetail.address_detail == null ? "":articleDetail.address_detail}}</view>
<view v-if="type == 0 " class="xs lighter m-t-10">检测站{{ articleDetail.intro == null ? "":articleDetail.intro}}</view>
<view v-if="type == 0" class="xs lighter m-t-10">检测站联系方式{{ articleDetail.company == null ? "":articleDetail.company}}</view>
<view v-if="type == 0" class="xs lighter m-t-10">检测站位置{{ articleDetail.jcz_address == null ? "":articleDetail.jcz_address}}</view>
</view>
<!-- <view class="row-between">
@ -27,7 +32,7 @@
</view> -->
</view>
<view class="main">
简介{{ articleDetail.intro }}
<!-- 简介{{ articleDetail.intro }} <br> -->
<u-parse class='m-t-10' :html="article_content" />
</view>
<!-- <view class="main">
@ -48,7 +53,8 @@ export default {
showLoading: true,
articleDetail: {},
article_content: "",
swiperList:[]
swiperList:[],
type:0
};
},
@ -64,10 +70,12 @@ export default {
this.id = options.id;
if (this.type) {
uni.setNavigationBarTitle({
title: '专家详情'
});
} else {
this.type = 0
uni.setNavigationBarTitle({
title: '机构详情'
});

5
pages/news_list/news_list.vue

@ -10,7 +10,6 @@
</ad-swipers>
</view>
<tabs :current="active" @change="changeActive" :bar-width="60">
<tab name="全部"></tab>
<tab v-for="(item, index) in categoryList" :key="index" :name="item.name"></tab>
</tabs>
<view class="main">
@ -102,7 +101,7 @@
const { type, active, categoryList } = this
getArticleList({
type: this.type,
cid: this.active ? categoryList[active - 1].id : '',
cid: this.active ? categoryList[active].id : '',
page_size:page.size,
page_no:page.num
}).then(({
@ -130,7 +129,7 @@
console.log("类型:",this.cid)
this.categoryList.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.active = index+1
this.active = index
console.log("active:",this.active)
}
})

138
pages/resource_list/resource_list.vue

@ -44,9 +44,15 @@
</ad-swipers>
</view>
<tabs :current="active" @change="changeActive" :bar-width="60">
<tab name="全部"></tab>
<!-- <tab name="全部"></tab> -->
<tab v-for="(item, index) in categoryList" :key="index" :name="item.name"></tab>
</tabs>
<tabs v-if="categoryList2.length" :current="active2" @change="changeActive2" :bar-width="60">
<!-- <tab name="全部"></tab> -->
<tab v-for="(item, index) in categoryList2" :key="index" :name="item.name"></tab>
</tabs>
<view class="main">
<view class="article-list">
<view class="article-item bg-white" v-for="(item, index) in newsList" :key="index" >
@ -83,8 +89,8 @@
</template>
<script>
import Organ from "../../components/components/organ.vue"
import Team from "../../components/components/team.vue"
// import Organ from "../../components/components/organ.vue"
// import Team from "../../components/components/team.vue"
import {
mapGetters,
@ -96,16 +102,17 @@
} from '@/api/store';
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
export default {
components: {
Organ,
Team
},
// components: {
// Organ,
// Team
// },
mixins: [MescrollMixin],
data() {
return {
current:1,
currentNav:1,
active: 0,
active2: 0,
upOption: {
auto: false,
empty: {
@ -114,7 +121,9 @@
}
},
cid:0,
cid2:0,
categoryList: [],
categoryList2: [],
newsList: [],
type: -1,
cate_type:0,
@ -123,15 +132,15 @@
async onShow() {
console.log(111)
this.categoryList = [],
this.type = 0;
this.cate_type = 0;
// this.categoryList = [],
// this.type = 0;
// this.cate_type = 0;
uni.setNavigationBarTitle({
title: '资料库'
});
this.cid = 0
this.current = 1
this.currentNav = 1
// this.cid = 0
// this.current = 1
// this.currentNav = 1
let queryString = uni.getStorageSync("params")
uni.removeStorageSync("params")
@ -153,15 +162,21 @@
if(p_index !=undefined && p_index!=""){
this.current = parseInt(p_index)
this.currentNav = parseInt(p_index)
}else{
this.current = 1
this.currentNav = 1
}
if(p_cate !=undefined && p_cate!=""){
this.cid = parseInt(p_cate)
}else{
this.cid = 0
}
if(cate_type !=undefined && cate_type!=""){
this.cate_type = parseInt(cate_type)
this.active = 0
this.active2 = 0
if(this.cate_type == 1){
uni.setNavigationBarTitle({
title: '全国案例'
@ -169,9 +184,18 @@
}
}
}else if(queryString == ""){
this.cid = 0
this.current = 1
this.currentNav = 1
this.categoryList = [],
this.type = 0;
this.cate_type = 0;
}
console.log("this.cate_type :",this.cate_type,this.cate_type )
console.log("this.active :",this.current,this.currentNav )
//
await this.downCallback();
},
@ -190,26 +214,50 @@
methods: {
changeNav(index){
this.current = index
this.currentNav = index
console.log("此时数据:",this.currentNav)
if(index == 1){
this.current = index
this.currentNav = index
console.log("此时数据:",this.currentNav)
this.mescroll.resetUpScroll();
}else if(index == 3){
uni.navigateTo({
url: "/bundle_b/pages/resource_list/ogran_list"
});
}
else if(index == 4){
uni.navigateTo({
url: "/bundle_b/pages/resource_list/team_list"
});
}
},
changeActive(e) {
this.active2 = 0 ;
this.active = e;
this.newsList = [] // ,
this.mescroll.resetUpScroll() //
},
changeActive2(e) {
this.active2 = e;
this.newsList = [] // ,
this.mescroll.resetUpScroll() //
},
async downCallback() {
await this.getCategoryListFun();
console.log("后续值",this.categoryList)
console.log("后续值2",this.cid)
this.mescroll.resetUpScroll();
},
upCallback(page) {
const { type, active, categoryList } = this
const { cityInfo,type, active, categoryList } = this
console.log("active:",categoryList[this.active])
let city_id=0
if(cityInfo.id !=null && cityInfo.id!=undefined && cityInfo.id>0){
city_id = cityInfo.id
}
getResourceList({
type: this.type,
cid: this.active ? categoryList[active-1].id : '',
cid: this.active ? categoryList[this.active].id : '',
cid2: this.active2 ? this.categoryList2[this.active2].id : '',
city_id:city_id,
page_size:page.size,
page_no:page.num,
cate_type: this.cate_type,
@ -225,8 +273,44 @@
}).catch(() => {
this.mescroll.endErr()
})
this.getCategoryListFun2();
},
async getCategoryListFun2() {
console.log("获取子分类开始",this.active)
this.categoryList2 = [];
console.log("当前分类",this.categoryList[this.active].id)
const {
code,
data
} = await getResourceCategoryList({
pid: this.active ? this.categoryList[this.active].id : 999,
})
if (code == 1 && data.length>0) {
this.categoryList2 = [{
name: '全部',
id: ''
}, ...data]
}
let item = {}
this.$nextTick(() => {
// DOM使Vue.set
this.categoryList2.forEach((item, index) => {
this.$set(this.categoryList2, index, item);
});
});
this.categoryList2.forEach((item, index) => {
if(this.cid2>0 && item.id == this.cid2){
this.active2 = index+1
}
})
},
async getCategoryListFun() {
this.categoryList = [];
console.log("当前分类",this.categoryList)
@ -242,7 +326,10 @@
})
if (code == 1) {
this.categoryList = data
this.categoryList = [{
name: '全部',
id: ''
}, ...data]
}
let item = {}
@ -270,7 +357,14 @@
this.categoryList.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.active = index+1
console.log("当前值:{}",this.cate_type)
if(this.cate_type == 0){
this.active = index+1
}else{
this.active = index
}
console.log("当前值:{}",this.active)
}
})

BIN
static/images/icon_toutiao.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

4
store/modules/city.js

@ -75,11 +75,11 @@ const actions = {
},
// 逆解析地址
getGeocoderFunc({ commit }, location) {
console.log(location)
console.log(location,123123)
getGeocoder({ ...location }).then(res => {
console.log(res)
if( res.code == 1 ) {
if(res.data == []){
if(res.data.length==0 ){
return;
}
const result = res.data.result

Loading…
Cancel
Save