diff --git a/apis/index.js b/apis/index.js index bd0aeae..589fe5b 100644 --- a/apis/index.js +++ b/apis/index.js @@ -12,7 +12,7 @@ import card from "./interfaces/card" import mall from "./interfaces/mall" import order from "./interfaces/order" import company from "./interfaces/company" -import home from "./interfaces/home" +import companyModule from "./interfaces/home" import ticket from "./interfaces/ticket" export default{ @@ -25,6 +25,6 @@ export default{ mall, order, company, - home, + companyModule, ticket } diff --git a/apis/interfaces/home.js b/apis/interfaces/home.js index f95418f..1bdd8e2 100644 --- a/apis/interfaces/home.js +++ b/apis/interfaces/home.js @@ -1,9 +1,171 @@ - /* - * 企业主页 + * vip相关 */ -import {req} from "../request" +import { + req +} from "../request" -export default({ - + +//项目筹集分类 +const crowdfundcategory = id => req({ + url: "ajax/crowdfundcategory", + data: { + company_id: id + } }) +//项目分类下列表 +const crowdfunds = (company_id, category_id, page) => req({ + url: "crowdfunds", + data: { + company_id: company_id, + category_id: category_id, + page: page + } +}) +//项目详情 +const crowdfundsDetail = crowdfund_id => req({ + url: "crowdfunds/" + crowdfund_id +}) +//项目关注 +const crowdfundsLike = crowdfund_id => req({ + url: "crowdfunds/like", + method: "POST", + data: { + crowdfund_id: crowdfund_id + } +}) +//项目取消关注 +const crowdfundsUnLike = crowdfund_id => req({ + url: "crowdfunds/unlike", + method: "POST", + data: { + crowdfund_id: crowdfund_id + } +}) +//获取确认订单信息 +const crowdfundsCreat = crowdfund_item_id => req({ + url: "crowdfunds/create", + data: { + crowdfund_item_id: crowdfund_item_id + } +}) +//创建订单 +const crowdfundsCreatOrder = (crowdfund_item_id, address_id, remark) => req({ + url: "crowdfunds", + method: "POST", + data: { + crowdfund_item_id: crowdfund_item_id, + address_id: address_id, + remark: remark + } +}) +//调用微信支付 +const wechat = data => req({ + url: "payments/wechat", + method: "POST", + data: data +}) + +// 企业信息 +const company = (company_id) => req({ + url: "company/" + company_id +}) +// 企业活动列表 +const actives = (model, model_id, page) => req({ + url: "actives", + data: { + model: model, + model_id: model_id, + page: page + } +}) + +// 企业活动详情 +const activesDetail = (active_id) => req({ + url: "actives/" + active_id, +}) + +// 企业活动报名 +const activesEnroll = (code, active_id) => req({ + url: "actives/" + active_id + '/enroll', + method: "POST", + data: { + code: code + } +}) + +// 企业动态列表 +const dynamics = (company_id, page) => req({ + url: "company/" + company_id + "/dynamics", + data: { + page: page + } +}) + +// 企业动态列表 +const dynamicsDetail = (company_id, dynamic_id) => req({ + url: "company/" + company_id + "/dynamics/" + dynamic_id, +}) + +// 企业风采更多列表 +const graces = (company_id, page) => req({ + url: "company/" + company_id + "/graces", + data: { + page: page + } +}) + + +// 企业风采更多列表 +const videos = (company_id, page) => req({ + url: "videos/" + company_id + "/advert", + data: { + page: page + } +}) + +// 更多员工列表 +const users = (company_id, page) => req({ + url: "company/" + company_id + "/users", + data: { + page: page + } +}) +// 我的活动列表啥 +const userActives = (state, page) => req({ + url: "user/actives", + data: { + state: state, + page: page + } +}) +//活动签到 +const signed = (active_id) => req({ + url: "actives/" + active_id + "/signed", + method: "POST" +}) + + + + +export default ({ + crowdfundcategory, //项目筹集分类 + crowdfunds, //根据项目筹集获取列表 + crowdfundsDetail, //项目详情 + crowdfundsLike, //关注项目 + crowdfundsUnLike, //取消关注项目 + crowdfundsCreat, //获取确认订单信息 + crowdfundsCreatOrder, //创建订单 + wechat, //微信支付 + company, //企业基本信息 + actives, //企业活动列表 + activesDetail, //企业活动详情 + activesEnroll, //企业报名 + dynamics, //企业动态 + dynamicsDetail, //企业动态详情 + graces, //企业风采更多 + videos, //企业宣传更多 + users, // 更多员工列表 + userActives, //活动列表 + signed, //活动签到 +}) \ No newline at end of file diff --git a/app.json b/app.json index 5490fe0..bd571aa 100644 --- a/app.json +++ b/app.json @@ -7,11 +7,20 @@ "pages/login/login", "pages/card/index", "pages/user/index", - "pages/home/index", "pages/mall/index", "pages/live/index", "pages/ticket/index", - "pages/company/search/search" + "pages/company/search/search", + "pages/home/index", + "pages/home/companyInfo/companyInfo", + "pages/home/noticeDetail/noticeDetail", + "pages/home/activeDetail/activeDetail", + "pages/home/projectDetail/projectDetail", + "pages/home/projectReturn/projectReturn", + "pages/home/beSureOrder/beSureOrder", + "pages/home/companyMore/companyMore", + "pages/home/projectSuccess/projectSuccess", + "pages/home/activeSuccess/activeSuccess" ], "window": { "backgroundTextStyle": "light", diff --git a/components/company/activeList/activeList.js b/components/company/activeList/activeList.js new file mode 100644 index 0000000..69ccd2e --- /dev/null +++ b/components/company/activeList/activeList.js @@ -0,0 +1,57 @@ +// components/videoList/videoList.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + lists:[],//列表 + company_id:wx.getStorageSync('company_id'), + page:1, + has_more:true, + }, + + /** + * 组件的方法列表 + */ + methods: { + /** + * 跳转到详情 + */ + toUrl(e){ + wx.navigateTo({ + url: '/pages/home/activeDetail/activeDetail?id='+e.currentTarget.dataset.id, + }) + }, + /** + * 企业活动列表 + */ + actives(){ + if(this.data.has_more){ + wx.$api.companyModule.actives('company',this.data.company_id,this.data.page).then(res=>{ + console.log(res) + if(res.page.has_more){ + this.setData({ + has_more:true, + page:this.data.page+1, + }) + }else{ + this.setData({ + has_more:false + }) + } + var lists=this.data.lists.concat(res.data); + this.setData({ + lists:lists + }) + }) + } + } + } +}) diff --git a/components/company/activeList/activeList.json b/components/company/activeList/activeList.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/activeList/activeList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/activeList/activeList.wxml b/components/company/activeList/activeList.wxml new file mode 100644 index 0000000..a9540a7 --- /dev/null +++ b/components/company/activeList/activeList.wxml @@ -0,0 +1,16 @@ + + + 论坛 + + + {{item.title}} + + {{item.description}} + {{item.started_at}}至{{item.ended_at}} + + + {{item.price > 0 ?'¥'+item.price:'免费'}} 限{{item.limits}}人报名 + 进入活动 + + +{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}} \ No newline at end of file diff --git a/components/company/activeList/activeList.wxss b/components/company/activeList/activeList.wxss new file mode 100644 index 0000000..0f17cec --- /dev/null +++ b/components/company/activeList/activeList.wxss @@ -0,0 +1,123 @@ +.active_content { + background-color: #fff; + margin: 20rpx; + box-sizing: border-box; + position: relative; +} + +.active_cover { + width: 100%; + height: 300rpx; + position: relative; + border-radius: 20rpx 20rpx 0 0; + overflow: hidden; + padding-bottom: 0; +} + +.active_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.active_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.active_title { + position: absolute; + bottom: 0; + left: 0; + margin-top: 20rpx; + padding: 10rpx 20rpx; + font-weight: 600; + font-size: 30rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + background-color: rgba(0, 0, 0, 0.4); + color: #Fff; + -webkit-line-clamp: 1; + z-index: 100; + width: 98%; + +} + +.active_des { + margin-top: 14rpx; + padding: 0 20rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_time { + margin-top: 14rpx; + padding: 0 20rpx; + color: #666; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_line { + margin: 20rpx 20rpx 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.active_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 34rpx; + font-weight: 600; + color: #333; + padding: 20rpx 0; +} + +.active_bottom .left { + margin-left: 20rpx; +} + +.active_bottom span { + color: #999; + font-size: 24rpx; + padding-left: 10rpx; + font-weight: normal; +} + +.active_bottom .right { + font-size: 24rpx; + padding: 10rpx 30rpx; + border-radius: 30rpx; + background-color: #378fff; + color: #fff; +} + +.has_more { + color: #999; + font-size: 26rpx; + text-align: center; + padding: 30rpx; +} \ No newline at end of file diff --git a/components/company/enterprise/enterprise.js b/components/company/enterprise/enterprise.js new file mode 100644 index 0000000..9011b38 --- /dev/null +++ b/components/company/enterprise/enterprise.js @@ -0,0 +1,81 @@ +// components/enterprise/enterprise.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + info:{ + type:Object + } + }, + + /** + * 组件的初始数据 + */ + data: { + hidden: true, + }, + + + + /** + * 组件的方法列表 + */ + methods: { + + // 展示隐藏企业文化 + hidden() { + this.setData({ + hidden: !this.data.hidden + }) + }, + /** + *滚动条触发事件 + */ + scroll(e) { + + }, + + /** + * 跳转更多 1管理层 2 员工层 3 企业简介 4企业风采 5企业视频 + */ + goPages(e) { + switch (e.currentTarget.dataset.id) { + case '1': + console.log('更多管理层') + wx.navigateTo({ + url: '/pages/home/companyMore/companyMore?type=1', + }) + break; + + case '2': + console.log('更多员工层') + wx.navigateTo({ + url: '/pages/home/companyMore/companyMore?type=2', + }) + break; + + case '4': + console.log('更多企业风采') + wx.navigateTo({ + url: '/pages/home/companyMore/companyMore?type=4', + }) + break; + + case '5': + console.log('更多企业视频') + wx.navigateTo({ + url: '/pages/home/companyMore/companyMore?type=5', + }) + break; + + default: + break; + } + }, + + + + + } +}) \ No newline at end of file diff --git a/components/company/enterprise/enterprise.json b/components/company/enterprise/enterprise.json new file mode 100644 index 0000000..e41fbdc --- /dev/null +++ b/components/company/enterprise/enterprise.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "videoInfo": "/components/company/videoInfo/videoInfo", + "fengcaiInfo": "/components/company/fengcaiInfo/fengcaiInfo" + } +} \ No newline at end of file diff --git a/components/company/enterprise/enterprise.wxml b/components/company/enterprise/enterprise.wxml new file mode 100644 index 0000000..4f7cde5 --- /dev/null +++ b/components/company/enterprise/enterprise.wxml @@ -0,0 +1,112 @@ + + + + + 企业介绍 + + + + + + + + {{info.base.description}} + + 展开 + + 隐藏 + + + + + + + + + 员工信息 + + 更多 + + + + + + + + + + {{item.name}} + {{item.job}} + + + + + + + + + + + + + + + + + + + 企业风采 + + 更多 + + + + + + + + + + + + 企业视频 + + 更多 + + + + + + + + + + + + 荣誉资质 + + + + + + + + + \ No newline at end of file diff --git a/components/company/enterprise/enterprise.wxss b/components/company/enterprise/enterprise.wxss new file mode 100644 index 0000000..d47f5d9 --- /dev/null +++ b/components/company/enterprise/enterprise.wxss @@ -0,0 +1,168 @@ +/* components/enterprise/enterprise.wxss */ +/* title */ +image{ + height: auto; +} +.enterprise_title{ + padding: 0 30rpx; + height: 80rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 30rpx; + color: #333; + font-weight: 600; +} +.enterprise_title .left , .enterprise_title .right{ + line-height: 80rpx; + height: 80rpx; +} +.enterprise_title .left image{ + width: 28rpx; + height: auto; + margin-right: 20rpx; +} +.enterprise_title .right{ + color: #666; + font-weight: normal; + font-size: 28rpx; + +} +.enterprise_title .right image{ + width: 12rpx; + height: auto; + margin-left: 10rpx; + background: #fff; + border-radius: 50%; +} + +/* 管理层 */ +.scroll-view_H{ + white-space: nowrap; + padding: 0 0 0 10px; + box-sizing: border-box; + margin-top: 20rpx; +} +.scroll-view-item{ + height: 200rpx; +} +.scroll-view-item_H{ + margin-right: 10rpx; + padding: 10rpx 00rpx; + width: 20%; + height: 200rpx; + display: inline-block; +} +.enterprise_list{ + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: center; + box-sizing: border-box; +} + +.enterprise_header{ + width: 120rpx; + height: 120rpx; + border-radius: 50%; + box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.5); + border: solid 2rpx #f7f7f7; +} + +.enterprise_nickname{ + width: 100%; + font-size: 29rpx; + color: #333; + font-weight: 600; + margin-top: 10rpx; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; + text-align: center; +} + +.enterprise_job{ + width: 100%; + font-size: 23rpx; + color: #666; + font-weight: normal; + text-align: center; + margin-top: 2rpx; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +/* 企业文化 */ +.enterprise_content{ + font-size:29rpx ; + color: #333; + margin: 0 30rpx; + border-radius: 12rpx; + background-color: #fff; + box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); + margin-top: 20rpx; + padding:30rpx 30rpx 20rpx 30rpx; + +} +.enterprise_content .content{ + position: relative; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 4; + line-clamp: 4; + -webkit-box-orient: vertical; +} +.enterprise_content .zhankai{ + width: 100%; + text-align: center; + color: #999; + padding: 20rpx 20rpx 0 20rpx ; + box-sizing: border-box; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} +.enterprise_content .zhankai image{ + width: 20rpx; + margin-left: 10rpx; +} + +.mt30{ + margin-top: 30rpx; +} + +.mt50{ + margin-top: 50rpx; +} + +.txt_center{ + text-align: center; + font-size: 29rpx; + color: #333333; +} + +/* 播放 */ +.content .play{ + background-color: rgba(0, 0, 0, 0.3); + width: 100%; + height: calc(100% - 10rpx); + position: absolute; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} +.content .play image{ + width: 102rpx; + height: 102rpx; +} \ No newline at end of file diff --git a/components/company/fengcaiInfo/fengcaiInfo.js b/components/company/fengcaiInfo/fengcaiInfo.js new file mode 100644 index 0000000..d376f37 --- /dev/null +++ b/components/company/fengcaiInfo/fengcaiInfo.js @@ -0,0 +1,24 @@ +Component({ + /** + * 组件的属性列表 + */ + properties: { + info:{ + type:Object + } + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/components/company/fengcaiInfo/fengcaiInfo.json b/components/company/fengcaiInfo/fengcaiInfo.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/fengcaiInfo/fengcaiInfo.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/fengcaiInfo/fengcaiInfo.wxml b/components/company/fengcaiInfo/fengcaiInfo.wxml new file mode 100644 index 0000000..89c6a98 --- /dev/null +++ b/components/company/fengcaiInfo/fengcaiInfo.wxml @@ -0,0 +1,6 @@ + + + + + {{info.title}} + \ No newline at end of file diff --git a/components/company/fengcaiInfo/fengcaiInfo.wxss b/components/company/fengcaiInfo/fengcaiInfo.wxss new file mode 100644 index 0000000..54547c2 --- /dev/null +++ b/components/company/fengcaiInfo/fengcaiInfo.wxss @@ -0,0 +1,42 @@ +/* 企业视频*/ +.enterprise_content{ + font-size:29rpx ; + color: #333; + margin: 0 30rpx; + border-radius: 12rpx; + background-color: #fff; + box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); + margin-top: 20rpx; + padding:30rpx 30rpx 20rpx 30rpx; + +} +.enterprise_content .content{ + position: relative; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + text-align: center; +} + +/* 播放 */ +.content .play{ + background-color: rgba(0, 0, 0, 0.3); + width: 100%; + height: calc(100% - 10rpx); + position: absolute; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} +.content .play image{ + width: 102rpx; + height: 102rpx; +} \ No newline at end of file diff --git a/components/company/noticeList/noticeList.js b/components/company/noticeList/noticeList.js new file mode 100644 index 0000000..8ae19d5 --- /dev/null +++ b/components/company/noticeList/noticeList.js @@ -0,0 +1,57 @@ +// components/videoList/videoList.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + lists:[],//列表 + company_id:wx.getStorageSync('company_id'), + page:1, + has_more:true, + }, + + /** + * 组件的方法列表 + */ + methods: { + /** + * 跳转到详情 + */ + toUrl(e){ + wx.navigateTo({ + url: '/pages/home/noticeDetail/noticeDetail?id='+e.currentTarget.dataset.id, + }) + }, + /** + * 企业活动列表 + */ + actives(){ + if(this.data.has_more){ + wx.$api.companyModule.dynamics(this.data.company_id,this.data.page).then(res=>{ + console.log(res) + if(res.page.has_more){ + this.setData({ + has_more:true, + page:this.data.page+1, + }) + }else{ + this.setData({ + has_more:false + }) + } + var lists=this.data.lists.concat(res.data); + this.setData({ + lists:lists + }) + }) + } + } + } +}) diff --git a/components/company/noticeList/noticeList.json b/components/company/noticeList/noticeList.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/noticeList/noticeList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/noticeList/noticeList.wxml b/components/company/noticeList/noticeList.wxml new file mode 100644 index 0000000..43ba490 --- /dev/null +++ b/components/company/noticeList/noticeList.wxml @@ -0,0 +1,9 @@ + + + 最新动态 + + + {{item.title}} + {{item.created_at}} + +{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}} \ No newline at end of file diff --git a/components/company/noticeList/noticeList.wxss b/components/company/noticeList/noticeList.wxss new file mode 100644 index 0000000..3928855 --- /dev/null +++ b/components/company/noticeList/noticeList.wxss @@ -0,0 +1,114 @@ +.active_content { + /* height: 600rpx; */ + background-color: #fff; + margin: 20rpx; + box-sizing: border-box; + padding-bottom: 30rpx; +} + +.active_cover { + width: 100%; + height: 400rpx; + position: relative; + border-radius: 20rpx 20rpx 0 0; + overflow: hidden; + padding-bottom: 0; +} + +.active_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.active_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.active_title { + margin-top: 20rpx; + padding: 0 20rpx; + color: #333; + font-weight: 600; + font-size: 28rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.active_des { + margin-top: 14rpx; + padding: 0 20rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_time { + margin-top: 14rpx; + padding: 0 20rpx; + color: #666; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_line { + margin: 20rpx 20rpx 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.active_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 36rpx; + font-weight: 600; + color: #333; +} + +.active_bottom span { + color: #999; + font-size: 24rpx; + padding-left: 10rpx; + font-weight: normal; +} + +.active_bottom .right { + font-size: 28rpx; + color:#378fff; + padding: 30rpx; +} + +.active_bottom .left{ + margin-left: 20rpx; +} + +.has_more{ + color: #999; + font-size: 26rpx; + text-align: center; + padding: 30rpx ; +} \ No newline at end of file diff --git a/components/company/personalInfo/personalInfo.js b/components/company/personalInfo/personalInfo.js new file mode 100644 index 0000000..14714a5 --- /dev/null +++ b/components/company/personalInfo/personalInfo.js @@ -0,0 +1,23 @@ +Component({ + /** + * 组件的属性列表 + */ + properties: { + info:Object + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + // 获取员工列表 + + } +}) diff --git a/components/company/personalInfo/personalInfo.json b/components/company/personalInfo/personalInfo.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/personalInfo/personalInfo.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/personalInfo/personalInfo.wxml b/components/company/personalInfo/personalInfo.wxml new file mode 100644 index 0000000..381f6d1 --- /dev/null +++ b/components/company/personalInfo/personalInfo.wxml @@ -0,0 +1,7 @@ + + + + {{info.name}}({{info.job}}) + {{info.mobile}} + + \ No newline at end of file diff --git a/components/company/personalInfo/personalInfo.wxss b/components/company/personalInfo/personalInfo.wxss new file mode 100644 index 0000000..ff77d99 --- /dev/null +++ b/components/company/personalInfo/personalInfo.wxss @@ -0,0 +1,50 @@ +.personal_list{ + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + box-sizing: border-box; + border-bottom: solid 1rpx #f7f7f7; + background-color: #fff; + padding: 20rpx 30rpx; +} + +.personal_header{ + width: 120rpx; + height: 120rpx; + border-radius: 50%; + box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.5); + border: solid 2rpx #f7f7f7; +} + +.personal_nickname{ + width: 100%; + font-size: 32rpx; + color: #333; + font-weight: 600; + margin-top: 10rpx; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} + +.personal_job{ + width: 100%; + font-size: 26rpx; + color: #666; + font-weight: normal; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; + margin-top: 6rpx; + padding-left: 10rpx; +} + +.personal_left{ + display: flex; + flex-direction: column; + justify-content: start; + align-items: center; + box-sizing: border-box; + margin-left: 30rpx; +} \ No newline at end of file diff --git a/components/company/projectRaise/projectRaise.js b/components/company/projectRaise/projectRaise.js new file mode 100644 index 0000000..89fdc96 --- /dev/null +++ b/components/company/projectRaise/projectRaise.js @@ -0,0 +1,92 @@ +// components/videoList/videoList.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + }, + + /** + * 组件的初始数据 + */ + data: { + lists:[],//列表 + categoryList:[], + category_id:'0', + company_id:wx.getStorageSync('company_id'), + page:1, + has_more:true, + }, + + + /** + * 组件的方法列表 + */ + methods: { + /** + * 跳转到详情 + */ + toUrl(e){ + wx.navigateTo({ + url: '/pages/home/projectDetail/projectDetail?id='+e.currentTarget.dataset.id, + }) + }, + /** + * 点击按钮触发事件 + */ + menuSelect: function (e) { + var category_id=e.currentTarget.dataset.id; + if(this.data.category_id!=category_id){ + console.log(category_id); + this.setData({ + category_id:category_id, + lists:[], + page:1, + has_more:true + }) + this.crowdfunds(); + } + }, + + /** + * 请求项目筹集分类接口 + */ + crowdfundcategory(company_id){ + wx.$api.companyModule.crowdfundcategory(company_id).then(res=>{ + console.log(res) + this.setData({ + categoryList:res, + category_id:res[0].id + }) + this.crowdfunds(); + }) + }, + + /** + * 请求根据分类获取列表 + */ + crowdfunds(){ + if(this.data.has_more){ + wx.$api.companyModule.crowdfunds(this.data.company_id,this.data.category_id,this.data.page).then(res=>{ + console.log(res) + if(res.page.has_more){ + this.setData({ + has_more:true, + page:this.data.page+1, + }) + }else{ + this.setData({ + has_more:false + }) + } + var lists=this.data.lists.concat(res.data); + this.setData({ + lists:lists + }) + }) + } + }, + + + } +}) diff --git a/components/company/projectRaise/projectRaise.json b/components/company/projectRaise/projectRaise.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/projectRaise/projectRaise.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/projectRaise/projectRaise.wxml b/components/company/projectRaise/projectRaise.wxml new file mode 100644 index 0000000..23830b8 --- /dev/null +++ b/components/company/projectRaise/projectRaise.wxml @@ -0,0 +1,41 @@ + + + + + {{item.title}} + + + + + + {{item.status_text}} + + + {{item.title}} + + {{item.city}}/{{item.category}} + {{item.ratio}}% + + + + + + 筹集金额 ¥{{item.amount}} + 剩余天数 {{item.diffDays}}天 + + + + 已成功 + + + 倒计时{{item.openDiffDays}} + {{item.likes}}人关注 + + + + 已结束 + + + +{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}} \ No newline at end of file diff --git a/components/company/projectRaise/projectRaise.wxss b/components/company/projectRaise/projectRaise.wxss new file mode 100644 index 0000000..0a84511 --- /dev/null +++ b/components/company/projectRaise/projectRaise.wxss @@ -0,0 +1,136 @@ +.project_content { + background-color: #fff; + margin: 20rpx; + box-sizing: border-box; +} + +.project_cover { + width: 100%; + height: 340rpx; + position: relative; + overflow: hidden; + padding-bottom: 0; +} + +.project_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.project_type_icon { + position: absolute; + top: 10rpx; + left: 10rpx; + background-color: #ffcc00; + border-radius: 4rpx; + color: #4a1900; + padding: 6rpx 16rpx; + font-size: 24rpx; + z-index: 1; +} + +.project_title { + margin-top: 20rpx; + padding: 0 20rpx; + color: #333; + font-weight: 600; + font-size: 28rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 4; +} + +.project_des { + margin-top: 14rpx; + padding: 0 10rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.project_time { + margin-top: 14rpx; + padding: 0 10rpx; + color: #666; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.project_line { + margin: 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.project_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 36rpx; + font-weight: 600; + color: #333; + padding: 20rpx; +} + +.project_bottom span { + color: #999; + font-size: 24rpx; + font-weight: normal; +} + +.project_bottom .color333 { + color: #666; +} + + +/* 滚动菜单 */ +.scroll_menu{ + /* background-color: #fff; */ + /* box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1); */ + font-size: 26rpx; +} +.scroll-view_H{ + white-space: nowrap; + color: #666; +} +.scroll-view-item{ + height: 90rpx; + line-height: 90rpx; +} +.scroll-view-item_H{ + display: inline-block; + /* width: 25%; */ + padding: 0 30rpx; + height: 90rpx; + line-height: 90rpx; + text-align: center; + /* border-top: solid 10rpx #fff; + border-bottom: solid 10rpx #fff; */ +} +.scroll_view_select{ + /* border-bottom: solid 4rpx #378fff; */ + color: #378fff; + font-weight: 600; +} + +.has_more{ + color: #999; + font-size: 26rpx; + text-align: center; + padding: 30rpx ; +} \ No newline at end of file diff --git a/components/company/userInfoLayer/userInfoLayer.js b/components/company/userInfoLayer/userInfoLayer.js new file mode 100644 index 0000000..4f08f71 --- /dev/null +++ b/components/company/userInfoLayer/userInfoLayer.js @@ -0,0 +1,43 @@ + +/** + * Web唐明明 + * 一个梦想做木雕手艺人的程序员 + * explain: userInfoLayer + */ + +Component({ + /** + * 组件的属性列表 + */ + properties: { + showLayer: { + type : Boolean, + value : false + } + }, + + /** + * 组件的方法列表 + */ + methods: { + userInfo(info){ + if(info.detail.errMsg == "getUserInfo:ok"){ + wx.$api.auth.authInfo({ + nickname: info.detail.userInfo.nickName, + avatar : info.detail.userInfo.avatarUrl + }).then(()=>{ + this.triggerEvent("updateinfo", true) + this.setData({ + showLayer: false + }) + }) + }else{ + wx.showToast({ + title: '拒绝了授权', + icon : 'none' + }) + this.triggerEvent("updateinfo", false) + } + } + } +}) diff --git a/components/company/userInfoLayer/userInfoLayer.json b/components/company/userInfoLayer/userInfoLayer.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/components/company/userInfoLayer/userInfoLayer.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/userInfoLayer/userInfoLayer.wxml b/components/company/userInfoLayer/userInfoLayer.wxml new file mode 100644 index 0000000..64473d2 --- /dev/null +++ b/components/company/userInfoLayer/userInfoLayer.wxml @@ -0,0 +1,14 @@ + + + + + + + + 完善信息 + 获取您的公开信息(头像,昵称等),完善平台信息 + + + + + diff --git a/components/company/userInfoLayer/userInfoLayer.wxss b/components/company/userInfoLayer/userInfoLayer.wxss new file mode 100644 index 0000000..96b978a --- /dev/null +++ b/components/company/userInfoLayer/userInfoLayer.wxss @@ -0,0 +1,70 @@ + +/** + * Web唐明明 + * 一个梦想做木雕手艺人的程序员 + */ + +.layer-back, +.layer-content{ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.layer-back{ + z-index: 999; + background-color: rgba(0, 0, 0, .3); +} + +.layer-content{ + z-index: 1000; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-pack: center; + text-align: center; + padding-bottom: 100rpx; + box-sizing: border-box; +} + +.layer-content-block{ + background-color: white; + width: 500rpx; + display: inline-block; + border-radius: 8rpx; + box-sizing: border-box; + overflow: hidden; +} + +.layer-content-img{ + width: 100%; + vertical-align: top; +} + +.layer-content-mian{ + padding: 40rpx; +} + +.layer-content-title{ + font-weight: bold; + font-size: 38rpx; + line-height: 90rpx; +} + +.layer-content-btn[size="default"]{ + background-color: #0c0047; + color: white; + width: 100%; + height: 90rpx; + line-height: 90rpx; + border-radius: 0; + font-size: 34rpx; + padding: 0; +} + +.layer-content-text{ + padding-bottom: 40rpx; + font-size: 30rpx; + color: #afafaf; +} diff --git a/components/company/userInfoLayer/userInfoLayer_img.png b/components/company/userInfoLayer/userInfoLayer_img.png new file mode 100644 index 0000000..6c2e826 Binary files /dev/null and b/components/company/userInfoLayer/userInfoLayer_img.png differ diff --git a/components/company/videoInfo/videoInfo.js b/components/company/videoInfo/videoInfo.js new file mode 100644 index 0000000..d376f37 --- /dev/null +++ b/components/company/videoInfo/videoInfo.js @@ -0,0 +1,24 @@ +Component({ + /** + * 组件的属性列表 + */ + properties: { + info:{ + type:Object + } + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/components/company/videoInfo/videoInfo.json b/components/company/videoInfo/videoInfo.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/videoInfo/videoInfo.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/videoInfo/videoInfo.wxml b/components/company/videoInfo/videoInfo.wxml new file mode 100644 index 0000000..5f3efde --- /dev/null +++ b/components/company/videoInfo/videoInfo.wxml @@ -0,0 +1,6 @@ + + + + + {{info.description}} + \ No newline at end of file diff --git a/components/company/videoInfo/videoInfo.wxss b/components/company/videoInfo/videoInfo.wxss new file mode 100644 index 0000000..54547c2 --- /dev/null +++ b/components/company/videoInfo/videoInfo.wxss @@ -0,0 +1,42 @@ +/* 企业视频*/ +.enterprise_content{ + font-size:29rpx ; + color: #333; + margin: 0 30rpx; + border-radius: 12rpx; + background-color: #fff; + box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); + margin-top: 20rpx; + padding:30rpx 30rpx 20rpx 30rpx; + +} +.enterprise_content .content{ + position: relative; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + line-clamp: 1; + -webkit-box-orient: vertical; + text-align: center; +} + +/* 播放 */ +.content .play{ + background-color: rgba(0, 0, 0, 0.3); + width: 100%; + height: calc(100% - 10rpx); + position: absolute; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} +.content .play image{ + width: 102rpx; + height: 102rpx; +} \ No newline at end of file diff --git a/components/company/videoList/videoList.js b/components/company/videoList/videoList.js new file mode 100644 index 0000000..7e2441d --- /dev/null +++ b/components/company/videoList/videoList.js @@ -0,0 +1,23 @@ +// components/videoList/videoList.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/components/company/videoList/videoList.json b/components/company/videoList/videoList.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/company/videoList/videoList.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/company/videoList/videoList.wxml b/components/company/videoList/videoList.wxml new file mode 100644 index 0000000..c4a7bdc --- /dev/null +++ b/components/company/videoList/videoList.wxml @@ -0,0 +1,8 @@ + + + + 置顶 + + 2360 + + \ No newline at end of file diff --git a/components/company/videoList/videoList.wxss b/components/company/videoList/videoList.wxss new file mode 100644 index 0000000..1ceb318 --- /dev/null +++ b/components/company/videoList/videoList.wxss @@ -0,0 +1,49 @@ +.video_content { + width: 100%; + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + box-sizing: border-box; + flex-wrap: wrap; +} + +.video_item { + margin-top: 2rpx; + margin-left: 0.25%; + width: 33%; + height: 280rpx; + position: relative; + overflow: hidden; + display: flex; + flex-direction: row; + justify-content: start; + align-items: flex-end; + box-sizing: border-box; + padding: 20rpx; + font-size: 26rpx; + color: #fff; +} + +.video_item_bg { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} +.video_item_eye{ + width: 30rpx; + margin-right: 10rpx; +} +.video_item_zhiding{ + position: absolute; + top: 12rpx; + left: 12rpx; + background-color:#ffcc00 ; + color:#4a1900 ; + padding: 4rpx 10rpx; + border-radius: 4rpx; + font-size: 24rpx; +} \ No newline at end of file diff --git a/pages/home/activeDetail/activeDetail.js b/pages/home/activeDetail/activeDetail.js new file mode 100644 index 0000000..42b4ecc --- /dev/null +++ b/pages/home/activeDetail/activeDetail.js @@ -0,0 +1,130 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + acted: false, //已经报名true + showBeSureActed: false, //显示确认弹窗 + indicatorDots: true, + vertical: false, + autoplay: false, + interval: 2000, + duration: 500, + active_id: '', //活动id + info: '', //详情信息 + loaded: false, + showBeSigned:false, + }, + onLoad(e) { + this.setData({ + active_id: e.id + }) + }, + onShow() { + this.activesDetail(this.data.active_id); + }, + + /** + * 现在报名 + */ + nowActed: function (e) { + console.log() + if (!e.currentTarget.dataset.acted) { + this.setData({ + showBeSureActed: true, + }) + } else { + wx.showToast({ + icon: 'none', + title: '已报名,等待活动开始', + }) + } + }, + /** + * 关闭弹窗 + */ + close() { + this.setData({ + showBeSureActed: false, + showBeSigned:false, + }) + }, + /** + * 确认报名 + */ + beSure() { + wx.login({ + success: res => { + wx.$api.companyModule.activesEnroll(res.code, this.data.active_id).then(res => { + if (Number(this.data.info.price) > 0) { + var resss = JSON.parse(res); + console.log('可支付') + wx.requestPayment({ + timeStamp: resss.timeStamp, + nonceStr: resss.nonceStr, + package: resss.package, + signType: 'MD5', + paySign: resss.paySign, + success: res => { + this.close(); + wx.navigateTo({ + url: '/pages/home/activeSuccess/activeSuccess?cover=' + this.data.info.pictures[0], + }) + }, + fail(res) { + wx.showToast({ + title: '支付失败', + }) + } + }) + + } else { + console.log('不用支付') + this.close(); + wx.navigateTo({ + url: '/pages/home/activeSuccess/activeSuccess?cover=' + this.data.info.pictures[0], + }) + } + }) + } + }) + }, + /** + * 获取详情 + */ + activesDetail() { + wx.$api.companyModule.activesDetail(this.data.active_id).then(res => { + var nodes = res.content.replace(' { + console.log(res); + var info=this.data.info; + info.signed=2; + this.setData({ + info:info + }) + this.close(); + }) + } + + + +}) \ No newline at end of file diff --git a/pages/home/activeDetail/activeDetail.json b/pages/home/activeDetail/activeDetail.json new file mode 100644 index 0000000..b909427 --- /dev/null +++ b/pages/home/activeDetail/activeDetail.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "活动详情", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/activeDetail/activeDetail.wxml b/pages/home/activeDetail/activeDetail.wxml new file mode 100644 index 0000000..6e687e5 --- /dev/null +++ b/pages/home/activeDetail/activeDetail.wxml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + {{info.title}} + {{info.description}} + + + {{info.price > 0? '¥' + info.price:'免费'}} + 报名上限:{{info.limits}}人 + + + + + 截止时间:{{info.deadlined_at}} + 活动时间:{{info.started_at}}至{{info.ended_at}} + 活动地点:{{info.address}} + + + + 联系人电话:{{info.contact}} + + + + 活动详情 + + + + + + {{info.price> 0 ? '¥' + info.price:'免费'}} + {{!info.canEnroll?'无法报名':'立即报名'}} + + + {{info.price> 0 ? '¥' + info.price:'免费'}} + {{info.signed==1?'立刻签到':'签到已完成'}} + + + + + + + + + 是否对该活动进行报名 + 活动名称:{{info.title}} + 确认报名 + 我再想想 + + + + + + + + + 是否确认现在就签到 + 活动名称:{{info.title}} + 确认签到 + 我再想想 + + \ No newline at end of file diff --git a/pages/home/activeDetail/activeDetail.wxss b/pages/home/activeDetail/activeDetail.wxss new file mode 100644 index 0000000..224326c --- /dev/null +++ b/pages/home/activeDetail/activeDetail.wxss @@ -0,0 +1,248 @@ +.active_content { + background-color: #fff; + box-sizing: border-box; + padding-bottom: 10rpx; +} + +.active_cover { + width: 100%; + height: 300rpx; + position: relative; + overflow: hidden; + padding-bottom: 0; +} + +.active_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.active_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.active_title { + margin-top: 30rpx; + padding: 0 30rpx; + color: #333; + font-weight: 600; + font-size: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.active_des { + margin-top: 14rpx; + padding: 0 30rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_time { + margin-top: 14rpx; + /* padding: 0 10rpx; */ + color: #666; + font-size: 26rpx; + /* overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; */ +} + +.active_time image { + width: 30rpx; + position: relative; + bottom: -6rpx; + right: 0; + margin-left: 30rpx; + margin-right: 4rpx; +} + +.active_line { + margin: 20rpx 20rpx 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.active_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 40rpx; + font-weight: 600; + color: #333; + padding: 0 30rpx; + margin-top: 20rpx; +} + +.active_bottom span { + color: #999; + font-size: 24rpx; + padding-left: 10rpx; + font-weight: normal; +} + + +.active_detail { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; +} + +.active_detail_html { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; + padding-bottom: 150rpx; +} + +.active_detail_html img{ + width: 100%; +} + +.active_nav { + color: #333; + font-weight: 600; + font-size: 32rpx; + padding-bottom: 30rpx; +} + +/* 立即报名 */ +.active_now_act { + margin-top: 20rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 34rpx; + font-weight: 600; + color: #333; + background-color: #fff; + padding: 20rpx 30rpx; + position: fixed; + bottom: 0; + width: 100%; + height: 120rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.6); +} + +.active_now_act span { + margin-left: 60rpx; + flex: 1; + display: inline-block; + background-color: #378fff; + color: #fff; + font-size: 30rpx; + border-radius: 50rpx; + padding: 20rpx 100rpx; + text-align: center; + font-weight: 600; +} + +.acted span { + background-color: #999; +} + +.active_be_sure { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + z-index: 1; +} + +.active_be_sure .bg { + background-color: rgba(0, 0, 0, 0.6); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2; +} + +.active_be_sure .content { + width: 600rpx; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; +} + +.active_be_sure .content .active_cover { + width: 100%; + height: 360rpx; + border-radius: 20rpx 20rpx 0 0; +} + +.active_be_sure .content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + +.active_be_sure .content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + padding-left: 20rpx; + padding-right: 20rpx; + color: #999; +} + +.active_be_sure .content .txt3 { + font-size: 32rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left:15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 30rpx; +} + +.active_be_sure .content .txt4 { + font-size: 26rpx; + color: #999; + padding:20rpx 30rpx; +} + +img{ + max-width: 100%; +} \ No newline at end of file diff --git a/pages/home/activeSuccess/activeSuccess.js b/pages/home/activeSuccess/activeSuccess.js new file mode 100644 index 0000000..7649127 --- /dev/null +++ b/pages/home/activeSuccess/activeSuccess.js @@ -0,0 +1,69 @@ + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + console.log(options.cover) + this.setData({ + cover:options.cover + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/home/activeSuccess/activeSuccess.json b/pages/home/activeSuccess/activeSuccess.json new file mode 100644 index 0000000..0684b78 --- /dev/null +++ b/pages/home/activeSuccess/activeSuccess.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "报名成功", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/activeSuccess/activeSuccess.wxml b/pages/home/activeSuccess/activeSuccess.wxml new file mode 100644 index 0000000..c8e727f --- /dev/null +++ b/pages/home/activeSuccess/activeSuccess.wxml @@ -0,0 +1,6 @@ + + + 恭喜您,报名成功 + 您可以进入“个人中心-活动参与”查看详情 + 查看活动 + \ No newline at end of file diff --git a/pages/home/activeSuccess/activeSuccess.wxss b/pages/home/activeSuccess/activeSuccess.wxss new file mode 100644 index 0000000..8b69244 --- /dev/null +++ b/pages/home/activeSuccess/activeSuccess.wxss @@ -0,0 +1,53 @@ +page{ + height: 100%; +} +.content { + padding-top:160rpx; + width: 100%; + height: 100%; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; + box-sizing: border-box; +} + + .content .active_cover { + width: 150rpx; + height: 150rpx; + border-radius: 50%; +} + + .content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + + .content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + color: #999; +} + + .content .txt3 { + font-size: 28rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left: 15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 80rpx; +} + + .content .txt4 { + font-size: 26rpx; + color: #999; + padding: 20rpx 30rpx; +} \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.js b/pages/home/beSureOrder/beSureOrder.js new file mode 100644 index 0000000..71f062c --- /dev/null +++ b/pages/home/beSureOrder/beSureOrder.js @@ -0,0 +1,81 @@ +Page({ + data: { + crowdfund_item_id: '', + addressList: [], + info: '', + remark: '', + crowdfund_id: '' + }, + onLoad(e) { + wx.$api.companyModule.crowdfundsCreat(e.crowdfund_item_id).then(res => { + console.log(res); + if (res.address.length > 0) { + this.setData({ + address_id: res.address[0].address_id, + addressList: res.address, + }) + } + this.setData({ + crowdfund_item_id: e.crowdfund_item_id, + info: res.info, + crowdfund_id: e.crowdfund_id + }) + console.log(this.data.info); + }).catch(res => { + wx.navigateBack({}) + }) + }, + input(e) { + this.setData({ + remark: e.detail.value + }) + }, + nowActed(e) { + wx.showLoading({ + title: '创建中...', + mask: 'true' + }) + wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.address_id, this.data.remark).then(res => { + var data = {}; + if (res.trade_no) { + wx.login({ + success: res1 => { + data = { + trade_no: res.trade_no, + code: res1.code + } + wx.$api.companyModule.wechat(data).then(res => { + var ress = JSON.parse(res); + wx.hideLoading({}); + wx.requestPayment({ + timeStamp: ress.timeStamp, + nonceStr: ress.nonceStr, + package: ress.package, + signType: 'MD5', + paySign: ress.paySign, + success: res => { + wx.showToast({ + title: '创建订单成功', + }) + wx.navigateTo({ + url: '/pages/home/projectSuccess/projectSuccess?crowdfund_id=' + this.data.crowdfund_id, + }) + }, + fail(res) { + wx.showToast({ + title: '支付失败', + }) + } + }) + }).catch(res => { + console.log(res) + }) + } + }) + } + }).catch(res => { + wx.navigateBack({}) + }) + } + +}) \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.json b/pages/home/beSureOrder/beSureOrder.json new file mode 100644 index 0000000..8f24a39 --- /dev/null +++ b/pages/home/beSureOrder/beSureOrder.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "确认订单", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.wxml b/pages/home/beSureOrder/beSureOrder.wxml new file mode 100644 index 0000000..4576274 --- /dev/null +++ b/pages/home/beSureOrder/beSureOrder.wxml @@ -0,0 +1,46 @@ + + + + 张冬雪 14745798066 学校 默认 + 黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼 + + + + + + + + 项目名称:{{info.title}}。 + ¥{{info.price}}x1 + + + + + + + 配送方式 + {{info.shipping}} + + + + 订单备注 + + + + + 商品总价 + ¥{{info.price}} + + + + 应付总价 + ¥{{info.price}} + +温馨提示:下单后未发货可自主申请退款,项目成功后,7日内由企业安排发货。 + + + + + 合计:¥{{info.price}} + {{acted?'已提交订单':'提交订单'}} + \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.wxss b/pages/home/beSureOrder/beSureOrder.wxss new file mode 100644 index 0000000..69f6422 --- /dev/null +++ b/pages/home/beSureOrder/beSureOrder.wxss @@ -0,0 +1,182 @@ +/* 立即报名 */ +.besure_now_act { + margin-top: 20rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 42rpx; + font-weight: 600; + color: #333; + background-color: #fff; + padding: 20rpx 30rpx; + position: fixed; + bottom: 0; + width: 100%; + height: 120rpx; +} + +.besure_bottom .left{ + width: 160rpx; +} +.besure_now_act .left span { + font-size: 28rpx; + color: #333; + font-weight: normal; +} + +.besure_now_act>span { + margin-left: 60rpx; + flex: 1; + display: inline-block; + background-color: #378fff; + color: #fff; + font-size: 30rpx; + border-radius: 50rpx; + padding: 20rpx .0; + text-align: center; + font-weight: 600; +} + +.acted span { + background-color: #999; +} + + +.besure_bottom { + width: 100%; + padding: 30rpx; + background-color: #fff; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 28rpx; + color: #333; + border-top: solid 1rpx #f7f7f7; +} + +.besure_bottom input , .besure_bottom>span { + flex: 1; + /* margin-left: 30rpx; */ + padding-top: 4rpx; +} + + + +.besure_notice { + padding: 30rpx 20rpx; + font-size: 28rpx; + color: #999; +} + +.mt20 { + margin-top: 20rpx; +} + +/* 商品图片及信息 */ +.besure_goods { + margin-top: 30rpx; + padding: 30rpx 20rpx; + background-color: #fff; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: flex-start; + box-sizing: border-box; +} + +.besure_goods_img { + width: 160rpx; + height: 160rpx; + border-radius: 10rpx; +} + +.besure_goods_right { + flex: 1; + margin-left: 30rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + align-self: flex-start; + min-height: 160rpx; +} + +.besure_goods_right .title { + font-size: 28rpx; + color: #333; +} + +.besure_goods_right .price { + display: flex; + flex-direction: row; + justify-content: space-between; + align-self: flex-start; + box-sizing: border-box; + width: 100%; + font-size: 26rpx; + color: #999; + margin-top: 30rpx; +} + +.besure_goods_right .price span { + color: #333; + font-size: 32rpx; + font-weight: 600; +} + +/* 地址信息展示 */ +.besure_address { + width: 100%; + padding: 50rpx 30rpx; + box-sizing: border-box; + background-color: #fff; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; +} + +.besure_address .userinfo { + font-size: 34rpx; + color: #333333; + font-weight: 600; + padding-bottom: 10rpx; + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + box-sizing: border-box; +} + +.besure_address .icon_right { + margin-left: 20rpx; +} + +.besure_address .userinfo .type { + display: inline-block; + background-color: #378fff; + color: #fff; + border-radius: 20rpx; + font-size: 20rpx; + padding: 6rpx 20rpx; + margin-left: 10rpx; +} + +.besure_address .userinfo .moren { + display: inline-block; + background-color: #ffcc00; + color: #fff; + border-radius: 20rpx; + font-size: 20rpx; + padding: 6rpx 20rpx; + margin-left: 10rpx; +} + +.besure_address .des { + font-size: 24rpx; + padding-top: 10rpx; +} \ No newline at end of file diff --git a/pages/home/companyInfo/companyInfo.js b/pages/home/companyInfo/companyInfo.js new file mode 100644 index 0000000..588cbc5 --- /dev/null +++ b/pages/home/companyInfo/companyInfo.js @@ -0,0 +1,66 @@ +// pages/home/companyInfo/companyInfo.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/home/companyInfo/companyInfo.json b/pages/home/companyInfo/companyInfo.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/home/companyInfo/companyInfo.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/home/companyInfo/companyInfo.wxml b/pages/home/companyInfo/companyInfo.wxml new file mode 100644 index 0000000..685d53b --- /dev/null +++ b/pages/home/companyInfo/companyInfo.wxml @@ -0,0 +1,2 @@ + +pages/home/companyInfo/companyInfo.wxml diff --git a/pages/home/companyInfo/companyInfo.wxss b/pages/home/companyInfo/companyInfo.wxss new file mode 100644 index 0000000..53fc0f9 --- /dev/null +++ b/pages/home/companyInfo/companyInfo.wxss @@ -0,0 +1 @@ +/* pages/home/companyInfo/companyInfo.wxss */ \ No newline at end of file diff --git a/pages/home/companyMore/companyMore.js b/pages/home/companyMore/companyMore.js new file mode 100644 index 0000000..ddc61de --- /dev/null +++ b/pages/home/companyMore/companyMore.js @@ -0,0 +1,124 @@ +Page({ + data: { + type: 1, + page: 1, + has_more: true, + lists: [], + company_id: wx.getStorageSync('company_id'), + }, + /** + * @param {type} 1管理 2员工 4 企业风采 5 企业视频 + */ + onLoad: function (options) { + switch (options.type) { + case '1': + wx.setNavigationBarTitle({ + // title: '企业主页-管理层', + title: '员工列表', + }) + this.users(); + break; + case '2': + wx.setNavigationBarTitle({ + title: '企业主页-员工层', + }) + break; + case '4': + wx.setNavigationBarTitle({ + title: '企业风采', + }) + this.graces(); + break; + case '5': + wx.setNavigationBarTitle({ + title: '企业视频', + }) + this.videos(); + break; + + default: + break; + } + this.setData({ + type: options.type + }) + }, + + // 获取企业风采列表 + graces() { + wx.$api.companyModule.graces(this.data.company_id, this.data.page).then(res => { + console.log(res); + var lists = this.data.lists.concat(res.data) + if (res.page.has_more) { + this.setData({ + has_more: res.page.has_more, + page: page + 1, + lists: lists + }) + } else { + this.setData({ + has_more: res.page.has_more, + lists: lists + }) + } + }) + }, + // 获取企业宣传视频列表 + videos() { + wx.$api.companyModule.videos(this.data.company_id, this.data.page).then(res => { + console.log(res); + var lists = this.data.lists.concat(res.data) + if (res.page.has_more) { + this.setData({ + has_more: res.page.has_more, + page: page + 1, + lists: lists + }) + } else { + this.setData({ + has_more: res.page.has_more, + lists: lists + }) + } + }) + }, + // 获取企业员工页面 + users() { + wx.$api.companyModule.users(this.data.company_id, this.data.page).then(res => { + console.log(res); + var lists = this.data.lists.concat(res.data) + if (res.page.has_more) { + this.setData({ + has_more: res.page.has_more, + page: page + 1, + lists: lists + }) + } else { + this.setData({ + has_more: res.page.has_more, + lists: lists + }) + } + }) + }, + // 触底加载更多 + onReachBottom() { + console.log('触底') + if (this.data.has_more) { + if (this.data.type == 4) { + this.graces(); + } else if (this.data.type == 5) { + this.videos(); + } else if (this.data.type == 1 || this.data.type == 2) { + this.users(); + } + } else { + wx.showToast({ + icon: 'none', + title: '没有更多', + }) + } + + } + +}) \ No newline at end of file diff --git a/pages/home/companyMore/companyMore.json b/pages/home/companyMore/companyMore.json new file mode 100644 index 0000000..a455ad9 --- /dev/null +++ b/pages/home/companyMore/companyMore.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "videoInfo": "/components/company/videoInfo/videoInfo", + "fengcaiInfo": "/components/company/fengcaiInfo/fengcaiInfo" , + "personalInfo": "/components/company/personalInfo/personalInfo" + }, + "navigationBarTitleText": "企业视频", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/companyMore/companyMore.wxml b/pages/home/companyMore/companyMore.wxml new file mode 100644 index 0000000..998a867 --- /dev/null +++ b/pages/home/companyMore/companyMore.wxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + +{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}} \ No newline at end of file diff --git a/pages/home/companyMore/companyMore.wxss b/pages/home/companyMore/companyMore.wxss new file mode 100644 index 0000000..ba55ce6 --- /dev/null +++ b/pages/home/companyMore/companyMore.wxss @@ -0,0 +1,10 @@ +page { + padding-bottom: 30rpx; +} + +.has_more { + color: #999; + font-size: 26rpx; + text-align: center; + padding: 30rpx; +} \ No newline at end of file diff --git a/pages/home/index.js b/pages/home/index.js index 12c4d62..3b18f41 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -1,66 +1,81 @@ -// pages/home/index.js Page({ - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - + /** + * 页面的初始数据 + */ + data: { + selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3 + company_id: wx.getStorageSync('company_id'), //企业Id, + info: '', //企业信息 + }, + onLoad(e) { + console.log(e) + if(e.id){ + this.company(e.id) + wx.setStorageSync('company_id', e.id) + }else{ + this.company(this.company_id) } + }, + onShow() { + }, + onUnload: function () { + wx.removeStorageSync('company_id') + }, + /** + * 点击按钮触发事件 + */ + menuSelect: function (e) { + console.log(e.currentTarget.dataset.id); + if (this.data.selectMenuId != e.currentTarget.dataset.id) { + this.setData({ + selectMenuId: e.currentTarget.dataset.id + }) + if (e.currentTarget.dataset.id == 3) { + this.selectComponent('#categoryTypeList').crowdfundcategory(this.data.company_id); + } else if (e.currentTarget.dataset.id == 2) { + this.selectComponent('#activeList').actives(); + } else if (e.currentTarget.dataset.id == 4) { + this.selectComponent('#noticeList').actives(); + } + } + }, + /** + * 上拉触底事件 + */ + onReachBottom() { + if (this.data.selectMenuId == 3) { + console.log('项目筹集触底') + this.selectComponent('#categoryTypeList').crowdfunds(); + } + if (this.data.selectMenuId == 2) { + console.log('活动触底') + this.selectComponent('#activeList').actives(); + } + if (this.data.selectMenuId == 4) { + console.log('动态触底') + this.selectComponent('#noticeList').actives(); + } + }, + + /** + * 请求项目筹集分类接口 + */ + company() { + wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => { + console.log(res) + this.setData({ + info: res + }) + }) + }, + + /** + * 拨打电话 + */ + call() { + wx.makePhoneCall({ + phoneNumber: this.data.info.certification.phone, + }) + } }) \ No newline at end of file diff --git a/pages/home/index.json b/pages/home/index.json index 8835af0..0132341 100644 --- a/pages/home/index.json +++ b/pages/home/index.json @@ -1,3 +1,13 @@ { - "usingComponents": {} + "usingComponents": { + "enterprise": "/components/company/enterprise/enterprise", + "videoList": "/components/company/videoList/videoList", + "activeList": "/components/company/activeList/activeList", + "noticeList": "/components/company/noticeList/noticeList", + "projectRaise": "/components/company/projectRaise/projectRaise" + }, + "navigationBarTitleText": "企业主页", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" + } \ No newline at end of file diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 47aaec6..5972307 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -1,2 +1,64 @@ - -pages/home/index.wxml + + + + {{info.base.name}} + + + + + + + + 注册资本:{{info.base.registered_capital||'未完善' }}元 + + + + 成立时间:{{info.base.setup_at||'未完善' }} + + + + 企业法人:{{info.certification.name||'未完善' }} + + + + 拨打电话 + + + 进入商城 + + + 关注企业 + + + + + + + + 企业信息 + + 企业动态 + 企业活动 + 项目筹集 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/home/index.wxss b/pages/home/index.wxss index b5afb04..2c9ac96 100644 --- a/pages/home/index.wxss +++ b/pages/home/index.wxss @@ -1 +1,169 @@ -/* pages/home/index.wxss */ \ No newline at end of file +/* 顶部图片logo展示 start */ +page{ + padding-bottom: 30rpx; + background-color: #f8f8f8; +} +.company_info { + width: 100%; + height: 300rpx; + position: relative; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + padding: 0 100rpx; + +} + +.cop_bg { + width: 100% !important; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.cop_logo { + width: 160rpx !important; + height: 160rpx !important; + border-radius: 50%; + border: solid 8rpx #fff; + background-color: rgba(255, 252, 255, 1); + text-align: center; + display: block; + margin: auto; + position: absolute; + bottom: -84rpx; + left: 50%; + margin-left: -80rpx; + box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.2); +} + +.cop_title { + color: #f7f7f7; + font-size: 36rpx; + font-weight: 600; + padding-bottom: 30rpx; + text-align: center; + white-space: nowrap;/*强制一行显示*/ + overflow:hidden;/*超出部分隐藏*/ + text-overflow: ellipsis;/*最后添加省略号*/ +} + +/* 顶部图片logo展示 start */ + +/* 基本信息 start */ +.cop_info { + background-color: #fff; + padding: 90rpx 30rpx 20rpx 30rpx; +} + +.cop_info_item { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + padding: 10rpx 0; + font-size: 30rpx; + color: #333; + font-weight: 500; +} + +.cop_info_item image { + width: 36rpx; + margin-right: 20rpx; +} + +.cop_info_item .newTxt { + color: #666; + font-weight: 400; +} + +/* 基本信息 end */ + +/* 拨打电话 进入商城 start */ +.cop_call_shop{ + margin-top: 20rpx; + width: 100%; + height: 90rpx; + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + box-sizing: border-box; +} + +.cop_call{ + color: #fff; + font-size: 26rpx; + background-color: #378fff; + border-radius: 30rpx; + padding: 11rpx 30rpx; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.2); +} +.cop_call image{ + width: 26rpx; + margin-right: 10rpx; +} + +.cop_shop{ + background-color: #fd5b5b; +} + +.cop_focus{ + background-color: #efbd32; +} +.cop_shop image{ + width: 40rpx; +} +/* 拨打电话 进入商城 end */ + + +/* 滚动菜单 */ +.scroll_menu{ + background-color: #fff; + box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1); +} +.scroll-view_H{ + white-space: nowrap; + color: #666; +} +.scroll-view-item{ + height: 90rpx; + line-height: 90rpx; +} +.scroll-view-item_H{ + display: inline-block; + width: 25%; + height: 90rpx; + line-height: 90rpx; + text-align: center; + border-bottom: solid 4rpx #fff; +} +.scroll_view_select{ + border-bottom: solid 4rpx #378fff; + color: #378fff; + font-weight: 600; +} + +.flexrow { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; +} + +.flexcolumn { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + box-sizing: border-box; +} \ No newline at end of file diff --git a/pages/home/noticeDetail/noticeDetail.js b/pages/home/noticeDetail/noticeDetail.js new file mode 100644 index 0000000..be769d0 --- /dev/null +++ b/pages/home/noticeDetail/noticeDetail.js @@ -0,0 +1,37 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + + dynamic_id: '', //活动id + info: '', //详情信息 + loaded: false, + company_id: wx.getStorageSync('company_id'), + }, + onLoad(e) { + this.setData({ + dynamic_id: e.id + }) + this.dynamicsDetail(); + }, + /** + * 获取详情 + */ + dynamicsDetail() { + wx.$api.companyModule.dynamicsDetail(this.data.company_id, this.data.dynamic_id).then(res => { + if (res.content) { + var nodes = res.content.replace(' + + + + + + + {{info.title}} + {{info.created_at}} + + + + + 动态详情 + + + + \ No newline at end of file diff --git a/pages/home/noticeDetail/noticeDetail.wxss b/pages/home/noticeDetail/noticeDetail.wxss new file mode 100644 index 0000000..214793d --- /dev/null +++ b/pages/home/noticeDetail/noticeDetail.wxss @@ -0,0 +1,241 @@ +.active_content { + background-color: #fff; + box-sizing: border-box; + padding-bottom: 10rpx; +} + +.active_cover { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + padding-bottom: 0; +} + +.active_cover_bg { + width: 100%; + height: 100%; +} + +.active_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.active_title { + margin-top: 30rpx; + padding: 0 30rpx; + color: #333; + font-weight: 600; + font-size: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.active_des { + margin-top: 14rpx; + padding: 0 30rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_time { + margin-top: 14rpx; + /* padding: 0 10rpx; */ + color: #666; + font-size: 26rpx; + /* overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; */ +} + +.active_time image { + width: 30rpx; + position: relative; + bottom: -6rpx; + right: 0; + margin-left: 30rpx; + margin-right: 4rpx; +} + +.active_line { + margin: 20rpx 20rpx 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.active_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 40rpx; + font-weight: 600; + color: #333; + padding: 0 30rpx; + margin-top: 20rpx; +} + +.active_bottom span { + color: #999; + font-size: 24rpx; + padding-left: 10rpx; + font-weight: normal; +} + + +.active_detail { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; +} + +.active_detail_html { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; + padding-bottom: 150rpx; +} + +.active_detail_html img { + width: 100%; +} + +.active_nav { + color: #333; + font-weight: 600; + font-size: 32rpx; + padding-bottom: 30rpx; +} + +/* 立即报名 */ +.active_now_act { + margin-top: 20rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 34rpx; + font-weight: 600; + color: #333; + background-color: #fff; + padding: 20rpx 30rpx; + position: fixed; + bottom: 0; + width: 100%; + height: 120rpx; +} + +.active_now_act span { + margin-left: 60rpx; + flex: 1; + display: inline-block; + background-color: #378fff; + color: #fff; + font-size: 30rpx; + border-radius: 50rpx; + padding: 20rpx 100rpx; + text-align: center; + font-weight: 600; +} + +.acted span { + background-color: #999; +} + +.active_be_sure { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + z-index: 1; +} + +.active_be_sure .bg { + background-color: rgba(0, 0, 0, 0.6); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2; +} + +.active_be_sure .content { + width: 600rpx; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; +} + +.active_be_sure .content .active_cover { + width: 100%; + height: 360rpx; + border-radius: 20rpx 20rpx 0 0; +} + +.active_be_sure .content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + +.active_be_sure .content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + color: #999; +} + +.active_be_sure .content .txt3 { + font-size: 32rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left: 15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 30rpx; +} + +.active_be_sure .content .txt4 { + font-size: 26rpx; + color: #999; + padding: 20rpx 30rpx; +} + +img { + max-width: 100%; +} \ No newline at end of file diff --git a/pages/home/projectDetail/projectDetail.js b/pages/home/projectDetail/projectDetail.js new file mode 100644 index 0000000..359f88d --- /dev/null +++ b/pages/home/projectDetail/projectDetail.js @@ -0,0 +1,113 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + acted: false, //已经报名true + showBeSureActed: false, //显示确认弹窗 + indicatorDots: true, + vertical: false, + autoplay: false, + interval: 2000, + duration: 500, + classificationId: 0, //默认为0 + crowdfund_id: '', //项目筹集id + info: '', //详情 + banners: [], //轮播图 + }, + + onLoad(e) { + this.setData({ + crowdfund_id: e.id, + }) + this.getcrowdfundsDetail(); + }, + + // 获取项目详情 + getcrowdfundsDetail() { + wx.$api.companyModule.crowdfundsDetail(this.data.crowdfund_id).then(res => { + var k = []; + if (res.video_url) { + var parms = {}; + parms.type = 'video' + parms.url = res.video_url; + k.push(parms) + } + if (res.pictures.length > 0) { + for (var i = 0; i < res.pictures.length; i++) { + var parms = {}; + parms.type = 'image'; + parms.url = res.pictures[i] + k.push(parms) + } + } + this.setData({ + info: res, + banners: k + }) + }) + }, + + + /** + * 点击分类 + */ + classificationSelect(e) { + this.setData({ + height: wx.getSystemInfoSync().windowHeight, // 获取屏幕高度 + classificationId: e.target.dataset.id, + classificationIdNav: 'classificationIdNav' + e.target.dataset.id + }) + }, + + /** + * 跳转到项目回报列表 + */ + goDetail() { + var lists = JSON.stringify(this.data.info.items) + wx.navigateTo({ + url: '/pages/home/projectReturn/projectReturn?lists=' + lists+'&crowdfund_id='+this.data.crowdfund_id, + }) + }, + + //关注项目授权 + like: function () { + let that = this; + wx.requestSubscribeMessage({ + tmplIds: ['CRqftSsSrDrUIoSl-7pU9el5_-F-vSAskx15umgd8Ow'], + success: res => { + if (res['CRqftSsSrDrUIoSl-7pU9el5_-F-vSAskx15umgd8Ow'] === 'accept') { + this.islike(); + } + }, + fail(res) { + console.log(res) + } + }) + }, + + // 关注取消关注项目 + islike() { + if (!this.data.info.isLike) { + wx.$api.companyModule.crowdfundsLike(this.data.crowdfund_id).then(res => { + var info = this.data.info; + info.isLike = true; + info.likes = res.likes + this.setData({ + info: info + }) + }); + } else { + wx.$api.companyModule.crowdfundsUnLike(this.data.crowdfund_id).then(res => { + var info = this.data.info; + info.isLike = false; + info.likes = res.likes + this.setData({ + info: info + }) + }); + } + }, + +}) \ No newline at end of file diff --git a/pages/home/projectDetail/projectDetail.json b/pages/home/projectDetail/projectDetail.json new file mode 100644 index 0000000..05a6df2 --- /dev/null +++ b/pages/home/projectDetail/projectDetail.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "项目详情", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/projectDetail/projectDetail.wxml b/pages/home/projectDetail/projectDetail.wxml new file mode 100644 index 0000000..326476f --- /dev/null +++ b/pages/home/projectDetail/projectDetail.wxml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + {{info.title}} + {{info.city}} {{info.category}} + {{info.description}} + + + + {{info.all_total}} 已筹集(元) + + + {{info.all_users}} 筹集人数 + + + {{info.endDiffDays}}剩余时间 + + + + + + + 已结束 + 已成功 + 目标 ¥{{info.amount}} + 进度 {{info.ratio}}% + + + + 金额、人数仅代表支持意向,最后金额、人数以实际支付为准。 + + + 倒计时{{info.openDiffDays}} + + + + + 故事 + 项目 + 回报 + + + + + + + + + + 项目概况 + + 项目名称{{info.title}} + 项目情况 + + {{info.amount}} 项目目标 + {{info.diffDays}} 项目周期 + + + 项目位置{{info.province}} · {{info.city}} + + + + + 项目已结束。若您支持过项目,可在[项目预购]中查看 + 项目已成功。若您支持过项目,可在[项目预购]中查看 + + + + 项目回报 + + {{item.title}} ¥{{item.price}} + 快速发货 + {{item.remark}} + + + + + {{info.all_users}}人支持/{{item.quantity}} 查看详情 + + + + + + + + + + + 关注{{info.likes>0?info.likes:''}} + + + {{info.likes || 0}}人已关注 + + 我要支持 + + 我要支持 + + \ No newline at end of file diff --git a/pages/home/projectDetail/projectDetail.wxss b/pages/home/projectDetail/projectDetail.wxss new file mode 100644 index 0000000..d22cd1a --- /dev/null +++ b/pages/home/projectDetail/projectDetail.wxss @@ -0,0 +1,479 @@ +.project_content { + background-color: #fff; + box-sizing: border-box; + padding-bottom: 10rpx; +} + +.project_cover { + width: 100%; + height: 400rpx; + position: relative; + overflow: hidden; + padding-bottom: 0; +} + +.project_video { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.project_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.project_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.project_title { + margin-top: 30rpx; + padding: 0 30rpx; + color: #333; + font-weight: 600; + font-size: 32rpx; + /* overflow: hidden; */ + /* text-overflow: ellipsis; */ + /* display: -webkit-box; */ + /* -webkit-box-orient: vertical; */ + /* -webkit-line-clamp: 1; */ +} + +.project_des { + margin-top: 20rpx; + padding: 0 30rpx; + color: #333; + font-size: 26rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.project_time { + margin-top: 20rpx; + padding: 0 10rpx; + color: #666; + font-size: 26rpx; + /* overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; */ +} + +.project_time image { + width: 30rpx; + position: relative; + bottom: -6rpx; + right: 0; + margin-left: 30rpx; + margin-right: 4rpx; +} + +.project_line { + margin: 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.project_type { + font-size: 24rpx; + color: #333; + padding: 0 30rpx; + font-weight: normal; +} + +.project_type span { + display: inline-block; + padding: 4rpx 26rpx; + border-radius: 30rpx; + background-color: #f7f7f7; + margin-right: 10rpx; + margin-top: 20rpx; +} + + +.project_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 36rpx; + font-weight: 600; + color: #333; + padding: 20rpx; +} + + + +.project_bottom span { + color: #999; + font-size: 24rpx; + font-weight: normal; +} + +.project_bottom .color333 { + color: #666; +} + +.project_bottom_num { + font-size: 34rpx; + font-weight: 600; + color: #333; +} + +.project_warn { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + box-sizing: border-box; + font-size: 22rpx; + color: #999; + padding: 20rpx; +} + +.project_warn icon { + margin-right: 10rpx; +} + +/* 项目分类 */ +.project_classification { + width: 100%; + height: 90rpx; + line-height: 90rpx; + background-color: #fff; + margin-top: 2rpx; + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + border-bottom: solid 1rpx #f7f7f7; + box-sizing: border-box; +} + +.project_classification .item { + font-weight: 600; + font-size: 28rpx; + color: #333; + height: 80rpx; + padding: 0 10rpx; + border-bottom: solid 4rpx #fff; +} + +.project_classification .select_item { + border-bottom: solid 4rpx #378fff; + color: #378fff; +} + +.project_detail_html { + padding: 20rpx; + background-color: #fff; + padding-top: 30rpx; +} + +.project_nav { + color: #333; + font-weight: 600; + font-size: 32rpx; + padding-bottom: 12rpx; +} + +/* 立即报名 */ +.project_now_act { + margin-top: 20rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 40rpx; + font-weight: 600; + color: #333; + background-color: #fff; + padding: 20rpx 30rpx; + position: fixed; + bottom: 0; + width: 100%; + height: 120rpx; +} + +swiper { + width: 100%; + height: 100%; +} + +.project_now_act span , .project_now_act button { + margin-left: 60rpx; + flex: 1; + display: inline-block; + background-color: #378fff; + color: #fff; + font-size: 30rpx !important; + border-radius: 10rpx !important; + padding: 20rpx 100rpx ; + text-align: center; + font-weight: 600; +} +.project_now_act button { + padding: 10rpx 0 !important; +} + +.project_now_act .nolike { + background-color: #cacaca; + color: #fff; +} + +.project_now_act .left .collect { + width: 50rpx; +} + +.project_now_act .left { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + box-sizing: border-box; + font-size: 24rpx; + color: #999; + font-weight: normal; +} + +.acted span { + background-color: #999; +} + +.project_be_sure { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + z-index: 1; +} + +.project_be_sure .bg { + background-color: rgba(0, 0, 0, 0.6); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2; +} + +.project_be_sure .content { + width: 600rpx; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; +} + +.project_be_sure .content .project_cover { + width: 100%; + height: 360rpx; + border-radius: 20rpx 20rpx 0 0; +} + +.project_be_sure .content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + +.project_be_sure .content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + color: #999; +} + +.project_be_sure .content .txt3 { + font-size: 32rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left: 15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 30rpx; +} + +.project_be_sure .content .txt4 { + font-size: 26rpx; + color: #999; + padding: 20rpx 30rpx; +} + +/* 项目概况 */ +.project_overview>view { + padding: 40rpx 0; + color: #666; + font-size: 28rpx; + border-bottom: solid 1rpx #f7f7f7; + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + box-sizing: border-box; +} + +.project_overview>view>.time { + margin-left: 30rpx; + color: #666; + font-size: 24rpx; + display: flex; + flex-direction: row; + align-items: center; + justify-content: start; + box-sizing: border-box; +} + +.project_overview>view>.time .num { + font-size: 36rpx; + color: #333; + font-weight: 600; +} + +.project_overview>view>.time>view { + display: flex; + flex-direction: column; + justify-content: start; + align-items: flex-start; + box-sizing: border-box; + margin-right: 40rpx; +} + +.project_overview .right { + color: #333; + font-weight: 600; + margin-left: 30rpx; +} + +/* 项目回报列表 */ +.project_list { + width: 100%; + background-color: #ffffff; + border-radius: 10rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); + padding: 30rpx 20rpx 20rpx 20rpx; + margin-top: 30rpx; + box-sizing: border-box; +} + +.project_list .title { + font-size: 34rpx; + font-weight: bold; + color: #333; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; +} + +.project_list .fast { + font-size: 26rpx; + color: #999; + border: solid 1rpx #999; + display: inline-block; + padding: 2rpx 12rpx; + border-radius: 6rpx; + margin-top: 13rpx; +} + +.project_list .des { + font-size: 28rpx; + color: #333; + padding-top: 20rpx; +} + +.project_list .imglist { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + box-sizing: border-box; + padding: 20rpx 0 30rpx 0; + flex-wrap: wrap; + border-bottom: solid 2rpx #f7f7f7; +} + +.project_list .imglist image { + width: 180rpx; + height: 180rpx; + margin-top: 10rpx; + margin-right: 10rpx; +} + +.project_list .seeAll { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding-top: 20rpx; + font-size: 26rpx; + color: #999; +} + +.project_list .seeAll span { + background-color: #378fff; + color: #fff; + padding: 8rpx 20rpx; + font-size: 24rpx; + border-radius: 6rpx; +} + + +/* 项目已结束 */ +.end { + text-align: center; + font-size: 24rpx; + color: #000; + font-weight: normal; + background-color: #cacaca; + padding: 10rpx 30rpx; +} + +/* 倒计时 */ +.project_diffDays { + padding: 16rpx 40rpx; + border-radius: 50rpx; + background-color: #378fff; + color: #fff; + margin:30rpx 20rpx; + font-size: 26rpx; + text-align: center; + width: 50%; +} \ No newline at end of file diff --git a/pages/home/projectReturn/projectReturn.js b/pages/home/projectReturn/projectReturn.js new file mode 100644 index 0000000..9782ed0 --- /dev/null +++ b/pages/home/projectReturn/projectReturn.js @@ -0,0 +1,28 @@ + + +Page({ + data: { + lists: [], //列表 + crowdfund_id:'' + }, + /** + * 页面的初始数据 + */ + onLoad(e) { + this.setData({ + lists: JSON.parse(e.lists), + crowdfund_id:e.crowdfund_id + }) + }, + /** + * 跳转到确认订单 + */ + beSure(e) { + console.log('besure'); + wx.navigateTo({ + url: '../beSureOrder/beSureOrder?crowdfund_item_id='+e.currentTarget.dataset.id+'&crowdfund_id='+this.data.crowdfund_id, + }) + }, + + +}) \ No newline at end of file diff --git a/pages/home/projectReturn/projectReturn.json b/pages/home/projectReturn/projectReturn.json new file mode 100644 index 0000000..7437db8 --- /dev/null +++ b/pages/home/projectReturn/projectReturn.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "项目回报", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/projectReturn/projectReturn.wxml b/pages/home/projectReturn/projectReturn.wxml new file mode 100644 index 0000000..b6ec8e2 --- /dev/null +++ b/pages/home/projectReturn/projectReturn.wxml @@ -0,0 +1,40 @@ + + + + + {{item.title}} ¥{{item.price}} + 快速发货 + + 回报内容 + + {{item.remark}} + + + + + + + 回报时间 + + {{item.time}} + + + + 配送说明 + + {{item.shipping}} + + + + {{item.all_users}}人已支持/{{item.quantity}} 立即支持 + + + + 没有更多~ + + + + 暂无数据 + + \ No newline at end of file diff --git a/pages/home/projectReturn/projectReturn.wxss b/pages/home/projectReturn/projectReturn.wxss new file mode 100644 index 0000000..f1091f2 --- /dev/null +++ b/pages/home/projectReturn/projectReturn.wxss @@ -0,0 +1,120 @@ + +.project_detail_html { + padding: 20rpx; + background-color: #fff; + padding-top: 30rpx; +} + +/* 项目回报列表 */ +.project_list { + width: 100%; + background-color: #ffffff; + border-radius: 10rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); + padding: 30rpx 20rpx 20rpx 20rpx; + margin-bottom: 30rpx; + box-sizing: border-box; +} + +.project_list .title { + font-size: 34rpx; + font-weight: bold; + color: #333; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; +} + +.project_list .fast { + font-size: 26rpx; + color: #999; + border: solid 1rpx #999; + display: inline-block; + padding: 2rpx 12rpx; + border-radius: 6rpx; + margin-top: 13rpx; +} + +.project_list .des { + font-size: 28rpx; + color: #333; +} + +.project_list .imglist { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + box-sizing: border-box; + flex-wrap: wrap; +} + +.project_list .imglist image { + width: 150rpx; + height: 150rpx; + margin-top: 10rpx; + margin-right: 10rpx; +} + +.project_list .seeAll { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding-top: 20rpx; + font-size: 26rpx; + color: #999; +} + +.project_list .seeAll span { + background-color: #378fff; + color: #fff; + padding: 10rpx 30rpx; + font-size: 24rpx; + border-radius: 10rpx; +} + +.scroll { + box-sizing: border-box; +} + +.project_item{ + display: flex; + flex-direction: row; + justify-content: start; + align-items: flex-start; + box-sizing: border-box; + padding: 20rpx 0; + border-bottom: solid 2rpx #f7f7f7; +} + +.item_title{ + color: #999; + font-weight: normal; + font-size: 28rpx; + margin-right: 20rpx; +} + +.item_content{ + flex: 1; +} + +/* 没有列表 */ +.no_list{ + color: #999; + text-align: center; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + box-sizing: border-box; + padding-top: 100rpx; + font-size: 26rpx; +} +.no_list image{ + width: 200rpx; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/pages/home/projectSuccess/projectSuccess.js b/pages/home/projectSuccess/projectSuccess.js new file mode 100644 index 0000000..ccaa772 --- /dev/null +++ b/pages/home/projectSuccess/projectSuccess.js @@ -0,0 +1,35 @@ + +Page({ + + /** + * 页面的初始数据 + */ + data: { + info:{},//产品基本信息 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.$api.companyModule.crowdfundsDetail(options.crowdfund_id).then(res => { + this.setData({ + info: res, + }) + }).catch(res => { + wx.navigateBack({}) + }) + }, + + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + return { + title: '您的好友邀请你一起', + path: '/pages/companyModule/projectDetail/projectDetail?id=6', + imageUrl: this.data.info.pictures[0] + } + } +}) \ No newline at end of file diff --git a/pages/home/projectSuccess/projectSuccess.json b/pages/home/projectSuccess/projectSuccess.json new file mode 100644 index 0000000..a0542c0 --- /dev/null +++ b/pages/home/projectSuccess/projectSuccess.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "提交成功", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/home/projectSuccess/projectSuccess.wxml b/pages/home/projectSuccess/projectSuccess.wxml new file mode 100644 index 0000000..ebd8ac3 --- /dev/null +++ b/pages/home/projectSuccess/projectSuccess.wxml @@ -0,0 +1,13 @@ + + + 支付成功 + 查看订单 + + \ No newline at end of file diff --git a/pages/home/projectSuccess/projectSuccess.wxss b/pages/home/projectSuccess/projectSuccess.wxss new file mode 100644 index 0000000..6d1e741 --- /dev/null +++ b/pages/home/projectSuccess/projectSuccess.wxss @@ -0,0 +1,110 @@ +page { + height: 100%; +} + +.content { + padding-top: 160rpx; + width: 100%; + height: 100%; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; + box-sizing: border-box; +} + +.content .active_cover { + width: 150rpx; + height: 150rpx; + border-radius: 50%; +} + +.content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + +.content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + color: #999; +} + +.content .txt3 { + font-size: 28rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left: 15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 80rpx; +} + +.content .txt4 { + font-size: 26rpx; + color: #999; + padding: 20rpx 30rpx; +} + +/* 分享 */ +.share_content { + width: 86%; + height: 400rpx; + position: relative; + margin-left: 7%; + margin-top: 40rpx; + border-radius: 2rpx; + overflow: hidden; + background: rgba(0, 0, 0, 0.3); +} + +.share_bg { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.share_content .title{ + margin-top: 100rpx; + text-align: left; + color: #fff; + font-size: 34rpx; + padding: 0 30rpx; +} +.share_content .des{ + color: #fff; + text-align: left; + font-size: 24rpx; + margin-top: 10rpx; + padding: 0 30rpx; +} + +.share_content .bottom{ + position: absolute; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, 1); + color: #Fff; + width: 100%; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + font-size: 28rpx; + padding: 20rpx 0; +} +.share_content .icon_share{ + width: 30rpx; + margin-right: 10rpx; +} \ No newline at end of file diff --git a/pages/shortVideo/index.js b/pages/shortVideo/index.js index bf306c8..36e2cae 100644 --- a/pages/shortVideo/index.js +++ b/pages/shortVideo/index.js @@ -1,4 +1,3 @@ - /** * Web唐明明 * 匆匆数载恍如梦,岁月迢迢华发增。 @@ -11,21 +10,21 @@ Page({ * 页面的初始数据 */ data: { - videoList : [], //获取短视频列表 - videoIndex : 0, //当前播放视频的下标 - videoId : "", //当前播放的视频id - playState : true, //视频播放状态 + videoList: [], //获取短视频列表 + videoIndex: 0, //当前播放视频的下标 + videoId: "", //当前播放的视频id + playState: true, //视频播放状态 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - wx.$api.video.videos().then(res=>{ + wx.$api.video.videos().then(res => { console.log(res) this.setData({ videoList: res, - videoId : res[0].video_id + videoId: res[0].video_id }) }) }, @@ -33,15 +32,15 @@ Page({ /*** * 视频的播放状态 */ - videoPlay(e){ - if(e.detail.playType == "play" && this.data.playState == false){ + videoPlay(e) { + if (e.detail.playType == "play" && this.data.playState == false) { this.setData({ - playState : true, - videoId : e.detail.videoId + playState: true, + videoId: e.detail.videoId }) - }else if(e.detail.playType == "pause" && this.data.playState == true){ + } else if (e.detail.playType == "pause" && this.data.playState == true) { this.setData({ - playState : false + playState: false }) } }, @@ -49,7 +48,7 @@ Page({ /** * 获取视频下标 */ - swiperIndex(e){ + swiperIndex(e) { console.log(e.detail.current) @@ -61,17 +60,25 @@ Page({ /** * 点赞视频 */ - binLike(){ + binLike() { let hasLogin = wx.getStorageSync("token") - if(hasLogin == ""){ + if (hasLogin == "") { wx.navigateTo({ url: "/pages/login/login" }) - }else{ + } else { wx.showToast({ title: "点赞成功" }) } + }, + /** + * 跳转到企业主页 + */ + goCompany(e) { + wx.navigateTo({ + url: '/pages/home/index?id=' + e.currentTarget.dataset.id, + }) } -}) +}) \ No newline at end of file diff --git a/pages/shortVideo/index.wxml b/pages/shortVideo/index.wxml index 0f86a2e..300e482 100644 --- a/pages/shortVideo/index.wxml +++ b/pages/shortVideo/index.wxml @@ -18,7 +18,7 @@ - + diff --git a/project.config.json b/project.config.json index bb20788..76d8e42 100644 --- a/project.config.json +++ b/project.config.json @@ -1,78 +1,77 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [] + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "enhance": false, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": true, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "useMultiFrameRuntime": false, + "useApiHook": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": true, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "useMultiFrameRuntime": false, - "useApiHook": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "enableEngineNative": false, - "bundle": false, - "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true + "enableEngineNative": false, + "bundle": false, + "useIsolateContext": true, + "useCompilerModule": true, + "userConfirmedUseCompilerModuleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true + }, + "compileType": "miniprogram", + "libVersion": "2.14.0", + "appid": "wxd931d03dfe955254", + "projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "plugin": { + "list": [] }, - "compileType": "miniprogram", - "libVersion": "2.14.0", - "appid": "wxd931d03dfe955254", - "projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F", - "debugOptions": { - "hidedInDevtools": [] + "game": { + "list": [] }, - "scripts": {}, - "isGameTourist": false, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": { - "plugin": { - "list": [] + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "登录", + "pathName": "pages/login/login", + "query": "", + "scene": null }, - "game": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [ - { - "name": "登录", - "pathName": "pages/login/login", - "query": "", - "scene": null - }, - { - "name": "搜索", - "pathName": "pages/company/search/search", - "scene": null - } - ] + { + "name": "搜索", + "pathName": "pages/company/search/search", + "scene": null } + ] } + } } \ No newline at end of file diff --git a/static/images/collect.png b/static/images/collect.png new file mode 100644 index 0000000..5993171 Binary files /dev/null and b/static/images/collect.png differ diff --git a/static/images/com_call.png b/static/images/com_call.png new file mode 100644 index 0000000..6e90b9e Binary files /dev/null and b/static/images/com_call.png differ diff --git a/static/images/com_date.png b/static/images/com_date.png new file mode 100644 index 0000000..b41f3ca Binary files /dev/null and b/static/images/com_date.png differ diff --git a/static/images/com_person.png b/static/images/com_person.png new file mode 100644 index 0000000..9d995f8 Binary files /dev/null and b/static/images/com_person.png differ diff --git a/static/images/com_shop.png b/static/images/com_shop.png new file mode 100644 index 0000000..951e275 Binary files /dev/null and b/static/images/com_shop.png differ diff --git a/static/images/com_tu.png b/static/images/com_tu.png new file mode 100644 index 0000000..b1eebfa Binary files /dev/null and b/static/images/com_tu.png differ diff --git a/static/images/company_bg4.png b/static/images/company_bg4.png new file mode 100644 index 0000000..9c79a00 Binary files /dev/null and b/static/images/company_bg4.png differ diff --git a/static/images/enterprise_1 .png b/static/images/enterprise_1 .png new file mode 100644 index 0000000..76f31ff Binary files /dev/null and b/static/images/enterprise_1 .png differ diff --git a/static/images/enterprise_2.png b/static/images/enterprise_2.png new file mode 100644 index 0000000..3d58da9 Binary files /dev/null and b/static/images/enterprise_2.png differ diff --git a/static/images/enterprise_3.png b/static/images/enterprise_3.png new file mode 100644 index 0000000..b56ba3a Binary files /dev/null and b/static/images/enterprise_3.png differ diff --git a/static/images/enterprise_4.png b/static/images/enterprise_4.png new file mode 100644 index 0000000..f239871 Binary files /dev/null and b/static/images/enterprise_4.png differ diff --git a/static/images/enterprise_5.png b/static/images/enterprise_5.png new file mode 100644 index 0000000..aaa9e04 Binary files /dev/null and b/static/images/enterprise_5.png differ diff --git a/static/images/enterprise_6.png b/static/images/enterprise_6.png new file mode 100644 index 0000000..f8f0a94 Binary files /dev/null and b/static/images/enterprise_6.png differ diff --git a/static/images/eye.png b/static/images/eye.png new file mode 100644 index 0000000..8a2d98b Binary files /dev/null and b/static/images/eye.png differ diff --git a/static/images/icon_down.png b/static/images/icon_down.png new file mode 100644 index 0000000..b8bbe8b Binary files /dev/null and b/static/images/icon_down.png differ diff --git a/static/images/icon_right.png b/static/images/icon_right.png new file mode 100644 index 0000000..cad86c6 Binary files /dev/null and b/static/images/icon_right.png differ diff --git a/static/images/icon_up.png b/static/images/icon_up.png new file mode 100644 index 0000000..eb542e1 Binary files /dev/null and b/static/images/icon_up.png differ diff --git a/static/images/iconshare.png b/static/images/iconshare.png new file mode 100644 index 0000000..3862da3 Binary files /dev/null and b/static/images/iconshare.png differ diff --git a/static/images/location.png b/static/images/location.png new file mode 100644 index 0000000..8b58b43 Binary files /dev/null and b/static/images/location.png differ diff --git a/static/images/no_list.png b/static/images/no_list.png new file mode 100644 index 0000000..4df64ea Binary files /dev/null and b/static/images/no_list.png differ diff --git a/static/images/paysuccess.png b/static/images/paysuccess.png new file mode 100644 index 0000000..458d429 Binary files /dev/null and b/static/images/paysuccess.png differ diff --git a/static/images/unCollect.png b/static/images/unCollect.png new file mode 100644 index 0000000..9557a99 Binary files /dev/null and b/static/images/unCollect.png differ