Commit 5d8bd058 by wangzhihui

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents 1800dbc9 3d0c0b97
Showing 33 changed files with 726 additions and 587 deletions
// packageMine/pages/address/detail/detail.js // packageMine/pages/address/detail/detail.js
import mapApi from '~/utils/mapapi/mapapi' import mapApi from "~/utils/mapapi/mapapi";
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/;
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
userObj: { userObj: {
receiveName: '', receiveName: "",
phoneNumber: '', phoneNumber: "",
region: [], region: [],
address: '', address: "",
isDefault: 0, isDefault: 0,
platformObj: {} platformObj: {},
} },
}, },
onLoad: function (options) { onLoad: function (options) {
if (options.id) { wx.p.router.getRouterParams(options).then((params) => {
const { id, isChooseAddress, isDefault } = params;
if (id) {
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '编辑收货地址' title: "编辑收货地址",
}) });
wx.p.api.mineApi.getUserAddress(options).then(data => { wx.p.api.mineApi.getUserAddress(params).then((data) => {
data = wx.p.util.clearObjNull(data) data = wx.p.util.clearObjNull(data);
data.region = [data.province, data.city, data.area] data.region = [data.province, data.city, data.area];
this.setData({ this.setData({
userObj: data userObj: data,
}) });
}) });
} }
if (options.isChooseAddress) {
this.setData({ this.setData({
isChooseAddress: true isChooseAddress,
}) });
} if (isDefault) {
if (options.isDefault) {
this.setData({ this.setData({
'userObj.isDefault': 1 "userObj.isDefault": 1,
}) });
} }
});
}, },
useLocation() { useLocation() {
let { let {
currentAddress: { currentAddress: { formatted_addresses, address_component, ad_info },
formatted_addresses, } = this.data;
address_component,
ad_info
}
} = this.data
this.setData({ this.setData({
'userObj.address': formatted_addresses.recommend, "userObj.address": formatted_addresses.recommend,
'userObj.region': [address_component.province, address_component.city, address_component.district], "userObj.region": [
'userObj.areaId': ad_info.adcode address_component.province,
}) address_component.city,
address_component.district,
],
"userObj.areaId": ad_info.adcode,
});
}, },
/**获取当前位置 */ /**获取当前位置 */
getLocation() { getLocation() {
let { let { currentAddress } = this.data;
currentAddress if (currentAddress) return;
} = this.data
if (currentAddress) return
this.setData({ this.setData({
unauthorized: false unauthorized: false,
}) });
wx.getLocation({ wx.getLocation({
type: 'gcj02' type: "gcj02",
}).then(({
latitude,
longitude
}) => {
console.log(this)
this.setData({
current: true
}) })
mapApi.detailedAdrress([latitude, longitude]).then(detail => { .then(({ latitude, longitude }) => {
console.log(this);
this.setData({ this.setData({
currentAddress: detail current: true,
}) });
}) mapApi.detailedAdrress([latitude, longitude]).then((detail) => {
}) this.setData({
.catch(err => { currentAddress: detail,
wx.p.wxApi.showToast('获取位置失败') });
});
}) })
.catch((err) => {
wx.p.wxApi.showToast("获取位置失败");
});
}, },
/**打开授权设置 */ /**打开授权设置 */
authAddress() { authAddress() {
this.setData({ this.setData({
showAuth: true showAuth: true,
}) });
}, },
/**授权失败 */ /**授权失败 */
authFail() { authFail() {
this.setData({ this.setData({
unauthorized: true unauthorized: true,
}) });
}, },
/**授权成功 */ /**授权成功 */
authSuccess() { authSuccess() {
this.getLocation() this.getLocation();
}, },
input(e) { input(e) {
let { let { target } = e.currentTarget.dataset;
target let { value } = e.detail;
} = e.currentTarget.dataset
let {
value
} = e.detail
this.setData({ this.setData({
[`userObj.${target}`]: value [`userObj.${target}`]: value,
}) });
}, },
blur(e) { blur(e) {
let { let { value } = e.detail;
value
} = e.detail
this.setData({ this.setData({
'userObj.address': value "userObj.address": value,
}) });
}, },
save() { save() {
let { let { userObj, isChooseAddress } = this.data;
userObj,
isChooseAddress
} = this.data
try { try {
Object.keys(userObj).map(key => { Object.keys(userObj).map((key) => {
if (key == 'receiveName' && !userObj[key]) throw '请输入姓名' if (key == "receiveName" && !userObj[key]) throw "请输入姓名";
if (key == 'phoneNumber') { if (key == "phoneNumber") {
if (!userObj[key]) throw '请输入手机号' if (!userObj[key]) throw "请输入手机号";
if (!phoneRex.test(userObj[key])) throw '请输入正确的手机号' if (!phoneRex.test(userObj[key])) throw "请输入正确的手机号";
} }
if (Array.isArray(userObj[key]) && !userObj[key].length) throw '请选择省市区' if (Array.isArray(userObj[key]) && !userObj[key].length)
if (key == 'address' && !userObj[key]) throw '请填写详细地址' throw "请选择省市区";
}) if (key == "address" && !userObj[key]) throw "请填写详细地址";
});
} catch (error) { } catch (error) {
wx.p.wxApi.showToast(error) wx.p.wxApi.showToast(error);
return return;
} }
let [province, city, area] = userObj.region let [province, city, area] = userObj.region;
let obj = { let obj = {
...userObj, ...userObj,
province, province,
city, city,
area area,
} };
delete obj.region delete obj.region;
let target = obj.id ? 'updateUserAddress' : 'addUserAddress' let target = obj.id ? "updateUserAddress" : "addUserAddress";
if (obj.id) { if (obj.id) {
delete obj.userId delete obj.userId;
delete obj.createTime delete obj.createTime;
delete obj.updateTime delete obj.updateTime;
} }
wx.p.api.mineApi[target](obj).then(() => { wx.p.api.mineApi[target](obj).then(() => {
wx.p.wxApi.showToast('操作成功') wx.p.wxApi.showToast("操作成功");
setTimeout(() => { setTimeout(() => {
if (isChooseAddress) { if (isChooseAddress) {
wx.p.router.back(page => { wx.p.router.back((page) => {
let contactAddress = `${province}${city}${area}${userObj.address}` let contactAddress = `${province}${city}${area}${userObj.address}`;
page.setData({ page.setData({
contactAddress, contactAddress,
contactInfo: { contactInfo: {
contactAddress, contactAddress,
contactName: userObj.receiveName, contactName: userObj.receiveName,
contactPhone: userObj.phoneNumber contactPhone: userObj.phoneNumber,
} },
}) });
}, 2) }, 2);
} else { } else {
wx.p.router.back() wx.p.router.back();
} }
}, 1.5e3) }, 1.5e3);
}) });
}, },
/**选择地区 */ /**选择地区 */
chooseArea(e) { chooseArea(e) {
let { let { value, code } = e.detail;
value, let { userObj } = this.data;
code userObj.region = [value[0], value[1], value[2]];
} = e.detail userObj.provinceId = code[0];
let { userObj.cityId = code[1];
userObj userObj.areaId = code[2];
} = this.data
userObj.region = [value[0], value[1], value[2]]
userObj.provinceId = code[0]
userObj.cityId = code[1]
userObj.areaId = code[2]
this.setData({ this.setData({
userObj userObj,
}) });
}, },
setDefault() { setDefault() {
this.setData({ this.setData({
'userObj.isDefault': this.data.userObj.isDefault == 0 ? 1 : 0 "userObj.isDefault": this.data.userObj.isDefault == 0 ? 1 : 0,
}) });
}, },
showSelect() { showSelect() {
this.setData({ this.setData({
showAreaSelect: true showAreaSelect: true,
}) });
}, },
cancelProvince() { cancelProvince() {
this.setData({ this.setData({
showAreaSelect: false showAreaSelect: false,
}) });
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -231,5 +215,5 @@ Page({ ...@@ -231,5 +215,5 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}
})
\ No newline at end of file \ No newline at end of file
onReachBottom: function () {},
});
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
.current { .current {
padding: var(--margin); padding: var(--margin);
background: #fff; background: #fff;
border-radius:var(--borderRadius); border-radius:24rpx;
height: 156rpx; height: 160rpx;
box-sizing: border-box; box-sizing: border-box;
.flex{ .flex{
height: 100%; height: 100%;
...@@ -39,19 +39,23 @@ ...@@ -39,19 +39,23 @@
.current .address-info .address-title { .current .address-info .address-title {
font-weight: 500; font-weight: 500;
margin-bottom: 12rpx; margin-bottom: 12rpx;
color: #282829;
font-size: 32rpx;
} }
.current .address-info .address { .current .address-info .address {
color: #656566; color: #656566;
font-size: 28rpx; font-size: 26rpx;
font-weight: 400;
} }
.current .address-btn { .current .address-btn {
font-size: 24rpx; font-size: 24rpx;
background-color: var(--themeColor); background-color: #F75454;
width: 168rpx; width: 168rpx;
height: 40rpx; height: 40rpx;
color: #fff; color: #fff;
border-radius: 12rpx;
} }
.user-info { .user-info {
...@@ -59,13 +63,14 @@ ...@@ -59,13 +63,14 @@
padding: 0 var(--margin); padding: 0 var(--margin);
background-color: #fff; background-color: #fff;
font-size: 28rpx; font-size: 28rpx;
border-radius: 24rpx;
} }
.user-info .item { .user-info .item {
min-height: 108rpx; min-height: 108rpx;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 2rpx solid #E3E3E6; border-bottom: 2rpx solid #F0F0F0;
box-sizing: border-box; box-sizing: border-box;
padding: 26rpx 0; padding: 26rpx 0;
} }
...@@ -93,9 +98,17 @@ ...@@ -93,9 +98,17 @@
.default { .default {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 24rpx; font-size: 28rpx;
color: #2D2D2E; font-weight: 500;
color: #333333;
margin-top: 24rpx; margin-top: 24rpx;
border-radius: 16rpx;
background: #fff;
height: 112rpx;
padding: 0 var(--margin);
display: flex;
justify-content: space-between;
} }
.default icon { .default icon {
...@@ -104,3 +117,20 @@ ...@@ -104,3 +117,20 @@
.default-btn{ .default-btn{
margin-top: 206rpx; margin-top: 206rpx;
} }
.btn-box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100rpx;
background-color: #fff;
}
.btn-box .btn {
margin: 6rpx calc(var(--margin) * 2);
background-color: var(--btnColor);
height: 88rpx;
font-weight: 500;
color: #fff;
font-size: 32rpx;
border-radius: 20rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
<view class="flex" bindtap="authAddress">授权获取当前位置</view> <view class="flex" bindtap="authAddress">授权获取当前位置</view>
</block> </block>
<block wx:else> <block wx:else>
<view class="flex"> <view class="flex">获取当前位置中...</view>
获取当前位置中...
</view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
...@@ -16,7 +14,9 @@ ...@@ -16,7 +14,9 @@
<glsx-image src="mine/location.png"></glsx-image> <glsx-image src="mine/location.png"></glsx-image>
</view> </view>
<view class="address-info"> <view class="address-info">
<view class="address-title text-hide">{{currentAddress.formatted_addresses.recommend}}</view> <view class="address-title text-hide">
{{currentAddress.formatted_addresses.recommend}}
</view>
<view class="address text-hide">{{currentAddress.address}}</view> <view class="address text-hide">{{currentAddress.address}}</view>
</view> </view>
<view class="address-btn text-center" bindtap="useLocation">使用当前定位</view> <view class="address-btn text-center" bindtap="useLocation">使用当前定位</view>
...@@ -25,26 +25,20 @@ ...@@ -25,26 +25,20 @@
</view> </view>
<view class="user-info"> <view class="user-info">
<view class="item"> <view class="item">
<view class="label"> <view class="label">收货人</view>
收货人
</view>
<view class="value"> <view class="value">
<input bindblur="input" data-target="receiveName" maxlength="10" value="{{userObj.receiveName}}" type="text" placeholder="请输入姓名" placeholder-style="color:#B1B1B3;" /> <input bindblur="input" data-target="receiveName" maxlength="10" value="{{userObj.receiveName}}" type="text" placeholder="请填写收货人姓名" placeholder-style="color:#B1B1B3;" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="label"> <view class="label">手机号码</view>
手机号
</view>
<view class="value"> <view class="value">
<input bindblur="input" data-target="phoneNumber" value="{{userObj.phoneNumber}}" type="number" maxlength="11" placeholder="请输入手机号" placeholder-style="color:#B1B1B3;" /> <input bindblur="input" data-target="phoneNumber" value="{{userObj.phoneNumber}}" type="number" maxlength="11" placeholder="请填写收货人手机号" placeholder-style="color:#B1B1B3;" />
</view> </view>
</view> </view>
<picker value="{{userObj.region}}" mode="region" bindchange="chooseArea"> <picker value="{{userObj.region}}" mode="region" bindchange="chooseArea">
<view class="item"> <view class="item">
<view class="label"> <view class="label">所在地区</view>
选择地区
</view>
<view class="value " style="color:{{userObj.region.length?'':'#B1B1B3'}}"> <view class="value " style="color:{{userObj.region.length?'':'#B1B1B3'}}">
{{userObj.region[0]}} {{userObj.region[0]}}
<block wx:if="{{userObj.region.length}}"> <block wx:if="{{userObj.region.length}}">
...@@ -55,27 +49,25 @@ ...@@ -55,27 +49,25 @@
</view> </view>
</picker> </picker>
<view class="item textarea"> <view class="item textarea">
<view class="label"> <view class="label">详细地址</view>
详细地址
</view>
<view class="value"> <view class="value">
<gl-textarea value="{{userObj.address}}" bindblur="blur" customMaxLength filterEmoji maxlength="30" placeholder="小区楼栋/乡村名称"> <gl-textarea value="{{userObj.address}}" bindblur="blur" customMaxLength filterEmoji maxlength="30" placeholder="小区楼栋/乡村名称"></gl-textarea>
</gl-textarea>
</view> </view>
</view> </view>
</view> </view>
<view class="default" bindtap="setDefault"> <view class="default" bindtap="setDefault">
设为默认收货地址
<block wx:if="{{userObj.isDefault == 1}}"> <block wx:if="{{userObj.isDefault == 1}}">
<icon type="success" size="24rpx" color="#8A303A"></icon> <icon type="success" size="36rpx" color="#FB8A32"></icon>
</block> </block>
<block wx:else> <block wx:else>
<icon type="circle" size="24rpx" color="#E3E3E6"></icon> <icon type="circle" size="36rpx" color="#E3E3E6"></icon>
</block> </block>
设为默认地址
</view> </view>
<view class="default-btn" bindtap="save">保存并使用</view> <!-- <view class="default-btn" bindtap="save">保存并使用</view> -->
<view class="btn-box isFullSucreen">
<view class="btn text-center" bindtap="save">保存并使用</view>
</view>
</view> </view>
<authorize scopeType="userLocation" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize> <authorize scopeType="userLocation" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<glsx-privacy appletName="海马刀"></glsx-privacy> <glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -4,121 +4,114 @@ Page({ ...@@ -4,121 +4,114 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
addressList: [] addressList: [],
}, },
jump(e) { jump(e) {
let { let { id } = e.currentTarget.dataset,
id, { isChooseAddress, addressList } = this.data,
} = e.currentTarget.dataset, { isDefault = addressList.length == 0;
isChooseAddress, wx.p.router.go("/packageMine/pages/address/detail/detail", {
addressList,
} = this.data, isDefault = addressList.length == 0
wx.p.router.go('/packageMine/pages/address/detail/detail', {
id, id,
isChooseAddress, isChooseAddress,
isDefault isDefault,
}) });
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData(options) wx.p.router.getRouterParams(options).then((res) => {
this.setData(res);
});
}, },
chooseThis(e) { chooseThis(e) {
let { let { item } = e.currentTarget.dataset,
item { isChooseAddress } = this.data;
} = e.currentTarget.dataset, {
isChooseAddress,
} = this.data
if (isChooseAddress) { if (isChooseAddress) {
wx.p.router.back(page => { wx.p.router.back((page) => {
const contactAddress = `${item.province}${item.city}${item.area}${item.address}` const contactAddress = `${item.province}${item.city}${item.area}${item.address}`;
page.setData({ page.setData({
contactAddress, contactAddress,
contactInfo: { contactInfo: {
contactAddress, contactAddress,
contactName: item.receiveName, contactName: item.receiveName,
contactPhone: item.phoneNumber contactPhone: item.phoneNumber,
}, },
isDefault: item.isDefault == 1 isDefault: item.isDefault == 1,
}) });
}) });
} else { } else {
wx.p.router.go('/packageMine/pages/address/detail/detail', { wx.p.router.go("/packageMine/pages/address/detail/detail", {
id: item.id, id: item.id,
}) });
} }
}, },
getUserAddressList(showTips = '') { getUserAddressList(showTips = "") {
wx.showLoading() wx.showLoading();
this.setData({ this.setData({
addressList: [] addressList: [],
}) });
wx.p.api.mineApi.getUserAddressList().then(data => { wx.p.api.mineApi.getUserAddressList().then((data) => {
this.setData({ this.setData({
addressList: data addressList: data,
}) });
wx.hideLoading() wx.hideLoading();
if(showTips) wx.p.wxApi.showToast(showTips) if (showTips) wx.p.wxApi.showToast(showTips);
}) });
}, },
chooseDefault(e) { chooseDefault(e) {
let { let {
item: { item: { id, isDefault },
item,
} = e.currentTarget.dataset;
if (isDefault != 0) return;
wx.p.api.mineApi
.setUserAddressDefault({
id, id,
isDefault })
}, .then(() => {
item wx.p.wxApi.showToast("操作成功");
} = e.currentTarget.dataset let { isChooseAddress } = this.data;
if (isDefault != 0) return
wx.p.api.mineApi.setUserAddressDefault({
id
}).then(() => {
wx.p.wxApi.showToast('操作成功')
let {
isChooseAddress
} = this.data
if (isChooseAddress) { if (isChooseAddress) {
wx.p.router.back(page => { wx.p.router.back((page) => {
const contactAddress = `${item.province}${item.city}${item.area}${item.address}` const contactAddress = `${item.province}${item.city}${item.area}${item.address}`;
page.setData({ page.setData({
contactAddress, contactAddress,
contactInfo: { contactInfo: {
contactAddress, contactAddress,
contactName: item.receiveName, contactName: item.receiveName,
contactPhone: item.phoneNumber contactPhone: item.phoneNumber,
}, },
isDefault: true, isDefault: true,
}) });
}) });
} else { } else {
this.getUserAddressList('默认地址更新成功') this.getUserAddressList("默认地址更新成功");
} }
}) });
}, },
del(e) { del(e) {
let { let { id } = e.currentTarget.dataset;
id
} = e.currentTarget.dataset
wx.showModal({ wx.showModal({
title: '温馨提示', title: "温馨提示",
content: '是否删除当前地址?', content: "是否删除当前地址?",
cancelText: '否', cancelText: "否",
confirmText: '是', confirmText: "是",
confirmColor: '#F13C3D' confirmColor: "#F13C3D",
}).then(res => { }).then((res) => {
if (res.confirm) { if (res.confirm) {
wx.p.api.mineApi.delUserAddress({ wx.p.api.mineApi
id .delUserAddress({
}).then(() => { id,
wx.p.wxApi.showToast('删除成功')
setTimeout(() => {
this.getUserAddressList()
}, 1.5e3)
}) })
.then(() => {
wx.p.wxApi.showToast("删除成功");
setTimeout(() => {
this.getUserAddressList();
}, 1.5e3);
});
} }
}) });
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -129,7 +122,7 @@ Page({ ...@@ -129,7 +122,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.getUserAddressList() this.getUserAddressList();
}, },
/** /**
...@@ -150,5 +143,5 @@ Page({ ...@@ -150,5 +143,5 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}
})
\ No newline at end of file \ No newline at end of file
onReachBottom: function () {},
});
/* packageMine/pages/address/index/index.wxss *//* packageMine/pages/address/index/index.wxss */ /* packageMine/pages/address/index/index.wxss */ /* packageMine/pages/address/index/index.wxss */
.layout{ .layout {
padding-bottom: calc(100rpx + var(--constantSafeAreaInsetBottom)); padding-bottom: calc(100rpx + var(--constantSafeAreaInsetBottom));
padding-bottom: calc(100rpx + var(--envSafeAreaInsetBottom)); padding-bottom: calc(100rpx + var(--envSafeAreaInsetBottom));
} }
.address-item{ .address-item {
margin: var(--margin); margin: var(--margin);
background-color: #fff; background-color: #fff;
border-radius:var(--borderRadius); border-radius: 24rpx;
min-height: 234rpx; min-height: 234rpx;
padding: 0 var(--margin); padding: 0 var(--margin);
} }
.address-item .top{ .address-item .top {
display: flex; display: flex;
align-items: center; align-items: center;
padding-top: 34rpx; padding-top: 34rpx;
justify-content: space-between; justify-content: space-between;
} }
.address-item .top .info{ .address-item .top .info {
width: calc(100% - 70rpx); width: calc(100% - 70rpx);
padding-bottom: 20rpx; padding-bottom: 20rpx;
font-size: 28rpx;
.address {
color: #282829;
font-weight: 400;
}
} }
.address-item .top .info .user{ .address-item .top .info .user {
margin-bottom: 20rpx; margin-bottom: 20rpx;
color: #0a0d14;
font-weight: 500;
} }
.address-item .top .info .user text{ .address-item .top .info .user text {
margin-left: 48rpx; margin-left: 48rpx;
color: #0a0d14;
font-weight: 400;
} }
.address-item .top .icon-box{ .address-item .top .icon-box {
width: 70rpx; width: 70rpx;
min-height: 154rpx; min-height: 154rpx;
} }
...@@ -35,9 +44,9 @@ ...@@ -35,9 +44,9 @@
width: var(--margin); width: var(--margin);
height: var(--margin); height: var(--margin);
} }
.address-item .bottom{ .address-item .bottom {
height: 78rpx; height: 78rpx;
border-top: 2rpx solid #E3E3E6; border-top: 1rpx solid #f0f0f0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -47,6 +56,7 @@ ...@@ -47,6 +56,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
color: #6e6e7a;
} }
.address-item .bottom .del { .address-item .bottom .del {
...@@ -57,13 +67,13 @@ ...@@ -57,13 +67,13 @@
width: 100rpx; width: 100rpx;
justify-content: flex-end; justify-content: flex-end;
} }
.address-item .bottom .choose.default{ .address-item .bottom .choose.default {
color: var(--btnColor); color: var(--btnColor);
} }
.address-item .bottom .choose icon{ .address-item .bottom .choose icon {
margin-right: 20rpx; margin-right: 20rpx;
} }
.btn-box{ .btn-box {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
...@@ -71,11 +81,12 @@ ...@@ -71,11 +81,12 @@
height: 100rpx; height: 100rpx;
background-color: #fff; background-color: #fff;
} }
.btn-box .btn{ .btn-box .btn {
margin: 6rpx var(--margin); margin: 6rpx calc(var(--margin) * 2);
background-color:var(--btnColor); background-color: var(--btnColor);
height: 88rpx; height: 88rpx;
font-weight: 500;
color: #fff; color: #fff;
font-size: var(--margin); font-size: 32rpx;
border-radius:var(--borderRadius); border-radius: 20rpx;
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="choose {{item.isDefault == 1?'default':''}}" catchtap="chooseDefault" data-item="{{item}}"> <view class="choose {{item.isDefault == 1?'default':''}}" catchtap="chooseDefault" data-item="{{item}}">
<icon type="{{item.isDefault == 1?'success':'circle'}}" size="28rpx" color="{{item.isDefault == 1?'#8A303A':'#E3E3E6'}}"></icon> <icon type="{{item.isDefault == 1?'success':'circle'}}" size="32rpx" color="{{item.isDefault == 1?'#FB8A32':'#6E6E7A'}}"></icon>
默认地址 默认地址
</view> </view>
<block wx:if="{{!isChooseAddress}}"> <block wx:if="{{!isChooseAddress}}">
......
import {
RefundStatus,
ExpressList,
AfterSaleObj,
AddressInfo,
} from "~/constants/mine.js";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
// 退款状态1:待处理,2待发货,3待确认收到退货,4:退款中,5:已退款,6:退款失败,7:审核不通过 order: {
afterSaleObj: Object.freeze(AfterSaleObj), express_no: "",
address: Object.freeze(AddressInfo),
addressObject: {
name: "张三",
phone: "12345678901",
address: "广东省深圳市南山区",
}, },
expressList: Object.freeze(ExpressList),
// Mock数据用于页面展示 // Mock数据用于页面展示
orderInfo: { orderInfo: {
refundStatus: 1, // 1:待处理 refundStatus: 1, // 1:待处理
...@@ -62,36 +49,8 @@ Page({ ...@@ -62,36 +49,8 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.getOrderRefundDetail(options.orderCode) // this.getOrderRefundDetail(options.orderCode)
this.setData({
refund: RefundStatus.find(
(item) => item.status == this.data.orderInfo.refundStatus
),
});
},
showExpressSelector() {
this.setData({
isShowExpressSelector: true,
});
},
selectExpress(e) {
this.setData({
isShowExpressSelector: false,
});
const expressList = this.data.expressList.map((item) => {
if (item.value == e.detail.value) {
item.type = "warn";
this.setData({
express: item,
});
} else {
item.type = "";
}
return item;
});
this.setData({
expressList,
});
}, },
getOrderRefundDetail(orderCode) { getOrderRefundDetail(orderCode) {
wx.p.wxApi.showLoading("加载中..."); wx.p.wxApi.showLoading("加载中...");
wx.p.api.shopmallApi.getOrderRefundDetail(orderCode).then((data) => { wx.p.api.shopmallApi.getOrderRefundDetail(orderCode).then((data) => {
...@@ -109,6 +68,7 @@ Page({ ...@@ -109,6 +68,7 @@ Page({
}); });
}); });
}, },
confirm() { confirm() {
let { orderInfo } = this.data; let { orderInfo } = this.data;
console.log(orderInfo); console.log(orderInfo);
...@@ -117,8 +77,21 @@ Page({ ...@@ -117,8 +77,21 @@ Page({
orderInfo orderInfo
); );
}, },
previewImage(e) { previewImage(e) {
let params = e.currentTarget.dataset; let params = e.detail; // 从组件传递的数据
wx.p.wxApi.previewImage(params); wx.p.wxApi.previewImage(params);
}, },
onExpressNoInput(e) {
const { value } = e.detail;
this.setData({
"order.express_no": value,
});
},
onSubmitLogistics() {
// 提交物流信息的处理逻辑
console.log("提交物流信息");
},
}); });
{ {
"navigationBarTitleText": "售后详情", "navigationBarTitleText": "售后详情",
"usingComponents": { "usingComponents": {
"content": "../index/components/Content/Content", "refund-status": "./components/RefundStatus/RefundStatus",
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet" "return-address-box": "./components/ReturnAddressBox/ReturnAddressBox",
"after-sale-info-box": "./components/AfterSaleInfoBox/AfterSaleInfoBox",
"re-submit-button": "./components/ReSubmitButton/ReSubmitButton"
} }
} }
\ No newline at end of file \ No newline at end of file
.layout { .layout {
padding: 32rpx; padding: 32rpx;
} }
.status-box {
display: flex;
justify-content: flex-start;
align-items: center;
gap: 24rpx;
.icon {
width: 80rpx;
height: 80rpx;
}
.box-info {
.title {
font-size: 40rpx;
font-weight: 500;
color: #282829;
}
.tips {
font-size: 28rpx;
font-weight: 400;
color: #656566;
}
}
margin-bottom: 32rpx;
}
.box {
border-radius: 16rpx;
background-color: #fff;
}
.mb {
margin-bottom: 24rpx;
}
// .section {
// font-size: 32rpx;
// font-weight: 400;
// color: #323233;
// height: 104rpx;
// line-height: 104rpx;
// text-align: center;
// &.active {
// color: var(--btnColor);
// background: #fff9f5;
// }
// }
.weui-actionsheet__title-text {
font-size: 32rpx;
color: #323233;
font-weight: 500;
}
.weui-actionsheet__cell {
&::before {
display: none;
}
}
.weui-actionsheet__cell_warn {
color: var(--btnColor);
background: #fff9f5;
}
.text-box {
padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2;
.title {
font-weight: 600;
font-size: 32rpx;
color: #282829;
}
.form {
margin-top: 24rpx;
background: #f7f8fa;
border-radius: 12rpx;
padding: 0 32rpx;
.item {
height: 104rpx;
line-height: 104rpx;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 0;
.label {
margin-right: 12rpx;
font-size: 28rpx;
color: #282829;
}
&:first-child {
border-bottom: 2rpx solid #eff0f2;
}
}
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
.copy {
background: #e8e8ea;
border-radius: 18rpx;
font-weight: 400;
font-size: 22rpx;
color: #707071;
padding: 4rpx 18rpx;
}
}
.btn-box{
display: flex;
justify-content: center;
align-items: center;
margin-top: 24rpx;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 336rpx;
height: 80rpx;
border-radius: 20rpx;
border: 2rpx solid #dcdfe6;
font-size: 24rpx;
}
.submit-btn {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
}
}
.text-box .item {
margin-bottom: 12rpx;
display: flex;
align-items: flex-start;
}
.text-box .item .label {
width: 140rpx;
}
.text-box .item .value {
color: #656566;
width: calc(100% - 150rpx);
.arrow {
margin-left: 16rpx;
width: 20rpx;
height: 20rpx;
transform: translateY(1rpx);
}
&.icon {
display: flex;
align-items: center;
justify-content: space-between;
}
}
.photo-box {
padding: 40rpx 0 28rpx 20rpx;
display: flex;
flex-wrap: wrap;
}
.photo-box .item {
width: 200rpx;
height: 200rpx;
background: #d8d8d8;
margin: 0 20rpx 20rpx 0;
}
<block wx:if="{{orderInfo}}"> <block wx:if="{{orderInfo}}">
<view class="layout isFullSucreen"> <view class="layout isFullSucreen">
<view class="status-box"> <!-- 退款状态组件 -->
<!-- 退款状态1:待处理,2待发货,3待确认收到退货,4:退款中,5:已退款,6:退款失败,7:审核不通过 --> <refund-status refundStatus="{{orderInfo.refundStatus}}"></refund-status>
<view class="icon"> <!-- 退货地址和物流信息组件 -->
<glsx-image webp src="{{refund.image}}"></glsx-image> <return-address-box />
</view> <!-- 售后信息组件 -->
<view class="box-info"> <after-sale-info-box order-info="{{orderInfo}}"></after-sale-info-box>
<view class="title">{{refund.title}}</view> <!-- 重新提交按钮组件 -->
<view class="tips">{{refund.tips}}</view> <re-submit-button wx:if="{{orderInfo.refundStatus >5}}" bindresubmit="confirm"></re-submit-button>
</view> </view>
</view> <mp-actionSheet bindactiontap="selectExpress" show="{{isShowExpressSelector}}" actions="{{expressList}}" title="选择快递公司"></mp-actionSheet>
<view class="box mb">
<view class="text-box">
<view class="header">
<view class="title">商品寄回地址</view>
<view class="copy">复制</view>
</view>
<block wx:for="{{address}}" wx:key="index">
<view class="item">
<view class="label">{{item.title}}:</view>
<view class="value">
<view>{{addressObject[item.key]}}</view>
</view>
</view>
</block>
<view class="title">请填写退货物流</view>
<view class="form">
<view class="item">
<view class="label">物流公司:</view>
<view class="value icon" bindtap="showExpressSelector">
<view>{{express.text||'请选择'}}</view>
<mp-icon icon="arrow" color="#B1B1B3" size="12"></mp-icon>
</view>
</view>
<view class="item">
<view class="label">快递单号:</view>
<view class="value">
<input type="text" value="{{order.express_no}}" placeholder="请输入" placeholder-style="color: #999999;" />
</view>
</view>
</view>
<view class="btn-box">
<view class="btn submit-btn" data-order-code="{{item.orderCode}}">提交物流</view>
</view>
</view>
</view>
<view class="box">
<view class="text-box">
<view class="title">售后信息</view>
<content item="{{orderInfo}}" />
<block wx:for="{{afterSaleObj}}" wx:key="index">
<view class="item">
<view class="label">{{item.title}}:</view>
<view class="value">
<block wx:if="{{item.enum}}">{{item.enum[orderInfo[item.key]]}}</block>
<block wx:elif="{{item.isArray}}">
<block wx:for="{{orderInfo[item.key]}}" wx:key="index" wx:for-item="i">
<text>{{i}};</text>
</block>
</block>
<block wx:else>{{orderInfo[item.key] || ''}}</block>
</view>
</view>
</block>
</view>
<block wx:if="{{orderInfo.imgUrls && orderInfo.imgUrls.length}}">
<view class="photo-box">
<block wx:for="{{orderInfo.imgUrls}}" wx:key="index">
<view class="item" bindtap="previewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrls}}">
<image webp src="{{item}}"></image>
</view>
</block>
</view>
</block>
</view>
<block wx:if="{{orderInfo.refundStatus >5}}">
<view class="default-btn" bindtap="confirm">重新提交</view>
</block>
</view>
<!-- <popup show="{{showPopup}}" title="选择快递公司" bindconfirm="confirmPopup">
<view wx:for="{{expressList}}" wx:key="index" bindtap="selectExpress" data-item="{{item}}" class="section {{item.id==express.id?'active':''}}">
{{item.name}}
</view>
</popup> -->
<mp-actionSheet bindactiontap="selectExpress" show="{{isShowExpressSelector}}" actions="{{expressList}}" title="选择快递公司" >
</mp-actionSheet>
</block> </block>
\ No newline at end of file \ No newline at end of file
import {
AfterSaleObj,
} from "~/constants/mine.js";
Component({
properties: {
orderInfo: {
type: Object,
value: {}
},
},
data:{
// 退款状态1:待处理,2待发货,3待确认收到退货,4:退款中,5:已退款,6:退款失败,7:审核不通过
afterSaleObj: Object.freeze(AfterSaleObj),
},
methods: {
onPreviewImage(e) {
this.triggerEvent('previewimage', {
current: e.currentTarget.dataset.current,
urls: e.currentTarget.dataset.urls
});
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"content": "/packageMine/pages/order/index/components/Content/Content"
}
}
\ No newline at end of file \ No newline at end of file
<view class="box">
<view class="text-box">
<view class="title">售后信息</view>
<content item="{{orderInfo}}" />
<block wx:for="{{afterSaleObj}}" wx:key="index">
<view class="item">
<view class="label">{{item.title}}:</view>
<view class="value">
<block wx:if="{{item.enum}}">{{item.enum[orderInfo[item.key]]}}</block>
<block wx:elif="{{item.isArray}}">
<block wx:for="{{orderInfo[item.key]}}" wx:key="index" wx:for-item="i">
<text>{{i}};</text>
</block>
</block>
<block wx:else>{{orderInfo[item.key] || ''}}</block>
</view>
</view>
</block>
</view>
<block wx:if="{{orderInfo.imgUrls && orderInfo.imgUrls.length}}">
<view class="photo-box">
<block wx:for="{{orderInfo.imgUrls}}" wx:key="index">
<view class="item" bindtap="onPreviewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrls}}">
<image webp mode="aspectFill" class="image" src="{{item}}"></image>
</view>
</block>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
.box {
border-radius: 16rpx;
background-color: #fff;
}
.text-box {
padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2;
}
.text-box .title {
font-weight: 600;
font-size: 32rpx;
color: #282829;
}
.text-box .item {
margin-bottom: 12rpx;
display: flex;
align-items: flex-start;
}
.text-box .item .label {
width: 140rpx;
}
.text-box .item .value {
color: #656566;
width: calc(100% - 150rpx);
}
.photo-box {
padding: 40rpx 0 28rpx 20rpx;
display: flex;
flex-wrap: wrap;
}
.photo-box .item {
width: 200rpx;
height: 200rpx;
background: #d8d8d8;
margin: 0 20rpx 20rpx 0;
border-radius: 16rpx;
overflow: hidden;
}
\ No newline at end of file \ No newline at end of file
Component({
methods: {
onReSubmit() {
this.triggerEvent('resubmit');
}
}
});
\ No newline at end of file \ No newline at end of file
{
"component": true
}
\ No newline at end of file \ No newline at end of file
<view class="default-btn" bindtap="onReSubmit">重新提交</view>
\ No newline at end of file \ No newline at end of file
.default-btn {
margin: 60rpx 32rpx 0;
height: 88rpx;
background: var(--btnColor);
border-radius: 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
import { RefundStatus } from "~/constants/mine.js";
Component({
properties: {
refundStatus: {
type: String,
value: "",
observer: function (status) {
this.updateStatus(status);
},
},
},
data: {
refund: {},
},
methods: {
updateStatus(status) {
this.setData({
refund: RefundStatus[status],
});
},
},
});
{
"component": true,
"usingComponents": {
"glsx-image": "/components/image/index"
}
}
\ No newline at end of file \ No newline at end of file
<view class="status-box">
<!-- 退款状态1:待处理,2待发货,3待确认收到退货,4:退款中,5:已退款,6:退款失败,7:审核不通过 -->
<view class="icon">
<glsx-image webp src="{{refund.image}}"></glsx-image>
</view>
<view class="box-info">
<view class="title">{{refund.title}}</view>
<view class="tips">{{refund.tips}}</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
.status-box {
display: flex;
justify-content: flex-start;
align-items: center;
gap: 24rpx;
margin-bottom: 32rpx;
}
.status-box .icon {
width: 80rpx;
height: 80rpx;
}
.status-box .box-info .title {
font-size: 40rpx;
font-weight: 500;
color: #282829;
}
.status-box .box-info .tips {
font-size: 28rpx;
font-weight: 400;
color: #656566;
}
\ No newline at end of file \ No newline at end of file
import { ExpressList, AddressInfo } from "~/constants/mine.js";
Component({
properties: {},
data: {
isShowExpressSelector: false,
expressList: Object.freeze(ExpressList),
address: Object.freeze(AddressInfo),
addressObject: {
name: "张三",
phone: "12345678901",
address: "广东省深圳市南山区",
},
},
methods: {
onShowExpressSelector() {
this.setData({
isShowExpressSelector: true,
});
},
onSubmitLogistics() {
this.triggerEvent("submitlogistics");
},
onSelectExpress(e) {
this.setData({
isShowExpressSelector: false,
});
const { expressList } = this.data;
const expressListUpdated = expressList.map((item) => {
if (item.value == e.detail.value) {
item.type = "warn";
this.setData({
express: item,
});
} else {
item.type = "";
}
return item;
});
this.setData({
expressList: expressListUpdated,
});
},
},
});
{
"component": true,
"usingComponents": {
"mp-icon": "weui-miniprogram/icon/icon",
"mp-actionSheet": "weui-miniprogram/actionsheet/actionsheet"
}
}
\ No newline at end of file \ No newline at end of file
<view class="box mb">
<view class="text-box">
<view class="header">
<view class="title">商品寄回地址</view>
<view class="copy">复制</view>
</view>
<block wx:for="{{address}}" wx:key="index">
<view class="item">
<view class="label">{{item.title}}:</view>
<view class="value">
<view>{{addressObject[item.key]}}</view>
</view>
</view>
</block>
<view class="title">请填写退货物流</view>
<view class="form">
<view class="item">
<view class="label">物流公司:</view>
<view class="value icon" bindtap="onShowExpressSelector">
<view>{{express.text||'请选择'}}</view>
<mp-icon icon="arrow" color="#B1B1B3" size="12"></mp-icon>
</view>
</view>
<view class="item">
<view class="label">快递单号:</view>
<view class="value">
<input type="text" value="{{expressNo}}" placeholder="请输入" placeholder-style="color: #999999;" bindinput="onExpressNoInput" />
</view>
</view>
</view>
<view class="btn-box">
<view class="btn submit-btn" bindtap="onSubmitLogistics">提交物流</view>
</view>
</view>
</view>
<mp-actionSheet bindactiontap="onSelectExpress" show="{{isShowExpressSelector}}" actions="{{expressList}}" title="选择快递公司" >
</mp-actionSheet>
\ No newline at end of file \ No newline at end of file
.box {
border-radius: 16rpx;
background-color: #fff;
}
.mb {
margin-bottom: 24rpx;
}
.text-box {
padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2;
}
.text-box .title {
font-weight: 600;
font-size: 32rpx;
color: #282829;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
.header .copy {
background: #e8e8ea;
border-radius: 18rpx;
font-weight: 400;
font-size: 22rpx;
color: #707071;
padding: 4rpx 18rpx;
}
.item {
margin-bottom: 12rpx;
display: flex;
align-items: flex-start;
}
.item .label {
width: 140rpx;
}
.item .value {
color: #656566;
width: calc(100% - 150rpx);
}
.item .value.icon {
display: flex;
align-items: center;
justify-content: space-between;
}
.form {
margin-top: 24rpx;
background: #f7f8fa;
border-radius: 12rpx;
padding: 0 32rpx;
}
.form .item {
height: 104rpx;
line-height: 104rpx;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 0;
}
.form .item .label {
margin-right: 12rpx;
font-size: 28rpx;
color: #282829;
}
.form .item:first-child {
border-bottom: 2rpx solid #eff0f2;
}
.btn-box {
display: flex;
justify-content: center;
align-items: center;
margin-top: 24rpx;
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 336rpx;
height: 80rpx;
border-radius: 20rpx;
border: 2rpx solid #dcdfe6;
font-size: 24rpx;
}
.submit-btn {
border-color: var(--btnColor);
color: var(--btnColor);
font-weight: 500;
}
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
width: 100%; width: 100%;
} }
.item { .section {
flex: 1; flex: 1;
border: 2rpx solid #EBEBEB; border: 2rpx solid #EBEBEB;
height: 88rpx; height: 88rpx;
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
} }
.item.active{ .section.active{
border-color: var(--btnColor); border-color: var(--btnColor);
} }
.active .icon{ .active .icon{
......
<view class="type-box"> <view class="type-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="section text-center {{item.active?'active':''}}" bindtap="choose" data-index="{{index}}">
{{afterType[item.value]}} {{afterType[item.value]}}
<view class="icon"> <view class="icon">
<glsx-image webp src="mine/active.png"></glsx-image> <glsx-image webp src="mine/active.png"></glsx-image>
......
...@@ -49,9 +49,10 @@ Page({ ...@@ -49,9 +49,10 @@ Page({
}); });
}, },
radioChange(e){ radioChange(e){
const value = e.currentTarget.dataset.item.value
this.setData({ this.setData({
"orderObj.reason": e.detail.value, "orderObj.reason": value,
refundReason:RefundReason.find(item => item.value == e.detail.value).text refundReason:RefundReason.find(item => item.value == value).text
}); });
}, },
noScroll() {}, noScroll() {},
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
.weui-cell__hd { .weui-cell__hd {
margin-left: 10rpx; margin-left: 10rpx;
margin-right: 20rpx; margin-right: 20rpx;
line-height: 0;
} }
&::before { &::before {
display: none; display: none;
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
.box { .box {
background: #ffffff; background: #ffffff;
border-radius: 8rpx; border-radius: 16rpx;
.box-item { .box-item {
display: flex; display: flex;
height: 100rpx; height: 100rpx;
...@@ -49,13 +50,8 @@ ...@@ -49,13 +50,8 @@
font-size: 28rpx; font-size: 28rpx;
color: #6e6e7a; color: #6e6e7a;
display: flex; display: flex;
justify-content: center;
align-items: center;
.arrow { .arrow {
margin-left: 16rpx; margin-left: 16rpx;
width: 20rpx;
height: 20rpx;
transform: translateY(1rpx);
} }
.value { .value {
display: inline; display: inline;
...@@ -136,29 +132,35 @@ ...@@ -136,29 +132,35 @@
.upload-box .item { .upload-box .item {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background: #d8d8d8; background: #F5F5F7;
margin-bottom: 30rpx; margin-bottom: 30rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 8px;
position: relative; position: relative;
} padding: 1rpx;
.del {
.item .del {
position: absolute; position: absolute;
width: 72rpx; width: 16rpx;
height: 72rpx; height: 16rpx;
right: -32rpx; right: 2rpx;
top: -32rpx; top: -22rpx;
} .icon {
.upload-box .item .del .icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
}
}
.image{
border-radius: 8px;
}
} }
.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;
border: 1px dashed #c9cacc;
border-radius: 8px;
position: relative;
} }
.btn { .btn {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="box-item-value" bindtap="showPopup"> <view class="box-item-value" bindtap="showPopup">
{{refundReason||'请选择'}} {{refundReason||'请选择'}}
<view class="arrow"> <view class="arrow">
<glsx-image webp src="mine/mine-arrow.png"></glsx-image> <mp-icon icon="arrow" color="#B1B1B3" size="{{10}}"></mp-icon>
</view> </view>
</view> </view>
</view> </view>
...@@ -43,20 +43,20 @@ ...@@ -43,20 +43,20 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<block wx:for="{{imgUrls}}" wx:key="index"> <block wx:if="{{imgUrls.length < 5}}">
<view class="item" catchtap="previewImage" data-current="{{item}}" data-urls="{{imgUrls}}"> <view class="upload-item item text-center" bindtap="upLoad">
<image webp src="{{item}}"></image>
<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/camera.png"></glsx-image>
</view>
</view> </view>
</view> </view>
</block> </block>
<block wx:if="{{imgUrls.length < 5}}"> <block wx:for="{{imgUrls}}" wx:key="index">
<view class="upload-item item text-center" bindtap="upLoad"> <view class="item" catchtap="previewImage" data-current="{{item}}" data-urls="{{imgUrls}}">
<image webp src="{{item}}" mode="aspectFill" class="image"></image>
<view class="del" catchtap="del" data-index="{{index}}">
<view class="icon"> <view class="icon">
<glsx-image webp src="mine/camera.png"></glsx-image> <mp-icon icon="close2" color="#D8D8D8" type="field" size="{{16}}"></mp-icon>
</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -66,14 +66,12 @@ ...@@ -66,14 +66,12 @@
</view> </view>
<popup show="{{showPopup}}" only="{{false}}" title="请选择退款原因" bindconfirm="confirmPopup"> <popup show="{{showPopup}}" only="{{false}}" title="请选择退款原因" bindconfirm="confirmPopup">
<view class="page-section"> <view class="page-section">
<radio-group bindchange="radioChange"> <label class="weui-cell weui-check__label" wx:for="{{RefundReason}}" wx:key="{{item.value}}" bindtap="radioChange" data-item="{{item}}">
<label class="weui-cell weui-check__label" wx:for="{{RefundReason}}" wx:key="{{item.value}}">
<view class="weui-cell__hd"> <view class="weui-cell__hd">
<radio value="{{item.value}}" checked="true" color="#FC8A32" /> <icon type="{{refundReason == item.text?'success':'circle'}}" size="40rpx" color="{{refundReason == item.text?'#FB8A32':'#E3E3E6'}}"></icon>
</view> </view>
<view class="weui-cell__bd">{{item.text}}</view> <view class="weui-cell__bd">{{item.text}}</view>
</label> </label>
</radio-group>
</view> </view>
</popup> </popup>
<glsx-privacy appletName="海马刀"></glsx-privacy> <glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="info-top"> <view class="info-top">
<view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view> <view class="name text-hide">{{item.orderSource == 5 ? item.activityName: i.goodsName}}</view>
<view class="number"> <view class="number">
x{{item.orderSource == 5 ? 1: i.goodsNumber}} <mp-icon icon="close" color="#656566" size="{{12}}"></mp-icon>{{item.orderSource == 5 ? 1: i.goodsNumber}}
</view> </view>
</view> </view>
<view class="info-bottom"> <view class="info-bottom">
......
...@@ -170,7 +170,7 @@ Component({ ...@@ -170,7 +170,7 @@ Component({
// 待评价订单 // 待评价订单
if ( if (
item.orderGoods.length == 1 && item.orderGoods?.length == 1 &&
!hasUserInfo && !hasUserInfo &&
(item.orderStatus == OrderStatus.COMPLETED || (item.orderStatus == OrderStatus.COMPLETED ||
item.orderStatus == OrderStatus.CLOSED) item.orderStatus == OrderStatus.CLOSED)
...@@ -206,7 +206,7 @@ Component({ ...@@ -206,7 +206,7 @@ Component({
// 待评价订单(独立情况) // 待评价订单(独立情况)
if ( if (
item.orderGoods.length == 1 && item.orderGoods?.length == 1 &&
!hasUserInfo && !hasUserInfo &&
(item.orderStatus == OrderStatus.COMPLETED || (item.orderStatus == OrderStatus.COMPLETED ||
item.orderStatus == OrderStatus.CLOSED) item.orderStatus == OrderStatus.CLOSED)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!