From aad2bca5c681bea009785a21bcfd00a9cd3631a2 Mon Sep 17 00:00:00 2001 From: Gdpao <1341331954@qq.com> Date: Tue, 11 Aug 2020 10:00:06 +0800 Subject: [PATCH] gdpao --- common/http.interceptor.js | 2 +- components/index/video-item/index.vue | 2 +- components/logininput/identifying.vue | 4 +++ components/remaining/remaining.vue | 2 +- pageA/register/register.vue | 7 ---- pageA/start/start.nvue | 30 ++++++++++++++++++ pageB/photo/index.vue | 11 +++++-- pageB/sdetails/index.vue | 12 +++++-- pageB/video/video.nvue | 44 +++++++++++++++++++++++--- pages.json | 6 ++++ pages/index/index.vue | 13 ++++++-- pages/mine/index.vue | 39 ++++++++++++++--------- static/image/mine/38.png | Bin 0 -> 2863 bytes 13 files changed, 137 insertions(+), 35 deletions(-) create mode 100644 pageA/start/start.nvue create mode 100644 static/image/mine/38.png diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 6ca6879..f1a4095 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -46,7 +46,7 @@ const install = (Vue, vm) => { } else if(res.data.errCode == 401) { // 假设201为token失效,这里跳转登录 // vm.$u.toast('您还没有登录哦,请先去登录!'); - if (res.data.action != "memberinfo") { + if (res.data.data.action != "memberinfo") { uni.showModal({ title: "温馨提示", content: "您还未登录,请立即登录", diff --git a/components/index/video-item/index.vue b/components/index/video-item/index.vue index a51ec25..a9cfe18 100644 --- a/components/index/video-item/index.vue +++ b/components/index/video-item/index.vue @@ -241,7 +241,7 @@ export default { // console.log(res) if(res.errCode == 0) { this.$u.toast(res.message); - this.$emit("getArticlelist"); + this.$emit("updateList"); } }) }, diff --git a/components/logininput/identifying.vue b/components/logininput/identifying.vue index fd9db9c..d86d325 100644 --- a/components/logininput/identifying.vue +++ b/components/logininput/identifying.vue @@ -68,6 +68,10 @@ this.$refs.uToast.show({ title: res.message, }) + uni.showToast({ + title: res.message, + icon: "none" + }) setTimeout(() => { uni.hideLoading(); // 这里此提示会被this.start()方法中的提示覆盖 diff --git a/components/remaining/remaining.vue b/components/remaining/remaining.vue index c0dd56b..96664c5 100644 --- a/components/remaining/remaining.vue +++ b/components/remaining/remaining.vue @@ -205,7 +205,7 @@ z-index: 1000; position: absolute; bottom: 100rpx; - right: 30%; + right: 230rpx; width: 300rpx; height: 80rpx; line-height: 80rpx; diff --git a/pageA/register/register.vue b/pageA/register/register.vue index 2b567ab..d77a45b 100644 --- a/pageA/register/register.vue +++ b/pageA/register/register.vue @@ -152,16 +152,9 @@ // type: 'success', // url: '/pageA/topick/topick' // }) - } else if(res.errCode == 2){ - this.$refs.uToast.show({ - title: res.message, - type: 'primary', - url: '/pageA/login/login' - }) } else { this.$refs.uToast.show({ title: res.message, - type: 'primary' }) } }) diff --git a/pageA/start/start.nvue b/pageA/start/start.nvue new file mode 100644 index 0000000..4e01977 --- /dev/null +++ b/pageA/start/start.nvue @@ -0,0 +1,30 @@ + + + + + diff --git a/pageB/photo/index.vue b/pageB/photo/index.vue index 0980a0c..13a2d12 100644 --- a/pageB/photo/index.vue +++ b/pageB/photo/index.vue @@ -27,7 +27,7 @@ 评论 - + @@ -180,13 +180,16 @@ z-index: 1000; position: fixed; top: 0; + display: flex; + align-items: center; + justify-content: space-between; width: 100%; height: 88rpx; padding: 0 20rpx; line-height: 88rpx; background-color: #ECECEC; & > text { - margin-right: 280rpx; + // margin-right: 280rpx; color: #333; font-size: 30rpx; font-weight: 500; @@ -514,6 +517,10 @@ export default { }, // 发布评论 sendComment() { + if (this.send_value.length == 0) { + this.$u.toast("内容不能为空!"); + return; + } this.$u.post("article/articleAddComment",{ article_id: this.article_id, content: this.send_value, diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue index dc7905f..3637dab 100644 --- a/pageB/sdetails/index.vue +++ b/pageB/sdetails/index.vue @@ -127,13 +127,13 @@ {{goodsInfo.goods_name}} - ¥{{goodsInfo.goods_price}} + ¥{{ goodsInfo.goods_promotion_type == 1 ? goodsInfo.goods_promotion_price : goodsInfo.goods_price }} 购买数量 - + @@ -471,6 +471,12 @@ export default { }) return false; } + if (num == 0) { + this.$refs.uToast.show({ + title: '数量不能为0' + }) + return false; + } } if(!this.debounce) return; this.debounce = false; @@ -501,7 +507,9 @@ export default { url: '/pageC/cart/ConfirmOrder' }) } else { + // console.log(res.message); this.debounce = true; + this.$u.toast(res.message); } }) }, diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue index 1da0d21..26c17c8 100644 --- a/pageB/video/video.nvue +++ b/pageB/video/video.nvue @@ -8,7 +8,7 @@ - + 视频 @@ -68,6 +68,7 @@