|
|
@@ -32,7 +32,7 @@
|
|
|
<text class="status-text">暂未创建门店地址</text>
|
|
|
</view>
|
|
|
<view class="shop-desc">
|
|
|
- <text class="desc-text">请先创建门店地址,以便正常使用快递服务</text>
|
|
|
+ <text class="desc-text">请先创建门店地址,以便正常使用跑腿服务</text>
|
|
|
</view>
|
|
|
<button class="create-btn" @click="createShopAddress">
|
|
|
<text class="btn-text">创建门店</text>
|
|
|
@@ -44,25 +44,25 @@
|
|
|
<view class="balance-card">
|
|
|
<view class="balance-left">
|
|
|
<view class="balance-header">
|
|
|
- <text class="balance-title">快递账户余额</text>
|
|
|
+ <text class="balance-title">账户余额</text>
|
|
|
</view>
|
|
|
<view class="balance-amount">
|
|
|
<text class="amount-text">{{ balance.toFixed(2) }}</text>
|
|
|
<text class="balance-unit">元</text>
|
|
|
</view>
|
|
|
<view class="balance-desc">
|
|
|
- <text class="desc-text">用于支付快递费用</text>
|
|
|
+ <text class="desc-text">用于支付跑腿费用</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="balance-right">
|
|
|
<view class="sub-balance sf">
|
|
|
- <text class="sub-balance-label">顺丰</text>
|
|
|
- <text class="sub-balance-amount">{{ sfBalance.toFixed(2) }}元</text>
|
|
|
- </view>
|
|
|
- <view class="sub-balance dada">
|
|
|
<text class="sub-balance-label">达达</text>
|
|
|
<text class="sub-balance-amount">{{ dadaBalance.toFixed(2) }}元</text>
|
|
|
</view>
|
|
|
+ <view class="sub-balance dada">
|
|
|
+ <text class="sub-balance-label">顺丰同城</text>
|
|
|
+ <text class="sub-balance-amount">{{ sfBalance.toFixed(2) }}元</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -104,7 +104,7 @@
|
|
|
<view v-if="!showPayUrl">
|
|
|
<!-- 配送公司选择 -->
|
|
|
<view class="form-item">
|
|
|
- <text class="form-label">充值方选择</text>
|
|
|
+ <text class="form-label">选择跑腿</text>
|
|
|
<view class="express-company-options">
|
|
|
<view
|
|
|
class="express-option"
|
|
|
@@ -118,7 +118,7 @@
|
|
|
:class="{ active: expressCompany === 'SFTC' }"
|
|
|
@click="selectExpressCompany('SFTC')"
|
|
|
>
|
|
|
- <text class="express-option-text">顺丰</text>
|
|
|
+ <text class="express-option-text">顺丰同城</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -131,10 +131,11 @@
|
|
|
class="amount-input"
|
|
|
type="digit"
|
|
|
v-model="rechargeAmount"
|
|
|
- placeholder="请输入充值金额"
|
|
|
+ placeholder="充值金额"
|
|
|
@input="onAmountInput"
|
|
|
/>
|
|
|
</view>
|
|
|
+ <view style="color:red;margin:10upx 0 10upx 0;font-size:24upx;font-weight:bold;">充值金额不能少于50元,用不完可以退</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 快捷金额选择 -->
|
|
|
@@ -186,7 +187,7 @@
|
|
|
<script>
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { createStore, updateStore, getStore, getStoreBalance, rechargeStore } from "@/api/shop-express";
|
|
|
-
|
|
|
+import { getExtInfo } from "@/api/shop/ext";
|
|
|
export default {
|
|
|
name: "expressSet",
|
|
|
components: {
|
|
|
@@ -199,13 +200,14 @@ export default {
|
|
|
dadaBalance: 0.00, // 达达余额
|
|
|
showModal: false, // 是否显示充值弹窗
|
|
|
rechargeAmount: '', // 充值金额
|
|
|
- expressCompany: 'DADA', // 快递公司,默认达达
|
|
|
+ expressCompany: 'DADA', // 跑腿公司,默认达达
|
|
|
quickAmounts: [50, 100, 200, 500], // 快捷金额选项
|
|
|
rechargeRecords: [], // 充值记录
|
|
|
shopAddress: null, // 门店地址信息
|
|
|
loading: false,
|
|
|
payUrl: '', // 支付链接
|
|
|
- showPayUrl: false // 是否显示支付链接
|
|
|
+ showPayUrl: false, // 是否显示支付链接
|
|
|
+ wxStoreId:''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -219,7 +221,7 @@ export default {
|
|
|
},
|
|
|
onShow() {
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: `快递设置`,
|
|
|
+ title: `跑腿设置`,
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -235,7 +237,19 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- async init() {
|
|
|
+ init() {
|
|
|
+ getExtInfo().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.ext){
|
|
|
+ this.wxStoreId = res.data.ext.wxStoreId
|
|
|
+ if(this.wxStoreId!=''){
|
|
|
+ this.initExpress()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async initExpress(){
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
// 获取门店地址信息
|
|
|
@@ -253,7 +267,6 @@ export default {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
// 获取门店地址信息
|
|
|
async getShopAddressInfo() {
|
|
|
try {
|
|
|
@@ -451,7 +464,7 @@ export default {
|
|
|
this.showPayUrl = false;
|
|
|
},
|
|
|
|
|
|
- // 选择快递公司
|
|
|
+ // 选择跑腿公司
|
|
|
selectExpressCompany(company) {
|
|
|
this.expressCompany = company;
|
|
|
},
|
|
|
@@ -493,10 +506,10 @@ export default {
|
|
|
title: '充值中...'
|
|
|
});
|
|
|
|
|
|
- // 调用实际的充值API,传入金额和快递公司
|
|
|
+ // 调用实际的充值API,传入金额和跑腿公司
|
|
|
const result = await rechargeStore({
|
|
|
amount: amount,
|
|
|
- expressId: this.expressCompany // 添加快递公司参数
|
|
|
+ expressId: this.expressCompany // 添加跑腿公司参数
|
|
|
});
|
|
|
|
|
|
uni.hideLoading();
|
|
|
@@ -517,7 +530,7 @@ export default {
|
|
|
this.hideRechargeModal();
|
|
|
|
|
|
// 刷新余额和记录
|
|
|
- await this.init();
|
|
|
+ await this.initExpress()
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
@@ -603,7 +616,7 @@ export default {
|
|
|
|
|
|
.status-text {
|
|
|
color: #333333;
|
|
|
- font-size: 28rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
|
|
|
@@ -1078,7 +1091,7 @@ export default {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
|
|
|
-// 快递公司选择样式
|
|
|
+// 跑腿公司选择样式
|
|
|
.express-company-options {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|