Commit 441ead10 by 王志慧

Merge branch 'master' into 'SAAS+V4.56.0-0908'

Master

See merge request !1
2 parents 017b20be 0fb654a4
Showing 51 changed files with 1614 additions and 528 deletions
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
"pages/webView/webView", "pages/webView/webView",
"pages/Login/Login" "pages/Login/Login"
], ],
"requiredPrivateInfos": [ "requiredPrivateInfos": ["getLocation"],
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -22,7 +20,8 @@ ...@@ -22,7 +20,8 @@
"selectedColor": "#8A303A", "selectedColor": "#8A303A",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"borderStyle": "white", "borderStyle": "white",
"list": [{ "list": [
{
"pagePath": "pages/tab/index/index", "pagePath": "pages/tab/index/index",
"text": "首页", "text": "首页",
"iconPath": "assets/images/home.png", "iconPath": "assets/images/home.png",
...@@ -42,7 +41,8 @@ ...@@ -42,7 +41,8 @@
} }
] ]
}, },
"subpackages": [{ "subpackages": [
{
"root": "packageIndex", "root": "packageIndex",
"pages": [ "pages": [
"pages/bannerJumpPage/bannerJumpPage", "pages/bannerJumpPage/bannerJumpPage",
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
"authorize": "/components/Authorize/Authorize", "authorize": "/components/Authorize/Authorize",
"popup": "/components/Popup/Popup", "popup": "/components/Popup/Popup",
"goods-action": "/components/GoodsAction/GoodsAction", "goods-action": "/components/GoodsAction/GoodsAction",
"glsx-privacy":"glsx-applet-component/GlsxPrivacy/index" "glsx-privacy": "glsx-applet-component/GlsxPrivacy/index"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
...@@ -100,7 +100,9 @@ ...@@ -100,7 +100,9 @@
"desc": "你的位置信息将用于小程序位置接口的效果展示" "desc": "你的位置信息将用于小程序位置接口的效果展示"
} }
}, },
"plugins": { "plugins": {},
"useExtendedLib": {
"weui": true
}, },
"__usePrivacyCheck__": true "__usePrivacyCheck__": true
}
\ No newline at end of file \ No newline at end of file
}
...@@ -8,7 +8,6 @@ page { ...@@ -8,7 +8,6 @@ page {
--btnColor: #FC8A32; --btnColor: #FC8A32;
--borderRadius: 8rpx; --borderRadius: 8rpx;
--margin: 32rpx; --margin: 32rpx;
--
/* 兼容 IOS<11.2 先constant再env */ /* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom); --constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */ /* 兼容 IOS>11.2 */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 99;
background-color: #F9F7F7; background-color: #fff;
transition: all .15s; transition: all .15s;
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
} }
.navigation-bar-titleText { .navigation-bar-titleText {
color: #333333; color: #2D2D2E;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
</view> </view>
<view class="popup-footer isFullSucreen" wx:if="{{only}}"> <view class="popup-footer isFullSucreen" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view> <view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view> <view class="confirm btn text-center" bindtap="confirm">确定</view>
</view> </view>
<view class="popup-footer isFullSucreen" wx:else> <view class="popup-footer isFullSucreen" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确认</view> <view class="confirm doubtn text-center" bindtap="confirm">确定</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
width: 330rpx; width: 330rpx;
height: 80rpx; height: 80rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 12rpx; border-radius: 20rpx;
font-size: 28rpx; font-size: 28rpx;
} }
......
// components/Stepper/Stepper.js
Component({
/**
* 组件的属性列表
*/
properties: {
count: Number,
min: {
type: Number,
value: 1
},
max: {
type: Number,
value: 99,
observer(n) {
if (n && this.data.count > n) {
this.setData({ count: n })
this.triggerEvent('change', Number(n))
}
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
input(e) {
let { value } = e.detail
let {
max,
} = this.data
if (value > max) value = max
this.setData({ count: value })
},
tap() { },
blur(e) {
let { value } = e.detail
let {
min,
} = this.data
if (value < min) value = min
this.setData({ count: value })
this.triggerEvent('change', Number(value))
},
change(e) {
let {
add
} = e.currentTarget.dataset
let num = add ? 1 : -1
let {
count,
min,
max
} = this.data
if (count == min && !add) return
if (count == max && add) return
count += num
this.triggerEvent('change', Number(count))
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="stepper-box">
<view class="minus count-box text-center {{count == min?'opacity':''}}" catchtap="change"></view>
<input class="num count-box text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" />
<view class="add count-box text-center {{count == max?'opacity':''}}" catchtap="change" data-add>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* components/Stepper/Stepper.wxss */
@import "/assets/style/common.wxss";
.stepper-box {
display: flex;
align-items: center;
}
.stepper-box .count-box {
width: 52rpx;
height: 52rpx;
background: #F0F0F0;
margin-left: 7rpx;
font-size: 26rpx;
text-align: center;
color: #323233;
font-weight: normal;
position: relative;
}
.stepper-box .count-box.opacity::after ,.stepper-box .count-box.opacity::before{
opacity: .25;
}
.stepper-box .minus {
border-radius: 7rpx 0 0 7rpx;
background: transparent;
}
.stepper-box .num {
width: 59rpx;
}
.stepper-box .add {
border-radius: 0 7rpx 7rpx 0;
background: transparent;
}
.stepper-box .add::before,
.stepper-box .add::after,
.stepper-box .minus::after {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
content: '';
background-color: #2C2C2C;
border-radius: 2rpx;
}
.stepper-box .add::before,.stepper-box .minus::after {
width: 25rpx;
height: 2rpx;
}
.stepper-box .add::after{
width: 2rpx;
height: 25rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -35,13 +35,15 @@ Component({ ...@@ -35,13 +35,15 @@ Component({
methods: { methods: {
click(e) { click(e) {
let { let {
count count,
item
} = e.currentTarget.dataset } = e.currentTarget.dataset
this.setData({ this.setData({
count, count,
to: `to-${count}` to: `to-${count}`
}) })
this.triggerEvent('click', count) this.triggerEvent('click', count)
} this.triggerEvent('change', {count,item})
},
} }
}) })
\ No newline at end of file \ No newline at end of file
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}"> <scroll-view class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" > <view class="tab {{index==count||count==item.code?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" >
<view class="text" >{{item}}</view> <view class="text" >{{item.text||item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> --> <!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line"></view> <view class="line"></view>
</view> </view>
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<block wx:else> <block wx:else>
<view class="tab-box flex"> <view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}"> <view class="tab {{index==count||count==item.code?'active':''}}" bindtap="click" data-count="{{index}}" data-item="{{item}}">
<view class="text text-center">{{item}}</view> <view class="text text-center">{{item.text||item}}</view>
<view class="line"></view> <view class="line"></view>
</view> </view>
</block> </block>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
width: 100%; width: 100%;
height: 92rpx; height: 92rpx;
box-sizing: border-box; box-sizing: border-box;
background: #fff;
} }
.tab-box.left{ .tab-box.left{
padding-left: 32rpx; padding-left: 32rpx;
...@@ -26,8 +27,9 @@ ...@@ -26,8 +27,9 @@
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
color: #A9A9A9; color: #1B233D;
justify-content: center; justify-content: center;
font-size: 26rpx;
} }
.left .text{ .left .text{
justify-content: flex-start; justify-content: flex-start;
...@@ -37,17 +39,16 @@ ...@@ -37,17 +39,16 @@
} }
.tab.active .text { .tab.active .text {
font-weight: 500; font-weight: 600;
font-size: 28rpx;
transition: all .25s; transition: all .25s;
color: #2C2C2C; color:#1B233D;
} }
.tab .line { .tab .line {
width: 48rpx; width: 48rpx;
height: var(--borderRadius); height: var(--borderRadius);
background: var(--btnColor); background: var(--themeColor);
border-radius: 2rpx; border-radius: 6rpx;
margin: 0 auto; margin: 0 auto;
transform: scale(0); transform: scale(0);
transition: all .25s; transition: all .25s;
......
...@@ -6,7 +6,7 @@ export const ToolList = Object.freeze([ ...@@ -6,7 +6,7 @@ export const ToolList = Object.freeze([
}, },
]); ]);
export const ORDER_LIST =[ export const ORDER_LIST = [
{ {
text: "全部", text: "全部",
code: 0, code: 0,
...@@ -31,8 +31,59 @@ export const ORDER_LIST =[ ...@@ -31,8 +31,59 @@ export const ORDER_LIST =[
code: 4, code: 4,
}, },
{ {
text: "售后", text: "退货/售后",
image: "aftermarket", image: "aftermarket",
code: 5, code: 5,
}, },
]
\ No newline at end of file \ No newline at end of file
];
export const RefundReason = [
{
text: "商品无货",
value: 1,
},
{
text: "发货时间问题",
value: 2,
},
{
text: "不想要了/不喜欢",
value: 3,
},
{
text: "商品信息填写错误",
value: 4,
},
{
text: "地址信息填写错误",
value: 5,
},
{
text: "商品降价",
value: 6,
},
{
text: "其他",
value: 7,
},
{
text: "尺码不合适",
value: 8,
},
{
text: "无理由退货",
value: 9,
},
{
text: "发票问题",
value: 10,
},
{
text: "商品与页面描述不符",
value: 11,
},
{
text: "发错货",
value: 12,
},
];
{
"navigationBarTitleText": "Flex自适应宽度示例"
}
\ No newline at end of file \ No newline at end of file
<!-- flex子元素自适应宽度示例 -->
<view class="container">
<view class="section">
<view class="title">使用 flex: 1 平均分配宽度</view>
<view class="flex-container">
<view class="flex-item item1">项目1</view>
<view class="flex-item item2">项目2</view>
<view class="flex-item item3">项目3</view>
</view>
</view>
<view class="section">
<view class="title">使用不同 flex 值分配宽度</view>
<view class="flex-container">
<view class="flex-item item1" style="flex: 2">项目1 (flex: 2)</view>
<view class="flex-item item2" style="flex: 1">项目2 (flex: 1)</view>
<view class="flex-item item3" style="flex: 1">项目3 (flex: 1)</view>
</view>
</view>
<view class="section">
<view class="title">根据内容自适应宽度</view>
<view class="flex-container">
<view class="flex-item item1 auto-width">短</view>
<view class="flex-item item2 auto-width">中等长度内容</view>
<view class="flex-item item3 auto-width">这是一个很长的内容</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* flex子元素自适应宽度示例样式 */
.container {
padding: 20rpx;
}
.section {
margin-bottom: 40rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
color: #333;
}
.flex-container {
display: flex;
width: 100%;
gap: 20rpx;
margin-bottom: 20rpx;
}
.flex-item {
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10rpx;
color: white;
font-size: 28rpx;
}
.item1 {
background-color: #ff6b6b;
}
.item2 {
background-color: #4ecdc4;
}
.item3 {
background-color: #45b7d1;
}
/* 平均分配宽度 */
.flex-item {
flex: 1;
}
/* 根据内容自适应宽度 */
.auto-width {
flex: 0 1 auto;
/* flex-grow: 0 (不扩展)
flex-shrink: 1 (可以收缩)
flex-basis: auto (根据内容确定基础宽度) */
}
\ No newline at end of file \ No newline at end of file
{ {
"navigationBarTitleText": "申请售后" "component": true,
"usingComponents": {}
} }
\ No newline at end of file \ No newline at end of file
/* packageMine/pages/order/afterSale_step_one/afterSale_step_one.wxss *//* packageMine/pages/order/afterSale_step_one/afterSale_step_one.wxss */
.layout {
padding: 24rpx var(--margin);
}
.title { .type-box {
font-size: 32rpx; display: flex;
font-weight: 500; align-items: center;
margin-bottom: 40rpx; gap: 24rpx;
justify-content: space-between;
padding-top: var(--margin);
width: 100%;
} }
.item { .item {
border: 4rpx solid transparent; flex: 1;
height: 152rpx; border: 2rpx solid #EBEBEB;
height: 88rpx;
position: relative; position: relative;
background-color: #fff; background-color: #fff;
font-size: 40rpx; font-size: 28rpx;
margin-bottom: var(--margin);
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
} }
.item.active{ .item.active{
border-color: var(--btnColor); border-color: var(--btnColor);
} }
.default-btn{
margin: 220rpx auto 0;
}
.active .icon{ .active .icon{
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
width: 64rpx; width: 40rpx;
height: 64rpx; height: 40rpx;
} }
\ No newline at end of file \ No newline at end of file
<view class="layout"> <view class="type-box">
<view class="title">请选择售后类型</view>
<view class="box">
<block wx:for="{{afterSaleList}}" wx:key="index"> <block wx:for="{{afterSaleList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}"> <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}">
{{afterType[item.value]}} {{afterType[item.value]}}
...@@ -9,6 +7,4 @@ ...@@ -9,6 +7,4 @@
</view> </view>
</view> </view>
</block> </block>
</view>
</view>
<view class="default-btn" bindtap="click">确定</view>
\ No newline at end of file \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
import { import { afterSaleMixin } from "~/mixins/index";
afterSaleMixin import { RefundReason } from "~/constants/mine.js";
} from '~/mixins/index' console.log("🚀 ~ RefundReason:", RefundReason)
Page({ Page({
behaviors: [afterSaleMixin], behaviors: [afterSaleMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
imgUrls: [] imgUrls: [],
RefundReason: Object.freeze(RefundReason),
}, },
previewImage(e) { previewImage(e) {
let params = e.currentTarget.dataset let params = e.currentTarget.dataset;
wx.p.wxApi.previewImage(params) wx.p.wxApi.previewImage(params);
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let imgUrls = [] let imgUrls = [];
if (options.imgUrls) imgUrls = options.imgUrls wx.p.router.getRouterParams(options).then((params) => {
if (params.imgUrls) imgUrls = params.imgUrls;
this.setData({
orderObj: params,
imgUrls,
maxRefundCount: params.refundCount,
});
});
},
showPopup() {
this.setData({ this.setData({
orderObj: options, showPopup: true,
imgUrls, });
maxPrice: options.refundPrice },
}) confirmPopup() {
this.setData({
showPopup: false,
});
}, },
input(e) { input(e) {
this.setData({ this.setData({
'orderObj.remark': e.detail.value "orderObj.remark": e.detail.value,
}) });
},
changeRefundCount(e) {
console.log("🚀 ~ changeRefundCount ~ e:", e);
this.setData({
"orderObj.refundCount": e.detail,
});
}, },
noScroll() {}, noScroll() {},
changePrice() { showRefundCount() {
this.setData({ this.setData({
showPriceInput: true showRefundCount: true,
}) });
}, },
blur(e) { blur(e) {
const rex = /^(([1-9]{1}\d*)|(0{1}))(\.\d{2})$/ const rex = /^(([1-9]{1}\d*)|(0{1}))(\.\d{2})$/;
console.log(e) console.log(e);
let { let { value } = e.detail;
value let { maxPrice } = this.data;
} = e.detail if (value > maxPrice) value = maxPrice;
let { if (value < 0) value = 0;
maxPrice if (!rex.test(value)) value = maxPrice;
} = this.data
if (value > maxPrice) value = maxPrice
if (value < 0) value = 0
if (!rex.test(value)) value = maxPrice
this.setData({ this.setData({
'orderObj.refundPrice': Number(value).toFixed(2), "orderObj.refundPrice": Number(value).toFixed(2),
showPriceInput: false showPriceInput: false,
}) });
}, },
del(e) { del(e) {
let { let { index } = e.currentTarget.dataset;
index let { imgUrls } = this.data;
} = e.currentTarget.dataset imgUrls.splice(index, 1);
let {
imgUrls
} = this.data
imgUrls.splice(index, 1)
this.setData({ this.setData({
imgUrls imgUrls,
}) });
}, },
upLoad() { upLoad() {
let _this = this let _this = this;
let { let { imgUrls } = this.data;
imgUrls
} = this.data
wx.chooseImage({ wx.chooseImage({
count: 1 count: 1,
}).then(res => { }).then((res) => {
let [tempFiles] = res.tempFilePaths let [tempFiles] = res.tempFilePaths;
let imgType = tempFiles.split('.')[1] let imgType = tempFiles.split(".")[1];
let type = imgType == 'unknown' ? 'jpg' : imgType let type = imgType == "unknown" ? "jpg" : imgType;
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径 filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式 encoding: "base64", //编码格式
success(_res) { success(_res) {
wx.p.wxApi.showLoading('上传中...') wx.p.wxApi.showLoading("上传中...");
wx.p.api.common.uploadImg({ wx.p.api.common
file: `${type}@${_res.data}` .uploadImg({
file: `${type}@${_res.data}`,
}) })
.then(img => { .then((img) => {
wx.p.wxApi.hideLoading() wx.p.wxApi.hideLoading();
console.log(img) console.log(img);
imgUrls.push(img) imgUrls.push(img);
_this.setData({ _this.setData({
imgUrls imgUrls,
}) });
}) });
} },
}) });
}) });
}, },
confirm() { confirm() {
let { let { orderObj, imgUrls } = this.data;
orderObj, orderObj.imgUrls = imgUrls;
imgUrls console.log(orderObj);
} = this.data wx.p.api.shopmallApi.afterSale(orderObj).then(({ code, data, message }) => {
orderObj.imgUrls = imgUrls if (code == "0") {
console.log(orderObj) wx.p.wxApi.showToast("申请成功!");
wx.p.api.shopmallApi.afterSale(orderObj).then(({
code,
data,
message
}) => {
if (code == '0') {
wx.p.wxApi.showToast('申请成功!')
setTimeout(() => { setTimeout(() => {
wx.p.router.back(prevPage => { wx.p.router.back((prevPage) => {
prevPage.clearData && prevPage.clearData() prevPage.clearData && prevPage.clearData();
}, 2) }, 2);
}, 1.5 * 1000) }, 1.5 * 1000);
} else { } else {
wx.p.wxApi.showToast(message) wx.p.wxApi.showToast(message);
} }
}) });
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -148,5 +152,5 @@ Page({ ...@@ -148,5 +152,5 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}
})
\ No newline at end of file \ No newline at end of file
onReachBottom: function () {},
});
{ {
"navigationBarTitleText": "申请售后", "navigationBarTitleText": "申请售后",
"usingComponents": { "usingComponents": {
"gl-textarea": "/components/GlTextarea/GlTextarea" "gl-textarea": "/components/GlTextarea/GlTextarea",
"afterSale_step_one":"../afterSale_step_one/afterSale_step_one",
"Stepper": "/components/Stepper/Stepper"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,19 +4,62 @@ ...@@ -4,19 +4,62 @@
} }
.title { .title {
font-weight: 500; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
padding: 24rpx 0; padding: 32rpx 0;
color: #1b233d;
} }
.box { .box {
background: #FFFFFF; background: #ffffff;
border-radius: 8rpx; border-radius: 8rpx;
.box-item {
display: flex;
height: 100rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
.box-item-title {
font-weight: 500;
font-size: 28rpx;
color: #333;
}
.box-item-value {
font-weight: 400;
font-size: 28rpx;
color: #6e6e7a;
display: flex;
justify-content: center;
align-items: center;
.arrow {
margin-left: 16rpx;
width: 20rpx;
height: 20rpx;
transform: translateY(1rpx);
}
.value {
display: inline;
font-weight: 400;
font-size: 24rpx;
color: var(--themeColor);
}
.price {
display: inline;
color: #1b233d;
margin-right: 20rpx;
}
}
.refund {
color: var(--themeColor);
font-size: 36rpx;
font-weight: 700;
}
}
} }
.type { .type {
height: 104rpx; height: 104rpx;
background: #EFF0F2; background: #eff0f2;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 40rpx; font-size: 40rpx;
} }
...@@ -73,7 +116,7 @@ ...@@ -73,7 +116,7 @@
.upload-box .item { .upload-box .item {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background: #D8D8D8; background: #d8d8d8;
margin-bottom: 30rpx; margin-bottom: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
position: relative; position: relative;
...@@ -94,16 +137,17 @@ ...@@ -94,16 +137,17 @@
.upload-box .upload-item { .upload-box .upload-item {
background-color: #fff; background-color: #fff;
border: 2rpx solid #D8D8D8; border: 2rpx solid #d8d8d8;
box-sizing: border-box; box-sizing: border-box;
} }
.btn { .btn {
margin: 48rpx auto 20rpx; margin: 48rpx 16rpx;
width: 332rpx;
height: 80rpx; height: 80rpx;
background: var(--btnColor); background: var(--btnColor);
border-radius: 8rpx; border-radius: 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #fff; color: #fff;
} }
...@@ -114,7 +158,7 @@ ...@@ -114,7 +158,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 2; z-index: 2;
background-color: rgba(0, 0, 0, .7); background-color: rgba(0, 0, 0, 0.7);
} }
.price-input { .price-input {
...@@ -125,4 +169,4 @@ ...@@ -125,4 +169,4 @@
padding: 0 40rpx; padding: 0 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
}
\ No newline at end of file \ No newline at end of file
}
<view class="layout isFullSucreen"> <view class="layout isFullSucreen">
<view class="title">售后类型</view> <!-- <view class="title">售后类型</view> -->
<view class="type text-center"> <!-- <view class="type text-center"> -->
{{afterType[orderObj.refundType]}} <afterSale_step_one />
<!-- </view> -->
<view class="title">申请退货退款</view>
<view class="box">
<view class="box-item">
<text class="box-item-title">退款原因</text>
<view class="box-item-value" bindtap="showPopup">
请选择
<view class="arrow">
<glsx-image webp src="mine/mine-arrow.png"></glsx-image>
</view>
</view>
</view>
<view class="box-item">
<text class="box-item-title">数量</text>
<view class="box-item-value">
<view class="value" bindtap="showRefundCount" wx:if="{{!showRefundCount}}">
<view class="price">{{orderObj.refundCount}}件</view>
修改数量
</view>
<Stepper wx:else count="{{orderObj.refundCount}}" min="1" max="{{maxRefundCount}}" bindchange="changeRefundCount" data-index="{{index}}"></Stepper>
</view>
</view>
<view class="box-item">
<text class="box-item-title">退款金额</text>
<view class="refund">{{orderObj.refundPrice}}积分</view>
</view>
</view> </view>
<view class="title">申请描述</view> <view class="title">申请描述</view>
<view class="description box"> <view class="description box">
<gl-textarea maxlength="230" value="{{orderObj.remark}}" bindinput="input" showWordLimit customMaxLength></gl-textarea> <gl-textarea maxlength="230" placeholder="补充描述,有助于商家更好的处理售后问题" value="{{orderObj.remark}}" bindinput="input" showWordLimit customMaxLength></gl-textarea>
</view>
<view class="price-box box">
申请金额
<view class="value" bindtap="changePrice">
<view class="price">¥{{orderObj.refundPrice}}</view>
修改金额
</view>
</view> </view>
<view class="title">上传图片</view> <view class="title">上传图片</view>
<view class="upload-box box flex"> <view class="upload-box box flex">
<block wx:if="{{imgUrls.length < 1}}"> <block wx:if="{{imgUrls.length < 1}}">
<view class="one text-center" bindtap="upLoad"> <view class="one text-center" bindtap="upLoad">
<view class="icon"> <view class="icon">
<glsx-image webp src="mine/camera.png"></glsx-image> <glsx-image webp src="mine/camera.png"></glsx-image>
</view> </view>
...@@ -28,9 +47,9 @@ ...@@ -28,9 +47,9 @@
<view class="item" catchtap="previewImage" data-current="{{item}}" data-urls="{{imgUrls}}"> <view class="item" catchtap="previewImage" data-current="{{item}}" data-urls="{{imgUrls}}">
<image webp src="{{item}}"></image> <image webp src="{{item}}"></image>
<view class="del text-center" catchtap="del" data-index="{{index}}"> <view class="del text-center" catchtap="del" data-index="{{index}}">
<view class="icon"> <view class="icon">
<glsx-image webp src="mine/del.png"></glsx-image> <glsx-image webp src="mine/del.png"></glsx-image>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
...@@ -43,16 +62,18 @@ ...@@ -43,16 +62,18 @@
</block> </block>
</block> </block>
</view> </view>
<view class="btn text-center" bindtap="confirm">提交申请</view> <view class="btn text-center" bindtap="confirm">提交</view>
</view> </view>
<popup show="{{showPopup}}" only="{{false}}" title="请选择退款原因" bindconfirm="confirmPopup">
<block wx:if="{{showPriceInput}}"> <view class="page-section">
<view class="price-input-box" catchtouchmove="noScroll"> <radio-group bindchange="radioChange">
<view class="price-input"> <label class="weui-cell weui-check__label" wx:for="{{RefundReason}}" wx:key="{{item.value}}">
<input type="digit" bindblur="blur" value="{{orderObj.refundPrice}}" focus="{{showPriceInput}}" class="input" <view class="weui-cell__hd">
adjust-position="{{false}}" /> <radio value="{{item.value}}" checked="true" />
</view> </view>
<view class="weui-cell__bd">{{item.text}}</view>
</label>
</radio-group>
</view> </view>
</block> </popup>
<glsx-privacy appletName="海马刀"></glsx-privacy> <glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -38,11 +38,11 @@ Page({ ...@@ -38,11 +38,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options,'=======') wx.p.router.getRouterParams(options).then(({ orderCode } = {}) => {
if (options && options.orderCode) { if (orderCode) {
let orderCode = options.orderCode; this.getOrderDetail(orderCode);
this.getOrderDetail(orderCode); }
} });
}, },
getOrderDetail(orderCode) { getOrderDetail(orderCode) {
let { orderObj } = this.data; let { orderObj } = this.data;
...@@ -129,33 +129,4 @@ Page({ ...@@ -129,33 +129,4 @@ Page({
qr: QR.createQrCodeImg(`t=1&c=${data}`), qr: QR.createQrCodeImg(`t=1&c=${data}`),
}); });
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
}); });
// packageMine/pages/order/index/components/bottom/bottom.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"style": "v2",
"usingComponents": {
"order-action-buttons": "../OrderActionButtons/OrderActionButtons"
}
}
\ No newline at end of file \ No newline at end of file
<view class="bottom">
<view class="total">
共{{item.goodsNumber}}件,实付款
<text class="price">{{item.payPrice}}积分</text>
</view>
<order-action-buttons item="{{item}}" has-user-info="{{hasUserInfo}}" />
</view>
\ No newline at end of file \ No newline at end of file
.bottom {
margin-top: 36rpx;
height: 64rpx;
display: flex;
align-items: flex-start;
font-size: 24rpx;
color: #656566;
}
.bottom .total {
position: relative;
bottom: 16rpx;
}
.bottom .price {
color: var(--themeColor);
font-weight: 600;
margin-left: 10rpx;
}
\ No newline at end of file \ No newline at end of file
// packageMine/pages/order/index/components/content/content.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
value: {}
},
hasUserInfo: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 查看评价
onLookEvaluate(e) {
this.triggerEvent('lookEvaluate', {
item: e.currentTarget.dataset.item
});
},
// 获取用户信息
onGetUserProfile(e) {
this.triggerEvent('getUserProfile', {
item: e.currentTarget.dataset.item
});
},
// 立即评价
onEvaluate(e) {
this.triggerEvent('evaluate', {
item: e.currentTarget.dataset.item
});
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"style": "v2",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="content-top {{item.orderStatus == 5 || item.orderStatus == 8?'':'content-bottom'}}">
<block wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="goods {{item.orderStatus == 5 || item.orderStatus == 8?'addTo':''}}">
<view class="icon">
<image webp wx:if="{{item.orderSource == 5}}" src="{{item.activityBigImg}}"></image>
<image webp wx:else src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view>
<view class="number">
x{{item.orderSource == 5 ? 1: i.goodsNumber}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="price">
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}积分
</view>
</view>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length > 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="onLookEvaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="onGetUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="onEvaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
.content-top {
/* 样式将在使用时通过类名动态添加 */
}
.content-bottom {
/* 样式将在使用时通过类名动态添加 */
}
.goods {
height: 208rpx;
padding: 24rpx 24rpx 24rpx 0;
box-sizing: border-box;
display: flex;
}
.addTo {
border-bottom: 2rpx solid #eff0f2;
}
.goods .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
position: absolute;
bottom: 0;
right: 0;
}
.goods .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.icon {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.background-X {
background-color: rgb(244, 244, 244);
}
.info {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.info-top,
.info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.info-top .number {
color: #656566;
font-size: 24rpx;
}
.info-bottom {
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
display: flex;
flex-direction: column;
align-items:flex-start;
gap: 8rpx;
}
.info-bottom .price {
color: var(--themeColor);
font-size: 26rpx;
font-weight: 500;
}
.info-bottom .specification {
color: #b1b1b3;
}
.userProfile {
background-color: #fff;
font-size: 24rpx;
margin: 0;
padding: 0;
font-weight: 500;
line-height: 46rpx;
}
\ No newline at end of file \ No newline at end of file
// packageMine/pages/order/index/components/orderActionButtons.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
value: {},
},
hasUserInfo: {
type: Boolean,
value: false,
},
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
// 取消付款
onCancelPay(e) {
let { orderCode } = e.currentTarget.dataset;
wx.showModal({
title: "温馨提示",
content: "请问您是否要取消付款",
confirmText: "确认",
cancelText: "取消",
confirmColor: "#F13C3D",
}).then((res) => {
if (res.confirm) {
wx.p.api.shopmallApi
.cancelPay(orderCode)
.then(({ code, message }) => {
if (code == "0") {
wx.p.wxApi.showToast("操作成功");
setTimeout(() => {
this.clearData();
}, 1.5e3);
} else {
wx.p.wxApi.showToast(message);
}
});
}
});
},
// 去支付
onPay(e) {
let _this = this;
wx.p.wxApi.showLoading("结算中...");
wx.p.api.shopmallApi
.payOrder(e.currentTarget.dataset)
.then(({ needPay, payParams }) => {
wx.hideLoading();
if (needPay) {
let params = {
nonceStr: payParams.nonceStr,
paySign: payParams.paySign,
signType: payParams.signType,
timeStamp: payParams.timeStamp,
package: payParams.packages,
};
wx.requestPayment({
...params,
success(res) {
setTimeout(() => {
_this.clearData();
}, 1.5e3);
_this.requestSubscribeMessage();
},
fail(res) {
if (res.errMsg == "requestPayment:fail cancel") {
wx.p.wxApi.showToast("取消支付");
} else {
wx.p.router.go("/packageMine/pages/order/complete/complete", {
params,
});
}
},
});
} else {
_this.requestSubscribeMessage();
}
});
},
// 查看详情
onToGoldDetail(e) {
const { item } = e.currentTarget.dataset;
wx.p.router.go("/packageEquity/pages/kaqDetail/orderDetail", {
orderCode: item.orderCode,
});
},
// 售后
onAfterSale(e) {
let {
item: { orderCode, payPrice,goodsNumber },
} = e.currentTarget.dataset;
wx.p.router.go(
"/packageMine/pages/order/afterSale_step_two/afterSale_step_two",
{
orderCode,
refundPrice: payPrice,
refundCount:goodsNumber
}
);
},
// 确认收货
onConfirmReceipt(e) {
let { orderCode } = e.currentTarget.dataset;
wx.showModal({
title: "温馨提示",
content: "是否确认收货",
confirmText: "确认",
cancelText: "取消",
confirmColor: "#F13C3D",
}).then((res) => {
if (res.confirm) {
wx.p.api.shopmallApi.confirmReceipt(orderCode).then((data) => {
wx.p.wxApi.showToast("操作成功");
setTimeout(() => {
this.clearData();
}, 1.5e3);
});
}
});
},
// 查看评价
onLookEvaluate(e) {
let {
item: { orderCode },
} = e.currentTarget.dataset;
wx.p.router.go(
"/packageMall/pages/commentDetails/commentDetails",
orderCode
);
},
// 获取用户信息
onGetUserProfile(e) {
const item = e.currentTarget.dataset.item;
this.triggerEvent("getUserProfile", { item });
},
// 立即评价
onEvaluate(e) {
let {
item: { orderCode },
} = e.currentTarget.dataset;
let { userInfo } = this.data;
wx.p.router.go("/packageMall/pages/addComment/addComment", {
orderCode,
userInfo,
});
},
// 取消订单
onCancelOrder(e) {
let { orderCode } = e.currentTarget.dataset;
wx.showModal({
title: "温馨提示",
content: "请问您是否要取消售后",
confirmText: "确认",
cancelText: "取消",
confirmColor: "#F13C3D",
}).then((res) => {
if (res.confirm) {
wx.p.api.shopmallApi
.cancelOrder(orderCode)
.then(({ code, message }) => {
if (code == "0") {
wx.p.wxApi.showToast("操作成功");
setTimeout(() => {
this.clearData();
}, 1.5e3);
} else {
wx.p.wxApi.showToast(message);
}
});
}
});
},
// 售后详情
onAfterSaleDetail(e) {
let url = "/packageMine/pages/order/afterSaleDetail/afterSaleDetail";
let {
item: { orderCode },
} = e.currentTarget.dataset;
wx.p.router.go(url, {
orderCode,
});
},
},
});
{
"component": true,
"style": "v2",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!-- 订单操作按钮组件 -->
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
<view class="btn pay" catchtap="onCancelPay" data-order-code="{{item.orderCode}}">取消付款</view>
<block wx:if="{{item.orderSource != 4}}">
<view class="btn pay" catchtap="onPay" data-order-code="{{item.orderCode}}">去支付</view>
</block>
</block>
<block wx:if="{{item.orderSource==5 && (item.orderStatus == 2 || item.orderStatus == 7)}}">
<view class="btn pay" data-item="{{item}}" bind:tap="onToGoldDetail">查看详情</view>
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<!-- deliveryType 结算方式(1:到店核销,2:快递发货) -->
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="onAfterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">售后</view>
</block>
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="onConfirmReceipt" data-order-code="{{item.orderCode}}">确认收货</view>
</block>
</block>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length == 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="onLookEvaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="onGetUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="onEvaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</block>
<block wx:else>
<block wx:if="{{item.afterSaleStatus == 1}}">
<view class="btn pay" catchtap="onCancelOrder" data-order-code="{{item.orderCode}}">取消售后</view>
</block>
<view class="btn" data-item="{{item}}" catchtap="onAfterSaleDetail">售后详情</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
/* components/orderActionButtons.wxss */
.btn-box {
position: absolute;
right: 24rpx;
bottom: 16rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.btn-box .btn {
display: flex;
align-items: center;
justify-content: center;
width: 144rpx;
height: 64rpx;
border-radius: 16rpx;
border: 1rpx solid #DCDFE6;
font-size: 24rpx;
margin-left: 12rpx;
color: #1B233D;
}
.btn-box .pay {
background-color: var(--btnColor);
color: #fff;
border-color: var(--btnColor);
}
.btn-box .empty {
color: var(--btnColor);
background-color: #fff;
}
.btn-box .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.userProfile {
background-color: #fff;
font-size: 24rpx;
margin: 0;
padding: 0;
font-weight: 500;
line-height: 46rpx;
}
\ No newline at end of file \ No newline at end of file
// packageMine/pages/order/index/components/ordercard/ordercard.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
value: {},
},
afterSaleStatus: {
type: Object,
value: {},
},
statusEnum: {
type: Object,
value: {},
},
hasUserInfo: {
type: Boolean,
value: false,
},
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
// 跳转到订单详情
onJump(e) {
let {
item: { orderStatus, orderCode, orderSource },
} = e.currentTarget.dataset;
if (orderSource == 5 && (orderStatus == 2 || orderStatus == 7)) return;
let url = "/packageMine/pages/order/detail/detail";
wx.p.router.go(url, {
orderCode,
});
},
// 取消付款
onCancelPay(e) {
this.triggerEvent("cancelPay", {
orderCode: e.detail.orderCode,
});
},
// 去支付
onPay(e) {
this.triggerEvent("pay", {
orderCode: e.detail.orderCode,
});
},
// 查看详情
onToGoldDetail(e) {
this.triggerEvent("toGoldDetail", {
item: e.detail.item,
});
},
// 售后
onAfterSale(e) {
this.triggerEvent("afterSale", {
item: e.detail.item,
});
},
// 确认收货
onConfirmReceipt(e) {
this.triggerEvent("confirmReceipt", {
orderCode: e.detail.orderCode,
});
},
// 查看评价
onLookEvaluate(e) {
this.triggerEvent("lookEvaluate", {
item: e.detail.item,
});
},
// 获取用户信息
onGetUserProfile(e) {
this.triggerEvent("getUserProfile", {
item: e.detail.item,
});
},
// 立即评价
onEvaluate(e) {
this.triggerEvent("evaluate", {
item: e.detail.item,
});
},
// 取消订单
onCancelOrder(e) {
this.triggerEvent("cancelOrder", {
orderCode: e.detail.orderCode,
});
},
// 售后详情
onAfterSaleDetail(e) {
this.triggerEvent("afterSaleDetail", {
item: e.detail.item,
});
},
},
});
{
"component": true,
"style": "v2",
"usingComponents": {
"top": "../Top/Top",
"content": "../Content/Content",
"bottom": "../Bottom/Bottom",
"order-action-buttons": "../OrderActionButtons/OrderActionButtons"
}
}
\ No newline at end of file \ No newline at end of file
<view class="item" catchtap="onJump" data-item="{{item}}">
<top item="{{item}}" after-sale-status="{{afterSaleStatus}}" status-enum="{{statusEnum}}"></top>
<content item="{{item}}" has-user-info="{{hasUserInfo}}" bind:lookEvaluate="onLookEvaluate" bind:getUserProfile="onGetUserProfile" bind:evaluate="onEvaluate"></content>
<bottom item="{{item}}" />
</view>
\ No newline at end of file \ No newline at end of file
.item {
position: relative;
padding-left: 24rpx;
margin-bottom: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: var(--borderRadius);
display: flex;
flex-direction: column;
}
.text-hide {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
\ No newline at end of file \ No newline at end of file
// packageMine/pages/order/index/components/top/top.js
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type: Object,
value: {}
},
afterSaleStatus: {
type: Object,
value: {}
},
statusEnum: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"style": "v2",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="top">
<view class="name">订单编号:{{item.orderCode}}</view>
<!-- 订单状态 orderStatus(1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成)
售后订单状态 afterSaleStatus(1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败)
-->
<view class="status">{{item.afterSaleStatus ? afterSaleStatus[item.afterSaleStatus]
:statusEnum[item.orderStatus]}}</view>
</view>
\ No newline at end of file \ No newline at end of file
.top {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
position: relative;
}
.top .name {
width: 410rpx;
height: 40rpx;
font-size: 28rpx;
color: #2D2D2E;
}
.top .status {
font-size: 28rpx;
color: #282829;
font-weight: 400;
}
\ No newline at end of file \ No newline at end of file
/* packageMine/pages/order/index/index.wxss */
.sticky-box {
background-color: #F9F7F7;
}
.tab {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: #F9F7F7;
z-index: 2;
transition: all 0.4s;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--margin);
position: absolute;
left: 20rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.search-box {
position: absolute;
left: 80rpx;
width: 420rpx;
height: 72rpx;
background: #F7F8FA;
border-radius: 36rpx;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 16rpx 0 var(--margin);
}
.search-box .icon {
width: 40rpx;
height: 100%;
margin-right: 10rpx;
}
.search-box .input {
width: calc(100% - 98rpx);
}
.search-box .clear-box {
width: 58rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.search-box .clear-box .clear {
width: 32rpx;
height: 32rpx;
opacity: 0.7;
}
.placeholder-class {
color: #C8C9CC;
}
.layout {
padding: 24rpx var(--margin) 40rpx;
}
.layout .item {
position: relative;
padding-left: 24rpx;
margin-bottom: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: var(--borderRadius);
display: flex;
flex-direction: column;
}
.layout .item .top {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
position: relative;
}
.layout .item .top .name {
width: 410rpx;
height: 40rpx;
font-size: 28rpx;
color: #2D2D2E;
}
.layout .item .goods {
height: 208rpx;
padding: 24rpx 24rpx 24rpx 0;
box-sizing: border-box;
display: flex;
}
.addTo {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
position: absolute;
bottom: 0;
right: 0;
}
.layout .item .goods .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.layout .item .icon {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.background-X {
background-color: rgb(244, 244, 244);
}
.layout .item .info {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.layout .item .info .info-top,
.layout .item .info .info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.layout .item .info .info-top .number {
color: #656566;
font-size: 24rpx;
}
.layout .item .info .info-bottom {
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
display: flex;
flex-direction: column;
align-items:flex-start;
gap: 8rpx;
}
.layout .item .info .info-bottom .price {
color: var(--themeColor);
font-size: 26rpx;
font-weight: 500;
}
.layout .item .info .info-bottom .specification {
color: #b1b1b3;
}
.layout .item .status {
font-size: 28rpx;
color: #282829;
font-weight: 400;
}
.layout .item .bottom {
margin-top: 36rpx;
height: 64rpx;
display: flex;
align-items: flex-start;
font-size: 24rpx;
color: #656566;
}
.layout .item .bottom .total {
position: relative;
bottom: 16rpx;
}
.layout .item .bottom .price {
color: var(--themeColor);
font-weight: 600;
margin-left: 10rpx;
}
.layout .item .btn-box {
position: absolute;
right: 24rpx;
bottom: 16rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.layout .item .btn-box .btn {
display: flex;
align-items: center;
justify-content: center;
width: 144rpx;
height: 64rpx;
border-radius: 16rpx;
border: 1rpx solid #DCDFE6;
font-size: 24rpx;
margin-left: 12rpx;
color: #1B233D;
}
.layout .item .btn-box .pay {
background-color: var(--btnColor);
color: #fff;
border-color: var(--btnColor);
}
.layout .item .btn-box .empty{
color: var(--btnColor);
background-color: #fff;
}
.layout .item .btn-box .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.userProfile {
background-color: #fff;
font-size: 24rpx;
margin: 0;
padding: 0;
font-weight: 500;
line-height: 46rpx;
}
.layout .coupon-item {
height: 202rpx;
background: #fefffe;
border-radius: 8rpx;
margin-bottom: 36rpx;
padding: 20rpx;
box-sizing: border-box;
position: relative;
}
.layout .coupon-item .orderPrices {
position: absolute;
color: var(--btnColor);
font-size: 48rpx;
right: 32rpx;
}
.layout .coupon-item .orderPrices text {
font-size: 36rpx;
}
.layout .coupon-item .icon {
width: 162rpx;
height: 162rpx;
margin-right: 20rpx;
}
.layout .coupon-item .info {
width: 360rpx;
height: 100%;
color: #b1b1b3;
font-size: 24rpx;
}
.layout .coupon-item .info .name {
font-size: 28rpx;
font-weight: 500;
color: #282829;
}
.layout .coupon-item .info .order-btn {
width: 138rpx;
height: 48rpx;
background: var(--btnColor);
border-radius: 24rpx;
margin-top: 40rpx;
color: #ffffff;
font-size: 24rpx;
}
.imageHeight {
height: 99rpx !important;
}
.imageStraight {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
}
\ No newline at end of file \ No newline at end of file
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab" "tab": "/components/Tab/Tab",
"OrderCard": "./components/OrderCard/OrderCard"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
left: 80rpx; left: 80rpx;
width: 420rpx; width: 420rpx;
height: 72rpx; height: 72rpx;
background: #F9F7F7; background: #F7F8FA;
border-radius: 36rpx; border-radius: 36rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
.search-box .icon { .search-box .icon {
width: 40rpx; width: 40rpx;
height: 100%; height: 100%;
margin-right: 10rpx;
} }
.search-box .input { .search-box .input {
...@@ -70,178 +71,17 @@ ...@@ -70,178 +71,17 @@
} }
.placeholder-class { .placeholder-class {
color: #c8c9cc; color: #C8C9CC;
} }
.layout { .layout {
padding: 24rpx var(--margin) 40rpx; padding: 24rpx var(--margin) 40rpx;
} }
.layout .item {
position: relative;
padding-left: 24rpx;
margin-bottom: 20rpx;
background-color: #fff;
box-sizing: border-box;
border-radius: var(--borderRadius);
display: flex;
flex-direction: column;
}
.layout .item .top {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 24rpx;
position: relative;
}
.layout .item .top .name {
width: 410rpx;
height: 40rpx;
font-size: 28rpx;
color: #1B233D;
}
.layout .item .goods {
height: 208rpx;
padding: 24rpx 24rpx 24rpx 0;
box-sizing: border-box;
display: flex;
}
.addTo {
border-bottom: 2rpx solid #eff0f2;
}
.layout .item .goods .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
position: absolute;
bottom: 0;
right: 0;
}
.layout .item .goods .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.layout .item .icon {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 8rpx;
overflow: hidden;
}
.background-X { .background-X {
background-color: rgb(244, 244, 244); background-color: rgb(244, 244, 244);
} }
.layout .item .info {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
position: relative;
}
.layout .item .info .info-top,
.layout .item .info .info-bottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.layout .item .info .info-top .price {
color: var(--btnColor);
font-size: 36rpx;
letter-spacing: -2rpx;
font-weight: 500;
flex-shrink: 0;
}
.layout .item .info .info-top .price .unit {
font-size: 24rpx;
}
.layout .item .info .info-bottom {
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
}
.layout .item .info .info-bottom .number {
margin-left: auto;
}
.layout .item .info .info-bottom .specification {
color: #b1b1b3;
}
.layout .item .status {
font-size: 24rpx;
color: #282829;
}
.layout .item .bottom {
height: 80rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #656566;
}
.layout .item .bottom .price {
color: var(--btnColor);
font-weight: 500;
}
.layout .item .btn-box {
position: absolute;
right: 24rpx;
bottom: 16rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.layout .item .btn-box .btn {
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
}
.layout .item .btn-box .pay {
background-color: var(--btnColor);
color: #fff;
border-color: var(--btnColor);
}
.layout .item .btn-box .empty{
color: var(--btnColor);
background-color: #fff;
}
.layout .item .btn-box .confirm {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
.userProfile { .userProfile {
background-color: #fff; background-color: #fff;
font-size: 24rpx; font-size: 24rpx;
...@@ -250,49 +90,6 @@ ...@@ -250,49 +90,6 @@
font-weight: 500; font-weight: 500;
line-height: 46rpx; line-height: 46rpx;
} }
.layout .coupon-item {
height: 202rpx;
background: #fefffe;
border-radius: 8rpx;
margin-bottom: 36rpx;
padding: 20rpx;
box-sizing: border-box;
position: relative;
}
.layout .coupon-item .orderPrices {
position: absolute;
color: var(--btnColor);
font-size: 48rpx;
right: 32rpx;
}
.layout .coupon-item .orderPrices text {
font-size: 36rpx;
}
.layout .coupon-item .icon {
width: 162rpx;
height: 162rpx;
margin-right: 20rpx;
}
.layout .coupon-item .info {
width: 360rpx;
height: 100%;
color: #b1b1b3;
font-size: 24rpx;
}
.layout .coupon-item .info .name {
font-size: 28rpx;
font-weight: 500;
color: #282829;
}
.layout .coupon-item .info .order-btn {
width: 138rpx;
height: 48rpx;
background: var(--btnColor);
border-radius: 24rpx;
margin-top: 40rpx;
color: #ffffff;
font-size: 24rpx;
}
.imageHeight { .imageHeight {
height: 99rpx !important; height: 99rpx !important;
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</view> </view>
<view class="search-box y-center"> <view class="search-box y-center">
<view class="icon text-center"> <view class="icon text-center">
<icon type="search" size="16"></icon> <icon type="search" size="18"></icon>
</view> </view>
<input type="text" placeholder="搜索" value="{{keyword}}" class="input" confirm-type="search" bindconfirm="search" bindinput="input" bindblur="blur" /> <input type="text" placeholder="搜索" value="{{keyword}}" class="input" confirm-type="search" bindconfirm="search" bindinput="input" bindblur="blur" />
<block wx:if="{{keyword}}"> <block wx:if="{{keyword}}">
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
</navigation-bar> </navigation-bar>
<view class="tab" style="top:{{padding_bottom }}px;"> <view class="tab" style="top:{{padding_bottom }}px;">
<tab tab="{{tab}}" bindclick="changeTab" index="{{tabIndex}}"></tab> <tab tab="{{tab}}" bindchange="changeTab" index="{{tabIndex}}"></tab>
</view> </view>
</view> </view>
<block wx:if="{{margin_top}}"> <block wx:if="{{margin_top}}">
...@@ -26,122 +26,14 @@ ...@@ -26,122 +26,14 @@
<block wx:if="{{listFlag}}"> <block wx:if="{{listFlag}}">
<block wx:if="{{list.length}}"> <block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<block wx:if="{{item.orderClassify == 1}}"> <OrderCard item="{{item}}" after-sale-status="{{afterSaleStatus}}" status-enum="{{statusEnum}}" has-user-info="{{hasUserInfo}}"></OrderCard>
<view class="item" catchtap="jump" data-item="{{item}}">
<view class="top">
<view class="name">订单编号:{{item.orderCode}}</view>
<!-- 订单状态 orderStatus(1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成)
售后订单状态 afterSaleStatus(1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败)
-->
<view class="status">{{item.afterSaleStatus ? afterSaleStatus[item.afterSaleStatus]
:statusEnum[item.orderStatus]}}</view>
</view>
<view class="content-top {{item.orderStatus == 5 || item.orderStatus == 8?'':'content-bottom'}}">
<block wx:for="{{item.orderGoods}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="goods {{item.orderStatus == 5 || item.orderStatus == 8?'addTo':''}}">
<view class="icon">
<image webp wx:if="{{item.orderSource == 5}}" src="{{item.activityBigImg}}"></image>
<image webp wx:else src="{{i.goodsImage}}"></image>
</view>
<view class="info">
<view class="info-top">
<view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view>
<view class="number">
x{{item.orderSource == 5 ? 1: i.goodsNumber}}
</view>
</view>
<view class="info-bottom">
<block wx:if="{{i.specificationData}}">
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="price">
<text class="unit">¥</text>
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}
</view>
</view>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length > 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</view>
</view>
</block>
</view>
<view class="bottom" wx:if="{{item.orderSource == 5}}">
共1件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<view class="bottom" wx:else>
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<!-- 售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败 -->
<block wx:if="{{item.orderStatus != 3}}">
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
<view class="btn pay" catchtap="cancelPay" data-order-code="{{item.orderCode}}">取消付款</view>
<block wx:if="{{item.orderSource != 4}}">
<view class="btn pay" catchtap="pay" data-order-code="{{item.orderCode}}">去支付</view>
</block>
</block>
<block wx:if="{{item.orderSource==5 && (item.orderStatus == 2 || item.orderStatus == 7)}}">
<view class="btn pay" data-item="{{item}}" bind:tap="toGoldDetail">查看详情</view>
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<!-- deliveryType 结算方式(1:到店核销,2:快递发货) -->
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="confirmReceipt" data-order-code="{{item.orderCode}}">确认收货
</view>
</block>
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="afterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">申请售后
</view>
</block>
</block>
<!-- !hasUserInfo -->
<view wx:if="{{item.orderGoods.length == 1 && !hasUserInfo}}">
<block wx:if="{{item.orderStatus == 5 || item.orderStatus == 8}}">
<block wx:if="{{item.evaluatedFlag == 'Y'}}">
<view class="btn confirm" catchtap="lookevaluate" data-item="{{item}}">查看评价</view>
</block>
<block wx:else>
<button catchtap="getUserProfile" wx:if="{{!hasUserInfo}}" class="btn confirm userProfile" data-item="{{item}}"> 立即评价 </button>
<view class="btn confirm" catchtap="evaluate" wx:else data-item="{{item}}">立即评价</view>
</block>
</block>
</view>
</block>
<block wx:else>
<block wx:if="{{item.afterSaleStatus == 1}}">
<view class="btn pay" catchtap="cancelOrder" data-order-code="{{item.orderCode}}">取消售后</view>
</block>
<view class="btn" data-item="{{item}}" catchtap="afterSaleDetail">售后详情</view>
</block>
</view>
</block>
</view>
</block>
</block> </block>
<block wx:if="{{nothing}}"> <block wx:if="{{nothing}}">
<view class="list-nothing to-bottom"></view> <view class="list-nothing to-bottom"></view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
<view class="list-nothing"> <view class="list-nothing">暂无相关内容</view>
暂无相关内容
</view>
</block> </block>
</block> </block>
</view> </view>
......
...@@ -14,7 +14,7 @@ export const whiteList = [ ...@@ -14,7 +14,7 @@ export const whiteList = [
'/pages/Login/Login', '/pages/Login/Login',
'/pages/loading/loading', '/pages/loading/loading',
'/pages/webView/webView', '/pages/webView/webView',
'/packageMine/pages/order/index/index' '/packageMine/pages/order'
]; ];
// tabBar页面路径配置 // tabBar页面路径配置
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!