Commit e6b161aef1f2568f4af9f2d6284c27303634966d

Authored by 易尊强
1 parent 9ebd710b

2/23

components/TabBar/TabBar.scss
... ... @@ -4,7 +4,7 @@
4 4 width: 100%;
5 5 padding-bottom: constant(safe-area-inset-bottom);
6 6 padding-bottom: env(safe-area-inset-bottom);
7   - z-index: 999;
  7 + z-index: 2;
8 8 background-color: rgba(255, 255, 255, .5);
9 9 }
10 10 .page-total{
... ...
components/TabBar/TabBar.vue
1 1 <template>
2 2 <view class="page-total-content">
3   - <view style="position: absolute; bottom: -6rpx; width: 100%;z-index: 0;"><image src="../../static/bottom.png" style="width: 100%; height: 264rpx;"></image></view>
4   - <view class="page-total">
5   - <view class="tab-list">
6   - <view class="list" v-for="(item,index) in TabBarList"
7   - @click="onTabBar(item,index)"
8   - :key="index">
9   - <image :src="item.acImg" mode="widthFix" v-show="tabBarShow === index"></image>
10   - <image :src="item.img" mode="widthFix" v-show="tabBarShow != index"></image>
11   - <text :class="{'action':tabBarShow===index}">{{item.name}}</text>
  3 + <view>
  4 + <image src="../../static/bottom.png" style="width: 100%; height: 264rpx;"></image>
  5 + </view>
  6 + <view class="page-total">
  7 + <view class="tab-list">
  8 + <view class="list" v-for="(item,index) in TabBarList" @click="onTabBar(item,index)" :key="index">
  9 + <image :src="item.acImg" mode="widthFix" v-show="tabBarShow === index"></image>
  10 + <image :src="item.img" mode="widthFix" v-show="tabBarShow != index"></image>
  11 + <text :class="{'action':tabBarShow===index}">{{item.name}}</text>
  12 + </view>
12 13 </view>
13 14 </view>
14 15 </view>
15   - </view>
16 16 </template>
17 17  
18 18 <script>
19 19 export default {
20 20 data() {
21 21 return {
22   - TabBarList:[
23   - {
  22 + TabBarList: [{
24 23 index: 0,
25 24 name: '首页',
26 25 img: '/static/tabBar/tab_01.png',
... ... @@ -38,7 +37,7 @@
38 37 phoneModel: '',
39 38 };
40 39 },
41   - props:{
  40 + props: {
42 41 tabBarShow: {
43 42 type: Number,
44 43 default: 0,
... ... @@ -46,47 +45,47 @@
46 45 },
47 46 mounted() {
48 47 try {
49   - const res = uni.getSystemInfoSync();
50   - let that = this;
51   - // 获取系统信息
52   - uni.getSystemInfo({
53   - success(res) {
54   - console.log(res.brand) //手机牌子
55   - console.log(res.model) //手机型号
56   - console.log(res.screenWidth) //屏幕宽度
57   - console.log(res.screenHeight) //屏幕高度
58   - that.codeheight = Math.round(res.screenHeight);
59   - that.phoneModel =res.model
60   - if(res.model.search('iPhone')){
61   - that.isOverall = 0;
62   - }else if(Math.round(res.screenHeight)>740){
63   - that.isOverall = 1;
64   - }
65   - console.log(that.isOverall);
66   - }
67   - });
  48 + const res = uni.getSystemInfoSync();
  49 + let that = this;
  50 + // 获取系统信息
  51 + uni.getSystemInfo({
  52 + success(res) {
  53 + console.log(res.brand) //手机牌子
  54 + console.log(res.model) //手机型号
  55 + console.log(res.screenWidth) //屏幕宽度
  56 + console.log(res.screenHeight) //屏幕高度
  57 + that.codeheight = Math.round(res.screenHeight);
  58 + that.phoneModel = res.model
  59 + if (res.model.search('iPhone')) {
  60 + that.isOverall = 0;
  61 + } else if (Math.round(res.screenHeight) > 740) {
  62 + that.isOverall = 1;
  63 + }
  64 + console.log(that.isOverall);
  65 + }
  66 + });
68 67 } catch (e) {
69   - // error
  68 + // error
70 69 }
71 70 },
72   - methods:{
  71 + methods: {
73 72 /**
74 73 * @param {Object} item
75 74 * @param {Number} index
76 75 */
77   - onTabBar(item,index){
  76 + onTabBar(item, index) {
78 77 // this.tabBarShow = index;
79   - switch (index){
  78 + switch (index) {
80 79 case 0:
81 80 wx.switchTab({
82   - url:'/pages/home/home'
  81 + url: '/pages/home/home'
83 82 })
84 83 break;
85 84 case 1:
86 85 wx.switchTab({
87   - url:'/pages/my/my'
  86 + url: '/pages/my/my'
88 87 })
89   - break;
  88 + break;
90 89 }
91 90 }
92 91 }
... ... @@ -95,4 +94,4 @@
95 94  
96 95 <style scoped lang="scss">
97 96 @import 'TabBar.scss';
98 97 -</style>
  98 +</style>
99 99 \ No newline at end of file
... ...
pages/conDetail/conDetail.vue
... ... @@ -104,11 +104,11 @@
104 104 title: '请登录',
105 105 icon: 'none'
106 106 })
107   - setTimeout(() => {
108   - uni.reLaunch({
109   - url: '/pages/login/index'
110   - })
111   - })
  107 + // setTimeout(() => {
  108 + // uni.reLaunch({
  109 + // url: '/pages/login/index'
  110 + // })
  111 + // })
112 112 }
113 113 },
114 114 // 获取需求详情数据
... ...
pages/construct/construct.scss
... ... @@ -61,7 +61,7 @@
61 61 /* #ifdef APP-PLUS */
62 62 // margin-top: calc(150rpx + var(--status-bar-height));
63 63 /* #endif */
64   - margin-top: 60rpx;
  64 + margin-top: 150rpx;
65 65 .article-list{
66 66 padding: 0 4%;
67 67 margin: 30rpx auto;
... ...
pages/datain/datain.vue
... ... @@ -16,8 +16,8 @@
16 16 </view>
17 17 </view>
18 18 <view class="user-list">
19   - <view class="list" @click="toPostCom()" style="background-color:#D32D25;">
20   - <view class="title" style="color:white">
  19 + <view class="list" @click="toPostCom()" >
  20 + <view class="title" >
21 21 <text>企业信息采集</text>
22 22 </view>
23 23 <view class="more-content">
... ...
pages/demand/demand.vue
1 1 <template>
2 2 <view class="page">
3 3 <view class="main">
4   - <view class="top"><image src="../../static/img/supply2.png" @click="toPostDemand()" mode="widthFix"></image></view>
  4 + <view class="top">
  5 + <image src="../../static/img/supply2.png" @click="toPostDemand()" mode="widthFix"></image>
  6 + </view>
5 7 <view class="titleall-box">
6 8 <view class="title-screen">
7 9 <scroll-view scroll-x="true" class="scrollview-box">
8 10 <!-- 下方的红线 -->
9   - <!-- <view ref="line" class="line" ></view> -->
10   - <view :class="['title-screen-box',{'red_line':nowShow === 1}]" @click="allPro(1,'全部')">
11   - <view>全部</view>
12   - </view>
13   - <view :class="['title-screen-box',{'red_line':nowShow === 2}]" @click="metalPro(2,'金属')">
14   - <view>金属</view>
15   - </view>
16   - <view :class="['title-screen-box',{'red_line':nowShow === 3}]" @click="devicePro(3,'专用设备')">
17   - <view>专用设备</view>
18   - </view>
19   - <view :class="['title-screen-box',{'red_line':nowShow === 4}]" @click="tranPro(4,'交通运输')">
20   - <view>交通运输</view>
21   - </view>
22   - <view :class="['title-screen-box',{'red_line':nowShow === 5}]" @click="elecPro(5,'电气机械')">
23   - <view>电气机械</view>
24   - </view>
25   - <view :class="['title-screen-box',{'red_line':nowShow === 6}]" @click="commuPro(6,'电子及通讯')">
26   - <view>电子及通讯</view>
27   - </view>
  11 + <!-- <view ref="line" class="line" ></view> -->
  12 + <view :class="['title-screen-box',{'red_line':nowShow === 1}]" @click="allPro(1,'全部')">
  13 + <view>全部</view>
  14 + </view>
  15 + <view :class="['title-screen-box',{'red_line':nowShow === 2}]" @click="metalPro(2,'金属')">
  16 + <view>金属</view>
  17 + </view>
  18 + <view :class="['title-screen-box',{'red_line':nowShow === 3}]" @click="devicePro(3,'专用设备')">
  19 + <view>专用设备</view>
  20 + </view>
  21 + <view :class="['title-screen-box',{'red_line':nowShow === 4}]" @click="tranPro(4,'交通运输')">
  22 + <view>交通运输</view>
  23 + </view>
  24 + <view :class="['title-screen-box',{'red_line':nowShow === 5}]" @click="elecPro(5,'电气机械')">
  25 + <view>电气机械</view>
  26 + </view>
  27 + <view :class="['title-screen-box',{'red_line':nowShow === 6}]" @click="commuPro(6,'电子及通讯')">
  28 + <view>电子及通讯</view>
  29 + </view>
28 30 </scroll-view>
29 31 <view class="title-screen-box" style="background-color: #fff;margin-right: 0;text-align: center;">
30   - <view class="title-screen-box-btn"><image src="../../static/supply.png"></image></view>
  32 + <view class="title-screen-box-btn">
  33 + <image src="../../static/supply.png"></image>
  34 + </view>
31 35 </view>
32 36 </view>
33 37 </view>
34   -
  38 +
35 39 <view class="recommend-info">
36 40 <view class="goods-list">
37 41 <view class="list" @click="ArticleDetails(item)" v-for="(item,index) in demandList" :key="index">
... ... @@ -45,17 +49,21 @@
45 49 </view>
46 50 <view class="price-info">
47 51 <view class="user-price">
48   - <view class="goods-city"><image src="../../static/image/default_logo.jpg"></image>{{item.comanyName}}</view>
49   - <view class="goods-city-img"><image src="../../static/right2.png"></image></view>
  52 + <view class="goods-city">
  53 + <image src="../../static/image/default_logo.jpg"></image>{{item.comanyName}}
  54 + </view>
  55 + <view class="goods-city-img">
  56 + <image src="../../static/right2.png"></image>
  57 + </view>
50 58 </view>
51 59 <view class="vip-price">
52 60 </view>
53 61 </view>
54 62 </view>
55   -
  63 +
56 64 </view>
57 65 </view>
58   -
  66 +
59 67 </view>
60 68 </view>
61 69 </template>
... ... @@ -64,9 +72,9 @@
64 72 export default {
65 73 data() {
66 74 return {
67   - demandList:[],
68   - nowShow:1
69   - }
  75 + demandList: [],
  76 + nowShow: 1
  77 + }
70 78 },
71 79 onLoad() {
72 80 let that = this
... ... @@ -75,65 +83,67 @@
75 83 },
76 84 methods: {
77 85 // 点击全部
78   - allPro(index,name){
  86 + allPro(index, name) {
79 87 let that = this
80 88 this.nowShow = index
81   -
  89 +
82 90 console.log(name)
83   -
  91 +
84 92 },
85 93 // 点击金属
86   - metalPro(index,name){
  94 + metalPro(index, name) {
87 95 let that = this
88 96 that.nowShow = index
89 97 console.log(name)
90   -
  98 +
91 99 },
92 100 // 点击专用设备
93   - devicePro(index,name){
  101 + devicePro(index, name) {
94 102 let that = this
95 103 that.nowShow = index
96 104 console.log(name)
97   -
  105 +
98 106 },
99 107 // 点击交通运输
100   - tranPro(index,name){
  108 + tranPro(index, name) {
101 109 let that = this
102 110 that.nowShow = index
103 111 console.log(name)
104   -
  112 +
105 113 },
106 114 // 点击电气机械
107   - elecPro(index,name){
  115 + elecPro(index, name) {
108 116 let that = this
109 117 that.nowShow = index
110 118 console.log(name)
111   -
  119 +
112 120 },
113 121 // 点击电子及通讯
114   - commuPro(index,name){
  122 + commuPro(index, name) {
115 123 let that = this
116 124 that.nowShow = index
117 125 console.log(name)
118   -
  126 +
119 127 },
120 128 // 获取全部需求数据
121   - getDemandList(){
  129 + getDemandList() {
122 130 let that = this
123   - that.API.getDemandList({pageSize:50}).then(res => {
  131 + that.API.getDemandList({
  132 + pageSize: 50,
  133 + }).then(res => {
124 134 console.log(res)
125 135 that.demandList = res.data.list
126 136 })
127 137 },
128   - ArticleDetails(it){
  138 + ArticleDetails(it) {
129 139 uni.navigateTo({
130 140 url: `/pages/ArticleDetails/ArticleDetails?data=${JSON.stringify(it)}`
131 141 })
132 142 },
133 143 // 去需求发布页面
134   - toPostDemand(){
  144 + toPostDemand() {
135 145 uni.navigateTo({
136   - url:'/pages/postDemand/postDemand'
  146 + url: '/pages/postDemand/postDemand'
137 147 })
138 148 }
139 149 }
... ... @@ -142,4 +152,4 @@
142 152  
143 153 <style scoped lang="scss">
144 154 @import 'demand.scss';
145 155 -</style>
  156 +</style>
146 157 \ No newline at end of file
... ...
pages/equip/equip.vue
... ... @@ -30,7 +30,7 @@
30 30 </view>
31 31 <p @click="toAllCompany()">查看更多 <image src="../../static/right.png"></image></p>
32 32 </view>
33   - <view class="item_box" v-for="(item,index) in twentyList">
  33 + <view class="item_box" v-for="(item,index) in twentyList" @click="onCompany(item.id)">
34 34 <image :src="baseUrl + item.logo" mode="" v-if="item.logo"></image>
35 35 <image src="../../static/image/default_logo.jpg" v-else mode=""></image>
36 36 <view class="right">
... ...
pages/home/home.scss
... ... @@ -6,7 +6,8 @@
6 6 padding: 0 30rpx;
7 7 position: absolute;
8 8 z-index: 1;
9   - padding-bottom: 120rpx;
  9 + // padding-bottom: 120rpx;
  10 + padding-bottom: 250rpx;
10 11 width: 100%;
11 12 }
12 13 .logo {
... ...
pages/home/home.vue
... ... @@ -186,7 +186,7 @@
186 186 getNewsList() {
187 187 let that = this
188 188 that.API.getNewsList({
189   - categoryId: '360233879019193605'
  189 + categoryId: '530363088214426885'
190 190 }).then(res => {
191 191 console.log("新闻", res)
192 192 that.newsList = res.data.list
... ...
pages/map/map.nvue deleted
1   -<template>
2   - <view class="page">
3   - <view class="content">
4   - <cover-view></cover-view>
5   - <view class="bg">
6   - <!-- <web-view src="../../static/html/map.html" style="width: 100%;height: 100%; position: absolute; z-index: 0;"></web-view> -->
7   - <map style="width: 100%;height: 70%;position: relative;top: 190rpx;" :latitude="latitude"
8   - :longitude="longitude" :markers="covers" :show-location="true"></map>
9   - </view>
10   - <view class="map-content" style="position: relative;z-index: 1000;">
11   - <!-- 搜索 -->
12   - <view class="search-head">
13   - <view class="search">
14   - <image src="../../static/fdj1.png"></image>
15   - <text></text>
16   - <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getCompanyList" />
17   - </view>
18   - <!-- 显示公司选项 -->
19   - <view class="btn" @click="getCompanyDetail">
20   - <text>搜索11</text>
21   - </view>
22   - </view>
23   - <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name"
24   - value-name="id"></mo-hu-search>
25   - </view>
26   -
27   - <view class="bottom">
28   - <view class="invitation-data">
29   - <view class="invitation-show">
30   - <view class="icon" v-show="show">
31   - <image :src=" baseUrl + logo.url"></image>
32   - </view>
33   - <view class="item">
34   - <view class="title-btn">
35   - <view class="title">
36   - <text class="bt">{{this.companyName}}</text>
37   - </view>
38   - </view>
39   - <view class="describe">
40   - <text>{{this.dizhi}}</text>
41   - </view>
42   - <view class="describe">
43   - <text>电话:{{getData.fuzerendianhua}}</text>
44   - <image src="../../static/map1.png"></image>
45   - </view>
46   - <view class="describe">
47   - <text>营业时间:10:00-20:00</text>
48   - </view>
49   - </view>
50   - <view class="right">
51   - <view class="red-btn" @click.stop="handleNavigation">
52   - <image src="../../static/dh.png"></image>
53   - <text>导航</text>
54   - </view>
55   - </view>
56   - </view>
57   - </view>
58   - </view>
59   - </view>
60   - </view>
61   -</template>
62   -
63   -<script>
64   - import request from '@/utils/request.js'
65   - // import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
66   - import moHuSearch from '../../components/qj-fuzzy-search/index.vue'
67   - export default {
68   - components: {
69   - moHuSearch
70   - },
71   - data() {
72   - return {
73   - keyword: '',
74   - id: 0, // 使用 marker点击事件 需要填写id
75   - title: 'map',
76   - // latitude: 30.602494,
77   - // longitude: 104.073004,
78   - latitude: 30.926786,
79   - longitude: 104.294514,
80   - covers: [{
81   - latitude: 30.926786,
82   - longitude: 104.294514,
83   - iconPath: '../../static/map_red.png',
84   - // width:20,
85   - // height:26,
86   - },
87   - // {
88   - // latitude: 39.90,
89   - // longitude: 116.39,
90   - // iconPath: '../../../static/wuganda.png'
91   - // },
92   - ],
93   - getData: {},
94   - show: false,
95   - selectShow: false,
96   - selectName: '',
97   - selectId: '',
98   - logo: {},
99   - baseUrl: 'http://deyanggaoxin.fengshiyun.com',
100   - comList: [],
101   - companyName: '德阳高新区管委会',
102   - dizhi: '广汉市聆湖西路一段一号',
103   - // 我自己的位置经纬度(百度地图需要传入自己的经纬度进行导航)
104   - selfLocation: {
105   - latitude: '',
106   - longitude: ''
107   - }
108   - }
109   - },
110   - onLoad() {
111   - // this.getCompanyDetail()
112   - },
113   - methods: {
114   - // 获取公司列表
115   - getCompanyList() {
116   - this.selectShow = true
117   - // this.$refs.sou.open()
118   - request({
119   - url: '/api/permission/organize/GetSelectList',
120   - method: 'get',
121   - data: {
122   - keyword: this.selectName
123   - }
124   - }).then(res => {
125   - if (res.code === 200) {
126   - // console.log(res)
127   - this.comList = res.data.list.map(it => {
128   - return {
129   - id: it.id,
130   - name: it.fullName
131   - }
132   - })
133   - // console.log(this.comList)
134   - this.comList = JSON.parse(JSON.stringify(this.comList))
135   - }
136   - })
137   - },
138   - select(item) {
139   - this.selectShow = false;
140   - this.selectName = item.name;
141   - this.selectId = item.id
142   - },
143   - // 查询公司
144   - getCompanyDetail() {
145   - request({
146   - url: `/api/permission/organize/${this.selectId}`,
147   - method: 'get',
148   - data: {}
149   - }).then(res => {
150   - if (res.code === 200) {
151   - console.log(res)
152   - // console.log(res.data.list)
153   - if (res.data.latlong !== null) {
154   - let position = res.data.latlong.split(',')
155   - this.latitude = position[1]
156   - this.longitude = position[0]
157   - this.covers[0].latitude = position[1]
158   - this.covers[0].longitude = position[0]
159   - console.log(position)
160   - }
161   -
162   - this.getData = res.data
163   - this.companyName = this.getData.fullName
164   - this.dizhi = this.getData.dizhi
165   - // console.log(this.getData.F_Logo.length)
166   - if (this.getData.logo.length > 0) {
167   - this.show = true
168   - this.logo = this.getData.logo[0]
169   - console.log(this.logo)
170   -
171   - }
172   - }
173   - })
174   - },
175   -
176   - // 点击跳转到本机地图软件
177   - handleNavigation() {
178   - // console.log('导航')
179   - const _this = this
180   - if (!this.latitude || !this.longitude || !this.companyName) return
181   - uni.getLocation({
182   - type: 'wgs84',
183   - success: function(res) {
184   - console.log('当前位置的经度:' + res.longitude);
185   - console.log('当前位置的纬度:' + res.latitude);
186   - this.selfLocation.longitude = res.longitude
187   - this.selfLocation.latitude = res.latitude
188   - }
189   - });
190   - // 微信
191   - // #ifdef MP-WEIXIN
192   - let _obj = {
193   - latitude: parseFloat(this.latitude),
194   - longitude: parseFloat(this.longitude),
195   - name: this.companyName,
196   - }
197   - if (this.dizhi) {
198   - _obj['dizhi'] = this.dizhi
199   - }
200   - uni.openLocation({
201   - ..._obj,
202   - success: function(res) {
203   - console.log('打开系统位置地图成功')
204   - },
205   - fail: function(error) {
206   - console.log(error)
207   - }
208   - })
209   - // #endif
210   -
211   - // #ifdef APP-PLUS
212   - // 判断系统安装的地图应用有哪些, 并生成菜单按钮
213   - let _mapName = [{
214   - title: '高德地图',
215   - name: 'amap',
216   - androidName: 'com.autonavi.minimap',
217   - iosName: 'iosamap://'
218   - },
219   - {
220   - title: '百度地图',
221   - name: 'baidumap',
222   - androidName: 'com.baidu.BaiduMap',
223   - iosName: 'baidumap://'
224   - },
225   - {
226   - title: '腾讯地图',
227   - name: 'qqmap',
228   - androidName: 'com.tencent.map',
229   - iosName: 'qqmap://'
230   - },
231   - ]
232   - // 根据真机有的地图软件 生成的 操作菜单
233   - let buttons = []
234   - let platform = uni.getSystemInfoSync().platform
235   - platform === 'android' && _mapName.forEach(item => {
236   - if (plus.runtime.isApplicationExist({
237   - pname: item.androidName
238   - })) {
239   - buttons.push(item)
240   - }
241   - })
242   - platform === 'ios' && _mapName.forEach(item => {
243   - console.log(item.iosName)
244   - if (plus.runtime.isApplicationExist({
245   - action: item.iosName
246   - })) {
247   - buttons.push(item)
248   - }
249   - })
250   - if (buttons.length) {
251   - plus.nativeUI.actionSheet({ //选择菜单
252   - title: "选择地图应用",
253   - cancel: "取消",
254   - buttons: buttons
255   - }, function(e) {
256   - let _map = buttons[e.index - 1]
257   - _this.openURL(_map, platform)
258   - })
259   - } else {
260   - uni.showToast({
261   - title: '请安装地图软件',
262   - icon: 'none'
263   - })
264   - return
265   - }
266   - // #endif
267   - },
268   -
269   - // 打开第三方程序实际应用
270   - openURL(map, platform) {
271   - let _defaultUrl = {
272   - android: {
273   - "amap": `amapuri://route/plan/?sid=&did=&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
274   - 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
275   - 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&coord_type=wgs84&mode=driving&src=andr.baidu.openAPIdemo"`
276   - },
277   - ios: {
278   - "amap": `iosamap://path?sourceApplication=fuxishan_uni_client&dlat=${this.latitude}&dlon=${this.longitude}&dname=${this.companyName}&dev=0&t=0`,
279   - 'qqmap': `qqmap://map/routeplan?type=drive&to=${this.companyName}&tocoord=${this.latitude},${this.longitude}&referer=fuxishan_uni_client`,
280   - 'baidumap': `baidumap://map/direction?origin=${this.selfLocation.latitude},${this.selfLocation.longitude}&destination=name:${this.companyName}|latlng:${this.latitude},${this.longitude}&mode=driving&src=ios.baidu.openAPIdemo`
281   - }
282   - }
283   - let newurl = encodeURI(_defaultUrl[platform][map.name]);
284   - console.log(newurl)
285   - plus.runtime.openURL(newurl, function(res) {
286   - console.log(res)
287   - uni.showModal({
288   - content: res.message
289   - })
290   - }, map.androidName ? map.androidName : '');
291   - }
292   -
293   - }
294   - }
295   -</script>
296   -
297   -<style scoped lang="scss">
298   - @import 'map.scss';
299   -</style>
300 0 \ No newline at end of file
pages/my/my.vue
... ... @@ -66,7 +66,7 @@
66 66 <text>招聘</text>
67 67 </view>
68 68 </view>
69   - <view class="line"></view>
  69 + <!-- <view class="line"></view>
70 70 <view class="list" @click="toMyCom()">
71 71 <view class="thumb">
72 72 {{com}}
... ... @@ -74,7 +74,7 @@
74 74 <view class="name">
75 75 <text>企业</text>
76 76 </view>
77   - </view>
  77 + </view> -->
78 78 </view>
79 79 </view>
80 80  
... ... @@ -169,7 +169,7 @@
169 169 <text class="iconfont icon-more"></text>
170 170 </view>
171 171 </view>
172   - <!-- <view class="list" @click="toMyCom">
  172 + <view class="list" @click="toMyCom" v-show="isAdmin">
173 173 <view class="icon-data">
174 174 <view class="icon">
175 175 <image src="/static/my-icon5.png" mode=""></image>
... ... @@ -183,7 +183,7 @@
183 183 <view class="more">
184 184 <text class="iconfont icon-more"></text>
185 185 </view>
186   - </view> -->
  186 + </view>
187 187 <!-- <view class="list">
188 188 <view class="icon-data">
189 189 <view class="icon">
... ... @@ -237,7 +237,8 @@
237 237 // 招聘数量
238 238 zhaoPCount: '',
239 239 // 企业数量
240   - com:''
  240 + com:'',
  241 + isAdmin:false
241 242 };
242 243 },
243 244 onLoad() {
... ... @@ -257,6 +258,9 @@
257 258 let userCode = uni.getStorageSync('user')
258 259 // console.log("用户的code", this.userCode)
259 260 this.userId = userCode.userInfo.userId
  261 + if(this.userId === 'admin'){
  262 + this.isAdmin = true
  263 + }
260 264 this.userName = userCode.userInfo.userAccount
261 265 this.userIcon = userCode.userInfo.headIcon
262 266 this.organizeName = userCode.userInfo.organizeName
... ...
pages/my/myCom/myCom.vue
... ... @@ -18,7 +18,7 @@
18 18 </view>
19 19 <view class="bottom">
20 20 <button type="primary" @click="GoodsDetails(it.id)">详情</button>
21   - <button type="warn" @click="deletePro(it.id)">删除</button>
  21 + <!-- <button type="warn" @click="deletePro(it.id)">删除</button> -->
22 22 </view>
23 23 </view>
24 24 </view>
... ...
pages/my/myComdetail/myComdetail.vue
... ... @@ -19,10 +19,10 @@
19 19 <!-- <u-cell-item title="手机号" :value="userInfo.mobilePhone" :arrow="false"></u-cell-item> -->
20 20 <!-- <u-cell-item title="邮箱" :value="userInfo.email" :arrow="false"></u-cell-item> -->
21 21 </u-cell-group>
22   - <button type="primary"
  22 + <!-- <button type="primary"
23 23 @click="toUpdate()"
24 24 style="margin: 0 auto; margin-top: 30rpx; width: 90%;margin-bottom: 40rpx;"
25   - >修改</button>
  25 + >修改</button> -->
26 26 </view>
27 27 </template>
28 28  
... ...
pages/news/news.vue
1 1 <template>
2 2 <view class="page">
3 3 <view class="coupon-tab">
4   - <view class="tab" :class="{'action':TabShow===0}" @click="onCouponTab(0)">
  4 + <view class="tab" :class="{'action':TabShow===0}" @click="onCouponTab(0,'360233879019193605')">
5 5 <text>热点要闻</text>
6 6 </view>
7   - <view class="tab" :class="{'action':TabShow===1}" @click="onCouponTab(1)">
  7 + <view class="tab" :class="{'action':TabShow===1}" @click="onCouponTab(1,'530363088214426885')">
8 8 <text>园区快讯</text>
9 9 </view>
10 10 </view>
... ... @@ -48,7 +48,7 @@
48 48 </view>
49 49 </view>
50 50 <view class="thumb" v-if="item.isImg">
51   - <image :src="baseUrl + item.imgUrl[0]"></image>
  51 + <image :src="baseUrl + item.imgUrl[0].url"></image>
52 52 </view>
53 53 <view class="thumb" v-else>
54 54 <image src="../../static/img/img3.jpg"></image>
... ... @@ -87,7 +87,7 @@
87 87 </view>
88 88 </view>
89 89 <view class="thumb" v-if="item.isImg">
90   - <image :src="baseUrl + item.imgUrl[0]"></image>
  90 + <image :src="baseUrl + item.imgUrl[0].url"></image>
91 91 </view>
92 92 <view class="thumb" v-else>
93 93 <image src="../../static/img/img3.jpg"></image>
... ... @@ -113,13 +113,15 @@
113 113 baseUrl: "http://deyanggaoxin.fengshiyun.com",
114 114 keyword: '',
115 115 isAdmin: false,
116   - categoryId: '360234116366468357'
  116 + // 判断你是否有图片
  117 + isImg:false,
  118 + // categoryId: '360234116366468357'
117 119 };
118 120 },
119 121 onLoad() {
120 122 let that = this
121 123 this.getUser()
122   - this.getNewsList()
  124 + this.getNewsList('360233879019193605')
123 125 },
124 126 methods: {
125 127 // 获取用户信息
... ... @@ -144,10 +146,10 @@
144 146 }
145 147 },
146 148 // 获取新闻列表
147   - getNewsList() {
  149 + getNewsList(id) {
148 150 let that = this
149 151 that.API.getNewsList({
150   - categoryId:this.categorrId,
  152 + categoryId:id,
151 153 // keyword:this.keyword,
152 154 pageSize:500
153 155 }
... ... @@ -169,9 +171,9 @@
169 171 console.log(that.newsList)
170 172 })
171 173 },
172   - onCouponTab(type) {
  174 + onCouponTab(type,id) {
173 175 this.TabShow = type;
174   - this.getNewsList()
  176 + this.getNewsList(id)
175 177 },
176 178 onArticle(item) {
177 179 uni.navigateTo({
... ...
pages/notice/notice.vue
1 1 <template>
2 2 <view class="page">
3 3 <view class="coupon-tab">
4   - <view class="tab" :class="{'action':TabShow===0}" @click="onCouponTab(0,'')">
  4 + <view class="tab" :class="{'action':TabShow===0}" @click="onCouponTab(0,'360234116366468357')">
5 5 <text>公示</text>
6 6 </view>
7   - <view class="tab" :class="{'action':TabShow===1}" @click="onCouponTab(1)">
  7 + <view class="tab" :class="{'action':TabShow===1}" @click="onCouponTab(1,'530362479830631685')">
8 8 <text>通知</text>
9 9 </view>
10 10 </view>
... ... @@ -43,8 +43,8 @@
43 43 </view>
44 44 </view>
45 45 </view>
46   - <view class="thumb" v-if="item.imgUrl">
47   - <image src="../../static/img/img3.jpg"></image>
  46 + <view class="thumb" v-if="item.isImg">
  47 + <image :src="baseUrl + item.imgUrl[0].url"></image>
48 48 </view>
49 49 <view class="thumb" v-else>
50 50 <image src="../../static/img/img3.jpg"></image>
... ... @@ -77,8 +77,8 @@
77 77 </view>
78 78 </view>
79 79 </view>
80   - <view class="thumb" v-if="item.imgUrl">
81   - <image src="../../static/img/img3.jpg"></image>
  80 + <view class="thumb" v-if="item.isImg">
  81 + <image :src="baseUrl + item.imgUrl[0].url"></image>
82 82 </view>
83 83 <view class="thumb" v-else>
84 84 <image src="../../static/img/img3.jpg"></image>
... ... @@ -108,12 +108,13 @@ import utils from &#39;../../service/utils&#39;;
108 108  
109 109 // }
110 110 keyword:'',
111   - isAdmin:false
  111 + isAdmin:false,
  112 + baseUrl: "http://deyanggaoxin.fengshiyun.com",
112 113 };
113 114 },
114 115 onLoad() {
115 116 this.getUser()
116   - this.getNoticeList()
  117 + this.getNoticeList(this.categorrId)
117 118 },
118 119 methods: {
119 120 // 获取用户信息
... ... @@ -138,10 +139,10 @@ import utils from &#39;../../service/utils&#39;;
138 139 }
139 140 },
140 141 // 获取公式列表
141   - getNoticeList(){
  142 + getNoticeList(id){
142 143 let that = this
143 144 that.API.getNoticeList({
144   - categoryId:this.categorrId,
  145 + categoryId:id,
145 146 pageSize:500
146 147 }).then(res=>{
147 148 if(res.code == 200){
... ... @@ -149,6 +150,7 @@ import utils from &#39;../../service/utils&#39;;
149 150 return {
150 151 ...it,
151 152 createTime:utils.formatTime(it.createTime),
  153 + isImg: it.imgUrl.length > 0
152 154 }
153 155 })
154 156 // if(that.noticeList.)
... ... @@ -162,9 +164,10 @@ import utils from &#39;../../service/utils&#39;;
162 164 url: '/pages/postNotice/postNotice'
163 165 })
164 166 },
165   - onCouponTab(type) {
  167 + onCouponTab(type,id) {
166 168 this.TabShow = type;
167   - this.getNoticeList()
  169 + this.categorrId = id
  170 + this.getNoticeList(id)
168 171 },
169 172 onArticle(item) {
170 173 uni.navigateTo({
... ... @@ -182,6 +185,7 @@ import utils from &#39;../../service/utils&#39;;
182 185 return {
183 186 ...it,
184 187 createTime:utils.formatTime(it.createTime),
  188 + isImg: it.imgUrl.length > 0
185 189 }
186 190 })
187 191 // if(that.noticeList.)
... ...
pages/policy/policy.vue
... ... @@ -72,8 +72,11 @@
72 72 </view>
73 73 </view>
74 74 </view>
  75 + <!-- <view class="thumb" v-if="item.isImg">
  76 + <image :src="baseUrl + item.imgUrl[0].url"></image>
  77 + </view> -->
75 78 <view class="thumb">
76   - <image src="../../static/img/ma.jpg"></image>
  79 + <image src="../../static/img/img3.jpg"></image>
77 80 </view>
78 81 </view>
79 82 </view>
... ... @@ -100,7 +103,8 @@
100 103 isAdmin: false,
101 104 categoryId: '360234017372505349',
102 105 baseUrl: "http://deyanggaoxin.fengshiyun.com",
103   - haveData:false
  106 + haveData:false,
  107 + isImg:false
104 108 };
105 109 },
106 110 onLoad() {
... ... @@ -141,11 +145,12 @@
141 145 }).then(res => {
142 146 console.log(res)
143 147 that.AllList = res.data.list
144   - // console.log(that.AllList)
  148 + console.log('总的',that.AllList)
145 149 that.AllList = that.AllList.map(it => {
146 150 return {
147 151 ...it,
148   - createTime: utils.formatTime(it.createTime)
  152 + createTime: utils.formatTime(it.createTime),
  153 + // isImg: it.imgUrl.length > 0
149 154 }
150 155 })
151 156 this.fenLeiList = that.AllList.filter(it=>{
... ... @@ -154,6 +159,7 @@
154 159 if(this.fenLeiList === []){
155 160 this.haveData = true
156 161 }
  162 + console.log("this.AllList", this.AllList)
157 163 console.log("分类", this.fenLeiList)
158 164 })
159 165 },
... ... @@ -188,7 +194,8 @@
188 194 that.AllList = that.AllList.map(it => {
189 195 return {
190 196 ...it,
191   - createTime: utils.formatTime(it.createTime)
  197 + createTime: utils.formatTime(it.createTime),
  198 + // isImg: it.imgUrl.length > 0
192 199 }
193 200 })
194 201 this.fenLeiList = that.AllList
... ... @@ -197,7 +204,7 @@
197 204 }
198 205 console.log("分类", this.fenLeiList)
199 206 })
200   - console.log(this.fenLeiList)
  207 + console.log('this.fenLeiList',this.fenLeiList)
201 208 console.log(type)
202 209 },
203 210 // 显示下方为国家级还是省级等
... ... @@ -216,7 +223,8 @@
216 223 that.AllList = that.AllList.map(it => {
217 224 return {
218 225 ...it,
219   - createTime: utils.formatTime(it.createTime)
  226 + createTime: utils.formatTime(it.createTime),
  227 + // isImg: it.imgUrl.length > 0
220 228 }
221 229 })
222 230 this.fenLeiList = that.AllList
... ... @@ -234,14 +242,15 @@
234 242 search() {
235 243 let that = this
236 244 that.API.getPolicyList({
237   - categoryId: this.categoryId,
  245 + // categoryId: this.categoryId,
238 246 keyword: this.keyword
239 247 }).then(res => {
240 248 // console.log(res)
241 249 that.fenLeiList = res.data.list.map(it => {
242 250 return {
243 251 ...it,
244   - createTime: utils.formatTime(it.createTime)
  252 + createTime: utils.formatTime(it.createTime),
  253 + // isImg: it.imgUrl.length > 0
245 254 }
246 255 })
247 256 if(this.fenLeiList === null){
... ...
pages/postCon/postCon.vue
... ... @@ -297,6 +297,10 @@ import utils from &#39;../../service/utils&#39;;
297 297 uni.showToast({
298 298 icon: "success",
299 299 title: "更新成功!"
  300 + }).then(()=>{
  301 + uni.navigateTo({
  302 + url:"/pages/construct/construct"
  303 + })
300 304 })
301 305 }
302 306 }).catch((err)=>{
... ...
pages/postDemand/postDemand.vue
... ... @@ -197,6 +197,10 @@
197 197 uni.showToast({
198 198 icon:"success",
199 199 title:"发布成功"
  200 + }).then(()=>{
  201 + uni.navigateTo({
  202 + url:"/pages/demand/demand"
  203 + })
200 204 })
201 205 }
202 206 })
... ...
pages/postNews/postNews.vue
... ... @@ -21,6 +21,23 @@
21 21 <view class="example-body">
22 22 <uni-file-picker limit="9" @select="select" title="新闻图片"></uni-file-picker>
23 23 </view>
  24 + <!-- 选择反馈类型 -->
  25 + <view class="feedback-type">
  26 + <view class="feedback-type-left">隶属类别</view>
  27 + <view class="feedback-type-right">
  28 + <view class="title">
  29 + <text>{{TypeArray[TypeIndex]}}</text>
  30 + </view>
  31 + <view class="picker">
  32 + <picker @change="FeedbackTypeCh" :value="TypeIndex" :range="TypeArray">
  33 + <view class="uni-input">{{TypeArray[TypeIndex]}}</view>
  34 + </picker>
  35 + </view>
  36 + <view class="more">
  37 + <image src="../../static/down1.png"></image>
  38 + </view>
  39 + </view>
  40 + </view>
24 41 </view>
25 42  
26 43 <!-- 提交 -->
... ... @@ -74,7 +91,9 @@ import utils from &#39;../../service/utils&#39;;
74 91 isId:'',
75 92 have:false,
76 93 detailData:[],
77   - categoryId:'360233879019193605'
  94 + categoryId:['360233879019193605','530363088214426885'],
  95 + TypeArray: ['热点要闻', '园区快讯'],
  96 + TypeIndex: 0,
78 97 };
79 98  
80 99 },
... ... @@ -97,6 +116,14 @@ import utils from &#39;../../service/utils&#39;;
97 116  
98 117 },
99 118 methods: {
  119 + /**
  120 + * 反馈类型
  121 + * @param {Object} val
  122 + */
  123 + FeedbackTypeCh(val) {
  124 + console.log(val);
  125 + this.TypeIndex = val.detail.value;
  126 + },
100 127 // 获取上传状态
101 128 select(e) {
102 129 console.log('选择文件:', e)
... ... @@ -155,13 +182,15 @@ import utils from &#39;../../service/utils&#39;;
155 182 postAll() {
156 183 console.log("进入POST")
157 184 let that = this
  185 + let categoryId = that.categoryId[that.TypeIndex]
  186 + console.log(categoryId)
158 187 if (that.uploadPath) {
159 188 console.log('jinru')
160 189 // console.log(uni.getStorageSync('token'))
161 190 var info = {
162 191 title: that.valiFormData.title,
163 192 bodyContent: that.valiFormData.bodyContent,
164   - categoryId:that.categoryId,
  193 + categoryId:categoryId,
165 194 creatorUserId: that.userCode.userId,
166 195 subTitle: that.valiFormData.subTitle,
167 196 imgUrl: that.uploadPath,
... ...
pages/postNotice/postNotice.vue
... ... @@ -21,6 +21,23 @@
21 21 <view class="example-body">
22 22 <uni-file-picker limit="9" @select="select" title="信息图片"></uni-file-picker>
23 23 </view>
  24 + <!-- 选择反馈类型 -->
  25 + <view class="feedback-type">
  26 + <view class="feedback-type-left">隶属类别</view>
  27 + <view class="feedback-type-right">
  28 + <view class="title">
  29 + <text>{{TypeArray[TypeIndex]}}</text>
  30 + </view>
  31 + <view class="picker">
  32 + <picker @change="FeedbackTypeCh" :value="TypeIndex" :range="TypeArray">
  33 + <view class="uni-input">{{TypeArray[TypeIndex]}}</view>
  34 + </picker>
  35 + </view>
  36 + <view class="more">
  37 + <image src="../../static/down1.png"></image>
  38 + </view>
  39 + </view>
  40 + </view>
24 41 </view>
25 42  
26 43 <!-- 提交 -->
... ... @@ -74,7 +91,9 @@ import utils from &#39;../../service/utils&#39;;
74 91 isId:'',
75 92 have:false,
76 93 detailData:[],
77   - categoryId:'360234116366468357'
  94 + categoryId:['360234116366468357','530362479830631685'],
  95 + TypeArray: ['公示', '通知'],
  96 + TypeIndex: 0,
78 97 };
79 98  
80 99 },
... ... @@ -97,6 +116,14 @@ import utils from &#39;../../service/utils&#39;;
97 116  
98 117 },
99 118 methods: {
  119 + /**
  120 + * 反馈类型
  121 + * @param {Object} val
  122 + */
  123 + FeedbackTypeCh(val) {
  124 + console.log(val);
  125 + this.TypeIndex = val.detail.value;
  126 + },
100 127 // 获取上传状态
101 128 select(e) {
102 129 console.log('选择文件:', e)
... ... @@ -155,16 +182,20 @@ import utils from &#39;../../service/utils&#39;;
155 182 postAll() {
156 183 console.log("进入POST")
157 184 let that = this
  185 + let categoryId = that.categoryId[that.TypeIndex]
  186 + console.log(categoryId)
  187 + console.log(that.uploadPath)
158 188 if (that.uploadPath) {
159 189 console.log('jinru')
160 190 // console.log(uni.getStorageSync('token'))
161 191 var info = {
162 192 title: that.valiFormData.title,
163 193 bodyContent: that.valiFormData.bodyContent,
164   - categoryId:that.categoryId,
  194 + categoryId:categoryId,
165 195 creatorUserId: that.userCode.userId,
166 196 subTitle: that.valiFormData.subTitle,
167 197 imgUrl: that.uploadPath,
  198 +
168 199 }
169 200 console.log(info)
170 201 this.API.postInfo(info).then(res=>{
... ...
pages/postProduct/postProduct.vue
... ... @@ -193,6 +193,10 @@
193 193 uni.showToast({
194 194 icon:"success",
195 195 title:"发布成功"
  196 + }).then(()=>{
  197 + uni.navigateTo({
  198 + url:'/pages/supply/supply'
  199 + })
196 200 })
197 201 }
198 202  
... ...
pages/postTalent/postTalent.vue
... ... @@ -33,6 +33,7 @@
33 33 subTitle: '',
34 34 bodyContent: '',
35 35 post: '',
  36 + phone:''
36 37 },
37 38 creater: '',
38 39 rules: {
... ... @@ -83,6 +84,10 @@
83 84 uni.showToast({
84 85 icon:"success",
85 86 title:'发布成功'
  87 + }).then(()=>{
  88 + uni.navigateTo({
  89 + url:'/pages/talent/talent'
  90 + })
86 91 })
87 92 }
88 93 })
... ...
pages/recommend/postRecommend/postRecommend.vue
... ... @@ -148,6 +148,29 @@
148 148 }
149 149 },
150 150 methods: {
  151 + // 获取用户信息
  152 + getUser() {
  153 + if (uni.getStorageSync('user')) {
  154 + let userCode = uni.getStorageSync("user")
  155 + console.log(userCode)
  156 + if(userCode.userInfo.userId === 'admin'){
  157 + this.isAdmin = true
  158 + }
  159 + console.log('用户已登录!')
  160 + }
  161 + else {
  162 + uni.showToast({
  163 + title: '请登录',
  164 + icon: 'none',
  165 + duration:1500
  166 + })
  167 + setTimeout(() => {
  168 + uni.reLaunch({
  169 + url: '/pages/login/index'
  170 + })
  171 + })
  172 + }
  173 + },
151 174 // 获取上传状态
152 175 select(e) {
153 176 console.log('选择文件:', e)
... ... @@ -204,6 +227,10 @@
204 227 uni.showToast({
205 228 icon:"success",
206 229 title:"发布成功!"
  230 + }).then(()=>{
  231 + uni.navigateTo({
  232 + url:'/pages/recommend/recommend'
  233 + })
207 234 })
208 235 }
209 236 })
... ...
pages/talentDetail/talentDetail.vue
... ... @@ -24,12 +24,12 @@
24 24 <text>收藏</text>
25 25 </view>
26 26 </view> -->
27   - <view class="footer-buy" style="width:100%">
  27 + <!-- <view class="footer-buy" style="width:100%">
28 28 <view class="buy-at" @click="callPhone(phoneNumber)">
29 29 <image src="../../static/detail1.png"></image>
30 30 <text>打电话</text>
31 31 </view>
32   - </view>
  32 + </view> -->
33 33 </view>
34 34 </view>
35 35 </template>
... ...