diff --git a/app.json b/app.json index 0f8b38c..4c3c56d 100644 --- a/app.json +++ b/app.json @@ -1,75 +1,79 @@ { - "pages": [ - "pages/home/index", - "pages/user/index", - "pages/billboards/index", - "pages/topics/index", - "pages/billboards/firm/index", - "pages/billboards/park/index", - "pages/billboards/park/park-list/index", - "pages/billboards/policy/index", - "pages/billboards/policy/policy-list/index", - "pages/article/index", - "pages/register/index", - "pages/user/myActivity/index", - "pages/user/myFavorite/index", - "pages/user/myIdea/index", - "pages/user/myMessage/index", - "pages/user/myTopics/index", - "pages/user/myInfo/index", - "pages/user/myInfo/register/index", - "pages/topics/interactive/submitTopic/index", - "pages/topics/interactive/topicArticle/index", - "pages/billboards/park/park-category/index", - "pages/billboards/park/park-detail/index", - "pages/weChatAuth/index", - "pages/user/myWhistle/index", - "pages/user/myWhistle/whistleDetail/index", - "pages/user/myWhistle/evaluate/index", - "pages/resource/index", - "pages/resource/detail/index", - "pages/resource/navigate/index", - "pages/topics/loan/index", - "pages/topics/rent/room/index", - "pages/topics/rent/detail/index", - "pages/resource/demand/index" - ], - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "市北人才赋能平台", - "navigationBarTextStyle": "black" - }, - "tabBar": { - "selectedColor": "#000", - "borderStyle": "white", - "list": [ - { - "pagePath": "pages/home/index", - "text": "首页", - "iconPath": "/images/tab/home.png", - "selectedIconPath": "/images/tab/home_highlight.png" - }, - { - "pagePath": "pages/billboards/index", - "text": "宣传栏", - "iconPath": "/images/tab/billboard.png", - "selectedIconPath": "/images/tab/billboard_highlight.png" - }, - { - "pagePath": "pages/topics/index", - "text": "赋能中心", - "iconPath": "/images/tab/topics.png", - "selectedIconPath": "/images/tab/topics_highlight.png" - }, - { - "pagePath": "pages/user/index", - "text": "我的", - "iconPath": "/images/tab/user.png", - "selectedIconPath": "/images/tab/user_highlight.png" - } - ] - }, - "debug": true, - "sitemapLocation": "sitemap.json" + "pages": [ + "pages/home/index", + "pages/user/index", + "pages/billboards/index", + "pages/topics/index", + "pages/billboards/firm/index", + "pages/billboards/park/index", + "pages/billboards/park/park-list/index", + "pages/billboards/policy/index", + "pages/billboards/policy/policy-list/index", + "pages/article/index", + "pages/register/index", + "pages/user/myActivity/index", + "pages/user/myFavorite/index", + "pages/user/myIdea/index", + "pages/user/myMessage/index", + "pages/user/myTopics/index", + "pages/user/myInfo/index", + "pages/user/myInfo/register/index", + "pages/topics/interactive/submitTopic/index", + "pages/topics/interactive/topicArticle/index", + "pages/billboards/park/park-category/index", + "pages/billboards/park/park-detail/index", + "pages/weChatAuth/index", + "pages/user/myWhistle/index", + "pages/user/myWhistle/whistleDetail/index", + "pages/user/myWhistle/evaluate/index", + "pages/resource/index", + "pages/resource/detail/index", + "pages/resource/navigate/index", + "pages/topics/loan/index", + "pages/topics/rent/room/index", + "pages/topics/rent/detail/index", + "pages/resource/demand/index", + "pages/ad/ad", + "pages/service/detail/detail", + "pages/service/settle/settle", + "pages/service/service" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "市北人才赋能平台", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "selectedColor": "#000", + "borderStyle": "white", + "list": [ + { + "pagePath": "pages/home/index", + "text": "首页", + "iconPath": "/images/tab/home.png", + "selectedIconPath": "/images/tab/home_highlight.png" + }, + { + "pagePath": "pages/billboards/index", + "text": "宣传栏", + "iconPath": "/images/tab/billboard.png", + "selectedIconPath": "/images/tab/billboard_highlight.png" + }, + { + "pagePath": "pages/topics/index", + "text": "赋能中心", + "iconPath": "/images/tab/topics.png", + "selectedIconPath": "/images/tab/topics_highlight.png" + }, + { + "pagePath": "pages/user/index", + "text": "我的", + "iconPath": "/images/tab/user.png", + "selectedIconPath": "/images/tab/user_highlight.png" + } + ] + }, + "debug": true, + "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/app.wxss b/app.wxss index 4dcaf16..739e32d 100644 --- a/app.wxss +++ b/app.wxss @@ -4,4 +4,14 @@ page{ font-family: PingFangSC-Regular; /* background-color: #f7f7f7; */ -} \ No newline at end of file +} + +.btnView{ + position: fixed; + height:50px; + padding: 5px 20px 15px 20px; + bottom: 0; + left: 0; + right: 0; + background-color: white; + } \ No newline at end of file diff --git a/config.js b/config.js index f467eb9..49b1f9f 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ const config = { - // api_url: 'http://192.168.42.39:7101/fqsb', // 服务器地址 + // api_url: 'http://192.168.42.44:7101/fqsb', // 服务器地址 api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境 // api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境 } diff --git a/pages/ad/ad.js b/pages/ad/ad.js new file mode 100644 index 0000000..f509b86 --- /dev/null +++ b/pages/ad/ad.js @@ -0,0 +1,79 @@ +// pages/ad/ad.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + url:"../../images/ad.jpg", + show:true, + flag:1, + web:'http://www.rencaibeichu.cn' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.setStorageSync('ad', 1) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + onClose:function(){ + wx.switchTab({ + url: '/pages/home/index', + }) + }, + jump:function(){ + this.setData({ + flag:2 + }) + } +}) \ No newline at end of file diff --git a/pages/ad/ad.json b/pages/ad/ad.json new file mode 100644 index 0000000..26abe29 --- /dev/null +++ b/pages/ad/ad.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-popup": "/components/vant/popup/index" + } +} \ No newline at end of file diff --git a/pages/ad/ad.wxml b/pages/ad/ad.wxml new file mode 100644 index 0000000..bb2b7a6 --- /dev/null +++ b/pages/ad/ad.wxml @@ -0,0 +1,23 @@ + + + + + + + + + + + + diff --git a/pages/ad/ad.wxss b/pages/ad/ad.wxss new file mode 100644 index 0000000..d531663 --- /dev/null +++ b/pages/ad/ad.wxss @@ -0,0 +1,17 @@ +/* pages/ad/ad.wxss */ +.content{ + width: 100%; + height:100%; +} + +.van-bottom-enter-to{ + border-radius: 0 !important; +} + +text{ + position: absolute; + top:15px; + right:50px; + color:#fff; + font-size: 35rpx; + } \ No newline at end of file diff --git a/pages/billboards/firm/index.js b/pages/billboards/firm/index.js index 284dce9..835c282 100644 --- a/pages/billboards/firm/index.js +++ b/pages/billboards/firm/index.js @@ -1,6 +1,7 @@ // pages/billboards/firm/index.js import { BillboardModel } from '../../../models/billboard.js' let billboard = new BillboardModel() +import { config } from '../../../config.js' Page({ /** @@ -12,6 +13,11 @@ Page({ curCode: '', currPage: 1, tags: [], + img1:config.api_url + '/image/3.png', + img2:config.api_url + '/image/4.png', + img3:config.api_url + '/image/5.png', + img4:config.api_url + '/image/6.png', + img5:config.api_url + '/image/7.png', }, /** @@ -107,5 +113,13 @@ Page({ currPage: page }) this.fetchList() + }, + detail:function(e){ + var id = e.currentTarget.dataset.code + wx.navigateTo({ + url: '/pages/article/index?id=' + id, + }) } + + }) \ No newline at end of file diff --git a/pages/billboards/firm/index.wxml b/pages/billboards/firm/index.wxml index 44ff699..16cc6a9 100644 --- a/pages/billboards/firm/index.wxml +++ b/pages/billboards/firm/index.wxml @@ -1,5 +1,5 @@ - + + + + + + + + diff --git a/pages/billboards/firm/index.wxss b/pages/billboards/firm/index.wxss index b4629ac..9a6b2f1 100644 --- a/pages/billboards/firm/index.wxss +++ b/pages/billboards/firm/index.wxss @@ -1,5 +1,5 @@ /* pages/billboards/firm/index.wxss */ -.container { +/* .container { } .page_hd { @@ -32,4 +32,18 @@ font-size: 14px; color: #aaa; text-align: center; +} */ + + +.container { + height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.billboard_item { + margin-bottom: 15px; + width: 90%; + height: 120px; } \ No newline at end of file diff --git a/pages/billboards/park/images/1.png b/pages/billboards/park/images/1.png deleted file mode 100644 index de45b9f..0000000 Binary files a/pages/billboards/park/images/1.png and /dev/null differ diff --git a/pages/billboards/park/images/2.png b/pages/billboards/park/images/2.png deleted file mode 100644 index cd7d0ff..0000000 Binary files a/pages/billboards/park/images/2.png and /dev/null differ diff --git a/pages/billboards/park/images/3.png b/pages/billboards/park/images/3.png deleted file mode 100644 index ea60709..0000000 Binary files a/pages/billboards/park/images/3.png and /dev/null differ diff --git a/pages/billboards/park/images/4.png b/pages/billboards/park/images/4.png deleted file mode 100644 index 3d5d8b8..0000000 Binary files a/pages/billboards/park/images/4.png and /dev/null differ diff --git a/pages/billboards/park/index.js b/pages/billboards/park/index.js index 0d403f3..d98d3c2 100644 --- a/pages/billboards/park/index.js +++ b/pages/billboards/park/index.js @@ -1,12 +1,13 @@ // pages/billboards/park/index.js - +import { config } from '../../../config.js' Page({ /** * 页面的初始数据 */ data: { - + img1:config.api_url + '/image/1.png', + img2:config.api_url + '/image/2.png', }, /** @@ -25,4 +26,10 @@ Page({ // url: '/pages/billboards/park/park-list/index?code=' + code, // }) }, + detail:function(e){ + var id = e.currentTarget.dataset.code + wx.navigateTo({ + url: '/pages/article/index?id=' + id, + }) + } }) \ No newline at end of file diff --git a/pages/billboards/park/index.wxml b/pages/billboards/park/index.wxml index 89801ba..348a7b6 100644 --- a/pages/billboards/park/index.wxml +++ b/pages/billboards/park/index.wxml @@ -1,7 +1,5 @@ - - - - + + diff --git a/pages/billboards/park/index.wxss b/pages/billboards/park/index.wxss index 18adec1..a8195bc 100644 --- a/pages/billboards/park/index.wxss +++ b/pages/billboards/park/index.wxss @@ -7,7 +7,7 @@ align-items: center; } .billboard_item { - margin-top: 15px; + margin-bottom: 15px; width: 90%; - height: 100px; + height: 120px; } \ No newline at end of file diff --git a/pages/billboards/park/park-category/index.js b/pages/billboards/park/park-category/index.js index f14e996..e180f8e 100644 --- a/pages/billboards/park/park-category/index.js +++ b/pages/billboards/park/park-category/index.js @@ -26,7 +26,7 @@ Page({ this.setData({ curCode: code, }) - this.fetchTags() + this.fetchList() }, onTapMoreItem (e) { const {code, name} = e.currentTarget.dataset @@ -35,27 +35,15 @@ Page({ }) }, clickCardItem(e) { - console.log(e.detail) - const { id } = e.detail + var id = e.currentTarget.dataset.id wx.navigateTo({ - url: `/pages/article/index?id=${id}`, + url: '/pages/article/index?id=' + id, }) }, - fetchList(code, index) { - billboard.fetchBailList(code, 1, res => { - console.log(res) - const datas = res.list - let tempDatas = [] - datas.forEach(item => { - tempDatas.push({ - id: item.id, - title: item.title, - image: item.titlePic - }) - }) - + fetchList() { + billboard.fetchBailList(this.data.curCode, 1, res => { this.setData({ - [`list[${index}].datas`]: tempDatas + list: res.list, }) }) }, diff --git a/pages/billboards/park/park-category/index.wxml b/pages/billboards/park/park-category/index.wxml index 7c19288..21ab1bc 100644 --- a/pages/billboards/park/park-category/index.wxml +++ b/pages/billboards/park/park-category/index.wxml @@ -2,17 +2,12 @@ - - {{item.name}} + {{item.title}} - - - - - 暂无数据 diff --git a/pages/home/index.js b/pages/home/index.js index bf57e4b..694fe2a 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -10,9 +10,23 @@ Page({ currPage: 1, banners: [], hots: [], - list: [] + list: [], + show:false, + url:"../../images/ad.jpg", + web:'https://wx.vzan.com/live/TpForm?zbid=860533452&oId=213742&type=0&v=1623841891714' + // web:'http://www.rencaibeichu.cn' }, onLoad: function () { + const ad = wx.getStorageSync('ad') + if(!ad){ + // wx.redirectTo({ + // url: '/pages/ad/ad', + // }) + this.setData({ + show:true + }) + wx.setStorageSync('ad', 1) + } homeModel.fetchAuthToken(res => { //console.log('Home获取token成功后再请求数据') this.fetchHomeList() @@ -142,7 +156,12 @@ Page({ // Banner/Hot/List事件 tapSwiperItem (e) { //console.log(e.detail) - this.gotoArticePage(e.detail.id) + if(e.detail.id == '987a8433d925f36d3690fab91fe9e137'){ + this.jump() + }else{ + this.gotoArticePage(e.detail.id) + } + }, tapFocusItem (e) { //console.log(e.detail) @@ -163,5 +182,18 @@ Page({ wx.navigateTo({ url: `/pages/article/index?id=${id}`, }) + }, + onClose(){ + this.setData({ + show:false + }) + }, + jump:function(){ + this.setData({ + show:false + }) + wx.navigateTo({ + url: '/pages/resource/navigate/index?url=' + encodeURIComponent(this.data.web) + }) } }) diff --git a/pages/home/index.json b/pages/home/index.json index ab69748..cd4a25d 100644 --- a/pages/home/index.json +++ b/pages/home/index.json @@ -5,6 +5,7 @@ "e-swiper": "/components/swiper/index", "e-focus": "/components/focus/index", "e-cell": "/components/cell/index", - "e-empty": "/components/empty/index" + "e-empty": "/components/empty/index", + "van-popup": "/components/vant/popup/index" } } \ No newline at end of file diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 1554c48..82c752d 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -14,4 +14,29 @@ bind:clickListItem="clickListItem"/> + + + + + + + diff --git a/pages/home/index.wxss b/pages/home/index.wxss index 82e56cf..3751047 100644 --- a/pages/home/index.wxss +++ b/pages/home/index.wxss @@ -1,3 +1,7 @@ .container { font-family: PingFangSC-Regular; +} +.content{ + width: 100%; + height:100%; } \ No newline at end of file diff --git a/pages/resource/demand/index.js b/pages/resource/demand/index.js new file mode 100644 index 0000000..d9ecf61 --- /dev/null +++ b/pages/resource/demand/index.js @@ -0,0 +1,76 @@ +// pages/resource/demand/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + type:'', + id:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var type = options.type; + var id = options.id; + + console.log(options) + if(type){ + this.setData({ + type:type, + id:id + }) + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/resource/demand/index.json b/pages/resource/demand/index.json new file mode 100644 index 0000000..9906aa8 --- /dev/null +++ b/pages/resource/demand/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "talents": "/pages/topics/talents/index" + } +} \ No newline at end of file diff --git a/pages/resource/demand/index.wxml b/pages/resource/demand/index.wxml new file mode 100644 index 0000000..6c30fa6 --- /dev/null +++ b/pages/resource/demand/index.wxml @@ -0,0 +1,2 @@ + + diff --git a/pages/resource/demand/index.wxss b/pages/resource/demand/index.wxss new file mode 100644 index 0000000..0133932 --- /dev/null +++ b/pages/resource/demand/index.wxss @@ -0,0 +1 @@ +/* pages/resource/demand/index.wxss */ \ No newline at end of file diff --git a/pages/service/detail/detail.js b/pages/service/detail/detail.js new file mode 100644 index 0000000..90ac151 --- /dev/null +++ b/pages/service/detail/detail.js @@ -0,0 +1,94 @@ +// pages/service/detail/detail.js +import { TopicModel } from '../../../models/topic.js' +var WxParse = require('../../../components/wxParse/wxParse.js'); +let topicModel = new TopicModel() +Page({ + + /** + * 页面的初始数据 + */ + data: { + show:true, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var id = '7d986b726945d3201adf4ed8dadd2db4' + topicModel.getResourceDetail(id,res=>{ + wx.setNavigationBarTitle({ title:res.result.typeName}) + + this.setData({ + detail:res.result, + }) + + WxParse.wxParse('article', 'html', this.data.detail.content, this, 5); + + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + onTap:function(){ + // wx.navigateTo({ + // url: '/pages/service/settle/settle', + // }) + + this.setData({ show: true }); + }, + settle:function(){ + wx.navigateTo({ + url: '/pages/service/settle/settle', + }) + }, + onClose:function(){ + this.setData({ show: false }); + } +}) \ No newline at end of file diff --git a/pages/service/detail/detail.json b/pages/service/detail/detail.json new file mode 100644 index 0000000..26abe29 --- /dev/null +++ b/pages/service/detail/detail.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-popup": "/components/vant/popup/index" + } +} \ No newline at end of file diff --git a/pages/service/detail/detail.wxml b/pages/service/detail/detail.wxml new file mode 100644 index 0000000..6490fdc --- /dev/null +++ b/pages/service/detail/detail.wxml @@ -0,0 +1,49 @@ + + + + + 服务内容 + + + + +