[更新]商城
@@ -12,7 +12,7 @@ import card from "./interfaces/card"
|
|||||||
import mall from "./interfaces/mall"
|
import mall from "./interfaces/mall"
|
||||||
import order from "./interfaces/order"
|
import order from "./interfaces/order"
|
||||||
import company from "./interfaces/company"
|
import company from "./interfaces/company"
|
||||||
import home from "./interfaces/home"
|
import companyModule from "./interfaces/home"
|
||||||
import ticket from "./interfaces/ticket"
|
import ticket from "./interfaces/ticket"
|
||||||
import address from "./interfaces/address"
|
import address from "./interfaces/address"
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ export default{
|
|||||||
mall,
|
mall,
|
||||||
order,
|
order,
|
||||||
company,
|
company,
|
||||||
home,
|
companyModule,
|
||||||
ticket,
|
ticket,
|
||||||
address
|
address
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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, //活动签到
|
||||||
})
|
})
|
||||||
14
app.json
@@ -8,10 +8,20 @@
|
|||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/card/index",
|
"pages/card/index",
|
||||||
"pages/user/index",
|
"pages/user/index",
|
||||||
"pages/home/index",
|
|
||||||
"pages/mall/index",
|
"pages/mall/index",
|
||||||
"pages/live/index",
|
"pages/live/index",
|
||||||
"pages/ticket/index"
|
"pages/ticket/index",
|
||||||
|
"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": {
|
"window": {
|
||||||
"backgroundTextStyle": "light",
|
"backgroundTextStyle": "light",
|
||||||
|
|||||||
57
components/company/activeList/activeList.js
Normal file
@@ -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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/activeList/activeList.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
16
components/company/activeList/activeList.wxml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<view class="active_content" wx:for='{{lists}}'>
|
||||||
|
<view class="active_cover">
|
||||||
|
<view class="active_type_icon">论坛</view>
|
||||||
|
<image class="active_cover_bg" src="{{item.pictures[0] || '/static/images/company_bg4.png'}}" mode="aspectFill">
|
||||||
|
</image>
|
||||||
|
<view class="active_title">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="active_des">{{item.description}}</view>
|
||||||
|
<view class="active_time">{{item.started_at}}至{{item.ended_at}}</view>
|
||||||
|
<view class="active_line"></view>
|
||||||
|
<view class="active_bottom">
|
||||||
|
<view class="left">{{item.price > 0 ?'¥'+item.price:'免费'}} <span>限{{item.limits}}人报名</span></view>
|
||||||
|
<view class="right" catchtap="toUrl" data-id='{{item.active_id}}'>进入活动</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="has_more">{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}</view>
|
||||||
123
components/company/activeList/activeList.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
81
components/company/enterprise/enterprise.js
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
7
components/company/enterprise/enterprise.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {
|
||||||
|
"videoInfo": "/components/company/videoInfo/videoInfo",
|
||||||
|
"fengcaiInfo": "/components/company/fengcaiInfo/fengcaiInfo"
|
||||||
|
}
|
||||||
|
}
|
||||||
112
components/company/enterprise/enterprise.wxml
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<!-- 企业介绍 -->
|
||||||
|
<block wx:if='{{info.base.description}}'>
|
||||||
|
<view class="enterprise_title mt30">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_3.png" mode="widthFix"></image>企业介绍
|
||||||
|
</view>
|
||||||
|
<!-- <view class="right" catchtap="goPages" data-id='3'>更多<image src="/static/images/icon_right.png" mode="widthFix"></image>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 企业介绍展示 -->
|
||||||
|
<view class="enterprise_content">
|
||||||
|
<view class="content" style="-webkit-line-clamp: {{hidden?'4':'100'}}; line-clamp: {{hidden?'4':'100'}};">
|
||||||
|
{{info.base.description}}
|
||||||
|
</view>
|
||||||
|
<view class="zhankai" catchtap="hidden" wx:if='{{hidden}}'>展开<image src="/static/images/icon_down.png"
|
||||||
|
mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view class="zhankai" catchtap="hidden" wx:else>隐藏<image src="/static/images/icon_up.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</block>
|
||||||
|
<!-- 管理层 -->
|
||||||
|
<block>
|
||||||
|
<view class="enterprise_title mt50">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_1 .png" mode="widthFix"></image>员工信息
|
||||||
|
</view>
|
||||||
|
<view class="right" catchtap="goPages" data-id='1'>更多<image src="/static/images/icon_right.png" mode="widthFix">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 管理层人员展示 -->
|
||||||
|
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
|
||||||
|
<view class="scroll-view-item_H" wx:for='{{info.colleagues}}'>
|
||||||
|
<view class="enterprise_list ">
|
||||||
|
<image class="enterprise_header" src="{{item.cover || '/static/images/company_bg4.png'}} "></image>
|
||||||
|
<view class="enterprise_nickname">{{item.name}}</view>
|
||||||
|
<view class="enterprise_job">{{item.job}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<!-- 员工层 -->
|
||||||
|
<block>
|
||||||
|
<!-- <view class="enterprise_title mt50">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_2.png" mode="widthFix"></image>员工层
|
||||||
|
</view>
|
||||||
|
<view class="right" catchtap="goPages" data-id='2'>更多<image src="/static/images/icon_right.png" mode="widthFix">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
|
||||||
|
<!-- 员工层人员展示 -->
|
||||||
|
<!-- <scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
|
||||||
|
<view class="scroll-view-item_H" wx:for='{{3}}'>
|
||||||
|
<view class="enterprise_list ">
|
||||||
|
<image class="enterprise_header" src="/static/images/company_bg4.png"></image>
|
||||||
|
<view class="enterprise_nickname">张冬雪</view>
|
||||||
|
<view class="enterprise_job">职员</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view> -->
|
||||||
|
</block>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 企业风采 -->
|
||||||
|
<block wx:if='{{info.graces.length>0}}'>
|
||||||
|
<view class="enterprise_title mt50">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_4.png" mode="widthFix"></image>企业风采
|
||||||
|
</view>
|
||||||
|
<view class="right" catchtap="goPages" data-id='4'>更多<image src="/static/images/icon_right.png" mode="widthFix">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 企业风采展示 -->
|
||||||
|
<fengcaiInfo info='{{info.graces[0]}}'></fengcaiInfo>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<!-- 企业视频 -->
|
||||||
|
<block wx:if='{{info.videos.length>0}}'>
|
||||||
|
<view class="enterprise_title mt50">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_5.png" mode="widthFix"></image>企业视频
|
||||||
|
</view>
|
||||||
|
<view class="right" catchtap="goPages" data-id='5'>更多<image src="/static/images/icon_right.png" mode="widthFix">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 企业视频展示 -->
|
||||||
|
<videoInfo info='{{info.videos[0]}}'></videoInfo>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<!-- 荣誉资质 -->
|
||||||
|
<block wx:if='{{info.base.pictures.length>0}}'>
|
||||||
|
<view class="enterprise_title mt50">
|
||||||
|
<view class="left">
|
||||||
|
<image src="/static/images/enterprise_6.png" mode="widthFix"></image>荣誉资质
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 荣誉资质展示 -->
|
||||||
|
<view class="enterprise_content">
|
||||||
|
<view class="content">
|
||||||
|
<image wx:for='{{info.base.pictures}}' src="{{item}}" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
168
components/company/enterprise/enterprise.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
24
components/company/fengcaiInfo/fengcaiInfo.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
info:{
|
||||||
|
type:Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/fengcaiInfo/fengcaiInfo.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
6
components/company/fengcaiInfo/fengcaiInfo.wxml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<view class="enterprise_content">
|
||||||
|
<view class="content" >
|
||||||
|
<image src="{{info.cover || '/static/images/company_bg4.png'}}" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<view class="content txt_center" >{{info.title}} </view>
|
||||||
|
</view>
|
||||||
42
components/company/fengcaiInfo/fengcaiInfo.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
57
components/company/noticeList/noticeList.js
Normal file
@@ -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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/noticeList/noticeList.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
9
components/company/noticeList/noticeList.wxml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<view class="active_content" wx:for='{{lists}}' catchtap="toUrl" data-id='{{item.dynamic_id}}'>
|
||||||
|
<view class="active_cover">
|
||||||
|
<view class="active_type_icon">最新动态</view>
|
||||||
|
<image class="active_cover_bg" src="{{item.cover || '/static/images/company_bg4.png'}}" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="active_title">{{item.title}}</view>
|
||||||
|
<view class="active_des">{{item.created_at}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="has_more">{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}</view>
|
||||||
114
components/company/noticeList/noticeList.wxss
Normal file
@@ -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 ;
|
||||||
|
}
|
||||||
23
components/company/personalInfo/personalInfo.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
info:Object
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
// 获取员工列表
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/personalInfo/personalInfo.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
7
components/company/personalInfo/personalInfo.wxml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<view class="personal_list">
|
||||||
|
<image class="personal_header" src="{{info.cover}}"></image>
|
||||||
|
<view class='personal_left'>
|
||||||
|
<view class="personal_nickname">{{info.name}}<span class="personal_job">({{info.job}})</span></view>
|
||||||
|
<view class="personal_job">{{info.mobile}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
50
components/company/personalInfo/personalInfo.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
92
components/company/projectRaise/projectRaise.js
Normal file
@@ -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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/projectRaise/projectRaise.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
41
components/company/projectRaise/projectRaise.wxml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!-- 分类 -->
|
||||||
|
|
||||||
|
<view class="scroll_menu">
|
||||||
|
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
|
||||||
|
<view id="menu1" wx:for='{{categoryList}}' catchtap="menuSelect" data-id='{{item.id}}'
|
||||||
|
class="scroll-view-item_H {{category_id==item.id?'scroll_view_select':''}}">{{item.title}}</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="project_content" wx:for='{{lists}}' catchtap="toUrl" data-id='{{item.crowdfund_id}}'>
|
||||||
|
<view class="project_cover">
|
||||||
|
<view class="project_type_icon" wx:if='{{item.status==2}}'>{{item.status_text}}</view>
|
||||||
|
<image class="project_cover_bg" src="{{item.cover}}" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="project_title">{{item.title}}</view>
|
||||||
|
<view class="project_bottom ">
|
||||||
|
<span class="color333">{{item.city}}/{{item.category}}</span>
|
||||||
|
<span class="color333">{{item.ratio}}%</span>
|
||||||
|
</view>
|
||||||
|
<view class="project_line">
|
||||||
|
<progress percent="{{item.ratio*100}}" color="#378fff" active stroke-width="6" />
|
||||||
|
</view>
|
||||||
|
<view class="project_bottom" wx:if='{{item.status==1}}'>
|
||||||
|
<span>筹集金额 ¥{{item.amount}}</span>
|
||||||
|
<span>剩余天数 {{item.diffDays}}天</span>
|
||||||
|
</view>
|
||||||
|
<view class="project_bottom" wx:elif='{{item.status==3}}'>
|
||||||
|
<span></span>
|
||||||
|
<span>已成功</span>
|
||||||
|
</view>
|
||||||
|
<view class="project_bottom" wx:elif='{{item.status==2}}'>
|
||||||
|
<span>倒计时{{item.openDiffDays}}</span>
|
||||||
|
<span>{{item.likes}}人关注</span>
|
||||||
|
</view>
|
||||||
|
<view class="project_bottom" wx:elif='{{item.status==4}}'>
|
||||||
|
<span></span>
|
||||||
|
<span>已结束</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="has_more">{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}</view>
|
||||||
136
components/company/projectRaise/projectRaise.wxss
Normal file
@@ -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 ;
|
||||||
|
}
|
||||||
43
components/company/userInfoLayer/userInfoLayer.js
Normal file
@@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/userInfoLayer/userInfoLayer.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
14
components/company/userInfoLayer/userInfoLayer.wxml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
<block wx:if="{{showLayer}}">
|
||||||
|
<view class="layer-back active"></view>
|
||||||
|
<view class="layer-content">
|
||||||
|
<view class="layer-content-block">
|
||||||
|
<image class="layer-content-img" src="./userInfoLayer_img.png" mode="widthFix"></image>
|
||||||
|
<view class="layer-content-mian">
|
||||||
|
<view class="layer-content-title">完善信息</view>
|
||||||
|
<view class="layer-content-text">获取您的公开信息(头像,昵称等),完善平台信息</view>
|
||||||
|
<button class="layer-content-btn" size="default" open-type="getUserInfo" bindgetuserinfo="userInfo">授权微信</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
70
components/company/userInfoLayer/userInfoLayer.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
BIN
components/company/userInfoLayer/userInfoLayer_img.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
24
components/company/videoInfo/videoInfo.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
info:{
|
||||||
|
type:Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/videoInfo/videoInfo.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
6
components/company/videoInfo/videoInfo.wxml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<view class="enterprise_content">
|
||||||
|
<view class="content">
|
||||||
|
<video src="{{info.path_url}}"></video>
|
||||||
|
</view>
|
||||||
|
<view class="content txt_center">{{info.description}} </view>
|
||||||
|
</view>
|
||||||
42
components/company/videoInfo/videoInfo.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
23
components/company/videoList/videoList.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// components/videoList/videoList.js
|
||||||
|
Component({
|
||||||
|
/**
|
||||||
|
* 组件的属性列表
|
||||||
|
*/
|
||||||
|
properties: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组件的方法列表
|
||||||
|
*/
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
4
components/company/videoList/videoList.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
8
components/company/videoList/videoList.wxml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<!-- 企业视频展示 -->
|
||||||
|
<view class="video_content">
|
||||||
|
<view class='video_item' wx:for='{{10}}'>
|
||||||
|
<view class="video_item_zhiding" wx:if='{{index==0 || index==1 || index==2}}'>置顶</view>
|
||||||
|
<image class="video_item_bg" src="/static/images/company_bg4.png" mode="aspectFill"></image>
|
||||||
|
<image class="video_item_eye" src="/static/images/eye.png" mode="widthFix"></image>2360
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
49
components/company/videoList/videoList.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
130
pages/home/activeDetail/activeDetail.js
Normal 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();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
5
pages/home/activeDetail/activeDetail.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "活动详情",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
78
pages/home/activeDetail/activeDetail.wxml
Normal 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>
|
||||||
248
pages/home/activeDetail/activeDetail.wxss
Normal 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%;
|
||||||
|
}
|
||||||
69
pages/home/activeSuccess/activeSuccess.js
Normal 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 () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
6
pages/home/activeSuccess/activeSuccess.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "报名成功",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
6
pages/home/activeSuccess/activeSuccess.wxml
Normal 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>
|
||||||
53
pages/home/activeSuccess/activeSuccess.wxss
Normal 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;
|
||||||
|
}
|
||||||
81
pages/home/beSureOrder/beSureOrder.js
Normal 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({})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
5
pages/home/beSureOrder/beSureOrder.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "确认订单",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
46
pages/home/beSureOrder/beSureOrder.wxml
Normal 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>
|
||||||
182
pages/home/beSureOrder/beSureOrder.wxss
Normal 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;
|
||||||
|
}
|
||||||
66
pages/home/companyInfo/companyInfo.js
Normal 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 () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
3
pages/home/companyInfo/companyInfo.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
2
pages/home/companyInfo/companyInfo.wxml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<!--pages/home/companyInfo/companyInfo.wxml-->
|
||||||
|
<text>pages/home/companyInfo/companyInfo.wxml</text>
|
||||||
1
pages/home/companyInfo/companyInfo.wxss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/* pages/home/companyInfo/companyInfo.wxss */
|
||||||
124
pages/home/companyMore/companyMore.js
Normal 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: '没有更多',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
10
pages/home/companyMore/companyMore.json
Normal 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"
|
||||||
|
}
|
||||||
17
pages/home/companyMore/companyMore.wxml
Normal 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>
|
||||||
10
pages/home/companyMore/companyMore.wxss
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
page {
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.has_more {
|
||||||
|
color: #999;
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
@@ -1,66 +1,81 @@
|
|||||||
// pages/home/index.js
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
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)
|
||||||
onLoad: function (options) {
|
wx.setStorageSync('company_id', e.id)
|
||||||
|
}else{
|
||||||
|
this.company(this.company_id)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady: function () {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload: function () {
|
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();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
* 请求项目筹集分类接口
|
||||||
*/
|
*/
|
||||||
onPullDownRefresh: function () {
|
company() {
|
||||||
|
wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.setData({
|
||||||
|
info: res
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面上拉触底事件的处理函数
|
* 拨打电话
|
||||||
*/
|
*/
|
||||||
onReachBottom: function () {
|
call() {
|
||||||
|
wx.makePhoneCall({
|
||||||
},
|
phoneNumber: this.data.info.certification.phone,
|
||||||
|
})
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage: function () {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -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"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,2 +1,64 @@
|
|||||||
<!--pages/home/index.wxml-->
|
<!-- 公司logo及基本信息 -->
|
||||||
<text>pages/home/index.wxml</text>
|
<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>
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
37
pages/home/noticeDetail/noticeDetail.js
Normal 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,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
5
pages/home/noticeDetail/noticeDetail.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "动态详情",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
BIN
pages/home/noticeDetail/noticeDetail.rar
Normal file
18
pages/home/noticeDetail/noticeDetail.wxml
Normal 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>
|
||||||
241
pages/home/noticeDetail/noticeDetail.wxss
Normal 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%;
|
||||||
|
}
|
||||||
113
pages/home/projectDetail/projectDetail.js
Normal 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
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
})
|
||||||
5
pages/home/projectDetail/projectDetail.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "项目详情",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
118
pages/home/projectDetail/projectDetail.wxml
Normal 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>
|
||||||
479
pages/home/projectDetail/projectDetail.wxss
Normal 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%;
|
||||||
|
}
|
||||||
28
pages/home/projectReturn/projectReturn.js
Normal 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,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
5
pages/home/projectReturn/projectReturn.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "项目回报",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
40
pages/home/projectReturn/projectReturn.wxml
Normal 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>
|
||||||
120
pages/home/projectReturn/projectReturn.wxss
Normal 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;
|
||||||
|
}
|
||||||
35
pages/home/projectSuccess/projectSuccess.js
Normal 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]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
6
pages/home/projectSuccess/projectSuccess.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "提交成功",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
13
pages/home/projectSuccess/projectSuccess.wxml
Normal 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>
|
||||||
110
pages/home/projectSuccess/projectSuccess.wxss
Normal 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;
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Web唐明明
|
* Web唐明明
|
||||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
@@ -11,21 +10,21 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
videoList : [], //获取短视频列表
|
videoList: [], //获取短视频列表
|
||||||
videoIndex : 0, //当前播放视频的下标
|
videoIndex: 0, //当前播放视频的下标
|
||||||
videoId : "", //当前播放的视频id
|
videoId: "", //当前播放的视频id
|
||||||
playState : true, //视频播放状态
|
playState: true, //视频播放状态
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
wx.$api.video.videos().then(res=>{
|
wx.$api.video.videos().then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.setData({
|
this.setData({
|
||||||
videoList: res,
|
videoList: res,
|
||||||
videoId : res[0].video_id
|
videoId: res[0].video_id
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -33,15 +32,15 @@ Page({
|
|||||||
/***
|
/***
|
||||||
* 视频的播放状态
|
* 视频的播放状态
|
||||||
*/
|
*/
|
||||||
videoPlay(e){
|
videoPlay(e) {
|
||||||
if(e.detail.playType == "play" && this.data.playState == false){
|
if (e.detail.playType == "play" && this.data.playState == false) {
|
||||||
this.setData({
|
this.setData({
|
||||||
playState : true,
|
playState: true,
|
||||||
videoId : e.detail.videoId
|
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({
|
this.setData({
|
||||||
playState : false
|
playState: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -49,7 +48,7 @@ Page({
|
|||||||
/**
|
/**
|
||||||
* 获取视频下标
|
* 获取视频下标
|
||||||
*/
|
*/
|
||||||
swiperIndex(e){
|
swiperIndex(e) {
|
||||||
|
|
||||||
console.log(e.detail.current)
|
console.log(e.detail.current)
|
||||||
|
|
||||||
@@ -61,17 +60,25 @@ Page({
|
|||||||
/**
|
/**
|
||||||
* 点赞视频
|
* 点赞视频
|
||||||
*/
|
*/
|
||||||
binLike(){
|
binLike() {
|
||||||
let hasLogin = wx.getStorageSync("token")
|
let hasLogin = wx.getStorageSync("token")
|
||||||
|
|
||||||
if(hasLogin == ""){
|
if (hasLogin == "") {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: "/pages/login/login"
|
url: "/pages/login/login"
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: "点赞成功"
|
title: "点赞成功"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 跳转到企业主页
|
||||||
|
*/
|
||||||
|
goCompany(e) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/home/index?id=' + e.currentTarget.dataset.id,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 视频工具栏 -->
|
<!-- 视频工具栏 -->
|
||||||
<view class="video-tool">
|
<view class="video-tool">
|
||||||
<view class="video-tool-item">
|
<view class="video-tool-item" catchtap="goCompany" data-id="{{videoList[videoIndex].company.company_id}}">
|
||||||
<image class="video-tool-cover" src="{{videoList[videoIndex].company.cover || ''}}" mode="aspectFill"></image>
|
<image class="video-tool-cover" src="{{videoList[videoIndex].company.cover || ''}}" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="video-tool-item" bindtap="binLike">
|
<view class="video-tool-item" bindtap="binLike">
|
||||||
|
|||||||
@@ -1,90 +0,0 @@
|
|||||||
{
|
|
||||||
"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": ""
|
|
||||||
},
|
|
||||||
"enableEngineNative": false,
|
|
||||||
"bundle": false,
|
|
||||||
"useIsolateContext": true,
|
|
||||||
"useCompilerModule": true,
|
|
||||||
"userConfirmedUseCompilerModuleSwitch": false,
|
|
||||||
"userConfirmedBundleSwitch": 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": []
|
|
||||||
},
|
|
||||||
"game": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"gamePlugin": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"miniprogram": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"name": "登录",
|
|
||||||
"pathName": "pages/login/login",
|
|
||||||
"query": "",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "搜索",
|
|
||||||
"pathName": "pages/company/search/search",
|
|
||||||
"query": "",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pages/mall/index",
|
|
||||||
"pathName": "pages/mall/index",
|
|
||||||
"query": "",
|
|
||||||
"scene": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pages/user/index",
|
|
||||||
"pathName": "pages/user/index",
|
|
||||||
"scene": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BIN
static/images/collect.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/images/com_call.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/images/com_date.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/images/com_person.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/images/com_shop.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/images/com_tu.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/images/company_bg4.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
static/images/enterprise_1 .png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
static/images/enterprise_2.png
Normal file
|
After Width: | Height: | Size: 471 B |
BIN
static/images/enterprise_3.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
static/images/enterprise_4.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
static/images/enterprise_5.png
Normal file
|
After Width: | Height: | Size: 373 B |
BIN
static/images/enterprise_6.png
Normal file
|
After Width: | Height: | Size: 402 B |
BIN
static/images/eye.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
static/images/icon_down.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
static/images/icon_right.png
Normal file
|
After Width: | Height: | Size: 206 B |