[新增]企业组件配置
This commit is contained in:
@@ -26,6 +26,14 @@ const crowdfunds = (company_id, category_id, page) => req({
|
|||||||
const crowdfundsDetail = crowdfund_id => req({
|
const crowdfundsDetail = crowdfund_id => req({
|
||||||
url: "crowdfunds/" + crowdfund_id
|
url: "crowdfunds/" + crowdfund_id
|
||||||
})
|
})
|
||||||
|
// 获取关注列表
|
||||||
|
const getCrowdfundsLike = page => req({
|
||||||
|
url: "user/crowdfunds",
|
||||||
|
method: "get",
|
||||||
|
data: {
|
||||||
|
page: page
|
||||||
|
}
|
||||||
|
})
|
||||||
//项目关注
|
//项目关注
|
||||||
const crowdfundsLike = crowdfund_id => req({
|
const crowdfundsLike = crowdfund_id => req({
|
||||||
url: "crowdfunds/like",
|
url: "crowdfunds/like",
|
||||||
@@ -148,10 +156,12 @@ const signed = (active_id) => req({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
crowdfundcategory, //项目筹集分类
|
crowdfundcategory, //项目筹集分类
|
||||||
crowdfunds, //根据项目筹集获取列表
|
crowdfunds, //根据项目筹集获取列表
|
||||||
crowdfundsDetail, //项目详情
|
crowdfundsDetail, //项目详情
|
||||||
|
getCrowdfundsLike, //获取已关注列表
|
||||||
crowdfundsLike, //关注项目
|
crowdfundsLike, //关注项目
|
||||||
crowdfundsUnLike, //取消关注项目
|
crowdfundsUnLike, //取消关注项目
|
||||||
crowdfundsCreat, //获取确认订单信息
|
crowdfundsCreat, //获取确认订单信息
|
||||||
|
|||||||
@@ -5,14 +5,17 @@
|
|||||||
|
|
||||||
import {req} from "../request"
|
import {req} from "../request"
|
||||||
|
|
||||||
const index = () => req({url: "orders"}) //全部订单
|
const index = data => req({url: "orders", data: data}) //全部订单
|
||||||
const unpaid = () => req({url: "orders/unpaid"}) //待付款
|
const unpaid = () => req({url: "orders/unpaid"}) //待付款
|
||||||
const paid = () => req({url: "orders/paid"}) //待发货
|
const paid = () => req({url: "orders/paid"}) //待发货
|
||||||
const delive = () => req({url: "orders/delivered"}) //待收货
|
const delive = () => req({url: "orders/delivered"}) //待收货
|
||||||
const refund = () => req({url: "orders/refunds"}) //退款
|
const refund = () => req({url: "orders/refunds"}) //退款
|
||||||
const cancel = (orderId) => req({url: "orders/cancel/" + orderId}) //取消订单
|
const cancel = (orderId) => req({url: "orders/cancel/" + orderId}) //取消订单
|
||||||
const orders = (orderId) => req({url: "orders/" + orderId}) //订单-详情
|
const orders = (orderId) => req({url: "orders/" + orderId}) //订单-详情
|
||||||
const paymen = (orderId) => req({url: "payments/order/" + orderId}) //订单支付-详情
|
const paymen = (orderId) => req({url: "payments/order/" + orderId}) //订单支付-详情
|
||||||
|
const sign = (orderId) => req({url: "orders/sign/" + orderId}) //订单签收
|
||||||
|
const goosRefund = (orderId) => req({url: "orders/refund/" + orderId}) //订单退货
|
||||||
|
const formRefund = (orderId,data) => req({url: "orders/refund/" + orderId, method: "POST", data: data}) //订单退货-提交
|
||||||
|
|
||||||
export default({
|
export default({
|
||||||
index,
|
index,
|
||||||
@@ -22,5 +25,9 @@ export default({
|
|||||||
refund,
|
refund,
|
||||||
cancel,
|
cancel,
|
||||||
orders,
|
orders,
|
||||||
paymen
|
paymen,
|
||||||
|
sign,
|
||||||
|
refund,
|
||||||
|
goosRefund,
|
||||||
|
formRefund
|
||||||
})
|
})
|
||||||
28
app.json
28
app.json
@@ -11,10 +11,31 @@
|
|||||||
"pages/richText/richText",
|
"pages/richText/richText",
|
||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/card/index",
|
"pages/card/index",
|
||||||
|
"pages/user/index",
|
||||||
|
"pages/user/user_coupon/user_coupon",
|
||||||
|
"pages/user/user_coupon_data/user_coupon_data",
|
||||||
"pages/mall/index",
|
"pages/mall/index",
|
||||||
|
"pages/mall/mall_address/mall_address",
|
||||||
|
"pages/mall/mall_address_form/mall_address_form",
|
||||||
|
"pages/mall/mall_assess/mall_assess",
|
||||||
|
"pages/mall/mall_assess_form/mall_assess_form",
|
||||||
|
"pages/mall/mall_cart/mall_cart",
|
||||||
|
"pages/mall/mall_classify/mall_classify",
|
||||||
"pages/mall/mall_details/mall_details",
|
"pages/mall/mall_details/mall_details",
|
||||||
|
"pages/mall/mall_goods/mall_goods",
|
||||||
|
"pages/mall/mall_order/mall_order",
|
||||||
|
"pages/mall/mall_order_data/mall_order_data",
|
||||||
|
"pages/mall/mall_order_submit/mall_order_submit",
|
||||||
|
"pages/mall/mall_pay/mall_pay",
|
||||||
|
"pages/mall/mall_search/mall_search",
|
||||||
|
"pages/mall/mall_video/mall_video",
|
||||||
|
"pages/mall/mall_refund/mall_refund",
|
||||||
"pages/live/index",
|
"pages/live/index",
|
||||||
|
"pages/ticket/goods/goods",
|
||||||
"pages/ticket/index",
|
"pages/ticket/index",
|
||||||
|
"pages/user/companyMine/myActives/myActives",
|
||||||
|
"pages/user/companyMine/focusedProject/focusedProject",
|
||||||
|
"pages/user/companyMine/companyOrder",
|
||||||
"pages/home/index",
|
"pages/home/index",
|
||||||
"pages/home/companyInfo/companyInfo",
|
"pages/home/companyInfo/companyInfo",
|
||||||
"pages/home/noticeDetail/noticeDetail",
|
"pages/home/noticeDetail/noticeDetail",
|
||||||
@@ -59,11 +80,10 @@
|
|||||||
"custom": true
|
"custom": true
|
||||||
},
|
},
|
||||||
"window": {
|
"window": {
|
||||||
"backgroundTextStyle": "light",
|
|
||||||
"navigationBarBackgroundColor": "#fff",
|
"navigationBarBackgroundColor": "#fff",
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarTextStyle": "black"
|
"navigationBarTextStyle": "black"
|
||||||
},
|
},
|
||||||
"style": "v2",
|
"style": "v2",
|
||||||
"sitemapLocation": "sitemap.json"
|
"sitemapLocation": "sitemap.json"
|
||||||
}
|
}
|
||||||
@@ -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: '',
|
info: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
crowdfund_id: '',
|
crowdfund_id: '',
|
||||||
addressDel: {},
|
addressDel:'',
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -41,50 +41,63 @@ Page({
|
|||||||
title: '创建中...',
|
title: '创建中...',
|
||||||
mask: 'true'
|
mask: 'true'
|
||||||
})
|
})
|
||||||
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.address_id, this.data.remark).then(res => {
|
if (this.data.addressDel) {
|
||||||
var data = {};
|
wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.address_id, this.data.remark).then(res => {
|
||||||
if (res.trade_no) {
|
var data = {};
|
||||||
wx.login({
|
if (res.trade_no) {
|
||||||
success: res1 => {
|
wx.login({
|
||||||
data = {
|
success: res1 => {
|
||||||
trade_no: res.trade_no,
|
data = {
|
||||||
code: res1.code
|
trade_no: res.trade_no,
|
||||||
}
|
code: res1.code
|
||||||
wx.$api.companyModule.wechat(data).then(res => {
|
}
|
||||||
var ress = JSON.parse(res);
|
wx.$api.companyModule.wechat(data).then(res => {
|
||||||
wx.hideLoading({});
|
var ress = JSON.parse(res);
|
||||||
wx.requestPayment({
|
wx.hideLoading({});
|
||||||
timeStamp: ress.timeStamp,
|
wx.requestPayment({
|
||||||
nonceStr: ress.nonceStr,
|
timeStamp: ress.timeStamp,
|
||||||
package: ress.package,
|
nonceStr: ress.nonceStr,
|
||||||
signType: 'MD5',
|
package: ress.package,
|
||||||
paySign: ress.paySign,
|
signType: 'MD5',
|
||||||
success: res => {
|
paySign: ress.paySign,
|
||||||
wx.showToast({
|
success: res => {
|
||||||
title: '创建订单成功',
|
wx.showToast({
|
||||||
})
|
title: '创建订单成功',
|
||||||
wx.navigateTo({
|
})
|
||||||
url: '/pages/home/projectSuccess/projectSuccess?crowdfund_id=' + this.data.crowdfund_id,
|
wx.navigateTo({
|
||||||
})
|
url: '/pages/home/projectSuccess/projectSuccess?crowdfund_id=' + this.data.crowdfund_id,
|
||||||
},
|
})
|
||||||
fail(res) {
|
},
|
||||||
wx.showToast({
|
fail(res) {
|
||||||
title: '支付失败',
|
wx.showToast({
|
||||||
})
|
title: '支付失败',
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(res => {
|
||||||
|
console.log(res)
|
||||||
})
|
})
|
||||||
}).catch(res => {
|
}
|
||||||
console.log(res)
|
})
|
||||||
})
|
}
|
||||||
}
|
}).catch(res => {
|
||||||
})
|
wx.navigateBack({})
|
||||||
}
|
})
|
||||||
}).catch(res => {
|
} else {
|
||||||
wx.navigateBack({})
|
wx.hideLoading({
|
||||||
})
|
success: (res) => {
|
||||||
|
wx.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请选择收货地址',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 跳转到地址列表和新增地址页面
|
// 跳转到地址列表和新增地址页面
|
||||||
goAddress(){
|
goAddress() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall/mall_address/mall_address?type=selectAddress',
|
url: '/pages/mall/mall_address/mall_address?type=selectAddress',
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,10 +7,9 @@ Page({
|
|||||||
selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3
|
selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3
|
||||||
company_id: wx.getStorageSync('company_id'), //企业Id,
|
company_id: wx.getStorageSync('company_id'), //企业Id,
|
||||||
info: '', //企业信息
|
info: '', //企业信息
|
||||||
loaded:false
|
loaded: false
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
},
|
},
|
||||||
|
onLoad(e) {},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.company(wx.getStorageSync('company_id'))
|
this.company(wx.getStorageSync('company_id'))
|
||||||
},
|
},
|
||||||
@@ -57,12 +56,20 @@ Page({
|
|||||||
* 请求项目筹集分类接口
|
* 请求项目筹集分类接口
|
||||||
*/
|
*/
|
||||||
company() {
|
company() {
|
||||||
|
wx.showLoading({
|
||||||
|
title: 'title',
|
||||||
|
mask: 'true'
|
||||||
|
})
|
||||||
wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => {
|
wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.setData({
|
this.setData({
|
||||||
info: res,
|
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')
|
console.log('1111')
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall/index',
|
url: '/pages/mall/index',
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
border-bottom: solid 2rpx #f7f7f7;
|
border-bottom: solid 2rpx #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item_title{
|
.item_title{
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 跳转到个人
|
* 跳转到订单列表
|
||||||
*/
|
*/
|
||||||
|
beSure(){
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/user/companyMine/companyOrder',
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -80,6 +80,10 @@ page {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
display:-webkit-box;
|
||||||
|
-webkit-line-clamp:3;
|
||||||
|
-webkit-box-orient:vertical;
|
||||||
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
.share_content .des{
|
.share_content .des{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@@ -66,22 +66,24 @@ Page({
|
|||||||
if(i.is_check){
|
if(i.is_check){
|
||||||
sellerLength++
|
sellerLength++
|
||||||
if(sellerLength == goodsList.length){
|
if(sellerLength == goodsList.length){
|
||||||
this.setData({
|
goodsList[goodsIndex].is_check = true
|
||||||
allCheckbox: true
|
// this.setData({
|
||||||
})
|
// allCheckbox: true
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(this.data.allCheckbox){
|
goodsList[goodsIndex].is_check = false
|
||||||
this.setData({
|
this.setData({
|
||||||
allCheckbox: false
|
allCheckbox: false
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
carArr : goodsList
|
carArr : goodsList
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.allCheckbox('checkbox')
|
||||||
|
|
||||||
// 获取计算价格
|
// 获取计算价格
|
||||||
this.totalPrice()
|
this.totalPrice()
|
||||||
},
|
},
|
||||||
@@ -89,25 +91,35 @@ Page({
|
|||||||
/**
|
/**
|
||||||
* 全选
|
* 全选
|
||||||
*/
|
*/
|
||||||
allCheckbox(){
|
allCheckbox(type){
|
||||||
let bagList = this.data.carArr,
|
let goodsList = this.data.carArr,
|
||||||
|
goodsLenght = 0,
|
||||||
allCheckbox = this.data.allCheckbox
|
allCheckbox = this.data.allCheckbox
|
||||||
|
|
||||||
|
if (type == 'checkbox'){
|
||||||
|
for (let j in goodsList) {
|
||||||
|
if (goodsList[j].is_check) {
|
||||||
|
goodsLenght++
|
||||||
|
if (goodsLenght == goodsList.length) {
|
||||||
|
allCheckbox = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
allCheckbox = !allCheckbox
|
allCheckbox = !allCheckbox
|
||||||
|
|
||||||
for(let i of bagList){
|
for (var i in goodsList){
|
||||||
i.is_check = allCheckbox
|
goodsList[i].is_check = allCheckbox
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
paramsCart : params,
|
|
||||||
allCheckbox : allCheckbox,
|
allCheckbox : allCheckbox,
|
||||||
carArr : bagList
|
carArr : goodsList
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
console.log(this.data.paramsCart)
|
|
||||||
|
|
||||||
// 获取计算价格
|
// 获取计算价格
|
||||||
this.totalPrice()
|
this.totalPrice()
|
||||||
},
|
},
|
||||||
@@ -160,6 +172,7 @@ Page({
|
|||||||
goodsList = this.data.carArr
|
goodsList = this.data.carArr
|
||||||
|
|
||||||
for (let i of goodsList){
|
for (let i of goodsList){
|
||||||
|
console.log(goodsList)
|
||||||
if(i.is_check){
|
if(i.is_check){
|
||||||
bagNumber = bagNumber + i.number
|
bagNumber = bagNumber + i.number
|
||||||
allPrice = allPrice + i.total
|
allPrice = allPrice + i.total
|
||||||
|
|||||||
@@ -285,8 +285,17 @@ Page({
|
|||||||
* 用户点击右上角分享
|
* 用户点击右上角分享
|
||||||
*/
|
*/
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
|
console.log(this.data.storyData.cover)
|
||||||
this.setData({
|
this.setData({
|
||||||
shareShow: false
|
shareShow: false
|
||||||
})
|
})
|
||||||
|
return({
|
||||||
|
title : "#" + this.data.storyData.title,
|
||||||
|
path : '/pages/mall/mall_details/mall_details?id=' + this.data.storyData.id + '&nameList=share',
|
||||||
|
imageUrl: this.data.storyData.cover
|
||||||
|
})
|
||||||
|
|
||||||
|
// + '&share_user_id=' + app.globalData.userInfo.user_id || 0
|
||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -27,7 +27,9 @@
|
|||||||
<view class="goods-title-name">{{storyData.title}}</view>
|
<view class="goods-title-name">{{storyData.title}}</view>
|
||||||
<view class="nowrap-multi goods-title-text">{{storyData.description}}</view>
|
<view class="nowrap-multi goods-title-text">{{storyData.description}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goodsMember">
|
|
||||||
|
<!-- 暂时隐藏 -->
|
||||||
|
<view class="goodsMember" style="display: none">
|
||||||
<view class="goodsMember-name">
|
<view class="goodsMember-name">
|
||||||
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_member_grey.png"></image>开通会员,尊享会员价
|
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_member_grey.png"></image>开通会员,尊享会员价
|
||||||
</view>
|
</view>
|
||||||
@@ -35,7 +37,8 @@
|
|||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-tips">
|
<!-- 暂时隐藏 -->
|
||||||
|
<view class="goods-tips" style="display: none">
|
||||||
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_gold.png"></image>
|
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_gold.png"></image>
|
||||||
分享奖 <text>¥{{changeSku.prices.bonus1}}</text>
|
分享奖 <text>¥{{changeSku.prices.bonus1}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -135,16 +138,19 @@
|
|||||||
<image src="/static/mall_icon/mallDetails_service.png"></image>
|
<image src="/static/mall_icon/mallDetails_service.png"></image>
|
||||||
客服
|
客服
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator hover-class="none" url="/pages/mall_cart/mall_cart" class="footer-img-tool">
|
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="footer-img-tool">
|
||||||
<image src="/static/mall_icon/mallDetails_car.png"></image>
|
<image src="/static/mall_icon/mallDetails_car.png"></image>
|
||||||
购物车
|
购物车
|
||||||
<text>1</text>
|
<!-- <text>1</text> -->
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer-btn" bindtap="specsTap">
|
<view class="footer-btn" bindtap="specsTap" wx:if="{{changeSku.prices.stock > 0}}">
|
||||||
<view class="footer-btn-car">加入购物车</view>
|
<view class="footer-btn-car">加入购物车</view>
|
||||||
<view class="footer-btn-buy">立即购买</view>
|
<view class="footer-btn-buy">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="footer-btn" wx:else>
|
||||||
|
<view class="footer-btn-stock">暂无库存</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 优惠券弹出层 -->
|
<!-- 优惠券弹出层 -->
|
||||||
@@ -171,7 +177,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="couponEject-list-name">{{item.title}}<text>无门槛免费使用</text></view>
|
<view class="couponEject-list-name">{{item.title}}<text>无门槛免费使用</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{!item.isHave}}" class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}" bindtap="drawTap" data-id="{{item.id}}">
|
<view wx:if="{{!item.isHave}}"
|
||||||
|
class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}"
|
||||||
|
bindtap="drawTap" data-id="{{item.id}}">
|
||||||
立即领取
|
立即领取
|
||||||
</view>
|
</view>
|
||||||
<view wx:else class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}">
|
<view wx:else class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}">
|
||||||
@@ -193,7 +201,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="couponDraw-list-text">
|
<view class="couponDraw-list-text">
|
||||||
<view class="couponDraw-list-name">{{item.title}}<text>{{item.type_text == '免费券' ? '免费券' : item.full}}</text></view>
|
<view class="couponDraw-list-name">
|
||||||
|
{{item.title}}<text>{{item.type_text == '免费券' ? '免费券' : item.full}}</text></view>
|
||||||
<view class="couponDraw-list-btn" bindtap="drawTap" data-id="{{item.id}}">立即领取</view>
|
<view class="couponDraw-list-btn" bindtap="drawTap" data-id="{{item.id}}">立即领取</view>
|
||||||
<view class="couponDraw-list-time">{{item.start_at}} - {{item.end_at}}</view>
|
<view class="couponDraw-list-time">{{item.start_at}} - {{item.end_at}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -252,23 +261,24 @@
|
|||||||
<!-- 分享弹出 -->
|
<!-- 分享弹出 -->
|
||||||
<view class="share-back {{shareShow ? 'active':''}}" bindtap="shareLayEnd"></view>
|
<view class="share-back {{shareShow ? 'active':''}}" bindtap="shareLayEnd"></view>
|
||||||
<view class="share-layer {{shareShow ? 'active':''}}">
|
<view class="share-layer {{shareShow ? 'active':''}}">
|
||||||
<view class="share-title">
|
<view class="share-title">
|
||||||
<text>分享</text>
|
<text>分享</text>
|
||||||
<image class="share-close" src="/static/mall_icon/close_icon.png" mode="aspectFill" bindtap="shareLayEnd"></image>
|
<image class="share-close" src="/static/mall_icon/close_icon.png" mode="aspectFill" bindtap="shareLayEnd">
|
||||||
</view>
|
</image>
|
||||||
<view class="share-cont">
|
</view>
|
||||||
<button class="share-list share-list-after" hover-class="none" open-type="share">
|
<view class="share-cont">
|
||||||
<view class="share-list-img">
|
<button class="share-list share-list-after" hover-class="none" open-type="share">
|
||||||
<image src="/static/mall_icon/share_wx.png" mode="aspectFill"></image>
|
<view class="share-list-img">
|
||||||
</view>
|
<image src="/static/mall_icon/share_wx.png" mode="aspectFill"></image>
|
||||||
<view class="share-list-text">微信好友</view>
|
</view>
|
||||||
</button>
|
<view class="share-list-text">微信好友</view>
|
||||||
<button class="share-list" hover-class="none" bindtap="canvasCode">
|
</button>
|
||||||
<view class="share-list-img">
|
<!-- <button class="share-list" hover-class="none" bindtap="canvasCode">
|
||||||
<image src="/static/mall_icon/share_pyq.png" mode="aspectFill"></image>
|
<view class="share-list-img">
|
||||||
</view>
|
<image src="/static/mall_icon/share_pyq.png" mode="aspectFill"></image>
|
||||||
<view class="share-list-text">海报分享</view>
|
</view>
|
||||||
</button>
|
<view class="share-list-text">海报分享</view>
|
||||||
</view>
|
</button> -->
|
||||||
<view class="share-tips">好物推荐,和大家一起分享你发现的好物</view>
|
</view>
|
||||||
|
<view class="share-tips">好物推荐,和大家一起分享你发现的好物</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -440,6 +440,12 @@ view.footer-btn-buy {
|
|||||||
background-color: #f97b35;
|
background-color: #f97b35;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer-btn-stock {
|
||||||
|
width: 100% !important;
|
||||||
|
background-color: #999;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
/* 优惠券弹出层 */
|
/* 优惠券弹出层 */
|
||||||
.couponBack,
|
.couponBack,
|
||||||
.specsBack {
|
.specsBack {
|
||||||
@@ -470,6 +476,11 @@ view.footer-btn-buy {
|
|||||||
transition: .2s;
|
transition: .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.couponEject {
|
||||||
|
max-height: 70%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
.couponEject.active,
|
.couponEject.active,
|
||||||
.specsEject.active {
|
.specsEject.active {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
stateType : 'all', //订单类型
|
stateType : 'index', //订单类型
|
||||||
orderArr : [], //订单列表
|
orderArr : [], //订单列表
|
||||||
|
page : {}, //分页信息
|
||||||
|
lodingStats : false //加载状态
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,41 +49,22 @@ Page({
|
|||||||
/**
|
/**
|
||||||
* 订单列表
|
* 订单列表
|
||||||
*/
|
*/
|
||||||
orderInfo(){
|
orderInfo(page){
|
||||||
let stateType = this.data.stateType
|
let stateType = this.data.stateType
|
||||||
|
wx.$api.order[stateType]({
|
||||||
if(stateType == 'all') {
|
page : page || ''
|
||||||
wx.$api.order.index().then(res=>{
|
}).then(res=>{
|
||||||
this.setData({
|
console.log(res)
|
||||||
orderArr : res.data
|
let listArr = this.data.orderArr,
|
||||||
})
|
newData = []
|
||||||
|
if(page == 1 || page == undefined) listArr = []
|
||||||
|
newData = listArr.concat(res.data)
|
||||||
|
this.setData({
|
||||||
|
orderArr : newData,
|
||||||
|
page : res.page,
|
||||||
|
lodingStats : false
|
||||||
})
|
})
|
||||||
} 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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,9 +83,44 @@ Page({
|
|||||||
*/
|
*/
|
||||||
orderDelete(e) {
|
orderDelete(e) {
|
||||||
let orderId = e.currentTarget.dataset.orderid
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
wx.$api.orders.cancel(orderId).then(res=>{
|
wx.$api.order.cancel(orderId).then(res=>{
|
||||||
// 获取列表
|
// 获取列表
|
||||||
this.orderInfo()
|
this.orderInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收订单
|
||||||
|
*/
|
||||||
|
orderSign(e) {
|
||||||
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
|
wx.$api.order.sign(orderId).then(res=>{
|
||||||
|
// 获取列表
|
||||||
|
this.orderInfo()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
// 获取订单列表
|
||||||
|
this.orderInfo()
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上拉加载
|
||||||
|
*/
|
||||||
|
onReachBottom(){
|
||||||
|
this.setData({
|
||||||
|
lodingStats: true
|
||||||
|
})
|
||||||
|
let pageNumber = this.data.page.current
|
||||||
|
if(this.data.page.has_more){
|
||||||
|
pageNumber++
|
||||||
|
|
||||||
|
// 获取订单列表
|
||||||
|
this.orderInfo(pageNumber)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"usingComponents" : {},
|
"usingComponents" : {},
|
||||||
"navigationBarTitleText" : "订单列表"
|
"navigationBarTitleText" : "订单列表",
|
||||||
|
"enablePullDownRefresh" : true
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<!-- 订单tab -->
|
<!-- 订单tab -->
|
||||||
<view class="order-tab">
|
<view class="order-tab">
|
||||||
<view class="order-tab-item {{stateType == 'all' ? 'active':''}}" data-state="all" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'index' ? 'active':''}}" data-state="index" bindtap="orderTab">
|
||||||
全部
|
全部
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == 'unpaid' ? 'active':''}}" data-state="unpaid" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'unpaid' ? 'active':''}}" data-state="unpaid" bindtap="orderTab">
|
||||||
@@ -12,8 +12,9 @@
|
|||||||
<view class="order-tab-item {{stateType == 'delive' ? 'active':''}}" data-state="delive" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'delive' ? 'active':''}}" data-state="delive" bindtap="orderTab">
|
||||||
待收货
|
待收货
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == 'refunds' ? 'active':''}}" data-state="refunds" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'refund' ? 'active':''}}" data-state="refund" bindtap="orderTab">
|
||||||
已完成 <!-- 退款 -->
|
申请退款
|
||||||
|
<!-- 退款 -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content" wx:if="{{orderArr != ''}}">
|
<view class="order-content" wx:if="{{orderArr != ''}}">
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
<view class="order-company-name">
|
<view class="order-company-name">
|
||||||
<image class="order-logo" src="/static/mall_icon/mallDetails_user.png"></image>
|
<image class="order-logo" src="/static/mall_icon/mallDetails_user.png"></image>
|
||||||
{{goods.orderid}}
|
{{goods.orderid}}
|
||||||
<image class="order-arrow" src="/static/mall_icon/mall_arrow.png"></image>
|
<!-- <image class="order-arrow" src="/static/mall_icon/mall_arrow.png"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="order-company-state">
|
<view class="order-company-state">
|
||||||
{{goods.state_text}}
|
{{goods.state_text}}
|
||||||
@@ -39,13 +40,27 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-footer">
|
<view class="order-footer">
|
||||||
<view class="order-footer-btn order-footer-btn-back" wx:if="{{goods.canPay == true}}" data-orderid="{{goods.orderid}}"
|
<view class="order-footer-btn order-footer-btn-back" wx:if="{{goods.canPay == true}}"
|
||||||
bindtap="orderPay">立即支付</view>
|
data-orderid="{{goods.orderid}}" bindtap="orderPay">立即支付</view>
|
||||||
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
|
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
|
||||||
bindtap="orderDelete">取消订单</view>
|
bindtap="orderDelete">取消订单</view>
|
||||||
<navigator hover-class="none" url="/pages/mall/mall_order_data/mall_order_data?orderId={{goods.orderid}}" class="order-footer-btn">订单详情</navigator>
|
<view class="order-footer-btn" wx:if="{{goods.canSign == true}}"
|
||||||
|
data-orderid="{{goods.orderid}}" bindtap="orderSign">
|
||||||
|
立即签收
|
||||||
|
</view>
|
||||||
|
<navigator class="order-footer-btn" wx:if="{{goods.canRefund == true}}" url="/pages/mall/mall_refund/mall_refund?orderId={{goods.orderid}}">申请退款</navigator>
|
||||||
|
<navigator hover-class="none" url="/pages/mall/mall_order_data/mall_order_data?orderId={{goods.orderid}}"
|
||||||
|
class="order-footer-btn">订单详情</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="pagesLoding" wx:if="{{lodingStats}}">
|
||||||
|
<block wx:if="{{page.has_more}}">
|
||||||
|
<image class="pagesLoding-icon" src="/static/icons/loding.gif" mode="widthFix"></image>加载中...
|
||||||
|
</block>
|
||||||
|
<block wx:else>
|
||||||
|
没有更多了~
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view wx:else class="pack-center pages-hint">
|
<view wx:else class="pack-center pages-hint">
|
||||||
|
|||||||
@@ -156,3 +156,23 @@ page {
|
|||||||
border-color: #eb532a;
|
border-color: #eb532a;
|
||||||
color: #eb532a;
|
color: #eb532a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 页面信息提醒
|
||||||
|
*/
|
||||||
|
|
||||||
|
.pages-loding {
|
||||||
|
text-align: center;
|
||||||
|
color: #747788;
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pages-loding image {
|
||||||
|
width: 38rpx;
|
||||||
|
height: 38rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagesLoding {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
@@ -18,7 +18,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
console.log(options.orderId)
|
|
||||||
this.orderData(options.orderId)
|
this.orderData(options.orderId)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -52,6 +51,9 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回订单
|
||||||
|
*/
|
||||||
orderRun() {
|
orderRun() {
|
||||||
wx.navigateBack({
|
wx.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
@@ -80,4 +82,16 @@ Page({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收订单
|
||||||
|
*/
|
||||||
|
orderSign(e) {
|
||||||
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
|
wx.$api.order.sign(orderId).then(res=>{
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/mall/mall_order/mall_order',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
})
|
})
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<view class="orderGoods-company">
|
<view class="orderGoods-company">
|
||||||
<image class="orderGoods-logo" src="/static/mall_icon/mallDetails_user.png"></image>
|
<image class="orderGoods-logo" src="/static/mall_icon/mallDetails_user.png"></image>
|
||||||
{{orderData.type_text}}
|
{{orderData.type_text}}
|
||||||
<image class="orderGoods-arrow" src="/static/mall_icon/mall_arrow.png"></image>
|
<!-- <image class="orderGoods-arrow" src="/static/mall_icon/mall_arrow.png"></image> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="orderGoods-goods-li" wx:for="{{orderData.items}}" wx:key="items">
|
<view class="orderGoods-goods-li" wx:for="{{orderData.items}}" wx:key="items">
|
||||||
<image class="orderGoods-img" src="{{item.cover}}" mode="aspectFill"></image>
|
<image class="orderGoods-img" src="{{item.cover}}" mode="aspectFill"></image>
|
||||||
@@ -58,14 +58,14 @@
|
|||||||
<view class="order-total-name">运费</view>
|
<view class="order-total-name">运费</view>
|
||||||
¥{{orderData.freight}}
|
¥{{orderData.freight}}
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="order-total-li">
|
|
||||||
<view class="order-total-name">优惠</view>
|
|
||||||
-¥10.00
|
|
||||||
</view> -->
|
|
||||||
<view class="order-total-li">
|
<view class="order-total-li">
|
||||||
<view class="order-total-name">需付款</view>
|
<view class="order-total-name">优惠</view>
|
||||||
|
¥{{orderData.coupons_all_price}}
|
||||||
|
</view>
|
||||||
|
<view class="order-total-li">
|
||||||
|
<view class="order-total-name">实际付款</view>
|
||||||
<view class="coupon-picker-red">
|
<view class="coupon-picker-red">
|
||||||
¥{{orderData.amount}}
|
¥{{orderData.total}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -82,7 +82,11 @@
|
|||||||
<view class="orderFooter-btn orderFooter-btn-back" wx:if="{{orderData.canPay == true}}" data-orderid="{{orderData.orderid}}" bindtap="orderPay">
|
<view class="orderFooter-btn orderFooter-btn-back" wx:if="{{orderData.canPay == true}}" data-orderid="{{orderData.orderid}}" bindtap="orderPay">
|
||||||
立即支付
|
立即支付
|
||||||
</view>
|
</view>
|
||||||
<!-- <navigator class="orderFooter-btn orderFooter-btn-back" url="">申请退货</navigator> -->
|
<view class="orderFooter-btn" wx:if="{{orderData.canSign == true}}" data-orderid="{{orderData.orderid}}" bindtap="orderSign">
|
||||||
|
立即签收
|
||||||
|
</view>
|
||||||
|
<navigator class="orderFooter-btn" wx:if="{{orderData.canRefund == true}}" url="/pages/mall/mall_refund/mall_refund?orderId={{orderData.orderid}}">申请退款</navigator>
|
||||||
|
|
||||||
<!-- <view class="orderFooter-btn" bindtap="logisticsShow">查看物流</view> -->
|
<!-- <view class="orderFooter-btn" bindtap="logisticsShow">查看物流</view> -->
|
||||||
<view class="orderFooter-btn" bindtap="orderRun">返回订单</view>
|
<view class="orderFooter-btn" bindtap="orderRun">返回订单</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -107,7 +107,43 @@ Page({
|
|||||||
remark : this.data.remark,
|
remark : this.data.remark,
|
||||||
address_id : this.data.addressDel.address_id
|
address_id : this.data.addressDel.address_id
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log(res)
|
let trade_no = res.trade_no
|
||||||
|
// 获取code
|
||||||
|
wx.login({
|
||||||
|
success: res=>{
|
||||||
|
wx.$api.mall.wechat({
|
||||||
|
code : res.code,
|
||||||
|
trade_no : trade_no
|
||||||
|
}).then(res=>{
|
||||||
|
let payInfo = JSON.parse(res)
|
||||||
|
wx.requestPayment({
|
||||||
|
timeStamp: payInfo.timeStamp,
|
||||||
|
nonceStr : payInfo.nonceStr,
|
||||||
|
package : payInfo.package,
|
||||||
|
paySign : payInfo.paySign,
|
||||||
|
signType : payInfo.signType,
|
||||||
|
success : res=>{
|
||||||
|
if(res.errMsg == "requestPayment:ok"){
|
||||||
|
wx.showToast({
|
||||||
|
title: '支付成功',
|
||||||
|
icon : 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/mall/mall_order/mall_order'
|
||||||
|
})
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail : res=>{
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.$api.mall.orderBuy({
|
wx.$api.mall.orderBuy({
|
||||||
@@ -117,35 +153,43 @@ Page({
|
|||||||
remark : this.data.remark,
|
remark : this.data.remark,
|
||||||
address_id : this.data.addressDel.address_id
|
address_id : this.data.addressDel.address_id
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
wx.$api.mall.wechat({
|
let trade_no = res.trade_no
|
||||||
trade_no : res.trade_no
|
|
||||||
}).then(res=>{
|
// 获取code
|
||||||
let payInfo = JSON.parse(res)
|
wx.login({
|
||||||
wx.requestPayment({
|
success: res=>{
|
||||||
timeStamp: payInfo.timeStamp,
|
wx.$api.mall.wechat({
|
||||||
nonceStr : payInfo.nonceStr,
|
code : res.code,
|
||||||
package : payInfo.package,
|
trade_no : trade_no
|
||||||
paySign : payInfo.paySign,
|
}).then(res=>{
|
||||||
signType : payInfo.signType,
|
let payInfo = JSON.parse(res)
|
||||||
success : res=>{
|
wx.requestPayment({
|
||||||
if(res.errMsg == "requestPayment:ok"){
|
timeStamp: payInfo.timeStamp,
|
||||||
wx.showToast({
|
nonceStr : payInfo.nonceStr,
|
||||||
title: '支付成功',
|
package : payInfo.package,
|
||||||
icon : 'success'
|
paySign : payInfo.paySign,
|
||||||
})
|
signType : payInfo.signType,
|
||||||
setTimeout(()=>{
|
success : res=>{
|
||||||
|
if(res.errMsg == "requestPayment:ok"){
|
||||||
|
wx.showToast({
|
||||||
|
title: '支付成功',
|
||||||
|
icon : 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/pages/mall/mall_order/mall_order'
|
||||||
|
})
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail : res=>{
|
||||||
wx.reLaunch({
|
wx.reLaunch({
|
||||||
url: '/pages/mall/mall_order/mall_order'
|
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
||||||
})
|
})
|
||||||
},2000)
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
fail : res=>{
|
|
||||||
wx.reLaunch({
|
|
||||||
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,36 +36,41 @@ Page({
|
|||||||
* 订单支付
|
* 订单支付
|
||||||
*/
|
*/
|
||||||
payment() {
|
payment() {
|
||||||
wx.$api.mall.wechat({
|
// 获取code
|
||||||
trade_no : this.data.orderData.trade_no
|
wx.login({
|
||||||
}).then(res=>{
|
success: res=>{
|
||||||
console.log(res)
|
wx.$api.mall.wechat({
|
||||||
let payInfo = JSON.parse(res)
|
code : res.code,
|
||||||
wx.requestPayment({
|
trade_no : this.data.orderData.trade_no
|
||||||
timeStamp: payInfo.timeStamp,
|
}).then(res=>{
|
||||||
nonceStr : payInfo.nonceStr,
|
let payInfo = JSON.parse(res)
|
||||||
package : payInfo.package,
|
wx.requestPayment({
|
||||||
paySign : payInfo.paySign,
|
timeStamp: payInfo.timeStamp,
|
||||||
signType : payInfo.signType,
|
nonceStr : payInfo.nonceStr,
|
||||||
success : res=>{
|
package : payInfo.package,
|
||||||
if(res.errMsg == "requestPayment:ok"){
|
paySign : payInfo.paySign,
|
||||||
wx.showToast({
|
signType : payInfo.signType,
|
||||||
title: '支付成功',
|
success : res=>{
|
||||||
icon : 'success'
|
if(res.errMsg == "requestPayment:ok"){
|
||||||
})
|
wx.showToast({
|
||||||
setTimeout(()=>{
|
title: '支付成功',
|
||||||
|
icon : 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/pages/mall/mall_order/mall_order?stateType=all'
|
||||||
|
})
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail : res=>{
|
||||||
wx.reLaunch({
|
wx.reLaunch({
|
||||||
url: '/pages/mall/mall_order/mall_order?stateType=all'
|
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
||||||
})
|
})
|
||||||
},2000)
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
fail : res=>{
|
|
||||||
wx.reLaunch({
|
|
||||||
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
131
pages/mall/mall_refund/mall_refund.js
Normal file
131
pages/mall/mall_refund/mall_refund.js
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
/*
|
||||||
|
* 手太欠
|
||||||
|
* 企获客商城
|
||||||
|
*/
|
||||||
|
|
||||||
|
const app = getApp()
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
orderId : '', //商品id
|
||||||
|
orderData : '', //退货商品
|
||||||
|
refundTitle : [], //退货理由
|
||||||
|
refundType : '', //退货类型
|
||||||
|
refundIndex : 0, //退货理由index
|
||||||
|
title : '', //退款原因
|
||||||
|
typeIndex : 0, //退货类型index
|
||||||
|
imgs : [], //图片页面显示
|
||||||
|
paths : [], //图片上传服务器
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
this.setData({
|
||||||
|
orderId: options.orderId
|
||||||
|
})
|
||||||
|
wx.$api.order.goosRefund(options.orderId).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.setData({
|
||||||
|
orderData : res.order,
|
||||||
|
refundTitle : res.refund_title,
|
||||||
|
refundType : res.refund_type
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
*选择退款原因
|
||||||
|
*/
|
||||||
|
refundChange(e) {
|
||||||
|
this.setData({
|
||||||
|
refundIndex : e.detail.value
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传图片
|
||||||
|
*/
|
||||||
|
|
||||||
|
formUploadFile(){
|
||||||
|
let count = 9 - this.data.imgs.length
|
||||||
|
wx.chooseImage({
|
||||||
|
count : count,
|
||||||
|
success : res=>{
|
||||||
|
// 上传图片
|
||||||
|
if (res.tempFilePaths){
|
||||||
|
let pathArr = res.tempFilePaths
|
||||||
|
wx.showLoading({
|
||||||
|
title: '上传中',
|
||||||
|
})
|
||||||
|
for (let i = 0; i < pathArr.length; i++){
|
||||||
|
wx.$api.file.uploadImg(pathArr[i], {}).then(res=>{
|
||||||
|
let imgArr = this.data.imgs,
|
||||||
|
pathArr = this.data.paths
|
||||||
|
imgArr.push(res.showpath)
|
||||||
|
pathArr.push(res.path)
|
||||||
|
this.setData({
|
||||||
|
imgs : imgArr,
|
||||||
|
paths: pathArr
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (i == pathArr.length - 1) {
|
||||||
|
wx.hideLoading()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
wx.showToast({
|
||||||
|
title: '上传图片失败',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除图片
|
||||||
|
*/
|
||||||
|
removeImg(e){
|
||||||
|
let imgArr = this.data.imgs,
|
||||||
|
pathArr = this.data.paths,
|
||||||
|
index = e.currentTarget.dataset.index
|
||||||
|
|
||||||
|
imgArr.splice(index, 1)
|
||||||
|
pathArr.splice(index, 1)
|
||||||
|
|
||||||
|
this.setData({
|
||||||
|
imgs : imgArr,
|
||||||
|
paths : pathArr
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请退货
|
||||||
|
*/
|
||||||
|
refundSign(e) {
|
||||||
|
let refundTitle = this.data.refundTitle,
|
||||||
|
refundIndex = this.data.refundIndex,
|
||||||
|
remark = e.detail.value.remark,
|
||||||
|
paths = this.data.paths
|
||||||
|
|
||||||
|
console.log(paths)
|
||||||
|
|
||||||
|
wx.$api.order.formRefund(this.data.orderId,{
|
||||||
|
title : refundTitle[refundIndex].title,
|
||||||
|
remark : remark,
|
||||||
|
type : 1,
|
||||||
|
pictures: paths
|
||||||
|
}).then(res => {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '/pages/mall/mall_order/mall_order',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
4
pages/mall/mall_refund/mall_refund.json
Normal file
4
pages/mall/mall_refund/mall_refund.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"usingComponents" : {},
|
||||||
|
"navigationBarTitleText": "退款"
|
||||||
|
}
|
||||||
87
pages/mall/mall_refund/mall_refund.wxml
Normal file
87
pages/mall/mall_refund/mall_refund.wxml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<form bindsubmit="refundSign">
|
||||||
|
<view class="refund-content">
|
||||||
|
<!-- 退货产品 -->
|
||||||
|
<view class="refund-goods">
|
||||||
|
<view class="refund-good" wx:for="{{orderData.items}}" wx:key="index">
|
||||||
|
<image class="refund-good-cover" src="{{item.cover}}"></image>
|
||||||
|
<view class="refund-good-info">
|
||||||
|
<view class="refund-good-title nowrap">{{item.title}}</view>
|
||||||
|
<view class="refund-good-value nowrap">{{item.value}}</view>
|
||||||
|
<view class="refund-good-price nowrap">单价:<text>{{item.price}}</text> X {{item.qty}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 产品信息 -->
|
||||||
|
<view class="refund-statistical">
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
商品总金额
|
||||||
|
<label class="refund-statistical-item-label">¥{{orderData.amount || '0.00'}}</label>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
运费
|
||||||
|
<label class="refund-statistical-item-label">¥{{orderData.freight || '0.00'}}</label>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
优惠券抵扣
|
||||||
|
<label class="refund-statistical-item-label">¥{{orderData.coupons_all_price || '0.00'}}</label>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
实际支付金额
|
||||||
|
<label class="refund-statistical-item-label">¥{{orderData.total || '0'}}</label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 退款原因 -->
|
||||||
|
<view class="refund-statistical refund-info">
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
退款金额
|
||||||
|
<label
|
||||||
|
class="refund-statistical-item-label refund-info-item-label">¥{{orderData.total || '0.00'}}</label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical refund-info">
|
||||||
|
<view class="refund-statistical-item refundTitle-item">
|
||||||
|
选择退款原因
|
||||||
|
<picker bindchange="refundChange" range-key="remark" value="{{refundIndex}}" range="{{refundTitle}}">
|
||||||
|
<view class="picker">
|
||||||
|
{{refundTitle[refundIndex].remark}}
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical refund-info">
|
||||||
|
<view class="refund-statistical-item">
|
||||||
|
退款类型
|
||||||
|
<label class="refund-statistical-item-label">{{refundType[1]}}</label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical refund-info">
|
||||||
|
<view class="refund-info-item-text">
|
||||||
|
退款原因
|
||||||
|
<textarea class="refund-info-item-textarea" placeholder="输入退款原因" name="remark"></textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-statistical refund-info">
|
||||||
|
<view class="refund-info-item-text">
|
||||||
|
添加图片
|
||||||
|
<view class="issue-info-img">
|
||||||
|
<view class="issue-info-img-itme issue-info-img-tag" wx:for="{{imgs}}" wx:key="imgs">
|
||||||
|
<image class="form-img" mode="aspectFill" src="{{item}}"></image>
|
||||||
|
<text class="issue-info-img-remove" data-index="{{index}}" bindtap="removeImg">×</text>
|
||||||
|
</view>
|
||||||
|
<view class="issue-info-img-itme" wx:if="{{imgs.length < 9}}">
|
||||||
|
<view class="issue-info-img-add" bindtap="formUploadFile">
|
||||||
|
<image src="/static/images/images_add.png" mode="widthFix"></image>
|
||||||
|
<view>添加图片</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="refund-footer">
|
||||||
|
<button class="refund-footer-btn" size="mini" form-type="submit">提交</button>
|
||||||
|
</view>
|
||||||
|
</form>
|
||||||
223
pages/mall/mall_refund/mall_refund.wxss
Normal file
223
pages/mall/mall_refund/mall_refund.wxss
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
.refund-content {
|
||||||
|
padding-bottom: 190rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-goods {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good {
|
||||||
|
position: relative;
|
||||||
|
padding: 15rpx 30rpx;
|
||||||
|
min-height: 198rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good::before {
|
||||||
|
position: absolute;
|
||||||
|
left: 30rpx;
|
||||||
|
right: 0;
|
||||||
|
height: 1rpx;
|
||||||
|
bottom: 1rpx;
|
||||||
|
content: " ";
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-cover {
|
||||||
|
height: 178rpx;
|
||||||
|
width: 178rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
position: absolute;
|
||||||
|
left: 30rpx;
|
||||||
|
top: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-info {
|
||||||
|
padding-left: 198rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-title {
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 15rpx 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-value {
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-price {
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: gray;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-good-price text {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 统计信息 */
|
||||||
|
.refundTitle-item {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refundTitle-item picker {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-statistical {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-statistical-item {
|
||||||
|
position: relative;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-statistical-item::before {
|
||||||
|
position: absolute;
|
||||||
|
left: 30rpx;
|
||||||
|
right: 0;
|
||||||
|
height: 1rpx;
|
||||||
|
bottom: 1rpx;
|
||||||
|
content: " ";
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-statistical-item:last-child::before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-statistical-item-label {
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
top: 0;
|
||||||
|
width: 300rpx;
|
||||||
|
text-align: right;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 退款 */
|
||||||
|
.refund-info {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-info-item-label {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-info-item-text {
|
||||||
|
padding: 30rpx 30rpx 30rpx 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-info-item-textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: 150rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* footer */
|
||||||
|
.refund-footer {
|
||||||
|
background: white;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 20rpx 30rpx 30rpx 30rpx;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refund-footer-btn[size="mini"] {
|
||||||
|
background: #eb532a;
|
||||||
|
width: 100%;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
color: white;
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 多图上传 */
|
||||||
|
|
||||||
|
.issue-info-img {
|
||||||
|
padding: 20rpx 0;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: 0 -10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-itme {
|
||||||
|
width: calc(33.33% - 20rpx);
|
||||||
|
padding-top: calc(33.33% - 20rpx);
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
margin: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-itme>image {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100% - 20rpx);
|
||||||
|
height: -webkit-calc(100% - 20rpx);
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-remove {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 5;
|
||||||
|
top: -5rpx;
|
||||||
|
right: -6rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
width: 36rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 34rpx;
|
||||||
|
background: #ec202c;
|
||||||
|
color: white;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-add {
|
||||||
|
position: absolute;
|
||||||
|
top: 10rpx;
|
||||||
|
bottom: 10rpx;
|
||||||
|
width: 100%;
|
||||||
|
left: 0;
|
||||||
|
text-align: center;
|
||||||
|
background: #f3f4f8;
|
||||||
|
color: #8d8d8d;
|
||||||
|
font-size: 24rpx;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-box-pack: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-add image {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
vertical-align: bottom;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.issue-info-img-hint {
|
||||||
|
line-height: 60rpx;
|
||||||
|
color: #666;
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 0 30rpx 15rpx 30rpx;
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
type: 0, //全部0 待付款1 待发货2 待收货3 退款/售后4
|
type: 0, //全部0 待付款1 待发货2 待收货3 退款/售后4
|
||||||
|
company_id:wx.getStorageSync('company_id')
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -21,9 +22,6 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
type: e.currentTarget.dataset.id
|
type: e.currentTarget.dataset.id
|
||||||
})
|
})
|
||||||
if (e.currentTarget.dataset.id == 3) {
|
|
||||||
this.selectComponent('#categoryTypeList').crowdfundcategory(this.data.company_id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -1,16 +1,36 @@
|
|||||||
<!-- 滚动菜单 -->
|
<!-- 滚动菜单 -->
|
||||||
<view class="scroll_menu">
|
<view class="scroll_menu">
|
||||||
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
|
<scroll-view class="scroll-view_H" scroll-x="true" bindscroll="scroll" style="width: 100%">
|
||||||
<view id="menu1" catchtap="menuSelect" data-id='0'
|
<view id="menu1" catchtap="menuSelect" data-id='0' class="scroll-view-item_H {{type==0?'scroll_view_select':''}}">全部
|
||||||
class="scroll-view-item_H {{type==0?'scroll_view_select':''}}">全部</view>
|
</view>
|
||||||
<view id="menu2" catchtap="menuSelect" data-id='1'
|
<view id="menu2" catchtap="menuSelect" data-id='1' class="scroll-view-item_H {{type==1?'scroll_view_select':''}}">
|
||||||
class="scroll-view-item_H {{type==1?'scroll_view_select':''}}">待付款</view>
|
待付款</view>
|
||||||
<view id="menu3" catchtap="menuSelect" data-id='2'
|
<view id="menu3" catchtap="menuSelect" data-id='2' class="scroll-view-item_H {{type==2?'scroll_view_select':''}}">
|
||||||
class="scroll-view-item_H {{type==2?'scroll_view_select':''}}">待发货</view>
|
待发货</view>
|
||||||
<view id="menu4" catchtap="menuSelect" data-id='3'
|
<view id="menu4" catchtap="menuSelect" data-id='3' class="scroll-view-item_H {{type==3?'scroll_view_select':''}}">
|
||||||
class="scroll-view-item_H {{type==3?'scroll_view_select':''}}">待收货</view>
|
待收货</view>
|
||||||
<view id="menu4" catchtap="menuSelect" data-id='4'
|
<view id="menu4" catchtap="menuSelect" data-id='4' class="scroll-view-item_H {{type==4?'scroll_view_select':''}}">
|
||||||
class="scroll-view-item_H {{type==4?'scroll_view_select':''}}">退款/售后</view>
|
退款/售后</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
|
<view class="lists">
|
||||||
|
<view class="top">
|
||||||
|
<view class="ctime">2020-11-22 13:30:00 <span>待付款</span> </view>
|
||||||
|
<view class="content">
|
||||||
|
<image src="/static/images/company_bg4.png" mode="aspectFill"></image>
|
||||||
|
<view style="margin-left:20rpx;flex:1;">
|
||||||
|
<view class="title"><span class="title1">亲自跑到义乌,待会今年就新鲜上线亲自跑到义乌,待会今年就新鲜上线</span><span>¥60.00</span></view>
|
||||||
|
<view class="title"><span class="title1">小饼干</span><span>*4</span></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>共<span>1</span>件商品 实付:<span>¥202.00</span></view>
|
||||||
|
<view>项目结束时间:2020-10-29</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<span>取消订单</span>
|
||||||
|
<span>立即付款</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1);
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-view_H {
|
.scroll-view_H {
|
||||||
@@ -31,3 +32,56 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 列表 */
|
/* 列表 */
|
||||||
|
.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;
|
||||||
|
}
|
||||||
108
pages/user/companyMine/companyOrder1 (2).js
Normal file
108
pages/user/companyMine/companyOrder1 (2).js
Normal file
@@ -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()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
6
pages/user/companyMine/companyOrder1 (2).json
Normal file
6
pages/user/companyMine/companyOrder1 (2).json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "项目预购",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
54
pages/user/companyMine/companyOrder1 (2).wxml
Normal file
54
pages/user/companyMine/companyOrder1 (2).wxml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<!-- 订单tab -->
|
||||||
|
<view class="order-tab">
|
||||||
|
<view class="order-tab-item {{stateType == 'all' ? 'active':''}}" data-state="all" bindtap="orderTab">
|
||||||
|
全部
|
||||||
|
</view>
|
||||||
|
<view class="order-tab-item {{stateType == 'unpaid' ? 'active':''}}" data-state="unpaid" bindtap="orderTab">
|
||||||
|
待支付
|
||||||
|
</view>
|
||||||
|
<view class="order-tab-item {{stateType == 'paid' ? 'active':''}}" data-state="paid" bindtap="orderTab">
|
||||||
|
待发货
|
||||||
|
</view>
|
||||||
|
<view class="order-tab-item {{stateType == 'delive' ? 'active':''}}" data-state="delive" bindtap="orderTab">
|
||||||
|
待收货
|
||||||
|
</view>
|
||||||
|
<view class="order-tab-item {{stateType == 'refunds' ? 'active':''}}" data-state="refunds" bindtap="orderTab">
|
||||||
|
已完成 <!-- 退款 -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-content" wx:if="{{orderArr != ''}}">
|
||||||
|
<view class="order-list" wx:for="{{orderArr}}" wx:key="orderArr" wx:for-item="goods">
|
||||||
|
<view class="order-company">
|
||||||
|
<view class="order-company-name">
|
||||||
|
<image class="order-logo" src="/static/mall_icon/mallDetails_user.png"></image>
|
||||||
|
{{goods.orderid}}
|
||||||
|
<image class="order-arrow" src="/static/mall_icon/mall_arrow.png"></image>
|
||||||
|
</view>
|
||||||
|
<view class="order-company-state">
|
||||||
|
{{goods.state_text}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-goods" wx:for="{{goods.items}}" wx:key="items">
|
||||||
|
<image class="order-goods-img" src="{{item.cover}}" mode="aspectFill"></image>
|
||||||
|
<view class="order-goods-text">
|
||||||
|
<view class="nowrap-multi order-goods-name">{{item.title}}</view>
|
||||||
|
<view class="order-goods-price">
|
||||||
|
<text>¥{{item.price}}</text>
|
||||||
|
共{{item.qty}}件
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-footer">
|
||||||
|
<view class="order-footer-btn order-footer-btn-back" wx:if="{{goods.canPay == true}}" data-orderid="{{goods.orderid}}"
|
||||||
|
bindtap="orderPay">立即支付</view>
|
||||||
|
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
|
||||||
|
bindtap="orderDelete">取消订单</view>
|
||||||
|
<navigator hover-class="none" url="/pages/mall/mall_order_data/mall_order_data?orderId={{goods.orderid}}" class="order-footer-btn">订单详情</navigator>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view wx:else class="pack-center pages-hint">
|
||||||
|
<image src="/static/images/no_list.png"></image>
|
||||||
|
<view>暂无订单</view>
|
||||||
|
</view>
|
||||||
154
pages/user/companyMine/companyOrder1 (2).wxss
Normal file
154
pages/user/companyMine/companyOrder1 (2).wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
84
pages/user/companyMine/focusedProject/focusedProject.js
Normal file
84
pages/user/companyMine/focusedProject/focusedProject.js
Normal file
@@ -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({})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {},
|
||||||
|
"navigationBarTitleText": "项目关注",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"navigationBarBackgroundColor": "#378fff"
|
||||||
|
}
|
||||||
12
pages/user/companyMine/focusedProject/focusedProject.wxml
Normal file
12
pages/user/companyMine/focusedProject/focusedProject.wxml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<view class="content" wx:for="{{lists}}" :key="index" >
|
||||||
|
<image src="{{item.cover}}" mode="aspectFill"></image>
|
||||||
|
<view class="left">
|
||||||
|
<view class="title">{{item.title}}</view>
|
||||||
|
<view class="bottom"><span>{{item.status_text}}</span><span catchtap="crowdfundsUnLike" data-id='{{item.crowdfund_id}}' data-index='{{index}}'>取消关注</span></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="has_more">
|
||||||
|
<image wx:if='{{lists.length==0}}' src="/static/images/no_list.png" style="width:200rpx;" mode="widthFix"></image>
|
||||||
|
<span>{{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}}</span>
|
||||||
|
</view>
|
||||||
59
pages/user/companyMine/focusedProject/focusedProject.wxss
Normal file
59
pages/user/companyMine/focusedProject/focusedProject.wxss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
@@ -43,7 +43,7 @@ Page({
|
|||||||
if (res.page.has_more) {
|
if (res.page.has_more) {
|
||||||
this.setData({
|
this.setData({
|
||||||
has_more: res.page.has_more,
|
has_more: res.page.has_more,
|
||||||
page: page + 1,
|
page: this.data.page + 1,
|
||||||
lists: lists
|
lists: lists
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -56,7 +56,6 @@ Page({
|
|||||||
},
|
},
|
||||||
// 触底加载更多
|
// 触底加载更多
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log('触底')
|
|
||||||
if (this.data.has_more) {
|
if (this.data.has_more) {
|
||||||
this.userActives();
|
this.userActives();
|
||||||
} else {
|
} else {
|
||||||
@@ -69,7 +68,7 @@ Page({
|
|||||||
//跳转到详情页
|
//跳转到详情页
|
||||||
goUrl(e) {
|
goUrl(e) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/companyModule/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id,
|
url: '/pages/home/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>活动参与</text>
|
<text>活动参与</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
<view class="userTool-label">
|
<navigator hover-class="none" url="/pages/user/companyMine/companyOrder" class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_01.png"></image>
|
<image src="/static/user_iocn/userTool_01.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<text>项目预购</text>
|
<text>项目预购</text>
|
||||||
</view>
|
</navigator>
|
||||||
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="userTool-label">
|
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_02.png"></image>
|
<image src="/static/user_iocn/userTool_02.png"></image>
|
||||||
@@ -90,12 +90,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>收货地址</text>
|
<text>收货地址</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
<view class="userTool-label">
|
<navigator hover-class="none" url="/pages/user/companyMine/focusedProject/focusedProject"
|
||||||
|
class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_05.png"></image>
|
<image src="/static/user_iocn/userTool_05.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<text>项目关注</text>
|
<text>项目关注</text>
|
||||||
</view>
|
</navigator>
|
||||||
<view class="userTool-label">
|
<view class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_06.png"></image>
|
<image src="/static/user_iocn/userTool_06.png"></image>
|
||||||
|
|||||||
BIN
static/tabbar/tabbar_icon_00 2.png
Normal file
BIN
static/tabbar/tabbar_icon_00 2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/tabbar/tabbar_icon_01 2.png
Normal file
BIN
static/tabbar/tabbar_icon_01 2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/tabbar/tabbar_icon_03 2.png
Normal file
BIN
static/tabbar/tabbar_icon_03 2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/tabbar/tabbar_icon_04.png
Normal file
BIN
static/tabbar/tabbar_icon_04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/tabbar/tabbar_icon_05.png
Normal file
BIN
static/tabbar/tabbar_icon_05.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/tabbar/tabbar_icon_06.png
Normal file
BIN
static/tabbar/tabbar_icon_06.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user