Commit 74988e98 by 杨北旺

提交售后

1 parent a3468c92
......@@ -121,11 +121,11 @@
"provider": "wxd5b8312c3a09901a"
},
"express-plugin": {
"version": "1.2.0",
"version": "1.2.1",
"provider": "wx1b1f66316b427c74"
},
"collectionPlugin": {
"version": "1.2.0",
"version": "1.2.1",
"provider": "wx5e90fdd843841356"
}
}
......@@ -145,7 +145,9 @@
"pages/kaqDetail/kaqDetail",
"pages/chargeWait/chargeWait",
"pages/open/open",
"pages/agreement/index"
"pages/agreement/index",
"pages/saleApply/saleApply",
"pages/saleDetail/saleDetail"
]
},
{
......
page {
background: white;
background: white !important;
}
.container {
......
page {
background: white;
background: white !important;
}
.map-box {
......
......@@ -103,4 +103,7 @@
}
.default-btn{
margin-top: 206rpx;
background: #3772EC;
border-radius: 48rpx;
height: 88rpx;
}
\ No newline at end of file
......@@ -78,4 +78,4 @@
</view>
<authorize scopeType="userLocation" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file
<!-- <glsx-privacy appletName="海马刀"></glsx-privacy> -->
\ No newline at end of file
......@@ -58,7 +58,7 @@
justify-content: flex-end;
}
.address-item .bottom .choose.default{
color: var(--btnColor);
color: #3772EC;
}
.address-item .bottom .choose icon{
margin-right: 20rpx;
......@@ -74,9 +74,9 @@
.btn-box .btn{
width: 100% !important;
margin: 6rpx var(--margin);
background-color:var(--btnColor);
background-color:#3772EC;
height: 88rpx;
color: #fff;
font-size: var(--margin);
border-radius:var(--borderRadius);
border-radius:48rpx;
}
\ No newline at end of file
page {
background: white;
background: white !important;
}
.box_wrapper {
width: 100%;
......
......@@ -364,7 +364,7 @@ Page({
const {
item
} = e.currentTarget.dataset
wx.p.router.go('/packageEquity/pages/kaqDetail/kaqDetail', {
wx.p.router.go('/packageSaveMoney/pages/kaqDetail/kaqDetail', {
orderCode: item.orderCode
})
},
......@@ -383,7 +383,7 @@ Page({
item
} = e.currentTarget.dataset
item.pageFrom = 'coupons'
wx.p.router.go('/packageEquity/pages/saleApply/saleApply', item)
wx.p.router.go('/packageSaveMoney/pages/saleApply/saleApply', item)
},
// 卡卷 确认收货
toComfirmPage(e) {
......
/* components/CarBrands/CarBrands.wxss */
page{
background: white;
background: white !important;
}
.y-center {
display: flex;
......
page {
background: white;
background: white !important;
}
.agree-container-page {
......
/* packageEquity/pages/allEquity/allEquity.wxss */
page {
background: #F7F8FA;
background: #F7F8FA !important;
}
.allEquity-container {
......
page {
background: white;
background: white !important;
}
.box_wrapper {
......
/* pages/couponDetail/couponDetail.wxss */
page{
background: white;
background: white !important;
}
.coupon_info{
display: flex;
......
import { IMG_URL } from '~/config';
Page({
/**
* 页面的初始数据
*/
data: {
upImageURL: [],
showWaiting: false,
query: null,
IMGURL:IMG_URL
},
onLoad: function (options) {
let query = null
let isPackage = false
if (options) {
query = {
orderCode: options.orderCode,
orderPrices: options.payPrice
}
isPackage = options.pageFrom == 'package' ? true : false
}
this.setData({
query,
isPackage
})
},
//填写描述
bindinput(e) {
this.data.desc = e.detail.value
},
// 上传图片
toUploadImage() {
let _this = this
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
const [tempFiles] = res.tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
wx.p.wxApi.showLoading('上传中...')
wx.p.api.common.uploadImg({
file: `${type}@${_res.data}`
})
.then(img => {
wx.p.wxApi.hideLoading()
_this.data.upImageURL = []
_this.data.upImageURL.push(img)
_this.setData({
upImageURL: _this.data.upImageURL
})
})
}
})
}
})
},
// 提交
sumbit() {
if (this.data.isPackage) {
wx.p.wxApi.showLoading()
this.packageSumbit()
return
}
if (!this.data.desc) {
wx.p.wxApi.showToast('请输入申请描述')
return
}
if (!this.data.upImageURL.length) {
wx.p.wxApi.showToast('请上传图片')
return
}
const { query, desc, upImageURL, isPackage } = this.data
wx.p.wxApi.showLoading()
let para = {
orderCode: query.orderCode,
reason: desc,
refundImg: upImageURL[0]
}
wx.p.api.equityApi.createdSale(para).then(res => {
wx.hideLoading()
this.setData({
showWaiting: true
})
setTimeout(() => {
if (isPackage) {
wx.redirectTo({
url: '/packageEquity/pages/packageDetail/packageDetail?orderCode=' + query.orderCode
})
} else {
wx.redirectTo({
url: '/packageSaveMoney/pages/saleDetail/saleDetail?orderCode=' + query.orderCode
})
}
}, 3000)
})
},
// 套餐提交申请售后
packageSumbit() {
const { query, desc } = this.data
let para = {
orderCode: query.orderCode,
reason: desc
}
wx.p.api.equityApi.packageApply(para).then(res => {
wx.hideLoading()
this.setData({
showWaiting: true
})
setTimeout(() => {
wx.redirectTo({
url: '/packageEquity/pages/packageDetail/packageDetail?orderCode=' + query.orderCode
})
// wx.navigateBack({
// delta: 1
// })
}, 3000)
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file
<view class="apply-container">
<block wx:if="{{!showWaiting}}">
<view class="box">
<view class="box_title">申请描述</view>
<view class="box_input">
<textarea class="textarea_wrap" bind:input="bindinput" disable-default-padding maxlength="230" placeholder-class="textarea-placeholder" placeholder="请您详细描述申请说明"></textarea>
</view>
</view>
<view wx:if="{{!isPackage}}" class="box">
<view class="box_title">上传图片</view>
<image webp wx:if="{{!upImageURL.length}}" bind:tap="toUploadImage" class="image_up_load" src="{{IMGURL}}equity/upload.png?v={{img_version}}" />
<image webp wx:else bind:tap="toUploadImage" class="image_up_load" src="{{upImageURL[0]}}" />
</view>
<view class="box_wrap">
<view class="box_title">申请金额</view>
<view class="box_price">¥{{query.orderPrices}}</view>
</view>
<view class="apply_btn" bind:tap="sumbit">提交申请</view>
</block>
<block wx:if="{{showWaiting}}">
<view class="sales-h">
<image webp class="successIcon" src="{{IMGURL}}equity/return_success.png?v={{img_version}}" />
<view class="sales-status-1">等待处理</view>
<view class="sales-status-2">已提交申请,等待处理</view>
</view>
</block>
</view>
<glsx-privacy appletName="车生活助手"></glsx-privacy>
\ No newline at end of file
.apply-container{
box-sizing: border-box;
padding: 30rpx;
}
.box{
background: #FFFFFF;
border-radius: 12rpx;
padding: 0px 32rpx;
margin-bottom: 20rpx;
}
.box_title{
font-size: 32rpx;
line-height: 60rpx;
font-weight: 500;
color: #333333;
}
.textarea-placeholder{
padding: 0;
}
/* .box_input{
min-height: 240rpx;
} */
.textarea_wrap{
width: 100%;
min-height: 240rpx;
word-break: break-all;
}
.image_up_load{
margin: 20rpx 0px;
width: 160rpx;
height: 160rpx;
position: relative;
}
.box_wrap{
height: 100rpx;
background: #FFFFFF;
border-radius: 12rpx;
padding: 0px 32rpx;
margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.box_price{
font-size: 40rpx;
font-weight: 500;
color: #3772EC;
}
.apply_btn{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 88rpx;
color: #FFFFFF;
font-weight: 500;
background: #3772EC;
border-radius: 44rpx;
margin: 40rpx auto;
font-size: 36rpx;
}
.sales-h{
margin-bottom: 60rpx;
text-align: center;
line-height: 60rpx;
}
.successIcon{
width: 100rpx;
height: 100rpx;
margin-top: 200rpx;
}
.sales-icon {
font-size: 100rpx;
color: #19c341;
margin-top: 100rpx;
}
.sales-status-1{
height: 66rpx;
font-size: 48rpx;
font-weight: 500;
color: #333333;
line-height: 66rpx;
}
.sales-status-2 {
font-size: 32rpx;
font-weight: 400;
color: #999999;
line-height: 44rpx;
margin-top: 16rpx;
}
\ No newline at end of file
Page({
/**
* 页面的初始数据
*/
data: {},
onLoad: function (options) {
this.getSaleDetail(options.orderCode)
},
// 获取售后详情
getSaleDetail(orderCode) {
wx.p.api.equityApi.saleDetailInfo({ orderCode }).then(res => {
res.reason = decodeURIComponent(res.reason)
res.createDate = new Date(res.createDate).format('yyyy-MM-dd hh:mm:ss')
this.setData({
detail: res
})
})
},
previewImage() {
wx.p.wxApi.previewImage({
current: this.data.detail.img,
urls: [this.data.detail.img]
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file
<view class="sale_detail_page">
<view wx:if="{{detail.refundStatus==1}}" class="box">
<view class="title">售后中</view>
<view class="tip">等待平台处理</view>
</view>
<view wx:if="{{detail.refundStatus==3}}" class="box">
<view class="title">已退款</view>
<view class="tip">钱款将原路退回至您的账户</view>
</view>
<view wx:if="{{detail.refundStatus==2}}" class="box">
<view class="title">拒绝售后</view>
<view class="tip">该商品已退换兑换或不支持售后</view>
</view>
<view class="sale_content">
<view class="content_line">
<view class="title_line">售后商品:</view>
<view class="content_info">{{detail.productName}}</view>
</view>
<view class="content_line">
<view class="title_line">申请金额:</view>
<view class="content_info title_price">{{detail.orderPrice}}</view>
</view>
<view class="content_line">
<view class="title_line">申请时间:</view>
<view class="content_info">{{detail.createDate}}</view>
</view>
<view class="content_line">
<view class="title_line">申请描述:</view>
<view class="content_info">{{detail.reason}}</view>
</view>
<view class="content_line">
<view class="title_line">售后编号:</view>
<view class="content_info">{{detail.refundCode}}</view>
</view>
<view class="content_line">
<view class="title_line">订单编号:</view>
<view class="content_info">{{detail.orderCode}}</view>
</view>
</view>
<view class="iamge_wrap">
<image webp bind:tap="previewImage" mode="widthFix" class="sale_image" src="{{detail.img}}" />
</view>
</view>
\ No newline at end of file
page{
background: white !important;
}
.sale_detail_page{
box-sizing: border-box;
padding: 30rpx;
width: 100%;
}
.box{
display: flex;
flex-direction: column;
justify-content: center;
}
.title{
text-align: center;
height: 66rpx;
font-size: 48rpx;
font-weight: 500;
color: #333333;
line-height: 66rpx;
}
.tip{
text-align: center;
font-size: 32rpx;
font-weight: 400;
color: #999999;
line-height: 44rpx;
margin-top: 16rpx;
}
.sale_content{
margin-top: 40rpx;
}
.content_line{
display: flex;
align-items: center;
margin-top: 20rpx;
}
.title_line{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.content_info{
font-size: 28rpx;
font-weight: 500;
color: #999999;
}
.title_price{
color: #FF9900;
}
.iamge_wrap{
width: 100%;
display: flex;
justify-content: center;
}
.sale_image{
margin-top: 40rpx;
width: 192rpx;
height: auto;
}
\ No newline at end of file
......@@ -111,7 +111,6 @@ Page({
'production': [44209566, 44209565],
}
const MerchantList = merchantObj[env]
console.log(MerchantList, 'MerchantList');
let storeList = [], index = 0
MerchantList.forEach((el, i) => {
wx.$merchant_id = el
......@@ -133,13 +132,11 @@ Page({
})
if (storeList.length > 1) {
storeList.forEach((ele, i) => {
console.log(i, this.defaultMerchant);
if (this.defaultMerchant == i) {
index = i
}
})
const currentStore = storeList[index]
console.log(currentStore, index, 'currentStore');
wx.$merchant_id = currentStore.merchantId
wx.p.storage.set('merchant_info', {
merchantId: currentStore.merchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!