修改bug

This commit is contained in:
邓洁
2023-02-27 11:13:46 +08:00
parent e6ac333189
commit 08d66a18d2
3 changed files with 25 additions and 15 deletions

View File

@@ -74,6 +74,7 @@
getHistoryOrCollection() { getHistoryOrCollection() {
this.$apiServe.getHistoryOrCollection(this.type).then(res => { this.$apiServe.getHistoryOrCollection(this.type).then(res => {
let data = res.data.data let data = res.data.data
console.log('浏览记录或收藏', res.data);
if (data) { if (data) {
for (const item of data) { for (const item of data) {
let tag = item.tags let tag = item.tags

2
package-lock.json generated
View File

@@ -4,7 +4,7 @@
"dependencies": { "dependencies": {
"uview-ui": { "uview-ui": {
"version": "2.0.35", "version": "2.0.35",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.35.tgz", "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz",
"integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g==" "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g=="
} }
} }

View File

@@ -55,24 +55,33 @@
if (this.btnDisabled == false) { if (this.btnDisabled == false) {
let name = this.$refs.nameAndphone.model.userInfo.name let name = this.$refs.nameAndphone.model.userInfo.name
let phone = this.$refs.nameAndphone.model.userInfo.phone let phone = this.$refs.nameAndphone.model.userInfo.phone
console.log('name', name);
console.log('phone', phone);
if (!/^1[3456789]\d{9}$/.test(phone)) { if (!/^1[3456789]\d{9}$/.test(phone)) {
this.$toast.warn('请输入正确的手机号') this.$toast.warn('请输入正确的手机号')
return false return false
} }
this.$apiServe.bindComponyAndUpdate({ if (name == '') {
uid: 1, this.$toast.warn('请完善数据')
type: 2, return false
companyName: name, }
companyPhone: phone if (name && phone) {
}).then(res => { console.log('数据已完善');
console.log('升级VIP', res.data); this.$apiServe.bindComponyAndUpdate({
if (res.data.code == 20003) { uid: 1,
this.showM = true type: 2,
} else if (res.data.code == 20005) { companyName: name,
this.$toast.warn('请完善数据') companyPhone: phone
} }).then(res => {
}).finally(_ => {}) console.log('升级VIP', res.data);
if (res.data.code == 20003) {
this.showM = true
} else if (res.data.code == 20005) {
this.$toast.warn('请完善数据')
}
}).finally(_ => {})
}
} }
}, },
confirm() { confirm() {