From 5aaae02adfcf6d57b37acd25cb72b7808297ecbb Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 22 七月 2024 17:47:50 +0800
Subject: [PATCH] 1
---
pages/login/supplier-login.vue | 69 +++++++++++++++++++---------------
environments/index.js | 4 +-
sub_pages/supplier/flower-manage/flower-add.vue | 15 ++++---
3 files changed, 50 insertions(+), 38 deletions(-)
diff --git a/environments/index.js b/environments/index.js
index 4d26ee2..def5df2 100644
--- a/environments/index.js
+++ b/environments/index.js
@@ -1,7 +1,7 @@
export default {
- // httpBaseUri: 'https://www.hmyxianhua.com/flower',
- httpBaseUri: 'http://47.99.58.211/flower',
+ httpBaseUri: 'https://www.hmyxianhua.com/flower',
+ // httpBaseUri: 'http://47.99.58.211/flower',
clientId: '',
secret: '',
diff --git a/pages/login/supplier-login.vue b/pages/login/supplier-login.vue
index bd047ac..f0782e5 100644
--- a/pages/login/supplier-login.vue
+++ b/pages/login/supplier-login.vue
@@ -66,25 +66,24 @@
// import gzmzApi from '@/api/gzmzApi.js'
// import myCache from '@/utils/myCache.js'
export default {
- props: {
- // apitype: 'loginSupplier',
- apitype: {
- type: String,
- default () {
- // #ifdef PUB_SUPPLIER
- return 'loginSupplier'
- // #endif
- // #ifdef PUB_PARTNER
- return 'loginPartner'
- // #endif
- // #ifdef PUB_CUSTOMER
- return 'loginCustomer'
- // #endif
- return ''
- // return 'loginPartner'
- }
- },
- },
+ // props: {
+ // // apitype: 'loginSupplier',
+ // apitype: {
+ // type: String,
+ // default () {
+ // // #ifdef PUB_SUPPLIER
+ // return 'loginSupplier'
+ // // #endif
+ // // #ifdef PUB_PARTNER
+ // return 'loginPartner'
+ // // #endif
+ // // #ifdef PUB_CUSTOMER
+ // return 'loginCustomer'
+ // // #endif
+ // // return 'loginPartner'
+ // }
+ // },
+ // },
data() {
return {
openId: '-1',
@@ -102,7 +101,17 @@
getCodeText: '获取验证码',
getCodeBtnColor: "#20613D",
getCodeisWaiting: false,
- Timer: undefined
+ Timer: undefined,
+ // #ifdef PUB_SUPPLIER
+ apitype: 'loginSupplier',
+ // #endif
+ // #ifdef PUB_PARTNER
+ apitype: 'loginPartner',
+ // #endif
+ // #ifdef PUB_CUSTOMER
+ apitype: 'loginCustomer',
+ // #endif
+ // return 'loginPartner'
};
},
methods: {
@@ -126,7 +135,7 @@
} = await this.$http.request('post', '/api/sms/send/code', {
data: {
tel: this.phoneNumber,
- userType: this.apitype.replace("login", "").toLowerCase() || 'supplier'
+ userType: this.apitype.replace("login", "").toLowerCase()
}
})
if (code == 0) {
@@ -174,17 +183,17 @@
// })
var addstr = ''
// #ifdef PUB_PARTNER
- addstr = '?source=step'
- uni.navigateTo({
- url: '/sub_pages/partner/partner-info/partner-info' + addstr
+ addstr = '?source=step'
+ uni.navigateTo({
+ url: '/sub_pages/partner/partner-info/partner-info' + addstr
})
- // #endif
- // #ifdef PUB_SUPPLIER
- uni.redirectTo({
- url: '/pages/login/supplier-reg'
- })
// #endif
-
+ // #ifdef PUB_SUPPLIER
+ uni.redirectTo({
+ url: '/pages/login/supplier-reg'
+ })
+ // #endif
+
},
changeAll(e) {
diff --git a/sub_pages/supplier/flower-manage/flower-add.vue b/sub_pages/supplier/flower-manage/flower-add.vue
index 896afcc..b11bc26 100644
--- a/sub_pages/supplier/flower-manage/flower-add.vue
+++ b/sub_pages/supplier/flower-manage/flower-add.vue
@@ -172,8 +172,7 @@
</view>
</view>
<view style="min-width: 500rpx;margin-left: 20rpx;margin-right: 20rpx;margin-top: 20rpx;">
- <u--textarea v-model="dto.description" autoHeight
- placeholder="请输入商品描述"></u--textarea>
+ <u--textarea v-model="dto.description" autoHeight placeholder="请输入商品描述"></u--textarea>
</view>
@@ -539,16 +538,20 @@
return
}
var tmp = parseFloat(this.dto.price)
- if (isNaN(tmp) || ('' + tmp) !== ('' + this.dto.price)) {
- this.$message.showToast('商品价格格式错误,精确到分')
+ if (isNaN(tmp) || parseFloat('' + tmp).toFixed(3) !== parseFloat('' + this.dto.price).toFixed(3)) {
+ this.$message.showToast('商品价格格式错误,精确到分')
+ console.log('a1', ('' + tmp) )
+ console.log('a1', ('' + this.dto.price))
return
}
- if ((tmp.toFixed(2) + '' + '0') !== tmp.toFixed(3)) {
+ if ((tmp.toFixed(2) + '' + '0') !== ('' + tmp.toFixed(3))) {
this.$message.showToast('商品价格至多精确到分')
+ console.log('a1', (tmp.toFixed(2) + '' + '0'))
+ console.log('a1', tmp.toFixed(3))
// console.log('tmp.toFixed(2)',tmp.toFixed(2),tmp.toFixed(3))
return
} else {
- this.dto.price = this.dto.price.toFixed(2)
+ this.dto.price = tmp.toFixed(2)
}
if (this.dto.price <= 0) {
this.$message.showToast('商品价格不能小于等于0')
--
Gitblit v1.9.3