@AliceXiaoZhan 3 years ago
parent
commit
8ae5039890
  1. 18
      api/store.js
  2. 18
      api/user.js
  3. 4
      bundle/pages/address_edit/address_edit.vue
  4. 198
      bundle/pages/help/detail.vue
  5. 3
      bundle/pages/resource_details/resource_details.vue
  6. 344
      bundle/pages/user/organ.vue
  7. 97
      bundle/pages/user/organ_recode.vue
  8. 191
      bundle/pages/user/organ_result.vue
  9. 4
      bundle_b/pages/community_detail/community_detail.vue
  10. 4
      bundle_b/pages/community_search/community_search.vue
  11. 77
      bundle_b/pages/published_works/published_works.vue
  12. 340
      bundle_b/pages/resource_search/resource_search.vue
  13. 51
      components/components/explore.vue
  14. 11
      components/components/like-header.vue
  15. 3
      components/components/lists.vue
  16. 2
      components/components/organ.vue
  17. 2
      components/components/team.vue
  18. 53
      pages.json
  19. 38
      pages/community/community.vue
  20. 3
      pages/goods_details/goods_details.vue
  21. 4
      pages/goods_search/goods_search.vue
  22. 2
      pages/index/index.vue
  23. 6
      pages/news_details/news_details.vue
  24. 20
      pages/news_list/news_list.vue
  25. 115
      pages/resource_list/resource_list.vue
  26. BIN
      static/images/index_bg.png
  27. BIN
      static/images/loading.gif
  28. BIN
      static/images/pintuan_bg.png
  29. 6
      store/modules/city.js
  30. 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: []
};

198
bundle/pages/help/detail.vue

@ -0,0 +1,198 @@
<template>
<view class="news-list">
<view class="contain">
<view class="banner">
<ad-swipers :pid="33" height="340rpx">
</ad-swipers>
</view>
<view class="news-details">
<view class="header">
<view class="title xxl m-b-20">{{ title }}</view>
</view>
<view class="main">
<u-parse :html="article_content" />
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapGetters,
mapActions
} from 'vuex'
import {
getHelpDetail
} from '@/api/store';
export default {
data() {
return {
showLoading: true,
title: "",
article_content: ""
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.id = options.id;
if (this.id == 'documents') {
this.title = '证件办理'
uni.setNavigationBarTitle({
title: '证件办理'
});
}else if (this.id == 'train') {
this.title = '在线培训'
uni.setNavigationBarTitle({
title: '在线培训'
});
}else{
this.title = '咨询我们'
uni.setNavigationBarTitle({
title: '咨询我们'
});
}
this.getArticleDetailFun();
},
methods: {
getArticleDetailFun() {
getHelpDetail({
id: this.id
}).then(res => {
if (res.code == 1) {
setTimeout(() => {
this.article_content = res.data.content;
}, 200);
setTimeout(() => {
this.showLoading = false
}, 300);
}
});
}
}
};
</script>
<style lang="scss">
.news-details .header{
text-align: center;
padding: 20rpx 15px;
border-bottom: $-solid-border;
}
.news-details .main {
padding: 40rpx 15px;
}
.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;
.article-item {
padding: 20rpx;
align-items: flex-start;
&:not(:last-of-type){
border-bottom: $-solid-border;
}
}
}
}
}
page {
padding: 0;
}
.index-bg {
background-image: url('https://cdn.ahbcqz.com/uploads/images/202307051615359ddc37211.png');
background-size: 100% auto;
background-repeat: no-repeat;
}
.index {
min-height: calc(100vh - var(--window-bottom));
.u-navbar {
::v-deep .u-search {
padding: 0 30rpx;
}
}
//
.capsule-tips {
width: 584rpx;
color: #FFFFFF;
padding: 12rpx 18rpx;
border-radius: 14rpx;
background: rgba(0, 0, 0, 0.7);
position: relative;
position: absolute;
z-index: 9999;
bottom: -80rpx;
right: -150rpx;
}
.capsule-tips::after {
content: '';
border-bottom: 14rpx solid rgba(0, 0, 0, 0.7);
border-right: 14rpx solid transparent;
border-left: 14rpx solid transparent;
position: absolute;
top: -14rpx;
right: 88rpx;
}
.cate-btn {
padding: 12rpx 16rpx 12rpx 20rpx;
border-radius: 60rpx 0 0 60rpx;
background-color: rgba(256, 256, 256, .4);
}
}
.col-top {
position: relative;
.price {
position: absolute;
bottom:10rpx;
}
}
.city {
position: absolute;
top: 20rpx;
z-index: 999;
color: #fff;
padding: 10rpx 15rpx;
background: rgba(0,0,0,.3);
border-radius: 10rpx;
}
</style>

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 {

344
bundle/pages/user/organ.vue

@ -0,0 +1,344 @@
<template>
<view class="store-settled">
<view class="content">
<view class="apply-form bg-white">
<!-- 联系人姓名 -->
<view class="apply-form-item">
<u-field label="机构名称" v-model="form.name" label-width="160" placeholder="请输机构名称" required />
</view>
<!-- 手机号码 -->
<view class="apply-form-item">
<u-field label="联系方式" v-model="form.contact" label-width="160" placeholder="请输入联系方式" required />
</view>
<view class="apply-form-item">
<view class="label" required>机构简介</view>
<view class="flex-1" style="background-color: #F8F8F8;">
<u-input required v-model="form.intro" type="textarea" placeholder="请输入机构简介,300字以内" :border="false"
:height="160" />
</view>
</view>
<!-- 手机号码 -->
<view class="apply-form-item">
<u-field label="企业名称" v-model="form.company" label-width="160" placeholder="请输入企业名称" required />
</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="机构封面图" label-width="160" placeholder="请上传机构封面图" :border-bottom="false"
disabled />
<view>
<u-upload ref="uUpload" :show-progress="false" :header="{token: $store.getters.token}"
:max-count="10" width="150" height="150" :action="action" upload-text="上传图片"
@on-success="onSuccess" @on-remove="onRemove" />
</view>
<view class="muted m-t-20 m-b-30">支持jpgpngjpeg格式的图片</view>
</view>
<!-- <view class="apply-form-item">
<view class="label">内容</view>
<view class="flex-1" style="background-color: #F8F8F8;">
<u-input v-model="content" type="textarea" placeholder="请输入机构详情" :border="false"
:height="160" />
</view>
</view> -->
<!-- 提交申请 -->
<view style="padding: 30rpx 20rpx 30rpx 0;">
<button type="primary" size="lg" class="br60" @tap="onSubmit">申请</button>
</view>
<!-- 查阅记录 -->
<router-link to="/bundle/pages/user/organ_recode">
<view class="flex row-center muted">
<u-icon name="order" size="32" />
<view class="m-l-10">查看申请记录</view>
</view>
</router-link>
</view>
</view>
<u-select v-model="showPop" mode="single-column" value-name="id" label-name="name" :list="shopCategory"
@confirm="confirmSelect"></u-select>
<u-select v-model="showRegion" mode="mutil-column-auto" @confirm="regionChange" :list="lists"></u-select>
</view>
</template>
<script>
import area from '@/utils/area'
import {
organ,
organDetail
} from "@/api/user"
import {
baseURL
} from '@/config/app'
import {
sendSms
} from '@/api/app'
import {
SMSType
} from '@/utils/type'
export default {
data() {
return {
addressObj: {
province: '',
city: '',
district: '',
address: '',
is_default: false
},
region: '',
addressId: '',
defaultRegion: ['安徽省', '合肥市'],
defaultRegionCode: '340100',
showRegion: false,
lists: [],
content:'',
//
form: {
id: '',
clabel: '',
name: '',
image: '',
content: '',
contact:'',
company:'',
intro:'',
},
codeTips: '',
shopCategory: [],
showPop: false,
action: baseURL + '/api/file/formimage',
fileList: []
}
},
onLoad() {
this.goLogin()
const options = this.$Route.query;
console.log("options.id",options.id)
if (options.id) {
this.form.id = options.id
this.initOrganDetail()
}
this.$nextTick(() => {
this.lists = area
console.log("地区:",area)
this.lists.forEach((item) => {
item.children.forEach((item2)=>{
this.$delete(item2,"children")
})
})
})
},
methods: {
//
initOrganDetail() {
try {
console.log("this.form.id",this.form.id)
organDetail(this.form.id).then(res => {
if (res.code == 1) {
const {
id,
content,
name,
company,
intro,
contact,
image,
city_id,
province_id,
district_id,
address
} = res.data;
this.addressObj.city_id= city_id;
this.addressObj.province_id= province_id;
this.region = `${address} `
this.form.id = id
this.form.content = content
this.form.name = name
this.form.company = company
this.form.intro = intro
this.form.contact = contact
this.form.image = image
}
})
} catch (err) {
this.$nextTick(() => {
this.isFirstLoading = false;
});
}
},
goLogin() {
let {
isLogin
} = this;
if (isLogin) {
return;
}
uni.redirectTo({
url: '/pages/login/login'
});
},
async getComplainCategoryFun() {
const {
code,
data
} = await getComplainCategory()
if (code == 1) {
this.shopCategory = data.lists
this.form.cid = this.shopCategory[0].id
this.form.clabel = this.shopCategory[0].name
}
},
//
async onSubmit() {
const {
form,
fileList
} = this
const submitObj = {
...form,
image: fileList[0],
content:this.content
}
console.log("表单内容",submitObj)
let {
addressObj: {
contact,
province_id,
city_id,
district_id,
is_default,
address
},
addressId,
region,
} = this;
submitObj.province_id = parseInt(province_id)
submitObj.city_id = parseInt(city_id)
if (!submitObj.name || submitObj.name == ""){
return this.$toast({
title: '请输入机构名称',
});
}
if (!submitObj.company || submitObj.company == ""){
return this.$toast({
title: '请输入企业名称',
});
}
if (!submitObj.contact || submitObj.contact == ""){
return this.$toast({
title: '请输入联系方式',
});
}
if (!submitObj.intro || submitObj.intro == ""){
return this.$toast({
title: '请输入简介内容',
});
}
delete submitObj.clabel
const {
data,
code,
msg
} = await organ(submitObj)
if(code == 1) {
this.$toast({
title: msg
})
setTimeout(() => {
this.$Router.replace({
path: '/bundle/pages/user/organ_recode',
query: {
id: data.id
}
})
},1000)
}
},
confirmSelect(e) {
const {
value,
label
} = e[0]
this.form.cid = value
this.form.clabel = label
},
onSuccess(e) {
this.fileList.push(e.data.base_uri)
},
onRemove(index) {
this.fileList.splice(index, 1)
console.log(index)
},
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
},
},
}
</script>
<style lang="scss">
.store-settled {
background-color: #FA844C;
min-height: 100vh;
background-repeat: no-repeat;
background-size: 100% auto;
overflow: hidden;
.content {
margin-top: 60rpx;
padding: 0 20rpx 31rpx;
.apply-form {
border-radius: 8px;
padding: 20rpx 0 30rpx 26rpx;
.apply-form-item {
.send-code-btn {
height: 56rpx;
width: 188rpx;
border: 1rpx solid $-color-primary;
}
}
.primary-btn {
width: 100%;
height: 88rpx;
background-color: $-color-primary;
}
}
}
// .pop-categories {
// .reason-item {
// padding: 24rpx 20rpx;
// .reason-desc {
// line-height: 46rpx;
// }
// }
// }
}
</style>

97
bundle/pages/user/organ_recode.vue

@ -0,0 +1,97 @@
<template>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
:up="upOption">
<view class="settled-recode">
<view class="settled-list">
<router-link v-for="(item, index) in list" :key="index" :to="{path: '/bundle/pages/user/organ_result', query: {id: item.id}}">
<view class="settled-item bg-white m-t-20">
<!-- Title -->
<view class="settled-title md bold">{{item.name}}[{{item.company}}]</view>
<view class="settled-info">
<!-- Time -->
<view class="sm muted m-t-26">
提交时间{{item.create_time}}
</view>
<!-- Status -->
<view class="flex row-between m-t-20">
<view class="muted sm" style="align-self: flex-end;">
<text>处理状态</text>
<text :class="{primary: item.audit_status == 1 }">{{item.audit_status==1?'已通过':(item.audit_status==0?'未处理':'未通过')}}</text>
</view>
<view class="watch-btn br60 flex row-center" @tap="onShowDetail">查看</view>
</view>
</view>
</view>
</router-link>
</view>
</view>
</mescroll-body>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
import {
organRecord
} from '@/api/user'
export default {
mixins: [MescrollMixin],
data() {
return {
upOption: {
empty: {
icon: '/static/images/order_null.png',
tip: "暂无记录",
}
},
list: []
};
},
methods: {
upCallback(page) {
organRecord({
page_size: page.size,
page_no: page.num
}).then(({
data
}) => {
if (page.num == 1) this.list = [];
let curPageData = data.lists;
let curPageLen = curPageData.length;
this.list = this.list.concat(curPageData);
let hasNext = !!data.more;
this.mescroll.endSuccess(curPageLen, hasNext);
}).catch(() => {
this.mescroll.endErr()
})
},
}
}
</script>
<style lang="scss">
.settled-recode {
.settled-list {
padding: 20rpx;
.settled-item {
border-radius: 10rpx;
padding: 20rpx 30rpx 30rpx;
.settled-title {
padding: 21rpx 0 25rpx;
border-bottom: $-solid-border;
}
.settled-info {
.watch-btn {
border: $-solid-border;
height: 52rpx;
width: 124rpx;
}
}
}
}
}
</style>

191
bundle/pages/user/organ_result.vue

@ -0,0 +1,191 @@
<template >
<view class="settled-result" >
<view class="result-box">
<!-- Header -->
<view class="result-header bg-white flex-col col-center">
<u-image width="165rpx" height="165rpx" class="m-t-42" :src="getStatus.img" />
<view class="m-t-32 lg bold">{{getStatus.text}}</view>
<view>
<view class="m-t-20 muted sm text-center">{{getStatus.desc}}</view>
<view class="flex" v-if="applyDetail.audit_status !=2">
<router-link class="flex-1" :to="{path: '/bundle/pages/user/organ', query: {id: applyDetail.id}}" >
<view class="br60 flex row-center back-btn m-t-60 md">重新编辑</view>
</router-link>
</view>
</view>
</view>
<!-- Content -->
<view class="result-content bg-white m-t-20 p-20">
<!-- 主营行业 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>机构名称</view>
<view>{{applyDetail.name}}</view>
</view>
<!-- 主营行业 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>公司名称</view>
<view>{{applyDetail.company}}</view>
</view>
<!-- 主营行业 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>联系方式</view>
<view>{{applyDetail.contact}}</view>
</view>
<!-- 主营行业 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>所在地区</view>
<view>{{applyDetail.address}}</view>
</view>
<!-- 图片 -->
<view class="apply-form-item">
<view><text class="primary m-r-10"></text>封面图</view>
<view class="license-list flex m-t-10 flex-wrap">
<view v-for="(item,index) in license" class="m-r-14 m-t-20" @tap="previewImage(index)"
:key="index">
<u-image width="152rpx" height="152rpx" :src="item" />
</view>
</view>
</view>
<!-- 主营行业 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>机构简介</view>
<view>{{applyDetail.intro}}</view>
</view>
<!-- 处理结果 -->
<view class="apply-form-item flex row-between">
<view><text class="primary m-r-10"></text>处理结果</view>
<view>{{applyDetail.remark?applyDetail.audit_remark:'--'}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
organDetail
} from '@/api/user'
import {copy} from '@/utils/tools'
export default {
data() {
return {
applyDetail: {},
license: []
}
},
methods: {
async organDetail() {
const {
data,
code
} = await organDetail(this.id)
if (code == 1) {
this.applyDetail = data
this.license = [data.image]
}
},
previewImage(current) {
uni.previewImage({
current,
urls: this.license
})
},
onCopy(text) {
copy(text)
}
},
onLoad(options) {
this.id = this.$Route.query.id
this.organDetail()
},
computed: {
getStatus() {
const {
applyDetail: {
audit_status
}
} = this
switch (audit_status) {
case 0:
return {
img: '/static/images/img_store_submit.png',
text: '已提交等待处理!',
desc: '工作人员将会电话联系您,请注意接听!'
}
case 1:
return {
img: '/static/images/img_store_success.png',
text: '工作人员已处理!',
desc: '请查看处理结果'
}
case 2:
return {
img: '/static/images/img_store_fail.png',
text: '工作人员已拒绝!',
desc: '请重新提交申请'
}
default:
return {}
}
}
}
}
</script>
<style lang="scss" scoped>
page {
overflow: scroll !important;
}
.settled-result {
padding: 20rpx;
.result-box {
.result-header {
padding: 0 75rpx 50rpx;
border-radius: 10rpx;
.btn-copy {
width: 96rpx;
height: 42rpx;
line-height: 42rpx;
border: $-solid-border;
}
}
.back-btn {
height: 88rpx;
border: 1px solid #CCC;
&.primary {
border-color: $-color-primary;
color: $-color-primary;
}
}
.result-content {
border-radius: 10rpx;
.apply-form-item {
padding: 30rpx 0;
&:not(:last-of-type) {
border-bottom: $-solid-border;
}
}
}
}
}
</style>

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;
}
}

340
bundle_b/pages/resource_search/resource_search.vue

@ -0,0 +1,340 @@
<template>
<view class="goods-search flex-col news-list">
<view class="header-wrap">
<view class="search">
<u-search v-model="keyword" @focus="showHistory = true" :focus="showHistory" @search="onSearch"
bg-color="#F4F4F4"></u-search>
</view>
</view>
<view v-show="showHistory" class="search-content bg-white">
<scroll-view :scroll-y="true" style="height: 100%">
<view v-if="hotList.length" class="search-words">
<view class="title">热门搜索</view>
<view class="words flex flex-wrap">
<view v-for="(item, index) in hotList" :key="index"
class="item br60 m-r-20 m-b-20 lighter sm line-1" @tap="onChangeKeyword(item)">{{item}}</view>
</view>
</view>
<view v-if="historyList.length" class="search-words">
<view class="title flex row-between">
<view>历史搜索</view>
<view class="xs muted m-r-20" style="padding: 10rpx 20rpx" @tap="clearSearchFun">清空</view>
</view>
<view class="words flex flex-wrap">
<view v-for="(item, index) in historyList" :key="index"
class="item br60 m-r-20 m-b-20 lighter sm line-1" @tap="onChangeKeyword(item)">{{item}}</view>
</view>
</view>
</scroll-view>
</view>
<view class="main">
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
:up="upOption" :down="{auto: true}" :fixed="false">
<view class="article-list">
<view class="article-item bg-white" v-for="(item, index) in newsList" :key="index" >
<router-link :to="{path: '/bundle/pages/resource_details/resource_details', query: {id: item.id, type}}">
<view class="flex col-top">
<view class="info flex-1">
<view class="title lg line-2 m-b-20">{{ item.title }}</view>
<view class="lighter line-2">
<view>{{ item.intro }}</view>
</view>
<view class="flex row-between price">
<view class="xs muted">价格: <text style="color: red;">{{item.price_str}}</text></view>
</view>
</view>
<u-image width="240rpx" height="180rpx" class="img m-l-20" :src="item.image" />
</view>
<view class="flex row-between m-t-20">
<view class="xs muted">发布时间: {{item.create_time}}</view>
<view class="flex">
<image class="icon-sm" src="/static/images/icon_see.png"></image>
<view class="m-l-10 xs muted">{{ item.visit }}人浏览</view>
</view>
</view>
</router-link>
</view>
</view>
</mescroll-uni>
</view>
</view>
</template>
<script>
import {
getResourceList
} from '@/api/store';
import {
mapGetters
} from 'vuex';
import {
loadingType
} from '@/utils/type';
import {
getRect,
trottle
} from '@/utils/tools';
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins";
export default {
mixins: [MescrollMixin],
data() {
return {
upOption: {
auto: false,
empty: {
icon: '/static/images/goods_null.png',
tip: "暂无资料",
}
},
keyword: '',
status: loadingType.LOADING,
page: 1,
sortConfig: {
goodsType: 'one',
priceSort: '',
saleSort: '',
},
goodsList: [],
showHistory: false,
hotList: [],
historyList: [],
newsList:[]
};
},
watch: {
//
keyword(value, old) {
if (!value && !this.id) {
this.showHistory = true
}
},
showHistory(value) {
if (value) {
this.getSearchpageFun();
}
},
'sortConfig.saleSort'() {
this.onSearch()
},
'sortConfig.priceSort'() {
this.onSearch()
}
},
onLoad(options) {
this.onSearch = trottle(this.onSearch, 500, this);
this.init(options);
},
computed: {
...mapGetters(['sysInfo'])
},
methods: {
downCallback() {
this.onRefresh()
},
upCallback(page) {
let pageNum = page.num; // , 1
let pageSize = page.size; // , 10
let {
goodsList,
keyword,
sortConfig: {
priceSort,
saleSort,
}
} = this;
const params = {
page_size: pageSize,
page_no: pageNum,
keyword
}
getResourceList(params).then(({
data
}) => {
if(this.keyword != ""){
this.historyList.forEach((item, index) => {
if(item == this.keyword){
this.historyList.splice(index, 1)
}
})
this.historyList.unshift(this.keyword)
uni.setStorageSync('history', this.historyList)
console.log("历史列表",this.historyList)
}
if (page.num == 1) this.newsList = [];
let curPageData = data.list;
let curPageLen = curPageData.length;
let hasNext = !!data.more;
this.newsList = this.newsList.concat(curPageData);
this.mescroll.endSuccess(curPageLen, hasNext);
}).catch(() => {
this.mescroll.endErr()
})
},
onChange(e) {
this.keyword = e.value
},
clearSearchFun() {
uni.removeStorageSync("history")
this.historyList = []
},
init(option) {
const {
id,
name,
type
} = this.$Route.query
this.type = type
if (id) {
uni.setNavigationBarTitle({
title: name
});
this.id = id;
this.$nextTick(() => {
this.onRefresh()
})
} else {
uni.setNavigationBarTitle({
title: '资料搜索'
});
this.showHistory = true
}
},
getSearchpageFun() {
this.historyList = uni.getStorageSync('history') || []
},
onClear() {
if (this.id) {
this.onRefresh();
}
},
onSearch() {
this.showHistory = false
this.$nextTick(() => {
this.onRefresh()
})
},
onRefresh() {
this.goodsList = []
this.mescroll.resetUpScroll();
},
onChangeKeyword(item) {
this.keyword = item
this.showHistory = false
this.onRefresh();
},
}
};
</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;
.article-item {
padding: 20rpx;
align-items: flex-start;
&:not(:last-of-type){
border-bottom: $-solid-border;
}
}
}
}
}
page {
height: 100%;
padding: 0;
}
.goods-search {
height: 100%;
position: relative;
.header-wrap {
position: relative;
z-index: 999;
.search {
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.03);
position: relative;
z-index: 1;
}
}
.search-content {
position: absolute;
width: 100%;
height: 100%;
padding-top: 100rpx;
z-index: 100;
.search-words {
padding-left: 24rpx;
padding-bottom: 20rpx;
.title {
padding: 26rpx 0;
}
.words {
.item {
line-height: 52rpx;
height: 52rpx;
padding: 0 24rpx;
background-color: #F5F5F5;
}
}
}
}
.content {
flex: 1;
min-height: 0;
.goods-list {
overflow: hidden;
}
}
}
</style>

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 })
}

11
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