diff --git a/App.vue b/App.vue index fd7bdeb..3579f38 100644 --- a/App.vue +++ b/App.vue @@ -2,14 +2,18 @@ import { go2 } from '@/utils/hook.js' import store from '@/store/index.js' export default { - onLaunch: function() { - const token = store.state.qnToken - if (!token) { - go2('login') - } - }, - onShow: function() {}, - onHide: function() {} + onLaunch: function () { + const token = store.state.qnToken + let flag = uni.getStorageSync('hasLaunch') + if (flag && !token) { + go2('login') + } + if (flag && token) { + go2('client') + } + }, + onShow: function () {}, + onHide: function () {} } @@ -18,12 +22,12 @@ export default { @import url('./common/css/reset.scss'); @import '@/static/icon/iconfont.css'; page { - height: 100%; + height: 100%; } /* uni-dialog标题样式 */ .uni-dialog-title-text { - font-size: 32rpx !important; - color: #323233 !important; - font-weight: 500 !important; + font-size: 32rpx !important; + color: #323233 !important; + font-weight: 500 !important; } - + diff --git a/apis/commonApi.js b/apis/commonApi.js index f5e6bd2..66c84f9 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -99,7 +99,10 @@ export function getVerifyUrl(data = {}) { * @param {object} data 参数 mallSupplierId */ export function getGuaranteeContract(data = {}) { - return http.post({ url: '/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=' + data.mallSupplierId, data }) + return http.post({ + url: `/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=${data.mallSupplierId}&customerEnterpriseId=${data.customerEnterpriseId}`, + data + }) } /** diff --git a/pages/account-management/index.vue b/pages/account-management/index.vue index 5b7ccd0..7f3f60e 100644 --- a/pages/account-management/index.vue +++ b/pages/account-management/index.vue @@ -1,206 +1,210 @@ diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue index 89402f9..41813b3 100644 --- a/pages/add-paper/index.vue +++ b/pages/add-paper/index.vue @@ -201,16 +201,16 @@ 纸品图片 - - - - - - - - 上传图片 - - + + + + + + + + 上传图片 + + - - + @@ -456,7 +456,7 @@ export default { // } // this.imgList.push(params) // } - this.imgList = res.imgList + this.imgList = res.imgList console.log('this.imgList', this.imgList) } }) @@ -497,20 +497,20 @@ export default { this.imgList[this.imgList.length - 1].pathUrl = val }) }, - uploadVoucher() { - uploadImage(['album'], 5) - .then((urls) => { - if (urls) { - this.imgList.push(urls[0]) - } - }) - .catch((e) => { - uni.showToast({ - title: '上传失败', - icon: 'fail' - }) - }) - }, + uploadVoucher() { + uploadImage(['album'], 5) + .then((urls) => { + if (urls) { + this.imgList = urls + } + }) + .catch((e) => { + uni.showToast({ + title: '上传失败', + icon: 'fail' + }) + }) + }, // 删除图片 deleteImage(item) { console.log('deleteImage', item) @@ -521,9 +521,9 @@ export default { } console.log(this.imgList) }, - deleteVoucher(index) { - this.imgList.splice(index, 1) - }, + deleteVoucher(index) { + this.imgList.splice(index, 1) + }, uploadPrice() { if (this.skuList.length === 0) { uni.showToast({ diff --git a/pages/client-credit-list/index.vue b/pages/client-credit-list/index.vue index a874c7d..8e0d96e 100644 --- a/pages/client-credit-list/index.vue +++ b/pages/client-credit-list/index.vue @@ -79,7 +79,7 @@ export default { getFsCreditList({ mallSupplierId: this.$store.state.supplierInfo.supplierId, ...this.pagination }) .then((res) => { if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/client-credit/index.vue b/pages/client-credit/index.vue index 2730b27..5b5b6f4 100644 --- a/pages/client-credit/index.vue +++ b/pages/client-credit/index.vue @@ -194,6 +194,7 @@ export default { getCreditList(data) { getCustomerCreditInfo(data).then((res) => { if (res) { + this.hasCreditList = [] res.hasCredit && this.hasCreditList.push('month') res.hasFeisuanCredit && this.hasCreditList.push('fs') this.isFinishedContract = res.isFinishedContract diff --git a/pages/client-detail/base-paper-deals.vue b/pages/client-detail/base-paper-deals.vue index 2ee4cca..91b2c5e 100644 --- a/pages/client-detail/base-paper-deals.vue +++ b/pages/client-detail/base-paper-deals.vue @@ -19,7 +19,11 @@ - + {{ subItem.productName }} @@ -75,7 +79,7 @@ export default { params: { asc: '', desc: '', - customerEnterpriseId: this.id, + customerEnterpriseId: this.id, mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // 供应商id // customerEnterpriseId: '651107734133018624', // 客户企业ID // mallSupplierId: '670334117090562048', // 供应商id @@ -115,7 +119,7 @@ export default { .then((res) => { // console.log('原纸交易', res) if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/client-detail/equipment-information.vue b/pages/client-detail/equipment-information.vue index c0b8d8e..d8555dd 100644 --- a/pages/client-detail/equipment-information.vue +++ b/pages/client-detail/equipment-information.vue @@ -184,7 +184,7 @@ export default { el.collapse = false el.isShowSelect = false }) - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/client-list/index.vue b/pages/client-list/index.vue index ead1686..9e8aa37 100644 --- a/pages/client-list/index.vue +++ b/pages/client-list/index.vue @@ -98,7 +98,7 @@ export default { getCompanyList({ ...this.params, ...this.pagination }) .then((res) => { if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/contract-manage/index.vue b/pages/contract-manage/index.vue index 1e4115f..bd4e016 100644 --- a/pages/contract-manage/index.vue +++ b/pages/contract-manage/index.vue @@ -1,6 +1,6 @@