2小时内到账
diff --git a/src/views/Merchant/MerchantIncome.vue b/src/views/Merchant/MerchantIncome.vue
index efd52e8..cd02f7f 100644
--- a/src/views/Merchant/MerchantIncome.vue
+++ b/src/views/Merchant/MerchantIncome.vue
@@ -63,12 +63,12 @@
{{ item.typename }}
-
剩余:{{ item.balance }}
+
剩余:{{ item.balance?.toFixed(2) }}
{{ item.nums > 0 ? '+' : '' }}
{{ item.nums?.toFixed(2) }}
- 操作时间:{{ item.addtime }}
+ 操作时间:{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}
订单编号:{{ item.ordernum }}
diff --git a/src/views/Merchant/MerchantIntroduction.vue b/src/views/Merchant/MerchantIntroduction.vue
index 3eaa9c1..dbd8d5d 100644
--- a/src/views/Merchant/MerchantIntroduction.vue
+++ b/src/views/Merchant/MerchantIntroduction.vue
@@ -171,7 +171,7 @@ export default {
fd.append('file', file)
return fetch(`${import.meta.env.VITE_API_URL}${url}`, {
method: 'POST',
- headers: { 'Authorization': `Bearer ${localStorage.getItem('token')}` },
+ headers: { 'Authorization': `Bearer ${localStorage.getItem('member_token')}` },
body: fd,
}).then(res => res.json()).then(res => {
if (res.status !== 200) throw new Error(res.message)
diff --git a/src/views/Merchant/MerchantTrade.vue b/src/views/Merchant/MerchantTrade.vue
index 78334b1..2750dd3 100644
--- a/src/views/Merchant/MerchantTrade.vue
+++ b/src/views/Merchant/MerchantTrade.vue
@@ -134,7 +134,8 @@
-
+
@@ -181,7 +182,7 @@ export default {
return res.data || []
},
onLoad(list) {
- console.log('list loaded:', list);
+ // console.log('list loaded:', list);
},
onconfirm(value) {
this.date = this.currentDate;
diff --git a/src/views/Platform/Business_School.vue b/src/views/Platform/Business_School.vue
index 7fda618..9500938 100644
--- a/src/views/Platform/Business_School.vue
+++ b/src/views/Platform/Business_School.vue
@@ -99,7 +99,7 @@ export default {
getList() {
this.$get('/v1/client/CBusinessschoolcatesClient',).then(res => {
this.categories = res.data;
- console.log(this.categories);
+ // console.log(this.categories);
})
}
diff --git a/src/views/Platform/Column.vue b/src/views/Platform/Column.vue
index 22288ee..e2782d7 100644
--- a/src/views/Platform/Column.vue
+++ b/src/views/Platform/Column.vue
@@ -31,7 +31,7 @@ export default {
emits: ['updateShare'],
mounted() {
this.$get('/v1/client/CNewsClient?pid=3').then(data => {
- console.log(data);
+ // console.log(data);
this.articleList = data.data.items;
})
},
diff --git a/src/views/Platform/School_Detail.vue b/src/views/Platform/School_Detail.vue
index ce37509..bfd424e 100644
--- a/src/views/Platform/School_Detail.vue
+++ b/src/views/Platform/School_Detail.vue
@@ -26,7 +26,7 @@ export default {
beforeCreate() {
this.$get(`/v1/client/CBusinessschoolsClient/${this.$route.query.id}`).then(res => {
this.article = res.data;
- console.log(this.article);
+ // console.log(this.article);
})
},
mounted() {
diff --git a/src/views/SyncAuth.vue b/src/views/SyncAuth.vue
new file mode 100644
index 0000000..ec72f4a
--- /dev/null
+++ b/src/views/SyncAuth.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Tabbars/Gift.vue b/src/views/Tabbars/Gift.vue
index 465956d..9b91a7d 100644
--- a/src/views/Tabbars/Gift.vue
+++ b/src/views/Tabbars/Gift.vue
@@ -318,7 +318,7 @@ export default {
// },
onFinish(e) {
this.showRegion = false;
- console.log(e);
+ // console.log(e);
this.address.ReceiveRegion = e.selectedOptions.map(x => x.id).join(';');
this.address.ReceiveRegionName = e.selectedOptions.map(x => x.text).join('');
diff --git a/src/views/Tabbars/Home.vue b/src/views/Tabbars/Home.vue
index 4ce6ac2..f4978b4 100644
--- a/src/views/Tabbars/Home.vue
+++ b/src/views/Tabbars/Home.vue
@@ -76,7 +76,7 @@
-
+
@@ -158,12 +158,12 @@ export default {
this.$get('/v1/client/CSlidesClient?pid=1').then(data => {
this.data.Carousel = data.data;
}),
+ this.$get('/v1/client/CDatadicsClient/code_sp').then(data => {
+ this.data.video = data.data;
+ })
]).catch(err => {
this.$showFailToast(err.message || '数据加载失败');
});
- // 视频和背景图从数据字典获取
- this.data.Video = this.$datadic.getContent('code_sp')
- this.data.slideBg = this.$datadic.getContent('code_yqmbj')
},
create() {
// this.showcreate = true;
diff --git a/src/views/Tabbars/Mall.vue b/src/views/Tabbars/Mall.vue
index d838ee6..6e7adbc 100644
--- a/src/views/Tabbars/Mall.vue
+++ b/src/views/Tabbars/Mall.vue
@@ -1,14 +1,14 @@
-
+
-
+
@@ -239,6 +239,7 @@ export default {
},
hotData: [],
typeData: [],
+ bgcolor: '',
}
},
methods: {
@@ -249,6 +250,9 @@ export default {
}),
this.$get(`/v1/client/CSlidesClient?pid=2`).then(res => {
this.data.Carousel = res.data
+ if (res.data?.[0]?.bgcolor) {
+ this.bgcolor = res.data[0].bgcolor
+ }
}),
this.$get('/v1/client/EProsClient?recommend=true').then(res => {
this.hotData = res.data.items;
@@ -270,6 +274,20 @@ export default {
changeTab(type) {
this.searchParams.pid = type;
this.$refs.BaseList.refresh()
+ },
+ onSwipeChange(index) {
+ const item = this.data.Carousel[index]
+ this.bgcolor = item?.bgcolor || ''
+ }
+ },
+ computed: {
+ bgStyle() {
+ if (this.bgcolor) {
+ return {
+ background: `linear-gradient(${this.bgcolor}, #f5f5f5)`
+ }
+ }
+ return {}
}
},
}
diff --git a/src/views/Trade/Pay.vue b/src/views/Trade/Pay.vue
index 52c3fef..5db0f25 100644
--- a/src/views/Trade/Pay.vue
+++ b/src/views/Trade/Pay.vue
@@ -34,7 +34,7 @@
-
+
@@ -43,12 +43,12 @@
-
+
-
+
@@ -89,6 +89,7 @@ export default {
},
payMethod: ['balance'],
showPayResult: false,
+ paychannelList: [],
}
},
mounted() {
@@ -99,6 +100,9 @@ export default {
return;
}
this.loadData();
+ this.$get('/v1/client/FOrdersClient/paychannel').then(res => {
+ this.paychannelList = res.data || [];
+ })
},
methods: {
back() {
@@ -119,57 +123,34 @@ export default {
},
async doPay() {
const method = this.payMethod[0];
- if (method === 'balance') {
- this.balancePay();
- } else if (method === 'alipay') {
- this.alipayPay();
- } else if (method === 'wechat') {
- this.wechatPay();
- }
- },
- // 余额支付
- async balancePay() {
+ // 获取对应的 Paychannel 值
+ const channelMap = {
+ balance: 4,
+ alipay: 2,
+ wechat: 1,
+ bankcard: 3
+ };
+ const paychannel = channelMap[method];
+ const openid = localStorage.getItem('openid') || '';
+
try {
- // 余额支付调用支付宝接口(实际由后端判断余额支付)
- const res = await this.$get(`/v1/client/FOrdersClient/${this.ordernum}/payyue`);
- if (res.data) {
+ const res = await this.$post(`/v1/client/FOrdersClient/${this.ordernum}/pay`, {
+ Paychannel: paychannel,
+ Openid: method === 'wechat' ? openid : ''
+ });
+ if (res.data && res.data.startsWith('http')) {
+ // 返回链接则跳转
location.href = res.data;
- }
- this.showPayResult = true;
- if (res.status === 200) {
- this.$showSuccessToast('支付成功');
+ } else if (res.status === 200) {
+ // 余额支付成功
+ this.$showSuccessToast(res.message || '支付成功');
setTimeout(() => {
this.onPayCompleted();
- }, 1000);
- }
- } catch (err) {
- this.$showFailToast(err.message || '支付失败');
- }
- },
- // 支付宝支付
- async alipayPay() {
- try {
- const res = await this.$get(`/v1/client/FOrdersClient/${this.ordernum}/payali`);
- if (res.data) {
- location.href = res.data;
- } else if (res.data.qrcode) {
- // 如果返回二维码,可以展示二维码
- this.$showSuccessToast('唤起支付宝中...');
- }
- this.showPayResult = true;
- } catch (err) {
- this.$showFailToast(err.message || '支付失败');
- }
- },
- // 微信支付
- async wechatPay() {
- try {
- const res = await this.$get(`/v1/client/FOrdersClient/${this.ordernum}/paywechat`);
- if (res.data.redirect) {
- location.href = res.data.redirect;
+ }, 1500);
}
this.showPayResult = true;
} catch (err) {
+ this.showPayResult = false;
this.$showFailToast(err.message || '支付失败');
}
},
diff --git a/src/views/Trade/TradeDetail.vue b/src/views/Trade/TradeDetail.vue
index 8d95562..9410c71 100644
--- a/src/views/Trade/TradeDetail.vue
+++ b/src/views/Trade/TradeDetail.vue
@@ -98,7 +98,7 @@ export default {
}
},
mounted() {
- console.log(this.data.state);
+ // console.log(this.data.state);
this.ordernum = this.$route.query.ordernum;
if (this.ordernum) {
diff --git a/src/views/User/Checkout/Checkout.vue b/src/views/User/Checkout/Checkout.vue
index f8b6979..bb5a769 100644
--- a/src/views/User/Checkout/Checkout.vue
+++ b/src/views/User/Checkout/Checkout.vue
@@ -104,7 +104,7 @@ export default {
})
if (this.id)
this.$get(`/v1/client/DShopsClient/${this.id}`).then(res => {
- console.log(res);
+ // console.log(res);
this.data.shop = res.data;
this.req.shopuserid = res.data.userid;
})
diff --git a/src/views/User/My.vue b/src/views/User/My.vue
index 655abc3..de9ae73 100644
--- a/src/views/User/My.vue
+++ b/src/views/User/My.vue
@@ -250,14 +250,6 @@ export default {
},
methods: {
init() {
- const code = this.$route.query.code
- if (code) {
- this.$post('/v1/client/AuthClient/loginwxweb', { code }).then(res => {
- this.$showSuccessToast('登录成功')
- }).catch(err => {
- this.$showFailToast(err.message || '微信登录失败')
- })
- }
Promise.all(
[
this.$get('/v1/client/DUsersClient').then(data => {
@@ -276,7 +268,7 @@ export default {
}),
]
)
- this.checkWxLogin()
+
},
onShowManagerPopup() {
this.managerPopupVisible = true
@@ -284,19 +276,7 @@ export default {
onCloseManagerPopup() {
this.managerPopupVisible = false
},
- checkWxLogin() {
- if (!this.$isWechat()) return
- if (this.$route.query.code) return
- this.$get('/v1/client/AuthClient/loginwxweburl', {
- returnUrl: `${encodeURIComponent(window.location.href)}`
- }).then(res => {
- if (res.data) {
- window.location.href = res.data
- }
- }).catch(res => {
- alert(res)
- })
- },
+
logout() {
this.$showConfirmDialog({
title: "确认退出?",
diff --git a/src/views/User/Wallet/Balance.vue b/src/views/User/Wallet/Balance.vue
index 42e4f54..77b9ca6 100644
--- a/src/views/User/Wallet/Balance.vue
+++ b/src/views/User/Wallet/Balance.vue
@@ -218,12 +218,12 @@
-
+
-
-
-
-
+
+
+
+
@@ -310,7 +310,7 @@ export default {
show: false,
showDate: false,
searchParams: {
- // type: 'Balance',
+ type: '',
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
},
@@ -326,6 +326,11 @@ export default {
}).catch(err => {
this.$showFailToast(err.message || '加载失败');
})
+
+ this.$get('/v1/client/DUsermoneysClient/select').then(res => {
+ // console.log(res.data);
+
+ })
},
onconfirm(value) {
this.date = this.currentDate;
@@ -336,7 +341,8 @@ export default {
this.$refs.baselist.refresh()
},
changeTabs(e) {
- this.show = false;
+ this.searchParams.type = e || '';
+ // this.$refs.baselist.refresh();
},
onShowTerm() {
this.showTerm = true;
diff --git a/src/views/User/Wallet/CV.vue b/src/views/User/Wallet/CV.vue
index e5c0468..74e8590 100644
--- a/src/views/User/Wallet/CV.vue
+++ b/src/views/User/Wallet/CV.vue
@@ -66,7 +66,7 @@
订单:{{ item.ordernum }}
- 时间:{{ $formatGMT(item.addtime, 'yyyy-dd-MM HH:ss') }}
+ 时间:{{ $formatGMT(item.addtime, 'yyyy-dd-MM HH:mm:ss') }}