From 6bb4f9efdd6585771c3a2dd22c6b92333a59f60e Mon Sep 17 00:00:00 2001
From: chenkun <3289431190@qq.com>
Date: Sat, 26 Oct 2024 01:34:26 +0800
Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E5=8D=95=E6=8E=A5=E5=8F=A3=20?=
=?UTF-8?q?=E6=8C=82=E5=8D=95=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/user/productList.vue | 4 +-
locale/en.json | 5 +-
locale/zh-Hans.json | 5 +-
pages/index/center2.vue | 4 +-
pages/index/tradingPlatform.vue | 15 ++-
pages_order/auth/registerShop.vue | 23 +++-
pages_order/auth/selectionIdentity.vue | 155 +++++++++++++------------
pages_order/center/addressListManage.vue | 7 +-
pages_order/components/address/addressList.vue | 2 +-
pages_order/components/order/orderList.vue | 40 ++++++-
pages_order/order/pendingOrder.vue | 2 +-
pages_order/tradingPlatform/nowOrder.vue | 37 +++---
store/store.js | 7 +-
13 files changed, 181 insertions(+), 125 deletions(-)
diff --git a/components/user/productList.vue b/components/user/productList.vue
index 2983d7b..cfd180e 100644
--- a/components/user/productList.vue
+++ b/components/user/productList.vue
@@ -1,7 +1,7 @@
- 倾心.
+ {{userInfo.nickName}}
- {{ $t('components.phoneNumber') }}:13812345678
+ {{ $t('components.phoneNumber') }}: {{userInfo.phone}}
diff --git a/pages/index/tradingPlatform.vue b/pages/index/tradingPlatform.vue
index 8d7ef1e..cf544b5 100644
--- a/pages/index/tradingPlatform.vue
+++ b/pages/index/tradingPlatform.vue
@@ -20,20 +20,16 @@
-
+
+
- {{ item.name }}
-
+ {{ item.name }}
-
@@ -79,9 +75,12 @@
},
onLoad() {
if(this.userShop){
- this.mixinsListApi = 'getMyProductlist'
+ // 现货/期货列表
+ this.mixinsListApi = 'productList'
}else{
+ // 交易平台挂单列表
this.mixinsListApi = 'productlist'
+
this.queryParams.productType = this.actionIndex
}
},
diff --git a/pages_order/auth/registerShop.vue b/pages_order/auth/registerShop.vue
index 7004a5c..e11da40 100644
--- a/pages_order/auth/registerShop.vue
+++ b/pages_order/auth/registerShop.vue
@@ -41,23 +41,24 @@
-
+
{{ $t('components.lxPhone')}}
+
{{ $t('other.companyAccount')}}
-
+
{{ $t('components.bankName')}}
-
+
@@ -129,29 +130,38 @@
+
{{ $t('components.submitReview') }}
+
{{ $t('components.contactUs') }}
+
{{ $t('components.registrationNotice') }}
+
{{ $t('other.frameworkContractPreview') }}
+
+
\ No newline at end of file
diff --git a/pages_order/center/addressListManage.vue b/pages_order/center/addressListManage.vue
index 953c383..e9d8ea4 100644
--- a/pages_order/center/addressListManage.vue
+++ b/pages_order/center/addressListManage.vue
@@ -123,11 +123,10 @@ export default {
//删除地址
deleteAddress(id) {
- console.log("==========")
let self = this
uni.showModal({
- title: '删除地址',
- content: '确认删除此地址?删除后数据不可恢复',
+ title: this.$t('components.deleteAddress'),
+ content: this.$t('components.confirmDeleteAddress'),
success(e) {
if(e.confirm){
self.$api('deleteAddress', {
@@ -135,7 +134,7 @@ export default {
}, res => {
if (res.code == 200) {
uni.showToast({
- title: '删除成功',
+ title: this.$t('components.deleteSuccessful'),
icon: 'none'
})
self.getAddressList()
diff --git a/pages_order/components/address/addressList.vue b/pages_order/components/address/addressList.vue
index feaf50d..8a4beb4 100644
--- a/pages_order/components/address/addressList.vue
+++ b/pages_order/components/address/addressList.vue
@@ -114,7 +114,7 @@ export default {
},
// 删除地址
deleteAddress(e){
- console.log(e,"$emitdeleteAddress")
+
this.$emit('deleteAddress', e)
},
// 修改地址
diff --git a/pages_order/components/order/orderList.vue b/pages_order/components/order/orderList.vue
index b85bd19..d04a1fc 100644
--- a/pages_order/components/order/orderList.vue
+++ b/pages_order/components/order/orderList.vue
@@ -1,6 +1,6 @@
-
+
{{ $t('other.aluminumProducts') }}
@@ -40,12 +40,23 @@
+
-
+
{{ $t('other.withdrawOrder') }}
+
+
+
+
+
@@ -53,7 +64,7 @@
export default {
name: "orderList",
props: {
- orderList: {
+ list: {
type: Array,
default: false
},
@@ -78,7 +89,25 @@ export default {
},
// 撤单
- backOrder() {
+ backOrder(id) {
+ let self = this
+ uni.showModal({
+ title: this.$t('other.backOrderTitle'),
+ content: this.$t('other.backOrderTitleConfirm'),
+ success(e) {
+ if(e.confirm){
+ self.$api('noShow', {id}, res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: this.$t('other.backOrderSuccess'),
+ icon: 'none'
+ })
+ self.getAddressList()
+ }
+ })
+ }
+ }
+ })
uni.navigateTo({
url: `/pages_order/order/backOrder?id=1`
})
@@ -94,6 +123,9 @@ export default {
flex-direction: column;
gap: 20rpx;
+ height: calc(90vh - 180rpx);
+
+
.item {
padding: 20rpx;
diff --git a/pages_order/order/pendingOrder.vue b/pages_order/order/pendingOrder.vue
index 3daaa4f..dd2f136 100644
--- a/pages_order/order/pendingOrder.vue
+++ b/pages_order/order/pendingOrder.vue
@@ -7,7 +7,7 @@
-
+
diff --git a/pages_order/tradingPlatform/nowOrder.vue b/pages_order/tradingPlatform/nowOrder.vue
index 32015f0..b6cc732 100644
--- a/pages_order/tradingPlatform/nowOrder.vue
+++ b/pages_order/tradingPlatform/nowOrder.vue
@@ -14,7 +14,7 @@
{{ $t('components.productSpe') }}
- 铝制品(Al>96%)
+ {{$t('other.aluminumProducts') }}
@@ -50,9 +50,9 @@
- {{ form.deliveryDate }}
-
@@ -69,9 +69,9 @@
{{ $t('other.tentativeQuantity') }}
-
+ v-model="form.num" :max="fatherData.num">
@@ -87,7 +87,7 @@
{{ $t('other.performanceDeposit') }}
-
+
@@ -138,23 +138,22 @@
const fatherData = JSON.parse(decodeURIComponent(options.params));
console.log(fatherData, "fatherData==========")
this.fatherData = fatherData;
+ this.form.deposit = (fatherData.price * this.form.num * (0.02)).toFixed(2);
}
},
data() {
return {
fatherData: {},
form: {
- currentRegion: '',
- address: '',
- tentativeQuantity: 0,
- deliveryDate: dayjs(new Date()).format("YYYY-MM-DD"),
- price: 0,
- performanceBond: 0,
- latitude: '',
- longitude: '',
- },
- phoneNumber: '00000000000'
-
+ "address": "",
+ "addressId": "",
+ "deposit": 0,
+ "id": "",
+ "num": 1,
+ "price": 0,
+ "productId": "",
+ "takeTime": ""
+ },
}
},
methods: {
@@ -173,7 +172,7 @@
startDateChange(val) {
this.$nextTick(() => {
- this.form.deliveryDate = dayjs(val.value).format("YYYY-MM-DD")
+ this.form.takeTime = dayjs(val.value).format("YYYY-MM-DD")
});
},
startDateOpen() {
diff --git a/store/store.js b/store/store.js
index ca0dbee..7b1fe6e 100644
--- a/store/store.js
+++ b/store/store.js
@@ -18,7 +18,11 @@ const store = new Vuex.Store({
// 角色 true 为供应商 false 为采购商
userShop(state){
return state.shop
- }
+ },
+ userInfo(state){
+ return state.userInfo
+ },
+
},
mutations: {
// 初始化配置
@@ -50,7 +54,6 @@ const store = new Vuex.Store({
if(res.code != 200){
return
}
-
state.userInfo = res.result.userInfo
state.buy = res.result.buy
state.shop = res.result.shop