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..b6d6f6f 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..1cc602f 100644 --- a/packageReport/xwDetail/xwDetail.vue +++ b/packageReport/xwDetail/xwDetail.vue @@ -14,6 +14,11 @@ + + + + + @@ -21,28 +26,61 @@ import { dateFormatXwDetail } from '../../utills/date.js' + import login from 'pages/my/login/login' export default { + components: { + login + }, data() { return { id: '', detailList: [], + isLoad: true } }, onLoad(option) { this.id = option.id this.getNewsDetail() + if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) { + console.log(uni.getStorageSync('token')) + this.isLoad = false + // uni.navigateTo({ + // url: '../../pages/my/login/login' + // }) + return + } + this.isLoad = true }, methods: { //获取行业新闻详情 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(_ => {}) }, + reOnLoad() { + console.log('----------------true') + if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) { + this.$toast.warn('登录失败请重试') + this.isLoad = false + // uni.navigateTo({ + // url: '../../pages/my/login/login' + // }) + return + } + this.isLoad = true + }, + failToLoad() { + console.log('----------------false') + this.$toast.warn('登录失败请重试') + } } } 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 @@ - + { - console.log('详情页', res.data.data) + console.log('产品详情页', res.data) if (res.data.data.thumb) { this.isThumb = true } - let detail = res.data.data - detail.pub_time = dateFormatDetail(detail.pub_time) - let tag = detail.tags - this.tagsArray = tag.split(',') - detail.tags = this.tagsArray - this.detailList = res.data.data + if (res.data.data) { + let detail = res.data.data + detail.pub_time = dateFormatDetail(detail.pub_time) + let tag = detail.tags + this.tagsArray = tag.split(',') + detail.tags = this.tagsArray + this.detailList = res.data.data + } else { + this.$toast.warn('没有更多详情了') + } }).finally(_ => {}) }, //收藏按钮 starTap() { this.detailList.type = !this.detailList.type - // this.$apiServe.collect(this.id).then(res => { - // console.log('收藏成功', res.data) - - // this.detailList.type = 1 - // }).finally(_ => {}) + this.$apiServe.collect(this.id).then(res => { + console.log('收藏成功', res.data) + if (res.data.code == 1) { + this.detailList.type = 1 + this.$toast.warn('收藏成功') + } else { + this.$toast.warn('收藏失败') + } + }).finally(_ => {}) }, //点赞按钮 heartTap() { this.showHeart = !this.showHeart + }, + reOnLoad() { + console.log('----------------true') + if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) { + this.$toast.warn('登录失败请重试') + this.isLoad = false + // uni.navigateTo({ + // url: '../../pages/my/login/login' + // }) + return + } + this.isLoad = true + }, + failToLoad() { + console.log('----------------false') + this.$toast.warn('登录失败请重试') } } } diff --git a/pages/ideasAndNeeds/ideasAndNeeds.vue b/pages/ideasAndNeeds/ideasAndNeeds.vue index 47a4fe3..b61fd06 100644 --- a/pages/ideasAndNeeds/ideasAndNeeds.vue +++ b/pages/ideasAndNeeds/ideasAndNeeds.vue @@ -105,8 +105,10 @@