From c906a7d33af959a2d3031a591d73a955a7dea95d Mon Sep 17 00:00:00 2001 From: clay <209192278@qq.com> Date: Mon, 9 Jan 2023 18:03:51 +0800 Subject: [PATCH] =?UTF-8?q?dengjie=20commit=20:=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/myAvatar/myAvatar.vue | 12 +- components/myForm/myForm.vue | 7 +- components/productsBtn/productsBtn.vue | 18 ++- packageMy/bindCompany/bindCompany.vue | 34 ++++-- packageMy/browseHistory/browseHistory.vue | 3 + packageMy/memberCenter/memberCenter.vue | 42 +++---- packageMy/myCollection/myCollection.vue | 5 +- packageMy/myRelease/myRelease.vue | 107 +++++++----------- packageReport/certifiedCj/certifiedCj.vue | 2 +- .../certifiedCjDetail/certifiedCjDetail.vue | 14 ++- packageReport/xwDetail/xwDetail.vue | 11 +- .../goods-category-search/category-index.vue | 13 ++- .../detail/productsDetail/productsDetail.vue | 19 ++-- pages/index/index.vue | 47 +------- pages/my/my.vue | 8 +- service/request.js | 29 +++++ 16 files changed, 198 insertions(+), 173 deletions(-) diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue index cd99e74..7b1d286 100644 --- a/components/myAvatar/myAvatar.vue +++ b/components/myAvatar/myAvatar.vue @@ -10,7 +10,7 @@ - {{nickname}} + {{nickname}} @@ -32,7 +32,7 @@ member: false, showEdit: true, avatar: '', - nickname: '', + nickname: '用户', normal: '/static/my/wo_icon_pthy.png', VIP: '/static/my/wo_icon_vip.png', }; @@ -43,6 +43,9 @@ } this.getUser() }, + options: { + styleIsolation: 'shared', // 解除样式隔离 + }, methods: { //修改头像 changeAvatar() { @@ -63,3 +66,8 @@ } } + diff --git a/components/myForm/myForm.vue b/components/myForm/myForm.vue index feb7b95..9525f90 100644 --- a/components/myForm/myForm.vue +++ b/components/myForm/myForm.vue @@ -21,11 +21,14 @@ return { model: { userInfo: { - name: '姓名', - phone: '2342233', + name: '', + phone: '', }, }, }; + }, + created() { + } } diff --git a/components/productsBtn/productsBtn.vue b/components/productsBtn/productsBtn.vue index 4999c8e..7c27b6b 100644 --- a/components/productsBtn/productsBtn.vue +++ b/components/productsBtn/productsBtn.vue @@ -30,11 +30,11 @@ - + - + @@ -96,17 +96,13 @@ }, confirm() { this.showM = false - console.log('删除成功'); - // this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => { - // console.log('删除历史记录或收藏', res); - // this.getHistoryOrCollection() - // }).finally(_ => {}) + this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => { + // console.log('删除历史记录或收藏', res.data); + this.productList.splice(this.productId, 1) + }).finally(_ => {}) }, cancel() { this.showM = false - }, - close() { - this.showM = false } } } diff --git a/packageMy/bindCompany/bindCompany.vue b/packageMy/bindCompany/bindCompany.vue index b004335..9020cf3 100644 --- a/packageMy/bindCompany/bindCompany.vue +++ b/packageMy/bindCompany/bindCompany.vue @@ -2,6 +2,9 @@ + + + @@ -11,23 +14,36 @@ return { name: '', phone: '', + showM: false, + content: `您的申请已提交
+ 请静待人工审核`, } }, - onLoad() { - this.name = this.$refs.nameAndphone.model.userInfo.name - this.phone = this.$refs.nameAndphone.model.userInfo.phone - }, methods: { handleSureClick() { + let name = this.$refs.nameAndphone.model.userInfo.name + let phone = this.$refs.nameAndphone.model.userInfo.phone this.$apiServe.bindComponyAndUpdate({ uid: 1, type: 1, - companyPhone: this.phone, - companyName: this.name + companyName: name, + companyPhone: phone }).then(res => { - // console.log('绑定公司', res); + // console.log('绑定公司', res.data); + if (res.data.code == 20003) { + this.showM = true + } else if (res.data.code == 20005) { + this.$toast.warn('请完善数据') + } }).finally(_ => {}) + }, + confirm() { + this.showM = false + // uni.switchTab({ + // url: '/pages/my/my' + // }) } + } } @@ -40,4 +56,8 @@ border-radius: 20rpx !important; margin-top: 168rpx; } + + .u-modal__button-group__wrapper--hover { + background: #0EBB5B !important; + } diff --git a/packageMy/browseHistory/browseHistory.vue b/packageMy/browseHistory/browseHistory.vue index 07e859c..b188c8e 100644 --- a/packageMy/browseHistory/browseHistory.vue +++ b/packageMy/browseHistory/browseHistory.vue @@ -10,6 +10,9 @@ return { type: '' } + }, + methods: { + } } diff --git a/packageMy/memberCenter/memberCenter.vue b/packageMy/memberCenter/memberCenter.vue index 1e77072..a741166 100644 --- a/packageMy/memberCenter/memberCenter.vue +++ b/packageMy/memberCenter/memberCenter.vue @@ -9,8 +9,8 @@ {{commitment}} - - + +
@@ -30,32 +30,32 @@ commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置' } }, - onLoad() { - this.name = this.$refs.nameAndphone.model.userInfo.name - this.phone = this.$refs.nameAndphone.model.userInfo.phone - }, methods: { // 联系客服模态框 - showModal() { - this.showM = true - }, - confirm() { - this.showM = false + handleSureClick() { + let name = this.$refs.nameAndphone.model.userInfo.name + let phone = this.$refs.nameAndphone.model.userInfo.phone this.$apiServe.bindComponyAndUpdate({ uid: 1, type: 2, - companyPhone: this.phone, - companyName: this.name + companyName: name, + companyPhone: phone }).then(res => { - console.log('升级VIP', res); + console.log('升级VIP', res.data); + if (res.data.code == 20003) { + this.showM = true + } else if (res.data.code == 20005) { + this.$toast.warn('请完善数据') + } + }).finally(_ => {}) }, - cancel() { + confirm() { this.showM = false - }, - close() { - this.showM = false - }, + // uni.switchTab({ + // url: '/pages/my/my' + // }) + } } } @@ -81,4 +81,8 @@ padding: 43rpx 104rpx !important; text-indent: 14rpx; } + + .u-modal__button-group__wrapper--hover { + background: #0EBB5B !important; + } diff --git a/packageMy/myCollection/myCollection.vue b/packageMy/myCollection/myCollection.vue index 96dc571..86f3216 100644 --- a/packageMy/myCollection/myCollection.vue +++ b/packageMy/myCollection/myCollection.vue @@ -8,8 +8,9 @@ export default { data() { return { - type: '', + type: '' } - } + }, + methods: {} } diff --git a/packageMy/myRelease/myRelease.vue b/packageMy/myRelease/myRelease.vue index 621ece6..c64cb13 100644 --- a/packageMy/myRelease/myRelease.vue +++ b/packageMy/myRelease/myRelease.vue @@ -4,20 +4,21 @@ - + - {{item.needsText}} + {{item.desc}} + {{item.pname}} - {{item.time}} + {{item.pub_time}} - + 修改 - + 删除 @@ -25,64 +26,43 @@ - + - - - {{item.needsText}} - - - {{item.time}} - - - - - 修改 - - - - 删除 - - - - - diff --git a/packageReport/xwDetail/xwDetail.vue b/packageReport/xwDetail/xwDetail.vue index 4aa64e6..1c3b27d 100644 --- a/packageReport/xwDetail/xwDetail.vue +++ b/packageReport/xwDetail/xwDetail.vue @@ -37,10 +37,13 @@ getNewsDetail() { this.$apiServe.getNewsDetail(this.id).then(res => { // console.log('新闻详情页', res.data.data) - let detail = res.data.data - detail.pub_time = dateFormatXwDetail(detail.pub_time) - this.detailList = res.data.data - + if (res.data.data) { + let detail = res.data.data + detail.pub_time = dateFormatXwDetail(detail.pub_time) + this.detailList = res.data.data + } else { + this.$toast.warn('没有更多详情了') + } }).finally(_ => {}) }, } diff --git a/packageSearch/goods-category-search/category-index.vue b/packageSearch/goods-category-search/category-index.vue index 81b008f..3dff9e3 100644 --- a/packageSearch/goods-category-search/category-index.vue +++ b/packageSearch/goods-category-search/category-index.vue @@ -64,7 +64,7 @@ - + {}) }, //收藏按钮 diff --git a/pages/index/index.vue b/pages/index/index.vue index 99dd9fc..531fe7b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -13,7 +13,8 @@ - + @@ -26,11 +27,6 @@ - - { - var data = res.data.data - // console.log('登录code换取的信息', data); - uni.setStorageSync('token', data.token); - }) - }, - fail: function(err) { - // 登录授权失败 - // err.code是错误码 - } - }) - }, - //获取手机code - getphonenumber(e) { - let that = this - // const { - // code - // } = e.detail; - // console.log("手机code : ", code); - }, - //获取子组件的getProducts方法返回数据的length,用于当length为0时取消发送请求 - // getChild(e) { - // this.reachBottomLength = e - // }, //获取一级分类 getCategories() { this.$apiServe.getCategories().then(res => { @@ -178,6 +136,7 @@ url: '../../packageSearch/goods-category-search/category-index?categoryId=' + id }) }, + //获取图片url getImgUrl() { this.$apiServe.getImgUrl().then(res => { try { diff --git a/pages/my/my.vue b/pages/my/my.vue index 345513f..25bd27b 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -22,10 +22,10 @@ @click="showModal()"> - - {{phone}} + {{phone}} 是否拨打客服电话 @@ -101,6 +101,10 @@