This commit is contained in:
YunaiV
2024-07-28 20:06:40 +08:00
11 changed files with 66 additions and 47 deletions
+2 -1
View File
@@ -130,6 +130,7 @@
import TradeConfigApi from '@/sheep/api/trade/config';
import { fen2yuan } from '@/sheep/hooks/useGoods';
import AfterSaleApi from '@/sheep/api/trade/afterSale';
import { SubscribeTemplate } from '@/sheep/util/const';
const form = ref(null);
const state = reactive({
@@ -165,7 +166,7 @@
// 提交表单
async function submit() {
// #ifdef MP
sheep.$platform.useProvider('wechat').subscribeMessage('order_aftersale_change');
sheep.$platform.useProvider('wechat').subscribeMessage(SubscribeTemplate.ORDER_AFTERSALE_CHANGE);
// #endif
let data = {
orderItemId: state.itemId,
+9 -8
View File
@@ -6,14 +6,15 @@
<view class='list borRadius14'>
<view class='item acea-row row-between-wrapper' style="display: flex;align-items: center;">
<view>物流公司</view>
<picker mode='selector' class='num' @change="bindPickerChange" :value="state.expressIndex"
:range="state.expresses" range-key="name">
<view class="picker acea-row row-between-wrapper">
<view class='reason'>{{ state.expresses[state.expressIndex].name }}</view>
<!-- TODO 芋艿这里样式有问题少了 > 按钮 -->
<text class='iconfont icon-jiantou' />
</view>
</picker>
<view v-if="state.expresses.length>0" style="flex:1">
<picker mode='selector' class='num' @change="bindPickerChange" :value="state.expressIndex"
:range="state.expresses" range-key="name">
<view class="picker acea-row row-between-wrapper" style="display: flex;justify-content: space-between;">
<view class='reason'>{{ state.expresses[state.expressIndex].name }}</view>
<text class='iconfont _icon-forward' />
</view>
</picker>
</view>
</view>
<view class='item textarea acea-row row-between' style="display: flex;align-items: center;">
<view>物流单号</view>
+1 -1
View File
@@ -272,7 +272,7 @@
// 复制
const onCopy = () => {
sheep.$helper.copyText(state.orderInfo.sn);
sheep.$helper.copyText(state.orderInfo.no);
};
// 去支付
+14 -13
View File
@@ -47,6 +47,7 @@
import { onLoad } from '@dcloudio/uni-app';
import { fen2yuan } from '@/sheep/hooks/useGoods';
import PayWalletApi from '@/sheep/api/pay/wallet';
import { SubscribeTemplate } from '@/sheep/util/const';
const userWallet = computed(() => sheep.$store('user').userWallet);
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
@@ -73,20 +74,20 @@
// 发起支付
async function onConfirm() {
const { code, data } = await PayWalletApi.createWalletRecharge({
packageId: state.packageList.find((item) => fen2yuan(item.payPrice) === state.recharge_money)?.id,
payPrice: state.recharge_money * 100
});
if (code !== 0) {
return;
}
// const { code, data } = await PayWalletApi.createWalletRecharge({
// packageId: state.packageList.find((item) => fen2yuan(item.payPrice) === state.recharge_money)?.id,
// payPrice: state.recharge_money * 100
// });
// if (code !== 0) {
// return;
// }
// #ifdef MP
sheep.$platform.useProvider('wechat').subscribeMessage('money_change');
sheep.$platform.useProvider('wechat').subscribeMessage(SubscribeTemplate.MONEY_CHANGE);
// #endif
sheep.$router.go('/pages/pay/index', {
id: data.payOrderId,
orderType: 'recharge'
});
// sheep.$router.go('/pages/pay/index', {
// id: data.payOrderId,
// orderType: 'recharge'
// });
}
onLoad(() => {
@@ -256,4 +257,4 @@
}
}
}
</style>
</style>