[新增]企业主页,企业活动

This commit is contained in:
zdx
2020-12-28 10:38:29 +08:00
parent d3fa1d743c
commit 3a559141d1
106 changed files with 4587 additions and 164 deletions

View File

@@ -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('<img', '<img style="max-width:100%;height:auto""');
console.log(nodes);
this.setData({
info: res,
content: nodes,
loaded: true,
})
})
},
/**
* 立即签到接口
*/
signIn(e){
this.setData({
showBeSigned:true,
active_id:e.currentTarget.dataset.id
})
},
signed(e) {
wx.$api.companyModule.signed(this.data.active_id).then(res => {
console.log(res);
var info=this.data.info;
info.signed=2;
this.setData({
info:info
})
this.close();
})
}
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "活动详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,78 @@
<block wx:if='{{loaded}}'>
<view class="active_content">
<!-- 轮播图 -->
<view class="active_cover">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{true}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{info.pictures}}" wx:key="*this">
<swiper-item>
<view class="swiper-item {{item}}">
<image class="active_cover_bg" src="{{item}}" mode="aspectFill"></image>
</view>
</swiper-item>
</block>
</swiper>
</view>
<!-- 文字介绍 -->
<view class="active_title">{{info.title}}</view>
<view class="active_des">{{info.description}}</view>
<view class="active_line"></view>
<view class="active_bottom">
<view class="left">{{info.price > 0? '¥' + info.price:'免费'}} </view>
<span>报名上限:{{info.limits}}人</span>
</view>
</view>
<!-- 地址报名信息 -->
<view class="active_detail">
<view class="active_time">截止时间:<span>{{info.deadlined_at}}</span></view>
<view class="active_time">活动时间:<span>{{info.started_at}}至{{info.ended_at}}</span></view>
<view class="active_time">活动地点:<span>{{info.address}}
<!-- <image mode="widthFix"
src="/static/images/location.png"></image>3.2KM -->
</span>
</view>
<view class="active_time">联系人电话:<span>{{info.contact}}</span></view>
</view>
<!-- 活动详情 -->
<view class="active_detail_html">
<view class="active_nav">活动详情</view>
<rich-text nodes="{{content}}" style="width:100%;"></rich-text>
</view>
<!-- 底部按钮 -->
<view wx:if='{{info.signed==0}}' class="active_now_act {{!info.canEnroll?'acted':''}}"
catchtap="{{info.canEnroll?'nowActed':''}}" data-acted='{{acted}}'>
<view class="left">{{info.price> 0 ? '¥' + info.price:'免费'}} </view>
<span>{{!info.canEnroll?'无法报名':'立即报名'}}</span>
</view>
<view wx:if='{{info.signed==1 || info.signed==2}}' class="active_now_act {{info.signed==2?'acted':''}}"
catchtap="{{info.signed==1?'signIn':''}}" data-id='{{info.active_id}}'>
<view class="left">{{info.price> 0 ? '¥' + info.price:'免费'}} </view>
<span>{{info.signed==1?'立刻签到':'签到已完成'}}</span>
</view>
</block>
<!-- 确认弹窗 -->
<view class="active_be_sure" wx:if='{{showBeSureActed}}'>
<view class="bg" catchtap="close"></view>
<view class="content">
<image class="active_cover" src="{{info.pictures[0]?info.pictures[0]:'/static/images/company_bg4.png'}}"
mode="aspectFill"></image>
<view class="txt1">是否对该活动进行报名</view>
<view class="txt2">活动名称:{{info.title}}</view>
<view class="txt3" catchtap="beSure">确认报名</view>
<view class="txt4" catchtap="close">我再想想</view>
</view>
</view>
<!-- 确认签到 -->
<view class="active_be_sure" wx:if='{{showBeSigned}}'>
<view class="bg" catchtap="close"></view>
<view class="content">
<image class="active_cover" src="{{info.pictures[0]?info.pictures[0]:'/static/images/company_bg4.png'}}"
mode="aspectFill"></image>
<view class="txt1">是否确认现在就签到</view>
<view class="txt2">活动名称:{{info.title}}</view>
<view class="txt3" catchtap="signed">确认签到</view>
<view class="txt4" catchtap="close">我再想想</view>
</view>
</view>

View File

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

View File

@@ -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 () {
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {},
"navigationBarTitleText": "报名成功",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,6 @@
<view class="content">
<image class="active_cover" src="{{cover?cover:'/static/images/company_bg4.png'}}" mode="aspectFill"></image>
<view class="txt1">恭喜您,报名成功</view>
<view class="txt2">您可以进入“个人中心-活动参与”查看详情</view>
<view class="txt3" catchtap="beSure">查看活动</view>
</view>

View File

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

View File

@@ -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({})
})
}
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "确认订单",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,46 @@
<!-- 地址信息 -->
<view class="besure_address">
<view style="flex:1;">
<view class="userinfo">张冬雪 14745798066 <span class="type"> 学校 </span> <span class="moren"> 默认 </span></view>
<view class="des">黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼</view>
</view>
<image class="icon_right" src="/static/images/icon_right.png" mode="widthFix" style="width:12rpx;"></image>
</view>
<!-- 商品信息 -->
<view class="besure_goods">
<image class="besure_goods_img" src="{{info.pictures[0]}}" />
<view class="besure_goods_right">
<view class="title">项目名称:{{info.title}}。</view>
<view class="price"> <span>¥{{info.price}}</span>x1</view>
</view>
</view>
<!-- 物流备注 -->
<view class="besure_bottom mt20">
<view class="left">配送方式</view>
<span>{{info.shipping}}</span>
</view>
<view class="besure_bottom">
<view class="left">订单备注</view>
<input type="text" bindinput="input" placeholder="输入备注" />
</view>
<!-- 商家价格 -->
<view class="besure_bottom mt20">
<view class="left">商品总价</view>
<span>¥{{info.price}}</span>
</view>
<view class="besure_bottom">
<view class="left">应付总价</view>
<span style='font-weight:bold;'>¥{{info.price}}</span>
</view>
<view class="besure_notice">温馨提示下单后未发货可自主申请退款项目成功后7日内由企业安排发货。</view>
<!-- 底部按钮 -->
<view class="besure_now_act {{acted?'acted':''}}" catchtap="nowActed" data-acted='{{acted}}'>
<view class="left"><span>合计:</span>¥{{info.price}}</view>
<span>{{acted?'已提交订单':'提交订单'}}</span>
</view>

View File

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

View File

@@ -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 () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,2 @@
<!--pages/home/companyInfo/companyInfo.wxml-->
<text>pages/home/companyInfo/companyInfo.wxml</text>

View File

@@ -0,0 +1 @@
/* pages/home/companyInfo/companyInfo.wxss */

View File

@@ -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: '没有更多',
})
}
}
})

View File

@@ -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"
}

View File

@@ -0,0 +1,17 @@
<!-- 企业管理层 企业员工层 -->
<view wx:if='{{type==1 || type==2}}'>
<personalInfo wx:for='{{lists}}' info='{{item}}'></personalInfo>
</view>
<!-- 企业风采 -->
<view wx:if='{{type==4}}'>
<fengcaiInfo wx:for='{{lists}}' info='{{item}}'></fengcaiInfo>
</view>
<!-- 企业视频 -->
<view wx:if='{{type==5}}'>
<videoInfo wx:for='{{lists}}' info='{{item}}'></videoInfo>
</view>
<view class="has_more">{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}</view>

View File

@@ -0,0 +1,10 @@
page {
padding-bottom: 30rpx;
}
.has_more {
color: #999;
font-size: 26rpx;
text-align: center;
padding: 30rpx;
}

View File

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

View File

@@ -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"
}

View File

@@ -1,2 +1,64 @@
<!--pages/home/index.wxml-->
<text>pages/home/index.wxml</text>
<!-- 公司logo及基本信息 -->
<view class="company_info">
<image class="cop_bg" mode="widthFix" src="/static/images/company_bg4.png" alt="" />
<view class="cop_title">{{info.base.name}}</view>
<image class="cop_logo" mode="widthFix" src="{{info.base.cover || '/static/images/company_bg4.png'}}" alt="" />
</view>
<!-- 基本信息 -->
<view class="cop_info">
<view class="cop_info_item">
<image src="/static/images/com_tu.png" mode="widthFix"></image>
<span>注册资本:<span class="newTxt">{{info.base.registered_capital||'未完善' }}元</span></span>
</view>
<view class="cop_info_item">
<image src="/static/images/com_date.png" mode="widthFix"></image>
<span>成立时间:<span class="newTxt">{{info.base.setup_at||'未完善' }}</span></span>
</view>
<view class="cop_info_item">
<image src="/static/images/com_person.png" mode="widthFix"></image>
<span>企业法人:<span class="newTxt">{{info.certification.name||'未完善' }}</span></span>
</view>
<view class="cop_call_shop">
<view class="cop_call" catchtap="call">
<image src="/static/images/com_call.png" mode="widthFix" ></image>拨打电话
</view>
<view class=" cop_call cop_shop">
<image src="/static/images/com_shop.png" mode="widthFix"></image>进入商城
</view>
<view class=" cop_call cop_focus">
<image src="/static/images/eye.png" mode="widthFix"></image>关注企业
</view>
</view>
</view>
<!-- 滚动菜单 -->
<view class="scroll_menu">
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
<view id="menu1" catchtap="menuSelect" data-id='0' class="scroll-view-item_H {{selectMenuId==0?'scroll_view_select':''}}">企业信息</view>
<!-- <view id="menu2" catchtap="menuSelect" data-id='1' class="scroll-view-item_H {{selectMenuId==1?'scroll_view_select':''}}">视频 28</view> -->
<view id="menu4" catchtap="menuSelect" data-id='4' class="scroll-view-item_H {{selectMenuId==4?'scroll_view_select':''}}">企业动态</view>
<view id="menu3" catchtap="menuSelect" data-id='2' class="scroll-view-item_H {{selectMenuId==2?'scroll_view_select':''}}">企业活动</view>
<view id="menu4" catchtap="menuSelect" data-id='3' class="scroll-view-item_H {{selectMenuId==3?'scroll_view_select':''}}">项目筹集</view>
</scroll-view>
</view>
<!-- 企业信息展示 -->
<view wx:if='{{selectMenuId==0}}'>
<enterprise info='{{info}}'></enterprise>
</view>
<!-- 视频列表展示 -->
<view wx:if='{{selectMenuId==1}}'>
<videoList></videoList>
</view>
<view wx:if='{{selectMenuId==4}}'>
<noticeList id='noticeList'></noticeList>
</view>
<!-- 活动列表展示 -->
<view wx:if='{{selectMenuId==2}}'>
<activeList id='activeList'></activeList>
</view>
<!-- 项目筹集展示 -->
<view wx:if='{{selectMenuId==3}}'>
<projectRaise id='categoryTypeList'></projectRaise>
</view>

View File

@@ -1 +1,169 @@
/* pages/home/index.wxss */
/* 顶部图片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;
}

View File

@@ -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('<img', '<img style="max-width:100%;height:auto""');
}
this.setData({
info: res,
content: nodes,
loaded: true,
})
})
},
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "动态详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<block wx:if='{{loaded}}'>
<view class="active_content">
<!-- 轮播图 -->
<view class="active_cover">
<image class="active_cover_bg" src="{{info.cover}}" mode="widthFix"></image>
</view>
<!-- 文字介绍 -->
<view class="active_title">{{info.title}}</view>
<view class="active_des">{{info.created_at}}</view>
</view>
<!-- 活动详情 -->
<view class="active_detail_html">
<view class="active_nav">动态详情</view>
<rich-text nodes="{{content}}" style="width:100%;"></rich-text>
</view>
</block>

View File

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

View File

@@ -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
})
});
}
},
})

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "项目详情",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,118 @@
<scroll-view scroll-y="true" style="height: {{height+'px'}};padding-bottom:140rpx;"
scroll-into-view="{{ classificationIdNav }}" scroll-with-animation="true">
<!-- 轮播图 -->
<view class="project_content" wx:if='{{banners.length > 0}}'>
<view class="project_cover">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{false}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{banners}}" wx:key="*this">
<swiper-item>
<view class="swiper-item {{item}}">
<video wx:if='{{item.type=="video"}}' id="myVideo" class="project_video" src="{{item.url}}"
binderror="videoErrorCallback" show-center-play-btn='{{false}}' show-play-btn="{{true}}" controls
picture-in-picture-mode="{{['push', 'pop']}}" bindenterpictureinpicture='bindVideoEnterPictureInPicture'
bindleavepictureinpicture='bindVideoLeavePictureInPicture'></video>
<image wx:else class="project_cover_bg" src="/static/images/company_bg4.png" mode="aspectFill"></image>
</view>
</swiper-item>
</block>
</swiper>
</view>
<!-- 文字介绍 -->
<view class="project_title">{{info.title}}</view>
<view class="project_type"><span>{{info.city}}</span> <span>{{info.category}}</span></view>
<view class="project_des">{{info.description}}</view>
<block wx:if='{{info.status!=2}}'>
<view class="project_bottom" >
<span style="text-align:center;">
<view class='project_bottom_num'>{{info.all_total}}</view> <span>已筹集(元)</span>
</span>
<span style="text-align:center;">
<view class='project_bottom_num'>{{info.all_users}}</view> <span>筹集人数</span>
</span>
<span style="text-align:center;" wx:if="{{info.status!=4 && info.status!=3}}">
<view class='project_bottom_num'>{{info.endDiffDays}}<span>天</span></view><span>剩余时间</span>
</span>
</view>
<view class="project_line">
<progress percent="{{info.ratio}}" color="#378fff" active stroke-width="6" />
</view>
<view class="project_bottom ">
<span class="color333" wx:if='{{info.status==4}}'>已结束</span>
<span class="color333" wx:elif='{{info.status==3}}'>已成功</span>
<span class="color333" wx:else>目标 ¥{{info.amount}}</span>
<span class="color333">进度 {{info.ratio}}%</span>
</view>
<view class="project_warn">
<icon class="icon-box-img" type="warn" size="20"></icon>
金额、人数仅代表支持意向,最后金额、人数以实际支付为准。
</view>
</block>
<view wx:else class="project_diffDays">倒计时{{info.openDiffDays}}</view>
</view>
<!-- 故事项目回报 -->
<view class="project_classification" catchtap="classificationSelect">
<view data-id='0' class="item {{classificationId==0?'select_item':''}}">故事</view>
<view data-id='1' class="item {{classificationId==1?'select_item':''}}">项目</view>
<view data-id='2' wx:if='{{info.status!=4 && info.status!=3 && info.status!=2}}'
class="item {{classificationId==2?'select_item':''}}">回报</view>
</view>
<!-- 活动详情 -->
<view class="project_detail_html" id='classificationIdNav0'>
<rich-text nodes="{{info.content}}"></rich-text>
</view>
<!-- 项目概况 -->
<view class="project_detail_html" id='classificationIdNav1'>
<view class="project_nav">项目概况</view>
<view class="project_overview">
<view>项目名称<span class="right">{{info.title}}</span></view>
<view>项目情况
<view class="time">
<view><span><span class="num">{{info.amount}} </span>元</span><span>项目目标</span></view>
<view><span><span class="num">{{info.diffDays}} </span>天</span><span>项目周期</span></view>
</view>
</view>
<view>项目位置<span class="right">{{info.province}} · {{info.city}}</span></view>
</view>
</view>
<!-- 项目已结束或已完成 -->
<view class="end" wx:if='{{info.status==4}}'>项目已结束。若您支持过项目,可在[项目预购]中查看</view>
<view class="end" wx:if='{{info.status==3}}'>项目已成功。若您支持过项目,可在[项目预购]中查看</view>
<!-- 项目回报 -->
<view class="project_detail_html" id='classificationIdNav2' wx:if='{{info.status!=4 && info.status!=3 && info.status!=2}}'>
<view class="project_nav">项目回报</view>
<view class="project_list" wx:for='{{info.items}}'>
<view class="title">{{item.title}} <span>¥{{item.price}}</span></view>
<view class="fast">快速发货</view>
<view class="des">{{item.remark}}</view>
<view class="imglist">
<image wx:for='{{item.pictures}}' wx:for-item='it' src="{{it}}" mode="aspectFill"></image>
</view>
<view class="seeAll">
{{info.all_users}}人<block wx:if='{{info.all_users>0}}'>已</block>支持/{{item.quantity}} <span
catchtap="goDetail">查看详情</span>
</view>
</view>
</view>
</scroll-view>
<!-- 底部按钮 -->
<view class="project_now_act {{acted?'acted':''}}">
<view class="left" wx:if='{{info.status!=2}}' catchtap="islike" >
<image class="collect" mode="widthFix"
src="{{info.isLike ? '/static/images/collect.png':'/static/images/unCollect.png'}}">
</image>
关注{{info.likes>0?info.likes:''}}
</view>
<view wx:else class="left">
{{info.likes || 0}}人已关注
</view>
<span class="nolike" wx:if='{{info.status==3 || info.status==4 }}'>我要支持</span>
<button size="mini" class="{{info.isLike?'nolike':''}}" bindtap="{{!info.isLike?'like':'islike'}}" wx:elif='{{info.status==2}}' hover-class="other-button-hover">{{!info.isLike?'关注项目':'不再关注项目'}}</button>
<span wx:else catchtap="goDetail">我要支持</span>
</view>

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "项目回报",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,40 @@
<scroll-view scroll-y="true" style="height: {{height+'px'}};" class="scroll"
scroll-into-view="{{ classificationIdNav }}" scroll-with-animation="true">
<!-- 项目回报 -->
<view class="project_detail_html" id='classificationIdNav2' wx:if='{{lists.length>0}}'>
<view class="project_list" wx:for='{{lists}}'>
<view class="title">{{item.title}} <span>¥{{item.price}}</span></view>
<view class="fast">快速发货</view>
<view class="project_item">
<view class="item_title">回报内容</view>
<view class="item_content">
<view class="des">{{item.remark}}</view>
<view class="imglist">
<image wx:for='{{item.pictures}}' wx:for-item='it' src="{{it}}" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="project_item">
<view class="item_title">回报时间</view>
<view class="item_content">
<view class="des">{{item.time}}</view>
</view>
</view>
<view class="project_item">
<view class="item_title">配送说明</view>
<view class="item_content">
<view class="des">{{item.shipping}}</view>
</view>
</view>
<view class="seeAll">
{{item.all_users}}人已支持/{{item.quantity}} <span catchtap="beSure" data-id='{{item.crowdfund_item_id}}'>立即支持</span>
</view>
</view>
</view>
<view class="no_list" wx:elif='{{lists.length>0}}'>没有更多~</view>
<view wx:else class="no_list">
<image src="/static/images/no_list.png" mode="widthFix"></image>
暂无数据
</view>
</scroll-view>

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {},
"navigationBarTitleText": "提交成功",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#378fff"
}

View File

@@ -0,0 +1,13 @@
<view class="content">
<image class="active_cover" src="/static/images/paysuccess.png" mode="aspectFill"></image>
<view class="txt1">支付成功</view>
<view class="txt3" catchtap="beSure">查看订单</view>
<view class="share_content">
<image src="{{info.pictures[0]}}" class="share_bg" mode="aspectFill"></image>
<view class="title">{{info.title}}</view>
<view class="des">{{info.city}}/{{info.category}}</view>
<button class="bottom" open-type='share'>
<image src="/static/images/iconshare.png" class="icon_share" mode="widthFix" />分享项目给好友
</button>
</view>
</view>

View File

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