Browse Source

出版

master
jianglong 3 years ago
parent
commit
f289d8f5d9
  1. 18
      api/store.js
  2. 18
      api/user.js
  3. 4
      bundle/pages/address_edit/address_edit.vue
  4. 3
      bundle/pages/resource_details/resource_details.vue
  5. 4
      bundle_b/pages/community_detail/community_detail.vue
  6. 4
      bundle_b/pages/community_search/community_search.vue
  7. 77
      bundle_b/pages/published_works/published_works.vue
  8. 51
      components/components/explore.vue
  9. 13
      components/components/like-header.vue
  10. 3
      components/components/lists.vue
  11. 2
      components/components/organ.vue
  12. 2
      components/components/team.vue
  13. 53
      pages.json
  14. 38
      pages/community/community.vue
  15. 3
      pages/goods_details/goods_details.vue
  16. 4
      pages/goods_search/goods_search.vue
  17. 2
      pages/index/index.vue
  18. 6
      pages/news_details/news_details.vue
  19. 20
      pages/news_list/news_list.vue
  20. 115
      pages/resource_list/resource_list.vue
  21. BIN
      static/images/index_bg.png
  22. BIN
      static/images/loading.gif
  23. BIN
      static/images/pintuan_bg.png
  24. 6
      store/modules/city.js
  25. 6
      utils/tools.js

18
api/store.js

@ -49,16 +49,16 @@ export function getBrandList() {
//文章分类
export function getCategoryList(data) {
let {type} = data
let url = type ? 'help/category' : 'article/category'
delete data.type
return request.get(url)
let url = type==1 ? 'help/category' : 'article/category'
return request.get(url, {
params: data
})
}
//文章列表
export function getArticleList(data) {
let {type} = data
let url = type ? 'help/lists' : 'article/lists'
delete data.type
let url = type == 1 ? 'help/lists' : 'article/lists'
return request.get(url, {
params: data
})
@ -73,7 +73,13 @@ export function getArticleDetail(data) {
params: { id: data.id }
})
}
// 文章详情
export function getHelpDetail(data) {
let url = 'help/detail2'
return request.get(url, {
params: { id: data.id }
})
}
//购物车
export function getCartList() {
return request.get('cart/lists')

18
api/user.js

@ -330,3 +330,21 @@ export function complainDetail(id) {
return request.get('user/complainDetail', {params:{id}})
}
// 投诉驻
export function organ(data) {
return request.post('user/organ', data)
}
// 投诉记录
export function organRecord(params) {
return request.get('user/organRecord', {params})
}
// 投诉记录详情
export function organDetail(id) {
return request.get('user/organDetail', {params:{id}})
}

4
bundle/pages/address_edit/address_edit.vue

@ -63,8 +63,8 @@
},
region: '',
addressId: '',
defaultRegion: ['广东省', '广州市', '番禺区'],
defaultRegionCode: '440113',
defaultRegion: ['安徽省', '合肥市', '蜀山区'],
defaultRegionCode: '340100',
showRegion: false,
lists: []
};

3
bundle/pages/resource_details/resource_details.vue

@ -510,7 +510,8 @@ team_min_price
.group {
height: 100rpx;
width: 100%;
background-image: url(../../../static/images/pintuan_bg.png);
// background-image: url(../../../static/images/pintuan_bg.png);
background-image: url("https://cdn.ahbcqz.com/uploads/images/20230705160002a981d0842.png");
background-size: 100%;
.group-num {

4
bundle_b/pages/community_detail/community_detail.vue

@ -95,6 +95,10 @@
</view>
</view>
<view class="text" >
<text>区域{{communityInfo.address}} </text>
</view>
<view class="text" >
<text>联系人{{communityInfo.contact_name}} </text>
</view>
<view class="text" >

4
bundle_b/pages/community_search/community_search.vue

@ -79,7 +79,7 @@
auto: false,
empty: {
icon: '/static/images/news_null.png',
tip: "暂无种草文章",
tip: "暂无需求/服务",
}
},
keyword: '',
@ -204,7 +204,7 @@
})
} else {
uni.setNavigationBarTitle({
title: '种草搜索'
title: '任务大厅搜索'
});
this.showHistory = true

77
bundle_b/pages/published_works/published_works.vue

@ -28,6 +28,13 @@
<u-icon name="arrow-right" slot="right" size="28" />
</u-field>
</view>
<view @click="showRegion = true">
<u-field v-model="region" :disabled="true" label-width="160" style="flex: 1;" label="所在地区" placeholder="请选择省、市、区" right-icon="arrow-right">
</u-field>
</view>
<!-- 联系人姓名 -->
<view class="apply-form-item">
<u-field label="联系我" v-model="formData.contact" label-width="160" placeholder="请输入联系人" />
@ -111,11 +118,13 @@
@confirm="confirmSelect"></u-select> -->
<u-select v-model="showPop" mode="mutil-column-auto" :list="CommunityCateLists"
@confirm="confirmSelect"></u-select>
<u-select v-model="showRegion" mode="mutil-column-auto" @confirm="regionChange" :list="lists"></u-select>
</view>
</template>
<script>
import store from '@/store'
import area from '@/utils/area'
import {
baseURL,
version
@ -140,6 +149,20 @@
},
data() {
return {
addressObj: {
province: '',
city: '',
district: '',
address: '',
is_default: false
},
region: '',
addressId: '',
defaultRegion: ['安徽省', '合肥市'],
defaultRegionCode: '340100',
showRegion: false,
lists: [],
action: '',
token: '',
version: version,
@ -164,7 +187,8 @@
},
showPop: false,
recommendTopic: [],
CommunityCateLists:[]
CommunityCateLists:[],
}
},
mounted() {
@ -180,6 +204,15 @@
}
// this.initRecommendTopic();
this.getCommunityCate();
this.$nextTick(() => {
this.lists = area
console.log("地区:",area)
this.lists.forEach((item) => {
item.children.forEach((item2)=>{
this.$delete(item2,"children")
})
})
})
},
methods: {
//
@ -200,8 +233,18 @@
images,
contact_name,
contact,
contact_time
contact_time,
city_id,
province_id,
district_id,
address
} = res.data;
this.addressObj.city_id= city_id;
this.addressObj.province_id= province_id;
// this.addressObj.district= district_id; ${district}
this.region = `${address} `
this.formData.id = id
this.formData.content = content
this.formData.shop = shop_data
@ -286,6 +329,14 @@
showRecommend() {
this.showRecommendPopup = true
},
regionChange(region) {
console.log(region)
this.addressObj.province_id = region[0].value;
this.addressObj.city_id = region[1].value;
// this.addressObj.district_id = region[2].value; + " " + region[2].label
this.region = region[0].label + " " + region[1].label
},
//
handleRecommend(event) {
const {
@ -308,11 +359,31 @@
let params = {
...this.formData
}
let {
addressObj: {
contact,
telephone,
province_id,
city_id,
district_id,
is_default,
address
},
addressId,
region,
} = this;
params.goods = params.goods.map(item => item.goods_id)
params.shop = params.shop.map(item => item.id)
if (params.topic_id != null) params.topic_id = this.formData.topic_id.id
if (params.cate_id != null) params.cate_id = this.formData.cate_id
params.image = this.formData.image.map(item => item.url)
params.province_id = parseInt(province_id)
params.city_id = parseInt(city_id)
// params.district_id = parseInt(district_id)
if (!region) return this.$toast({
title: '请选择省、市、区'
});
if (params.id) {
this.handleCommunityEdit(params)
} else {
@ -398,7 +469,7 @@
// background: #f8f8f8;
textarea {
width: 100%;
min-height: 230rpx;
height: 300rpx;
}
}

51
components/components/explore.vue

@ -12,7 +12,7 @@
<view class="content" v-if="type==1">
<tabs :current="current" @change="changeTabs" height="100" >
<tab v-for="(item, index) in tabList" :key="index" :name="item.name">
<tab v-for="(item, index) in tabList1" :key="index" :name="item.name">
<lists :cateId="item.id" :typeId="1" :i="index" :index="current"></lists>
</tab>
</tabs>
@ -41,7 +41,10 @@
props: {
active: {
type: Number
}
},
cid:{
type: Number
},
},
data() {
return {
@ -49,12 +52,21 @@
name: '全部',
id: ''
}],
tabList1: [{
name: '全部',
id: ''
}],
current: 0.,
type:this.active == 2?0:1,
cate_id : 0,
}
},
watch: {
cid(){
},
active() {
if(this.active == 1){
this.type =1;
}else if(this.active == 2){
@ -66,11 +78,23 @@
this.initRecommendTopic()
// this.mescroll.resetUpScroll()
}
}
},
created() {
this.initRecommendTopic()
},
onShow() {
console.log(1111)
let cid = uni.getStorageSync("cid")
uni.removeStorageSync("cid")
if(cid!=undefined){
this.cate_id = parseInt(cid)
}
},
methods: {
initMescroll(event) {
this.isInit = true; // true
@ -84,15 +108,30 @@
changeTabs(event) {
this.current = event;
this.type =this.type;
this.cid = 0;
},
//
initRecommendTopic() {
getCommunityCate2({'type':this.type}).then(res => {
if( res.code === 1 ) {
this.tabList = [{
name: '全部',
id: ''
}, ...res.data]
if(this.type == 1){
this.tabList1 = [{
name: '全部',
id: ''
}, ...res.data]
}else{
this.tabList = [{
name: '全部',
id: ''
}, ...res.data]
}
console.log("cate数据:",this.cid)
this.tabList1.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.current = index
}
})
} else {
this.$toast({ title: res.msg })
}

13
components/components/like-header.vue

@ -16,13 +16,13 @@
<text>需求</text>
</view>
<view class="mainnav--item" :class="{'active': current === 3}" @click="changeNav(3)">
<!-- <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>
<view class="user flex row-right">
@ -37,16 +37,21 @@
</template>
<script>
import {
mapGetters
} from "vuex"
export default {
name: 'like-header',
props: {
current: {
type: Number,
default: 1
},
},
cid:{
type: Number
},
},
data() {
return {
@ -60,7 +65,7 @@
},
methods: {
changeNav(index) {
console.log(index)
console.log("当前页面cid",this.cid)
if(!this.isLogin) return this.$Router.push('/pages/login/login')
this.$emit('change', index);
}

3
components/components/lists.vue

@ -19,6 +19,7 @@
</template>
<script>
import {
getCommunityArticleLists
} from '@/api/community.js';
@ -28,6 +29,8 @@
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
export default {
mixins: [MescrollMixin, MescrollMoreItemMixin],
props: {
cateId: {

2
components/components/organ.vue

@ -205,7 +205,7 @@
padding: 0;
}
.index-bg {
background-image: url('/static/images/index_bg.png');
background-image: url('https://cdn.ahbcqz.com/uploads/images/202307051615359ddc37211.png');
background-size: 100% auto;
background-repeat: no-repeat;
}

2
components/components/team.vue

@ -201,7 +201,7 @@
padding: 0;
}
.index-bg {
background-image: url('/static/images/index_bg.png');
background-image: url('https://cdn.ahbcqz.com/uploads/images/202307051615359ddc37211.png');
background-size: 100% auto;
background-repeat: no-repeat;
}

53
pages.json

@ -241,6 +241,50 @@
"root": "bundle",
"pages": [
{
"path": "pages/user/organ",
"name": "user_organ",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "机构申请",
"disableScroll": true
}
},
{
"path": "pages/user/organ_recode",
"name": "organ_recode",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "机构申请记录",
"disableScroll": true
}
},{
"path": "pages/user/organ_result",
"name": "organ_result",
"meta": {
"auth": false,
"keepScroll": true
},
"style": {
"navigationBarTitleText": "机构申请结果",
"disableScroll": true
}
},
{
"path": "pages/help/detail",
"meta": {
"auth": false
},
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/forget_pwd/forget_pwd",
"meta": {
"auth": false
@ -827,6 +871,15 @@
"root": "bundle_b",
"pages": [
{
"path": "pages/resource_search/resource_search",
"meta": {
"auth": true
},
"style": {
"navigationBarTitleText": "资料搜索"
}
},
{
"path": "pages/confirm_order/confirm_order",
"meta": {
"auth": true

38
pages/community/community.vue

@ -5,13 +5,13 @@
<view class="container">
<follow :active="currentNav" v-show="currentNav===0" @share="handleShare"></follow>
<!-- 找服务 -->
<explore :active="currentNav" v-show="currentNav===1"></explore>
<explore :active="currentNav" :cid="cid" v-show="currentNav===1"></explore>
<!-- 找需求 -->
<explore :active="currentNav" v-show="currentNav===2"></explore>
<explore :active="currentNav" :cid="cid" v-show="currentNav===2"></explore>
<!-- 检测机构 -->
<organ :active="currentNav" v-show="currentNav===3"></organ>
<!-- <organ :active="currentNav" v-show="currentNav===3"></organ> -->
<!-- 专家服务 -->
<team :active="currentNav" v-show="currentNav===4"></team>
<!-- <team :active="currentNav" v-show="currentNav===4"></team> -->
</view>
</template>
<template v-else>
@ -42,10 +42,40 @@
},
data() {
return {
cid:0,
currentNav: 1,
communityShareItem: {}
}
},
onShow(){
let queryString = uni.getStorageSync("params")
uni.removeStorageSync("params")
if(queryString){
// 使URLSearchParams
const regex =/([^=&]+)=([^&]*)/g;
let match, params = {};
while (match = regex.exec(queryString)) {
params[match[1]] = match[2];
}
// 使getindexcate
let p_index = params['index'];
let p_cate = params['cate'];
if(p_index !=undefined && p_index!=""){
this.current = parseInt(p_index)
this.currentNav = parseInt(p_index)
}
if(p_cate !=undefined && p_cate!=""){
this.cid = parseInt(p_cate)
console.log("cid数据",this.cid)
uni.setStorageSync("cid",this.cid)
}
}
},
onUnload() {
uni.$off("changeItem")
uni.$off("hasNew")

3
pages/goods_details/goods_details.vue

@ -692,7 +692,8 @@ team_min_price
.group {
height: 100rpx;
width: 100%;
background-image: url(../../static/images/pintuan_bg.png);
// background-image: url(../../static/images/pintuan_bg.png);
background-image: url('https://cdn.ahbcqz.com/uploads/images/20230705160002a981d0842.png');
background-size: 100%;
.group-num {

4
pages/goods_search/goods_search.vue

@ -70,14 +70,14 @@
auto: false,
empty: {
icon: '/static/images/goods_null.png',
tip: "暂无商品",
tip: "暂无商品/资料",
}
},
keyword: '',
status: loadingType.LOADING,
page: 1,
sortConfig: {
goodsType: 'double',
goodsType: 'one',
priceSort: '',
saleSort: '',
},

2
pages/index/index.vue

@ -254,7 +254,7 @@
padding: 0;
}
.index-bg {
background-image: url('../../static/images/index_bg.png');
background-image: url('https://cdn.ahbcqz.com/uploads/images/202307051615359ddc37211.png');
background-size: 100% auto;
background-repeat: no-repeat;
}

6
pages/news_details/news_details.vue

@ -43,10 +43,14 @@ export default {
this.type = Number(options.type) || '';
this.id = options.id;
if (this.type) {
if (this.type == 1) {
uni.setNavigationBarTitle({
title: '帮助详情'
});
}else if (this.type == 2) {
uni.setNavigationBarTitle({
title: '全国案例'
});
} else {
uni.setNavigationBarTitle({
title: '资讯详情'

20
pages/news_list/news_list.vue

@ -4,7 +4,7 @@
:up="upOption">
<view class="contain">
<view class="banner">
<ad-swipers v-if="type == 0" :pid="14" height="340rpx">
<ad-swipers v-if="type == 0 || type == 2" :pid="14" height="340rpx">
</ad-swipers>
<ad-swipers v-if="type == 1" :pid="15" height="340rpx">
</ad-swipers>
@ -53,6 +53,7 @@
mixins: [MescrollMixin],
data() {
return {
case:0,
active: 0,
upOption: {
auto: false,
@ -64,15 +65,22 @@
categoryList: [],
newsList: [],
type: -1,
cid:0,
};
},
onLoad(options) {
this.case = options.case;
this.cid = options.cate
this.type = this.$Route.query.type || 0;
if (this.type) {
if (this.type == 1) {
uni.setNavigationBarTitle({
title: '帮助中心'
});
}else if (this.type == 2) {
uni.setNavigationBarTitle({
title: '全国案例'
});
} else {
uni.setNavigationBarTitle({
title: '商城资讯'
@ -118,9 +126,17 @@
} = await getCategoryList({
type: this.type
})
if (code == 1) {
this.categoryList = data
console.log("类型:",this.cid)
this.categoryList.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.active = index+1
}
})
}
},
}
};

115
pages/resource_list/resource_list.vue

@ -1,9 +1,36 @@
<template>
<view class="news-list">
<view class="mainnav flex">
<view class="mainnav--item" :class="{'active': current === 1}" @click="changeNav(1)">
<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>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption">
<!-- 检测机构 -->
<organ :active="currentNav" v-show="currentNav===3"></organ>
<!-- 专家服务 -->
<team :active="currentNav" v-show="currentNav===4"></team>
<view class="contain">
<view class="contain" :active="currentNav" v-show="currentNav===1">
<view >
<router-link
:to="{path: '/bundle_b/pages/resource_search/resource_search'}">
<u-search disabled
placeholder="请输入搜索内容" height="64" focus
></u-search>
</router-link>
</view>
<view >
<!-- 城市 -->
<router-link class="m-l-16 flex row-center city" to="/bundle_b/pages/city/city">
<text class="m-r-6">{{ cityInfo.name || '选择' }}</text>
@ -11,6 +38,7 @@
<!-- <image class="icon-md m-l-30" src="/static/images/icon_news.png">
</image> -->
</router-link>
</view>
<view class="banner">
<ad-swipers :pid="30" height="340rpx">
</ad-swipers>
@ -55,6 +83,9 @@
</template>
<script>
import Organ from "../../components/components/organ.vue"
import Team from "../../components/components/team.vue"
import {
mapGetters,
mapActions
@ -65,9 +96,15 @@
} from '@/api/store';
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
export default {
components: {
Organ,
Team
},
mixins: [MescrollMixin],
data() {
return {
current:1,
currentNav:1,
active: 0,
upOption: {
auto: false,
@ -76,6 +113,7 @@
tip: "暂无数据",
}
},
cid:0,
categoryList: [],
newsList: [],
type: -1,
@ -87,11 +125,42 @@
uni.setNavigationBarTitle({
title: '资料库'
});
this.cid = 0
this.current = 1
this.currentNav = 1
let queryString = uni.getStorageSync("params")
uni.removeStorageSync("params")
console.log("获取的参数:",queryString)
if(queryString){
// 使URLSearchParams
const regex =/([^=&]+)=([^&]*)/g;
let match, params = {};
while (match = regex.exec(queryString)) {
params[match[1]] = match[2];
}
// 使getindexcate
let p_index = params['index'];
let p_cate = params['cate'];
if(p_index !=undefined && p_index!=""){
this.current = parseInt(p_index)
this.currentNav = parseInt(p_index)
}
if(p_cate !=undefined && p_cate!=""){
this.cid = parseInt(p_cate)
}
}
//
await this.downCallback();
},
async onLoad(options) {
async onLoad() {
this.type = 0;
uni.setNavigationBarTitle({
title: '资料库'
@ -103,6 +172,11 @@
},
methods: {
changeNav(index){
this.current = index
this.currentNav = index
console.log("此时数据:",this.currentNav)
},
changeActive(e) {
this.active = e;
this.newsList = [] // ,
@ -154,6 +228,7 @@
item = {id:"city_"+cityInfo.id,name:"本地"}
}
this.categoryList.push(item)
if(isLogin){
item = {id:"my_buy",name:"我的购买"}
this.categoryList.push(item)
@ -161,6 +236,11 @@
item = {id:"my_download",name:"我的下载"}
this.categoryList.push(item)
}
this.categoryList.forEach((item, index) => {
if(this.cid>0 && item.id == this.cid){
this.active = index+1
}
})
},
},
computed: {
@ -170,7 +250,34 @@
};
</script>
<style lang="scss">
.news-list {
.mainnav {
padding: 16rpx 150rpx;
background-color: $-color-white;
&--item {
width: 150rpx;
font-size: 32rpx;
font-weight: 500;
text-align: center;
color: #BBBBBB;
transition: all .2s linear;
.new {
width: 10rpx;
height: 10rpx;
border-radius: 50%;
display: inline-block;
margin-bottom: 24rpx;
background-color: $-color-primary;
}
}
.active {
color: #000000;
}
}
.main {
.article-list {
padding-top: 20rpx;
@ -189,7 +296,7 @@
padding: 0;
}
.index-bg {
background-image: url('../../static/images/index_bg.png');
background-image: url('https://cdn.ahbcqz.com/uploads/images/202307051615359ddc37211.png');
background-size: 100% auto;
background-repeat: no-repeat;
}
@ -242,7 +349,7 @@
.city {
position: absolute;
top: 20rpx;
top: 100rpx;
z-index: 999;
color: #fff;
padding: 10rpx 15rpx;

BIN
static/images/index_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
static/images/loading.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
static/images/pintuan_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

6
store/modules/city.js

@ -79,6 +79,9 @@ const actions = {
getGeocoder({ ...location }).then(res => {
console.log(res)
if( res.code == 1 ) {
if(res.data == []){
return;
}
const result = res.data.result
const city_id = res.data.city_id
commit('setCityInfo', {
@ -88,7 +91,8 @@ const actions = {
gcj02_lng: result.location.lng
})
} else {
toast({ title: res.msg })
console.log(1111)
// toast({ title: res.msg })
}
})
}

6
utils/tools.js

@ -239,12 +239,16 @@ export function menuJump(item) {
const {
is_tab,
link,
link_type
link_type,
param,
} = item
switch (link_type) {
case 1:
// 本地跳转
if (is_tab) {
let queryString = link.split('?')[1];
console.log("url:",queryString)
uni.setStorageSync("params",queryString)
uni.switchTab({
url: link
});

Loading…
Cancel
Save