From e93ee1ed174e9dae4f281b78ad2f66b040c445ba Mon Sep 17 00:00:00 2001
From: zdx <731335498@qq.com>
Date: Mon, 28 Dec 2020 17:25:45 +0800
Subject: [PATCH] beifen
---
apis/interfaces/home.js | 10 ++
app.json | 62 +++----
pages/home/activeSuccess/activeSuccess.js | 50 +-----
pages/home/beSureOrder/beSureOrder.js | 97 ++++++-----
pages/home/index.js | 19 ++-
pages/home/projectReturn/projectReturn.wxss | 2 +-
pages/home/projectSuccess/projectSuccess.js | 7 +-
pages/home/projectSuccess/projectSuccess.wxss | 4 +
pages/user/companyMine/companyOrder.js | 4 +-
pages/user/companyMine/companyOrder.wxml | 40 +++--
pages/user/companyMine/companyOrder.wxss | 56 ++++++-
pages/user/companyMine/companyOrder1 (2).js | 108 ++++++++++++
pages/user/companyMine/companyOrder1 (2).json | 6 +
pages/user/companyMine/companyOrder1 (2).wxml | 54 ++++++
pages/user/companyMine/companyOrder1 (2).wxss | 154 ++++++++++++++++++
.../focusedProject/focusedProject.js | 84 ++++++++++
.../focusedProject/focusedProject.json | 6 +
.../focusedProject/focusedProject.wxml | 12 ++
.../focusedProject/focusedProject.wxss | 59 +++++++
pages/user/companyMine/myActives/myActives.js | 5 +-
pages/user/index.wxml | 9 +-
21 files changed, 703 insertions(+), 145 deletions(-)
create mode 100644 pages/user/companyMine/companyOrder1 (2).js
create mode 100644 pages/user/companyMine/companyOrder1 (2).json
create mode 100644 pages/user/companyMine/companyOrder1 (2).wxml
create mode 100644 pages/user/companyMine/companyOrder1 (2).wxss
create mode 100644 pages/user/companyMine/focusedProject/focusedProject.js
create mode 100644 pages/user/companyMine/focusedProject/focusedProject.json
create mode 100644 pages/user/companyMine/focusedProject/focusedProject.wxml
create mode 100644 pages/user/companyMine/focusedProject/focusedProject.wxss
diff --git a/apis/interfaces/home.js b/apis/interfaces/home.js
index 1bdd8e2..bb9cf4a 100644
--- a/apis/interfaces/home.js
+++ b/apis/interfaces/home.js
@@ -26,6 +26,14 @@ const crowdfunds = (company_id, category_id, page) => req({
const crowdfundsDetail = crowdfund_id => req({
url: "crowdfunds/" + crowdfund_id
})
+// 获取关注列表
+const getCrowdfundsLike = page => req({
+ url: "user/crowdfunds",
+ method: "get",
+ data: {
+ page: page
+ }
+})
//项目关注
const crowdfundsLike = crowdfund_id => req({
url: "crowdfunds/like",
@@ -148,10 +156,12 @@ const signed = (active_id) => req({
+
export default ({
crowdfundcategory, //项目筹集分类
crowdfunds, //根据项目筹集获取列表
crowdfundsDetail, //项目详情
+ getCrowdfundsLike, //获取已关注列表
crowdfundsLike, //关注项目
crowdfundsUnLike, //取消关注项目
crowdfundsCreat, //获取确认订单信息
diff --git a/app.json b/app.json
index 4c76a63..e89c8e9 100644
--- a/app.json
+++ b/app.json
@@ -1,34 +1,36 @@
{
- "pages": [
- "pages/user/index",
- "pages/user/companyMine/myActives/myActives",
- "pages/welcome/index",
- "pages/company/index",
- "pages/company/search/search",
- "pages/shortVideo/index",
- "pages/richText/richText",
- "pages/login/login",
- "pages/card/index",
- "pages/mall/index",
- "pages/live/index",
- "pages/ticket/index",
- "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"
+ "pages": [
+ "pages/user/companyMine/companyOrder",
+ "pages/welcome/index",
+ "pages/company/index",
+ "pages/company/search/search",
+ "pages/shortVideo/index",
+ "pages/richText/richText",
+ "pages/login/login",
+ "pages/card/index",
+ "pages/mall/index",
+ "pages/live/index",
+ "pages/ticket/index",
+ "pages/user/index",
+ "pages/user/companyMine/myActives/myActives",
+ "pages/user/companyMine/focusedProject/focusedProject",
+ "pages/home/index",
+ "pages/home/companyInfo/companyInfo",
+ "pages/home/noticeDetail/noticeDetail",
+ "pages/home/activeDetail/activeDetail",
+ "pages/home/projectDetail/projectDetail",
+ "pages/home/projectReturn/projectReturn",
+ "pages/home/beSureOrder/beSureOrder",
+ "pages/home/companyMore/companyMore",
+ "pages/home/projectSuccess/projectSuccess",
+ "pages/home/activeSuccess/activeSuccess"
],
"window": {
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#fff",
- "navigationBarTitleText": "",
- "navigationBarTextStyle": "black"
- },
- "style": "v2",
- "sitemapLocation": "sitemap.json"
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTitleText": "",
+ "navigationBarTextStyle": "black"
+ },
+ "style": "v2",
+ "sitemapLocation": "sitemap.json"
}
\ No newline at end of file
diff --git a/pages/home/activeSuccess/activeSuccess.js b/pages/home/activeSuccess/activeSuccess.js
index 7649127..c425aec 100644
--- a/pages/home/activeSuccess/activeSuccess.js
+++ b/pages/home/activeSuccess/activeSuccess.js
@@ -19,51 +19,13 @@ Page({
},
/**
- * 生命周期函数--监听页面初次渲染完成
+ * 跳转个人中心
*/
- onReady: function () {
-
+ beSure: function () {
+ wx.navigateTo({
+ url: '/pages/user/companyMine/myActives/myActives',
+ })
},
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
+
})
\ No newline at end of file
diff --git a/pages/home/beSureOrder/beSureOrder.js b/pages/home/beSureOrder/beSureOrder.js
index 6fcac25..9339f00 100644
--- a/pages/home/beSureOrder/beSureOrder.js
+++ b/pages/home/beSureOrder/beSureOrder.js
@@ -5,7 +5,7 @@ Page({
info: '',
remark: '',
crowdfund_id: '',
- addressDel: {},
+ addressDel:'',
},
onLoad(e) {
@@ -41,50 +41,63 @@ Page({
title: '创建中...',
mask: 'true'
})
- wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.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: '支付失败',
- })
- }
+ if (this.data.addressDel) {
+ wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.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 => {
- console.log(res)
- })
- }
- })
- }
- }).catch(res => {
- wx.navigateBack({})
- })
+ }
+ })
+ }
+ }).catch(res => {
+ wx.navigateBack({})
+ })
+ } else {
+ wx.hideLoading({
+ success: (res) => {
+ wx.showToast({
+ icon: 'none',
+ title: '请选择收货地址',
+ duration: 2000
+ })
+ },
+ })
+
+ }
},
// 跳转到地址列表和新增地址页面
- goAddress(){
+ goAddress() {
wx.navigateTo({
url: '/pages/mall/mall_address/mall_address?type=selectAddress',
})
diff --git a/pages/home/index.js b/pages/home/index.js
index 818cf6b..efdf1dc 100644
--- a/pages/home/index.js
+++ b/pages/home/index.js
@@ -7,10 +7,9 @@ Page({
selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3
company_id: wx.getStorageSync('company_id'), //企业Id,
info: '', //企业信息
- loaded:false
- },
- onLoad(e) {
+ loaded: false
},
+ onLoad(e) {},
onShow() {
this.company(wx.getStorageSync('company_id'))
},
@@ -57,12 +56,20 @@ Page({
* 请求项目筹集分类接口
*/
company() {
+ wx.showLoading({
+ title: 'title',
+ mask: 'true'
+ })
wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => {
- console.log(res)
this.setData({
info: res,
- loaded:true,
+ loaded: true,
})
+ wx.hideLoading({})
+ }).catch(res => {
+ if(res.status_code=='404'){
+ // this.company(wx.getStorageSync('company_id'))
+ }
})
},
@@ -77,7 +84,7 @@ Page({
/**
* 进入商城
*/
- goMall(e){
+ goMall(e) {
console.log('1111')
wx.navigateTo({
url: '/pages/mall/index',
diff --git a/pages/home/projectReturn/projectReturn.wxss b/pages/home/projectReturn/projectReturn.wxss
index f1091f2..c238933 100644
--- a/pages/home/projectReturn/projectReturn.wxss
+++ b/pages/home/projectReturn/projectReturn.wxss
@@ -88,7 +88,7 @@
align-items: flex-start;
box-sizing: border-box;
padding: 20rpx 0;
- border-bottom: solid 2rpx #f7f7f7;
+ border-bottom: solid 2rpx #f9f9f9;
}
.item_title{
diff --git a/pages/home/projectSuccess/projectSuccess.js b/pages/home/projectSuccess/projectSuccess.js
index e8c2a9d..d80ff3b 100644
--- a/pages/home/projectSuccess/projectSuccess.js
+++ b/pages/home/projectSuccess/projectSuccess.js
@@ -32,6 +32,11 @@ Page({
}
},
/**
- * 跳转到个人
+ * 跳转到订单列表
*/
+ beSure(){
+ wx.navigateTo({
+ url: '/pages/user/companyMine/companyOrder',
+ })
+ }
})
\ No newline at end of file
diff --git a/pages/home/projectSuccess/projectSuccess.wxss b/pages/home/projectSuccess/projectSuccess.wxss
index 6d1e741..e4f7c39 100644
--- a/pages/home/projectSuccess/projectSuccess.wxss
+++ b/pages/home/projectSuccess/projectSuccess.wxss
@@ -80,6 +80,10 @@ page {
color: #fff;
font-size: 34rpx;
padding: 0 30rpx;
+ display:-webkit-box;
+ -webkit-line-clamp:3;
+ -webkit-box-orient:vertical;
+ overflow:hidden;
}
.share_content .des{
color: #fff;
diff --git a/pages/user/companyMine/companyOrder.js b/pages/user/companyMine/companyOrder.js
index 015fe61..ad3f62e 100644
--- a/pages/user/companyMine/companyOrder.js
+++ b/pages/user/companyMine/companyOrder.js
@@ -6,6 +6,7 @@ Page({
*/
data: {
type: 0, //全部0 待付款1 待发货2 待收货3 退款/售后4
+ company_id:wx.getStorageSync('company_id')
},
onLoad() {
@@ -21,9 +22,6 @@ Page({
this.setData({
type: e.currentTarget.dataset.id
})
- if (e.currentTarget.dataset.id == 3) {
- this.selectComponent('#categoryTypeList').crowdfundcategory(this.data.company_id);
- }
}
},
})
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder.wxml b/pages/user/companyMine/companyOrder.wxml
index 42ed3e9..62557c5 100644
--- a/pages/user/companyMine/companyOrder.wxml
+++ b/pages/user/companyMine/companyOrder.wxml
@@ -1,16 +1,36 @@
+
+
+ 2020-11-22 13:30:00 待付款
+
+
+
+ 亲自跑到义乌,待会今年就新鲜上线亲自跑到义乌,待会今年就新鲜上线¥60.00
+ 小饼干*4
+
+
+
+ 共1件商品 实付:¥202.00
+ 项目结束时间:2020-10-29
+
+
+
+ 取消订单
+ 立即付款
+
+
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder.wxss b/pages/user/companyMine/companyOrder.wxss
index ac6ccf0..9d81f53 100644
--- a/pages/user/companyMine/companyOrder.wxss
+++ b/pages/user/companyMine/companyOrder.wxss
@@ -3,6 +3,7 @@
background-color: #fff;
box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1);
font-size: 28rpx;
+ margin-bottom: 20rpx;
}
.scroll-view_H {
@@ -30,4 +31,57 @@
font-weight: 600;
}
-/* 列表 */
\ No newline at end of file
+/* 列表 */
+.lists {
+ background-color: #fff;
+}
+
+.top {
+ font-size: 28rpx;
+ color: #333;
+}
+
+.top image {
+ width: 150rpx;
+ height: 150rpx;
+ border-radius: 10rpx;
+}
+
+.top .ctime {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 20rpx 30rpx;
+}
+
+.top .ctime span {
+ color: #666;
+}
+
+.top .content {
+ padding: 20rpx 30rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: flex-start;
+ box-sizing: border-box;
+}
+
+.top .title {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ box-sizing: border-box;
+}
+
+.top .title .title1 {
+ overflow: hidden;
+ display: inline-block;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ width: 400rpx;
+}
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder1 (2).js b/pages/user/companyMine/companyOrder1 (2).js
new file mode 100644
index 0000000..c5230ab
--- /dev/null
+++ b/pages/user/companyMine/companyOrder1 (2).js
@@ -0,0 +1,108 @@
+/*
+ * 手太欠
+ * 企获客商城
+ */
+
+const app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ stateType : 'all', //订单类型
+ orderArr : [], //订单列表
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad (options) {},
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ if(wx.getStorageSync("token") == ""){
+ wx.navigateTo({
+ url: '/pages/login/login'
+ })
+ return
+ }
+
+ // 获取订单列表
+ this.orderInfo()
+ },
+
+ /**
+ * 订单tab
+ */
+ orderTab(e){
+ this.setData({
+ stateType: e.currentTarget.dataset.state
+ })
+ this.orderInfo()
+ },
+
+ /**
+ * 订单列表
+ */
+ orderInfo(){
+ let stateType = this.data.stateType
+
+ if(stateType == 'all') {
+ wx.$api.order.index().then(res=>{
+ this.setData({
+ orderArr : res.data
+ })
+ })
+ } else if(stateType == 'unpaid') {
+ wx.$api.order.unpaid().then(res=>{
+ this.setData({
+ orderArr : res.data
+ })
+ })
+ } else if(stateType == 'paid') {
+ wx.$api.order.paid().then(res=>{
+ this.setData({
+ orderArr : res.data
+ })
+ })
+ } else if(stateType == 'delive') {
+ wx.$api.order.delive().then(res=>{
+ this.setData({
+ orderArr : res.data
+ })
+ })
+ } else if(stateType == 'refunds') {
+ wx.$api.order.refund().then(res=>{
+ this.setData({
+ orderArr : res.data
+ })
+ })
+ }
+
+ },
+
+ /**
+ * 订单支付
+ */
+ orderPay(e){
+ let orderId = e.currentTarget.dataset.orderid
+ wx.navigateTo({
+ url: '/pages/mall/mall_pay/mall_pay?orderid=' + orderId,
+ })
+
+ },
+
+ /**
+ * 取消订单
+ */
+ orderDelete(e) {
+ let orderId = e.currentTarget.dataset.orderid
+ wx.$api.orders.cancel(orderId).then(res=>{
+ // 获取列表
+ this.orderInfo()
+ })
+ },
+})
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder1 (2).json b/pages/user/companyMine/companyOrder1 (2).json
new file mode 100644
index 0000000..8d21f2a
--- /dev/null
+++ b/pages/user/companyMine/companyOrder1 (2).json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "项目预购",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#378fff"
+}
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder1 (2).wxml b/pages/user/companyMine/companyOrder1 (2).wxml
new file mode 100644
index 0000000..c9599bf
--- /dev/null
+++ b/pages/user/companyMine/companyOrder1 (2).wxml
@@ -0,0 +1,54 @@
+
+
+
+ 全部
+
+
+ 待支付
+
+
+ 待发货
+
+
+ 待收货
+
+
+ 已完成
+
+
+
+
+
+
+
+ {{goods.orderid}}
+
+
+
+ {{goods.state_text}}
+
+
+
+
+
+ {{item.title}}
+
+ ¥{{item.price}}
+ 共{{item.qty}}件
+
+
+
+
+
+
+
+
+
+ 暂无订单
+
\ No newline at end of file
diff --git a/pages/user/companyMine/companyOrder1 (2).wxss b/pages/user/companyMine/companyOrder1 (2).wxss
new file mode 100644
index 0000000..9ed17b8
--- /dev/null
+++ b/pages/user/companyMine/companyOrder1 (2).wxss
@@ -0,0 +1,154 @@
+
+page {
+ background-color: #eee;
+}
+
+/* 订单tab */
+.order-tab{
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ display: flex;
+ height: 80rpx;
+ line-height: 80rpx;
+ z-index: 9;
+ background: white;
+}
+
+.order-tab-item{
+ font-size: 28rpx;
+ width: 20%;
+ text-align: center;
+ border-bottom: solid 2rpx #f7f7f7;
+ color: #464854;
+ background: white;
+ position: relative;
+}
+
+.order-tab-item:after {
+ position: absolute;
+ content: '';
+ left: calc(50% - 30rpx);
+ bottom: 0;
+ background-color: transparent;
+ width: 60rpx;
+ height: 8rpx;
+ border-radius: 50rpx;
+ color: #666666;
+}
+
+.order-tab-item.active{
+ color:#000;
+ font-weight: 600;
+}
+
+.order-tab-item.active:after {
+ background-color: #378fff;
+}
+
+/* 订单列表 */
+.order-content{
+ border-bottom: solid 100rpx transparent;
+ padding: 80rpx 0 20rpx 0;
+}
+
+.order-list {
+ background-color: white;
+ margin: 30rpx 0;
+}
+
+.order-company {
+ display: flex;
+ line-height: 50rpx;
+ margin-bottom: 20rpx;
+ padding: 20rpx 30rpx;
+ box-sizing: border-box;
+}
+
+.order-company-name {
+ font-weight: 600;
+ flex: 1;
+ display: flex;
+}
+
+.order-logo {
+ width: 50rpx;
+ height: 50rpx;
+ margin-right: 20rpx;
+}
+
+.order-arrow {
+ width: 28rpx;
+ height: 28rpx;
+ margin: 10rpx 0 10rpx 20rpx;
+}
+
+.order-company-state {
+ color: #378fff;
+}
+
+.order-goods {
+ position: relative;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+}
+
+.order-goods-img {
+ width: 160rpx;
+ height: 160rpx;
+ border-radius: 10rpx;
+}
+
+.order-goods-text {
+ position: absolute;
+ padding-left: 220rpx;
+ padding-right: 30rpx;
+ right: 0;
+ top: 0;
+ left: 0;
+ width: 100%;
+ box-sizing: border-box;
+}
+
+.order-goods-name {
+ height: 80rpx;
+ margin-bottom: 30rpx;
+}
+
+.order-goods-price {
+ display: flex;
+ font-size: 28rpx;
+ color: #999999;
+}
+
+.order-goods-price text {
+ flex: 1;
+ display: block;
+ font-size: 32rpx;
+ color: #000;
+}
+
+.order-footer {
+ border-top: 2rpx solid #eee;
+ margin-top: 20rpx;
+ padding: 30rpx;
+ overflow: hidden;
+}
+
+.order-footer-btn {
+ margin-left: 20rpx;
+ height: 60rpx;
+ line-height: 56rpx;
+ box-sizing: border-box;
+ border: solid 1rpx #dddddd;
+ padding: 0 20rpx;
+ font-size: 26rpx;
+ border-radius: 40rpx;
+ float: right;
+}
+
+.order-footer-btn-back {
+ border-color: #378fff;
+ color: #378fff;
+}
diff --git a/pages/user/companyMine/focusedProject/focusedProject.js b/pages/user/companyMine/focusedProject/focusedProject.js
new file mode 100644
index 0000000..c820175
--- /dev/null
+++ b/pages/user/companyMine/focusedProject/focusedProject.js
@@ -0,0 +1,84 @@
+// pages/user/companyMine/focusedProject/focusedProject.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ lists: [],
+ page: 1,
+ has_more: true
+ },
+ onShow() {
+ this.getList();
+ },
+
+ // 获取活动列表
+ getList() {
+ wx.$api.companyModule.getCrowdfundsLike(this.data.page).then(res => {
+ setTimeout(() => {
+ wx.hideLoading({})
+ }, 1000);
+ var lists = this.data.lists.concat(res.data)
+ if (res.page.has_more) {
+ this.setData({
+ has_more: res.page.has_more,
+ page: this.data.page + 1,
+ lists: lists
+ })
+ } else {
+ this.setData({
+ has_more: res.page.has_more,
+ lists: lists
+ })
+ }
+ })
+ },
+ // 触底加载更多
+ onReachBottom() {
+ if (this.data.has_more) {
+ this.getList();
+ } else {
+ wx.showToast({
+ icon: 'none',
+ title: '没有更多',
+ })
+ }
+ },
+ //跳转到详情页
+ goUrl(e) {
+ wx.navigateTo({
+ url: '/pages/home/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id,
+ })
+ },
+ // 取消项目
+ crowdfundsUnLike(e) {
+ var id = e.currentTarget.dataset.id
+ var index = e.currentTarget.dataset.index
+ var arr = this.data.lists
+ var temp = []
+ for (var i = 0; i < arr.length; i++) {
+ if (i != index) {
+ temp.push(arr[i]);
+ }
+ }
+ console.log(temp)
+ wx.showModal({
+ title: '提示',
+ content: '是否确认取消关注',
+ success: res => {
+ if (res.confirm) {
+ wx.showLoading({
+ title: '取消中',
+ })
+ wx.$api.companyModule.crowdfundsUnLike(id).then(res => {
+ this.setData({
+ lists: temp
+ })
+ wx.hideLoading({})
+ });
+ }
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/user/companyMine/focusedProject/focusedProject.json b/pages/user/companyMine/focusedProject/focusedProject.json
new file mode 100644
index 0000000..807cda9
--- /dev/null
+++ b/pages/user/companyMine/focusedProject/focusedProject.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {},
+ "navigationBarTitleText": "项目关注",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#378fff"
+}
\ No newline at end of file
diff --git a/pages/user/companyMine/focusedProject/focusedProject.wxml b/pages/user/companyMine/focusedProject/focusedProject.wxml
new file mode 100644
index 0000000..9a50915
--- /dev/null
+++ b/pages/user/companyMine/focusedProject/focusedProject.wxml
@@ -0,0 +1,12 @@
+
+
+
+ {{item.title}}
+ {{item.status_text}}取消关注
+
+
+
+
+
+ {{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}
+
\ No newline at end of file
diff --git a/pages/user/companyMine/focusedProject/focusedProject.wxss b/pages/user/companyMine/focusedProject/focusedProject.wxss
new file mode 100644
index 0000000..c38bb5b
--- /dev/null
+++ b/pages/user/companyMine/focusedProject/focusedProject.wxss
@@ -0,0 +1,59 @@
+.content {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ box-sizing: border-box;
+ background-color: #fff;
+ padding: 10rpx 20rpx;
+ /* box-shadow: 0 0 5rpx rgba(0, 0, 0, 0.1); */
+ height: 200rpx;
+ margin-top: 10rpx;
+}
+
+.content>image {
+ width: 200rpx;
+ height: 150rpx;
+}
+
+.content .left {
+ width: 100%;
+ margin-left: 20rpx;
+ box-sizing: border-box;
+}
+
+.content .title {
+ height: 120rpx;
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+}
+
+.content .bottom {
+ justify-content: space-between;
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+ box-sizing: border-box;
+ font-size: 24rpx;
+ color: #999;
+ padding: 10rpx 0;
+}
+
+.has_more {
+ color: #999;
+ font-size: 26rpx;
+ text-align: center;
+ padding: 30rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ padding-top: 30rpx;
+}
+
+.has_more image {
+ margin-bottom: 30rpx;
+}
\ No newline at end of file
diff --git a/pages/user/companyMine/myActives/myActives.js b/pages/user/companyMine/myActives/myActives.js
index 1be6ea1..fd07c36 100644
--- a/pages/user/companyMine/myActives/myActives.js
+++ b/pages/user/companyMine/myActives/myActives.js
@@ -43,7 +43,7 @@ Page({
if (res.page.has_more) {
this.setData({
has_more: res.page.has_more,
- page: page + 1,
+ page: this.data.page + 1,
lists: lists
})
} else {
@@ -56,7 +56,6 @@ Page({
},
// 触底加载更多
onReachBottom() {
- console.log('触底')
if (this.data.has_more) {
this.userActives();
} else {
@@ -69,7 +68,7 @@ Page({
//跳转到详情页
goUrl(e) {
wx.navigateTo({
- url: '/pages/companyModule/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id,
+ url: '/pages/home/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id,
})
}
})
\ No newline at end of file
diff --git a/pages/user/index.wxml b/pages/user/index.wxml
index 6351ba4..110d4d5 100644
--- a/pages/user/index.wxml
+++ b/pages/user/index.wxml
@@ -65,12 +65,12 @@
活动参与
-
+
项目预购
-
+
@@ -90,12 +90,13 @@
收货地址
-
+
项目关注
-
+