beifen
This commit is contained in:
@@ -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 () {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
@@ -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',
|
||||
})
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -32,6 +32,11 @@ Page({
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 跳转到个人
|
||||
* 跳转到订单列表
|
||||
*/
|
||||
beSure(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/user/companyMine/companyOrder',
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user