From fe21e78da24828fec7693c02d76b16fac280e482 Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Mon, 4 Nov 2024 14:14:26 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E7=99=BB=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 6 +
components/base/topbar.vue | 3 +-
pages/index/index.vue | 2 +-
pages/index/tradingPlatform.vue | 585 +++++------
.../auth/loginAndRegisterAndForgetPassword.vue | 130 ++-
pages_order/center/systemSet.vue | 81 +-
pages_order/components/address/addressList.vue | 465 ++++-----
pages_order/components/order/orderList.vue | 4 +-
pages_order/order/offerOrBillLading.vue | 1082 ++++++++++----------
9 files changed, 1238 insertions(+), 1120 deletions(-)
diff --git a/api/api.js b/api/api.js
index 08a20fb..b5bdd07 100644
--- a/api/api.js
+++ b/api/api.js
@@ -62,6 +62,12 @@ const config = {
method: 'POST',
limit : 1000,
},
+ // 忘记密码
+ newPassword: {
+ url: '/alUser/newPassword',
+ method: 'POST',
+ limit : 1000,
+ },
// ========================产品报价===============================
// 清关申请
diff --git a/components/base/topbar.vue b/components/base/topbar.vue
index 996619f..a2c7973 100644
--- a/components/base/topbar.vue
+++ b/components/base/topbar.vue
@@ -9,7 +9,8 @@
- {{ $t('pages.index.index.purchaser') }}
+
+ {{ userShop ? '供应商' : '采购商' }}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 84d0dea..13de151 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -25,7 +25,7 @@
{{ $t('pages.index.index.companyProfile') }}
- {{ $t('pages.index.index.aluminiumProduct') }}
+ {{ $t('pages.index.index.aluminiumProduct') }}
随着全球经济的快速发展,我们这家领先的企业公司应运而生,致力于为客户提供卓越的服务和优质的产品。我们公司成立于2001年,总部位于深圳市横岗大厦,拥有广泛的业务领域和专业的团队,专注于实现客户的期望和需求。
diff --git a/pages/index/tradingPlatform.vue b/pages/index/tradingPlatform.vue
index f7eb95c..717ca95 100644
--- a/pages/index/tradingPlatform.vue
+++ b/pages/index/tradingPlatform.vue
@@ -1,304 +1,315 @@
-
+
-
+
-
-
+
+
-
-
-
-
+
+
-
- {{ $t('other.orderList') }}
-
+
+ {{ $t('other.orderList') }}
+
-
-
-
-
+
+
+
+
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/auth/loginAndRegisterAndForgetPassword.vue b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
index 8c66ecb..186b29e 100644
--- a/pages_order/auth/loginAndRegisterAndForgetPassword.vue
+++ b/pages_order/auth/loginAndRegisterAndForgetPassword.vue
@@ -3,8 +3,9 @@
+
-
+
{{titleList[titleIndex]}}
@@ -44,19 +45,19 @@
-
+
{{titleList[titleIndex]}}
-
-
@@ -70,11 +71,11 @@
-
-
@@ -128,10 +129,10 @@
captcha: '',
},
form1: {
- userName: '',
- code: '',
- password1: '',
- password2: '',
+ username: '',
+ captcha: '',
+ password: '',
+ newPassword: '',
},
tips: '获取验证码',
seconds: 60,
@@ -139,44 +140,115 @@
},
methods: {
submit() {
- if (!this.checkboxValue.length) {
+ if (!this.checkboxValue.length && this.titleIndex != 2) {
return uni.showToast({
title: '请先同意隐私协议',
icon: 'none'
})
}
+ if (this.titleIndex == 0) {
+ // 注册
+ this.register()
+ } else if (this.titleIndex == 1) {
+ // 登录
+ this.login()
+ } else {
+ // 忘记密码
+ this.updatePassword()
+ }
+ },
+ // 登录
+ login(){
+
if (this.$utils.verificationAll(this.form, {
username: '请输入账号',
password: '请输入密码',
})) {
return
}
-
+
if (!this.$utils.verificationPhone(this.form.username)) {
return uni.showToast({
title: '请输入合法的手机号',
icon: 'none'
})
}
-
- if (this.titleIndex == 0) {
- // 注册
- this.$api('registerUser', this.form, res => {
- if (res.code == 200) {
- this.titleIndex = 1
- uni.showToast({
- title: '注册成功,请登录!',
- icon: 'none'
- })
- }
+
+ // 登录
+ this.$store.commit('login', this.form)
+ },
+ // 注册
+ register(){
+
+ if (this.$utils.verificationAll(this.form1, {
+ username: '请输入账号',
+ captcha : '请输入验证码',
+ password: '请输入密码',
+ newPassword: '请确认密码',
+ })) {
+ return
+ }
+
+ if (!this.$utils.verificationPhone(this.form1.username)) {
+ return uni.showToast({
+ title: '请输入合法的手机号',
+ icon: 'none'
})
- } else if (this.titleIndex == 1) {
- // 登录
- this.$store.commit('login', this.form)
- } else {
-
}
+
+ if (this.form1.password != this.form1.newPassword) {
+ return uni.showToast({
+ title: '密码与确认密码不一致',
+ icon: 'none'
+ })
+ }
+
+ this.$api('registerUser', this.form1, res => {
+ if (res.code == 200) {
+ this.titleIndex = 1
+ uni.showToast({
+ title: '注册成功,请登录!',
+ icon: 'none'
+ })
+ }
+ })
+ },
+ updatePassword(){
+
+ if (this.$utils.verificationAll(this.form1, {
+ username: '请输入账号',
+ captcha : '请输入验证码',
+ password: '请输入新密码',
+ newPassword: '请确认密码',
+ })) {
+ return
+ }
+
+ if (!this.$utils.verificationPhone(this.form1.username)) {
+ return uni.showToast({
+ title: '请输入合法的手机号',
+ icon: 'none'
+ })
+ }
+
+ if (this.form1.password != this.form1.newPassword) {
+ return uni.showToast({
+ title: '密码与确认密码不一致',
+ icon: 'none'
+ })
+ }
+
+ this.$api('newPassword', this.form1, res => {
+ this.form1 = {}
+ if (res.code == 200) {
+ this.titleIndex = 1
+ uni.showToast({
+ title: '修改成功,请登录!',
+ icon: 'none'
+ })
+ }
+ })
},
// 切换页面
changePage(index) {
@@ -203,7 +275,7 @@
title: '正在获取验证码'
})
this.$api('sendSms', {
- username: this.form1.userName,
+ username: this.form1.username,
}, res => {
if (res.code == 200) {
uni.hideLoading();
diff --git a/pages_order/center/systemSet.vue b/pages_order/center/systemSet.vue
index 9cd3202..c71a5a9 100644
--- a/pages_order/center/systemSet.vue
+++ b/pages_order/center/systemSet.vue
@@ -52,56 +52,62 @@
title: `${this.$t('pageTitle.accountSetting')}`,
itemList: [
// text: `${this.$t('pageTitle.switchAccount')}`
- {
- leftIcon: "../../static/image/center/1.svg",
- text: `${this.$t('pageTitle.switchAccount')}`,
- rightIcon: ">"
- },
- {
- leftIcon: "../../static/image/center/2.svg",
- text: `${this.$t('pageTitle.changePassword')}`,
- rightIcon: ">"
- },
+ // {
+ // leftIcon: "../../static/image/center/1.svg",
+ // text: `${this.$t('pageTitle.switchAccount')}`,
+ // rightIcon: ">"
+ // },
+ // {
+ // leftIcon: "../../static/image/center/2.svg",
+ // text: `${this.$t('pageTitle.changePassword')}`,
+ // rightIcon: ">"
+ // },
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.logout'),
rightIcon: ">",
type : 'logout',
},
- {
- leftIcon: "../../static/image/center/4.svg",
- text: this.$t('pageTitle.addressList'),
- rightIcon: ">",
- toUrl: '/pages_order/center/addressListManage'
- },
]
},
{
title: `${this.$t('pageTitle.systemSetting')}`,
- itemList: [{
- leftIcon: "../../static/image/center/1.svg",
- text: `${this.$t('pageTitle.languageSwitch')}`,
- rightIcon: ">"
- },
+ itemList: [
+ // {
+ // leftIcon: "../../static/image/center/1.svg",
+ // text: `${this.$t('pageTitle.languageSwitch')}`,
+ // rightIcon: ">"
+ // },
{
leftIcon: "../../static/image/center/2.svg",
text: `${this.$t('pageTitle.versionUpdate')}`,
- rightIcon: ">"
+ rightIcon: ">",
+ type : 'versionUpdate'
},
{
leftIcon: "../../static/image/center/3.svg",
text: this.$t('pageTitle.clearCache'),
- rightIcon: ">"
+ rightIcon: ">",
+ type : 'clearCache',
},
]
},
{
title: `${this.$t('pageTitle.identitySetting')}`,
- itemList: [{
- leftIcon: "../../static/image/center/1.svg",
- text: this.$t('pageTitle.switchIdentity'),
- rightIcon: ">"
- }, ]
+ itemList: [
+ {
+ leftIcon: "../../static/image/center/1.svg",
+ text: this.$t('pageTitle.switchIdentity'),
+ rightIcon: ">",
+ toUrl: '/pages_order/auth/selectionIdentity'
+ },
+ {
+ leftIcon: "../../static/image/center/4.svg",
+ text: this.$t('pageTitle.addressList'),
+ rightIcon: ">",
+ toUrl: '/pages_order/center/addressListManage'
+ },
+ ]
}
],
}
@@ -122,6 +128,25 @@
logout(){
this.$store.commit('logout')
},
+ versionUpdate(){
+ uni.showToast({
+ title: '您当前已经是最新版本',
+ icon: 'none'
+ })
+ },
+ clearCache(){
+ uni.showModal({
+ title: '确认要清理缓存吗?',
+ success(res) {
+ if(res.confirm){
+ uni.showToast({
+ title: '缓存清理成功',
+ icon: 'none'
+ })
+ }
+ }
+ })
+ },
},
}
diff --git a/pages_order/components/address/addressList.vue b/pages_order/components/address/addressList.vue
index 9496de9..b6d00a1 100644
--- a/pages_order/components/address/addressList.vue
+++ b/pages_order/components/address/addressList.vue
@@ -1,247 +1,232 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
- {{ item.phone }}
- 默认
-
-
-
- {{ item.address + " " + item.addressDetail }}
-
-
-
-
-
-
-
-
- 默认地址
-
-
-
-
-
- 编辑
-
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{ item.phone }}
+ 默认
+
+
+
+ {{ item.address + " " + item.addressDetail }}
+
+
+
+
+
+
+
+
+ 默认地址
+
+
+
+
+
+ 编辑
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+ .address-item {
+ background: white;
+ border-radius: 20rpx;
+ overflow: hidden;
+ margin-bottom: 20rpx;
+ padding: 15rpx 15rpx 0rpx 15rpx;
+ width: 680rpx;
+
+ .address-item-top {
+ border-bottom: 1px dashed #D3D1D1;
+ display: flex;
+ align-items: center;
+ padding: 0rpx 0rpx 15rpx 0rpx;
+
+ .img-box {
+ width: 120rpx;
+ height: 120rpx;
+
+ image {
+ width: 75%;
+ height: 75%;
+ display: block;
+ margin: 12.5% auto;
+ }
+ }
+
+ .address-info {
+ width: calc(100% - 120rpx);
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ .user-info {
+ display: flex;
+ align-items: center;
+
+ text {
+ display: block;
+ line-height: 40rpx;
+ margin-right: 20rpx;
+ }
+
+ .user-name,
+ .user-phone {
+ font-size: 30rpx;
+ }
+
+ .is-default {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #FEB773;
+ color: white;
+ width: 80rpx;
+ height: 35rpx;
+ border-radius: 20rpx;
+ font-size: 22rpx;
+ }
+ }
+
+ .address-detail {
+ color: #4a4a4a;
+ font-size: 26rpx;
+ overflow: hidden;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ text-overflow: ellipsis;
+ }
+ }
+ }
+
+ .controls {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 26rpx;
+ padding: 15rpx 15rpx 25rpx 15rpx;
+
+ .default-checkbox {
+ display: flex;
+
+ text {
+ margin-left: 8rpx;
+ }
+ }
+
+ .control-title {
+ height: 30rpx;
+ line-height: 30rpx;
+ color: #666666;
+ }
+
+ view {
+ display: flex;
+ align-items: center;
+ }
+
+ image {
+ width: 23rpx;
+ height: 23rpx;
+ vertical-align: middle;
+ margin-right: 8rpx;
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages_order/components/order/orderList.vue b/pages_order/components/order/orderList.vue
index cda3b94..85fca36 100644
--- a/pages_order/components/order/orderList.vue
+++ b/pages_order/components/order/orderList.vue
@@ -35,9 +35,9 @@
-
+
-
+
diff --git a/pages_order/order/offerOrBillLading.vue b/pages_order/order/offerOrBillLading.vue
index b6dae24..536f670 100644
--- a/pages_order/order/offerOrBillLading.vue
+++ b/pages_order/order/offerOrBillLading.vue
@@ -1,554 +1,572 @@
-
+
-
+
-
-
+
+
- {{ $t('other.aluminumProducts') }}
-
-
-
-
-
-
- {{ $t('other.supplierName') }}
- 华南铝业有限公司
-
-
-
-
- {{ $t('components.productSpe') }}
- 铝制品(Al>96%)
-
-
-
-
- {{ $t('components.shippingAddress') }}
-
-
-
- {{ address.name }}
-
-
- {{ address.addressDetail }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('components.deliveryDate') }}
-
-
-
- {{ form.transactionTime }}
-
-
-
- >
-
-
-
-
-
-
-
- {{ $t('other.tentativeQuantity') }}
-
-
-
-
-
-
-
- {{ $t('components.unitPrice') }}
-
-
-
-
-
-
-
+ style="width: 10rpx;height: 40rpx;background-color: #1f1c39;border-radius: 10rpx;overflow: hidden;">
+ {{ $t('other.aluminumProducts') }}
+
+
+
+
+
+
+
+
+
+ {{ $t('components.productSpe') }}
+ 铝制品(Al>96%)
+
+
+
+
+ 提货地点
+
+
+
+ {{ address.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('components.detailedAddress') }}
+
+
+ {{ address.address }}
+
+
+ {{ address.addressDetail }}
+
+
+
+
+
+
+ {{ $t('components.deliveryDate') }}
+
+
+
+ {{ form.transactionTime }}
+
+
+
+ >
+
+
+
+
+
+
+
+ {{ $t('other.tentativeQuantity') }}
+
+
+
+
+
+
+
+ {{ $t('components.unitPrice') }}
+
+
+
+
+
+
+
{{ titleIndex == 0 ? $t('other.submitQuotation') : $t('other.submitReview') }}
-
+
{{ $t('components.contactUs') }}
- {{ $t('components.contactTip') }}
-
+ {{ $t('components.contactTip') }}
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file