diff --git a/common/api/user.js b/common/api/user.js index 4727a9f..67e592c 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -392,6 +392,10 @@ export default { sendCommentList() { return vm.$u.post('member/sendCommentList'); }, + // 发现收藏列表 + articleCollectList() { + return vm.$u.post('article/articleCollectList'); + }, } } } \ No newline at end of file diff --git a/common/store/index.js b/common/store/index.js index 00e32cf..10370d5 100644 --- a/common/store/index.js +++ b/common/store/index.js @@ -47,6 +47,9 @@ const store = new Vuex.Store({ uni.removeStorage({ key: "token" }) + uni.removeStorage({ + key: "user_info" + }) }, setOrderType(state, type) { state.orderType = type; diff --git a/components/index/video-item/index.vue b/components/index/video-item/index.vue index 38f3850..d5d4332 100644 --- a/components/index/video-item/index.vue +++ b/components/index/video-item/index.vue @@ -233,7 +233,6 @@ export default { uni.navigateTo({ url: '/pageB/photo/index?id=' + id }); - }, }, } diff --git a/components/mine/address-active/index.vue b/components/mine/address-active/index.vue index c83b578..8f08166 100644 --- a/components/mine/address-active/index.vue +++ b/components/mine/address-active/index.vue @@ -49,6 +49,7 @@ export default { area: '', // 详细地址 area_id: '', // 地区id 省 city_id: '', // 城市id + debounce: true, } }, props: { @@ -78,18 +79,20 @@ export default { }, // 判断是不是编辑页面 调用接口 confirmBtn() { + if(!this.debounce) return; + this.debounce = false; this.info ? this.editAddress() : this.addAddress(); }, - chooseArea() { - uni.chooseLocation({ - success: function (res) { - console.log('位置名称:' + res.name); - console.log('详细地址:' + res.address); - console.log('纬度:' + res.latitude); - console.log('经度:' + res.longitude); - } - }); - }, + // chooseArea() { + // uni.chooseLocation({ + // success: function (res) { + // console.log('位置名称:' + res.name); + // console.log('详细地址:' + res.address); + // console.log('纬度:' + res.latitude); + // console.log('经度:' + res.longitude); + // } + // }); + // }, // 验证 validateValue() { if(this.$u.test.isEmpty(this.name)) { @@ -134,6 +137,7 @@ export default { back: true, }) } else { + this.debounce = true; this.showToast(res.message, 'warning'); } }) @@ -153,20 +157,13 @@ export default { // latitude, }).then((res)=>{ if (res.errCode == 0) { - uni.redirectTo({ - url: '/pageE/more/Address' - }); - // this.$refs.uToast.show({ - // title: res.message, - // type: 'success', - // // url: '/pageE/more/Address', - // callback() { - // uni.redirectTo({ - // url: '/pageE/more/Address' - // }); - // } - // }) + this.$refs.uToast.show({ + title: res.message, + type: 'success', + back: true, + }) } else { + this.debounce = true; this.showToast(res.message, 'warning'); } }) diff --git a/pageA/login/login.vue b/pageA/login/login.vue index fb825f0..15be180 100644 --- a/pageA/login/login.vue +++ b/pageA/login/login.vue @@ -182,10 +182,7 @@ console.log(123) me.loginIn(res.data.token); //存储一个字符传值 // 缓存用户的信息 - uni.setStorageSync({ - key: 'user_info', - data: res.data - }); + uni.setStorageSync('user_info',res.data); if (res.data.member.has_labels) { uni.switchTab({ @@ -196,7 +193,6 @@ url: '/pageA/topick/topick' }) } - } // 存储接口请求所需token diff --git a/pageB/components/userinfo/index.vue b/pageB/components/userinfo/index.vue index 3e64d8f..06642e7 100644 --- a/pageB/components/userinfo/index.vue +++ b/pageB/components/userinfo/index.vue @@ -98,7 +98,7 @@ export default { this.is_cart = newValue; }, comment(newValue,old) { - console.log(newValue,old); + // console.log(newValue,old); this.is_content = newValue; }, deep: true diff --git a/pageB/photo/index.vue b/pageB/photo/index.vue index 79d6618..ec0add7 100644 --- a/pageB/photo/index.vue +++ b/pageB/photo/index.vue @@ -22,21 +22,41 @@ - + 评论 - + - + + + + + {{ item.member_nickname }} + {{ item.create_time }} + + 回复 + + + {{ item.content }} + + + 111 - - + + 发送 + + + + + 发送 + + @@ -95,6 +115,7 @@ .item{ display: flex; align-items: center; + width: 50%; padding: 8rpx 16rpx; font-size: 24rpx; color: #fff; @@ -147,6 +168,7 @@ } .pl { .top { + z-index: 1000; position: fixed; top: 0; width: 100%; @@ -162,8 +184,45 @@ } } .scroll-box { - margin: 88rpx 0 100rpx 0; + z-index: 99; + margin: 88rpx 0 150rpx 0; height: 100%; + .box { + display: flex; + align-items: center; + justify-content: space-between; + padding: 20rpx; + & > image { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + margin-right: 10rpx; + } + .info { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + height: 60rpx; + font-size: 26rpx; + color: #333; + .time { + font-size: 22rpx; + color: #999; + } + } + .reply { + font-size: 26rpx; + color: #333; + } + } + .content { + padding: 0 20rpx 10rpx 90rpx; + border-bottom: 1px solid #ececec; + } + } + .no-data { + margin-top: 100rpx; } .editing { position: fixed; @@ -172,18 +231,30 @@ align-items: center; justify-content: space-between; width: 100%; - height: 90rpx; + height: 88rpx; padding: 0 30rpx; - background-color: #ECECEC; + border-top: 1px solid #ececec; + background-color: #fff; & > input { width: 80%; - height: 60rpx; + height: 50rpx; padding: 0 20rpx; - border-radius: 30rpx; + border-radius: 20rpx; background-color: #fff; } } } + // 弹出输入框 + .edit-box { + display: flex; + align-items: center; + height: 90rpx; + & > input { + width: 80%; + padding: 4rpx 20rpx; + border-radius: 20rpx; + } + } .cart { .top{ z-index: 1000; @@ -293,15 +364,20 @@ export default { return { list:{}, swiper_id: "", - cart_type: false, - is_comment: false, + cart_type: false, // 显示购物车 + is_comment: false, // 显示评论 + is_focus: false, // 聚焦 + is_edit: false, // 输入框 + send_value: "", // 输入的值 cartList: [], cart_len: 0, + edit_text: "有爱评论,说点好听的 ~", + commentList: [], // 评论 } }, - onLoad(o){ - this.id = o.id; - this.articleInfo(this.id); + onLoad(option){ + this.article_id = option.id; + this.articleInfo(this.article_id); }, methods:{ // 发现详情 @@ -317,17 +393,47 @@ export default { this.swiper_id = e.detail.current; // 储存swiper id }, // 更改购物车状态 - openCart(data) { - console.log(data); - this.cart_type = data.cart; - this.is_comment = data.comment; - }, - hideCart(data) { + openPopup(data) { // console.log(data); this.cart_type = data.cart; + this.is_comment = data.comment; + if (this.is_comment) { + this.getComment(this.article_id,0); + } }, - close() { - this.is_comment = false; + // 获取评论 + getComment(id,page) { + this.$u.post("article/articleCommentList",{ + article_id: id, + page: page, + }).then(res => { + console.log(res); + if (res.errCode == 0) { + this.commentList = res.data; + } + }) + }, + // 打开评论输入 + openKeyInput(data) { + console.log(data); + this.is_edit = true; + this.is_focus = true; + }, + // 发布评论 + sendComment(data) { + this.$u.post("article/articleAddComment",{ + article_id: this.article_id, + content: this.send_value, + pid: data.id, + reply_id: data.member_id, + }).then(res => { + console.log(res); + if (res.errCode == 0) { + this.is_edit = false; + } else { + this.$u.toast(res.message); + } + }) }, // 预览图片 viewImage(e) { @@ -351,6 +457,11 @@ export default { uni.navigateBack({ delta: 1 }) + }, + focus() { + setTimeout(function(){ + uni.showSoftKeybord; + }, 200) } }, } diff --git a/pageB/triedDress/index.vue b/pageB/triedDress/index.vue index ec82949..c03bec1 100644 --- a/pageB/triedDress/index.vue +++ b/pageB/triedDress/index.vue @@ -12,10 +12,10 @@ - + @@ -78,6 +78,7 @@ export default { minute: true, second: false }, + debounce: true, } }, mounted() { @@ -127,7 +128,9 @@ export default { this.time = time; }, confirmBtn() { + if(!this.debounce) return; if(!this.verification()) return false; + this.debounce = false; this.$u.api.saveGoodsTry({ member_name: this.name, member_mobile: this.phone, @@ -139,7 +142,6 @@ export default { appointment_time: new Date(this.time), }).then(res => { if (res.errCode == 0) { - // this.$u.route({ type: 'navigateBack' }); this.$refs.uToast.show({ title: res.message, back: true, @@ -149,6 +151,7 @@ export default { title: res.message, type: 'error', }) + this.debounce = true; } }) }, diff --git a/pageC/cart/index.vue b/pageC/cart/index.vue index 6cab6b4..66ed8a1 100644 --- a/pageC/cart/index.vue +++ b/pageC/cart/index.vue @@ -54,6 +54,7 @@ export default { checkedAll: false, checkedGoods: [], totalPrice: '0.00', + debounce: true, } }, watch: { @@ -74,9 +75,11 @@ export default { } }, onPullDownRefresh() { + this.debounce = true; this.getCartList(); }, onShow() { + this.debounce = true; this.getCartList(); }, methods: { @@ -91,6 +94,8 @@ export default { }, // 结算 settlementOrder() { + if(!this.debounce) return; + this.debounce = false; if(!this.checkedGoods.length) return false; // 拼接后端需要的数据形式 let id = [], temp = ''; @@ -108,6 +113,9 @@ export default { this.$u.route({ url: '/pageC/cart/ConfirmOrder' }) + } else { + this.$u.toast(res.message); + this.debounce = true; } }) }, diff --git a/pageE/mine/ImageTextCollection.vue b/pageE/mine/ImageTextCollection.vue index 68d9382..573dd6d 100644 --- a/pageE/mine/ImageTextCollection.vue +++ b/pageE/mine/ImageTextCollection.vue @@ -1,18 +1,78 @@ @@ -26,6 +86,152 @@ export default { &:not(:nth-child(2n)) { margin-right: 20rpx; } + .video-item{ + height: 540rpx; + margin-top: 20rpx; + width: 335rpx; + box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35); + padding-bottom: 20rpx; + border-radius: 20rpx; + overflow: hidden; + .head{ + width: 100%; + height: 334rpx; + } + .title{ + margin:0 auto; + margin-top: 20rpx; + font-size: 22rpx; + color: #333; + font-weight: 500; + line-height: 30rpx; + width: 300rpx; + overflow:hidden; + text-overflow:ellipsis; + display:-webkit-box; + -webkit-box-orient:vertical; + -webkit-line-clamp:2; + } + .jianjie{ + height: 60rpx; + margin:0 auto; + margin-top: 20rpx; + font-size: 22rpx; + color: #666; + line-height: 30rpx; + width: 300rpx; + margin-left: 18rpx; + overflow:hidden; + text-overflow:ellipsis; + display:-webkit-box; + -webkit-box-orient:vertical; + -webkit-line-clamp:2; + } + .user{ + display: flex; + justify-content: space-between; + align-items: center; + margin:0 auto; + margin-top: 20rpx; + width: 300rpx; + position: relative; + .info { + display: flex; + align-items: center; + >image{ + width: 38rpx; + height: 38rpx; + border-radius: 50%; + + } + >text{ + font-size: 20rpx; + color:#333; + margin-left: 9rpx; + } + } + >image{ + width: 37rpx; + height: 8rpx; + } + .action { + z-index: 19; + position: absolute; + right: 0rpx; + bottom: 55rpx; + // width: 234rpx; + background: rgba(255,255,255,1); + box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12); + border-radius: 6rpx; + .bubble { + position: relative; + background-color: #fff; + &::after { + position: absolute; + right: 10rpx; + bottom: 0; + content: ''; + width: 60rpx; + height: 40rpx; + background-color: inherit; + transform: rotate(45deg); + margin-top: -10rpx; + z-index: -1; + box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12); + } + > view { + padding: 9rpx 12rpx; + display: flex; + align-items: center; + &:not(:last-child) { + border-bottom: 2rpx #ECECEC solid; + } + @mixin image-class($width, $height, $right) { + width: $width; + height: $height; + margin-right: $right; + } + > image { + &:first-child { + @include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx); + } + &:nth-child(2) { + @include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx); + } + &:last-child { + @include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx); + } + } + > text { + font-size: 20rpx; + color: rgba(51,51,51,1); + } + } + } + } + .layer { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9; + background-color: transparent; + } + } + .header_fist{ + position: relative; + .backes{ + position: absolute; + top: 0; + background: rgba(0,0,0,0.6); + width: 100%; + height: 100%; + color: #fff; + } + + } + } } } \ No newline at end of file diff --git a/pageE/more/AfterSalesHelp.vue b/pageE/more/AfterSalesHelp.vue index d91ffd9..00d6e66 100644 --- a/pageE/more/AfterSalesHelp.vue +++ b/pageE/more/AfterSalesHelp.vue @@ -18,12 +18,16 @@ export default { onLoad() { this.getPolicyList(); }, + onPullDownRefresh() { + this.getPolicyList(); + }, methods: { getPolicyList () { this.$u.api.getUseHelpList({ page: this.page, tid: 2 // 1:使用帮助列表 2: 售后政策列表 }).then((res)=>{ + uni.stopPullDownRefresh(); if (res.errCode == 0) { this.policyList = res.data.helpList; } diff --git a/pageE/tool/Manicure.vue b/pageE/tool/Manicure.vue index 3476049..209e328 100644 --- a/pageE/tool/Manicure.vue +++ b/pageE/tool/Manicure.vue @@ -96,7 +96,7 @@ export default { }, tabsChange(index) { this.swiperCurrent = index; - this.toApplyPage(index); + // this.toApplyPage(index); }, animationfinish(e) { let current = e.detail.current; diff --git a/pages.json b/pages.json index 42d1a24..0c73e3d 100644 --- a/pages.json +++ b/pages.json @@ -109,16 +109,7 @@ "navigationBarTitleText": "商品详情", "app-plus":{ "titleNView":{ - "backgroundColor":"#ffffff", - "buttons": [ - { - "type":"none", - "text":"\ue636", - "float":"right", - "fontSize":"18", - "fontSrc": "/static/fonts/cart.ttf" - } - ] + "backgroundColor":"#ffffff" } } } @@ -140,16 +131,7 @@ "navigationBarTitleText": "商品评价", "app-plus":{ "titleNView":{ - "backgroundColor":"#ffffff", - "buttons": [ - { - "type":"none", - "text":"\ue636", - "float":"right", - "fontSize":"18", - "fontSrc": "/static/fonts/cart.ttf" - } - ] + "backgroundColor":"#ffffff" } } } @@ -214,8 +196,10 @@ "path": "photo/index", "style": { "navigationBarTitleText": "", - "navigationStyle": "custom" - + "navigationStyle": "custom", + "app-plus": { + "softinputMode": "adjustResize" + } } } ] @@ -253,7 +237,6 @@ { "path": "cart/index", "style": { - "enablePullDownRefresh": true, "navigationBarTitleText": "购物车", "app-plus": { "titleSize": "36px", @@ -621,7 +604,6 @@ { "path": "tool/Manicure", "style": { - "enablePullDownRefresh": true, "navigationBarTitleText": "美甲", "app-plus": { "titleSize": "36px", @@ -658,19 +640,6 @@ } } }, - { - "path": "tool/washComment", - "style": { - "navigationBarTitleText": "送洗评价", - "app-plus": { - "titleSize": "36px", - "titleNView": { - "titleColor": "#333333", - "backgroundColor": "#FFFFFF" - } - } - } - }, { "path": "tool/WashOrder", "style": { @@ -700,6 +669,7 @@ { "path": "mine/ImageTextCollection", "style": { + "enablePullDownRefresh": true, "navigationBarTitleText": "图文收藏", "app-plus": { "titleSize": "36px", @@ -863,7 +833,6 @@ { "path": "order/Index", "style": { - "enablePullDownRefresh": true, "navigationBarTitleText": "我的订单", "app-plus": { "titleSize": "36px", @@ -877,7 +846,6 @@ { "path": "order/Details", "style": { - "enablePullDownRefresh": true, "navigationBarTitleText": "订单详情", "app-plus": { "titleSize": "36px", @@ -937,7 +905,6 @@ { "path": "pages/index/index", "style": { - "enablePullDownRefresh": true, "navigationStyle": "custom" } }, @@ -961,7 +928,6 @@ { "path": "pages/mine/index", "style": { - "enablePullDownRefresh": true, "navigationBarTitleText": "我的", "app-plus": { "titleSize": "36px", diff --git a/pages/index/index.vue b/pages/index/index.vue index 9e8c164..d85d7a1 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -2,7 +2,7 @@ - qqq + bbb @@ -34,22 +34,23 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - @@ -293,20 +294,33 @@ clickFImage(index) { const item = this.indexImageSwiper[index]; console.log(item); - this.activityLink({ type: item.url_type, id: item.info_id }); + this.activityLink({ + type: item.url_type, + id: item.info_id + }); }, clickSImage(index) { const item = this.zhiboImageSwiper[index]; console.log(item); - this.activityLink({ type: item.url_type, id: item.info_id }); + this.activityLink({ + type: item.url_type, + id: item.info_id + }); }, - activityLink({ type, id }) { - if(type == 0) return false; + activityLink({ + type, + id + }) { + if (type == 0) return false; // type 1 商品详情页, 2 店铺详情页 const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index'; - let params = { id: id }; + let params = { + id: id + }; // type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券 - if(type == 1) Object.assign(params, { type: 1 }); + if (type == 1) Object.assign(params, { + type: 1 + }); this.$u.route({ url: url, params: params @@ -314,4 +328,4 @@ }, }, } - + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 16ea173..813a489 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -158,10 +158,10 @@ export default { methods: { getUserInfo() { this.$u.api.getMemberInfo().then(res => { + uni.stopPullDownRefresh(); if (res.errCode == 0) { // this.userInfo = res.data.MemberArray; this.$set(this, 'userInfo', res.data.MemberArray); - uni.stopPullDownRefresh(); } }) }, diff --git a/static/js/common.js b/static/js/common.js index 140e1f0..9f036ed 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -66,6 +66,6 @@ const common = { if(format) result = hours + format + minutes + format + seconds; else result = hours + ':' + minutes + ':' + seconds; return result; - } + }, } export default common \ No newline at end of file