diff --git a/apis/interfaces/home.js b/apis/interfaces/home.js index bb9cf4a..21c21c3 100644 --- a/apis/interfaces/home.js +++ b/apis/interfaces/home.js @@ -153,8 +153,29 @@ const signed = (active_id) => req({ method: "POST" }) +// 获取项目订单 +const orderList = (url, page) => req({ + url: url, + data: { + page: page + } +}) + +//订单-详情 +const getOrderInfo = (orderId) => req({ + url: "crowdorders/" + orderId +}) +// 退款售后详情 +const getRefundInfo = (refundId) => req({ + url: "refunds/" + refundId +}) + +// 退款进度查询 +const getRefundLogsInfo = (refundId) => req({ + url: "refunds/" + refundId + '/logs' +}) export default ({ @@ -178,4 +199,8 @@ export default ({ users, // 更多员工列表 userActives, //活动列表 signed, //活动签到 + orderList, //获取项目订单 + getOrderInfo, //根id 获取订单详情 + getRefundInfo, //根id 获取退款详情 + getRefundLogsInfo,//退款进度查询 }) \ No newline at end of file diff --git a/app.json b/app.json index 2d38440..1a2cebf 100644 --- a/app.json +++ b/app.json @@ -32,6 +32,11 @@ "pages/user/companyMine/myActives/myActives", "pages/user/companyMine/focusedProject/focusedProject", "pages/user/companyMine/companyOrder", + "pages/user/companyMine/projectPay/projectPay", + "pages/user/companyMine/projectRefund/projectRefund", + "pages/user/companyMine/projectDetailFunds/projectDetailFunds", + "pages/user/companyMine/refundInfo/refundInfo", + "pages/user/companyMine/projectDetail/projectDetail", "pages/home/index", "pages/home/companyInfo/companyInfo", "pages/home/noticeDetail/noticeDetail", diff --git a/components/company/activeList/activeList.js b/components/company/activeList/activeList.js index 69ccd2e..8781d8b 100644 --- a/components/company/activeList/activeList.js +++ b/components/company/activeList/activeList.js @@ -34,7 +34,7 @@ Component({ */ actives(){ if(this.data.has_more){ - wx.$api.companyModule.actives('company',this.data.company_id,this.data.page).then(res=>{ + wx.$api.companyModule.actives('company',wx.getStorageSync('company_id'),this.data.page).then(res=>{ console.log(res) if(res.page.has_more){ this.setData({ diff --git a/components/company/noticeList/noticeList.js b/components/company/noticeList/noticeList.js index 8ae19d5..6ed0eeb 100644 --- a/components/company/noticeList/noticeList.js +++ b/components/company/noticeList/noticeList.js @@ -11,10 +11,10 @@ Component({ * 组件的初始数据 */ data: { - lists:[],//列表 - company_id:wx.getStorageSync('company_id'), - page:1, - has_more:true, + lists: [], //列表 + company_id: wx.getStorageSync('company_id'), + page: 1, + has_more: true, }, /** @@ -24,34 +24,34 @@ Component({ /** * 跳转到详情 */ - toUrl(e){ + toUrl(e) { wx.navigateTo({ - url: '/pages/home/noticeDetail/noticeDetail?id='+e.currentTarget.dataset.id, + url: '/pages/home/noticeDetail/noticeDetail?id=' + e.currentTarget.dataset.id, }) }, /** * 企业活动列表 */ - actives(){ - if(this.data.has_more){ - wx.$api.companyModule.dynamics(this.data.company_id,this.data.page).then(res=>{ + actives() { + if (this.data.has_more) { + wx.$api.companyModule.dynamics(wx.getStorageSync('company_id'), this.data.page).then(res => { console.log(res) - if(res.page.has_more){ + var lists = this.data.lists.concat(res.data); + if (res.page.has_more) { this.setData({ - has_more:true, - page:this.data.page+1, - }) - }else{ - this.setData({ - has_more:false - }) - } - var lists=this.data.lists.concat(res.data); - this.setData({ - lists:lists + has_more: true, + page: this.data.page + 1, }) + } else { + this.setData({ + has_more: false + }) + } + this.setData({ + lists: lists }) - } + }) + } } } -}) +}) \ No newline at end of file diff --git a/pages/home/index.js b/pages/home/index.js index efdf1dc..656ce8c 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -5,13 +5,21 @@ Page({ */ data: { selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3 - company_id: wx.getStorageSync('company_id'), //企业Id, + company_id: '', //企业Id, info: '', //企业信息 loaded: false }, - onLoad(e) {}, - onShow() { - this.company(wx.getStorageSync('company_id')) + onLoad(e) { + var that = this + wx.getStorage({ + key: 'company_id', + success(res) { + that.company(e.companyId) + that.setData({ + company_id:res.data + }) + } + }) }, onUnload: function () { wx.removeStorageSync('company_id') @@ -55,19 +63,19 @@ Page({ /** * 请求项目筹集分类接口 */ - company() { + company(id) { wx.showLoading({ title: 'title', mask: 'true' }) - wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => { + wx.$api.companyModule.company(id, this.data.page).then(res => { this.setData({ info: res, loaded: true, }) wx.hideLoading({}) }).catch(res => { - if(res.status_code=='404'){ + if (res.status_code == '404') { // this.company(wx.getStorageSync('company_id')) } }) @@ -86,7 +94,7 @@ Page({ */ goMall(e) { console.log('1111') - wx.navigateTo({ + wx.switchTab({ url: '/pages/mall/index', }) } diff --git a/pages/shortVideo/index.js b/pages/shortVideo/index.js index 663caa9..e62b2a6 100644 --- a/pages/shortVideo/index.js +++ b/pages/shortVideo/index.js @@ -78,7 +78,7 @@ Page({ */ goCompany(e) { wx.navigateTo({ - url: '/pages/home/index' , + url: '/pages/home/index?companyId='+e.currentTarget.dataset.id , }) wx.setStorageSync('company_id', e.currentTarget.dataset.id) } diff --git a/pages/user/companyMine/companyOrder.js b/pages/user/companyMine/companyOrder.js index ad3f62e..d398546 100644 --- a/pages/user/companyMine/companyOrder.js +++ b/pages/user/companyMine/companyOrder.js @@ -5,23 +5,125 @@ Page({ * 页面的初始数据 */ data: { - type: 0, //全部0 待付款1 待发货2 待收货3 退款/售后4 - company_id:wx.getStorageSync('company_id') + state: 'index', //全部index 待付款unpaid 待发货 paid 待收货delive 退款/售后refund + lists: [], //列表 + page: 1, + has_more: true, }, onLoad() { - + this.orderList(); }, /** * 点击按钮触发事件 */ menuSelect: function (e) { - console.log(e.currentTarget.dataset.id); - if (this.data.type != e.currentTarget.dataset.id) { + if (this.data.state != e.currentTarget.dataset.state) { this.setData({ - type: e.currentTarget.dataset.id + state: e.currentTarget.dataset.state, + page: 1, + lists: [], + has_more: true + }) + this.orderList() + } + }, + // 全部index 待付款 unpaid 待发货 paid 待收货 delive 退款/售后 refund + orderList() { + var url = 'crowdorders' + if (this.data.state == 'index') { + url = 'crowdorders' + } else if (this.data.state == 'unpaid') { + url = 'crowdorders/unpaid' + } else if (this.data.state == 'paid') { + url = 'crowdorders/paid' + } else if (this.data.state == 'delive') { + url = 'crowdorders/delivered ' + } else if (this.data.state == 'refund') { + url = 'refunds/crowdfunds' + } + wx.$api.companyModule.orderList(url, this.data.page).then(res => { + console.log(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.orderList(); + } else { + wx.showToast({ + icon: 'none', + title: '没有更多', }) } }, + /** + * 订单支付 + */ + orderPay(e) { + let orderId = e.currentTarget.dataset.orderid + wx.navigateTo({ + url: './projectPay/projectPay?orderid=' + orderId, + }) + }, + + /** + * 取消订单 + */ + orderDelete(e) { + wx.showModal({ + title: '提示', + content: '是否确认取消订单', + success: res => { + if (res.confirm) { + wx.showLoading({ + title: '取消中', + }) + let orderId = e.currentTarget.dataset.orderid + wx.$api.order.cancel(orderId).then(res => { + // 获取列表 + this.setData({ + lists: [], + has_more: true, + page: 1 + }) + this.orderList() + }) + } + } + }) + }, + + /** + * 签收订单 + */ + orderSign(e) { + let orderId = e.currentTarget.dataset.orderid + wx.$api.order.sign(orderId).then(res => { + // 获取列表 + this.setData({ + lists: [], + has_more: true, + page: 1 + }) + this.orderList() + }) + }, }) \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder.wxml b/pages/user/companyMine/companyOrder.wxml index 62557c5..359d76c 100644 --- a/pages/user/companyMine/companyOrder.wxml +++ b/pages/user/companyMine/companyOrder.wxml @@ -1,36 +1,57 @@ - 全部 + 全部 - + 待付款 - + 待发货 - + 待收货 - + 退款/售后 - - - 2020-11-22 13:30:00 待付款 - - - - 亲自跑到义乌,待会今年就新鲜上线亲自跑到义乌,待会今年就新鲜上线¥60.00 - 小饼干*4 + + + + {{item.created_at}} {{item.state_text}} + + + + {{item.items[0].title}}¥{{item.items[0].price}} + + {{item.items[0].value}} x {{item.items[0].qty}} + + + + {{item.items[0].qty}} 件商品 实付:¥ {{item.items[0].price}} + + 项目结束时间:{{item.crowdfund_end_at}} - - 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 9d81f53..24f941a 100644 --- a/pages/user/companyMine/companyOrder.wxss +++ b/pages/user/companyMine/companyOrder.wxss @@ -1,9 +1,17 @@ +page { + padding-top: 100rpx; +} + /* 滚动菜单 */ .scroll_menu { background-color: #fff; box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1); font-size: 28rpx; margin-bottom: 20rpx; + position: fixed; + top: 0; + left: 0; + width: 100%; } .scroll-view_H { @@ -34,6 +42,7 @@ /* 列表 */ .lists { background-color: #fff; + margin-top: 10rpx; } .top { @@ -42,8 +51,8 @@ } .top image { - width: 150rpx; - height: 150rpx; + width: 90rpx; + height: 90rpx; border-radius: 10rpx; } @@ -55,6 +64,8 @@ align-items: center; box-sizing: border-box; padding: 20rpx 30rpx; + font-size: 26rpx; + color: #999; } .top .ctime span { @@ -84,4 +95,86 @@ text-overflow: ellipsis; white-space: nowrap; width: 400rpx; +} + +.top .mt10 { + margin-top: 10rpx; +} + +.top .title .num { + font-size: 32rpx; + color: #333; + font-weight: 600; +} + +.total { + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: flex-end; + box-sizing: border-box; + font-size: 24rpx; + padding: 10rpx 30rpx; + border-bottom: solid 1rpx #f9f9f9; +} + +.total .num { + color: #000; + font-weight: 600; +} + +.total .time { + color: #999; + font-weight: normal; + margin-top: 10rpx; +} + +.bottom { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + box-sizing: border-box; + padding: 20rpx 30rpx; + font-size: 26rpx; +} + +.bottom .pay { + background-color: #378fff; + color: #fff; + padding: 10rpx 30rpx; + border-radius: 50rpx; + margin-left: 10rpx; +} + +.bottom .cancel { + background-color: #f9f9f9; + color: #333; + padding: 10rpx 30rpx; + border-radius: 50rpx; + margin-left: 10rpx; +} + +.bottom .sign { + background-color: #3677a5; + color: #fff; + padding: 10rpx 30rpx; + margin-left: 10rpx; + border-radius: 50rpx; +} + +.bottom .refund { + background-color: #227586; + color: #fff; + padding: 10rpx 30rpx; + margin-left: 10rpx; + border-radius: 50rpx; +} + +.bottom .detail { + background-color: #246cb6; + color: #fff; + padding: 10rpx 30rpx; + margin-left: 10rpx; + border-radius: 50rpx; } \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder1 (2).js b/pages/user/companyMine/companyOrder1 (2).js deleted file mode 100644 index c5230ab..0000000 --- a/pages/user/companyMine/companyOrder1 (2).js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 手太欠 - * 企获客商城 - */ - -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).wxml b/pages/user/companyMine/companyOrder1 (2).wxml deleted file mode 100644 index c9599bf..0000000 --- a/pages/user/companyMine/companyOrder1 (2).wxml +++ /dev/null @@ -1,54 +0,0 @@ - - - - 全部 - - - 待支付 - - - 待发货 - - - 待收货 - - - 已完成 - - - - - - - - {{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 deleted file mode 100644 index 9ed17b8..0000000 --- a/pages/user/companyMine/companyOrder1 (2).wxss +++ /dev/null @@ -1,154 +0,0 @@ - -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/projectDetail/projectDetail.js b/pages/user/companyMine/projectDetail/projectDetail.js new file mode 100644 index 0000000..190b771 --- /dev/null +++ b/pages/user/companyMine/projectDetail/projectDetail.js @@ -0,0 +1,136 @@ +/* + * 手太欠 + * 企获客商城 + */ + +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + logisticsPop: false, //物流弹出框状态 + orderData: '', //商品详情 + orderId: '' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + orderId: options.orderId + }) + this.orderData(options.orderId) + }, + + /** + * 订单详情 + */ + orderData(orderId) { + wx.$api.companyModule.getOrderInfo(orderId).then(res => { + console.log(res) + this.setData({ + orderData: res + }) + }) + }, + + /** + * 物流弹出 + */ + logisticsShow() { + this.setData({ + logisticsPop: !this.data.logisticsPop + }) + }, + + /** + * 物流隐藏 + */ + logisticsHide() { + this.setData({ + logisticsPop: !this.data.logisticsPop + }) + }, + + /** + * 返回订单 + */ + orderRun() { + wx.navigateBack({ + delta: 1, + }) + }, + + /** + * 订单支付 + */ + orderPay(e) { + let orderId = e.currentTarget.dataset.orderid + wx.navigateTo({ + url: '../projectPay/projectPay?orderid=' + orderId, + }) + }, + + /** + * 取消订单 + */ + orderDelete(e) { + let orderId = e.currentTarget.dataset.orderid + wx.showModal({ + title: '提示', + content: '是否确认取消订单', + success: res => { + if (res.confirm) { + wx.showLoading({ + title: '取消中', + }) + wx.$api.order.cancel(orderId).then(res => { + console.log(res); + wx.showToast({ + title: '取消成功', + icon:'none', + duration:1000 + }) + setTimeout(() => { + this.orderData(this.data.orderId) + }, 1000); + }) + } + } + }) + }, + + + /** + * 签收订单 + */ + orderSign(e) { + let orderId = e.currentTarget.dataset.orderid + wx.showModal({ + title: '提示', + content: '是否确认签收订单', + success: res => { + if (res.confirm) { + wx.showLoading({ + title: '签收中', + }) + wx.$api.order.sign(orderId).then(res => { + console.log(res); + wx.showToast({ + title: '签收成功', + icon:'none', + duration:1000 + }) + setTimeout(() => { + this.orderData(this.data.orderId) + }, 1000); + }) + } + } + }) + + }, +}) \ No newline at end of file diff --git a/pages/user/companyMine/projectDetail/projectDetail.json b/pages/user/companyMine/projectDetail/projectDetail.json new file mode 100644 index 0000000..107724e --- /dev/null +++ b/pages/user/companyMine/projectDetail/projectDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents" : {}, + "navigationBarTitleText" : "订单详情", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/projectDetail/projectDetail.wxml b/pages/user/companyMine/projectDetail/projectDetail.wxml new file mode 100644 index 0000000..ec39a89 --- /dev/null +++ b/pages/user/companyMine/projectDetail/projectDetail.wxml @@ -0,0 +1,140 @@ + + + + {{orderData.state_text}} + + + + + + {{orderData.express.name}}{{orderData.express.mobile}} + + + + + {{orderData.express.address}} + + + + + {{orderData.created_at}} {{orderData.state_text}} + + + + {{orderData.items[0].title}}¥{{orderData.items[0].price}} + + {{orderData.items[0].value}} x {{orderData.items[0].qty}} + + + + {{orderData.items[0].qty}} 件商品 实付:¥ + {{orderData.items[0].price}} + + 项目结束时间:{{orderData.crowdfund_end_at}} + + 应付¥{{orderData.items[0].price}} + + 实付¥{{orderData.items[0].price}} + + + + + 订单详情 + {{orderData.orderid}} + {{orderData.created_at}} + {{orderData.paid_at}} + {{orderData.deliver_at}} + {{orderData.receive_at}} + {{orderData.remark || '暂无'}} + + + 物流信息 + {{orderData.express.company}} + {{orderData.express.number}} + + + + + + + + + 取消订单 + + + 立即支付 + + + 立即签收 + + 申请退款 + + 返回订单 + + + + + + + + + + + + 收货地址:黑龙江省哈尔滨市测试区域测试地址123 + + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】 + + + 您的快件由【青岛】准备发往【上海】111 + + + \ No newline at end of file diff --git a/pages/user/companyMine/projectDetail/projectDetail.wxss b/pages/user/companyMine/projectDetail/projectDetail.wxss new file mode 100644 index 0000000..62c3b3b --- /dev/null +++ b/pages/user/companyMine/projectDetail/projectDetail.wxss @@ -0,0 +1,467 @@ +/* + * 手太欠 + * 企获客商城 + */ +image { + height: auto; +} + +page { + background-color: #f1f1f1; +} + +.orderData { + border-bottom: solid 110rpx transparent; +} + +/* 订单地址 */ +.orderCont { + margin-top: -30rpx; +} + +.orderSite { + background-color: white; + border-radius: 20rpx; + margin-bottom: 20rpx; + padding: 20rpx 0; +} + +.orderSite-laebl { + display: flex; + padding: 10rpx 30rpx; + box-sizing: border-box; +} + +.orderSite-laebl image { + width: 34rpx; + height: 34rpx; + margin: 4rpx 20rpx 0 0; +} + +.orderSite-laeb-name { + font-weight: 600; +} + +.orderSite-laeb-name text { + padding-left: 30rpx; +} + +.orderSite-laeb-address { + font-size: 28rpx; + color: #666666; +} + +/* 订单商品 */ +.orderGoods, +.orderLabel { + background-color: white; + border-radius: 20rpx; + margin: 20rpx 0; + padding: 20rpx 0; +} + +.orderLabel .title { + font-weight: 600; + padding-left: 30rpx; +} + +.orderGoods { + padding: 30rpx; + box-sizing: border-box; +} + +.orderGoods-company { + display: flex; + line-height: 50rpx; + font-weight: 600; + margin-bottom: 40rpx; +} + +.orderGoods-logo { + width: 50rpx; + height: 50rpx; + margin-right: 20rpx; +} + +.orderGoods-arrow { + width: 28rpx; + height: 28rpx; + margin: 10rpx 0 10rpx 20rpx; +} + +.orderGoods-goods-li { + position: relative; + border-bottom: solid 1rpx #f2f2f2; + min-height: 160rpx; + background: white; +} + +.orderGoods-goods-li:last-child { + border-bottom: none; +} + +.orderGoods-img { + position: absolute; + top: 0; + left: 0; + height: 200rpx; + width: 200rpx; + border-radius: 10rpx; + background: #f5f6fa; +} + +.orderGoods-body { + padding-left: 240rpx; +} + +.orderGoods-params { + font-size: 28rpx; + color: #999999; + margin-top: 10rpx; +} + +.orderGoods-name { + text-emphasis: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.orderGoods-price { + color: #e92344; + margin-top: 20rpx; +} + +/* 订单标签 */ + +.order-total { + border-top: 2rpx solid #eee; + border-bottom: 2rpx solid #eee; +} + +.order-total-li { + padding: 20rpx 30rpx; + display: flex; + position: relative; +} + +.order-total-name { + flex: 1; +} + +.order-total-li text { + color: #999; +} + +.coupon-picker-red { + color: #ea4e2f; +} + +.order-input { + padding: 20rpx 30rpx 0 30rpx; + position: relative; + font-size: 28rpx; +} + +/* .order-input label { + width: 220rpx; + position: absolute; + left: 30rpx; + top: 0; + display: flex; + color: #666666; +} */ + +.order-input image { + width: 36rpx; + height: 36rpx; + margin: 24rpx 20rpx 0 0; +} + +.order-input text { + padding-left: 20rpx; + font-size: 28rpx; +} + + +/* 订单状态 */ +.orderBack { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + background-image: linear-gradient(to left, #378fff, #378fff); + color: #fff; + text-align: center; + padding: 50rpx 0 70rpx; + font-size: 34rpx; +} + +.orderBack image { + width: 120rpx; + vertical-align: middle; + margin-right: 30rpx; +} + +/* 底部工具栏 */ +.orderFooter { + position: fixed; + bottom: 0; + left: 0; + right: 0; + border-top: solid 1rpx #f2f2f2; + padding-top: 17rpx; + padding-right: 30rpx; + padding-left: 30rpx; + height: 90rpx; + background: white; + display: flex; + flex-wrap: wrap; + flex-direction: row-reverse; +} + +.orderFooter-btn { + margin-left: 20rpx; + height: 60rpx; + line-height: 60rpx; + box-sizing: border-box; + border: solid 1rpx #747788; + padding: 0 20rpx; + font-size: 26rpx; + border-radius: 40rpx; + margin-top: 10rpx; +} + +.orderFooter-btn-back { + border-color: #eb532a; + color: #eb532a; +} + + +/* 物流信息 */ +.logistics-back { + position: fixed; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color: rgba(0, 0, 0, .7); + z-index: 101; + display: none; +} + +.logistics-back.active { + display: block; +} + +.logistics-cont { + position: fixed; + width: 100%; + background-color: white; + left: 0; + bottom: -100%; + z-index: 102; + border-radius: 20rpx 20rpx 0 0; + padding: 90rpx 30rpx 30rpx; + box-sizing: border-box; + transition: .2s; + height: 40vh; +} + +.logistics-cont.active { + bottom: 0; +} + +.logistics-close { + position: absolute; + right: 20rpx; + top: 20rpx; + z-index: 103; + width: 45rpx; + height: 45rpx; +} + +.logistics-list, +.logistics-title { + position: relative; + padding-left: 80rpx; + padding-right: 20rpx; +} + +.logistics-list::before, +.logistics-title::before { + position: absolute; + left: 30rpx; + top: 0; + content: ""; + width: 2rpx; + height: 100%; + background: #eeeeee; + z-index: 2; +} + +.logistics-list { + height: calc(100% - 80rpx); + overflow-y: scroll; +} + +.logistics-title { + font-size: 30rpx; +} + +.logistics-label { + position: relative; + padding-top: 20rpx; + padding-bottom: 20rpx; + font-size: 26rpx; + color: #aeaeae; + border-bottom: solid 2rpx #f2f2f2; +} + +.logistics-label:nth-child(1) { + color: #000; + font-weight: 600; + font-size: 30rpx; +} + +.logistics-label::before { + position: absolute; + left: -58rpx; + top: calc(50% - 7rpx); + content: ""; + width: 14rpx; + height: 14rpx; + border: solid 2rpx #fff; + background: #c1c1c1; + z-index: 9; + border-radius: 50%; +} + + +.logistics-label:nth-child(1)::before { + border: solid 2rpx #dd3835; + background: #dd3835; +} + + +.logistics-label:nth-child(1)::after { + position: absolute; + left: 0rpx; + top: 0; + content: ""; + width: 2rpx; + height: calc(50% - 7rpx); + background: #fff; + z-index: 3; + border-radius: 50%; +} + +.logistics-title-icon { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background-color: #dddddd; + position: absolute; + left: 0; + z-index: 102; + top: 0; +} + +.logistics-title-icon image { + width: 34rpx; + height: 34rpx; + margin: 13rpx; +} + +.top { + font-size: 28rpx; + color: #333; +} + +.top image { + width: 90rpx; + height: 90rpx; + border-radius: 10rpx; +} + +.top .ctime { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding: 0 0 20rpx 0; + font-size: 26rpx; + color: #999; +} + +.top .ctime span { + color: #666; +} + +.top .content { + padding: 20rpx 0; + 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; +} + +.top .mt10 { + margin-top: 10rpx; +} + +.top .title .num { + font-size: 32rpx; + color: #333; + font-weight: 600; +} + +.total { + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: flex-end; + box-sizing: border-box; + font-size: 24rpx; + padding: 10rpx 0 20rpx 0; + border-bottom: solid 1rpx #f9f9f9; +} + +.total .num { + color: #000; + font-weight: 600; +} + +.total .time { + color: #999; + font-weight: normal; + margin-top: 10rpx; +} + +.pt10 { + padding-top: 20rpx; +} + +.num2 { + color: #000; + font-weight: 400; +} \ No newline at end of file diff --git a/pages/user/companyMine/projectDetailFunds/projectDetailFunds.js b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.js new file mode 100644 index 0000000..362d550 --- /dev/null +++ b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.js @@ -0,0 +1,56 @@ +/* + * 手太欠 + * 企获客商城 + */ + +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + logisticsPop: false, //物流弹出框状态 + orderData: '', //商品详情 + refundId: '' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + refundId: options.orderId + }) + this.orderData(options.refundId) + }, + + /** + * 订单详情 + */ + orderData(refundId) { + wx.$api.companyModule.getRefundInfo(refundId).then(res => { + console.log(res) + this.setData({ + orderData: res + }) + }) + }, + /** + * 退款记录 + */ + refunds(e) { + wx.navigateTo({ + url: '/pages/user/companyMine/refundInfo/refundInfo?refundId='+e.currentTarget.dataset.refundid, + }) + }, + /** + * 返回订单 + */ + orderRun() { + wx.navigateBack({ + delta: 1, + }) + }, + +}) \ No newline at end of file diff --git a/pages/user/companyMine/projectDetailFunds/projectDetailFunds.json b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.json new file mode 100644 index 0000000..107724e --- /dev/null +++ b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.json @@ -0,0 +1,6 @@ +{ + "usingComponents" : {}, + "navigationBarTitleText" : "订单详情", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxml b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxml new file mode 100644 index 0000000..198abc6 --- /dev/null +++ b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxml @@ -0,0 +1,64 @@ + + + + {{orderData.state.remark}} + + + + + + {{orderData.express.name}}{{orderData.express.mobile}} + + + + + {{orderData.express.address}} + + + + + {{orderData.created_at}} {{orderData.state_text}} + + + + {{orderData.items[0].title}}¥{{orderData.items[0].price}} + + {{orderData.items[0].value}} x {{orderData.items[0].qty}} + + + + {{orderData.items[0].qty}} 件商品 实付:¥ + {{orderData.items[0].price}} + + 项目结束时间:{{orderData.order.crowdfund_end_at}} + + 应付¥{{orderData.items[0].price}} + + 实付¥{{orderData.items[0].price}} + + + + + 订单详情 + + {{orderData.orderid}} + + {{orderData.created_at}} + + {{orderData.order.paid_at}} + {{orderData.remark || '暂无'}} + + + + + + + + 返回订单 + + 退款进度 + + diff --git a/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxss b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxss new file mode 100644 index 0000000..62c3b3b --- /dev/null +++ b/pages/user/companyMine/projectDetailFunds/projectDetailFunds.wxss @@ -0,0 +1,467 @@ +/* + * 手太欠 + * 企获客商城 + */ +image { + height: auto; +} + +page { + background-color: #f1f1f1; +} + +.orderData { + border-bottom: solid 110rpx transparent; +} + +/* 订单地址 */ +.orderCont { + margin-top: -30rpx; +} + +.orderSite { + background-color: white; + border-radius: 20rpx; + margin-bottom: 20rpx; + padding: 20rpx 0; +} + +.orderSite-laebl { + display: flex; + padding: 10rpx 30rpx; + box-sizing: border-box; +} + +.orderSite-laebl image { + width: 34rpx; + height: 34rpx; + margin: 4rpx 20rpx 0 0; +} + +.orderSite-laeb-name { + font-weight: 600; +} + +.orderSite-laeb-name text { + padding-left: 30rpx; +} + +.orderSite-laeb-address { + font-size: 28rpx; + color: #666666; +} + +/* 订单商品 */ +.orderGoods, +.orderLabel { + background-color: white; + border-radius: 20rpx; + margin: 20rpx 0; + padding: 20rpx 0; +} + +.orderLabel .title { + font-weight: 600; + padding-left: 30rpx; +} + +.orderGoods { + padding: 30rpx; + box-sizing: border-box; +} + +.orderGoods-company { + display: flex; + line-height: 50rpx; + font-weight: 600; + margin-bottom: 40rpx; +} + +.orderGoods-logo { + width: 50rpx; + height: 50rpx; + margin-right: 20rpx; +} + +.orderGoods-arrow { + width: 28rpx; + height: 28rpx; + margin: 10rpx 0 10rpx 20rpx; +} + +.orderGoods-goods-li { + position: relative; + border-bottom: solid 1rpx #f2f2f2; + min-height: 160rpx; + background: white; +} + +.orderGoods-goods-li:last-child { + border-bottom: none; +} + +.orderGoods-img { + position: absolute; + top: 0; + left: 0; + height: 200rpx; + width: 200rpx; + border-radius: 10rpx; + background: #f5f6fa; +} + +.orderGoods-body { + padding-left: 240rpx; +} + +.orderGoods-params { + font-size: 28rpx; + color: #999999; + margin-top: 10rpx; +} + +.orderGoods-name { + text-emphasis: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.orderGoods-price { + color: #e92344; + margin-top: 20rpx; +} + +/* 订单标签 */ + +.order-total { + border-top: 2rpx solid #eee; + border-bottom: 2rpx solid #eee; +} + +.order-total-li { + padding: 20rpx 30rpx; + display: flex; + position: relative; +} + +.order-total-name { + flex: 1; +} + +.order-total-li text { + color: #999; +} + +.coupon-picker-red { + color: #ea4e2f; +} + +.order-input { + padding: 20rpx 30rpx 0 30rpx; + position: relative; + font-size: 28rpx; +} + +/* .order-input label { + width: 220rpx; + position: absolute; + left: 30rpx; + top: 0; + display: flex; + color: #666666; +} */ + +.order-input image { + width: 36rpx; + height: 36rpx; + margin: 24rpx 20rpx 0 0; +} + +.order-input text { + padding-left: 20rpx; + font-size: 28rpx; +} + + +/* 订单状态 */ +.orderBack { + display: flex; + flex-direction: row; + justify-content: start; + align-items: center; + background-image: linear-gradient(to left, #378fff, #378fff); + color: #fff; + text-align: center; + padding: 50rpx 0 70rpx; + font-size: 34rpx; +} + +.orderBack image { + width: 120rpx; + vertical-align: middle; + margin-right: 30rpx; +} + +/* 底部工具栏 */ +.orderFooter { + position: fixed; + bottom: 0; + left: 0; + right: 0; + border-top: solid 1rpx #f2f2f2; + padding-top: 17rpx; + padding-right: 30rpx; + padding-left: 30rpx; + height: 90rpx; + background: white; + display: flex; + flex-wrap: wrap; + flex-direction: row-reverse; +} + +.orderFooter-btn { + margin-left: 20rpx; + height: 60rpx; + line-height: 60rpx; + box-sizing: border-box; + border: solid 1rpx #747788; + padding: 0 20rpx; + font-size: 26rpx; + border-radius: 40rpx; + margin-top: 10rpx; +} + +.orderFooter-btn-back { + border-color: #eb532a; + color: #eb532a; +} + + +/* 物流信息 */ +.logistics-back { + position: fixed; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color: rgba(0, 0, 0, .7); + z-index: 101; + display: none; +} + +.logistics-back.active { + display: block; +} + +.logistics-cont { + position: fixed; + width: 100%; + background-color: white; + left: 0; + bottom: -100%; + z-index: 102; + border-radius: 20rpx 20rpx 0 0; + padding: 90rpx 30rpx 30rpx; + box-sizing: border-box; + transition: .2s; + height: 40vh; +} + +.logistics-cont.active { + bottom: 0; +} + +.logistics-close { + position: absolute; + right: 20rpx; + top: 20rpx; + z-index: 103; + width: 45rpx; + height: 45rpx; +} + +.logistics-list, +.logistics-title { + position: relative; + padding-left: 80rpx; + padding-right: 20rpx; +} + +.logistics-list::before, +.logistics-title::before { + position: absolute; + left: 30rpx; + top: 0; + content: ""; + width: 2rpx; + height: 100%; + background: #eeeeee; + z-index: 2; +} + +.logistics-list { + height: calc(100% - 80rpx); + overflow-y: scroll; +} + +.logistics-title { + font-size: 30rpx; +} + +.logistics-label { + position: relative; + padding-top: 20rpx; + padding-bottom: 20rpx; + font-size: 26rpx; + color: #aeaeae; + border-bottom: solid 2rpx #f2f2f2; +} + +.logistics-label:nth-child(1) { + color: #000; + font-weight: 600; + font-size: 30rpx; +} + +.logistics-label::before { + position: absolute; + left: -58rpx; + top: calc(50% - 7rpx); + content: ""; + width: 14rpx; + height: 14rpx; + border: solid 2rpx #fff; + background: #c1c1c1; + z-index: 9; + border-radius: 50%; +} + + +.logistics-label:nth-child(1)::before { + border: solid 2rpx #dd3835; + background: #dd3835; +} + + +.logistics-label:nth-child(1)::after { + position: absolute; + left: 0rpx; + top: 0; + content: ""; + width: 2rpx; + height: calc(50% - 7rpx); + background: #fff; + z-index: 3; + border-radius: 50%; +} + +.logistics-title-icon { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background-color: #dddddd; + position: absolute; + left: 0; + z-index: 102; + top: 0; +} + +.logistics-title-icon image { + width: 34rpx; + height: 34rpx; + margin: 13rpx; +} + +.top { + font-size: 28rpx; + color: #333; +} + +.top image { + width: 90rpx; + height: 90rpx; + border-radius: 10rpx; +} + +.top .ctime { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + padding: 0 0 20rpx 0; + font-size: 26rpx; + color: #999; +} + +.top .ctime span { + color: #666; +} + +.top .content { + padding: 20rpx 0; + 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; +} + +.top .mt10 { + margin-top: 10rpx; +} + +.top .title .num { + font-size: 32rpx; + color: #333; + font-weight: 600; +} + +.total { + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: flex-end; + box-sizing: border-box; + font-size: 24rpx; + padding: 10rpx 0 20rpx 0; + border-bottom: solid 1rpx #f9f9f9; +} + +.total .num { + color: #000; + font-weight: 600; +} + +.total .time { + color: #999; + font-weight: normal; + margin-top: 10rpx; +} + +.pt10 { + padding-top: 20rpx; +} + +.num2 { + color: #000; + font-weight: 400; +} \ No newline at end of file diff --git a/pages/user/companyMine/projectPay/projectPay.js b/pages/user/companyMine/projectPay/projectPay.js new file mode 100644 index 0000000..ef36842 --- /dev/null +++ b/pages/user/companyMine/projectPay/projectPay.js @@ -0,0 +1,76 @@ +/* + * 手太欠 + * 企获客商城 + */ + +const app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + orderData: '', //订单详情 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + console.log(options.orderid) + this.orderInfo(options.orderid) + }, + + /** + * 订单支付 + */ + orderInfo(orderId) { + wx.$api.order.paymen(orderId).then(res => { + this.setData({ + orderData: res + }) + }) + }, + + /** + * 订单支付 + */ + payment() { + // 获取code + wx.login({ + success: res => { + wx.$api.mall.wechat({ + code: res.code, + trade_no: this.data.orderData.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.navigateBack({ + delta: 0, + }) + }, 2000) + } + }, + fail: res => { + wx.navigateBack({ + delta: 0, + }) + } + }) + }) + } + }) + } +}) \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder1 (2).json b/pages/user/companyMine/projectPay/projectPay.json similarity index 71% rename from pages/user/companyMine/companyOrder1 (2).json rename to pages/user/companyMine/projectPay/projectPay.json index 8d21f2a..f2cc8ef 100644 --- a/pages/user/companyMine/companyOrder1 (2).json +++ b/pages/user/companyMine/projectPay/projectPay.json @@ -1,6 +1,6 @@ { "usingComponents": {}, - "navigationBarTitleText": "项目预购", + "navigationBarTitleText": "订单支付", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#378fff" } \ No newline at end of file diff --git a/pages/user/companyMine/projectPay/projectPay.wxml b/pages/user/companyMine/projectPay/projectPay.wxml new file mode 100644 index 0000000..40ee927 --- /dev/null +++ b/pages/user/companyMine/projectPay/projectPay.wxml @@ -0,0 +1,41 @@ + + + 订单信息 + + + 订单编号 + {{orderData.trade_no}} + + + 商品总价 + ¥{{orderData.amount}} + + + 运费 + ¥{{orderData.freight}} + + + 应付总价 + + ¥{{orderData.total}} + + + + + 支付方式 + + + + + + 微信支付 + + + + + + + + + 立即支付 + \ No newline at end of file diff --git a/pages/user/companyMine/projectPay/projectPay.wxss b/pages/user/companyMine/projectPay/projectPay.wxss new file mode 100644 index 0000000..85f425b --- /dev/null +++ b/pages/user/companyMine/projectPay/projectPay.wxss @@ -0,0 +1,116 @@ +/* + * 手太欠 + * 企获客商城 + */ + +page { + background-color: #f7f7f7; +} + +.order-content { + border-bottom: solid 100rpx transparent; +} + +/* 订单支付 */ + +.order-title { + font-weight: 600; + padding: 30rpx; +} + +.order-total { + background: white; + margin-bottom: 30rpx; + border-top: 2rpx solid #eee; + border-bottom: 2rpx solid #eee; +} + +.order-total-number { + border-bottom: 2rpx solid #eee; + line-height: 54rpx; +} + +.order-total-li { + padding: 20rpx 30rpx; + display: flex; + position: relative; +} + +.order-total-name { + flex: 1; +} + +.order-total-li text { + color: #999; +} + +.coupon-picker-red { + color: #378fff; +} + +.order-total-textarea { + width: 200rpx; + height: 80rpx; +} + + +.order-total-li textarea { + line-height: 50rpx; + height: 100rpx; +} + + +/* 支付类型 */ + +.payContList { + border-top: 2rpx solid #eee; + border-bottom: 2rpx solid #eee; + padding: 30rpx; + background: #fff; +} + +.payContList-label { + height: 60rpx; + line-height: 60rpx; + display: flex; +} + +.payContList-label-name { + flex: 1; + display: flex; +} + +.payContList-label-img { + width: 60rpx; + height: 60rpx; + margin-right: 20rpx; +} + + +/* 支付按钮 */ + +.address-footer{ + position: fixed; + bottom: 0; + left: 0; + right: 0; + padding-left: 30rpx; + padding-right: 30rpx; + background: white; + border-top: 2rpx solid #eeeeee; + z-index: 9; + height: 130rpx; +} + +.address-footer text{ + display: block; + width: 100%; + line-height: 90rpx; + height: 90rpx; + margin: 20rpx 0; + text-align: center; + background: #378fff; + font-size: 30rpx; + color: white; + border-radius: 60rpx; +} diff --git a/pages/user/companyMine/projectRefund/mall_refund.wxml b/pages/user/companyMine/projectRefund/mall_refund.wxml new file mode 100644 index 0000000..7a7f197 --- /dev/null +++ b/pages/user/companyMine/projectRefund/mall_refund.wxml @@ -0,0 +1,87 @@ +
+ + + + + + + {{item.title}} + {{item.value}} + 单价:{{item.price}} X {{item.qty}} + + + + + + + + 商品总金额 + + + + 运费 + + + + 优惠券抵扣 + + + + 实际支付金额 + + + + + + + + 退款金额 + + + + + + 选择退款原因 + + + {{refundTitle[refundIndex].remark}} + + + + + + + 退款类型 + + + + + + 退款原因 + + + + + + 添加图片 + + + + × + + + + + 添加图片 + + + + + + + + + + +
\ No newline at end of file diff --git a/pages/user/companyMine/projectRefund/projectRefund.js b/pages/user/companyMine/projectRefund/projectRefund.js new file mode 100644 index 0000000..a383a51 --- /dev/null +++ b/pages/user/companyMine/projectRefund/projectRefund.js @@ -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', + }) + }) + }, +}) \ No newline at end of file diff --git a/pages/user/companyMine/projectRefund/projectRefund.json b/pages/user/companyMine/projectRefund/projectRefund.json new file mode 100644 index 0000000..9c82d2e --- /dev/null +++ b/pages/user/companyMine/projectRefund/projectRefund.json @@ -0,0 +1,6 @@ +{ + "usingComponents" : {}, + "navigationBarTitleText": "申请退款", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/projectRefund/projectRefund.wxml b/pages/user/companyMine/projectRefund/projectRefund.wxml new file mode 100644 index 0000000..9ee3d65 --- /dev/null +++ b/pages/user/companyMine/projectRefund/projectRefund.wxml @@ -0,0 +1,89 @@ +
+ + + + + + + {{item.title}} + {{item.value}} + 单价:{{item.price}} X {{item.qty}} + + + + + + + + 商品总金额 + + + + 运费 + + + + 优惠券抵扣 + + + + 实际支付金额 + + + + + + + + 退款金额 + + + + + + 选择退款原因 + + + {{refundTitle[refundIndex].remark}} + + + + + + + 退款类型 + + + + + + 退款原因 + + + + + + 添加图片 + + + + × + + + + + 添加图片 + + + + + + + + + + +
+ +1111111111 \ No newline at end of file diff --git a/pages/user/companyMine/projectRefund/projectRefund.wxss b/pages/user/companyMine/projectRefund/projectRefund.wxss new file mode 100644 index 0000000..0559a9a --- /dev/null +++ b/pages/user/companyMine/projectRefund/projectRefund.wxss @@ -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: #378fff; + 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: #378fff; + 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: #378fff; + 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; +} diff --git a/pages/user/companyMine/refundInfo/refundInfo.js b/pages/user/companyMine/refundInfo/refundInfo.js new file mode 100644 index 0000000..7464f96 --- /dev/null +++ b/pages/user/companyMine/refundInfo/refundInfo.js @@ -0,0 +1,27 @@ +// pages/user/companyMine/refundInfo/refundInfo.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + info:[],//进度 + }, + onLoad: function (options) { + this.setData({ + refundId: options.refundId + }) + this.getInfo() + }, + /** + * 进度详情 + */ + getInfo() { + wx.$api.companyModule.getRefundLogsInfo(this.data.refundId).then(res => { + console.log(res) + this.setData({ + info: res + }) + }) + }, +}) \ No newline at end of file diff --git a/pages/user/companyMine/refundInfo/refundInfo.json b/pages/user/companyMine/refundInfo/refundInfo.json new file mode 100644 index 0000000..0edf41d --- /dev/null +++ b/pages/user/companyMine/refundInfo/refundInfo.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "退款进度", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/refundInfo/refundInfo.wxml b/pages/user/companyMine/refundInfo/refundInfo.wxml new file mode 100644 index 0000000..6774ae3 --- /dev/null +++ b/pages/user/companyMine/refundInfo/refundInfo.wxml @@ -0,0 +1,24 @@ + + + + + + + + {{item.state_text}} + 处理时间:{{item.created_at}} + + + + + + {{item.state_text}} + 处理时间:{{item.created_at}} + 退款类型:仅退款 + 退款金额:¥{{item.refund_total}} + 退款原因:{{item.title}} + 退款描述:{{item.remark}} + + + + \ No newline at end of file diff --git a/pages/user/companyMine/refundInfo/refundInfo.wxss b/pages/user/companyMine/refundInfo/refundInfo.wxss new file mode 100644 index 0000000..5debacd --- /dev/null +++ b/pages/user/companyMine/refundInfo/refundInfo.wxss @@ -0,0 +1,69 @@ +/* pages/user/companyMine/refundInfo/refundInfo.wxss */ +.content { + padding: 120rpx 30rpx; + background-color: #fff; +} + +.item { + display: flex; + flex-direction: row; + justify-content: start; + align-items: flex-start; + box-sizing: border-box; +} + +.left { + width: 30rpx; + height: 30rpx; + background-color: #378fff; + border-radius: 50%; + position: relative; + top: 6rpx; + z-index: 3; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + color: #fff; + font-size: 24rpx; +} + +.right { + margin-left: 30rpx; + z-index: 3; + position: relative; +} + +.title { + color: #333; + font-weight: 600; + font-size: 30rpx; +} + +.time { + color: #999; + font-size: 24rpx; + margin-top: 6rpx; +} + +.line { + background-color: #378fff; + height: 172rpx; + width: 1rpx; + position: relative; + left: -16rpx; + top: 6rpx; + z-index: 2; + opacity: 0.3; +} + +.detail { + color: #666; + font-size: 24rpx; + margin-top: 10rpx; +} + +.mt20 { + margin-top: 30rpx; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 87dc3de..ba5ae06 100644 --- a/project.config.json +++ b/project.config.json @@ -1,91 +1,115 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [] + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "enhance": false, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": true, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "useMultiFrameRuntime": false, + "useApiHook": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "setting": { - "urlCheck": true, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": true, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "useMultiFrameRuntime": false, - "useApiHook": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "enableEngineNative": false, - "bundle": false, - "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true + "enableEngineNative": false, + "bundle": false, + "useIsolateContext": true, + "useCompilerModule": true, + "userConfirmedUseCompilerModuleSwitch": false, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true + }, + "compileType": "miniprogram", + "libVersion": "2.14.0", + "appid": "wxd931d03dfe955254", + "projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "plugin": { + "list": [] }, - "compileType": "miniprogram", - "libVersion": "2.14.0", - "appid": "wxd931d03dfe955254", - "projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F", - "debugOptions": { - "hidedInDevtools": [] + "game": { + "list": [] }, - "scripts": {}, - "isGameTourist": false, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": { - "plugin": { - "list": [] + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [ + { + "name": "登录", + "pathName": "pages/login/login", + "query": "", + "scene": null }, - "game": { - "list": [] + { + "name": "搜索", + "pathName": "pages/company/search/search", + "query": "", + "scene": null }, - "gamePlugin": { - "list": [] + { + "name": "商城", + "pathName": "pages/mall/index", + "query": "", + "scene": null }, - "miniprogram": { - "list": [ - { - "name": "登录", - "pathName": "pages/login/login", - "query": "", - "scene": null - }, - { - "name": "搜索", - "pathName": "pages/company/search/search", - "query": "", - "scene": null - }, - { - "name": "商城", - "pathName": "pages/mall/index", - "query": "", - "scene": null - }, - { - "name": "pages/user/index", - "pathName": "pages/user/index", - "query": "", - "scene": null - } - ] + { + "name": "pages/user/index", + "pathName": "pages/user/index", + "query": "", + "scene": null + }, + { + "name": "pages/user/companyMine/companyOrder", + "pathName": "pages/user/companyMine/companyOrder", + "query": "orderid=20201229132338964625", + "scene": null + }, + { + "name": "pages/user/companyMine/companyOrder", + "pathName": "pages/user/companyMine/companyOrder", + "query": "orderid=20201229132338964625", + "scene": null + }, + { + "name": "pages/user/companyMine/projectDetail/projectDetail", + "pathName": "pages/user/companyMine/projectDetail/projectDetail", + "query": "orderid=20201229132338964625", + "scene": null + }, + { + "name": "pages/user/companyMine/refundInfo/refundInfo", + "pathName": "pages/user/companyMine/refundInfo/refundInfo", + "query": "orderid=20201229132338964625", + "scene": null } + ] } + } } \ No newline at end of file diff --git a/static/images/wl.png b/static/images/wl.png new file mode 100644 index 0000000..4615a01 Binary files /dev/null and b/static/images/wl.png differ