2 Commits
zmr ... cmx

Author SHA1 Message Date
cmxdd
5e0162e3ea Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into cmx 2020-08-11 14:20:12 +08:00
cmxdd
282502a8d6 优惠券弹窗不关闭 2020-08-11 10:45:10 +08:00
115 changed files with 2781 additions and 4203 deletions

12
App.vue
View File

@@ -20,18 +20,6 @@
if (this.hasLogin) { if (this.hasLogin) {
this.refreshToken_function(); this.refreshToken_function();
} }
// #ifdef APP-PLUS
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚6s 超时后依旧会主动关闭。
setTimeout(()=>{
plus.navigator.closeSplashscreen();
},3000)
// #endif
},
onShow(){
},
onHide(){
}, },
methods: { methods: {
...mapMutations(['loginIn']), ...mapMutations(['loginIn']),

View File

@@ -54,10 +54,6 @@ export default {
getRecommendList(){ getRecommendList(){
return vm.$u.post('MemberExpert/recommendList'); return vm.$u.post('MemberExpert/recommendList');
}, },
// 获取所有达人
getAllRecommendList({ page }) {
return vm.$u.post('MemberExpert/getRecommendList', { page });
},
// 达人(搜索)列表 // 达人(搜索)列表
getExpertList({ page, store_id, live_status, like_nickname }){ getExpertList({ page, store_id, live_status, like_nickname }){
return vm.$u.post('MemberExpert/expertList', { return vm.$u.post('MemberExpert/expertList', {
@@ -196,9 +192,9 @@ export default {
}); });
}, },
// 商品搜索 // 商品搜索
ShopSearch({keyword, page = 1, order = 'goods_salenum',sid=''}){ ShopSearch({keyword,page = 1,order = 'goods_salenum'}){
return vm.$u.post('ShopSearch/search',{ return vm.$u.post('ShopSearch/search',{
keyword,page,order,store_id:sid keyword,page,order
}) })
}, },
// 秒杀推荐 // 秒杀推荐
@@ -206,10 +202,9 @@ export default {
return vm.$u.post('Spike/recommendedSpike'); return vm.$u.post('Spike/recommendedSpike');
}, },
// 秒杀详情 // 秒杀详情
getSpikeInfo({ groupbuy_id, goods_id }) { getSpikeInfo({ groupbuy_id }) {
return vm.$u.post('Spike/spikeInfo', { return vm.$u.post('Spike/spikeInfo', {
groupbuy_id: groupbuy_id, groupbuy_id: groupbuy_id
goods_id: goods_id,
}); });
}, },
// 秒杀列表 // 秒杀列表
@@ -226,23 +221,13 @@ export default {
}); });
}, },
// 拼团商品详情 // 拼团商品详情
getPinTuanDetails({ pintuan_id, goods_id }) { getPinTuanDetails({ pintuan_id }) {
return vm.$u.post('Specialci/pintuanInfo', { return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
pintuan_id: pintuan_id,
goods_id: goods_id,
});
}, },
// 推荐拼团 // 推荐拼团
getPinTuanPush() { getPinTuanPush() {
return vm.$u.post('Specialci/pintuanPush'); return vm.$u.post('Specialci/pintuanPush');
}, },
// 拼团验证
pintuanVerify({ pintuan_id, pintuangroup_headid }) {
return vm.$u.post('Specialci/pintuanVerify', {
pintuan_id: pintuan_id,
pintuangroup_headid: pintuangroup_headid,
});
},
// 开团/参团 // 开团/参团
withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) { withImmediate({ pintuan_id, pintuangroup_headid, pintuangroup_id}) {
return vm.$u.post('Specialci/withImmediate', { return vm.$u.post('Specialci/withImmediate', {
@@ -271,18 +256,17 @@ export default {
}); });
}, },
// 我的优惠券(已有的) // 我的优惠券(已有的)
getMemberCouponList({ store_id, gc_id, type, status, page }) { getMemberCouponList({ store_id, gc_id, type, status }) {
return vm.$u.post('Coupon/getMemberCouponList', { return vm.$u.post('Coupon/getMemberCouponList', {
store_id: store_id, store_id: store_id,
gc_id: gc_id, gc_id: gc_id,
type: type, type: type,
status: status, status: status,
page: page,
}); });
}, },
// 获取直播列表 // 获取直播列表
tabLiveList({page}){ tabLiveList(){
return vm.$u.post('Specialci/tabLiveList',{page}) return vm.$u.post('Specialci/tabLiveList')
}, },
// 商城-活动广告 // 商城-活动广告
getStoreActivity() { getStoreActivity() {
@@ -360,10 +344,6 @@ export default {
isNewmembervoucher() { isNewmembervoucher() {
return vm.$u.post('Coupon/isNewmembervoucher') return vm.$u.post('Coupon/isNewmembervoucher')
}, },
//待发货退款
addrefundall({order_id,reason_info}) {
return vm.$u.post('order/add_refund_all',{order_id,reason_info})
},
} }
} }

View File

@@ -217,12 +217,6 @@ export default {
page: page, page: page,
}); });
}, },
// 删除浏览记录
delMemberBrowse({ goods_id }) {
return vm.$u.post('Member/delMemberBrowse', {
goods_id: goods_id,
});
},
// 意见反馈列表 // 意见反馈列表
getFeedbackList({ page }) { getFeedbackList({ page }) {
return vm.$u.post('Member/feedbackList', { return vm.$u.post('Member/feedbackList', {
@@ -242,10 +236,6 @@ export default {
if(type > 0) Object.assign(params, {type: type}); if(type > 0) Object.assign(params, {type: type});
return vm.$u.post('Order/orderList', params); return vm.$u.post('Order/orderList', params);
}, },
// 各种订单数量
getOrderNumber() {
return vm.$u.post('order/orderNumber');
},
// 售后列表 // 售后列表
// getAfterSaleList({ page }) { // getAfterSaleList({ page }) {
// return vm.$u.post('order/afterSaleList', { page: page }); // return vm.$u.post('order/afterSaleList', { page: page });
@@ -314,8 +304,8 @@ export default {
return vm.$u.post('Message/informationList', { }); return vm.$u.post('Message/informationList', { });
}, },
// 关注列表 // 关注列表
snsfriendList({page}) { snsfriendList({ }) {
return vm.$u.post('message/snsfriendList', {page}); return vm.$u.post('message/snsfriendList', { });
}, },
// 关注达人 // 关注达人
attentionMember({ member_id }) { attentionMember({ member_id }) {
@@ -357,12 +347,6 @@ export default {
code: code, code: code,
}); });
}, },
// 获取可送洗商品
getSendOrderList({ page }) {
return vm.$u.post('member/getSendOrderList', {
page: page,
});
},
// 送洗列表-平台订单 实体店订单 // 送洗列表-平台订单 实体店订单
sendLaundryOrderList({ type, page }) { sendLaundryOrderList({ type, page }) {
return vm.$u.post('member/sendLaundryOrderList', { return vm.$u.post('member/sendLaundryOrderList', {
@@ -424,38 +408,9 @@ export default {
return vm.$u.post('article/articleCollectList'); return vm.$u.post('article/articleCollectList');
}, },
// 关注用户列表 // 关注用户列表
attentionMemberList({ page = 1,role } = {}) { attentionMemberList() {
return vm.$u.post('member/attentionMemberList', { page, role }); return vm.$u.post('member/attentionMemberList');
}, },
// 可用优惠券商品
couponGoodsList({ voucher_id, page, order }) {
return vm.$u.post('Coupon/couponGoodsList', {
page: page,
vouchertemplate_id: voucher_id,
order: order,
});
},
//取消红点
dynamicRead({id}) {
return vm.$u.post('message/dynamicRead', {
friend_tomid:id
});
},
//店铺取关
attentionMemberRemove({id}) {
return vm.$u.post('Member/attentionMemberRemove', {
friend_tomid:id
});
},
// 设置里的帮助
getSettingHelpList() {
return vm.$u.post('document/help');
},
//获取默认头像
getDefaultAvatar(){
return vm.$u.post("member/getDefaultAvatar")
} }
} }
}
} }

View File

@@ -2,7 +2,7 @@ var md5 = require("../static/js/md5.min.js")
const install = (Vue, vm) => { const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明 // 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
baseUrl: 'https://mall.dmygkeji.com/api', baseUrl: 'https://dmmall.sdbairui.com/api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
originalData: true originalData: true
@@ -47,34 +47,24 @@ const install = (Vue, vm) => {
// 假设201为token失效这里跳转登录 // 假设201为token失效这里跳转登录
// vm.$u.toast('您还没有登录哦,请先去登录!'); // vm.$u.toast('您还没有登录哦,请先去登录!');
if (res.data.data.action != "memberinfo") { if (res.data.data.action != "memberinfo") {
uni.showToast({ uni.showModal({
title: "您还没有登录,请先去登录哦!", title: "温馨提示",
icon: "none" content: "您还未登录,请立即登录",
}) cancelText: "以后再说",
confirmText: "立即登录",
confirmColor: "#FF780F",
success(res) {
// console.log(res);
if (res.confirm) {
setTimeout(() => { setTimeout(() => {
// 此为uView的方法详见路由相关文档 // 此为uView的方法详见路由相关文档
uni.navigateTo({ vm.$u.route('/pageA/login/login')
url: "/pageA/login/login", }, 500)
}
if (res.cancel) {
}
}
}) })
}, 1000)
// uni.showModal({
// title: "温馨提示",
// content: "您还未登录,请立即登录",
// cancelText: "以后再说",
// confirmText: "立即登录",
// confirmColor: "#FF780F",
// success(res) {
// // console.log(res);
// if (res.confirm) {
// setTimeout(() => {
// // 此为uView的方法详见路由相关文档
// vm.$u.route('/pageA/login/login')
// }, 500)
// }
// if (res.cancel) {
// }
// }
// })
} }
return false; return false;
} else if (res.errCode == 1) { } else if (res.errCode == 1) {

View File

@@ -19,8 +19,6 @@ const store = new Vuex.Store({
hasLogin: false, // 登录状态 hasLogin: false, // 登录状态
token: "", // 储存token token: "", // 储存token
showLoginModel: false, // 登录框 showLoginModel: false, // 登录框
question: {}, // 帮助与反馈
showCoupons: true, // 是否显示新人领取优惠券
}, },
getters: { getters: {
getOrderAddress(state) { getOrderAddress(state) {
@@ -77,12 +75,6 @@ const store = new Vuex.Store({
}, },
setLoadMore(state, info) { setLoadMore(state, info) {
state.loadmore = info; state.loadmore = info;
},
setQuestion(state, question) {
state.question = question;
},
updateShowCoupons(state, status) {
state.showCoupons = status;
} }
} }
}) })

View File

@@ -2,14 +2,14 @@
<view class="comment-item"> <view class="comment-item">
<view class="user"> <view class="user">
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar> <u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
<text class="name">{{ content.member_nickname }}</text> <text class="name">{{ content.geval_frommembername }}</text>
<u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate> <u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
</view> </view>
<view class="content"> <view class="content">
<view class="text">{{ content.geval_content }}</view> <view class="text">{{ content.geval_content }}</view>
</view> </view>
<view class="image-container"> <view class="image-container">
<image :src="src" v-for="(src, index) in content.geval_image" :key="index" @click="previewImage(content.geval_image)"></image> <image :src="src" v-for="(src, index) in content.geval_image" :key="index"></image>
</view> </view>
<view class="reply" v-if="reply && content.geval_explain"> <view class="reply" v-if="reply && content.geval_explain">
<view class="title">掌柜回复</view> <view class="title">掌柜回复</view>
@@ -39,14 +39,6 @@ export default {
}, },
created() { created() {
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two; if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
},
methods: {
previewImage(urls) {
console.log(urls);
// uni.previewImage({
// urls: urls,
// });
},
} }
}; };
</script> </script>

View File

@@ -2,11 +2,8 @@
<view class="video-item" v-if="item" @click="toDetailsPage(item.article_id,item.video_path)"> <view class="video-item" v-if="item" @click="toDetailsPage(item.article_id,item.video_path)">
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image> <image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
<view class="header_fist" v-else> <view class="header_fist" v-else>
<view class="backes"> <view class="backes"></view>
<u-icon name="play-circle-fill" color="#ffffff" size="20"></u-icon> <image class="head" :src="item.article_pic" ></image>
<text>视频</text>
</view>
<image class="head" :src="item.article_pic" mode="aspectFill"></image>
</view> </view>
<view class="title" v-if="">{{ item.article_title }}</view> <view class="title" v-if="">{{ item.article_title }}</view>
<view class="jianjie">{{ item.article_content }}</view> <view class="jianjie">{{ item.article_content }}</view>
@@ -15,7 +12,7 @@
<image :src="item.member_avatar"></image> <image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text> <text>{{ item.member_nickname }}</text>
</view> </view>
<image class="img-imp" src="/static/image/common/4.png" @click.stop="showAction"></image> <image src="/static/image/common/4.png" @click.stop="showAction"></image>
<view class="action" v-if="show == item.article_id"> <view class="action" v-if="show == item.article_id">
<view class="bubble"> <view class="bubble">
<view @click.stop="articleLike"> <view @click.stop="articleLike">
@@ -103,9 +100,8 @@
} }
} }
>image{ >image{
width: 35rpx; width: 37rpx;
height: 8rpx; height: 8rpx;
padding: 20rpx;
} }
.action { .action {
z-index: 19; z-index: 19;
@@ -176,22 +172,11 @@
.header_fist{ .header_fist{
position: relative; position: relative;
.backes{ .backes{
z-index: 99;
position: absolute; position: absolute;
display: flex; top: 0;
align-items: center; width: 100%;
justify-content: space-around; height: 100%;
top: 10rpx;
left: 10rpx;
width: 80rpx;
height: 30rpx;
padding: 0 10rpx;
border-radius: 30rpx;
background-color: rgba(0,0,0,0.5);
& > text {
color: #fff; color: #fff;
font-size: 18rpx;
}
} }
} }
@@ -257,8 +242,6 @@ export default {
if(res.errCode == 0) { if(res.errCode == 0) {
this.$u.toast(res.message); this.$u.toast(res.message);
this.$emit("updateList"); this.$emit("updateList");
} else {
this.$u.toast(res.message);
} }
}) })
}, },

View File

@@ -3,12 +3,12 @@
<image class="head" :src="image"></image> <image class="head" :src="image"></image>
<view class="user"> <view class="user">
<view class="name"> <view class="name">
<image :src="item.member_avatar"></image> <image></image>
<text class="u-line-1" style="width:130rpx">{{name}}</text> <text class="u-line-1" style="width:130rpx">{{name}}</text>
</view> </view>
<view class="pingbi" @click.stop="articleAddShield"> <view class="pingbi">
<image src="/static/image/common/7.png"></image> <image></image>
<text>屏蔽用户</text> <text>1屏蔽用户</text>
</view> </view>
</view> </view>
</view> </view>
@@ -81,20 +81,8 @@ export default {
rid:this.rid rid:this.rid
} }
}) })
},
articleAddShield() {
console.log(this.item)
this.$u.api.articleAddShield({
member_id: this.item.user_id,
}).then(res => {
// console.log(res)
if(res.errCode == 0) {
this.$u.toast(res.message);
this.$emit("updateList");
} }
})
}, },
}, props:['name','image','url','zid','rid']
props:['name','image','url','zid','rid','item']
} }
</script> </script>

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="notice" :style="{height : height + 'px'}"> <view class="notice">
<view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)"> <view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)">
<view class="time_notice">{{ item.addtime }}</view> <view class="time_notice">{{ item.addtime }}</view>
<view class="notice_view"> <view class="notice_view">
@@ -36,7 +36,6 @@
margin: 0 auto; margin: 0 auto;
text-align: left; text-align: left;
line-height: 40rpx; line-height: 40rpx;
letter-spacing: 2rpx;
} }
.notice_view > view:nth-child(3){ .notice_view > view:nth-child(3){
height: 84rpx; height: 84rpx;
@@ -78,8 +77,7 @@
props: ['list'], props: ['list'],
data() { data() {
return { return {
notice : [], notice : []
height : ''
}; };
}, },
watch: { watch: {
@@ -88,8 +86,6 @@
this.notice = newVal; this.notice = newVal;
} }
}, },
onLoad() {
},
methods: { methods: {
gotoInfo(index) { gotoInfo(index) {
console.log(index); console.log(index);

View File

@@ -80,6 +80,7 @@ export default {
// 判断是不是编辑页面 调用接口 // 判断是不是编辑页面 调用接口
confirmBtn() { confirmBtn() {
if(!this.debounce) return; if(!this.debounce) return;
this.debounce = false;
this.info ? this.editAddress() : this.addAddress(); this.info ? this.editAddress() : this.addAddress();
}, },
// chooseArea() { // chooseArea() {
@@ -118,7 +119,6 @@ export default {
}, },
addAddress() { addAddress() {
if(!this.validateValue()) return false; if(!this.validateValue()) return false;
this.debounce = false;
this.$u.api.addressAdd({ this.$u.api.addressAdd({
area_id: this.area_id, area_id: this.area_id,
city_id: this.city_id, city_id: this.city_id,
@@ -144,7 +144,6 @@ export default {
}, },
editAddress() { editAddress() {
if(!this.validateValue()) return false; if(!this.validateValue()) return false;
this.debounce = false;
this.$u.api.addressEdit({ this.$u.api.addressEdit({
address_id: this.info.address_id, address_id: this.info.address_id,
area_id: this.area_id, area_id: this.area_id,

View File

@@ -46,7 +46,6 @@ export default {
}, },
methods: { methods: {
viewGoodsDetails(item) { viewGoodsDetails(item) {
if(this.closeAction()) return false;
const list = this.list.filter(item => { const list = this.list.filter(item => {
return item.show; return item.show;
}) })
@@ -58,17 +57,6 @@ export default {
} }
}) })
}, },
closeAction() {
let status = false;
this.list.map((val, idx) => {
if(val.show) {
status = true;
this.$set(this.list[idx], 'show', false);
};
})
this.$forceUpdate();
return status;
},
getGoodsFavoritesList() { getGoodsFavoritesList() {
this.$u.api.getFavoritesList().then(res => { this.$u.api.getFavoritesList().then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {

View File

@@ -12,8 +12,10 @@
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="goods-text"> <view class="goods-text">
<view class="goods-name u-line-2">{{ goods.goods_name }}</view> <view class="goods-name u-line-2">{{ goods.goods_name }}</view>
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">{{ goods.goods_spec | concatSpec }}</view> <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<!-- <view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view> --> <text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view>
<view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view>
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view> <view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40"> <view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image> <image src="@/pageE/static/mine/26.png"></image>
@@ -22,20 +24,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order-btn" v-if="[1, 2, 3, 4, 8, 11].indexOf(order.view_type) >= 0"> <view class="order-btn" v-if="[1, 2, 3, 4, 8, 9].indexOf(order.view_type) >= 0">
<!-- || order.view_type == 2 -->
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view> <view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="cancel" v-if="order.view_type == 3 && order.shipping_code" @click="toOtherPage('Logistics')">查看物流</view> <view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view> <view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view> <view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
<!-- <view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</view> --> <view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</view>
<view class="phone" v-if="order.view_type == 3 && order.takeawayer_phone" @click="makePhone(order.takeawayer_phone)"> <view class="payment" v-if="order.view_type == 1 || order.view_type == 9" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
<u-icon name="phone-fill" color="#FF780F" size="28"></u-icon>
<text>联系骑手</text>
</view>
<!-- || order.view_type == 9 -->
<view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
<view class="service" v-if="order.view_type == 8">联系官方客服</view> <view class="service" v-if="order.view_type == 8">联系官方客服</view>
<view class="submit" v-if="order.view_type == 8">提交官方审核</view> <view class="submit" v-if="order.view_type == 8">提交官方审核</view>
</view> </view>
@@ -46,71 +42,18 @@ import common from '@/static/js/common.js';
export default { export default {
data() { data() {
return { return {
state: '',
} }
}, },
props: { props: {
order: Object order: Object
}, },
mounted() { mounted() {
// this.viewState(); this.viewState();
},
filters: {
concatSpec(value) {
let spec = '';
for (const key in value) {
if (value.hasOwnProperty(key)) {
const element = value[key];
spec = spec + element + ';'
}
}
return spec;
}
}, },
methods: { methods: {
viewState() {
cancelOrder() {
this.$u.api.cancelOrder({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
},
toOtherPage(url) {
this.$u.route('/pageE/order/' + url, {
oid: this.order.order_id,
type:this.order.view_type
});
},
payNow(pay_sn, order_amount, id) {
this.$u.route('/pageC/cart/cashier', {
pay_sn: pay_sn,
price: order_amount,
order_id: id
});
},
makePhone(phone) {
uni.makePhoneCall({
phoneNumber: phone
});
}
},
computed:{
state() {
let state; let state;
// console.log(this.order.view_type);
switch (this.order.view_type) { switch (this.order.view_type) {
case 1: case 1:
state = '待支付'; state = '待支付';
@@ -136,19 +79,45 @@ export default {
case 9: case 9:
state = '拼团中'; state = '拼团中';
break; break;
case 10:
state = '已取消';
break;
case 11:
state = '已拒绝';
break;
default: default:
break; break;
} }
// console.log(state); // console.log(state);
return state; this.state = state;
}, },
cancelOrder() {
this.$u.api.cancelOrder({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
} }
this.$u.toast(res.message);
})
},
confirmReceive() {
this.$u.api.confirmReceive({
order_id: this.order.order_id,
}).then(res => {
if(res.errCode == 0) {
this.$emit("refreshOrderList");
}
this.$u.toast(res.message);
})
},
toOtherPage(url) {
this.$u.route('/pageE/order/' + url, {
oid: this.order.order_id,
});
},
payNow(pay_sn, order_amount, id) {
this.$u.route('/pageC/cart/cashier', {
pay_sn: pay_sn,
price: order_amount,
order_id: id
});
},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -203,7 +172,7 @@ export default {
line-height: 38rpx; line-height: 38rpx;
} }
.goods-sku { .goods-sku {
align-self: baseline; display: inline-block;
max-width: 230rpx; max-width: 230rpx;
background: rgba(236,236,236,1); background: rgba(236,236,236,1);
border-radius: 6rpx; border-radius: 6rpx;
@@ -237,7 +206,7 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@mixin btn-class($width, $color) { @mixin btn-class($width, $color) {
// width: $width; width: $width;
height: 60rpx; height: 60rpx;
border: 2rpx solid $color; border: 2rpx solid $color;
color: $color; color: $color;
@@ -260,15 +229,6 @@ export default {
.submit { .submit {
@include btn-class($width: 216rpx, $color: rgba(255,119,15,1)); @include btn-class($width: 216rpx, $color: rgba(255,119,15,1));
} }
.phone {
@include btn-class($width: 206rpx, $color: rgba(255,119,15,1));
display: flex;
align-items: center;
justify-content: center;
.u-icon {
margin-right: 10rpx;
}
}
} }
} }
</style> </style>

View File

@@ -17,7 +17,7 @@
<view class="uni-padding-wrap"> <view class="uni-padding-wrap">
<view class="page-section swiper"> <view class="page-section swiper">
<view class="page-section-spacing"> <view class="page-section-spacing">
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="300" @animationfinish="tiaoguos" @change="qiehuan"> <swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000" @animationfinish="">
<swiper-item v-for="(item,index) in list" :key="index"> <swiper-item v-for="(item,index) in list" :key="index">
<view class="swiper-item uni-bg-red"> <view class="swiper-item uni-bg-red">
<image :src=" 'https://' + item.launch_path"></image> <image :src=" 'https://' + item.launch_path"></image>
@@ -73,26 +73,12 @@
interval: 2000, interval: 2000,
duration: 500, duration: 500,
swiper_index: "", swiper_index: "",
tiaoguo:false,
weizhi:0
}; };
}, },
onReady: function(res) { onReady: function(res) {
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
}, },
methods: { methods: {
tiaoguos(a){
console.log(a.detail)
if(this.weizhi == a.detail.current && a.detail.current == this.list.length -1){
this.leap_overto()
}
this.weizhi = a.detail.current
},
qiehuan(a){
console.log(a)
this.tiaoguo = a.detail.current
},
apiwelcome() { apiwelcome() {
this.$u.api.documentInfo({ this.$u.api.documentInfo({
document_code: 'agreement' document_code: 'agreement'

View File

@@ -8,12 +8,13 @@
</view> </view>
</view> </view>
<view class="label"> <view class="label">
<!-- <u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs> <u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
</view> </view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;"> <swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i"> <swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
<!-- 最多显示3个 --> <!-- 最多显示3个 -->
<view v-if="groupList[i]" class="group-container"> <view v-if="groupList[i]">
<sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem> <sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem>
</view> </view>
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty> <u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty>
@@ -61,7 +62,7 @@ export default {
gc_id: id, gc_id: id,
}).then(res => { }).then(res => {
this.groupList[this.current] = res.data; this.groupList[this.current] = res.data;
console.log(this.groupList); // console.log(this.groupList);
this.$forceUpdate(); this.$forceUpdate();
}) })
}, },
@@ -105,7 +106,6 @@ export default {
.list { .list {
box-sizing: border-box; box-sizing: border-box;
padding: 0 30rpx; padding: 0 30rpx;
.group-container {
display: flex; display: flex;
> view { > view {
&:not(:nth-child(3n)) { &:not(:nth-child(3n)) {
@@ -113,6 +113,5 @@ export default {
} }
} }
} }
}
} }
</style> </style>

View File

@@ -3,8 +3,8 @@
<image class="head" :src="info.pintuan_image" mode="widthFix"></image> <image class="head" :src="info.pintuan_image" mode="widthFix"></image>
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text> <text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
<view class="price"> <view class="price">
<view class="value">{{ info.pintuan_goods_price }}</view> <view>{{ info.pintuan_goods_price }}</view>
<view class="btn">立即拼团</view> <view>立即拼团</view>
</view> </view>
</view> </view>
</template> </template>
@@ -61,22 +61,18 @@ export default {
margin-top: 10rpx; margin-top: 10rpx;
} }
.price{ .price{
display: flex; // display: flex;
// align-items: center; // align-items: center;
// align-content: flex-end; // justify-content: space-between;
justify-content: space-between; margin-top: 10rpx;
margin-top: 16rpx; > view:first-child{
.value {
font-size: 26rpx; font-size: 26rpx;
color: #FF3131; color: #FF3131;
// margin-bottom: 12rpx; margin-bottom: 12rpx;
} }
.btn { > view:last-child{
font-size: 22rpx; font-size: 22rpx;
height: 22rpx;
color: #FDD360; color: #FDD360;
text-align: end;
// margin-top:8rpx;
} }
} }
} }

View File

@@ -2,6 +2,7 @@
<view class="list"> <view class="list">
<view class="top">商品推荐</view> <view class="top">商品推荐</view>
<view> <view>
<!-- <u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="26" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs> <u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
</view> </view>
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}"> <swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}">
@@ -13,7 +14,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 加载更多 --> <!-- 加载更多 -->
<u-loadmore class="load-size" :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore"></u-loadmore>
</view> </view>
</template> </template>
<script> <script>
@@ -48,7 +49,7 @@ export default {
this.getGoodsClassRecommend(); this.getGoodsClassRecommend();
}, },
methods: { methods: {
loadMore() { loadMore(page) {
if(!this.timer) return false; if(!this.timer) return false;
this.loadStatus = "loading"; this.loadStatus = "loading";
this.page++; this.page++;
@@ -71,7 +72,6 @@ export default {
}, },
getGoodsClassRecommend() { getGoodsClassRecommend() {
this.$u.api.getGoodsClassRecommend().then(res => { this.$u.api.getGoodsClassRecommend().then(res => {
console.log(res)
if (res.errCode == 0) { if (res.errCode == 0) {
// 初始化 current // 初始化 current
this.current = 0; this.current = 0;
@@ -97,7 +97,7 @@ export default {
}, },
setSwiperHeight() { setSwiperHeight() {
// height: 480rpx, margin-bottom: 26rpx // height: 480rpx, margin-bottom: 26rpx
const height = Math.ceil(this.goodsList[this.current].length / 2) * (450 + 26); const height = Math.ceil(this.goodsList[this.current].length / 2) * (480 + 26);
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx'; this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
// console.log(this.swiperHeight); // console.log(this.swiperHeight);
}, },

View File

@@ -4,7 +4,7 @@
<view class="info"> <view class="info">
<text class="title u-line-2">{{ info.goods_name }}</text> <text class="title u-line-2">{{ info.goods_name }}</text>
<!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> --> <!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> -->
<text class="price">{{ info.goods_price }}<text style="font-size:22rpx;color:#999;text-decoration:line-through;display: inline-block;margin-left:20rpx"> {{info.goods_marketprice}}</text></text> <text class="price">{{ info.goods_price }}</text>
</view> </view>
</view> </view>
</template> </template>
@@ -34,7 +34,7 @@ export default {
url: 'pageB/sdetails/index', url: 'pageB/sdetails/index',
params: { params: {
id: this.info.goods_id, id: this.info.goods_id,
// type: 1, type: 1,
} }
}) })
} }
@@ -44,14 +44,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.item{ .item{
width: 330rpx; width: 330rpx;
height: 450rpx; height: 480rpx;
margin-bottom: 26rpx; margin-bottom: 26rpx;
background-color: #f8f8f8; background-color: #f8f8f8;
border-radius: 10rpx 10rpx 0rpx 0rpx; border-radius: 10rpx 10rpx 0rpx 0rpx;
.img{ .img{
width: 330rpx; width: 330rpx;
height: 300rpx; height: 300rpx;
background: rgb(114, 110, 110); background: rgba(245,245,245,1);
border-radius: 10rpx 10rpx 0rpx 0rpx; border-radius: 10rpx 10rpx 0rpx 0rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }

View File

@@ -10,8 +10,8 @@
<view class="connect"> <view class="connect">
<view class="user"> <view class="user">
<view class="avatar"> <view class="avatar">
<image src="/static/image/common/32.png"></image> <image :src="info.member_avatar[0]"></image>
<image src="/static/image/common/31.png"></image> <image :src="info.member_avatar[1]"></image>
</view> </view>
<view class="num">{{ info.pintuan_limit_number }}人团</view> <view class="num">{{ info.pintuan_limit_number }}人团</view>
</view> </view>
@@ -91,7 +91,7 @@ export default {
} }
} }
.connect{ .connect{
padding:10rpx 0 30rpx; padding:10rpx 30rpx 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.user { .user {

View File

@@ -19,7 +19,7 @@
</view> </view>
<view class="next" @click="viewMore"> <view class="next" @click="viewMore">
<text>查看更多</text> <text>查看更多</text>
<u-icon name="arrow-right" color="#999" size="22"></u-icon> <u-icon name="arrow-right" color="#999" size="18"></u-icon>
</view> </view>
</view> </view>
<view class="list"> <view class="list">
@@ -82,7 +82,7 @@ export default {
background-color: #000; background-color: #000;
} }
.mah { .mah {
color: #999999; vertical-align: text-top;
} }
} }
} }

View File

@@ -1,26 +1,26 @@
<template> <template>
<view class="special"> <view class="special">
<view v-if="type == 'spike'" @click="spikeGoods"> <view v-if="type == 'spike'">
<image :src="item.groupbuy_image1" mode="aspectFill"></image> <image :src="item.groupbuy_image1" @click="spikeGoods"></image>
<view class="right"> <view class="right">
<view class="name u-line-1">{{ item.goods_name }}</view> <view class="name u-line-1" @click="spikeGoods">{{ item.goods_name }}</view>
<view class="price"> <view class="price">
<view class="groupbuy-price">{{ item.groupbuy_price }}</view> <view class="groupbuy-price">{{ item.groupbuy_price }}</view>
<view class="goods-price">{{ item.goods_price }}</view> <view class="goods-price">{{ item.goods_price }}</view>
</view> </view>
<view class="buy"> <view class="buy">
<view class="num">剩余{{ item.inventory }}</view> <view class="num">剩余{{ item.inventory }}</view>
<view class="btn">立即购买</view> <view class="btn" @click="spikeGoods">立即购买</view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="type == 'group'" @click="toDetailsPage"> <view v-if="type == 'group'">
<image :src="item.pintuan_image"></image> <image :src="item.pintuan_image" @click="toDetailsPage"></image>
<view class="right"> <view class="right">
<view class="name u-line-1">{{ item.pintuan_goods_name }}</view> <view class="name u-line-1" @click="toDetailsPage">{{ item.pintuan_goods_name }}</view>
<view class="price group"> <view class="price group">
<view class="groupbuy-price">{{ item.pintuan_goods_price }}</view> <view class="groupbuy-price">{{ item.pintuan_goods_price }}</view>
<view class="btn">立即拼团</view> <view class="btn" @click="toDetailsPage">立即拼团</view>
</view> </view>
</view> </view>
</view> </view>

View File

@@ -2,12 +2,11 @@
<view class="coupon-swiper"> <view class="coupon-swiper">
<view class="top"> <view class="top">
<view class="title">全部优惠券</view> <view class="title">全部优惠券</view>
<view class="view-more" @click="toCouponPage"> <view class="view-more" @click="toCouponPage">查看更多></view>
<text>查看更多</text>
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
</view>
</view> </view>
<!-- <u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="60" ></u-tabs-swiper> -->
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs> <u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
<!-- :style="{ height: swiperHeight }" -->
<swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}"> <swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i"> <swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
<!-- 最多显示四个 --> <!-- 最多显示四个 -->
@@ -115,8 +114,6 @@ export default {
.view-more { .view-more {
font-size: 20rpx; font-size: 20rpx;
color: rgba(153,153,153,1); color: rgba(153,153,153,1);
display: flex;
align-items: center;
} }
} }
.box { .box {

View File

@@ -11,8 +11,8 @@
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,
"splashscreen" : { "splashscreen" : {
"alwaysShowBeforeRender" : false, "alwaysShowBeforeRender" : true,
"waiting" : false, "waiting" : true,
"autoclose" : true, "autoclose" : true,
"delay" : 0 "delay" : 0
}, },

10
package-lock.json generated
View File

@@ -6,13 +6,13 @@
"dependencies": { "dependencies": {
"blueimp-md5": { "blueimp-md5": {
"version": "2.17.0", "version": "2.17.0",
"resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.17.0.tgz", "resolved": "https://registry.npm.taobao.org/blueimp-md5/download/blueimp-md5-2.17.0.tgz?cache=0&sync_timestamp=1595922448921&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fblueimp-md5%2Fdownload%2Fblueimp-md5-2.17.0.tgz",
"integrity": "sha512-x5PKJHY5rHQYaADj6NwPUR2QRCUVSggPzrUKkeENpj871o9l9IefJbO2jkT5UvYykeOK9dx0VmkIo6dZ+vThYw==" "integrity": "sha1-9PysCIsRX3tARfGfXaWenQGxu5Y="
}, },
"uview-ui": { "uview-ui": {
"version": "1.6.2", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.6.2.tgz", "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.0.tgz",
"integrity": "sha512-AvTXUk8A/AdJazxTziApw0NMv61jlE9cEO+Jxe84cTvcm2Ej7Ngf8zb3a6aSPVi6OVu81vTCC71R1wN7dZC3ig==" "integrity": "sha512-1UdMUGJqWx60ALbXXXs3rQHKUNBARDIV5XHc06mKFxpccO/i0tzoSqS6RuPdmYwXU1q59wnIU+NLABvcU5u4vw=="
}, },
"vuex": { "vuex": {
"version": "3.5.1", "version": "3.5.1",

View File

@@ -14,7 +14,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"blueimp-md5": "^2.17.0", "blueimp-md5": "^2.17.0",
"uview-ui": "^1.6.2", "uview-ui": "^1.5.0",
"vuex": "^3.5.1" "vuex": "^3.5.1"
} }
} }

View File

@@ -3,28 +3,32 @@
<view> <view>
<view class="login"> <view class="login">
<view class="content"> <view class="content">
<view class="title">请绑定手机号</view> <view class="title">手机登录</view>
<view class="labales"> <view class="labales">
<input type="number" maxlength="11" v-model="phone" placeholder="手机号" /> <text>手机号</text>
<input type="tel" placeholder="" />
</view> </view>
<view class="labales flex-inp"> <view class="labales">
<input type="number" maxlength="6" placeholder="请输入验证码" v-model="sms_code" /> <text>请输入验证码</text>
<u-button id="btn" class="identifying" :hair-line="false" hover-class="none" :class="is_sendcode ? 'sended' : ''" @click="getCode" :disabled="is_sendcode">{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}</u-button> <input type="tel" placeholder="" />
<text class="identifying">获取验证码</text>
</view> </view>
<!-- 服务协议 --> <!-- 服务协议 -->
<view class="pact"> <view class="pact">
<checkbox-group @change="change"> <view></view>
<checkbox class="check-tit" color="#1ADE00" :checked="checked" />
</checkbox-group>
<text>我已详细阅读并同意</text> <text>我已详细阅读并同意</text>
<text class="pact_text" v-for="(item,index) in pactList" :key="index" @click="infoPact(index)"> <text class="pact_text">用户协议</text>
{{ item }} <text class="pact_text">隐私协议</text>
</text> <text class="pact_text">使用协议</text>
<u-checkbox-group @change="checkboxGroupChange" size="27">
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
shape="circle" size="14" active-color="#19BE6B"></u-checkbox>
</u-checkbox-group>
</view> </view>
</view> </view>
<!-- denglu QQ weixin --> <!-- denglu QQ weixin -->
<view class="btn-login" @click="bindPhone">{{login}}</view> <u-button>{{login}}</u-button>
<u-toast ref="uToast" />
</view> </view>
</view> </view>
</template> </template>
@@ -32,150 +36,80 @@
export default { export default {
data() { data() {
return { return {
phone: "", list: [{
sms_code: "",
login: '绑定',
show: true,
checked: false, checked: false,
// 时间 disabled: false
timer: null, }],
is_sendcode: false, // 60s value: '',
time_count: 60, login: '注册',
pactList: [ "《用户协议》", "《隐私协议》", "《使用协议》" ], show: true
}; };
}, },
methods: { methods: {
// 勾选协议 // 选中某个复选框时由checkbox时触发
change(e) { checkboxChange(e) {
this.checked = !this.checked; //console.log(e);
console.log(this.checked);
}, },
// 获取验证码 // 选中任一checkbox时由checkbox-group触发
getCode() { checkboxGroupChange(e) {
if (this.$u.test.isEmpty(this.phone)) { // console.log(e);
this.$refs.uToast.show({
title: '手机号格式不能为空!',
type: 'error',
})
return;
}
if(!(/^1[3456789]\d{9}$/.test(this.phone))){
this.$refs.uToast.show({
title: '手机号格式不正确!',
type: 'warning',
})
return;
}
this.$u.api.sendSmsCode({
member_mobile: this.phone,
smslog_type: 4,
}).then(res => {
if (res.errCode == 0) {
console.log(res);
this.$refs.uToast.show({
title: res.message,
type: 'success',
})
// 发送验证码
this.getSendCode();
} else {
this.$refs.uToast.show({
title: res.message,
type: 'warning',
})
}
})
}, },
// 绑定手机号 mask_u(){
bindPhone() { this.show = !this.show
if (this.$u.test.isEmpty(this.phone)) {
this.$refs.uToast.show({
title: '手机号不能为空!',
type: 'error',
})
return;
}
if(!(/^1[3456789]\d{9}$/.test(this.phone))){
this.$refs.uToast.show({
title: '手机号格式不正确!',
type: 'warning',
})
return;
}
if(this.$u.test.isEmpty(this.sms_code)){
this.$refs.uToast.show({
title: '验证码不能为空!',
type: 'warning',
})
return;
}
if(this.sms_code.length == 0){
this.$refs.uToast.show({
title: '验证码有误!',
type: 'warning',
})
return;
}
if(!this.checked){
this.$refs.uToast.show({
title: '请同意协议!',
type: 'warning',
})
return;
}
this.$u.api.mobileBind({
member_mobile: this.phone,
sms_code: this.sms_code,
}).then(res => {
console.log(res);
if (res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
type: 'success',
})
uni.navigateTo({
url: '/pageA/topick/topick'
});
} else {
this.$refs.uToast.show({
title: res.message,
type: 'warning',
})
}
})
},
// 协议详情
infoPact(index) {
// console.log(index);
uni.navigateTo({
url: '/pageA/pactList/pactList?index=' + index
});
},
// 60s
getSendCode() {
const TIME_COUNT = 60;
if (!this.timer) {
this.time_count = TIME_COUNT;
this.is_sendcode = true;
this.timer = setInterval(() => {
if (this.time_count > 0 && this.time_count <= TIME_COUNT) {
this.time_count--;
} else {
this.is_sendcode = false;
clearInterval(this.timer);
this.timer = null;
}
}, 1000);
}
}, },
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.uni-page-wrapper{
background: #fff;
}
.login {
// background: url(../../static/pageA/loginbackground.png) no-repeat!important;
.images {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
}
page { .backes {
background-color: #fff; background: rgba(0, 0, 0, 0.4);
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
}
text {
z-index: 9;
color: #fff;
}
.more_Login {
overflow: hidden;
zoom: 1;
width: 630rpx;
margin: 0 auto;
}
.more_Login text {
display: inline-block;
width: 50%;
float: left;
font-size: 30rpx;
color: rgba(255, 255, 255, 1);
line-height: 36px;
margin: 97rpx 0;
}
.more_Login .other {
text-align: right;
}
} }
.title { .title {
@@ -191,86 +125,162 @@
margin: 0 auto; margin: 0 auto;
padding-top: 130rpx; padding-top: 130rpx;
.labales {
position: relative;
display: flex;
align-items: center;
padding: 20rpx;
border-bottom: 1px #BFBFBF solid;
input {
width: 100%;
}
}
.flex-inp {
justify-content: space-between;
margin-top: 70rpx;
}
.labales text { .labales text {
font-size: 30rpx; font-size: 30rpx;
color: #999; color: #999;
} }
.labales {
border-bottom: 1px #BFBFBF solid;
margin-bottom: 90rpx;
}
.labales {
position: relative;
}
.identifying { .identifying {
flex-shrink: 0; position: absolute;
font-size: 26rpx; right: 0;
top: 0;
bottom: 0;
margin: auto;
font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: #FF780F !important; color: #FF780F!important;
border: none; }
background-color: #fff;
} }
.sended { .pact text {
color: #666 !important;
}
}
.pact {
display: flex;
align-items: center;
flex-wrap: wrap;
margin: 20rpx 0;
&>text {
font-size: 22rpx; font-size: 22rpx;
font-weight: 400; font-weight: 400;
color: #333; color: #333;
} line-height: 36px;
}
.check-tit {
font-size: 20rpx;
}
::v-deep uni-checkbox .uni-checkbox-input {
width: 24rpx;
height: 24rpx;
border-color: #d1d1d1 !important;
border-radius: 50% !important;
}
::v-deep uni-checkbox .uni-checkbox-input-checked:before {
font-size: 28rpx;
} }
.pact_text { .pact_text {
font-size: 22px; font-size: 22px;
font-weight: 400; font-weight: 400;
color: rgba(129, 188, 253, 1) !important; color: rgba(129, 188, 253, 1) !important;
line-height: 36px;
} }
.btn-login { //单选框的样式
width: 650rpx; .pact {
height: 90rpx; position: relative;
margin: 300rpx auto 0; padding-left: 38rpx;
text-align: center; }
line-height: 90rpx;
color: #fff; .u-checkbox-group {
font-size: 34rpx; position: absolute;
left: 0;
top: 0;
bottom: 0;
margin: auto;
}
.u-checkbox__icon--square {
border-radius: 50rpx !important; border-radius: 50rpx !important;
background-color: #FF780F; width: 22rpx;
height: 22rpx;
} }
button::after{ border: none; } .u-btn {
width: 628rpx;
height: 98rpx;
background: rgba(255, 120, 15, 1) !important;
border-radius: 49rpx;
margin: 0 auto;
font-size: 36rpx;
color: rgba(255, 255, 255, 1) !important;
line-height: 36px;
border: 1px #ff780f solid;
outline: none;
border-color: rgba(255, 120, 15, 1) !important;
margin-top: 225rpx;
}
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 558rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
zoom: 1;
position: relative;
display: flex;
flex-wrap:wrap;
display: -webkit-flex; /* Safari */
.rect_view{
width: 100rpx;
height: 100rpx;
.image{
width: 45rpx;
height: 53rpx;
display: inline-block;
}
flex:1;
margin-top: 77rpx;
}
.rect_view:nth-child(2) image{
width: 57rpx;
height: 45rpx;
}
.rect_butoon{
width: 100%;
position: absolute;
bottom: 0;
height: 85rpx;
text-align: center;
line-height: 85rpx;
border-top: 1px #999999 solid;
}
view{
color: #666;
font-size:24rpx;
margin-top: 30rpx;
}
}
.rect_view:nth-child(1) image,.rect_view:nth-child(1) view{
float: right;
}
.rect_view:nth-child(1) image{
margin-right: 20rpx;
}
.rect_view:nth-child(1){
position: relative;
margin-right: 79rpx;
}
.rect_view:nth-child(1) view{
position: absolute;
bottom: 0;
right: 0;
}
.rect_view:nth-child(2) image,.rect_view:nth-child(2) view{
float: left;
}
.rect_view:nth-child(2) image{
margin-left: 20rpx;
}
.rect_view:nth-child(2){
position: relative;
}
.rect_view:nth-child(2) view{
position: absolute;
bottom: 0;
left: 0;
}
u-button{
margin-top: 225rpx;
}
</style> </style>

View File

@@ -61,7 +61,6 @@
</view> </view>
</template> </template>
<script> <script>
import IMService from '@/static/imservice.js'
import identifying from '@/components/logininput/identifying' import identifying from '@/components/logininput/identifying'
import { import {
mapMutations mapMutations
@@ -108,8 +107,6 @@
let pages = getCurrentPages(); let pages = getCurrentPages();
let prePage = pages[pages.length - 2]; let prePage = pages[pages.length - 2];
this.temp_url = prePage.route; this.temp_url = prePage.route;
console.log(this.imService.lianjie)
this.imService.disconnect()
// console.log(this.temp_url); // console.log(this.temp_url);
}, },
// 切断正常返回 // 切断正常返回
@@ -184,7 +181,6 @@
me.loginIn(res.data.token); //存储一个字符传值 me.loginIn(res.data.token); //存储一个字符传值
// 缓存用户的信息 // 缓存用户的信息
uni.setStorageSync('user_info',res.data); uni.setStorageSync('user_info',res.data);
this.imService.disconnect()
if (res.data.member.has_labels) { if (res.data.member.has_labels) {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
@@ -230,20 +226,13 @@
member_nickname: data.userInfo.nickName, member_nickname: data.userInfo.nickName,
member_avatar: data.userInfo.avatarUrl, member_avatar: data.userInfo.avatarUrl,
}).then(res => { }).then(res => {
console.log(res.errCode);
if (res.errCode == 0) { if (res.errCode == 0) {
this.loginIn(res.data.token); this.loginIn(res.data.token);
uni.setStorageSync('user_info',res.data);
this.show = false; this.show = false;
console.log(res.data.member.member_mobilebind);
if(res.data.member.member_mobilebind) {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "../../pages/index/index"
}); })
} else {
uni.navigateTo({
url: '/pageA/bindinges/bindinges'
});
}
} }
}) })
} }
@@ -257,11 +246,11 @@
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (wxres) => { success: (wxres) => {
// console.log(wxres); console.log(wxres);
uni.getUserInfo({ uni.getUserInfo({
provider: 'weixin', provider: 'weixin',
success: (data) => { success: (data) => {
// console.log(data); console.log(data);
this.$u.api.wechatLogin({ this.$u.api.wechatLogin({
member_wxopenid: data.userInfo.openId, member_wxopenid: data.userInfo.openId,
member_nickname: data.userInfo.nickName, member_nickname: data.userInfo.nickName,
@@ -270,18 +259,10 @@
console.log(res); console.log(res);
if (res.errCode == 0) { if (res.errCode == 0) {
this.loginIn(res.data.token); this.loginIn(res.data.token);
uni.setStorageSync('user_info',res.data);
this.show = false; this.show = false;
console.log(res.data.member.member_mobilebind);
if(res.data.member.member_mobilebind) {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "../../pages/index/index"
}); })
} else {
uni.navigateTo({
url: '/pageA/bindinges/bindinges'
});
}
} }
}) })
} }

View File

@@ -69,15 +69,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.packlist{}
.packlist > view{ .packlist > view{
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
padding: 16upx 0; padding: 16upx 0;
font-size: 30upx; font-size: 26upx;
color: #333; color: #333;
} }
.rict_type { .rict_type {
text-indent: 1rem; text-indent: 1rem;
line-height: 1.4; line-height: 1.2;
} }
</style> </style>

View File

@@ -86,7 +86,7 @@ export default {
this.evalueList = []; this.evalueList = [];
} }
return res.data.length; return res.data.length;
}, }
} }
}; };
</script> </script>

View File

@@ -4,7 +4,7 @@
<view class="info"> <view class="info">
<view class="avatar"> <view class="avatar">
<image :src="item.member_avatar" mode="aspectFill"></image> <image :src="item.member_avatar" mode="aspectFill"></image>
<view class="posi-type" v-if="item.live_status != 0" @click="tozhibo"> <view class="posi-type">
<view> <view>
<u-icon name="play-right-fill" color="#fff" size="20rpx"></u-icon> <u-icon name="play-right-fill" color="#fff" size="20rpx"></u-icon>
</view> </view>
@@ -136,16 +136,6 @@ export default {
deep: true deep: true
}, },
methods: { methods: {
tozhibo(){
this.$u.route({
url:"/pages/zhibo/index",
params:{
url:item.url,
id:item.live_id,
rid:item.chatroom_id
}
})
},
// 打开个性 // 打开个性
openPro() { openPro() {
this.is_open = !this.is_open; this.is_open = !this.is_open;

View File

@@ -54,30 +54,12 @@ export default {
select: 0 select: 0
} }
}, },
props:['item','title', 'default'], props:['item','title'],
watch: { watch:{
select(){ select(){
// console.log(this.select) console.log(this.select)
this.$emit("sel", this.select); this.$emit("sel", this.select);
} }
},
mounted() {
this.setDefaultValue();
},
methods: {
setDefaultValue() {
for (const ikey in this.item) {
if (this.item.hasOwnProperty(ikey)) {
const ielement = this.item[ikey];
for (const dkey in this.default) {
if (this.default.hasOwnProperty(dkey)) {
const delement = this.default[dkey];
if(ikey == dkey) this.select = ikey;
}
}
}
}
}
} }
} }
</script> </script>

View File

@@ -1,9 +1,8 @@
<template> <template>
<view class="userinfo" @click="stopClick()"> <view class="userinfo">
<view class="userhead"> <view class="userhead">
<image class="avatar" :src="item.member_avatar" @click="gotoInfo(item.role,item.member_id,item.store_id)"></image> <image class="avatar" :src="item.member_avatar"></image>
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text> --> <text class="follow" @click="following(item.member_id)">{{ is_follow ? "" : "+" }}</text>
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
</view> </view>
<!-- 点赞 --> <!-- 点赞 -->
<view class="operat zan"> <view class="operat zan">
@@ -24,7 +23,7 @@
<text class="operat-span">{{ comment_num }}</text> <text class="operat-span">{{ comment_num }}</text>
</view> </view>
<!-- 购物车 --> <!-- 购物车 -->
<view class="operat gouwu" v-if="cart_num"> <view class="operat gouwu">
<image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' " <image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' "
mode="" @click="carting()"></image> mode="" @click="carting()"></image>
</view> </view>
@@ -63,10 +62,16 @@
.follow { .follow {
z-index: 100; z-index: 100;
position: absolute; position: absolute;
top: 80rpx; top: 90rpx;
left: 30rpx; left: 40rpx;
width: 50rpx; width: 36rpx;
height: 50rpx; height: 36rpx;
text-align: center;
line-height: 36rpx;
font-size: 34rpx;
border-radius: 50%;
color: #fff;
background-color: #FF780F;
} }
.operat { .operat {
@@ -75,14 +80,12 @@
/* #endif */ /* #endif */
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
// padding: 0 30rpx;
} }
.operat-span { .operat-span {
margin-top: 10rpx; margin-top: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
text-shadow: 0px 0px 4rpx #999999;
} }
.operat-img { .operat-img {
@@ -101,20 +104,18 @@
is_collect: this.list.is_collect || false, is_collect: this.list.is_collect || false,
is_content: false, is_content: false,
is_cart: false, is_cart: false,
cart_num: 0,
comment_num: this.list.comment_num || 0, comment_num: this.list.comment_num || 0,
item: this.list || {}, item: this.list || {}
} }
}, },
watch: { watch: {
list(newValue, old) { list(newValue, old) {
// console.log(newValue.goods.length); console.log(newValue);
this.item = newValue || {}; this.item = newValue || {};
this.is_follow = this.list.is_attention || false; this.is_follow = this.list.is_attention || false;
this.is_like = this.list.is_like || false; this.is_like = this.list.is_like || false;
this.is_collect = this.list.is_collect || false; this.is_collect = this.list.is_collect || false;
this.comment_num = this.list.comment_num || 0; this.comment_num = this.list.comment_num || 0;
this.cart_num = newValue.goods.length;
}, },
cart(newValue, old) { cart(newValue, old) {
// console.log(newValue); // console.log(newValue);
@@ -135,7 +136,7 @@
// 关注 // 关注
following(id) { following(id) {
uni.request({ uni.request({
url: "https://mall.dmygkeji.com/api/member/attentionMember", url: "https://dmmall.sdbairui.com/api/member/attentionMember",
method: "POST", method: "POST",
data: { data: {
member_id: id member_id: id
@@ -151,11 +152,6 @@
title: res.data.message, title: res.data.message,
icon: "none" icon: "none"
}) })
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} }
} }
}) })
@@ -164,7 +160,7 @@
likeType(id) { likeType(id) {
// console.log(id); // console.log(id);
uni.request({ uni.request({
url: "https://mall.dmygkeji.com/api/article/articleLike", url: "https://dmmall.sdbairui.com/api/article/articleLike",
method: "POST", method: "POST",
data: { data: {
article_id: id article_id: id
@@ -178,11 +174,6 @@
// console.log(res); // console.log(res);
this.is_like = !this.is_like; this.is_like = !this.is_like;
this.list.like_num = res.data.data.num; this.list.like_num = res.data.data.num;
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
@@ -195,7 +186,7 @@
// 收藏 // 收藏
collecting(id) { collecting(id) {
uni.request({ uni.request({
url: "https://mall.dmygkeji.com/api/article/articleCollect", url: "https://dmmall.sdbairui.com/api/article/articleCollect",
method: "POST", method: "POST",
data: { data: {
article_id: id article_id: id
@@ -209,11 +200,6 @@
console.log(res.data.num); console.log(res.data.num);
this.is_collect = !this.is_collect; this.is_collect = !this.is_collect;
this.list.collect_num = res.data.data.num; this.list.collect_num = res.data.data.num;
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none"
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
@@ -241,20 +227,6 @@
cart: this.is_cart cart: this.is_cart
}); });
}, },
gotoInfo(type,id,s_id) {
if (type == 2) {
uni.navigateTo({
url: "/pageC/merchant/index?id=" + s_id
})
} else {
uni.navigateTo({
url: "/pageB/details/index?id=" + id
})
}
},
// 冒泡
stopClick() {
}
} }
} }
</script> </script>

View File

@@ -45,7 +45,6 @@
<view>我们有万能穿搭公式</view> <view>我们有万能穿搭公式</view>
</view> </view>
</view> </view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@@ -57,18 +56,21 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.price = option.price; this.price = option.price;
// this.isNewmembervoucher();
}, },
methods: { methods: {
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.price = res.data.price;
}
})
},
exchangeCoupon() { exchangeCoupon() {
this.$u.api.getCoupon({ id: 1 }).then(res => { this.$u.api.getCoupon({ id: 1 }).then(res => {
if(res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
url: '/pageE/tool/MineCoupon'
})
} else {
this.$u.toast(res.message); this.$u.toast(res.message);
} if(res.errCode == 0) {}
}) })
}, },
} }

View File

@@ -1,89 +0,0 @@
<template>
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
<view class="coupon">
<view class="price">{{ newMemberCoupon.price }}</view>
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
</view>
</u-popup>
</template>
<script>
export default {
data() {
return {
showCoupon: true,
newMemberCoupon: {},
}
},
watch: {
showCoupon(value) {
if(!value) {
uni.navigateBack();
}
}
},
onShow() {
this.isNewmembervoucher();
},
methods: {
viewCoupon() {
this.$u.route('/pageB/coupon/details', {
price: this.newMemberCoupon.price
});
},
// 是否显示新人优惠券
isNewmembervoucher() {
this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) {
this.newMemberCoupon = res.data;
} else {
this.showCoupon = false;
}
})
},
}
}
</script>
<style lang="scss">
page{
background-color: rgba(0,0,0,0);
}
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;
}
.coupon {
width: 750rpx;
height: 583rpx;
position: relative;
.price {
z-index: 3;
color: #EBB36E;
position: absolute;
font-size: 92rpx;
font-weight: bold;
top: 200rpx;
left: 50%;
font-family: PingFang SC;
transform: translate(-68%, 0);
}
.coupon-image {
width: 568rpx;
height: 583rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-60%, 0);
}
.close-image {
position: absolute;
top: 0;
right: 155rpx;
width: 60rpx;
height: 60rpx;
}
}
}
</style>

View File

@@ -19,8 +19,7 @@
<view class="box"> <view class="box">
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item" <videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
@getArticlelist="getArticlelist"></videoItem> @getArticlelist="getArticlelist"></videoItem>
<view class="no-data" v-if="!listInfo && page">暂无数据</view> <view class="no-data" v-show="!listInfo && !page">暂无数据</view>
<u-loadmore v-else class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@@ -75,14 +74,7 @@ export default {
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
listInfo: [], // 列表详情 listInfo: [], // 列表详情
member_id: 0, member_id: 0,
page: 1, page: 0,
status: 'loadmore',
iconType: 'circle',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '实在没有了'
},
} }
}, },
onLoad(option) { onLoad(option) {
@@ -90,24 +82,14 @@ export default {
this.member_id = option.id; this.member_id = option.id;
this.getUserInfo(option.id); this.getUserInfo(option.id);
this.getArticlelist(); this.getArticlelist();
},
onReachBottom() {
// this.page++;
this.getArticlelist();
}, },
methods:{ methods:{
// 获取信息 // 获取信息
getUserInfo(id) { getUserInfo(id) {
this.$u.post("MemberExpert/expertInfo",{member_id: id}).then(res => { this.$u.post("MemberExpert/expertInfo",{member_id: id}).then(res => {
console.log(res); // console.log(res);
this.userInfo = res.data.info; this.userInfo = res.data.info;
console.log(this.userInfo.is_attention); // console.log(this.userInfo);
if(this.userInfo.is_attention == 1){
this.$u.api.dynamicRead({id}).then((res)=>{
console.log(res)
})
}
}) })
}, },
// 获取列表 // 获取列表
@@ -119,23 +101,13 @@ export default {
}).then(res => { }).then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
// console.log(res); // console.log(res);
// this.listInfo = res.data.list;
// console.log(this.listInfo);
if (this.page == 1) {
this.listInfo = res.data.list; this.listInfo = res.data.list;
this.status = "loadmore"; // console.log(this.listInfo);
} else if (res.data.length == 0) {
this.status = "nomore";
} else {
this.listInfo = this.listInfo.concat(res.data.list);
}
this.page++;
} else { } else {
console.log(res.message); console.log(res.message);
} }
}) })
}, },
dianji(a){ dianji(a){
console.log(a); console.log(a);
if(typeof a == "object"){ if(typeof a == "object"){
@@ -143,13 +115,7 @@ export default {
}else{ }else{
this.num = a this.num = a
} }
if (a == 0) {
this.page = 1;
this.getArticlelist(); this.getArticlelist();
} else if (a == 1) {
this.page = 1;
this.getArticlelist();
}
} }
} }
} }

View File

@@ -1,6 +1,5 @@
<template> <template>
<view class="follow"> <view class="follow">
<scroll-view scroll-y :style="{ height: viewHeight }" @scrolltolower="loadmore" class="container">
<view class="sosuo" @click="searchValue"> <view class="sosuo" @click="searchValue">
<image src="/static/image/common/10.png"></image> <image src="/static/image/common/10.png"></image>
<text>输入达人名称</text> <text>输入达人名称</text>
@@ -8,16 +7,12 @@
<view class="list" style="margin-left:-20rpx"> <view class="list" style="margin-left:-20rpx">
<darenItem style="margin-top:20rpx;margin-left:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem> <darenItem style="margin-top:20rpx;margin-left:20rpx;" v-for="item in recommendList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#ECECEC" font-size="14" margin-top="40" margin-bottom="20" v-if="recommendList.length > pageSize" @loadmore="loadmore"></u-loadmore>
</scroll-view>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.follow{ .follow{
background-color: #ECECEC; background-color: #ECECEC;
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
.container {
box-sizing: border-box;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
.sosuo{ .sosuo{
width: 100%; width: 100%;
@@ -43,7 +38,6 @@
width: calc(100% + 23rpx); width: calc(100% + 23rpx);
margin-right: -23rpx; margin-right: -23rpx;
} }
}
} }
</style> </style>
<script> <script>
@@ -56,45 +50,22 @@ export default {
}, },
data(){ data(){
return{ return{
pageSize: 2,
recommendList: [], // 推荐达人 recommendList: [], // 推荐达人
page: 1,
loadStatus: 'loadmore',
timer: true,
viewHeight: '',
} }
}, },
onLoad() {
this.setViewHeight();
},
onShow() { onShow() {
this.getRecommendList(); this.getRecommendList();
}, },
methods: { methods: {
async getRecommendList({ load = 'reload' } = {}) { getRecommendList() {
const res = await this.$u.api.getAllRecommendList({ page: this.page }); this.$u.api.getRecommendList().then(res => {
this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.recommendList = res.data.list; this.recommendList = res.data.list;
if(load == 'loadmore') this.recommendList.push(...res.data.list);
} }
return res.data.list.length;
},
loadmore() {
if(!this.timer) return false;
this.timer = false;
this.loadStatus = "loading";
this.page++;
this.getRecommendList({ load: "loadmore" }).then(length => {
this.loadStatus = "nomore";
if(length == 0) this.page--;
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
}) })
}, },
changeType(member_id){ changeType(member_id){
// console.log(member_id); console.log(member_id);
this.$emit("pChangeType") this.$emit("pChangeType")
this.$u.api.attentionMember({ this.$u.api.attentionMember({
member_id: member_id member_id: member_id
@@ -105,13 +76,9 @@ export default {
}, },
searchValue() { searchValue() {
uni.navigateTo({ uni.navigateTo({
url: '/pageB/search/index?type=2&curent=1' url: '/pageB/search/index?type=2'
}) })
}, },
setViewHeight() {
const res = uni.getSystemInfoSync();
this.viewHeight = res.windowHeight + 'px';
}
}, },
} }
</script> </script>

View File

@@ -47,8 +47,8 @@
<view class="info"> <view class="info">
<image :src="child.member_avatar" mode=""></image> <image :src="child.member_avatar" mode=""></image>
<text>{{ child.member_nickname }}</text> <text>{{ child.member_nickname }}</text>
<u-icon class="icon" name="play-right-fill" color="#666" size="10rpx" v-if="0"></u-icon> <u-icon v-if="!child.is_nickanme" class="icon" name="play-right-fill" color="#666" size="10rpx"></u-icon>
<text v-if="0">{{ child.reply_member_nickname }}</text> <text v-if="!child.is_nickanme">{{ child.reply_member_nickname }}</text>
</view> </view>
<view class="child_content">{{ child.content }}</view> <view class="child_content">{{ child.content }}</view>
</view> </view>
@@ -66,7 +66,7 @@
<!-- 评论box --> <!-- 评论box -->
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx"> <u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
<view class="edit-box"> <view class="edit-box">
<input type="text" :focus="is_focus" :placeholder="edit_text_other" @focus="focus" v-model="send_value"> <input type="text" focus :placeholder="edit_text_other" @focus="focus" v-model="send_value">
<text @click="sendComment">发送</text> <text @click="sendComment">发送</text>
</view> </view>
</u-popup> </u-popup>
@@ -81,6 +81,7 @@
<image :src="item.goods_image" mode="aspectFill"></image> <image :src="item.goods_image" mode="aspectFill"></image>
<view> <view>
<text class="title">{{ item.goods_advword }}</text> <text class="title">{{ item.goods_advword }}</text>
<text class="name">{{ item.goods_name }}</text>
<text class="price">{{ item.goods_promotion_price }}</text> <text class="price">{{ item.goods_promotion_price }}</text>
</view> </view>
</view> </view>
@@ -158,21 +159,17 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.label { .label {
height: 40rpx; padding: 6rpx 10rpx;
padding: 4rpx 14rpx; margin: 0 10rpx 10rpx 0;
margin-right: 10rpx; font-size: 24rpx;
margin-bottom: 10rpx;
font-size: 26rpx;
text-align: center;
line-height: 38rpx;
color: #fff; color: #fff;
border-radius: 10rpx; border-radius: 6rpx;
background-color: rgba(0, 0, 0, .6); background-color: #000000;
opacity: 0.5;
} }
} }
} }
.userinfo{ .userinfo{
z-index: 9999;
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
top: 50%; top: 50%;
@@ -255,7 +252,6 @@
} }
.child_content { .child_content {
margin: 18rpx 0 18rpx 30rpx; margin: 18rpx 0 18rpx 30rpx;
font-size: 26rpx;
} }
} }
.more-reply { .more-reply {
@@ -296,7 +292,6 @@
height: 90rpx; height: 90rpx;
& > input { & > input {
width: 80%; width: 80%;
font-size: 24rpx;
padding: 4rpx 20rpx; padding: 4rpx 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
} }
@@ -335,11 +330,10 @@
& > view { & > view {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-between;
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
.title { .title {
line-height: 40rpx;
} }
.name { .name {
width: 500rpx; width: 500rpx;
@@ -350,8 +344,6 @@
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
margin:8rpx 0;
line-height:36rpx;
} }
.price { .price {
color: #FF3131; color: #FF3131;
@@ -415,7 +407,7 @@ export default {
list:{}, list:{},
swiper_id: "", swiper_id: "",
page: 0, // 主评论 page: 0, // 主评论
page_: {}, // 子评论 page_: [], // 子评论
cart_type: false, // 显示购物车 cart_type: false, // 显示购物车
is_comment: false, // 显示评论 is_comment: false, // 显示评论
is_focus: false, // 聚焦 is_focus: false, // 聚焦
@@ -425,11 +417,10 @@ export default {
cart_len: 0, cart_len: 0,
photo_len: 0, photo_len: 0,
comment_num: 0, comment_num: 0,
is_more: true,
edit_text: "有爱评论,说点好听的 ~", edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~", edit_text_other: "有爱评论,说点好听的 ~",
commentList: [], // 评论 commentList: [], // 评论
allList: {}, // 全部子评论 allList: [], // 全部子评论
status: 'loadmore', status: 'loadmore',
iconType: 'circle', iconType: 'circle',
loadText: { loadText: {
@@ -443,7 +434,6 @@ export default {
onLoad(option){ onLoad(option){
this.article_id = option.id; this.article_id = option.id;
this.articleInfo(this.article_id); this.articleInfo(this.article_id);
this.allList = {};
}, },
// 监听返回按钮 // 监听返回按钮
onBackPress() { onBackPress() {
@@ -502,31 +492,18 @@ export default {
this.commentList = this.commentList.concat(res.data); this.commentList = this.commentList.concat(res.data);
} }
this.page++; this.page++;
let list = this.commentList;
list.forEach((item,index) => {
// console.log(item);
item.page = 0;
item.commentList = [];
})
this.commentList = list;
} }
}) })
}, },
// 打开评论输入 // 打开评论输入
openKeyInput(data,index) { openKeyInput(data,index) {
let me = this;
// console.log(data); // console.log(data);
this.is_edit = true; this.is_edit = true;
setTimeout(() => { setTimeout(() => {
this.is_focus = true; this.is_focus = true;
}, 200) }, 200)
uni.onKeyboardHeightChange(function(res){
if (res.height == 0) {
me.is_focus = false;
}
})
this.comment_id = index; this.comment_id = index;
if (data.content) { if (data.id) {
this.edit_text_other = "回复@" + data.member_nickname; this.edit_text_other = "回复@" + data.member_nickname;
this.pid = data.id; this.pid = data.id;
this.reply_id = data.member_id; this.reply_id = data.member_id;
@@ -549,25 +526,15 @@ export default {
pid: this.pid, pid: this.pid,
reply_id: this.reply_id, reply_id: this.reply_id,
}).then(res => { }).then(res => {
// console.log(res.data); // console.log(res.data.data);
this.send_value = "";
if (res.errCode == 0) { if (res.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num; this.comment_num = res.data.num;
// console.log(this.comment_num); // console.log(this.comment_num);
this.is_edit = false; this.is_edit = false;
// console.log(res.data.data.reply_id);
let p_id = res.data.data.pid;
// console.log(p_id);
if (res.data.data.pid) { if (res.data.data.pid) {
this.commentList[this.comment_id].reply_count = true; this.commentList[this.comment_id].reply_count = true;
console.log(this.allList[p_id]); this.allList[this.comment_id].unshift(res.data.data);
if (this.allList[p_id]) {
this.allList[p_id].push(res.data.data);
} else {
this.allList[p_id] = [];
this.allList[p_id].push(res.data.data);
}
console.log(this.allList);
} else { } else {
this.commentList.unshift(res.data.data); this.commentList.unshift(res.data.data);
} }
@@ -578,21 +545,15 @@ export default {
}, },
// 发现回复列表 // 发现回复列表
getReplyList(id) { getReplyList(id) {
uni.showLoading({ this.page_[id] = 0;
title: "loading..."
})
if (!this.page_[id] === 0) { if (!this.page_[id] === 0) {
} }
console.log(this.page_[id]);
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => { this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
uni.hideLoading(); console.log(this.page_);
if (res.errCode == 0) { if (res.errCode == 0) {
// if (res.data.length < 10) {
// this.is_more = false;
// }
this.page_[id]++; this.page_[id]++;
this.allList[id] = res.data; this.allList[id] = res.data;
this.$forceUpdate();
console.log(this.allList);
} }
}) })
}, },
@@ -623,7 +584,7 @@ export default {
delta: 1 delta: 1
}) })
}, },
focus(e) { focus() {
setTimeout(function(){ setTimeout(function(){
uni.showSoftKeybord; uni.showSoftKeybord;
}, 200) }, 200)

View File

@@ -19,22 +19,18 @@
</view> </view>
<view class="info"> <view class="info">
<view class="title u-line-2"> <view class="title u-line-2">
<text class="store-name" @click="toStorePage(goodsInfo.store_id)">{{ goodsInfo.store_name }}</text> <text class="store-name">{{ goodsInfo.store_name }}</text>
<text class="goods-name">{{ goodsInfo.goods_name }}</text> <text class="goods-name">{{ goodsInfo.goods_name }}</text>
</view> </view>
<view class="price-collect"> <view class="price-collect">
<view class="pic" v-if="type == 2"> <view class="pic" v-if="type != 3">
<text>{{ goodsInfo.pintuan_price || '0.00' }}</text> <text>{{ goodsInfo.pintuan_price || '0.00' }}</text>
<s>{{ goodsInfo.goods_price || '0.00' }}</s> <s>{{ goodsInfo.goods_price || '0.00' }}</s>
</view> </view>
<view class="pic" v-else-if="type == 1"> <view class="collect" @click="switchCollect(goodsInfo.goods_collect)">
<text>{{ goodsInfo.goods_price || '0.00' }}</text> <u-icon name="star" color="#474747" size="28" v-if="!goodsInfo.goods_collect"></u-icon>
<s>{{ goodsInfo.goods_marketprice || '0.00' }}</s> <u-icon name="star-fill" color="#FF7807" size="28" v-else></u-icon>
</view> <text>{{ !goodsInfo.goods_collect ? '收藏' : '已收藏' }}</text>
<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
<u-icon name="star-fill" color="#FF7807" size="28" v-if="goodsInfo.is_collect == 1"></u-icon>
<u-icon name="star" color="#474747" size="28" v-else></u-icon>
<text>{{ goodsInfo.is_collect == 1 ? '已收藏' : '收藏' }}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -104,7 +100,7 @@
</u-popup> </u-popup>
<u-popup v-model="showInvolvementUser" mode="center" z-index="10078"> <u-popup v-model="showInvolvementUser" mode="center" z-index="10078">
<view class="involvement-container" v-if="involvemenGroupInfo.length"> <view class="involvement-container" v-if="involvemenGroupInfo.length">
<view class="title">参与<text class="user-name u-line-1">{{ involvemenGroupInfo[0].member_nickname }}</text>的拼团</view> <view class="title u-line-1">参与{{ involvemenGroupInfo[0].member_nickname }}的拼团</view>
<view class="involvement-view"> <view class="involvement-view">
<view class="item" v-for="(user, i) in involvemenGroupInfo" :key="i"> <view class="item" v-for="(user, i) in involvemenGroupInfo" :key="i">
<image class="avatar" :src="user.member_avatar"></image> <image class="avatar" :src="user.member_avatar"></image>
@@ -130,19 +126,20 @@
<view class="head"> <view class="head">
<image class="image" :src="goodsInfo.goods_image"></image> <image class="image" :src="goodsInfo.goods_image"></image>
<view class="info"> <view class="info">
<view class="goods-name u-line-2">{{goodsInfo.goods_name}}</view> <text class="u-line-2">{{goodsInfo.goods_name}}</text>
<text v-if="type == 1">{{ goodsInfo.goods_price }}</text> <text v-if="type == 1">{{ goodsInfo.goods_price }}</text>
<text v-else-if="type == 2">{{ goodsInfo.pintuan_price }}</text> <text v-else-if="type == 2">{{ goodsInfo.pintuan_price }}</text>
<text v-else-if="type == 3">{{ groupbuyInfo.groupbuy_price }}</text> <text v-else-if="type == 3">{{ groupbuyInfo.groupbuy_price }}</text>
</view> </view>
</view> </view>
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item" :default="goodsInfo.goods_spec"></guige> <guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
<view class="num"> <view class="num">
<text>购买数量</text> <text>购买数量</text>
<u-number-box v-model="goodsNumber" :min="1"></u-number-box> <u-number-box v-model="goodsNumber" :min="1"></u-number-box>
</view> </view>
<!-- <view style="height:100rpx"></view> --> <view style="height:100rpx"></view>
</view> </view>
<u-toast ref="uToast" />
</scroll-view> </scroll-view>
</u-popup> </u-popup>
<!-- 普通商品 tool --> <!-- 普通商品 tool -->
@@ -183,7 +180,7 @@
<view class="btn" v-else @click="spikeGoods">立即秒杀</view> <view class="btn" v-else @click="spikeGoods">立即秒杀</view>
</view> </view>
<!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> --> <!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> -->
<u-toast ref="uToast" :z-index='200000' /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@@ -199,7 +196,7 @@ export default {
goodsInfo: {}, // 商品信息 goodsInfo: {}, // 商品信息
storeInfo: {}, // 店铺信息 storeInfo: {}, // 店铺信息
glist: [], // 规格列表 glist: [], // 规格列表
id: 0, // 商品id id: 0, // 商品id/秒杀id/拼团 id
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券 type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
groupUser: [], // 拼团用户 groupUser: [], // 拼团用户
user_suc: [], // 拼团成功用户 user_suc: [], // 拼团成功用户
@@ -218,9 +215,7 @@ export default {
sel: "", // 拼接的规格 sel: "", // 拼接的规格
quanxuan: false, // 规格是否选择 quanxuan: false, // 规格是否选择
debounce: true, // 防止多次提交订单 debounce: true, // 防止多次提交订单
storeid:0, // 店铺 id storeid:0 // 店铺id
pintuan_id: '', // 拼团 id
groupbuy_id: '', // 秒杀 id
} }
}, },
components: { components: {
@@ -246,7 +241,7 @@ export default {
// this.type = 1; // this.type = 1;
this.id = option.id; this.id = option.id;
// 先请求普通商品详情获取商品类型再渲染页面 // 先请求普通商品详情获取商品类型再渲染页面
this.ordinaryDetails(); this.ordinaryDetails(this.id);
}, },
onShow() { onShow() {
this.debounce = true; this.debounce = true;
@@ -285,7 +280,7 @@ export default {
id:this.storeid id:this.storeid
}).then((res)=>{ }).then((res)=>{
console.log(res) console.log(res)
let user = new Friend(res.data.member_id,res.data.store_name,res.data.member_avatar) let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({ this.$u.route({
url:"/pageD/privateChat/privateChat", url:"/pageD/privateChat/privateChat",
params:{ params:{
@@ -382,58 +377,55 @@ export default {
purchase() { purchase() {
this.settlementOrder(); this.settlementOrder();
}, },
getGoodsDetails() { getGoodsDetails(id) {
switch (this.type) { switch (this.type) {
case 1: case 1:
this.ordinaryDetails(); this.ordinaryDetails(id);
break; break;
case 2: case 2:
this.pinTuanDetails(); this.pinTuanDetails(id);
break; break;
case 3: case 3:
this.spikeGoodsDetails(); this.spikeGoodsDetails(id);
break; break;
default: default:
break; break;
} }
}, },
// 普通商品详情 // 普通商品详情
ordinaryDetails() { ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: this.id }).then(res => { this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
// console.log(res)
if (res.errCode == 0) { if (res.errCode == 0) {
this.evaluate = res.data.goods_evaluate_info; this.evaluate = res.data.goods_evaluate_info;
this.goodsInfo = res.data.goods; this.goodsInfo = res.data.goods;
this.storeInfo = res.data.store; this.storeInfo = res.data.store;
this.setSwiperList(res.data.goods_image); this.setSwiperList(res.data.goods_image);
this.glist = res.data.spec_list; this.glist = res.data.spec_list;
this.storeid = res.data.store.store_id; this.storeid = res.data.store.store_id
// console.log(this.goodsInfo.mobile_body);
this.type = res.data.view_type; this.type = res.data.view_type;
this.setTitle(); this.setTitle();
if(this.type == 1) { if(this.type == 1) {
this.id = res.data.goods.goods_id; this.id = res.data.goods.goods_id;
} else if(this.type == 2) { } else if(this.type == 2) {
this.id = res.data.goods.goods_id; this.id = res.data.goods.pintuan_id;
this.pintuan_id = res.data.goods.pintuan_id; this.getGoodsDetails(this.id);
this.getGoodsDetails();
} else if(this.type == 3) { } else if(this.type == 3) {
this.id = res.data.goods.goods_id; this.id = res.data.groupbuy_id;
this.groupbuy_id = res.data.groupbuy_id; this.getGoodsDetails(this.id);
this.getGoodsDetails();
} }
} }
}) })
}, },
// 拼团详情 // 拼团详情
pinTuanDetails() { pinTuanDetails(id) {
console.log(this.id);
this.$u.api.getPinTuanDetails({ this.$u.api.getPinTuanDetails({
pintuan_id: this.pintuan_id, pintuan_id: id
goods_id: this.id,
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.evaluate = res.data.data.goods_evaluate_info; this.evaluate = res.data.data.goods_evaluate_info;
this.goodsInfo = res.data.data.goods; this.goodsInfo = res.data.data.goods;
this.pintuan_id = res.data.data.pintuan_id;
this.setSwiperList(res.data.data.goods_image); this.setSwiperList(res.data.data.goods_image);
this.glist = res.data.data.spec_list; this.glist = res.data.data.spec_list;
this.user_suc = res.data.data.user_suc; this.user_suc = res.data.data.user_suc;
@@ -443,14 +435,13 @@ export default {
}) })
}, },
// 秒杀详情 // 秒杀详情
spikeGoodsDetails() { spikeGoodsDetails(id) {
this.$u.api.getSpikeInfo({ this.$u.api.getSpikeInfo({
groupbuy_id: this.groupbuy_id, groupbuy_id: id
goods_id: this.id,
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
// this.id = res.data.groupbuy_id;
this.groupbuyInfo = res.data.groupbuyInfo; this.groupbuyInfo = res.data.groupbuyInfo;
this.groupbuy_id = res.data.groupbuyInfo.groupbuy_id;
this.evaluate = res.data.goodsInfo.goods_evaluate_info; this.evaluate = res.data.goodsInfo.goods_evaluate_info;
this.goodsInfo = res.data.goodsInfo.goods; this.goodsInfo = res.data.goodsInfo.goods;
this.setSwiperList(res.data.goodsInfo.goods_image); this.setSwiperList(res.data.goodsInfo.goods_image);
@@ -471,26 +462,13 @@ export default {
} }
}) })
}, },
// 验证能否拼团
async pintuanVerify({ pintuan_id, pintuangroup_headid }) {
const res = await this.$u.api.pintuanVerify({
pintuan_id: pintuan_id,
pintuangroup_headid: pintuangroup_headid,
})
if(res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
});
}
return res.errCode;
},
/* /*
* @description 下单 订单步骤1展示结算数据 * @description 下单 订单步骤1展示结算数据
* @params {Number} type involvement 拼团或者 默认开团 * @params {Number} type involvement 拼团或者 默认开团
* @params {Number} num 数量 * @params {Number} num 数量
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀) * @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
**/ **/
async settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) { settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
if(type != 'involvement') { if(type != 'involvement') {
if(!this.showSpec) { if(!this.showSpec) {
this.showSpec = true; this.showSpec = true;
@@ -512,33 +490,26 @@ export default {
} }
} }
if(!this.debounce) return; if(!this.debounce) return;
this.debounce = false;
let params = { let params = {
ifcart: ifcart, ifcart: ifcart,
cart_id: [this.goodsInfo.goods_id + '|' + num], cart_id: [this.goodsInfo.goods_id + '|' + num],
} }
if(this.type == 2) { if(this.type == 2) {
if(type == 'involvement') { if(type == 'involvement') {
// 验证能否拼团 // const userId = uni.getStorageSync('user_info').member.member_id;
const whether = await this.pintuanVerify({
pintuan_id: this.pintuan_id,
pintuangroup_headid: this.involvemenGroupInfo[0].user_id
}).then(status => {
if(status != 0) return true;
else return false;
})
if(whether) return false;
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id); this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
// console.log(this.$store.state.pintuangroup_headid);
Object.assign(params, { Object.assign(params, {
pintuan_id: this.pintuan_id, pintuan_id: this.id,
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id, pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
}) })
} else { } else {
Object.assign(params, { Object.assign(params, {
pintuan_id: this.pintuan_id, pintuan_id: this.id,
}) })
} }
} }
this.debounce = false;
this.$u.api.settlementOrder(params).then(res => { this.$u.api.settlementOrder(params).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
// console.log('type' + this.type); // console.log('type' + this.type);
@@ -548,10 +519,8 @@ export default {
url: '/pageC/cart/ConfirmOrder' url: '/pageC/cart/ConfirmOrder'
}) })
} else { } else {
this.$refs.uToast.show({
title: res.message,
});
this.debounce = true; this.debounce = true;
this.$u.toast(res.message);
} }
}) })
}, },
@@ -576,9 +545,6 @@ export default {
} }
} }
// console.log(arr) // console.log(arr)
// 后台的 spec 是按升序排的
arr.sort((a, b) => a - b);
// console.log(arr)
if(arr.length == index){ if(arr.length == index){
this.sel = arr.join("|") this.sel = arr.join("|")
this.quanxuan = true; this.quanxuan = true;
@@ -590,11 +556,8 @@ export default {
// console.log(id) // console.log(id)
// 选择完规格后设商品type = 1 // 选择完规格后设商品type = 1
// this.type = 1; // this.type = 1;
// 改变 goods_id this.getGoodsDetails(this.glist[id])
// console.log(this.glist);
this.id = this.glist[id]; this.id = this.glist[id];
// console.log(this.id);
this.getGoodsDetails();
}, },
// 设置页面标题 // 设置页面标题
setTitle() { setTitle() {
@@ -639,21 +602,14 @@ export default {
current: arr[index] current: arr[index]
}) })
}, },
switchCollect(status = 0) { switchCollect(status) {
if(status == 1) { if(status) {
this.removeFavorite(); this.removeFavorite();
} else { } else {
this.addFavoriteGoods(); this.addFavoriteGoods();
} }
}, },
addFavoriteGoods() { addFavoriteGoods() {
// // 尝试登录
// if (!this.$store.state.hasLogin) {
// uni.navigateTo({
// url: "pageA/login/login"
// })
// return false;
// }
this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => { this.$u.api.addFavoriteGoods({ fid: this.goodsInfo.goods_id }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.getGoodsDetails(this.id); this.getGoodsDetails(this.id);
@@ -670,12 +626,7 @@ export default {
this.$u.toast(res.message); this.$u.toast(res.message);
} }
}) })
}, }
toStorePage(id) {
this.$u.route('pageC/merchant/index', {
id: id
});
},
}, },
} }
</script> </script>
@@ -1008,13 +959,6 @@ export default {
font-size: 32rpx; font-size: 32rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
position: relative; position: relative;
display: flex;
align-items: center;
justify-content: center;
.user-name {
display: inline-block;
max-width: 200rpx;
}
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
@@ -1158,7 +1102,7 @@ export default {
height: 98rpx; height: 98rpx;
width: 100%; width: 100%;
bottom:0; bottom:0;
// border-top: 1rpx solid #ececec; border-top: 1rpx solid #ececec;
z-index: 10076; z-index: 10076;
.navs{ .navs{
display: flex; display: flex;
@@ -1188,11 +1132,9 @@ export default {
} }
.spec-popup { .spec-popup {
padding: 30rpx; padding: 30rpx;
margin-bottom: 130rpx;
box-sizing: border-box; box-sizing: border-box;
// height: 600rpx; max-height: 750rpx;
max-height: 60vh; .head{
.head {
display: flex; display: flex;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.image{ .image{
@@ -1207,25 +1149,24 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-left: 27rpx; margin-left: 27rpx;
flex-direction: column; flex-direction: column;
.goods-name { >text:first-child{
height: 76rpx;
line-height: 38rpx;
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
} }
> text:last-child { >text:last-child{
font-size: 30rpx; font-size: 30rpx;
color: #ff3131; color: #ff3131;
} }
} }
} }
.num {
.num{
height: 84rpx; height: 84rpx;
display: flex; display: flex;
border-bottom: #ececec solid 2rpx; border-bottom: #ececec solid 2rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
> text { >text{
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
} }

View File

@@ -16,20 +16,12 @@ export default {
type: '', // 1 商家达人社区 2 商品 type: '', // 1 商家达人社区 2 商品
keyword: "", keyword: "",
searchwordlist: [], searchwordlist: [],
sid:0
} }
}, },
// type: 1 商品 2: 其他 // type: 2 商品 1: 其他
onLoad(option) { onLoad(option) {
console.log(option.id)
if(option.id != undefined || option.id){
this.sid = option.id
}
this.type = option.type; this.type = option.type;
this.curent = option.curent || 0
this.getWordList(); this.getWordList();
if(option.type == 1) this.setNavSearchInput('搜索您需要的商品');
else if(option.type == 2) this.setNavSearchInput('请输入搜索内容');
}, },
// 点击搜索按钮 // 点击搜索按钮
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@@ -44,18 +36,6 @@ export default {
this.search(this.keyword); this.search(this.keyword);
}, },
methods:{ methods:{
setNavSearchInput(placeholder) {
// #ifdef APP-PLUS
// 修改 placeholder
webview.setStyle({
'titleNView': {
"searchInput": { //修改当前窗口search样式
"placeholder": placeholder,
}
}
})
// #endif
},
getWordList() { getWordList() {
this.$u.api.searchwordlist({type:this.type}).then(res => { this.$u.api.searchwordlist({type:this.type}).then(res => {
console.log(res) console.log(res)
@@ -72,7 +52,6 @@ export default {
let params = { let params = {
value: value, value: value,
type: this.type, type: this.type,
curent:this.curent
} }
if(this.type == 2) { if(this.type == 2) {
this.$u.route({ this.$u.route({
@@ -80,10 +59,6 @@ export default {
params: params, params: params,
}) })
}else{ }else{
if(this.sid !=0 ){
params.sid = this.sid
console.log(this.sid)
}
this.$u.route({ this.$u.route({
url: "/pageB/search/searchGoods", url: "/pageB/search/searchGoods",
params: params, params: params,

View File

@@ -7,7 +7,7 @@
</view> </view>
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">社区</view> <view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">社区</view>
</view> </view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore" v-show="current == 0" :scroll-top="scrollTop" @scroll="scroll"> <scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore" v-show="current == 0">
<view v-for="goods in goodsList" :key="goods.store_id" class="goods-item" @click="toDetailsPage(goods.store_id)"> <view v-for="goods in goodsList" :key="goods.store_id" class="goods-item" @click="toDetailsPage(goods.store_id)">
<image :src="goods.store_avatar"></image> <image :src="goods.store_avatar"></image>
<view class="right"> <view class="right">
@@ -18,7 +18,7 @@
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty> <u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view> </scroll-view>
<scroll-view style="width:100%;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 2 " :scroll-top="scrollTop" @scroll="scroll"> <scroll-view style="width:100%;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 2 ">
<view class="box" style="padding: 0 30rpx;"> <view class="box" style="padding: 0 30rpx;">
<view style="display:flex"> <view style="display:flex">
<view> <view>
@@ -34,9 +34,9 @@
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty> <u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view> </scroll-view>
<scroll-view style="width:100%;padding: 0rpx 30rpx;margin-right:23rpx;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 1 " :scroll-top="scrollTop" @scroll="scroll"> <scroll-view style="width:100%;padding: 20rpx 30rpx;margin-right:23rpx;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 1 ">
<view class="list" > <view class="list" >
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0px 3rpx 7rpx 0px rgba(153, 153, 153, 0.35);" v-for="item in goodsList" :key="item.member_id" :info="item" v-on:pChangeType="changeType"></darenItem> <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0px 3rpx 7rpx 0px rgba(153, 153, 153, 0.35);" v-for="item in goodsList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty> <u-empty mode="list" v-if="!goodsList.length"></u-empty>
@@ -59,11 +59,7 @@ export default {
scrollHeight: '', scrollHeight: '',
loadStatus: 'loadmore', loadStatus: 'loadmore',
timer: true, // 防止上拉加载短时间内多次调用, timer: true, // 防止上拉加载短时间内多次调用,
value:"", value:""
scrollTop: 0,
old: {
scrollTop: 0
}
} }
}, },
components:{ components:{
@@ -82,22 +78,16 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.value = option.value; this.value = option.value;
this.current = option.curent
this.setViewHeight(); this.setViewHeight();
this.ShopSearch() this.ShopSearch()
this.setNavSearchInput(this.value); this.setNavSearchInput(this.value);
}, },
onNavigationBarSearchInputConfirmed(value) { onNavigationBarSearchInputConfirmed(value) {
this.value = value.text this.value = value.text
this.page = 1
// console.log(this.value) // console.log(this.value)
this.ShopSearch() this.ShopSearch()
}, },
methods: { methods: {
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop; // 必要
},
// 动态设置导航栏搜索框内容 // 动态设置导航栏搜索框内容
setNavSearchInput(keyword) { setNavSearchInput(keyword) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
@@ -173,7 +163,6 @@ export default {
page: this.page page: this.page
}) })
this.timer = true; this.timer = true;
console.log(JSON.stringify(res))
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.goodsList = res.data.list; if(load == 'reload') this.goodsList = res.data.list;
else if(load == 'loadmore') this.goodsList.push(...res.data.list); else if(load == 'loadmore') this.goodsList.push(...res.data.list);
@@ -214,14 +203,13 @@ export default {
}, },
switchCurrent(current) { switchCurrent(current) {
// if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc; // if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.page = 1;
this.current = current; this.current = current;
this.goodsList = [] this.goodsList = []
this.ShopSearch() this.ShopSearch()
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 92 + 'px'; this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 90 + 'px';
}, },
toDetailsPage(id) { toDetailsPage(id) {
this.$u.route('/pageC/merchant/index', { this.$u.route('/pageC/merchant/index', {
@@ -243,11 +231,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
display: flex; display: flex;
// margin-bottom: 30rpx; margin-bottom: 30rpx;
height: 92rpx;
> view { > view {
height: 30rpx; height: 30rpx;
line-height: 1; line-height: 30rpx;
flex: 1; flex: 1;
font-size: 32rpx; font-size: 32rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);

View File

@@ -11,15 +11,12 @@
</view> </view>
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view> <view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
</view> </view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore" :scroll-top="scrollTop" @scroll="scroll"> <scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)"> <view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)">
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="right"> <view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view> <view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view> <view class="briefing u-line-2">{{ goods.goods_advword }}</view>
<view class="price">{{ goods.goods_price }}
<text style="font-size:22rpx;color:#999;text-decoration:line-through;display: inline-block;margin-left:20rpx"> {{goods.goods_marketprice}}</text>
</view>
</view> </view>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
@@ -40,12 +37,7 @@ export default {
scrollHeight: '', scrollHeight: '',
loadStatus: 'loadmore', loadStatus: 'loadmore',
timer: true, // 防止上拉加载短时间内多次调用, timer: true, // 防止上拉加载短时间内多次调用,
value:"", value:""
scrollTop: 0,
old: {
scrollTop: 0
},
sid:''
} }
}, },
watch: { watch: {
@@ -60,21 +52,14 @@ export default {
}, },
onLoad(option) { onLoad(option) {
this.value = option.value this.value = option.value
this.sid = option.sid
this.setViewHeight(); this.setViewHeight();
this.ShopSearch() this.ShopSearch()
this.setNavSearchInput(this.value);
}, },
onNavigationBarSearchInputConfirmed(value) { onNavigationBarSearchInputConfirmed(value) {
this.value = value.text this.value = value.text
this.page = 1
this.ShopSearch() this.ShopSearch()
}, },
methods: { methods: {
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop; // 必要
},
setNavSearchInput(keyword) { setNavSearchInput(keyword) {
console.log(keyword); console.log(keyword);
// #ifdef APP-PLUS // #ifdef APP-PLUS
@@ -110,21 +95,18 @@ export default {
// 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低 // 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低
async ShopSearch({ load = 'reload' } = {}) { async ShopSearch({ load = 'reload' } = {}) {
console.log(this.value); console.log(this.value);
console.log(this.sid) this.setNavSearchInput(this.value);
const sort = this.setOrderSort(); const sort = this.setOrderSort();
const res = await this.$u.api.ShopSearch({ const res = await this.$u.api.ShopSearch({
keyword: this.value, keyword: this.value,
page: this.page, page: this.page,
order: sort, order: sort,
sid:this.sid
}) })
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.goodsList = res.data.data; if(load == 'reload') this.goodsList = res.data.data;
else if(load == 'loadmore') this.goodsList.push(...res.data.data); else if(load == 'loadmore') this.goodsList.push(...res.data.data);
} }
console.log(res)
return res.data.data.length; return res.data.data.length;
}, },
loadMore() { loadMore() {
@@ -145,18 +127,13 @@ export default {
}) })
}, },
switchCurrent(current) { switchCurrent(current) {
this.page = 1
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.scrollTop = this.old.scrollTop
this.$nextTick(function() {
this.scrollTop = 0
});
this.ShopSearch() this.ShopSearch()
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.current = current; this.current = current;
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 92 + 'px'; this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 90 + 'px';
}, },
toDetailsPage(id) { toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', { this.$u.route('/pageB/sdetails/index', {
@@ -167,17 +144,15 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.classify-goods { .classify-goods {
.tab-container { .tab-container {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
display: flex; display: flex;
// margin-bottom: 30rpx; margin-bottom: 30rpx;
height: 92rpx;
> view { > view {
height: 30rpx; height: 30rpx;
line-height: 1; line-height: 30rpx;
flex: 1; flex: 1;
font-size: 32rpx; font-size: 32rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
@@ -222,21 +197,15 @@ export default {
} }
.right { .right {
width: 418rpx; width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
margin-bottom: 20rpx;
} }
.briefing { .briefing {
font-size: 28rpx; font-size: 28rpx;
color: rgba(102,102,102,1); color: rgba(102,102,102,1);
} line-height: 42rpx;
.price {
font-size: 26rpx;
color: rgba(255,49,49,1);
} }
} }
} }

View File

@@ -139,7 +139,7 @@ export default {
goods_id: this.goodsInfo.goods_id, goods_id: this.goodsInfo.goods_id,
num: this.number, num: this.number,
store_id: this.store.store_id, store_id: this.store.store_id,
appointment_time: Math.floor(new Date(this.time).getTime() / 1000), appointment_time: new Date(this.time),
}).then(res => { }).then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({

View File

@@ -1,48 +1,35 @@
<template> <template>
<view class="container"> <view>
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing" <video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" :controls="false" @click="stoping" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping" :enable-progress-gesture="false"></video>
:enable-progress-gesture="false" :show-center-play-btn="false"></video> <cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<cover-image class="pause" @click="stoping" src="../../static/videoPlay.png" v-if="!is_play">
</cover-image>
<!-- 用户操作 --> <!-- 用户操作 -->
<userinfo class="user-info" :style="{ top: fixTop }" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" <userinfo class="user-info" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
@openCart="openPopup"></userinfo> <cover-view class="info-box" @click="stopClick">>
<!-- 视频信息 --> <view class="video-info-box">
<cover-view class="info-box">
<view class="video-info-box" :style="{ width: time_count > 99 ? '180rpx' : '160rpx' }">
<image class="image-play" src="../../static/videoIcon.png" mode=""></image> <image class="image-play" src="../../static/videoIcon.png" mode=""></image>
<text class="video-slip">视频</text> <text class="video-slip">视频</text>
<text class="time">{{ time_count }}s</text> <text class="time">{{ time_count == 1 ? 0 : time_count }}s</text>
</view> </view>
<view> <view>
<text class="name" @click="gotoInfo(list)">@{{ list.member_nickname }}</text> <text class="name">@{{ list.member_nickname }}</text>
</view> </view>
<view @click="stopClick"> <view>
<text class="title">{{ list.article_title }}</text> <text class="title">{{ list.article_title }}</text>
</view> </view>
<view @click="stopClick"> <view>
<text class="centent">{{ list.article_content }}</text> <text class="centent">{{ list.article_content }}</text>
</view> </view>
<view class="label-box" @click="stopClick"> <view class="label-box">
<block v-for="(item,index) in list.label" :key="index"> <block v-for="(item,index) in list.label" :key="index">
<text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text> <text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text>
</block> </block>
</view> </view>
</cover-view> </cover-view>
<!-- 单个商品 --> <cover-view class="content-box" v-if="is_comment">
<cover-view class="good-one" :style="{ bottom: fixTop - 100 }" v-if="cart_len == 1 && cart_type">
<view class="one-list" v-for="(item,index) in list.goods" :key="index" @click="goGoodInfo(item.goods_id)">
<image class="one-image" :src="item.goods_image" mode=""></image>
<view class="one-box">
<text class="title-one">{{ item.goods_advword }}</text>
<text class="content-one">{{ item.goods_name }}</text>
<text class="good-price">¥{{ item.goods_promotion_price }}</text>
</view>
</view>
</cover-view>
<!-- 遮罩层 -->
<cover-view class="mask" @click.stop="stopClick" :style="videoSize" v-if="is_edit || is_comment || cart_type && cart_len >= 2">
<!-- 评论 -->
<cover-view class="content-box" v-if="is_comment" ref="contentBox">
<view class="content-title"> <view class="content-title">
<text class="tips">评论</text> <text class="tips">评论</text>
<text class="close-down" @click="closeComment">×</text> <text class="close-down" @click="closeComment">×</text>
@@ -52,34 +39,19 @@
<view class="comment-list-box"> <view class="comment-list-box">
<view class="comment-list-header"> <view class="comment-list-header">
<image class="avatar" :src="item.member_avatar" mode=""></image> <image class="avatar" :src="item.member_avatar" mode=""></image>
<view class="comment-title-info"> <view>
<text class="comment-title">{{ item.member_nickname }}</text> <text class="comment-title">{{ item.member_nickname }}</text>
<text class="comment-time">{{ item.create_time }}</text> <text class="comment-time">{{ item.create_time }}</text>
</view> </view>
</view> </view>
<text class="reply" @click="openKeyInput(item,index)">回复</text> <text class="reply">回复</text>
</view> </view>
<view class="content-main"> <view class="content-main">
<text class="content-style">{{ item.content }}</text> <text class="content-style">{{ item.content }}</text>
</view> </view>
<view class="more-content-box">
<view class="child-box" v-for="(child,cid) in allList[item.id]" :key="cid">
<view class="child-info">
<image class="child-avatar" :src="child.member_avatar" mode=""></image>
<text class="child-name">{{ child.member_nickname }}</text>
<text v-if="0">{{ child.reply_member_nickname }}</text>
</view> </view>
<text class="child_content">{{ child.content }}</text> <view class="send-box">
</view> <input class="send-val" type="text" value="" />
<view>
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">展开更多回复</text>
<text></text>
</view>
</view>
</view>
<view class="send-box" @click="openKeyInput">
<input class="send-val" type="text" :placeholder="edit_text" placeholder-class="placeholder-class"
disabled="true" @click="openKeyInput" />
<text class="btn-send">发送</text> <text class="btn-send">发送</text>
</view> </view>
<loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'"> <loading class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
@@ -88,52 +60,15 @@
</loading> </loading>
</scroller> </scroller>
</cover-view> </cover-view>
<!-- 评论框 --> <list class="cart-box">
<cover-view class="edit-box" :style="videoSize" v-if="is_edit" @click="hideEdit"> <cell></cell>
<view class="input-main"> </list>
<input class="edit-input" type="text" :focus="is_focus" :placeholder=" edit_text_other ? edit_text_other : edit_text"
placeholder-class="placeholder-class" v-model="send_value" />
<text class="btn-send" @click="sendComment">发送</text>
</view>
<!-- <view class="key-height" :style="{ height: editTop }"></view> -->
</cover-view>
<!-- 购物车 -->
<cover-view class="cart-box" v-if="cart_type">
<view class="cart-title">
<text class="tips">全部商品</text>
<text class="close-down" @click="cart_type = false">×</text>
</view>
<scroller class="cart-list">
<view class="" v-for="(item,index) in list.goods" :key="index">
<view class="cart-list-header" @click="goGoodInfo(item.goods_id)">
<image class="goods-img" :src="item.goods_image" mode=""></image>
<view class="goods-info">
<text class="good-title">{{ item.goods_advword }}</text>
<text class="good-price">{{ item.goods_promotion_price }}</text>
</view>
</view>
</view>
<loading v-if="0" class="loading" @loading="onloading" :display="loadinging ? 'show' : 'hide'">
<loading-indicator class="indicator"></loading-indicator>
<text class="indicator-text">努力加载中</text>
</loading>
</scroller>
</cover-view>
</cover-view>
<!-- 返回按钮 -->
<cover-image class="close" @click="goBack" src="../../static/close.png">
</cover-image>
<!-- 暂停按钮 -->
<cover-view class="pause" :style="{ top: fixTop + 100 }">
<cover-image class="pause-img" src="../../static/videoPlay.png" @click="stoping" v-if="!is_play">
</cover-image>
</cover-view>
</view> </view>
</template> </template>
<script> <script>
import userinfo from "../components/userinfo/index" // 点赞组件 import userinfo from "../components/userinfo/index" // 点赞组件
const temp_url = "https://mall.dmygkeji.com/api/"; const temp_url = "https://dmmall.sdbairui.com/api/";
export default { export default {
components: { components: {
userinfo userinfo
@@ -141,25 +76,12 @@
data() { data() {
return { return {
videoSize: {}, videoSize: {},
fixTop: 0,
editTop: 0,
list: {}, list: {},
labelLen: [], labelLen: [],
cart_len: 0, // 购物车个数
cart_type: false, // 显示购物车 cart_type: false, // 显示购物车
is_comment: false, // 显示评论 is_comment: false, // 显示评论
is_edit: false, // 显示输入
is_focus: false, //
comment_num: 0, // 评论数 comment_num: 0, // 评论数
edit_text: "有爱评论,说点好听的 ~",
edit_text_other: "有爱评论,说点好听的 ~",
pid: 0, // 主键
reply_id: 0, // 回复id
allList: {}, // 全部子评论
page_: {},
page: 0, page: 0,
comment_id: 0,
send_value: "", // 评论
commentList: [], // 评论列表 commentList: [], // 评论列表
src: "", src: "",
is_play: true, is_play: true,
@@ -172,30 +94,11 @@
this.article_id = option.id; this.article_id = option.id;
this.getVideoInfo(option.id); this.getVideoInfo(option.id);
this.getInfo(); this.getInfo();
this.allList = {};
}, },
onReady() { onReady() {
this.videoBox = uni.createVideoContext("videoId", this); this.videoBox = uni.createVideoContext("videoId", this);
}, },
onHide() {
this.videoBox.pause();
},
onBackPress() {
if (this.cart_type) {
this.cart_type = !this.cart_type;
} else if (this.is_edit) {
this.is_edit = !this.is_edit;
} else if (this.is_comment) {
this.is_comment = !this.is_comment;
} else {
return false;
}
return true;
},
methods: { methods: {
moveHandle() {
return false;
},
// 获取信息 // 获取信息
getVideoInfo(article_id) { getVideoInfo(article_id) {
uni.request({ uni.request({
@@ -210,8 +113,6 @@
success: (res) => { success: (res) => {
this.list = res.data.data.info; this.list = res.data.data.info;
this.src = res.data.data.info.video_path; this.src = res.data.data.info.video_path;
this.cart_len = res.data.data.info.goods.length;
console.log(this.cart_len);
let item = res.data.data.info.label; let item = res.data.data.info.label;
let arr = []; let arr = [];
item.forEach(data => { item.forEach(data => {
@@ -238,7 +139,7 @@
}, },
success: (res) => { success: (res) => {
if (res.data.errCode == 0) { if (res.data.errCode == 0) {
// console.log(res.data); console.log(res.data);
this.commentList = res.data.data; this.commentList = res.data.data;
} }
} }
@@ -246,12 +147,8 @@
}, },
// 发布评论 // 发布评论
sendComment() { sendComment() {
console.log(this.article_id, this.send_value, this.pid, this.reply_id);
if (this.send_value.length == 0) { if (this.send_value.length == 0) {
uni.showToast({ this.$u.toast("内容不能为空!");
title: "输入内容不能为空!",
icon: "none"
})
return; return;
} }
uni.request({ uni.request({
@@ -263,41 +160,11 @@
pid: this.pid, pid: this.pid,
reply_id: this.reply_id, reply_id: this.reply_id,
}, },
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => { success: (res) => {
console.log(res);
this.is_edit = false;
this.send_value = "";
if (res.data.errCode == 0) { if (res.data.errCode == 0) {
this.send_value = "";
this.comment_num = res.data.num; this.comment_num = res.data.num;
let p_id = res.data.data.data.pid; console.log(res.data);
console.log(this.pid, this.reply_id, this.comment_id);
if (res.data.data.data.pid) {
this.commentList[this.comment_id].reply_count = true;
console.log(this.allList[p_id]);
if (this.allList[p_id]) {
this.allList[p_id].push(res.data.data.data);
} else {
this.allList[p_id] = [];
this.allList[p_id].push(res.data.data.data);
}
console.log(this.allList);
} else {
this.commentList.unshift(res.data.data.data);
}
// console.log(this.commentList);
} else if (res.data.errCode == 401) {
uni.showToast({
title: "您还没有登录,请先登录!",
icon: "none",
// success: () => {
// setTimeout(function() {
// this.$u.route("/pageA/login/login")
// }, 2000)
// }
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
@@ -307,47 +174,14 @@
} }
}) })
}, },
// 发现回复列表
getReplyList(id) {
uni.showLoading({
title: "loading..."
})
if (!this.page_[id] === 0) {}
console.log(id);
uni.request({
url: temp_url + "article/articleReplyList",
method: "POST",
data: {
id: id,
page: this.page_[id],
},
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
},
success: (res) => {
uni.hideLoading();
if (res.data.errCode == 0) {
if (res.data.data.length < 10) {
this.is_more = false;
}
this.page_[id]++;
this.allList[id] = res.data.data;
this.$forceUpdate();
// console.log(this.page_[id]);
// console.log(this.allList);
}
}
})
},
// 获取手机信息 // 获取手机信息
getInfo() { getInfo() {
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
this.videoSize = { this.videoSize = {
width: "750rpx", width: "750rpx",
height: res.screenHeight + "px", height: res.screenHeight + "px"
} }
this.fixTop = res.screenHeight / 3;
} }
}) })
}, },
@@ -356,19 +190,6 @@
// console.log(e); // console.log(e);
if (e.type == "play") {} if (e.type == "play") {}
}, },
pausing(e) {
if (e.type == "pause") {
this.is_play = false;
}
},
// 结束
videoEnd(e) {
// console.log(e);
if (e.type == "ended") {
this.is_play = false;
this.time_count = 0;
}
},
// 暂停 // 暂停
stoping() { stoping() {
this.is_play = !this.is_play; this.is_play = !this.is_play;
@@ -381,9 +202,8 @@
// 监听视频 // 监听视频
timeupdate(e) { timeupdate(e) {
this.time_count = parseInt(e.detail.duration) - parseInt(e.detail.currentTime); this.time_count = parseInt(e.detail.duration) - parseInt(e.detail.currentTime);
// console.log(e.detail.currentTime,e.detail.duration);
if (e.detail.duration == e.detail.currentTime) { if (e.detail.duration == e.detail.currentTime) {
// this.is_play = false; this.is_play = false;
} }
// let num = parseInt((e.detail.currentTime/e.detail.duration)*100); // let num = parseInt((e.detail.currentTime/e.detail.duration)*100);
// this.linear = num + "%"; // this.linear = num + "%";
@@ -391,59 +211,17 @@
}, },
// 打开弹窗 // 打开弹窗
openPopup(data) { openPopup(data) {
// console.log(data); console.log(data);
if (this.cart_len >= 2) {
}
this.cart_type = data.cart; this.cart_type = data.cart;
this.is_comment = data.comment; this.is_comment = data.comment;
if (this.is_comment) { if (this.is_comment) {
this.page = 0; this.page = 0;
this.getComment(); this.getComment();
// this.is_play = true;
} }
}, },
// 打开评论输入
openKeyInput(data, index) {
// console.log(data);
let me = this;
this.is_focus = true;
setTimeout(() => {
this.is_edit = true;
}, 500)
uni.onKeyboardHeightChange(function(res) {
console.log(res);
if (res.height == 0) {
me.is_focus = false;
me.is_edit = false;
} else {
me.editTop = res.height + "rpx";
}
})
this.comment_id = index;
if (data.id) {
this.edit_text_other = "回复@" + data.member_nickname;
this.pid = data.id;
this.reply_id = data.member_id;
} else {
this.edit_text_other = "有爱评论,说点好听的 ~";
this.pid = "";
this.reply_id = "";
}
// console.log(this.pid, this.edit_text_other);
},
blue() {
this.is_focus = false;
},
// 关闭评论 // 关闭评论
closeComment() { closeComment() {
this.is_comment = false; this.is_comment = false;
this.is_edit = false;
// console.log(this.is_comment,this.is_play);
// if (!this.is_comment && this.is_play) {
// console.log(1);
// this.is_play = false;
// }
}, },
// 下拉加载 // 下拉加载
onloading(e) { onloading(e) {
@@ -453,17 +231,6 @@
this.loadinging = false; this.loadinging = false;
}, 2000) }, 2000)
}, },
// 跳转
goGoodInfo(id) {
uni.navigateTo({
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
})
},
gotoInfo(id) {
console.log(id);
},
// 收起键盘
hideEdit() {},
// stop // stop
stopClick(event) { stopClick(event) {
event.stopPropagation(); event.stopPropagation();
@@ -478,46 +245,29 @@
</script> </script>
<style> <style>
.container {
position: relative;
background-color: #FF0000 !important;
}
/* 关闭 */ /* 关闭 */
.close { .close {
z-index: 99;
position: fixed; position: fixed;
top: 100rpx; top: 80rpx;
right: 70rpx; right: 60rpx;
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
} }
/* 暂停 */ /* 暂停 */
.pause { .pause {
z-index: 99;
position: fixed; position: fixed;
top: 600rpx;
left: 330rpx; left: 330rpx;
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
/* #ifdef H5 */
top: 500rpx;
/* #endif */
}
.pause-img {
width: 100rpx;
height: 100rpx;
} }
/* 用户操作 */ /* 用户操作 */
.user-info { .user-info {
position: fixed; position: fixed;
right: 26rpx; top: 360rpx;
/* #ifdef H5 */ right: 30rpx;
top: 400rpx;
/* #endif */
} }
/* 底部信息 */ /* 底部信息 */
@@ -531,6 +281,7 @@
.video-info-box { .video-info-box {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
width: 160rpx;
height: 40rpx; height: 40rpx;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@@ -539,63 +290,13 @@
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
} }
.good-one {
position: fixed;
right: 160rpx;
width: 420rpx;
padding: 20rpx;
border-radius: 10rpx;
background-color: rgba(0, 0, 0, 0.6);
}
.one-list {
flex-direction: row;
}
.one-image {
width: 160rpx;
height: 160rpx;
margin-right: 20rpx;
border-radius: 4rpx;
}
.one-box {
justify-content: space-around;
color: #333;
}
.title-one {
width: 200rpx;
font-size: 28rpx;
color: #fff;
lines: 1;
text-overflow: ellipsis;
}
.content-one {
width: 200rpx;
font-size: 24rpx;
color: #fff;
lines: 2;
text-overflow: ellipsis;
}
.mask {
z-index: 10000;
position: fixed;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
}
.content-box { .content-box {
z-index: 999; z-index: 99;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 750rpx; width: 750rpx;
height: 700rpx; height: 700rpx;
padding-bottom: 50rpx;
margin-bottom: 88rpx; margin-bottom: 88rpx;
background-color: #fff; background-color: #fff;
} }
@@ -614,7 +315,7 @@
} }
.comment-list-box { .comment-list-box {
padding: 20rpx 30rpx; padding: 30rpx;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@@ -625,49 +326,11 @@
padding-left: 100rpx; padding-left: 100rpx;
} }
.content-style { .content-style {
width: 600rpx; width: 600rpx;
font-size: 28rpx; font-size: 26rpx;
color: #333; color: #333;
lines: 2; lines: 2;
letter-spacing: 2rpx;
}
.more-content-box {
margin-left: 100rpx;
}
.child-box {}
.child-info {
margin: 10rpx 0;
flex-direction: row;
align-items: center;
}
.child-avatar {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 50%;
}
.child-name {
font-size: 22rpx;
color: #333;
}
.child_content {
padding: 4rpx 0;
margin-left: 40rpx;
font-size: 26rpx;
}
.more-comment {
margin: 10rpx 0;
font-size: 22rpx;
color: #999;
} }
.comment-list-header { .comment-list-header {
@@ -681,10 +344,6 @@
border-radius: 50%; border-radius: 50%;
} }
.comment-title-info {
justify-content: space-between;
}
.comment-title { .comment-title {
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
@@ -701,7 +360,6 @@
font-weight: 500; font-weight: 500;
color: #333; color: #333;
} }
.send-box { .send-box {
z-index: 10000; z-index: 10000;
position: fixed; position: fixed;
@@ -725,111 +383,16 @@
} }
.btn-send { .btn-send {
font-size: 28rpx; font-size: 30rpx;
color: #666; color: #303133;
} }
.close-down { .close-down {
padding: 10rpx;
font-size: 50rpx; font-size: 50rpx;
text-align: center; text-align: center;
color: #333; color: #333;
} }
.edit-box {
z-index: 1000;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
background-color: rgba(0, 0, 0, 0.8);
}
.input-main {
position: fixed;
left: 0;
bottom: 0;
/* #ifdef H5 */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 750rpx;
padding: 0 20rpx;
line-height: 80rpx;
background-color: #fff;
border-top-right-radius: 10rpx;
border-top-left-radius: 10rpx;
}
.key-height {
width: 750rpx;
background-color: #fff;
}
.edit-input {
width: 600rpx;
height: 80rpx;
padding: 0 10rpx;
font-size: 24rpx;
color: #333;
}
.cart-box {
z-index: 1000;
position: fixed;
bottom: 0;
left: 0;
width: 750rpx;
height: 700rpx;
background-color: #fff;
}
.cart-title {
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 88rpx;
padding: 0 20rpx;
border-color: #f2f2f2;
border-bottom-width: 1rpx;
background-color: #fff;
}
.cart-list {}
.cart-list-header {
padding: 20rpx;
flex-direction: row;
border-bottom-width: 1rpx;
border-bottom-color: #ececec;
}
.goods-img {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
margin-right: 20rpx;
}
.goods-info {
justify-content: space-around;
}
.good-title {
width: 500rpx;
color: #333;
font-size: 30rpx;
lines: 2;
text-overflow: ellipsis;
}
.good-price {
font-size: 28rpx;
color: #FF3131;
}
.image-play { .image-play {
width: 22rpx; width: 22rpx;
height: 20rpx; height: 20rpx;
@@ -854,17 +417,13 @@
} }
.title { .title {
width: 700rpx;
color: #fff; color: #fff;
font-size: 26rpx; font-size: 26rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
lines: 1;
text-overflow: ellipsis;
letter-spacing: 2rpx;
} }
.centent { .centent {
width: 600rpx; width: 500rpx;
color: #fff; color: #fff;
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@@ -877,6 +436,7 @@
} }
.label { .label {
lines: 3;
width: 100rpx; width: 100rpx;
height: 40rpx; height: 40rpx;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
@@ -884,7 +444,6 @@
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
text-align: center; text-align: center;
line-height: 38rpx;
color: #666666; color: #666666;
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(255, 255, 255, .6); background-color: rgba(255, 255, 255, .6);
@@ -908,9 +467,4 @@
height: 30rpx; height: 30rpx;
color: #999; color: #999;
} }
.placeholder-class {
font-size: 13px;
color: #666;
}
</style> </style>

View File

@@ -26,7 +26,7 @@
<view class="info"> <view class="info">
<view class="name u-line-2">{{ goods.goods_name }}</view> <view class="name u-line-2">{{ goods.goods_name }}</view>
<view class="cart-info"> <view class="cart-info">
<view class="price">{{ goods.goods_price }}</view> <view class="price">{{ goods.goods_total }}</view>
<view>×{{ goods.goods_num }}</view> <view>×{{ goods.goods_num }}</view>
</view> </view>
</view> </view>
@@ -148,7 +148,7 @@ export default {
onLoad(option) { onLoad(option) {
this.orderType = this.$store.state.orderType; this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo; this.orderInfo = this.$store.state.orderInfo;
// console.log('orderType' + this.orderType); console.log('orderType' + this.orderType);
// console.log(this.orderInfo); // console.log(this.orderInfo);
this.getGoodsClass(); this.getGoodsClass();
this.setTotalPrice(); this.setTotalPrice();
@@ -309,47 +309,32 @@ export default {
}, },
setTotalPrice() { setTotalPrice() {
const goods = this.orderInfo.store_goods_total; const goods = this.orderInfo.store_goods_total;
let [freight, price, minPrice] = [0, 0, 0]; // console.log(this.freight);
// 运费 const freight = this.freight;
for (const key in this.freight) { let price = 0;
if (this.freight.hasOwnProperty(key)) { // 商品价格加上运费
const element = this.freight[key]; [goods, freight].forEach(object => {
freight += Number(element); for (const key in object) {
} if (object.hasOwnProperty(key)) {
} const element = object[key];
// 商品价格减去优惠券 price += Number(element);
// 店铺
for (const gid in goods) {
if (goods.hasOwnProperty(gid)) {
// 计算最小价格
minPrice += 0.01;
// 每个店铺所有商品的价格
let sprice = Number(goods[gid]);
if(JSON.stringify(this.storeCoupon) != '{}') {
for (const cid in this.storeCoupon) {
if (this.storeCoupon.hasOwnProperty(cid)) {
const cprice = this.storeCoupon[cid];
// 商品减去优惠券价格
if(gid == cid) {
sprice -= cprice.voucher_price;
// 每个店铺最低付款 0.01
if(sprice <= 0) sprice = 0.01;
}
}
}
}
// 所有商品总价
price += sprice;
} }
} }
})
// 减去优惠券
// 平台 // 平台
if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price); if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
// 每个店铺最低付款 0.01 // 店铺
if(price <= minPrice) price = minPrice; if(JSON.stringify(this.storeCoupon) != '{}') {
// console.log("minPrice" + minPrice); for (const key in this.storeCoupon) {
// console.log("freight:" + freight); if (this.storeCoupon.hasOwnProperty(key)) {
// console.log("price:" + price); const element = this.storeCoupon[key];
this.totalPrice = (price + freight).toFixed(2); price -= element.voucher_price;
}
}
}
// console.log(price);
this.totalPrice = price.toFixed(2);
}, },
setDelivery(index) { setDelivery(index) {
if(index == 1) { if(index == 1) {

View File

@@ -3,7 +3,7 @@
<u-checkbox-group class="cart-main" @change="storeChange"> <u-checkbox-group class="cart-main" @change="storeChange">
<view v-for="(store, s_index) in list" :key="s_index" class="cart-item"> <view v-for="(store, s_index) in list" :key="s_index" class="cart-item">
<view class="store"> <view class="store">
<u-checkbox v-model="store.checked" shape="circle" active-color="#FF780F" icon-size="26" :name="s_index" @change="storeaAloneChange"></u-checkbox> <u-checkbox v-model="store.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="s_index" @change="storeaAloneChange"></u-checkbox>
<view class="name" @click="viewStoreDetails(store.store_id)"> <view class="name" @click="viewStoreDetails(store.store_id)">
<image :src="store.store_avatar"></image> <image :src="store.store_avatar"></image>
<view>{{ store.store_name }}</view> <view>{{ store.store_name }}</view>
@@ -12,7 +12,7 @@
<view class="goods"> <view class="goods">
<u-checkbox-group @change="goodsChange($event, s_index)"> <u-checkbox-group @change="goodsChange($event, s_index)">
<view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item"> <view v-for="(goods, g_index) in store.goods" :key="g_index" class="goods-item">
<u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="26" :name="g_index"></u-checkbox> <u-checkbox v-model="goods.checked" shape="circle" active-color="#FF780F" icon-size="35" :name="g_index"></u-checkbox>
<image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image> <image :src="goods.goods_image" @click="viewGoodsDetails(goods.goods_id)"></image>
<view class="info"> <view class="info">
<view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view> <view class="name u-line-2" @click="viewGoodsDetails(goods.goods_id)">{{ goods.goods_name }}</view>
@@ -31,7 +31,7 @@
</view> </view>
<view class="balance"> <view class="balance">
<u-checkbox-group> <u-checkbox-group>
<u-checkbox v-model="checkedAll" shape="circle" active-color="#FF780F" icon-size="26" label-size="30" @change="totalChange"> <u-checkbox v-model="checkedAll" shape="circle" active-color="#FF780F" icon-size="35" label-size="30" @change="totalChange">
全选 全选
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
@@ -326,13 +326,10 @@ export default {
font-weight: 500; font-weight: 500;
color: rgba(255,49,49,1); color: rgba(255,49,49,1);
} }
/deep/ .u-numberbox { .u-numberbox {
border: 1rpx solid rgba(217,215,215,1); border: 1rpx solid rgba(217,215,215,1);
border-radius:4px; border-radius:4px;
.u-icon-minus, .u-icon-plus { /deep/ .u-number-input {
width: 38rpx;
}
.u-number-input {
margin: 0; margin: 0;
color: #333 !important; color: #333 !important;
border: 1rpx #D9D7D7 solid { border: 1rpx #D9D7D7 solid {
@@ -341,6 +338,31 @@ export default {
} }
} }
} }
// .num {
// display: flex;
// width: 118rpx;
// height: 39rpx;
// border: 1rpx solid rgba(217,215,215,1);
// border-radius:4px;
// .reduce, .increase {
// flex: 1;
// font-size: 11rpx;
// color: #FF780F;
// line-height: 39rpx;
// text-align: center;
// }
// .value {
// flex: 1;
// font-size: 22rpx;
// color:rgba(51,51,51,1);
// line-height: 39rpx;
// text-align: center;
// border: 1rpx #D9D7D7 solid {
// top: 0px;
// bottom: 0px;
// }
// }
// }
} }
} }
} }

View File

@@ -16,12 +16,7 @@
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="right"> <view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view> <view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view> <view class="briefing u-line-2">{{ goods.goods_advword }}</view>
<!-- <view class="price">{{ goods.goods_price }}</view> -->
<view class="price">
<view class="present">{{ goods.goods_price }}</view>
<view class="origin">{{ goods.goods_marketprice }}</view>
</view>
</view> </view>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
@@ -181,35 +176,15 @@ export default {
} }
.right { .right {
width: 418rpx; width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
margin-bottom: 20rpx;
} }
.briefing { .briefing {
font-size: 28rpx; font-size: 28rpx;
color: rgba(102,102,102,1); color: rgba(102,102,102,1);
} line-height: 42rpx;
// .price {
// font-size: 26rpx;
// color: rgba(255,49,49,1);
// }
.price {
display: flex;
align-items: center;
.present {
font-size: 26rpx;
color: rgba(255,49,49,1);
margin-right: 20rpx;
}
.origin {
text-decoration: line-through;
font-size: 24rpx;
color: #999;
}
} }
} }
} }

View File

@@ -1,10 +1,6 @@
<template> <template>
<view class="listItem"> <view class="listItem">
<!-- <video :src="url" :show-fullscreen-btn="true"></video> --> <video v-if="type == '2'" :src="url" :show-fullscreen-btn="true"></video>
<view v-if="type == '2'" class="video-container">
<image :src="url" mode="aspectFill" class="video"></image>
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view>
<image v-else :src="url" mode="aspectFill"></image> <image v-else :src="url" mode="aspectFill"></image>
</view> </view>
</template> </template>
@@ -13,30 +9,11 @@
width: 365rpx; width: 365rpx;
height: 500rpx; height: 500rpx;
overflow: hidden; overflow: hidden;
> image { >image,video{
width: 100%; width: 100%;
height: 100%; height: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.video-container {
width: 100%;
height: 100%;
margin-bottom: 20rpx;
position: relative;
.video {
width: 100%;
height: 100%;
}
.play-video {
position: absolute;
width: 100rpx;
height: 100rpx;
z-index: 19;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
} }
</style> </style>
<script> <script>

View File

@@ -1,7 +1,6 @@
<template> <template>
<view class="videoTop"> <view class="videoTop">
<image :src="url" mode="aspectFill" class="video"></image> <video :src="url" :show-fullscreen-btn="true"></video>
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -9,21 +8,9 @@
width: 100%; width: 100%;
height: 284rpx; height: 284rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
position: relative; >video{
.video{
position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 9;
}
.play-video {
position: absolute;
width: 100rpx;
height: 100rpx;
z-index: 19;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
} }
</style> </style>
@@ -34,6 +21,6 @@ export default {
return { return {
} }
}, },
props:['url'], props:['url']
} }
</script> </script>

View File

@@ -10,8 +10,8 @@
<view v-if="pinTuanList[index]"> <view v-if="pinTuanList[index]">
<SpecialGoods v-for="(item, index) in pinTuanList[index]" :key="index" :item="item" type='group'></SpecialGoods> <SpecialGoods v-for="(item, index) in pinTuanList[index]" :key="index" :item="item" type='group'></SpecialGoods>
</view> </view>
<u-empty text="暂无商品" mode="list" color="#000" margin-top="120" v-if="!pinTuanList[index] || !pinTuanList[index].length"></u-empty> <u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="!pinTuanList[index] || pinTuanList[index].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList[index] && pinTuanList[index].length>=pageSize" @loadmore="onreachBottom"></u-loadmore> <u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList[index] || !pinTuanList[index].length"></u-empty>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -22,7 +22,7 @@ import SpecialGoods from "../../components/shop/special-shop/index";
export default { export default {
data() { data() {
return { return {
pageSize: 6, pageSize: 12,
tabList: [], tabList: [],
current: -1, current: -1,
swiperCurrent: 0, swiperCurrent: 0,

View File

@@ -14,7 +14,7 @@
</view> </view>
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore"> <scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view class="goods-container"> <view class="goods-container">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view"> <view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
<goodsItem :info="goods"></goodsItem> <goodsItem :info="goods"></goodsItem>
</view> </view>
</view> </view>
@@ -128,6 +128,12 @@ export default {
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px'; this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
// console.log(this.scrollHeight); // console.log(this.scrollHeight);
}, },
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
id: id,
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
});
},
setTitle(title){ setTitle(title){
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: title title: title

View File

@@ -14,11 +14,11 @@
</view> </view>
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore"> <scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view class="goods-container"> <view class="goods-container">
<view v-for="(goods, index) in goodsList" :key="index" class="goods-view"> <view v-for="(goods, index) in goodsList" :key="index" class="goods-view" @click="toDetailsPage(goods.goods_id)">
<goodsItem :info="goods"></goodsItem> <goodsItem :info="goods"></goodsItem>
</view> </view>
</view> </view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-bottom="120" v-if="goodsList.length >= pageSize"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty> <u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view> </scroll-view>
</view> </view>
@@ -28,7 +28,7 @@ import goodsItem from "@/components/shop/list/item"
export default { export default {
data() { data() {
return { return {
pageSize: 5, pageSize: 15,
cid: '', cid: '',
page: 1, page: 1,
current: 0, current: 0,
@@ -83,7 +83,7 @@ export default {
page: this.page, page: this.page,
order: sort, order: sort,
}) })
// this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
this.pageSize = res.data.per_page; this.pageSize = res.data.per_page;
if(load == 'reload') this.goodsList = res.data.data; if(load == 'reload') this.goodsList = res.data.data;
@@ -92,8 +92,8 @@ export default {
return res.data.data.length; return res.data.data.length;
}, },
loadMore() { loadMore() {
// if(this.goodsList.length < this.pageSize) return false; if(this.goodsList.length < this.pageSize) return false;
// if(!this.timer) return false; if(!this.timer) return false;
this.loadStatus = "loading"; this.loadStatus = "loading";
this.page++; this.page++;
this.getStoreGoodsList({ load: 'loadmore' }).then(length => { this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
@@ -118,6 +118,12 @@ export default {
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px'; this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px';
// console.log(this.scrollHeight); // console.log(this.scrollHeight);
}, },
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
id: id,
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
});
}
} }
}; };
</script> </script>

View File

@@ -14,20 +14,17 @@
<view>我的</view> <view>我的</view>
</view> </view>
</view> --> </view> -->
<view class="top" :style="{'background':'url(' + info.store_banner + ') 100% 100% no-repeat' }"> <view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
<view class="mantle"></view>
<view class="main-container" :style="{ 'padding-top': paddingTop }">
<image :src="info.store_avatar"></image> <image :src="info.store_avatar"></image>
<view class="info"> <view class="info">
<view class="name u-line-1">{{info.store_name}}</view> <view class="name u-line-1">{{info.store_name}}</view>
<view class="num">粉丝数{{info.store_collect}}</view> <view class="num">粉丝数{{info.store_collect}}</view>
</view> </view>
<view class="btn" @click="attentionMember"> <view class="btn" @click="attentionMember">
<image :src="info.is_attention == 0 ? '/static/image/shop/14.png' : '/static/image/shop/8.png'"></image> <image src="/static/image/shop/8.png"></image>
<view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view> <view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view>
</view> </view>
</view> </view>
</view>
<view class="follow" v-if="info.attention_member && info.attention_member.length"> <view class="follow" v-if="info.attention_member && info.attention_member.length">
<view class="title">关注</view> <view class="title">关注</view>
<scroll-view scroll-x class="list"> <scroll-view scroll-x class="list">
@@ -42,11 +39,11 @@
<view class="main"> <view class="main">
<scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }"> <scroll-view class="video-image" scroll-y v-if="cur==0 && indextop.length" :style="{ height: scrollHeiht }">
<view v-for="item in indextop" :key="item.id" class="container-top"> <view v-for="item in indextop" :key="item.id" class="container-top">
<videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></videoTop> <videoTop :url="item.article_pic" v-if="item.type == 2" @click.native="toDetailsPage(item.article_id)"></videoTop>
<imageTop v-else :url="item.article_pic" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></imageTop> <imageTop v-else :url="item.article_pic" @click.native="toDetailsPage(item.article_id)"></imageTop>
</view> </view>
<view v-if="indexlist.length" class="container-bottom"> <view v-if="indexlist.length" class="container-bottom">
<listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></listitem> <listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage(item.article_id)"></listitem>
</view> </view>
</scroll-view> </scroll-view>
<view class="item" v-if="cur==1"> <view class="item" v-if="cur==1">
@@ -91,9 +88,8 @@ export default {
indexlist: [], indexlist: [],
indextop: [], indextop: [],
info: {}, info: {},
page: 1, page: 0,
scrollHeiht: '', scrollHeiht: '',
paddingTop: 0,
} }
}, },
components:{ components:{
@@ -108,16 +104,10 @@ export default {
// this.getStoreImgVideoList(); // this.getStoreImgVideoList();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
console.log(e.index); // console.log(e.index);
if(e.index == 0) this.$u.route('/pageC/cart/index'); if(e.index == 1) this.$u.route('/pageC/cart/index');
// if(e.index == 0) this.show = true; // if(e.index == 0) this.show = true;
}, },
onNavigationBarSearchInputClicked() {
this.$u.route('pageB/search/index', {
type: 1,
id:this.sid
});
},
methods: { methods: {
customers(){ customers(){
console.log(this.$store.state.hasLogin) console.log(this.$store.state.hasLogin)
@@ -137,12 +127,12 @@ export default {
this.time = time; this.time = time;
this.date = date this.date = date
} }
// console.log(123) console.log(123)
this.$u.api.getAtwillUserInfo({ this.$u.api.getAtwillUserInfo({
id:this.sid id:this.sid
}).then((res)=>{ }).then((res)=>{
console.log(res) console.log(res)
let user = new Friend(res.data.member_id,res.data.store_name,res.data.member_avatar) let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({ this.$u.route({
url:"/pageD/privateChat/privateChat", url:"/pageD/privateChat/privateChat",
params:{ params:{
@@ -156,10 +146,11 @@ export default {
} }
}, },
toDetailsPage({ id, type }) { toDetailsPage(id) {
// console.log(11); // console.log(11);
let src = type == 1 ? 'pageB/photo/index' : 'pageB/video/video'; this.$u.route('pageB/photo/index', {
this.$u.route(src, { id: id }); id: id
});
}, },
switchCurrent(current) { switchCurrent(current) {
this.cur = current; this.cur = current;
@@ -170,9 +161,7 @@ export default {
} }
}, },
getStoreInfo() { getStoreInfo() {
// console.log(this.sid )
this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{ this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{
// console.log(JSON.stringify(res))
this.info = res.data; this.info = res.data;
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}) })
@@ -202,17 +191,15 @@ export default {
}).then(res => { }).then(res => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.errCode == 0) { if (res.errCode == 0) {
let articleList = res.data.list; // this.articleList = res.data.list;
// articleList.unshift({}, {}, {}, {});
// articleList.push({}, {});
if(JSON.stringify(res.data) != '[]') { if(JSON.stringify(res.data) != '[]') {
if(articleList.length > 0) { if(res.data.list.length > 0) {
this.indextop = [articleList[0]] this.indextop = [res.data.list[0]]
// this.indextop = [res.data.list[0], res.data.list[1]]; // this.indextop = [res.data.list[0], res.data.list[1]];
} }
if(articleList.length > 1) { if(res.data.list.length > 1) {
this.indextop.push(articleList[1]); this.indextop.push(res.data.list[1]);
this.indexlist.push(...articleList.slice(2,)); this.indexlist.push(...res.data.list.slice(2,));
} }
} }
} }
@@ -220,9 +207,7 @@ export default {
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
this.scrollHeiht = res.windowHeight - res.windowWidth / 750 * (350 + 140 + 20) + 'px'; this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px';
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
// console.log(this.paddingTop);
} }
}, },
onLoad(option){ onLoad(option){
@@ -240,7 +225,6 @@ export default {
// min-height: 100vh; // min-height: 100vh;
background-color: #ECECEC; background-color: #ECECEC;
padding-top: calc(350rpx - var(--window-top)); padding-top: calc(350rpx - var(--window-top));
overflow: hidden;
.top { .top {
position: fixed; position: fixed;
top: 0; top: 0;
@@ -248,34 +232,16 @@ export default {
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 350rpx; height: 350rpx;
// background-color: #999999;
.mantle {
width: 750rpx;
height: 350rpx;
position: absolute;
top: 0;
left: 0;
z-index: 10;
background-color: #999999; background-color: #999999;
opacity: 0.7;
}
.main-container {
display: flex; display: flex;
align-items: center; align-items: center;
// padding-top: calc(var(--status-bar-height) + 54); padding: 168rpx 60rpx 0 30rpx;
padding: 0 60rpx 0 30rpx;
position: absolute;
top: 0;
left: 0;
z-index: 19;
width: 750rpx;
height: 350rpx;
> image { > image {
margin-right: 40rpx; margin-right: 40rpx;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
border-radius: 50%; border-radius: 50%;
// background-color: aqua; background-color: aqua;
} }
.info { .info {
width: 220rpx; width: 220rpx;
@@ -311,9 +277,7 @@ export default {
} }
} }
} }
}
.follow { .follow {
height: 140rpx;
background-color: #ffffff; background-color: #ffffff;
width: 100%; width: 100%;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@@ -348,7 +312,7 @@ export default {
margin-right: 35rpx; margin-right: 35rpx;
} }
text-align: center; text-align: center;
width: 96rpx; width: 90rpx;
> image { > image {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
@@ -367,8 +331,7 @@ export default {
} }
.main{ .main{
.video-image { .video-image {
box-sizing: border-box; padding-bottom: 98rpx;
padding-bottom: 100rpx;
} }
.container-top { .container-top {
> view { > view {
@@ -384,6 +347,9 @@ export default {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
} }
// > view {
// margin-top: 20rpx;
// }
} }
.tabbar { .tabbar {
border-top: 1rpx #DBDADA solid; border-top: 1rpx #DBDADA solid;

View File

@@ -23,7 +23,7 @@
</view> </view>
</template> </template>
<script> <script>
import SpecialGoods from "@/components/shop/special-shop/index" import SpecialGoods from "../../components/shop/special-shop/index"
export default { export default {
data() { data() {
return { return {
@@ -42,7 +42,6 @@ export default {
// 全部秒杀 // 全部秒杀
getSpikeList() { getSpikeList() {
this.$u.api.getSpikeList({ page: this.page }).then(res => { this.$u.api.getSpikeList({ page: this.page }).then(res => {
console.log(res)
if(res.errCode == 0) { if(res.errCode == 0) {
this.spikeList = res.data.list; this.spikeList = res.data.list;
this.seckillTime = { this.seckillTime = {
@@ -73,22 +72,14 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 20rpx; font-size: 20rpx;
> text {
text-align: center;
line-height: 26rpx;
}
.num{ .num{
// box-sizing: content-box; box-sizing: content-box;
width: 26rpx; width: 25rpx;
// height: 25rpx; height: 25rpx;
background-color: #000; background-color: #bfbfbf;
color: #ffffff;
margin: 0 10rpx; margin: 0 10rpx;
padding: 2rpx; padding: 2rpx;
} }
.mah {
color: #999999;
}
} }
} }
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<view id="actives" :style="{height : height + 'px'}"> <view id="actives">
<!-- 活动消息推送 --> <!-- 活动消息推送 -->
<block v-for="(item, index) in actives" :key="index"> <block v-for="(item, index) in actives" :key="index">
<view class="time">{{ item.addtime }}</view> <view class="time">{{ item.addtime }}</view>
@@ -7,7 +7,7 @@
<view class="content"> <view class="content">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="images_about"> <view class="images_about">
<image :src="item.picture" mode="aspectFill"></image> <image :src="item.goods_image" mode="aspectFill"></image>
<view> <view>
<text class="u-line-2">{{item.summary}}</text> <text class="u-line-2">{{item.summary}}</text>
</view> </view>
@@ -22,21 +22,13 @@
export default { export default {
data() { data() {
return { return {
height:'600',
actives: [ actives: [
] ]
}; };
}, },
onLoad(){ onLoad(){
var _that = this this.messageactivityList()
_that.messageactivityList();
uni.getSystemInfo({
success: function (res) {
console.log(res.windowHeight);
_that.height = res.windowHeight
}
});
}, },
methods: { methods: {
titletext(){ titletext(){
@@ -55,7 +47,7 @@
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
page { page {
background-color: #ECECEC; background-color: #ECECEC;
} }
@@ -63,7 +55,7 @@
height: 100%; height: 100%;
} }
#actives{ #actives{
background: #ECECEC; height: 100%;
.time { .time {
padding: 30rpx 0; padding: 30rpx 0;
color: #666; color: #666;
@@ -81,7 +73,7 @@
padding: 39rpx 0 30rpx; padding: 39rpx 0 30rpx;
} }
.content{ .content{
width:94%; width:630rpx;
padding: 30rpx; padding: 30rpx;
background:rgba(255,255,255,1); background:rgba(255,255,255,1);
border-radius:20rpx; border-radius:20rpx;
@@ -105,7 +97,6 @@
justify-content: center; justify-content: center;
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
line-height: 36rpx;
padding: 20rpx; padding: 20rpx;
background: rgba(241,241,241,1); background: rgba(241,241,241,1);
& > text { & > text {

View File

@@ -1,18 +1,15 @@
<template> <template>
<view class="attention"> <view class="attention">
<view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)"> <view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
<view style="position:relative"> <view>
<image :src="item.friend_tomavatar" mode="aspectFill"></image> <image :src="item.friend_tomavatar" mode="aspectFill"></image>
<view class="tishi" v-if="item.unread_message"></view>
</view> </view>
<view>{{item.friend_tomname}}</view> <view>{{item.friend_tomname}}</view>
<view>{{item.live_status ? '正在直播' : '未直播'}}</view> <view>{{item.live_status ? '正在直播' : '未直播'}}</view>
<view class="cur_two" @click="tapClick(index)">已关注</view> <view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view>
<!-- <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view> --> <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view>
</view> </view>
<u-loadmore :status="status" icon-type="iconType"/>
</view> </view>
</template> </template>
<script> <script>
@@ -22,27 +19,12 @@
return { return {
rSelect:[], rSelect:[],
type : '未关注', type : '未关注',
attention: [], attention: []
page:1,
status:'loadmore'
}; };
}, },
onReachBottom(){
if(this.status == 'loading' || this.status == 'nomore'){
return ;
}else{
this.status = "loading"
this.page++
this.snsfriendList()
}
},
onLoad(){ onLoad(){
this.snsfriendList() this.snsfriendList()
}, },
onShow(){
this.page = 1;
this.snsfriendList();
},
methods: { methods: {
// 点击切换颜色 // 点击切换颜色
tapClick(index) { tapClick(index) {
@@ -55,17 +37,8 @@
} }
}, },
snsfriendList(){ snsfriendList(){
this.$u.api.snsfriendList({page:this.page}).then((res)=>{ this.$u.api.snsfriendList({}).then((res)=>{
console.log(res) this.attention = res.data;
if(this.page > 1){
this.attention.push(...res.data.data)
}else{
this.attention = res.data.data;
}
this.status = "loadmore"
if(res.data.data.length < parseInt(res.data.per_page)){
this.status = "nomore"
}
}) })
}, },
navto(id){ navto(id){
@@ -85,15 +58,6 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tishi{
position: absolute;
top: 5rpx;
left: 80rpx;
background-color: #ff5d00;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
}
.attention { .attention {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

544
pageD/chat/chat.vue Normal file
View File

@@ -0,0 +1,544 @@
<template>
<view class="content">
<view class="content-box" @touchstart="touchstart" id="content-box" :class="{'content-showfn':showFunBtn}">
<!-- 背景图- 定位方式 -->
<image class="content-box-bg" :src="_user_info.chatBgImg" :style="{ height: imgHeight }"></image>
<view class="content-box-loading" v-if="!loading"><u-loading mode="flower"></u-loading></view>
<view class="message" v-for="(item, index) in messageList" :key="index" :id="`msg-${item.hasBeenSentId}`">
<view class="message-item " :class="item.isItMe ? 'right' : 'left'">
<image class="img" :src="item.fromUserHeadImg" mode="" @tap="linkToBusinessCard(item.fromUserId)"></image>
<!-- contentType = 1 文本 -->
<view class="content" v-if="item.contentType == 1">{{ item.content }}</view>
<!-- contentType = 2 语音 -->
<view
class="content contentType2"
:class="[{ 'content-type-right': item.isItMe }]"
v-if="item.contentType == 2"
@tap="handleAudio(item)"
hover-class="contentType2-hover-class"
:style="{width:`${130+(item.contentDuration*2)}rpx`}"
>
<view
class="voice_icon"
:class="[
{ voice_icon_right: item.isItMe },
{ voice_icon_left: !item.isItMe },
{ voice_icon_right_an: item.anmitionPlay && item.isItMe },
{ voice_icon_left_an: item.anmitionPlay && !item.isItMe }
]"
></view>
<view class="">{{ item.contentDuration }}''</view>
</view>
<!-- contentType = 3 图片 -->
<view
class="content contentType3"
v-if="item.contentType == 3"
@tap="viewImg([item.content])"
>
<image :src="item.content" class="img" mode="widthFix"></image>
</view>
</view>
</view>
</view>
<!-- 底部聊天输入框 -->
<view class="input-box" :class="{ 'input-box-mpInputMargin': mpInputMargin }">
<view class="input-box-flex">
<!-- #ifndef H5 -->
<image v-if="chatType === 'voice'" class="icon_img" :src="require('@/static/pageD/voice.png')" @click="switchChatType('keyboard')"></image>
<image v-if="chatType === 'keyboard'" class="icon_img" :src="require('@/static/pageD/keyboard.png')" @click="switchChatType('voice')"></image>
<!-- #endif -->
<view class="input-box-flex-grow">
<input
v-if="chatType === 'voice'"
type="text"
class="content"
id="input"
v-model="formData.content"
:hold-keyboard="true"
:confirm-type="'send'"
:confirm-hold="true"
placeholder-style="color:#DDDDDD;"
:cursor-spacing="10"
@confirm="sendMsg(null)"
/>
<view
class="voice_title"
v-if="chatType === 'keyboard'"
:style="{ background: recording ? '#c7c6c6' : '#FFFFFF' }"
@touchstart.stop.prevent="startVoice"
@touchmove.stop.prevent="moveVoice"
@touchend.stop="endVoice"
@touchcancel.stop="cancelVoice"
>
{{ voiceTitle }}
</view>
</view>
<!-- 功能性按钮 -->
<image class=" icon_btn_add" :src="require('@/static/pageD/add.png')" @tap="switchFun"></image>
<!-- #ifdef H5 -->
<button class="btn" type="primary" size="mini" @touchend.prevent="sendMsg(null)">发送</button>
<!-- #endif -->
</view>
<view class="fun-box" :class="{'show-fun-box':showFunBtn}">
<u-grid :col="4" hover-class="contentType2-hover-class" :border="false" @click="clickGrid">
<u-grid-item v-for="(item, index) in funList" :index="index" :key="index" bg-color="#eaeaea">
<u-icon :name="item.icon" :size="52"></u-icon>
<view class="grid-text">{{ item.title }}</view>
</u-grid-item>
</u-grid>
</view>
</view>
<!-- //语音动画 -->
<view class="voice_an" v-if="recording">
<view class="voice_an_icon">
<view id="one" class="wave"></view>
<view id="two" class="wave"></view>
<view id="three" class="wave"></view>
<view id="four" class="wave"></view>
<view id="five" class="wave"></view>
<view id="six" class="wave"></view>
<view id="seven" class="wave"></view>
</view>
<view class="text">{{voiceIconText}}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
fromUserInfo: {},
formData: {
content: '',
limit: 15,
index: 1
},
messageList: [],
loading: true, //标识是否正在获取数据
imgHeight: '1000px',
mpInputMargin: false, //适配微信小程序 底部输入框高度被顶起的问题
chatType:"voice", // 图标类型 'voice'语音 'keyboard'键盘
voiceTitle: '按住 说话',
Recorder: uni.getRecorderManager(),
Audio: uni.createInnerAudioContext(),
recording: false, //标识是否正在录音
isStopVoice: false, //加锁 防止点击过快引起的当录音正在准备(还没有开始录音)的时候,却调用了stop方法但并不能阻止录音的问题
voiceInterval:null,
voiceTime:0, //总共录音时长
canSend:true, //是否可以发送
PointY:0, //坐标位置
voiceIconText:"正在录音...",
showFunBtn:false, //是否展示功能型按钮
AudioExam:null, //正在播放音频的实例
funList: [
{ icon:"photo-fill",title:"照片",uploadType:["album"] },
{ icon:"camera-fill",title:"拍摄",uploadType:["camera"] },
],
};
},
methods: {
//拼接消息 处理滚动
async joinData() {
if (!this.loading) {
//如果没有获取数据 即loading为false时return 避免用户重复上拉触发加载
return;
}
this.loading = false;
const data = await this.getMessageData();
//获取节点信息
const { index } = this.formData;
const sel = `#msg-${index > 1 ? this.messageList[0].hasBeenSentId : data[data.length - 1].hasBeenSentId}`;
this.messageList = [...data, ...this.messageList];
//填充数据后视图会自动滚动到最上面一层然后瞬间再跳回bindScroll的指定位置 ---体验不是很好,后期优化
this.$nextTick(() => {
this.bindScroll(sel);
//如果还有数据
if (this.formData.limit >= data.length) {
this.formData.index++;
setTimeout(() => {
this.loading = true;
}, 200);
}
});
},
//处理滚动
bindScroll(sel, duration = 0) {
const query = uni.createSelectorQuery().in(this);
query
.select(sel)
.boundingClientRect(data => {
uni.pageScrollTo({
scrollTop: data && data.top - 40,
duration
});
})
.exec();
},
//获取消息
getMessageData() {
let getData = () => {
let arr = [];
let startIndex = (this.formData.index - 1) * this.formData.limit;
let endIndex = startIndex + this.formData.limit;
for (let i = startIndex; i < endIndex; i++) {
const isItMe = Math.random() > 0.5 ? true : false;
arr.unshift({
hasBeenSentId: i, //已发送过去消息的id
content: `很高兴认识你,这是第${i + 1}条消息。`,
fromUserHeadImg: isItMe ? this._user_info.headImg : this.fromUserInfo.fromUserHeadImg, //用户头像
fromUserId: isItMe ? this._user_info.id : this.fromUserInfo.fromUserId,
isItMe, //true此条信息是我发送的 false别人发送的
createTime: Date.now(),
contentType: 1, // 1文字文本 2语音
anmitionPlay: false //标识音频是否在播放
});
}
return arr;
};
return new Promise((resolve, reject) => {
const data = getData();
setTimeout(() => {
resolve(data);
}, 500);
});
},
//切换语音或者键盘方式
switchChatType(type) {
this.chatType = type;
this.showFunBtn =false;
},
//切换功能性按钮
switchFun(){
this.chatType = 'keyboard'
this.showFunBtn = !this.showFunBtn;
uni.hideKeyboard()
},
//发送消息
sendMsg(data) {
const params = {
hasBeenSentId: Date.now(), //已发送过去消息的id
content: this.formData.content,
fromUserHeadImg: this._user_info.headImg, //用户头像
fromUserId: this._user_info.id,
isItMe: true, //true此条信息是我发送的 false别人发送的
createTime: Date.now(),
contentType: 1
};
if (data) {
if(data.contentType == 2){
//说明是发送语音
params.content = data.content;
params.contentType = data.contentType;
params.contentDuration = data.contentDuration;
params.anmitionPlay = false;
}else if(data.contentType == 3){
//发送图片
params.content = data.content;
params.contentType = data.contentType;
}
} else if (!this.$u.trim(this.formData.content)) {
//验证输入框书否为空字符传
return;
}
this.messageList.push(params);
this.$nextTick(() => {
this.formData.content = '';
// #ifdef MP-WEIXIN
if(params.contentType == 1){
uni.pageScrollTo({
scrollTop: 99999,
duration: 0, //小程序如果有滚动效果 input的焦点也会随着页面滚动...
});
}else{
setTimeout(()=>{
uni.pageScrollTo({
scrollTop: 99999,
duration: 0, //小程序如果有滚动效果 input的焦点也会随着页面滚动...
});
},150)
}
// #endif
// #ifndef MP-WEIXIN
uni.pageScrollTo({
scrollTop: 99999,
duration: 100
});
// #endif
if(this.showFunBtn){
this.showFunBtn = false;
}
// #ifdef MP-WEIXIN
if (params.contentType == 1) {
this.mpInputMargin = true;
}
// #endif
//h5浏览器并没有很好的办法控制键盘一直处于唤起状态 而且会有样式性的问题
// #ifdef H5
uni.hideKeyboard();
// #endif
});
},
//用户触摸屏幕的时候隐藏键盘
touchstart() {
uni.hideKeyboard();
},
// userid 用户id
linkToBusinessCard(userId) {
this.$u.route({
url: 'pages/businessCard/businessCard',
params: {
userId
}
});
},
//准备开始录音
startVoice(e) {
if(!this.Audio.paused){
//如果音频正在播放 先暂停。
this.stopAudio(this.AudioExam)
}
this.recording = true;
this.isStopVoice = false;
this.canSend = true;
this.voiceIconText = "正在录音..."
this.PointY = e.touches[0].clientY;
this.Recorder.start({
format: 'mp3'
});
},
//录音已经开始
beginVoice(){
if (this.isStopVoice) {
this.Recorder.stop();
return;
}
this.voiceTitle = '松开 结束'
this.voiceInterval = setInterval(()=>{
this.voiceTime ++;
},1000)
},
//move 正在录音中
moveVoice(e){
const PointY = e.touches[0].clientY
const slideY = this.PointY - PointY;
if(slideY > uni.upx2px(120)){
this.canSend = false;
this.voiceIconText = '松开手指 取消发送 '
}else if(slideY > uni.upx2px(60)){
this.canSend = true;
this.voiceIconText = '手指上滑 取消发送 '
}else{
this.voiceIconText = '正在录音... '
}
},
//结束录音
endVoice() {
this.isStopVoice = true; //加锁 确保已经结束录音并不会录制
this.Recorder.stop();
this.voiceTitle = '按住 说话'
},
//录音被打断
cancelVoice(e){
this.voiceTime = 0;
this.voiceTitle = '按住 说话';
this.canSend = false;
this.Recorder.stop();
},
//处理录音文件
handleRecorder({ tempFilePath,duration }) {
let contentDuration;
// #ifdef MP-WEIXIN
this.voiceTime = 0;
if (duration < 600) {
this.voiceIconText="说话时间过短";
setTimeout(()=>{
this.recording = false;
},200)
return;
}
contentDuration = duration/1000;
// #endif
// #ifdef APP-PLUS
contentDuration = this.voiceTime +1;
this.voiceTime = 0;
if(contentDuration <= 0) {
this.voiceIconText="说话时间过短";
setTimeout(()=>{
this.recording = false;
},200)
return;
};
// #endif
this.recording = false;
const params = {
contentType: 2,
content: tempFilePath,
contentDuration: Math.ceil(contentDuration)
};
this.canSend && this.sendMsg(params);
},
//控制播放还是暂停音频文件
handleAudio(item) {
this.AudioExam = item;
this.Audio.paused ? this.playAudio(item) : this.stopAudio(item);
},
//播放音频
playAudio(item) {
this.Audio.src = item.content;
this.Audio.hasBeenSentId = item.hasBeenSentId;
this.Audio.play();
item.anmitionPlay = true;
},
//停止音频
stopAudio(item) {
item.anmitionPlay = false;
this.Audio.src = '';
this.Audio.stop();
},
//关闭动画
closeAnmition() {
const hasBeenSentId = this.Audio.hasBeenSentId;
const item = this.messageList.find(it => it.hasBeenSentId == hasBeenSentId);
item.anmitionPlay = false;
},
//点击宫格时触发
clickGrid(index){
if(index == 0){
this.chooseImage(['album'])
}else if(index == 1){
this.chooseImage(['camera'])
}
},
//发送图片
chooseImage(sourceType){
uni.chooseImage({
sourceType,
sizeType:['compressed'],
success:res=>{
this.showFunBtn = false;
for(let i = 0;i<res.tempFilePaths.length;i++){
const params = {
contentType: 3,
content: res.tempFilePaths[i],
};
this.sendMsg(params)
}
}
})
},
//查看大图
viewImg(imgList){
uni.previewImage({
urls: imgList,
// #ifndef MP-WEIXIN
indicator: 'number'
// #endif
});
},
},
onPageScroll(e) {
if (e.scrollTop < 50) {
this.joinData();
}
},
onNavigationBarButtonTap({ index }) {
if (index == 0) {
//用户详情 设置
} else if (index == 1) {
//返回按钮
this.$u.route({
type: 'switchTab',
url: 'pages/home/home'
});
}
},
//返回按钮事件
onBackPress(e) {
//以下内容对h5不生效
//--所以如果用浏览器自带的返回按钮进行返回的时候页面不会重定向 正在寻找合适的解决方案
this.$u.route({
type: 'switchTab',
url: 'pages/home/home'
});
return true;
},
onLoad(info) {
// { messageId,fromUserName,fromUserHeadImg } = info
const userInfo = this.firendList.filter(item => item.userId == info.fromUserId)[0];
console.log(userInfo)
this.fromUserInfo = {
fromUserName: userInfo.userName,
fromUserHeadImg: userInfo.headImg,
fromUserId: 4,
messageId: 2
};
//录音开始事件
this.Recorder.onStart(e => {
this.beginVoice();
});
//录音结束事件
this.Recorder.onStop(res => {
clearInterval(this.voiceInterval);
this.handleRecorder(res);
});
//音频停止事件
this.Audio.onStop(e => {
this.closeAnmition();
});
//音频播放结束事件
this.Audio.onEnded(e => {
this.closeAnmition();
});
},
onReady() {
//自定义返回按钮 因为原生的返回按钮不可阻止默认事件
// #ifdef H5
const icon = document.getElementsByClassName('uni-page-head-btn')[0];
icon.style.display = 'none';
// #endif
uni.setNavigationBarTitle({
title: this.fromUserInfo.fromUserName
});
this.joinData();
uni.getSystemInfo({
success: res => {
this.imgHeight = res.windowHeight + 'px';
}
});
uni.onKeyboardHeightChange(res => {
if (res.height == 0) {
// #ifdef MP-WEIXIN
this.mpInputMargin = false;
// #endif
}else{
this.showFunBtn = false;
}
});
}
};
</script>
<style lang="scss" scoped>
@import './index.scss'
</style>

354
pageD/chat/index.scss Normal file
View File

@@ -0,0 +1,354 @@
page {
background-color: #f3f3f3;
}
.content {
&-showfn{
padding-bottom: 0rpx;
padding-bottom: calc(420rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(420rpx + env(safe-area-inset-bottom) );
/* #ifdef MP-WEIXIN */
/* #endif */
}
&-box {
width: 100%;
height: auto;
min-height: calc(100vh - env(safe-area-inset-top) - 200rpx);
box-sizing: content-box;
position: relative;
padding-bottom: 120rpx;
/* #ifdef APP-PLUS */
margin-bottom: 0rpx;
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
/* #endif */
/* #ifdef MP-WEIXIN */
padding-bottom: 0rpx;
padding-bottom: calc(120rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(120rpx + env(safe-area-inset-bottom) );
/* #endif */
&-bg {
width: 100%;
position: fixed;
/* #ifdef MP-WEIXIN */
bottom: 0;
bottom: constant(safe-area-inset-bottom);
bottom: env(safe-area-inset-bottom);
/* #endif */
/* #ifndef MP-WEIXIN */
top: 0;
left: 0;
/* #endif */
}
&-loading {
text-align: center;
padding: 20rpx 0;
}
.message {
padding: 13rpx 20rpx;
}
.message-item {
display: flex;
justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;
flex-wrap: nowrap;
flex-direction: row;
.img {
width: 80rpx;
height: 80rpx;
border-radius: 5rpx;
}
.content {
padding: 20rpx;
max-width: 500rpx;
border-radius: 10rpx;
font-size: 28rpx;
}
// 语音
.contentType2 {
display: flex;
flex-direction: row;
align-items: center;
.voice_icon {
height: 34rpx;
width: 34rpx;
background-repeat: no-repeat;
background-size: 100%;
}
.voice_icon_right {
background-image: url(../../static/voice-left-3.png);
margin-left: 10rpx;
}
.voice_icon_left {
background-image: url(../../static/voice-right-3.png);
margin-right: 10rpx;
}
.voice_icon_right_an {
animation: voiceAn_right 1s linear alternate infinite;
}
.voice_icon_left_an {
animation: voiceAn_left 1s linear alternate infinite;
}
@keyframes voiceAn_right {
0% {
background-image: url(../../static/voice-left-1.png);
}
50% {
background-image: url(../../static/voice-left-2.png);
}
100% {
background-image: url(../../static/voice-left-3.png);
}
}
@keyframes voiceAn_left {
0% {
background-image: url(../../static/voice-right-1.png);
}
50% {
background-image: url(../../static/voice-right-2.png);
}
100% {
background-image: url(../../static/voice-right-3.png);
}
}
}
//图片
.contentType3{
padding: 0;
border-radius: 2rpx;
background-color: transparent !important;
.img{
width: 200rpx;
height: auto;
max-width: 300rpx;
max-height: 400rpx;
}
}
.contentType3::after{
border: none !important;
display: none !important;
}
.content-type-right {
flex-direction: row-reverse;
}
&.right {
flex-direction: row-reverse;
.content {
background-color: $uni-color-success;
margin-right: 28rpx;
word-break: break-all;
line-height: 36rpx;
position: relative;
&::after {
content: '';
display: block;
width: 0;
height: 0;
border-top: 10rpx solid transparent;
border-bottom: 10rpx solid transparent;
border-left: 16rpx solid $uni-color-success;
position: absolute;
right: -16rpx;
top: 30rpx;
}
}
}
&.left {
.content {
background-color: $uni-text-color-inverse;
margin-left: 28rpx;
word-break: break-all;
line-height: 36rpx;
position: relative;
&::after {
content: '';
display: block;
width: 0;
height: 0;
border-top: 10rpx solid transparent;
border-bottom: 10rpx solid transparent;
border-right: 16rpx solid $uni-text-color-inverse;
position: absolute;
left: -16rpx;
top: 30rpx;
}
}
}
}
}
.input-box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
box-sizing: content-box;
z-index: 999;
background-color: #eaeaea;
/* #ifdef APP-PLUS */
margin-bottom: 0rpx;
margin-bottom: constant(safe-area-inset-bottom);
margin-bottom: env(safe-area-inset-bottom);
/* #endif */
/* #ifdef MP-WEIXIN */
padding-bottom: 0rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
/* #endif */
&-flex {
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: nowrap;
flex-direction: row;
padding: 20rpx;
box-sizing: border-box;
image{
width: 56rpx;
height: 56rpx;
}
.icon_img {
margin-right: 20rpx;
}
.icon_btn_add{
margin-left: 20rpx;
}
&-grow {
flex-grow: 1;
.content {
box-sizing: border-box;
background-color: #fff;
height: 80rpx;
padding: 0 20rpx;
border-radius: 12rpx;
font-size: 28rpx;
caret-color: $uni-color-success;
}
.voice_title {
text-align: center;
background-color: #ffffff;
height: 80rpx;
line-height: 80rpx;
border-radius: 12rpx;
}
}
.btn {
margin-left: 20rpx;
background-color: $u-type-success;
border: none;
}
}
.fun-box{
opacity: 0;
transition: all 0.1s ease-in-out;
height: 0;
.grid-text{
padding-top: 10rpx;
color: $uni-text-color-grey;
}
}
.show-fun-box{
opacity: 1;
height: 300rpx;
}
}
.input-box-mpInputMargin {
/* #ifdef MP-WEIXIN */
padding-bottom: 0rpx;
/* #endif */
}
.voice_an{
width: 300rpx;
height: 300rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-55%);
background-color: rgba(41,41,41,0.7);
color: white;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
border-radius: 10rpx;
.text{
padding-top: 30rpx;
}
@keyframes runVoice{
0%{
height: 10%;
}
20%{
height: 50%;
}
50%{
height: 100%;
}
80%{
height: 50%;
}
100%{
height: 0%;
}
}
.wave{
width:6rpx;
height: 100%;
margin-left: 10rpx;
border-radius: 50rpx;
background-color: #999;
vertical-align: middle;
display: inline-block;
}
.voice_an_icon{
width: 200rpx;
height: 100rpx;
line-height: 50rpx;
margin: 50rpx 0;
}
.voice_an_icon #one{
animation:runVoice 0.6s infinite 0.1s;
}
.voice_an_icon #two{
animation:runVoice 0.6s infinite 0.3s;
}
.voice_an_icon #three{
animation:runVoice 0.6s infinite 0.6s;
}
.voice_an_icon #four{
animation:runVoice 0.6s infinite 0.1s;
}
.voice_an_icon #five{
animation:runVoice 0.6s infinite 0.3s;
}
.voice_an_icon #six{
animation:runVoice 0.6s infinite 0.6s;
}
.voice_an_icon #seven{
animation:runVoice 0.6s infinite 0.1s;
}
}
}

View File

@@ -40,12 +40,11 @@
padding: 6rpx 10rpx; padding: 6rpx 10rpx;
height: 72rpx; height: 72rpx;
line-height: 72rpx; line-height: 72rpx;
background: #FF780F; background: #D02129;
font-size: 24rpx; font-size: 24rpx;
border-radius: 14rpx; border-radius: 14rpx;
color: #ffffff; color: #ffffff;
display: flex; display: flex;
flex-direction: row-reverse;
} }
.audio-facade-bg{ .audio-facade-bg{
background: url("./images/voice.png") no-repeat center; background: url("./images/voice.png") no-repeat center;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 472 B

View File

@@ -2,18 +2,18 @@
<view id="actives"> <view id="actives">
<!-- 活动消息推送 --> <!-- 活动消息推送 -->
<view class="activity" v-for="(item, index) in actives" :key="index"> <view class="activity" v-for="(item, index) in actives" :key="index">
<view class="times">{{item.kd_time}}</view> <view class="times">{{item.type}}</view>
<view class="content"> <view class="content">
<view class="store_name"> <view class="store_name">
<image :src="item.store_avatar"></image> <image src="../../pageE/static/mine/1.png"></image>
<view>{{item.store_name}}</view> <view>小时代</view>
</view> </view>
<view class="xiantiao"></view> <view class="xiantiao"></view>
<view class="title">{{item.title}}</view> <view class="title">{{item.name}}</view>
<view class="images_about"> <view class="images_about">
<image :src="item.picture"></image> <image :src="item.url"></image>
<view> <view>
<text>{{item.summary}}</text> <text>{{item.about}}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -35,9 +35,8 @@
methods: { methods: {
getCartList() { getCartList() {
this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => { this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => {
console.log(res.data.data)
if (res.errCode == 0) { if (res.errCode == 0) {
this.actives = res.data.data; this.actives == res.data;
} }
}) })
} }
@@ -47,10 +46,7 @@
}; };
</script> </script>
<style lang="scss" > <style lang="scss" scoped>
page{
background-color: #ECECEC;
}
#actives{ #actives{
height: 100%; height: 100%;
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<view id="viewes" :style="{height : height + 'px'}"> <view>
<!-- 公告咨询 --> <!-- 公告咨询 -->
<notice :list="list"></notice> <notice :list="list"></notice>
</view> </view>
@@ -13,27 +13,21 @@
list: [], list: [],
}; };
}, },
onLoad() { onLoad(){
this.informationList(); this.informationList();
var _that = this
uni.getSystemInfo({
success: function (res) {
console.log(res.windowHeight);
_that.height = res.windowHeight
}
});
}, },
methods: { methods: {
titletext() {}, titletext(){
informationList() { },
this.$u.api.informationList({}).then((res) => { informationList(){
this.$u.api.informationList({}).then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
this.list = res.data; this.list = res.data;
} }
}) })
} }
}, },
components: { components:{
notice, notice,
} }
}; };
@@ -43,9 +37,6 @@
page { page {
background-color: #ECECEC; background-color: #ECECEC;
} }
#viewes{
background: #ECECEC;
}
.sousuo { .sousuo {
height: 113rpx; height: 113rpx;
border: 1px #f00 solid; border: 1px #f00 solid;

View File

@@ -59,7 +59,7 @@
<div :class="[audio.visible ? 'record-icon record-open':'record-icon']" @click="switchAudioKeyboard"></div> <div :class="[audio.visible ? 'record-icon record-open':'record-icon']" @click="switchAudioKeyboard"></div>
<div class="record-input" @longpress="onRecordStart" @touchend="onRecordEnd" v-if="audio.visible" >{{audio.recording ? '松开发送' : '按住录音'}}</div> <div class="record-input" @longpress="onRecordStart" @touchend="onRecordEnd" v-if="audio.visible" >{{audio.recording ? '松开发送' : '按住录音'}}</div>
<div class="message-input" v-else> <div class="message-input" v-else>
<input type="text" placeholder="发送消息" v-model="content" @click="bindtapInput"> <input type="text" placeholder="发送消息" v-model="content">
</div> </div>
<div class="file-icon img-video" @click="sendImage"></div> <div class="file-icon img-video" @click="sendImage"></div>
<div class="file-icon" @click="sendVideo"></div> <div class="file-icon" @click="sendVideo"></div>
@@ -68,7 +68,6 @@
</div> </div>
<div class="record-loading" v-if="audio.recording"></div> <div class="record-loading" v-if="audio.recording"></div>
<video style="width:100%;height: 100%" :src="video.url" v-if="video.visible" id="videoPlayer" autoplay="true" @fullscreenchange="onVideoFullScreenChange" @play="onVideoPlayStart"></video> <video style="width:100%;height: 100%" :src="video.url" v-if="video.visible" id="videoPlayer" autoplay="true" @fullscreenchange="onVideoFullScreenChange" @play="onVideoPlayStart"></video>
<u-toast ref="uToast" />
</div> </div>
</template> </template>
@@ -84,7 +83,6 @@
return { return {
//聊天文本框 //聊天文本框
content: '', content: '',
bottom : '',
friend: null, friend: null,
currentUser: null, currentUser: null,
//已经接收到的消息 //已经接收到的消息
@@ -155,11 +153,6 @@
this.imService.resetFriendUnReadMessage(this.friend); this.imService.resetFriendUnReadMessage(this.friend);
}, },
methods: { methods: {
bindtapInput(){
console.log("222")
var _that = this;
_that.bottom = 14
},
initialListeners () { initialListeners () {
//传入监听器,收到一条私聊消息总是滚到到页面底部 //传入监听器,收到一条私聊消息总是滚到到页面底部
this.imService.onNewPrivateMessageReceive = (friendId, message)=> { this.imService.onNewPrivateMessageReceive = (friendId, message)=> {
@@ -198,13 +191,6 @@
}) })
}, },
sendMessage() {//发送消息 sendMessage() {//发送消息
if(!this.imService.status){
this.$refs.uToast.show({
title: '连接聊天中,请稍候',
type: 'warning'
})
return
}
if (this.content.trim() != '') { if (this.content.trim() != '') {
this.imService.sendPrivateTextMessage(this.friend.uuid, this.content); this.imService.sendPrivateTextMessage(this.friend.uuid, this.content);
let that = this let that = this
@@ -223,13 +209,6 @@
this.imService.loadPrivateHistoryMessage(this.friend.uuid, lastMessageTimeStamp); this.imService.loadPrivateHistoryMessage(this.friend.uuid, lastMessageTimeStamp);
}, },
onRecordStart () { onRecordStart () {
if(!this.imService.status){
this.$refs.uToast.show({
title: '连接聊天中,请稍候',
type: 'warning'
})
return
}
try{ try{
recorderManager.start(); recorderManager.start();
}catch(e){ }catch(e){
@@ -252,13 +231,6 @@
} }
}, },
sendVideo () {//发送文件 sendVideo () {//发送文件
if(!this.imService.status){
this.$refs.uToast.show({
title: '连接聊天中,请稍候',
type: 'warning'
})
return
}
uni.chooseVideo({ uni.chooseVideo({
success : (res) => { success : (res) => {
console.log(res) console.log(res)
@@ -267,13 +239,6 @@
}) })
}, },
sendImage() { sendImage() {
if(!this.imService.status){
this.$refs.uToast.show({
title: '连接聊天中,请稍候',
type: 'warning'
})
return
}
uni.chooseImage({ uni.chooseImage({
count :1, count :1,
success :(res) => { success :(res) => {
@@ -283,7 +248,6 @@
}) })
}, },
showImageFullScreen (e) { showImageFullScreen (e) {
var imagesUrl = [e.currentTarget.dataset.url]; var imagesUrl = [e.currentTarget.dataset.url];
uni.previewImage({ uni.previewImage({
urls: imagesUrl urls: imagesUrl
@@ -348,7 +312,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
.chatInterface .top{ .chatInterface .top{
font-size: 20rpx; font-size: 24rpx;
height: 90rpx; height: 90rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -358,7 +322,7 @@
color: blue; color: blue;
} }
.chatInterface .top .description{ .chatInterface .top .description{
/* text-decoration: underline; */ text-decoration: underline;
} }
.chatInterface .message-item{ .chatInterface .message-item{
@@ -436,7 +400,7 @@
} }
.chatInterface .action-top .file-icon{ .chatInterface .action-top .file-icon{
background: url("../images/vedio.png") no-repeat center; background: url("../images/vedio.png") no-repeat center;
background-size: 50%; background-size: 70%;
color: #9D9D9D; color: #9D9D9D;
position: relative; position: relative;
width:80rpx; width:80rpx;
@@ -451,7 +415,7 @@
} }
.chatInterface .action-top .img-video{ .chatInterface .action-top .img-video{
background: url("../images/file.png") no-repeat center; background: url("../images/file.png") no-repeat center;
background-size: 50%; background-size: 74%;
} }
.chatInterface .record-input{ .chatInterface .record-input{
width: 480rpx; width: 480rpx;
@@ -474,10 +438,9 @@
font-size: 28rpx; font-size: 28rpx;
} }
.chatInterface .send-message-btn{ .chatInterface .send-message-btn{
font-size: 28rpx; font-size: 32rpx;
width: 80rpx; width: 80rpx;
line-height: 80rpx; line-height: 80rpx;
margin-right: 20rpx;
} }
.record-loading{ .record-loading{
position: absolute; position: absolute;

View File

@@ -8,7 +8,7 @@ import common from '@/static/js/common.js'
export default { export default {
data() { data() {
return { return {
nodes: "", nodes: '',
} }
}, },
onLoad(option) { onLoad(option) {
@@ -18,9 +18,6 @@ export default {
if(option.type == 1) this.certificateInfo(); if(option.type == 1) this.certificateInfo();
if(option.type == 2) this.getAboutUsInfo(); if(option.type == 2) this.getAboutUsInfo();
}, },
onNavigationBarButtonTap(e) {
console.log(e);
},
methods: { methods: {
setTitle(title){ setTitle(title){
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
@@ -57,12 +54,10 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// page {
// background-color: #ECECEC;
// }
.article-details { .article-details {
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background: #ECECEC; background: #ECECEC;
padding: 20rpx 35rpx 0; padding: 20rpx 35rpx 0;
line-height: 45rpx;
} }
</style> </style>

View File

@@ -117,7 +117,7 @@ export default {
id: 1 // 平台店铺 id id: 1 // 平台店铺 id
}).then((res)=>{ }).then((res)=>{
// console.log(res) // console.log(res)
let user = new Friend(res.data.member_id,res.data.store_name,res.data.member_avatar) let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
this.$u.route({ this.$u.route({
url:"/pageD/privateChat/privateChat", url:"/pageD/privateChat/privateChat",
params:{ params:{

View File

@@ -1,13 +1,11 @@
<template> <template>
<view class="collection"> <view class="collection">
<view class="container"> <view class="container">
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage({ id: item.article_id, type: item.type })"> <view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
<view class="video-item" v-if="item"> <view class="video-item" v-if="item">
<image class="head" :src="item.article_pic" mode="aspectFill" v-if="item.type == 1"></image> <image class="head" :src="item.article_pic" mode="scaleToFill" v-if="item.type == 1"></image>
<view class="header_fist" v-else> <view class="header_fist" v-else>
<view class="backs"> <view class="backes"></view>
<image class="play-icon" src="/static/videoPlay.png"></image>
</view>
<image class="head" :src="item.article_pic"></image> <image class="head" :src="item.article_pic"></image>
</view> </view>
<view class="title u-line-1">{{ item.article_title }}</view> <view class="title u-line-1">{{ item.article_title }}</view>
@@ -17,14 +15,23 @@
<image :src="item.member_avatar"></image> <image :src="item.member_avatar"></image>
<text>{{ item.member_nickname }}</text> <text>{{ item.member_nickname }}</text>
</view> </view>
<view @click.stop="viewAction(item.article_id)"> <view @click.stop="delArticle(item.article_id)">
<u-icon name="more-dot-fill" color="#333" size="36"></u-icon> <u-icon name="trash" color="#333" size="36"></u-icon>
</view>
<!-- <image src="/static/image/common/4.png" @click.stop="showAction(item)"></image> -->
<!-- <view class="action" v-if="show == item.article_id">
<view class="bubble">
<view @click.stop="delArticle(item.article_id)">
<image src="/static/image/common/8.png"></image>
<text>删除</text>
</view>
</view>
</view> -->
<view class="layer" v-if="show == item.article_id" @click.stop="show=-1"></view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delArticle" border-radius="20"></u-action-sheet>
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty> <u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</view> </view>
</template> </template>
@@ -32,17 +39,8 @@
export default { export default {
data() { data() {
return { return {
tid: '',
show: -1, show: -1,
articleList: [], articleList: [],
showAction: false,
actionList: [
{
text: '删除',
color: '#000000',
fontSize: 36
}
]
} }
}, },
onShow() { onShow() {
@@ -53,6 +51,9 @@ export default {
this.articleCollectList(); this.articleCollectList();
}, },
methods: { methods: {
showAction(item) {
this.show = this.show > 0 ? -1 : item.article_id;
},
articleCollectList() { articleCollectList() {
this.$u.api.articleCollectList().then(res => { this.$u.api.articleCollectList().then(res => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@@ -63,16 +64,8 @@ export default {
} }
}) })
}, },
viewAction(id) { delArticle(id) {
this.showAction = true; this.$u.api.articleCollect({ article_id: id }).then(res => {
this.tid = id;
},
toDetailsPage({ id, type }) {
let src = type == 1 ? 'pageB/photo/index' : 'pageB/video/video';
this.$u.route(src, { id: id });
},
delArticle() {
this.$u.api.articleCollect({ article_id: this.tid }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.articleCollectList(); this.articleCollectList();
} else { } else {
@@ -80,6 +73,11 @@ export default {
} }
}) })
}, },
toDetailsPage(id) {
uni.navigateTo({
url: '/pageB/photo/index?id=' + id
});
},
} }
}; };
</script> </script>
@@ -90,9 +88,11 @@ export default {
padding: 21rpx 30rpx 0; padding: 21rpx 30rpx 0;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.item-box { .item-box {
.video-item { &:not(:nth-child(2n)) {
margin-right: 20rpx;
}
.video-item{
width: 330rpx; width: 330rpx;
height: 510rpx; height: 510rpx;
margin-top: 20rpx; margin-top: 20rpx;
@@ -104,28 +104,30 @@ export default {
height: 330rpx !important; height: 330rpx !important;
} }
.title{ .title{
margin: 20rpx auto 0; margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
height: 30rpx;
line-height: 30rpx; line-height: 30rpx;
width: 300rpx; width: 300rpx;
} }
.jianjie{ .jianjie{
height: 30rpx; // height: 60rpx;
margin: 20rpx auto 0; margin:0 auto;
margin-top: 20rpx;
font-size: 22rpx; font-size: 22rpx;
color: #666; color: #666;
line-height: 30rpx; line-height: 30rpx;
width: 300rpx; width: 300rpx;
margin-left: 18rpx; margin-left: 18rpx;
} }
.user { .user{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin: 20rpx auto 0; margin:0 auto;
margin-top: 20rpx;
width: 300rpx; width: 300rpx;
position: relative; position: relative;
.info { .info {
@@ -147,27 +149,82 @@ export default {
width: 37rpx; width: 37rpx;
height: 8rpx; height: 8rpx;
} }
} .action {
.header_fist { z-index: 19;
width: 330rpx; position: absolute;
height: 330rpx; 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; position: relative;
.backs { 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%; width: 100%;
height: 100%; height: 100%;
z-index: 9; z-index: 9;
position: absolute; background-color: transparent;
background-color: rgba(0, 0, 0, 0.35);
.play-icon {
z-index: 19;
position: absolute;
width: 100rpx;
height: 100rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
} }
} }
.header_fist{
position: relative;
.backes{
position: absolute;
top: 0;
background: rgba(0,0,0,0.6);
width: 100%;
height: 100%;
color: #fff;
}
} }
} }
} }

View File

@@ -18,23 +18,7 @@
</view> </view>
</view> </view>
<scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }"> <scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }">
<view class="medal-title">
<!-- <image src="../static/mine/29.png"></image> -->
<view>积分获取规则</view>
<!-- <image src="../static/mine/30.png"></image> -->
</view>
<view class="medal-content">
<rich-text :nodes="nodes"></rich-text> <rich-text :nodes="nodes"></rich-text>
</view>
<view class="medal-title">
<!-- <image src="../static/mine/29.png"></image> -->
<view>会员等级权益</view>
<!-- <image src="../static/mine/30.png"></image> -->
</view>
<view class="medal-content">
<rich-text :nodes="dengji"></rich-text>
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@@ -46,7 +30,6 @@ export default {
memberInfo: {}, memberInfo: {},
integralHeight: 0, integralHeight: 0,
nodes: '', nodes: '',
dengji:""
} }
}, },
onShow() { onShow() {
@@ -64,7 +47,6 @@ export default {
if (res.errCode == 0) { if (res.errCode == 0) {
this.memberInfo = res.data; this.memberInfo = res.data;
this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content); this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
this.dengji = common.unescapeHTML(res.data.grade_rule.document_content)
} }
}) })
}, },
@@ -118,24 +100,5 @@ export default {
top: 251rpx; top: 251rpx;
z-index: 9; z-index: 9;
} }
.medal-title {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 52rpx;
> image {
width: 22rpx;
height: 22rpx;
}
> view {
font-size: 32rpx;
color: rgba(51,51,51,1);
margin: 0 30rpx;
}
}
.medal-content {
padding-bottom: 20rpx;
}
} }
</style> </style>

View File

@@ -27,10 +27,9 @@ export default {
methods: { methods: {
getMemberPointsStat() { getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{ this.$u.api.getMemberPointsStat().then((res)=>{
console.log(res)
if (res.errCode == 0) { if (res.errCode == 0) {
this.title = res.data.xunzhang_rule.document_title; this.title = res.data.grade_rule.document_title;
const nodes = res.data.xunzhang_rule.document_content; const nodes = res.data.grade_rule.document_content;
this.nodes = common.unescapeHTML(nodes); this.nodes = common.unescapeHTML(nodes);
} }
}) })

View File

@@ -1,123 +1,69 @@
<template> <template>
<view class="concerns"> <view class="concerns">
<view class="tabs-top u-border-bottom">
<u-tabs ref="uTabs" :show-bar="false" :list="list" font-size="32" :current="current" @change="tabsChange" :is-scroll="false"
swiperWidth="750" active-color="#FF780F"></u-tabs>
</view>
<scroll-view v-if="current==0" scroll-y style="height: 100%;width: 100%;" class="store" @scrolltolower="onreachBottom">
<storeViwe ref="store"></storeViwe>
</scroll-view>
<scroll-view v-else scroll-y style="height: 100%;width: 100%;" @scrolltolower="onreachBottom">
<view class="concerns-container"> <view class="concerns-container">
<view v-for="(info, index) in daren" :key="index"> <view v-for="(info, index) in list" :key="index">
<view class="daren-item"> <view class="daren-item">
<image class="head" :src="info.friend_tomavatar" @click="toDetailsPage({ id: info.friend_tomid })"></image> <image class="head" :src="info.friend_tomavatar" @click="viewDetails(info.friend_tomid)"></image>
<text class="name" @click="toDetailsPage({ id: info.friend_tomid })">{{ info.friend_tomname || '' }}</text> <text class="name" @click="viewDetails(info.friend_tomid)">{{ info.friend_tomname || '' }}</text>
<view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view> <view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view>
</view> </view>
</view> </view>
<u-loadmore :status="loadStatus" bg-color="#FFFFFF" v-if="daren.length > 9" @loadmore="loadmore" />
</view> </view>
<u-empty mode="list" v-if="!daren.length" color="#000" img-width="200" font-size="30" margin-top="200"></u-empty> <u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
</scroll-view>
</view> </view>
</template> </template>
<script> <script>
import storeViwe from './storeConcerns'
export default { export default {
data() { data() {
return { return {
list: [{ name: "商家" }, { name: "达人" }], list: []
daren: [],
shangjia:[],
height: 0,
show: false,
current: 0,
page: 1,
loadStatus: 'loadmore',
timer: true,
} }
}, },
components: {
storeViwe,
},
onShow() { onShow() {
this.loadStatus = "loadmore" this.attentionMemberList();
this.page = 1
this.getPeopleList();
}, },
onLoad(){ // 下拉刷新
this.setViewHeight(); onPullDownRefresh() {
this.attentionMemberList();
}, },
methods: { methods: {
setViewHeight() { attentionMemberList() {
const res = uni.getSystemInfoSync(); this.$u.api.attentionMemberList().then(res => {
this.height = res.windowHeight - (res.windowWidth / 750 * 80) + 'px'; uni.stopPullDownRefresh();
},
// tabs通知swiper切换
tabsChange(index) {
this.current = index;
},
// scroll-view到底部加载更多
onreachBottom() {
if(this.current == 0) this.$refs.loadmore();
else if(this.current == 1) this.loadmore();
},
loadmore() {
if(!this.timer) return false;
this.timer = false;
this.loadStatus = "loading";
this.page++;
this.getPeopleList({ load: 'loadmore' }).then(length => {
this.loadStatus = "nomore";
if(length == 0) this.page--;
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
async getPeopleList({ load = 'reload' } = {}) {
const res = await this.$u.api.attentionMemberList({
role: 3,
page: this.page
})
this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.daren = res.data.data; this.list = res.data;
else if(load == 'loadmore') this.daren.push(...res.data.data); } else {
this.list = [];
} }
return res.data.data.length; })
},
viewDetails(id) {
this.$u.route('pageB/details/index', {
id: id
});
}, },
// 取消关注
changeType(id) { changeType(id) {
// console.log(id); console.log(id);
this.$u.api.attentionMember({ this.$u.api.attentionMember({
member_id: id member_id: id
}).then(res => { }).then(res => {
this.$u.toast(res.message); this.$u.toast(res.message);
this.getPeopleList(); this.attentionMemberList();
}) })
}, },
toDetailsPage(id) {
this.$u.route('pageB/details/index', {
id: id
});
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.concerns { .concerns {
background-color: #FFFFFF;
.store {
background-color: #FFFFFF;
}
.concerns-container { .concerns-container {
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-left: -20rpx; &:not(:nth-child(3n)) {
.daren-item { margin-right: 20rpx;
}
.daren-item{
width: 215rpx; width: 215rpx;
height: 282rpx; height: 282rpx;
display: flex; display: flex;
@@ -126,9 +72,6 @@ export default {
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
margin-left: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
.head{ .head{
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;

View File

@@ -2,21 +2,27 @@
<view class="progress" v-if="memberInfo"> <view class="progress" v-if="memberInfo">
<view class="header"> <view class="header">
<view class="line-progress"> <view class="line-progress">
<view class="rank-value">lv{{ memberInfo.member_level || 0 }}</view> <view class="rank-value">lv{{ memberInfo.member_level }}</view>
<view class="line-box"> <view class="line-box">
<u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress> <u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress>
<text>{{ (memberInfo.member_exppoints || 0) + '/' + (memberInfo.next_member_level_exppoints || 0) }}</text> <text>{{ memberInfo.member_exppoints + '/' + memberInfo.next_member_level_exppoints }}</text>
</view> </view>
<view class="rank-value">lv{{ memberInfo.next_member_level || 0 }}</view> <view class="rank-value">lv{{ memberInfo.next_member_level }}</view>
</view> </view>
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints || 0 }}</span></view> <view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff || '--' }} 经验值</view> <view class="distance">距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值</view>
</view> </view>
<view class="body"> <view class="body">
<view class="title" v-if="memberInfo.level_rule"> <view class="title" v-if="memberInfo.level_rule">
<image src="/static/image/mine/34.png"></image> <image src="/static/image/mine/34.png"></image>
<text>{{ memberInfo.level_rule.document_title || '' }}</text> <text>{{ memberInfo.level_rule.document_title }}</text>
</view> </view>
<!-- <view class="rank-list">
<view v-for="(rank, index) in rank" :key="index" class="list-item">
<view class="rank-value">lv{{ rank.level }}</view>
<view class="rank-interval"><span>经验值:</span>{{ rank.max == '--' ? rank.min + '及以上' : rank.min + '~' + rank.max }}</view>
</view>
</view> -->
<view class="rich"> <view class="rich">
<rich-text :nodes="nodes"></rich-text> <rich-text :nodes="nodes"></rich-text>
</view> </view>
@@ -35,6 +41,7 @@ export default {
}, },
filters: { filters: {
percentExp(value, next) { percentExp(value, next) {
// console.log(rank);
let result = '0 / 0'; let result = '0 / 0';
result = typeof(next) == 'Number' result = typeof(next) == 'Number'
? value + ' / ' + (value + next) ? value + ' / ' + (value + next)

View File

@@ -1,181 +0,0 @@
<template>
<view class="collection-item">
<u-swipe-action
v-for="(item, index) in list" :key="index"
:index='index'
:show="item.show"
:options="options"
@click="removeFavorite"
@open="open"
>
<view class="item u-border-bottom" @click="viewStoreDetails(item)">
<image :src="item.friend_tomavatar"></image>
<!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
<view class="title-wrap">
<view class="item-top u-line-1">{{ item.friend_tomname }}</view>
<view class="item-bottom">
<view class="item-date">
<image src="@/pageE/static/mine/26.png"></image>
<view>{{ item.friend_tomavatar | date }}</view>
</view>
</view>
</view>
</view>
</u-swipe-action>
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="200"></u-empty>
<u-loadmore :status="loadStatus" bg-color="#FFFFFF" v-if="list.length > pageSize" @loadmore="loadmore" />
</view>
</template>
<script>
export default {
data() {
return {
pageSize: 12,
list: [],
options: [
{
text: '删除',
style: {
backgroundColor: '#FF3131'
}
}
],
page: 1,
timer: true,
loadStatus: 'loadmore',
}
},
mounted() {
this.getStoreList();
},
methods: {
viewStoreDetails(item) {
if(this.closeAction()) return false;
// console.log(this.list);
const list = this.list.filter(item => {
return item.show;
})
if(list.length) return false;
this.$u.route({
url: 'pageC/merchant/index',
params: {
id: item.friend_store_id,
}
})
},
async getStoreList({ load = 'reload' } = {}) {
const res = await this.$u.api.attentionMemberList({
role: 2,
page: this.page
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.list = res.data.data;
else if(load == 'loadmore') this.list.push(...res.data.data);
}
this.list.forEach(item => {
Object.assign(item, { show: false });
})
// console.log(this.list);
return res.data.data.length;
},
loadmore() {
if(!this.timer) return false;
this.timer = false;
this.loadStatus = "loading";
this.page++;
let promise;
promise = this.getStoreList({ load: 'loadmore' });
promise.then(length => {
this.loadStatus = "nomore";
if(length == 0) this.page--;
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
removeFavorite(index) {
const id = this.list[index].friend_tomid;
this.$u.api.attentionMemberRemove({
id: id,
type: 'store'
}).then(res => {
if(res.errCode == 0) {
this.getStoreList();
} else {
this.$u.toast(res.message);
}
})
},
closeAction() {
let status = false;
this.list.map((val, idx) => {
if(val.show) {
status = true;
this.$set(this.list[idx], 'show', false);
};
})
this.$forceUpdate();
return status;
},
open(index) {
console.log(index);
// 先将正在被操作的swipeAction标记为打开状态否则由于props的特性限制
// 原本为'false',再次设置为'false'会无效
this.list[index].show = true;
this.list.map((val, idx) => {
if(index != idx) this.list[idx].show = false;
})
this.$forceUpdate();
}
},
};
</script>
<style lang="scss" scoped>
.collection-item {
width: 100%;
background-color: #ffffff;
.item {
width: 750rpx;
padding: 30rpx;
display: flex;
> image {
width: 180rpx;
height: 160rpx;
border-radius: 10rpx;
margin-right: 30rpx;
flex-shrink: 0;
}
.title-wrap {
overflow: hidden;
flex: 1;
.item-top {
width: 100%;
font-size: 30rpx;
color: rgba(51,51,51,1);
line-height: 44rpx;
margin-bottom: 54rpx;
}
.item-bottom {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.item-price {
font-size: 30rpx;
color: rgba(51,51,51,1);
}
.item-date {
display: flex;
align-items: center;
> image {
margin-right: 25rpx;
width: 24rpx;
height: 24rpx;
}
}
}
}
}
}
</style>

View File

@@ -5,7 +5,7 @@
<view class="suggestions"> <view class="suggestions">
<view class="text">{{ item.fb_content }}</view> <view class="text">{{ item.fb_content }}</view>
<view class="image"> <view class="image">
<image v-for="(url, index) in item.fb_images" :key="index" :src="url" mode="aspectFit" @click="previewImage(item.fb_images)"></image> <image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
</view> </view>
</view> </view>
<view class="reply" v-if="item.is_reply"> <view class="reply" v-if="item.is_reply">
@@ -13,7 +13,7 @@
<view class="reply-content u-line-4">{{ item.reply_content }}</view> <view class="reply-content u-line-4">{{ item.reply_content }}</view>
</view> </view>
<view class="date"> <view class="date">
<image src="../static/mine/26.png" mode="aspectFit"></image> <image src="../static/mine/26.png"></image>
<view>{{ item.fb_time }}</view> <view>{{ item.fb_time }}</view>
</view> </view>
</view> </view>
@@ -45,12 +45,6 @@ export default {
} }
}) })
}, },
previewImage(urls) {
// console.log(urls);
uni.previewImage({
urls: urls,
});
},
}, },
} }
</script> </script>

View File

@@ -8,15 +8,14 @@
<view class="order-rate"> <view class="order-rate">
<view class="rate"> <view class="rate">
<view class="title">物流评分</view> <view class="title">物流评分</view>
<u-rate :count="5" min-count="1" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate> <u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate>
</view> </view>
<view class="rate"> <view class="rate">
<view class="title">服务态度</view> <view class="title">服务态度</view>
<u-rate :count="5" min-count="1" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate> <u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</view> </view>
</view> </view>
<view class="write-btn" @click="submitComment">发表意见</view> <view class="write-btn" @click="submitComment">发表意见</view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@@ -27,14 +26,13 @@ export default {
return { return {
orderId: '', orderId: '',
count: 3, // 最大图片数量 count: 3, // 最大图片数量
logistics: 1, // 物流服务 logistics: 0, // 物流服务
service: 1, // 服务态度 service: 0, // 服务态度
describe: [], describe: [],
content: [], content: [],
imageList: [], // 本地图片路径 imageList: [], // 本地图片路径
goodsList: [], goodsList: [],
uploadImageList: [], // 线上图片名字 uploadImageList: [], // 线上图片名字
debounce: true, // 防止多次提交
} }
}, },
components: { components: {
@@ -78,7 +76,7 @@ export default {
setModelKey(data) { setModelKey(data) {
data.forEach(() => { data.forEach(() => {
this.content.push(''); this.content.push('');
this.describe.push(1); this.describe.push(0);
this.imageList.push([]); this.imageList.push([]);
}) })
}, },
@@ -125,28 +123,28 @@ export default {
}) })
}, },
verifyParams() { verifyParams() {
let status = true;
this.goodsList.forEach((_, index) => { this.goodsList.forEach((_, index) => {
if(this.$u.test.isEmpty(this.content[index])) { if(this.$u.test.isEmpty(this.content[index])) {
this.$u.toast('内容不可为空'); this.$u.toast('内容不可为空');
status = false; return false;
} }
}) })
return status; return true;
}, },
submitComment() { submitComment() {
// console.log(this.content); // console.log(this.content);
// console.log(this.describe); // console.log(this.describe);
// console.log(this.imageList); // console.log(this.imageList);
this.uploadImage(); this.uploadImage();
// this.goodsList.forEach((_, index) => {
// })
}, },
addOrderEvaluate() { addOrderEvaluate() {
if(!this.verifyParams()) return false; if(!this.verifyParams()) return false;
if(!this.debounce) return false;
let files = []; let files = [];
// console.log(this.uploadImageList); // console.log(this.uploadImageList);
this.uploadImageList.forEach((item, index) => { this.uploadImageList.forEach((item, index) => {
// 赋默认值
files[index] = ''; files[index] = '';
// console.log(item); // console.log(item);
item.forEach((img, idx) => { item.forEach((img, idx) => {
@@ -163,21 +161,11 @@ export default {
scores_one: this.logistics, scores_one: this.logistics,
scores_two: this.service, scores_two: this.service,
scores_three: this.describe, scores_three: this.describe,
file: files,
}; };
if(files.length) { console.log(params);
Object.assign(params, { file: files })
}
// console.log(params);
this.$u.api.updateOrderEvaluate(params).then(res => { this.$u.api.updateOrderEvaluate(params).then(res => {
if(res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$u.toast(res.message); this.$u.toast(res.message);
this.debounce = true;
}
}) })
}, },
}, },

View File

@@ -20,12 +20,12 @@
</view> </view>
<view class="info-goods"> <view class="info-goods">
<view class="goods-store"> <view class="goods-store">
<view class="stoer-title" @click="viewStoreDetails(orderInfo.extend_store.store_id)"> <view class="stoer-title">
<image :src="orderInfo.extend_store.store_avatar" class="store-image"></image> <image :src="orderInfo.extend_store.store_avatar" class="store-image"></image>
<view class="store-name">{{ orderInfo.extend_store.store_name }}</view> <view class="store-name">{{ orderInfo.extend_store.store_name }}</view>
<image src="../static/mine/21.png" class="right-icon"></image> <image src="../static/mine/21.png" class="right-icon"></image>
</view> </view>
<view v-for="goods in orderInfo.extend_order_goods" :key="goods.goods_id" @click="viewGoodsDetails(goods.goods_id)"> <view v-for="goods in orderInfo.extend_order_goods" :key="goods.goods_id">
<view class="store-goods"> <view class="store-goods">
<image :src="goods.goods_image"></image> <image :src="goods.goods_image"></image>
<view class="goods-info"> <view class="goods-info">
@@ -67,21 +67,14 @@
<view>创建时间{{ orderInfo.add_time | date}}</view> <view>创建时间{{ orderInfo.add_time | date}}</view>
</view> </view>
</view> </view>
<!-- '4', '8' --> <view class="btn" v-if="['1', '2', '4', '6', '8'].indexOf(orderstate) >= 0">
<view class="btn" v-if="['1', '2', '6'].indexOf(orderstate) >= 0"> <view class="cancel" v-if="(orderstate == '4' || orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<!-- orderstate == '4' || --> <view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="cancel" v-if="(orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view> <view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view> <view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view> <view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
<!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> --> <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view>
<view class="cancel" v-if="orderstate == '1' && orderInfo.shipping_code" @click="toOtherPage('Logistics')">查看物流</view> <view class="payment" v-if="orderstate == '6' || orderstate == '8'" @click="payNow">立即支付</view>
<view class="phone" v-if="orderstate == '1' && orderInfo.takeawayer_phone" @click="makePhone(order.takeawayer_phone)">
<u-icon name="phone-fill" color="#FF780F" size="28"></u-icon>
<text>联系骑手</text>
</view>
<!-- || orderstate == '8' -->
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="orderstate == '7'">联系官方客服</view> <view class="service" v-if="orderstate == '7'">联系官方客服</view>
<view class="submit" v-if="orderstate == '7'">提交官方审核</view> <view class="submit" v-if="orderstate == '7'">提交官方审核</view>
</view> </view>
@@ -91,6 +84,7 @@
export default { export default {
data() { data() {
return { return {
orderstate: '',
s_object: { s_object: {
'1': { '1': {
text: '待收货', text: '待收货',
@@ -124,19 +118,11 @@ export default {
text: '拼团中', text: '拼团中',
image: '../static/mine/37.png', image: '../static/mine/37.png',
}, },
'9': {
text: '已取消',
image: '../static/mine/33.png',
},
'10': {
text: '已拒绝',
image: '../static/mine/34.png',
},
}, },
orderInfo: {}, orderInfo: {},
oid: '', oid: '',
timer: '', timer: '',
countdown: '00:00:00', // 倒计时 countdown: '', // 倒计时
isSpike: false, // 倒计时是否结束 isSpike: false, // 倒计时是否结束
} }
}, },
@@ -153,19 +139,37 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
viewState(value) {
viewStoreDetails(id) { let state;
this.$u.route('pageC/merchant/index', { switch (value) {
id: id case 1:
}); state = '6';
}, break;
viewGoodsDetails(id) { case 2:
this.$u.route({ state = '4';
url: 'pageB/sdetails/index', break;
params: { case 3:
id: id, state = '1';
break;
case 4:
state = '2';
break;
case 5:
state = '3';
break;
case 6:
state = '7';
break;
case 7:
state = '5';
break;
case 9:
state = '8';
break;
default:
break;
} }
}) this.orderstate = state;
}, },
setSpikeTime(time) { setSpikeTime(time) {
// console.log(time); // console.log(time);
@@ -201,9 +205,9 @@ export default {
this.$u.api.getOrderInfo({ this.$u.api.getOrderInfo({
order_id: id, order_id: id,
}).then(res => { }).then(res => {
console.log(res)
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type); this.setTitle(this.orderInfo.view_type);
if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time); if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time);
else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime); else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime);
@@ -222,10 +226,9 @@ export default {
}, },
confirmReceive() { confirmReceive() {
this.$u.api.confirmReceive({ this.$u.api.confirmReceive({
order_id: this.orderInfo.order_id, order_id: this.order.order_id,
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
console.log(res,"确认支付")
this.getOrderInfo(this.oid); this.getOrderInfo(this.oid);
} }
this.$u.toast(res.message); this.$u.toast(res.message);
@@ -256,53 +259,8 @@ export default {
this.$u.route('/pageE/order/' + url, { this.$u.route('/pageE/order/' + url, {
oid: this.orderInfo.order_id, oid: this.orderInfo.order_id,
}); });
},
makePhone(phone) {
uni.makePhoneCall({
phoneNumber: phone
});
} }
}, },
computed:{
orderstate() {
let state;
switch (this.orderInfo.view_type) {
case 1:
state = '6';
break;
case 2:
state = '4';
break;
case 3:
state = '1';
break;
case 4:
state = '2';
break;
case 5:
state = '3';
break;
case 6:
state = '7';
break;
case 7:
state = '5';
break;
case 9:
state = '8';
break;
case 10:
state = '9';
break;
case 11:
state = '10';
break;
default:
break;
}
return state;
},
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -474,7 +432,7 @@ export default {
justify-content: flex-end; justify-content: flex-end;
padding: 19rpx 30rpx; padding: 19rpx 30rpx;
@mixin btn-class($width, $color) { @mixin btn-class($width, $color) {
// width: $width; width: $width;
height: 60rpx; height: 60rpx;
border: 2rpx solid $color; border: 2rpx solid $color;
color: $color; color: $color;
@@ -497,15 +455,6 @@ export default {
.submit { .submit {
@include btn-class($width: 216rpx, $color: rgba(255,119,15,1)); @include btn-class($width: 216rpx, $color: rgba(255,119,15,1));
} }
.phone {
@include btn-class($width: 206rpx, $color: rgba(255,119,15,1));
display: flex;
align-items: center;
justify-content: center;
.u-icon {
margin-right: 10rpx;
}
}
} }
} }
</style> </style>

View File

@@ -14,7 +14,7 @@
</view> </view>
</view> </view>
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty> <u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty>
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" font-size="14" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore> <u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -38,15 +38,15 @@ export default {
name: '试穿试送' name: '试穿试送'
},{ },{
name: '拼团中' name: '拼团中'
}, {
name: '待评价'
}, { }, {
name: '售后' name: '售后'
}, {
name: '待评价'
}], }],
orderList: [], orderList: [],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'], loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
page: 0, page: 0,
current: 0, current: Number,
swiperCurrent: 0, swiperCurrent: 0,
swiperHeight: '', swiperHeight: '',
timer: true, timer: true,
@@ -101,10 +101,10 @@ export default {
type = 9; // 拼团中 type = 9; // 拼团中
break; break;
case 6: case 6:
type = 4; // 待评价 type = 8; // 售后
break; break;
case 7: case 7:
type = 8; // 售后 type = 4; // 待评价
break; break;
default: default:
type = -1; type = -1;
@@ -195,8 +195,8 @@ export default {
this.current = current; this.current = current;
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const sys = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px'; this.swiperHeight = sys.windowHeight - 88 / 2 + 'px';
}, },
} }
}; };
@@ -207,7 +207,6 @@ export default {
background-color: #ECECEC; background-color: #ECECEC;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden;
.swiper-item { .swiper-item {
.order-scroll { .order-scroll {
.item-container { .item-container {

View File

@@ -25,7 +25,6 @@
<view class="info u-line-2">{{ item.content }}</view> <view class="info u-line-2">{{ item.content }}</view>
<view class="date">{{ item.kd_time }}</view> <view class="date">{{ item.kd_time }}</view>
</view> </view>
<u-empty text="暂无物流信息" mode="data" icon-size="88" margin-top="60"></u-empty>
</view> </view>
</view> </view>
</view> </view>
@@ -44,12 +43,12 @@ export default {
methods: { methods: {
getOrderLogistics(id) { getOrderLogistics(id) {
this.$u.api.orderLogistics({ id: id }).then(res => { this.$u.api.orderLogistics({ id: id }).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) { if(res.errCode == 0) {
this.expressInfo = res.data.express_info; this.expressInfo = res.data.express_info;
this.list = res.data.express_list; this.list = res.data.express_list;
} else { } else {
this.list = []; this.list = [];
this.$u.toast(res.message);
} }
}) })
} }

View File

@@ -1,27 +1,7 @@
<template> <template>
<view class="refund"> <view class="refund">
<view class="radios-container"> <view class="radios-container">
<view v-if="type == 2"> <u-radio-group v-model="value" @change="radioChange">
<label class="radio-view" v-for="(item, index) in goodsList" :key="index">
<view class="store_info">
<view class="info_img">
<image :src="item.goods_image" mode="">
</view>
<view class="info_txt">
<view class="content u-line-2">
{{ item.goods_name }}
</view>
<view class="much">
<text>{{ item.goods_price }}</text>
<text>x{{ item.goods_num }}</text>
</view>
</view>
</view>
</label>
</view>
<u-radio-group v-model="value" @change="radioChange" v-else>
<label class="radio-view" v-for="(item, index) in goodsList" :key="index"> <label class="radio-view" v-for="(item, index) in goodsList" :key="index">
<view class="radio"> <view class="radio">
<u-radio color="#F0AD4E" :name="item.goods_id" active-color="#FF780F" icon-size="24" shape="circle"></u-radio> <u-radio color="#F0AD4E" :name="item.goods_id" active-color="#FF780F" icon-size="24" shape="circle"></u-radio>
@@ -35,7 +15,7 @@
{{ item.goods_name }} {{ item.goods_name }}
</view> </view>
<view class="much"> <view class="much">
<text>{{ item.goods_price }}</text> <text>{{ item.goods_pay_price }}</text>
<text>x{{ item.goods_num }}</text> <text>x{{ item.goods_num }}</text>
</view> </view>
</view> </view>
@@ -44,9 +24,9 @@
</u-radio-group> </u-radio-group>
</view> </view>
<view class="refund-details"> <view class="refund-details">
<view class="goods-number" v-if="type != 2"> <view class="goods-number">
<view>选择数量</view> <view>选择数量</view>
<u-number-box :input-width="40" :input-height="38" :size="22" bg-color="#FFFFFF" :disabled-input=true color="#FF780F" :max="goods.goods_num" v-model="num" :disabled="type == 2"></u-number-box> <u-number-box :input-width="40" :input-height="38" :size="22" bg-color="#FFFFFF" :disabled-input=true color="#FF780F" :max="goods.goods_num" v-model="num"></u-number-box>
</view> </view>
<view class="refund-price"> <view class="refund-price">
<view class="price"> <view class="price">
@@ -77,26 +57,14 @@ export default {
value: '', value: '',
refundText: '', refundText: '',
num: 0, num: 0,
type:0,
sel:true
} }
}, },
computed: { computed: {
totalPrice() { totalPrice() {
if(this.type == 2){ return (this.goods.goods_pay_price * this.num).toFixed(2);
console.log(this.goodsList)
let pac = 0;
for(let i in this.goodsList){
pac += parseFloat(this.goodsList[i].goods_pay_price) * 100 ;
}
return pac / 100;
}else{
return this.goods.goods_pay_price;
}
} }
}, },
onLoad(option) { onLoad(option) {
this.type = option.type
this.oid = option.oid; this.oid = option.oid;
this.getOrderInfo(option.oid); this.getOrderInfo(option.oid);
}, },
@@ -107,7 +75,6 @@ export default {
}) })
// console.log(goodsList); // console.log(goodsList);
this.goods = goodsList[0]; this.goods = goodsList[0];
this.num = this.goods.goods_num;
console.log(this.goods); console.log(this.goods);
}, },
getOrderInfo(id) { getOrderInfo(id) {
@@ -138,8 +105,7 @@ export default {
return true; return true;
}, },
applyRefund() { applyRefund() {
if(!this.verifyParams()) return false;
if(this.type !=2 && !this.verifyParams()) return false;
let params = { let params = {
order_id: this.oid, order_id: this.oid,
goods_id: this.goods.goods_id, goods_id: this.goods.goods_id,
@@ -147,23 +113,6 @@ export default {
reason_info: this.refundText, reason_info: this.refundText,
goods_num: this.num, goods_num: this.num,
} }
console.log(params)
if(this.type == 2){
this.$u.api.addrefundall(params).then(res => {
console.log(JSON.stringify(res))
if(res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}
})
}else{
this.$u.api.refundOrder(params).then(res => { this.$u.api.refundOrder(params).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
@@ -177,8 +126,6 @@ export default {
}) })
} }
}) })
}
}, },
} }
}; };

View File

@@ -10,7 +10,7 @@
</view> </view>
<view class="rate"> <view class="rate">
<view class="title">描述相符</view> <view class="title">描述相符</view>
<u-rate :count="5" min-count="1" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate> <u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
</view> </view>
<u-input v-model="content" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" /> <u-input v-model="content" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" />
<u-upload <u-upload
@@ -45,7 +45,7 @@ export default {
name: 'common', // 其他图片 name: 'common', // 其他图片
}, },
content: '', content: '',
describe: 1, describe: '',
imageList: [], imageList: [],
} }
}, },
@@ -68,7 +68,7 @@ export default {
lists.forEach(item => { lists.forEach(item => {
this.imageList.push(item.url); this.imageList.push(item.url);
}) })
// console.log(this.imageList); console.log(this.imageList);
this.$emit('setLocalImage', { list: this.imageList, index: this.index }); this.$emit('setLocalImage', { list: this.imageList, index: this.index });
} }
} }

View File

@@ -1,11 +1,11 @@
<template> <template>
<view class="setting"> <view class="setting">
<!-- <view class="list-item"> <view class="list-item">
<view>消息提醒</view> <view>消息提醒</view>
<view> <view>
<u-switch v-model="checked" active-color="#FF770F" inactive-color="#A9A7A7" size="35"></u-switch> <u-switch v-model="checked" active-color="#FF770F" inactive-color="#A9A7A7" size="35"></u-switch>
</view> </view>
</view> --> </view>
<view v-for="(item, index) in settingList" :key="index" class="list-item" @click="toNextPage(item.link)"> <view v-for="(item, index) in settingList" :key="index" class="list-item" @click="toNextPage(item.link)">
<view>{{ item.title }}</view> <view>{{ item.title }}</view>
<image src="../static/mine/21.png"></image> <image src="../static/mine/21.png"></image>
@@ -23,7 +23,6 @@
import { import {
mapMutations mapMutations
} from 'vuex'; } from 'vuex';
import IMService from '@/static/imservice.js'
export default { export default {
data() { data() {
return { return {
@@ -64,8 +63,7 @@
}, },
{ {
title: '关于我们', title: '关于我们',
// link: '../mine/ArticleDetails?type=2' link: '../mine/ArticleDetails?type=2'
link: '/pageE/setting/version'
}, },
{ {
title: '帮助与反馈', title: '帮助与反馈',
@@ -90,10 +88,7 @@
url: url url: url
}); });
}, },
async loginOut() { loginOut() {
// 显示新人领取优惠券
this.$store.commit('updateShowCoupons', true);
let im = this.imService
this.logout(); this.logout();
uni.redirectTo({ uni.redirectTo({
url: "../../pageA/login/login", url: "../../pageA/login/login",

View File

@@ -14,7 +14,7 @@
export default { export default {
data() { data() {
return { return {
src: 'https://mall.dmygkeji.com/uploads/home/avatar/avatar_19.jpg', src: 'https://dmmall.sdbairui.com/uploads/home/avatar/avatar_19.jpg',
userList: [], userList: [],
} }
}, },

View File

@@ -3,17 +3,19 @@
<view class="feedback-box"> <view class="feedback-box">
<view class="feedback-title">人工服务</view> <view class="feedback-title">人工服务</view>
<view class="feedback-itme"> <view class="feedback-itme">
<view class="manual" @click="makePhone"> <view class="manual">
<view class="service-phone">拨打官方客服电话{{ tel400 }}</view> <view class="service-phone">拨打官方客服电话400-100-100</view>
<view class="manual-time">{{ wkTime }}</view> <view class="manual-time">周一至周五08:0-18:00</view>
</view> </view>
<view class="suggestions" @click="writeComments">意见反馈</view> <view class="suggestions">意见反馈</view>
</view> </view>
</view> </view>
<view class="feedback-box"> <view class="feedback-box">
<view class="feedback-title">常见服务</view> <view class="feedback-title">常见服务</view>
<view class="feedback-itme"> <view class="feedback-itme">
<view class="u-line-2" v-for="item in helpList" :key="item.id" @click="viewAnswer(item)">{{ item.question }}</view> <view class="u-line-2">账号问题登录时需要验证码手机号使用不了怎么办</view>
<view class="u-line-2">账号问题登录时需提示您的密码不安全请重置</view>
<view class="u-line-2">账号问题登录密码忘记了怎么办</view>
</view> </view>
</view> </view>
</view> </view>
@@ -21,37 +23,7 @@
<script> <script>
export default { export default {
data() { data() {
return { return {}
helpList: [],
wkTime: '',
tel400: '',
}
},
onLoad() {
this.getHelpList();
},
methods: {
makePhone() {
uni.makePhoneCall({
phoneNumber: this.tel400,
});
},
viewAnswer(item) {
this.$store.commit('setQuestion', item);
this.$u.route('pageE/setting/question');
},
getHelpList() {
this.$u.api.getSettingHelpList().then(res => {
this.helpList = res.data.QA;
this.tel400 = res.data.tel400;
this.wkTime = res.data.wkTime;
})
},
writeComments() {
uni.navigateTo({
url: '/pageE/more/WriteComments'
});
}
} }
}; };
</script> </script>

View File

@@ -1,51 +0,0 @@
<template>
<view class="question">
<view class="public-view quest">
<view class="title qt">Q:</view>
<view class="qa">{{ item.question }}</view>
</view>
<view class="public-view answer">
<view class="title at">A:</view>
<view>
<rich-text :nodes="nodes"></rich-text>
</view>
</view>
</view>
</template>
<script>
import common from '@/static/js/common.js'
export default {
data() {
return {
item: {},
nodes: ''
}
},
onLoad() {
this.item = this.$store.state.question;
console.log(this.item);
this.nodes = common.unescapeHTML(this.item.answer);
}
};
</script>
<style lang="scss" scoped>
.question {
min-height: calc(100vh - var(--window-top));
background: #FFFFFF;
padding: 20rpx 30rpx;
.public-view {
display: flex;
margin-bottom: 40rpx;
.title {
font-size: 36rpx;
margin-right: 20rpx;
}
.at {
color: #ff780f;
}
.qa {
line-height: 36rpx;
}
}
}
</style>

View File

@@ -1,58 +0,0 @@
<template>
<u-modal v-model="show" :show-cancel-button="true" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
<view class="u-update-content">
<rich-text :nodes="content"></rich-text>
</view>
</u-modal>
</template>
<script>
export default {
data() {
return {
show: true,
// 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
content: `
1. 新增几个bug<br>
2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`,
}
},
onReady() {
this.show = true;
},
methods: {
cancel() {
this.closeModal();
},
confirm() {
this.closeModal();
},
closeModal() {
uni.navigateBack();
}
}
}
</script>
<style scoped lang="scss">
page {
background-color: rgba(0, 0, 0, 0);
}
/deep/ .u-mode-center-box {
background-color: transparent;
}
// .u-full-content {
// background-color: #00C777;
// }
.u-update-content {
font-size: 26rpx;
color: $u-content-color;
line-height: 1.7;
padding: 30rpx;
}
::v-deep.u-mode-center-box {
background-color: transparent;
}
</style>

View File

@@ -1,108 +0,0 @@
<template>
<view class="version">
<view class="header">
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
<view class="title">德铭阳光</view>
<view class="tit-info">版本:{{ version }} for {{ phone_type }}</view>
</view>
<view class="main">
<view @click="viewAboutUs">
<text class="title">产品介绍</text>
<u-icon name="arrow-right" color="#999"></u-icon>
</view>
<view class="version-view">
<text class="title">版本更新</text>
<text class="tips" v-if="1">已是最新版本</text>
<text class="tips" v-else @click="updateVersion">发现新版本</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
version: "",
phone_type: "",
}
},
onLoad() {
this.getVersion();
this.phone_type = this.$u.os();
},
methods: {
// 检查版本号
getVersion() {
this.$u.post("Specialci/checkVersion",{ app_version: 1 }).then(res => {
// console.log(res);
this.version = res.data.app_version;
})
},
viewAboutUs() {
this.$u.route('/pageE/mine/ArticleDetails', {
type: 2
});
},
updateVersion() {
this.$u.route('/pageE/setting/updateVersion');
}
}
};
</script>
<style lang="scss" scoped>
.header {
width: 500rpx;
margin: 0 auto;
padding: 30rpx;
text-align: center;
.tit-img {
width: 200rpx;
height: 200rpx;
}
.title {
margin: 18rpx 0;
font-weight: bold;
font-size: 26rpx;
letter-spacing: 2rpx;
}
.tit-info {
font-size: 22rpx;
color: #666;
}
}
.main {
margin: 20rpx 0;
& > view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100rpx;
padding: 0 20rpx;
line-height: 100rpx;
color: #333;
font-size: 30rpx;
background-color: #fff;
border-bottom: 1px solid #f2f2f2;
.title {
width: 200rpx;
}
}
.tips {
color: #999;
font-size: 22rpx;
}
.version-view {
.tips {
flex: 1;
text-align: right;
}
}
}
.u-content {
padding: 20rpx;
font-size: 30rpx;
text-indent: 1rem;
line-height: 1.2;
}
</style>

View File

@@ -3,14 +3,13 @@
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper> <u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }"> <swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index"> <swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
<scroll-view scroll-y class="scroll-coupon" @scrolltolower="onreachBottom"> <scroll-view scroll-y class="scroll-coupon">
<view v-if="couponList[index]"> <view v-if="couponList[index]">
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index"> <view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
<Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon> <Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
</view> </view>
</view> </view>
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty> <u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
<u-loadmore :status="loadStatus[current]" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20" @loadmore="onreachBottom" v-if="!couponList[index] || couponList[index].length>=pageSize"></u-loadmore>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@@ -33,10 +32,6 @@ export default {
swiperHeight: '', swiperHeight: '',
couponList: [], couponList: [],
goodsClass: [], goodsClass: [],
pageSize: 6,
page: 0,
timer: true,
loadStatus: ['loadmore', 'loadmore', 'loadmore'],
} }
}, },
components: { components: {
@@ -51,7 +46,8 @@ export default {
}, },
watch: { watch: {
current(value) { current(value) {
this.getMemberCouponList(value); let status = value + 1;
this.getMemberCouponList(status);
} }
}, },
methods: { methods: {
@@ -60,48 +56,30 @@ export default {
this.goodsClass = res.data; this.goodsClass = res.data;
}) })
}, },
async getMemberCouponList({ load = 'reload' }) { getMemberCouponList(current) {
if(load == 'reload') this.page = 0; this.$u.api.getMemberCouponList({
const res = await this.$u.api.getMemberCouponList({ status: current
status: this.current + 1, // 代金券状态 1:未用 2:已用 3:过期 4:收回 }).then(res => {
page: this.page, if(res.errCode == 0) {
}) this.couponList[this.current] = res.data;
this.timer = true; } else {
if(load == 'reload') this.couponList[this.current] = res.data; this.couponList[this.current] = [];
else if(load == 'loadmore') this.couponList[this.current].push(...res.data); }
this.$forceUpdate(); this.$forceUpdate();
// console.log(this.couponList);
return res.data.length;
},
onreachBottom() {
if(!this.timer) return false;
this.timer = false;
this.loadStatus.splice(this.current, 1, "loading");
this.page++;
this.getMemberCouponList({ load: 'loadmore' }).then(length => {
this.loadStatus.splice(this.current, 1, "nomore");
if(length == 0) this.page--;
}).catch(() => {
this.loadStatus.splice(this.current, 1, "nomore");
console.log(this.loadStatus[this.current]);
this.page--;
}) })
}, },
useCoupon(coupon) { useCoupon(coupon) {
// console.log(coupon); // console.log(coupon);
// if(coupon.type == 1) { if(coupon.type == 1) {
// this.$u.route({ this.$u.route({
// type: 'switchTab', type: 'switchTab',
// url: 'pages/shop/index', url: 'pages/shop/index',
// }) })
// } else if(coupon.type == 2) { } else if(coupon.type == 2) {
// this.$u.route('pageC/merchant/index', { this.$u.route('pageC/merchant/index', {
// id: coupon.voucher_store_id, id: coupon.voucher_store_id,
// });
// }
this.$u.route('pageE/useCoupon/index', {
cid: coupon.vouchertemplate_id,
}); });
}
}, },
setViewHeight() { setViewHeight() {
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();

View File

@@ -6,20 +6,16 @@
<view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item"> <view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item">
<view class="item-title" @click="viewStoreDetails(item.store_id)"> <view class="item-title" @click="viewStoreDetails(item.store_id)">
<image :src="item.store_avatar"></image> <image :src="item.store_avatar"></image>
<view class="u-line-1">{{ item.store_name }}</view> <view class="u-line-2">{{ item.store_name }}</view>
</view> </view>
<image :src="item.goods_image" class="item-image" mode="aspectFit" @click="viewGoodsDetails(item.goods_id)"></image> <image :src="item.goods_image" class="item-image" @click="viewGoodsDetails(item.goods_id)"></image>
<view class="item-info" @click="viewGoodsDetails(item.goods_id)"> <view class="item-info" @click="viewGoodsDetails(item.goods_id)">
<view class="info-name u-line-1">{{ item.goods_name }}</view> <view class="info-name u-line-1">{{ item.goods_name }}</view>
<view @click.stop="viewAction(item.goods_id)">
<u-icon name="more-dot-fill" color="#333" size="32"></u-icon>
</view> </view>
</view> </view>
</view> </view>
</view>
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty> <u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
<u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length >= pageSize" @loadmore="reachBottom"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="historyList.length > 9"></u-loadmore>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
@@ -28,41 +24,16 @@
export default { export default {
data() { data() {
return { return {
pageSize: 12,
hid: '', // 选中的商品 id
historyList: [], historyList: [],
page: 1, // 默认1 page: 1, // 默认1
loadStatus: 'loadmore', loadStatus: 'loadmore',
timer: true, timer: true,
showAction: false,
actionList: [
{
text: '删除',
color: '#000000',
fontSize: 36
}
]
}; };
}, },
onLoad() { onLoad() {
this.getBrowseList(); this.getBrowseList();
}, },
methods: { methods: {
viewAction(id) {
this.showAction = true;
this.hid = id;
},
delHistory() {
let glist = [];
glist.push(this.hid);
this.$u.api.delMemberBrowse({ goods_id: glist }).then(res => {
if(res.errCode == 0) {
this.getBrowseList();
} else {
this.$u.toast(res.message);
}
})
},
viewStoreDetails(sid) { viewStoreDetails(sid) {
this.$u.route({ this.$u.route({
url: 'pageC/merchant/index', url: 'pageC/merchant/index',
@@ -79,27 +50,24 @@ export default {
} }
}) })
}, },
async getBrowseList ({ load = 'reload' } = {}) { async getBrowseList () {
if(load == 'reload') this.page = 1;
const res = await this.$u.api.getBrowseList({ page: this.page }); const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = true; this.timer = false;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.historyList = res.data.storeInfo; this.historyList.push(...res.data.storeInfo);
else if(load == 'loadmore') this.historyList.push(...res.data.storeInfo);
} }
return res.data.storeInfo.length; return res.data.storeInfo.length;
}, },
reachBottom() { reachBottom() {
if(!this.timer) return false; if(!this.timer) return false;
this.timer = false;
this.loadStatus = "loading"; this.loadStatus = "loading";
this.page++; this.page++;
this.getBrowseList({ load: 'loadmore' }).then(length => { this.getBrowseList({page: this.page}).then(length => {
if(length == 0) { if(length == 0) {
this.page--; this.page--;
this.loadStatus = 'nomore'; this.status = 'nomore';
} else { } else {
this.loadStatus = 'loading'; this.status = 'loading';
} }
}).catch(() => { }).catch(() => {
this.loadStatus = "nomore"; this.loadStatus = "nomore";
@@ -126,11 +94,10 @@ export default {
background: rgba(255,255,255,1); background: rgba(255,255,255,1);
border-radius: 10rpx; border-radius: 10rpx;
padding: 20rpx 20rpx 22rpx; padding: 20rpx 20rpx 22rpx;
margin: 0 11rpx 20rpx 0; margin: 0 10rpx 20rpx 0;
.item-title { .item-title {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20rpx;
> image { > image {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
@@ -143,24 +110,25 @@ export default {
} }
} }
.item-image { .item-image {
margin: 20rpx 0 17rpx;
width: 180rpx; width: 180rpx;
height: 140rpx; height: 140rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.item-info { .item-info {
height: 60rpx;
font-size: 22rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.info-name { .info-name {
height: 60rpx; margin-right: 10rpx;
line-height: 60rpx;
margin-right: 14rpx;
flex: 1; flex: 1;
font-size: 22rpx; font-size: 22rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
} }
> image {
width: 37rpx;
height: 8rpx;
}
} }
} }
} }

View File

@@ -21,7 +21,7 @@
<view class="order-status">{{ item.order_status | viewStatus }}</view> <view class="order-status">{{ item.order_status | viewStatus }}</view>
</view> </view>
<view class="order-info"> <view class="order-info">
<image :src="type == 1 ? item.goods_image : item.images[0]" mode="aspectFit"></image> <image :src="item.goods_image"></image>
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20"> <view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
<view>骑手名字{{ item.takeawayer_name || '' }}</view> <view>骑手名字{{ item.takeawayer_name || '' }}</view>
<view>联系方式{{ item.takeawayer_mobile || '' }}</view> <view>联系方式{{ item.takeawayer_mobile || '' }}</view>
@@ -40,9 +40,13 @@
<view>商家在正路途中请耐心等待</view> <view>商家在正路途中请耐心等待</view>
</view> </view>
</view> </view>
<view class="send-btn" v-if="item.order_status == 20 || (item.order_status == 50&& !item.comment)"> <view class="send-btn" v-if="item.order_status == 20 || item.order_status == 50">
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">确认完成</view> <view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">
<view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">去评价</view> 确认完成
</view>
<view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">
去评价
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@@ -83,7 +87,6 @@ export default {
timer: true, timer: true,
commentList: [], commentList: [],
swiperHeight: '', swiperHeight: '',
type: 1, // 1 平台 2 实体店
} }
}, },
components: { components: {
@@ -136,9 +139,9 @@ export default {
}, },
methods: { methods: {
async sendLaundryOrderList({ load = 'reload' } = {}) { async sendLaundryOrderList({ load = 'reload' } = {}) {
// let type = this.list[0].name == '平台历史订单' ? 1 : 2; let type = this.list[0].name == '平台历史订单' ? 1 : 2;
const res = await this.$u.api.sendLaundryOrderList({ const res = await this.$u.api.sendLaundryOrderList({
type: this.type, type: type,
page: this.page, page: this.page,
}) })
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@@ -211,10 +214,8 @@ export default {
}, },
replaces(e){ replaces(e){
if(e == 1){ if(e == 1){
this.type = 2;
this.$set(this.list,0,{name: '实体店历史订单'} ) this.$set(this.list,0,{name: '实体店历史订单'} )
} else { } else {
this.type = 1;
this.$set(this.list,0,{name: '平台历史订单'} ) this.$set(this.list,0,{name: '平台历史订单'} )
} }
this.sendLaundryOrderList(); this.sendLaundryOrderList();
@@ -321,21 +322,17 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 30rpx; margin-top: 30rpx;
.btn { .btn{
box-sizing: border-box;
width: 154rpx; width: 154rpx;
// height: 54rpx; height: 54rpx;
border-radius: 49rpx; border-radius: 49rpx;
// transform: translate(-50%, 0); transform: translate(-50%, 0);
font-size: 26rpx; font-size: 26rpx;
border: 1rpx solid rgba(255,120,15,1); border: 1rpx solid rgba(255,120,15,1);
color:rgba(255,120,15,1); color:rgba(255,120,15,1);
text-align: center; text-align: center;
line-height: 54rpx; line-height: 54rpx;
// margin-right: -80rpx; margin-right: -80rpx;
// display: flex;
// align-items: center;
// justify-content: center;
} }
} }
} }

View File

@@ -85,7 +85,7 @@
</view> </view>
</u-upload> </u-upload>
</view> </view>
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view> <view class="wash-btn" @click="submitImage">确认送洗</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
@@ -141,7 +141,7 @@
</view> </view>
</u-upload> </u-upload>
</view> </view>
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view> <view class="wash-btn" @click="submitImage">确认送洗</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select> <u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
@@ -160,7 +160,7 @@
<text>选择订单</text> <text>选择订单</text>
<u-icon name="close" color="#A29FA3" size="32" @click="showPopup=false"></u-icon> <u-icon name="close" color="#A29FA3" size="32" @click="showPopup=false"></u-icon>
</view> </view>
<scroll-view scroll-y class="order-list" @scrolltolower="onreachBottom"> <scroll-view scroll-y class="order-list">
<u-radio-group v-model="value" @change="radioChange"> <u-radio-group v-model="value" @change="radioChange">
<view v-for="(items, index) in orderList" :key="index" class="order-item"> <view v-for="(items, index) in orderList" :key="index" class="order-item">
<view class="store"> <view class="store">
@@ -195,7 +195,6 @@
</view> </view>
</view> </view>
</u-radio-group> </u-radio-group>
<u-loadmore :status="loadStatu" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20"></u-loadmore>
</scroll-view> </scroll-view>
<view class="order-btn" @click="confirm">确认</view> <view class="order-btn" @click="confirm">确认</view>
</view> </view>
@@ -223,7 +222,7 @@ export default {
}], }],
typeList: [], // 商品类型列表 typeList: [], // 商品类型列表
orderList: [], // 商品列表 orderList: [], // 商品列表
page: 1, page: 0,
current: 0, current: 0,
swiperCurrent: 0, swiperCurrent: 0,
areaList: [], // 地址列表 areaList: [], // 地址列表
@@ -245,8 +244,6 @@ export default {
name: 'common', // 其他图片 name: 'common', // 其他图片
}, },
debounce: true, debounce: true,
timer: true,
loadStatu: 'loadmore'
} }
}, },
onShow() { onShow() {
@@ -287,38 +284,20 @@ export default {
// console.log(e); // console.log(e);
this.type = e[0]; this.type = e[0];
}, },
onreachBottom() {
if(!this.timer) return false;
this.timer = false;
this.loadStatu = "loading";
this.page++;
this.getOrderList({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatu = "nomore";
} else {
this.loadStatu = "loadmore";
}
}).catch(() => {
this.loadStatu = "nomore";
this.page--;
})
},
async getOrderList({ load = 'reload' } = {}) { async getOrderList({ load = 'reload' } = {}) {
const res = await this.$u.api.getSendOrderList({ const res = await this.$u.api.getOrderList({
page: this.page, page: this.page,
// type: '40',
}) })
this.timer = true; this.timer = true;
if(res.errCode == 0) { if(res.errCode == 0) {
if(load == 'reload') this.orderList = res.data; if(load == 'reload') this.orderList = res.data;
else this.orderList.push(...res.data); else this.orderList.push(...res.data);
} }
return res.data.length; return res;
}, },
submitImage() { submitImage() {
// console.log(222); if(!this.debounce) return;
if(!this.debounce) return false;
// console.log(111);
this.debounce = false; this.debounce = false;
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload(); this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
}, },
@@ -339,42 +318,42 @@ export default {
validationParams() { validationParams() {
if (this.current == 1) { if (this.current == 1) {
if(this.$u.test.isEmpty(this.goodsName)) { if(this.$u.test.isEmpty(this.goodsName)) {
this.$u.toast('商品名称不能为空'); this.showToast('商品名称不能为空', 'warning');
return false; return false;
} }
} }
if(this.current == 0) { if(this.current == 0) {
if(JSON.stringify(this.checkedGoods) == '{}') { if(JSON.stringify(this.checkedGoods) == '{}') {
this.$u.toast('订单不能为空'); this.showToast('订单不能为空', 'warning');
return false; return false;
} }
} }
if(this.$u.test.isEmpty(this.goodsStatus)) { if(this.$u.test.isEmpty(this.goodsStatus)) {
this.$u.toast('衣服状况不能为空'); this.showToast('衣服状况不能为空', 'warning');
return false; return false;
} }
if(JSON.stringify(this.type) == '{}') { if(JSON.stringify(this.type) == '{}') {
this.$u.toast('商品类型不能为空'); this.showToast('商品类型不能为空', 'warning');
return false; return false;
} }
if(this.$u.test.isEmpty(this.name)) { if(this.$u.test.isEmpty(this.name)) {
this.$u.toast('送洗人不能为空'); this.showToast('送洗人不能为空', 'warning');
return false; return false;
} }
if(this.$u.test.isEmpty(this.phone)) { if(this.$u.test.isEmpty(this.phone)) {
this.$u.toast('手机号不能为空'); this.showToast('手机号不能为空', 'warning');
return false; return false;
} }
if(!this.$u.test.mobile(this.phone)) { if(!this.$u.test.mobile(this.phone)) {
this.$u.toast('手机号错误'); this.showToast('手机号错误', 'warning');
return false; return false;
} }
if(this.$u.test.isEmpty(this.area)) { if(this.$u.test.isEmpty(this.area)) {
this.$u.toast('地址不能为空'); this.showToast('地址不能为空', 'warning');
return false; return false;
} }
if(this.$u.test.isEmpty(this.address)) { if(this.$u.test.isEmpty(this.address)) {
this.$u.toast('详细地址不能为空'); this.showToast('详细地址不能为空', 'warning');
return false; return false;
} }
return true; return true;
@@ -404,10 +383,11 @@ export default {
} }
// console.log(params); // console.log(params);
this.$u.api.sendLaundrySave(params).then(res => { this.$u.api.sendLaundrySave(params).then(res => {
// this.$u.toast(res.message); this.$u.toast(res.message);
if(res.errCode == 0) { if(res.errCode == 0) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
type: 'success',
back: true, back: true,
}) })
} else { } else {
@@ -472,6 +452,12 @@ export default {
this.choose = false; this.choose = false;
} }
}, },
showToast(message, type) {
this.$refs.uToast.show({
title: message,
type: type,
})
},
}, },
}; };
</script> </script>

View File

@@ -1,193 +0,0 @@
<template>
<view class="classify-goods">
<view class="tab-container">
<view class="salenum" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">销量</view>
<view class="price" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">
<view class="text">价格</view>
<view class="icon">
<u-icon name="arrow-up-fill" :color="(current == 1 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
<u-icon name="arrow-down-fill" :color="(current == 1 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
</view>
</view>
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
</view>
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)">
<image :src="goods.goods_image"></image>
<view class="right">
<view class="name u-line-1">{{ goods.goods_name }}</view>
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
<view class="price">{{ goods.goods_price }}</view>
</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
pageSize: 12,
cid: '',
page: 1,
current: 0,
priceOrderAsc: true, // 是否升序
goodsList: [],
scrollHeight: '',
loadStatus: 'loadmore',
timer: true, // 防止上拉加载短时间内多次调用
}
},
watch: {
current(value) {
this.page = 1;
this.couponGoodsList({ laod: 'reload' });
},
priceOrderAsc(value) {
this.page = 1;
this.couponGoodsList({ laod: 'reload' });
}
},
onLoad(option) {
this.cid = option.cid;
this.couponGoodsList({ load: 'reload' });
this.setViewHeight();
},
methods: {
setOrderSort() {
let sort = '';
if(this.current == 0) {
sort = 'goods_salenum';
} else if (this.current == 1) {
if(this.priceOrderAsc) sort = 'goods_price_asc';
else sort = 'goods_price_desc';
} else if (this.current == 2) {
sort = 'evaluation_count';
}
return sort;
},
// 排序方式 goods_salenum销量 evaluation_count评价 goods_price_asc价格从低到高 goods_price_desc价格从高到低
async couponGoodsList({ load = 'reload' } = {}) {
const sort = this.setOrderSort();
const res = await this.$u.api.couponGoodsList({
voucher_id: this.cid,
page: this.page,
order: sort,
})
this.timer = true;
if(res.errCode == 0) {
if(load == 'reload') this.goodsList = res.data;
else if(load == 'loadmore') this.goodsList.push(...res.data);
}
return res.data.length;
},
loadMore() {
if(this.goodsList.length < this.pageSize) return false;
if(!this.timer) return false;
this.loadStatus = "loading";
this.page++;
this.couponGoodsList({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
switchCurrent(current) {
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
this.current = current;
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * (90 + 30) + 'px';
},
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
id: id,
});
}
}
};
</script>
<style lang="scss" scoped>
.classify-goods {
.tab-container {
box-sizing: border-box;
padding: 30rpx 40rpx;
display: flex;
margin-bottom: 30rpx;
> view {
height: 30rpx;
line-height: 30rpx;
flex: 1;
font-size: 32rpx;
color: rgba(51,51,51,1);
}
.salenum {
text-align: left;
}
.price {
display: flex;
align-items: center;
justify-content: center;
.text {
margin-right: 5rpx;
}
.icon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
.evaluation {
text-align: right;
}
.current {
color: rgba(255,120,15,1);
}
}
.goods-container {
.goods-item {
margin: 0 auto;
width: 690rpx;
display: flex;
background-color: #F5F5F5;
margin-bottom: 30rpx;
align-items: center;
> image {
width: 220rpx;
height: 200rpx;
flex-shrink: 0;
margin-right: 30rpx;
}
.right {
width: 418rpx;
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.name {
font-size: 30rpx;
color: rgba(51,51,51,1);
}
.briefing {
font-size: 28rpx;
color: rgba(102,102,102,1);
}
.price {
font-size: 26rpx;
color: rgba(255,49,49,1);
}
}
}
}
}
</style>

View File

@@ -57,7 +57,8 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false,
"animationType": "slide-in-bottom"
} }
} }
}, },
@@ -177,7 +178,7 @@
"searchInput": { "searchInput": {
"align": "left", "align": "left",
"borderRadius": "15px", "borderRadius": "15px",
"placeholder": "请输入搜索内容", "placeholder": "搜索您需要的商品",
"backgroundColor": "rgb(236,236,236)", "backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999", "placeholderColor": "#999999",
"disabled": false, "disabled": false,
@@ -197,7 +198,7 @@
"searchInput": { "searchInput": {
"align": "left", "align": "left",
"borderRadius": "15px", "borderRadius": "15px",
"placeholder": "请输入搜索内容", "placeholder": "搜索您需要的商品",
"backgroundColor": "rgb(236,236,236)", "backgroundColor": "rgb(236,236,236)",
"placeholderColor": "#999999", "placeholderColor": "#999999",
"disabled": false, "disabled": false,
@@ -237,18 +238,6 @@
} }
} }
}, },
{
"path": "coupon/index",
"style": {
"navigationStyle": "custom",
"app-plus": {
"animationType": "fade-in",
"background": "transparent",
"backgroundColor": "rgba(0,0,0.5)",
"popGesture": "none"
}
}
},
{ {
"path": "coupon/details", "path": "coupon/details",
"style": { "style": {
@@ -346,8 +335,8 @@
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
"titleNView": { "titleNView": {
"type": "transparent",
"titleColor": "#333333", "titleColor": "#333333",
"backgroundColor": "rgba(255,255,255,0)",
"buttons": [ "buttons": [
// { // {
// "type":"none", // "type":"none",
@@ -364,13 +353,12 @@
"fontSize":"22", "fontSize":"22",
"fontSrc": "/static/fonts/cart.ttf", "fontSrc": "/static/fonts/cart.ttf",
"color": "#FFFFFF" "color": "#FFFFFF"
} }
], ],
"searchInput": { "searchInput": {
"align": "left", "align": "left",
"borderRadius": "15px", "borderRadius": "15px",
"placeholder": "搜索您需要的本店铺商品", "placeholder": "搜索您需要的商品",
"backgroundColor": "rgb(236,236,236)", "backgroundColor": "rgb(236,236,236)",
"disabled": true "disabled": true
} }
@@ -501,7 +489,7 @@
{ {
"path": "attention/attention", "path": "attention/attention",
"style": { "style": {
"navigationBarTitleText": "达人消息", "navigationBarTitleText": "关注消息",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
"titleColor": "#333333", "titleColor": "#333333",
@@ -564,19 +552,6 @@
} }
} }
}, },
{
"path": "useCoupon/index",
"style": {
"navigationBarTitleText": "优惠券商品",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{ {
"path": "more/MineHelp", "path": "more/MineHelp",
"style": { "style": {
@@ -845,6 +820,7 @@
{ {
"path": "mine/MineConcerns", "path": "mine/MineConcerns",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的关注", "navigationBarTitleText": "我的关注",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@@ -862,9 +838,8 @@
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
"titleNView": { "titleNView": {
"type": "default", "backgroundColor": "rgba(255,255,255,0)",
"titleColor": "#ffffff", "titleColor": "#ffffff"
"backgroundColor":"#F09C6A"
} }
} }
} }
@@ -967,19 +942,6 @@
} }
} }
}, },
{
"path": "setting/question",
"style": {
"navigationBarTitleText": "常见问题",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{ {
"path": "setting/ShieldUsers", "path": "setting/ShieldUsers",
"style": { "style": {
@@ -993,31 +955,6 @@
} }
} }
}, },
{
"path": "setting/version",
"style": {
"navigationBarTitleText": "关于我们",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{
"path": "setting/updateVersion",
"style": {
"navigationStyle": "custom", // 取消本页面的导航栏
"app-plus": {
"animationType": "fade-in", // 设置fade-in淡入动画为最合理的动画类型
"background": "transparent", // 背景透明
"backgroundColor": "rgba(0,0,0,0)", // 背景透明
"popGesture": "none" // 关闭IOS屏幕左边滑动关闭当前页面的功能
}
}
},
{ {
"path": "order/Index", "path": "order/Index",
"style": { "style": {

View File

@@ -18,9 +18,9 @@
</view> </view>
<view class="sosuo"></view> <view class="sosuo"></view>
</view> </view>
<swiper class="card" @change="dianji" :current="num" @touchmove.stop.prevent="moveHandle"> <swiper class="card" @change="dianji" :current="num">
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" upper-threshold="100" @scrolltolower="swiperBottom" @scrolltoupper="swiperTop"> <scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" @scrolltolower="swiperBottom">
<view class="box"> <view class="box">
<!-- <indexad style="width:690rpx"></indexad> --> <!-- <indexad style="width:690rpx"></indexad> -->
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper> <u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
@@ -39,26 +39,20 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottomLive(e)" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling" <scroll-view style="width:100%;height:100%" scroll-y="true">
@refresherrestore="onRestore" @refresherabort="onAbort">
<view class="box"> <view class="box">
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper> <u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
<view class="list"> <view class="list">
<view> <view>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id" <zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id"
:key="item.live_id" :name="item.room_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem> :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
</view> </view>
<view style="margin-left:20rpx"> <view style="margin-left:20rpx">
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id" <zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id"
:key="item.live_id" :name="item.room_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem> :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
</view> </view>
</view> </view>
<view style="height:600rpx" v-if="tabLiveLists.length == 0">
<u-empty text="暂无直播信息" mode="list"></u-empty>
</view> </view>
<u-loadmore class="load-size" color="#999999" :status="status" v-if="tabLiveLists.length !=0" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
@@ -85,7 +79,7 @@
<videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem> <videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem>
</view> </view>
<view class="no-data" v-if="!fansList.length">您还没有关注哦赶紧去点点关注</view> <view class="no-data" v-if="!fansList.length">您还没有关注哦赶紧去点点关注</view>
<u-loadmore class="load-size" v-else :status="status_1" icon-type="iconType" margin-top="50" :load-text="loadText" /> <u-loadmore class="load-size" v-else :status="status_1" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view> </view>
</view> </view>
</view> </view>
@@ -93,23 +87,28 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
<view class="coupon">
<view class="price">{{ newMemberCoupon.price }}</view>
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
</view>
</u-popup>
</view> </view>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
page {
background-color: #fff;
}
.index { .index {
width: 750rpx; width: 750rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh;
/* #ifdef APP-PLUS */
padding-bottom: 100rpx;
/* #endif */
overflow: hidden;
.top { .top {
z-index: 10000;
position: fixed;
top: var(--status-bar-height);
left: 0;
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
align-items: center; align-items: center;
@@ -117,7 +116,6 @@
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
padding: 0 30rpx; padding: 0 30rpx;
background-color: #fff;
.sosuo { .sosuo {
width: 32rpx; width: 32rpx;
@@ -135,32 +133,27 @@
} }
.card { .card {
height: 100%;
width: 100%; width: 100%;
height: calc(100vh - 150rpx); // pointer-events: none;
margin-top: 100rpx;
// padding-top: 100rpx;
.box { .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 30rpx 0; padding: 0 30rpx;
// margin-top: 30rpx;
} }
.list { .list {
display: flex; display: flex;
// height: 100vh;
// padding-bottom: 100rpx;
// margin-bottom: 50rpx;
} }
} }
.tuijian { .tuijian {
width: 750rpx; width: 750rpx;
padding: 30rpx;
margin-left: -30rpx; margin-left: -30rpx;
height: 400rpx; height: 400rpx;
background-color: #ececec; background-color: #ececec;
padding: 30rpx;
.title { .title {
width: 100%; width: 100%;
@@ -218,11 +211,45 @@
margin: 200rpx auto 0; margin: 200rpx auto 0;
text-align: center; text-align: center;
} }
.u-coupon-popup {
/deep/ .u-mode-center-box {
background-color: transparent;
}
.coupon {
width: 750rpx;
height: 583rpx;
position: relative;
.price {
z-index: 3;
color: #EBB36E;
position: absolute;
font-size: 108rpx;
font-weight: bold;
top: 200rpx;
left: 50%;
transform: translate(-68%, 0);
}
.coupon-image {
width: 568rpx;
height: 583rpx;
position: absolute;
top: 0;
left: 50%;
transform: translate(-60%, 0);
}
.close-image {
position: absolute;
top: 0;
right: 155rpx;
width: 60rpx;
height: 60rpx;
}
}
}
</style> </style>
<script> <script>
import common from '@/static/js/common.js';
import { mapState } from 'vuex' import { mapState } from 'vuex'
import videoItem from "@/components/index/video-item/index" import videoItem from "@/components/index/video-item/index"
import zhiboItem from "@/components/index/zhibo-item/index" import zhiboItem from "@/components/index/zhibo-item/index"
@@ -244,9 +271,8 @@
name: '关注' name: '关注'
}], }],
num: 0, num: 0,
page: 1, // 0即第一页 page: 0, // 0即第一页
follow_page: 0, // follow_page: 0, //
live_page: 1, //
articleList: [], articleList: [],
recommendList: [], // 推荐达人 recommendList: [], // 推荐达人
indexImageSwiper: [], indexImageSwiper: [],
@@ -255,14 +281,15 @@
fansList: [], // 关注的发现列表 fansList: [], // 关注的发现列表
status: 'loadmore', status: 'loadmore',
status_1: 'loadmore', status_1: 'loadmore',
status_live: 'loadmore',
iconType: 'circle', iconType: 'circle',
loadText: { loadText: {
loadmore: '轻轻上拉', loadmore: '轻轻上拉',
loading: '努力加载中', loading: '努力加载中',
nomore: '实在没有了' nomore: '实在没有了'
}, },
refresher:true showCoupon: false,
newMemberCoupon: {},
exchangestate:false
} }
}, },
components: { components: {
@@ -272,116 +299,43 @@
darenItem darenItem
}, },
onShow() { onShow() {
console.log(this.imService.status) // 页面返回,页面登陆的情况下检查是否显示领取优惠卷优惠券弹窗
if(!this.imService.status && this.$store.state.hasLogin){ if(this.exchangestate==true){
const user = uni.getStorageSync('user_info'); this.isNewmembervoucher()
// console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
this.imService.connectIM()
}else if(!this.imService.status){
this.$u.api.getDefaultAvatar().then((res)=>{
console.log(res)
uni.setStorageSync("morenimg",res.data.avatar)
this.imService.login(new Date().getTime(),"123",res.data.avatar)
this.imService.connectIM()
console.log("用户信息")
})
console.log("链接")
} }
// if(!this.imService.status && !this.imService.lianjie){
// console.log("1212")
// this.imService.lianjie = true
// let that = this
// setTimeout(function(){
// that.imService.disconnect()
// console.log("guanbi")
// },1000)
// setTimeout(function(){
// console.log("lianjie")
// that.imService.connectIM()
// },2000)
// }
// 新人优惠券
if (this.$store.state.showCoupons) {
this.isNewmembervoucher();
}
},
async onLoad(){
this.articleList = []; this.articleList = [];
this.page = 0;
this.getArticlelist(); this.getArticlelist();
this.getSwiper(); this.getSwiper();
// 优惠券 },
// if(this.$store.state.hasLogin){ onLoad(){
// const user = uni.getStorageSync('user_info'); if(this.$store.state.hasLogin){
// // console.log(user) this.exchangestate = true
// this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar) const user = uni.getStorageSync('user_info');
// await this.imService.connectIM() console.log(user)
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
// }else{ this.imService.connectIM()
// await this.$u.api.getDefaultAvatar().then((res)=>{ let that = this
// console.log(res) setTimeout(function(){
// uni.setStorageSync("morenimg",res.data.avatar) that.imService.disconnect()
// this.imService.login(new Date().getTime(),"123",res.data.avatar) console.log("guanbi")
// console.log("用户信息") },1000)
// }) setTimeout(function(){
// console.log("链接") console.log("lianjie")
// await this.imService.connectIM() that.imService.connectIM()
},2000)
// } }
// console.log("1212")
// let that = this
// setTimeout(function(){
// that.imService.disconnect()
// console.log("guanbi")
// },1000)
// setTimeout(function(){
// console.log("lianjie")
// that.imService.connectIM()
// },2000)
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.page = 1;
this.getArticlelist(); this.getArticlelist();
// this.getManicureList({ load: 'reload' }); // this.getManicureList({ load: 'reload' });
}, },
methods: { methods: {
moveHandle() {
return;
},
// 直播列表 // 直播列表
tabLiveList() { tabLiveList() {
uni.showLoading({ this.$u.api.tabLiveList().then((res) => {
title: "loading..."
})
this.$u.api.tabLiveList({page:this.live_page}).then((res) => {
// uni.stopPullDownRefresh();
this.status_live = "loading";
this.refresher = false;
console.log(res) console.log(res)
if (res.errCode == 0) { this.tabLiveLists = res.data;
uni.hideLoading();
if (this.live_page == 1) {
this.tabLiveLists = res.data.data;
this.status_live = "loadmore";
if (res.data.data.length < 4) {
this.status_live = "nomore";
}
} else if (res.data.data.length == 0 && this.live_page > 1) {
this.status_live = "nomore";
} else {
this.tabLiveLists = this.tabLiveLists.concat(res.data.data);
console.log(this.tabLiveLists)
}
if (res.data.data.length == 0 && this.live_page > 1) {
} else {
this.live_page++;
}
} else {
this.status_live = "nomore"
}
}) })
}, },
// 轮播图 // 轮播图
@@ -394,7 +348,7 @@
}, },
// 关注 // 关注
changeType(member_id) { changeType(member_id) {
// console.log(member_id); console.log(member_id);
// this.$emit("pChangeType"); // this.$emit("pChangeType");
this.$u.api.attentionMember({ this.$u.api.attentionMember({
member_id: member_id member_id: member_id
@@ -413,31 +367,26 @@
}, },
// 切换导航 // 切换导航
dianji(a) { dianji(a) {
console.log(a); // console.log(a);
if (a.type == "change") { if (a.type == "change") {
this.num = a.detail.current; this.num = a.detail.current
} else { } else {
this.num = a; this.num = a;
} }
// console.log(this.num); // console.log(this.num);
// 状态请求 // 状态请求
if (a.type == "change" || this.num == 1) { // 强制请求一次 if (a.type == "change") { // 强制请求一次
if (this.num == 0) { if (this.num == 0) {
this.page = 1; this.page = 0;
this.articleList = []; this.status = "loadmore";
this.status = "nomore";
this.getArticlelist(); this.getArticlelist();
this.getSwiper(); this.getSwiper();
} else if (this.num == 1) { } else if (this.num == 1) {
this.live_page = 1;
this.status_live = "nomore";
this.getZhiBoSwiper(); // 直播轮播 this.getZhiBoSwiper(); // 直播轮播
this.tabLiveList(); this.tabLiveList();
} else if (this.num == 2) { } else if (this.num == 2) {
this.follow_page = 0; this.follow_page = 0;
this.fansList = []; this.fansList = [];
this.status_1 = "nomore";
if (this.hasLogin) { if (this.hasLogin) {
this.getFollowList(); // 关注列表 this.getFollowList(); // 关注列表
} }
@@ -445,48 +394,41 @@
} }
} }
}, },
// 发现 // 发现
getArticlelist() { getArticlelist() {
this.$u.api.getArticlelist({ this.$u.api.getArticlelist({
page: this.page, page: this.page,
is_video_img: 0, // 查询视频1 图文2 都查0 is_video_img: 0, // 查询视频1 图文2 都查0
}).then(res => { }).then(res => {
uni.stopPullDownRefresh();
this.status = "loading"; this.status = "loading";
if (res.errCode == 0) { if (res.errCode == 0) {
if (this.page == 1) { // uni.stopPullDownRefresh();
// console.log('37647744ghj', res)
if (this.page == 0) {
this.articleList = res.data.list; this.articleList = res.data.list;
if (!res.data.length) { this.status = "loadmore";
this.status = "nomore"; } else if (res.data.length == 0 && this.page > 0) {
}
} else if (res.data.length == 0) {
this.status = "nomore"; this.status = "nomore";
} else { } else {
this.articleList = this.articleList.concat(res.data.list); this.articleList = this.articleList.concat(res.data.list);
} }
this.page++;
} else {
this.status = "nomore"
} }
}) })
console.log(this.page);
}, },
// 屏蔽更新列表 // 屏蔽更新列表
updateList() { updateList() {
this.page = 1; console.log(111);
this.articleList = []; this.page = 0;
this.getArticlelist(); this.getArticlelist();
this.tabLiveList();
}, },
// 发现下拉加载 // 发现下拉加载
swiperBottom(e) { swiperBottom(e) {
this.page++;
this.getArticlelist(); this.getArticlelist();
// console.log(e);
}, },
swiperBottomLive() {
this.tabLiveList();
},
swiperTop() {
// uni.startPullDownRefresh();
},
// 关注下拉
followBotton(e) { followBotton(e) {
this.getFollowList(); this.getFollowList();
// console.log(e); // console.log(e);
@@ -533,48 +475,60 @@
}, },
clickFImage(index) { clickFImage(index) {
const item = this.indexImageSwiper[index]; const item = this.indexImageSwiper[index];
// console.log(item); console.log(item);
this.jumpPage({ this.activityLink({
type: item.url_type, type: item.url_type,
id: item.info_id, id: item.info_id
}); });
}, },
clickSImage(index) { clickSImage(index) {
const item = this.zhiboImageSwiper[index]; const item = this.zhiboImageSwiper[index];
// console.log(item); console.log(item);
this.jumpPage({ this.activityLink({
type: item.url_type, type: item.url_type,
id: item.info_id, id: item.info_id
}); });
}, },
activityLink({
type,
id
}) {
console.log(type,id);
if (type == 0) return false;
// type 1 商品详情页, 2 店铺详情页
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
let params = {
id: id
};
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
if (type == 1) Object.assign(params, {
type: 1
});
this.$u.route({
url: url,
params: params
})
},
goSearch() { goSearch() {
this.$u.route("/pageB/search/index", { this.$u.route("/pageB/search/index", {
type: 2, type: 2,
curent:2
}); });
}, },
// 是否显示新人优惠券 // 是否显示新人优惠券
isNewmembervoucher() { isNewmembervoucher() {
this.$store.commit('updateShowCoupons', false);
this.$u.api.isNewmembervoucher().then(res => { this.$u.api.isNewmembervoucher().then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.$u.route('/pageB/coupon/index'); this.newMemberCoupon = res.data;
this.showCoupon = true;
} else {
this.showCoupon = false;
} }
}) })
}, },
onPulling(e) { viewCoupon() {
console.log("onpulling", e); this.$u.route('/pageB/coupon/details', {
}, price: this.newMemberCoupon.price
onRestore() { });
this.refresher = 'restore'; // 需要重置
console.log("onRestore");
},
onAbort() {
console.log("onAbort");
},
jumpPage(uri) {
// console.log(uri);
common.jumpPage({ type: uri.type, id: uri.id });
} }
}, },
} }

View File

@@ -59,7 +59,7 @@
{ {
id: 0, id: 0,
url: '../../static/pageD/info(15).png', url: '../../static/pageD/info(15).png',
text: '达人消息' text: '关注消息'
}, },
], ],
@@ -125,7 +125,7 @@
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
let that = this let that = this
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo", url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
data:{ data:{
userId: 1 userId: 1
}, },
@@ -136,7 +136,7 @@
success(res){ success(res){
console.log(res) console.log(res)
res = res.data res = res.data
let user = new Friend(res.data.member_id,res.data.store_name,res.data.member_avatar) let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
that.$u.route({ that.$u.route({
url:"/pageD/privateChat/privateChat", url:"/pageD/privateChat/privateChat",
params:{ params:{

View File

@@ -4,16 +4,16 @@
<view class="top"> <view class="top">
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar> <u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
<view class="user-info"> <view class="user-info">
<view class="info-top"> <view class="info-left">
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view> <view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
</view>
<view class="info-bottom">
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')"> <view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
<image src="/static/image/mine/13.png"></image> <image src="/static/image/mine/13.png"></image>
<view class="rank-title">{{ userInfo.member_grade_name }}</view> <view class="rank-title">{{ userInfo.member_grade_name }}</view>
</view> </view>
<view class="user-rank">等级:{{ userInfo.member_level || 0 }}</view> </view>
<view class="info-right">
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
<view class="user-rank">等级:{{ userInfo.member_level }}</view>
</view> </view>
</view> </view>
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view> <view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
@@ -47,21 +47,13 @@
<view class="title-text">我的订单</view> <view class="title-text">我的订单</view>
<view class="more" @click="toOtherPage('/order/Index')"> <view class="more" @click="toOtherPage('/order/Index')">
<view class="title-text-more">查看全部订单</view> <view class="title-text-more">查看全部订单</view>
<u-icon name="arrow-right" color="#999" size="22"></u-icon> <image src="/static/image/mine/21.png"></image>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
<view v-for="(item, index) in orderList" :key="index" @click="toOtherPage(item.link)"> <view @click="toOtherPage('/order/Index?current=1')">
<image :src="item.img"></image>
<view>{{ item.title }}</view>
<view class="order-num" v-if="item.number">
<text>{{ item.number }}</text>
</view>
</view>
<!-- <view @click="toOtherPage('/order/Index?current=1')">
<image src="/static/image/mine/6.png"></image> <image src="/static/image/mine/6.png"></image>
<view>待支付</view> <view>待支付</view>
<view class="order-num">{{ 99 }}</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=2')"> <view @click="toOtherPage('/order/Index?current=2')">
<image src="/static/image/mine/35.png"></image> <image src="/static/image/mine/35.png"></image>
@@ -79,14 +71,14 @@
<image src="/static/image/mine/37.png"></image> <image src="/static/image/mine/37.png"></image>
<view>拼团中</view> <view>拼团中</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=6')"> <view @click="toOtherPage('/order/Index?current=7')">
<image src="/static/image/mine/3.png"></image> <image src="/static/image/mine/3.png"></image>
<view>待评价</view> <view>待评价</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=7')"> <view @click="toOtherPage('/order/Index?current=6')">
<image src="/static/image/mine/9.png"></image> <image src="/static/image/mine/9.png"></image>
<view>售后</view> <view>售后</view>
</view> --> </view>
</view> </view>
</view> </view>
<view class="tool"> <view class="tool">
@@ -108,10 +100,6 @@
<image src="/static/image/mine/25.png"></image> <image src="/static/image/mine/25.png"></image>
<view>优惠券</view> <view>优惠券</view>
</view> </view>
<view @click="toOtherPage('/order/Index?current=4')">
<image src="/static/image/mine/39.png"></image>
<view>试穿试送</view>
</view>
</view> </view>
</view> </view>
<view class="more-tool"> <view class="more-tool">
@@ -133,7 +121,6 @@
<image src="/static/image/mine/15.png"></image> <image src="/static/image/mine/15.png"></image>
<view>投诉意见</view> <view>投诉意见</view>
</view> </view>
<!-- <view></view> -->
</view> </view>
</view> </view>
</view> </view>
@@ -149,50 +136,6 @@ export default {
data() { data() {
return { return {
userInfo: {}, userInfo: {},
orderList: [
{
name: 'wait_pay',
title: '待支付',
img: '/static/image/mine/6.png',
link: '/order/Index?current=1',
number: '',
},
{
name: 'already_pay',
title: '待发货',
img: '/static/image/mine/35.png',
link: '/order/Index?current=2',
number: '',
},
{
name: 'wait_receipt',
title: '待收货',
img: '/static/image/mine/2.png',
link: '/order/Index?current=3',
number: '',
},
{
name: 'pintuan',
title: '拼团中',
img: '/static/image/mine/37.png',
link: '/order/Index?current=5',
number: '',
},
{
name: 'wait_evaluation',
title: '待评价',
img: '/static/image/mine/3.png',
link: '/order/Index?current=6',
number: '',
},
{
name: 'refund',
title: '售后',
img: '/static/image/mine/9.png',
link: '/order/Index?current=7',
number: '',
},
]
}; };
}, },
filters: { filters: {
@@ -208,11 +151,9 @@ export default {
}) })
} }
this.getUserInfo(); this.getUserInfo();
this.getOrderNumber();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap() {
// console.log(e); this.toOtherPage("/setting/Index");
if(e.index == 0) this.$u.route('/pageE/setting/Index');
}, },
methods: { methods: {
getUserInfo() { getUserInfo() {
@@ -224,22 +165,7 @@ export default {
} }
}) })
}, },
getOrderNumber() {
this.$u.api.getOrderNumber().then(res => {
const object = res.data;
for (const key in object) {
if (object.hasOwnProperty(key)) {
let element = object[key];
const order = this.orderList.filter(item => item.name == key);
if(element > 99) element = "99+";
this.$set(order[0], 'number', element);
}
}
// console.log(this.orderList);
})
},
toOtherPage(url) { toOtherPage(url) {
// console.log(url);
uni.navigateTo({ uni.navigateTo({
url: '/pageE' + url url: '/pageE' + url
}); });
@@ -254,7 +180,7 @@ export default {
.mine-top { .mine-top {
// width: 100%; // width: 100%;
height: 272rpx; height: 272rpx;
background-color: #FF7807; background: #FF780F;
.top { .top {
padding: 40rpx 0 0 30rpx; padding: 40rpx 0 0 30rpx;
display: flex; display: flex;
@@ -262,38 +188,23 @@ export default {
margin-bottom: 40rpx; margin-bottom: 40rpx;
.user-info { .user-info {
margin-left: 30rpx; margin-left: 30rpx;
// display: flex;
.info-top {
height: 30rpx;
display: flex; display: flex;
align-items: center; .info-left {
margin-bottom: 19rpx; margin-right: 15rpx;
.user-nickname { .user-nickname {
min-width: 110rpx; width: 100rpx;
max-width: 200rpx;
font-size: 30rpx; font-size: 30rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
margin-right: 19rpx; margin-bottom: 19rpx;
} }
.info-phone {
font-size: 24rpx;
color: rgba(51,51,51,1);
// margin-bottom: 26rpx;
}
}
.info-bottom {
height: 25rpx;
display: flex;
align-items: center;
.user-medal { .user-medal {
display: flex; display: flex;
width: 110rpx; // width: 110rpx;
height: 25rpx; // height: 25rpx;
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%); background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
border-radius: 13rpx; border-radius: 13rpx;
align-items: center; align-items: center;
padding: 0 17rpx 0 10rpx; padding: 0 17rpx 0 10rpx;
margin-right: 20rpx;
> image { > image {
margin-right: 9rpx; margin-right: 9rpx;
width: 20rpx; width: 20rpx;
@@ -305,6 +216,13 @@ export default {
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
} }
} }
}
.info-right {
.info-phone {
font-size: 24rpx;
color: rgba(51,51,51,1);
margin-bottom: 26rpx;
}
.user-rank { .user-rank {
font-size: 24rpx; font-size: 24rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
@@ -324,11 +242,13 @@ export default {
} }
} }
.bottom { .bottom {
display: flex;
justify-content: space-around;
padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 0 30rpx;
display: flex;
// justify-content: space-between;
justify-content: flex-start;
> view { > view {
margin-right: 80rpx;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
@@ -348,25 +268,35 @@ export default {
} }
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) { @mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
box-sizing: border-box; box-sizing: border-box;
width: 710rpx; width: 690rpx;
background: rgba(255,255,255,1); background: rgba(255,255,255,1);
border-radius: 10rpx; border-radius: 10rpx;
margin: 20rpx auto 0; margin: 30rpx auto 0;
.title {
display: flex;
align-items: center;
height: 76rpx;
padding: 0 20rpx; padding: 0 20rpx;
.title {
height: 76rpx;
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
border-bottom: 1px solid #ececec; position: relative;
display: flex;
align-items: center;
&::after {
content: "";
position: absolute;
width: 650rpx;
height: 1rpx;
background: rgba(234,234,234,1);
bottom: 0;
left: 50%;
transform: translate(-50%,0);
}
} }
.title-text-more { .title-text-more {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
} }
.content { .content {
padding: $content-padding-top 20rpx $content-padding-bottom; padding: $content-padding-top 0 $content-padding-bottom;
display: flex; display: flex;
> view { > view {
text-align: center; text-align: center;
@@ -411,46 +341,24 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
position: relative;
.order-num{
position: absolute;
top: -12rpx;
right: -38rpx;
width: 50rpx;
}
.order-num > text {
z-index: 9;
float: left;
border: 1rpx solid #FF7807;
height: 24rpx;
border-radius: 12rpx;
padding: 6rpx 8rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FF7807;
background-color: #ffffff;
font-size: 18rpx;
color:rgba(255,120,15,1);
}
} }
> view:nth-child(1){ > view:nth-child(1){
@include image-size($image-width: 33rpx, $image-height: 36rpx); @include image-size($image-width: 36rpx, $image-height: 34rpx);
} }
> view:nth-child(2){ > view:nth-child(2){
@include image-size($image-width: 38rpx, $image-height: 32rpx); @include image-size($image-width: 38rpx, $image-height: 36rpx);
} }
> view:nth-child(3){ > view:nth-child(3){
@include image-size($image-width: 41rpx, $image-height: 33rpx); @include image-size($image-width: 40rpx, $image-height: 36rpx);
} }
> view:nth-child(4){ > view:nth-child(4){
@include image-size($image-width: 35rpx, $image-height: 35rpx); @include image-size($image-width: 38rpx, $image-height: 38rpx);
} }
> view:nth-child(5){ > view:nth-child(5){
@include image-size($image-width: 37rpx, $image-height: 37rpx); @include image-size($image-width: 36rpx, $image-height: 40rpx);
} }
> view:nth-child(6){ > view:nth-child(6){
@include image-size($image-width: 33rpx, $image-height: 35rpx); @include image-size($image-width: 36rpx, $image-height: 40rpx);
} }
} }
} }
@@ -462,11 +370,8 @@ export default {
$image-width: 71rpx $image-width: 71rpx
); );
.content { .content {
> view {
width: 100rpx;
}
> view:not(:last-child) { > view:not(:last-child) {
margin-right: 36rpx; margin-right: 58rpx;
} }
} }
} }
@@ -478,11 +383,8 @@ export default {
$image-width: 71rpx $image-width: 71rpx
); );
.content { .content {
> view {
width: 100rpx;
}
> view:not(:last-child) { > view:not(:last-child) {
margin-right: 36rpx; margin-right: 46rpx;
} }
} }
} }

View File

@@ -46,7 +46,7 @@
<!-- 拼团列表 --> <!-- 拼团列表 -->
<group></group> <group></group>
<view class="activity-view"> <view class="activity-view">
<image class="lingquan" :src="activityInfo.adv_code" @click="jumpPage({ type: activityInfo.url_type, id: activityInfo.info_id })"></image> <image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
</view> </view>
<!-- 优惠券 --> <!-- 优惠券 -->
<youhq></youhq> <youhq></youhq>
@@ -56,12 +56,11 @@
<view class="cart" @click="toCartPage"> <view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image> <image src="/static/image/common/3.png"></image>
</view> </view>
<u-picker mode="region" v-model="chooseArea" @confirm="setArea"></u-picker> <u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
import common from '@/static/js/common.js';
import shopitem from "@/components/shop/shop-item/index"; import shopitem from "@/components/shop/shop-item/index";
import recommend from "@/components/shop/recommend/index"; import recommend from "@/components/shop/recommend/index";
import pintuan from "@/components/shop/recommend/pintuan"; import pintuan from "@/components/shop/recommend/pintuan";
@@ -125,8 +124,8 @@
type: 'wgs84', type: 'wgs84',
geocode: true, geocode: true,
success: (res) => { success: (res) => {
console.log(res.address); // console.log(res.address);
this.area = res.address.district; this.area = res.address.city;
}, },
fail: (e) => { fail: (e) => {
console.log(e); console.log(e);
@@ -166,8 +165,6 @@
}, },
// 拼团推荐 // 拼团推荐
getPinTuanPush() { getPinTuanPush() {
// 初始化拼团
this.pinTuanPush = {};
this.$u.api.getPinTuanPush().then(res => { this.$u.api.getPinTuanPush().then(res => {
if (res.errCode == 0) { if (res.errCode == 0) {
this.pinTuanPush = res.data; this.pinTuanPush = res.data;
@@ -191,18 +188,38 @@
clickImage(index) { clickImage(index) {
// console.log(this.list[index]); // console.log(this.list[index]);
let item = this.list[index]; let item = this.list[index];
this.jumpPage({ this.activityLink({
type: item.url_type, type: item.url_type,
id: item.info_id, id: item.info_id,
}); });
}, },
activityLink({
type,
id
}) {
console.log(type,id);
if (type == 0) return false;
// type 1 商品详情页, 2 店铺详情页
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
let params = {
id: id
};
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
if (type == 1) Object.assign(params, {
type: 1
});
this.$u.route({
url: url,
params: params
})
},
// 下拉加载更多推荐商品 // 下拉加载更多推荐商品
onreachBottom() { onreachBottom() {
this.$refs.recommendGoods.loadMore(); this.$refs.recommendGoods.loadMore();
}, },
setArea(e) { setArea(e) {
console.log(e); console.log(e);
this.area = e.area.label; this.area = this.areaList[e[0]].area_name;
}, },
toCartPage() { toCartPage() {
uni.navigateTo({ uni.navigateTo({
@@ -221,19 +238,28 @@
} }
}) })
}, },
jumpPage(uri) { activityLink({ type, id }) {
// console.log(uri); if(type == 0 || type == 2) return false;
common.jumpPage({ type: uri.type, id: uri.id }); // type 1 商品详情页, 2 店铺详情页
} const url = type == 1 ? 'pageB/sdetails/index' : '';
let params = { id: id };
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
if(type == 1) Object.assign(params, { type: 1 });
this.$u.route({
url: url,
params: params
})
},
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.shop { .shop {
height: calc(100vh - var(--window-top)); height: calc(100% - var(--window-top));
box-sizing: border-box; box-sizing: border-box;
background-color: #F0EDF1; background-color: #F0EDF1;
overflow-y: scroll; overflow-y: scroll;
.top { .top {
padding: 0 30rpx; padding: 0 30rpx;
background-color: #ffffff; background-color: #ffffff;

View File

@@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors"> <video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}">
</video> </video>
<view class="user" :style="{'top': top}"> <view class="user" :style="{'top': top}">
@@ -26,10 +26,10 @@
<image src="../../static/danmu.png" class="danmubianji"></image> <image src="../../static/danmu.png" class="danmubianji"></image>
<text style="font-size:26rpx;color:#fff;margin-left:20rpx">{{ $store.state.hasLogin ? '想说点什么' : '请先登录'}}</text> <text style="font-size:26rpx;color:#fff;margin-left:20rpx">{{ $store.state.hasLogin ? '想说点什么' : '请先登录'}}</text>
</view> </view>
<!-- <image class="liketap" src="../../static/like.png" @click=""> --> <image class="liketap" src="../../static/like.png" @click="">
<view class="danmuinputbox" v-if="danmu"> <view class="danmuinputbox" v-if="danmu">
<input type="text" focus="true" style="width:600rpx;margin-left:30rpx;font-size:26rpx" maxlength="20" @blur="danmu=false" :focus="danmu" v-model="danmutext"> <input type="text" focus="true" style="width:600rpx;margin-left:30rpx;font-size:26rpx" maxlength="20" @blur="danmu=false" v-model="danmutext">
<view class="danmufasong" @click="sendMessage(room.MessageType.CHAT,danmutext)"> <view class="danmufasong" @click="sendMessage(room.MessageType.CHAT,danmutext)">
<text style="font-size:24rpx;color:#fff">发送</text> <text style="font-size:24rpx;color:#fff">发送</text>
</view> </view>
@@ -86,7 +86,7 @@
.shopimg{ .shopimg{
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
// background-color: #0f0; background-color: #0f0;
} }
@@ -158,9 +158,7 @@
height: 46rpx; height: 46rpx;
position: fixed; position: fixed;
bottom: 36rpx; bottom: 36rpx;
// right: 154rpx; right: 154rpx;
right: 54rpx;
} }
.hottext{ .hottext{
font-size: 20rpx; font-size: 20rpx;
@@ -277,7 +275,7 @@
left: 0; left: 0;
width: 308rpx; width: 308rpx;
height: 58rpx; height: 58rpx;
background-color: #000; background-color: #0f0;
opacity: 0.4; opacity: 0.4;
border-radius: 29rpx; border-radius: 29rpx;
} }
@@ -338,21 +336,13 @@ export default {
danmulist:[] danmulist:[]
}; };
}, },
onBackPress(options) {
uni.setKeepScreenOn({
keepScreenOn: false
});
return false;
},
onLoad(a) { onLoad(a) {
this.url = a.url; this.url = a.url;
this.id = a.id this.id = a.id
console.log(this.url); console.log(this.url);
let that = this; let that = this;
uni.setKeepScreenOn({
keepScreenOn: true
});
uni.getSystemInfo({ uni.getSystemInfo({
success(a) { success(a) {
@@ -370,7 +360,7 @@ export default {
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
console.log(token,that.id) console.log(token,that.id)
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/goodsShelves", url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
data:{ data:{
live_id:that.id live_id:that.id
}, },
@@ -385,7 +375,7 @@ export default {
}) })
setInterval(function(){ setInterval(function(){
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/goodsShelves", url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
data:{ data:{
live_id:that.id live_id:that.id
}, },
@@ -401,9 +391,9 @@ export default {
that.$forceUpdate(); that.$forceUpdate();
console.log(that.room) console.log(that.room)
},10 * 1000) },60 * 1000)
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/livingUserInfo", url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
data:{ data:{
live_id:that.id live_id:that.id
}, },
@@ -417,19 +407,40 @@ export default {
// that.list= res.data.data // that.list= res.data.data
} }
}) })
//当前用户
try {
uni.request({
url:"https://dmmall.sdbairui.com/api/Member/MemberInfo",
method:"POST",
header:{
'Authorization' : 'Bearer' + " " + token
},
success(res){
console.log(res,111)
var currentUser = {
id : res.data.data.MemberArray.member_mobile + "",
nickname : res.data.data.MemberArray.member_nickname,
avatar: res.data.data.MemberArray.member_avatar
};
var room = { var room = {
id : a.rid + "", id : a.rid + "",
name : a.rid + "" name : a.rid + ""
}; };
that.chatRoomService = getApp().globalData.im that.chatRoomService = getApp().globalData.im
console.log(room,currentUser)
//构造chatRoomService //构造chatRoomService
that.chatRoomService.subscribeRoomMessage(room) that.chatRoomService.subscribeRoomMessage(room,currentUser)
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
//获取当前聊天室数据 //获取当前聊天室数据
that.room = that.chatRoomService.room; that.room = that.chatRoomService.room;
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
this.$forceUpdate();
console.log(that.room) console.log(that.room)
}
})
} catch (error) {
console.log("错误")
}
}, },
onBackPress () {//返回取消订阅 onBackPress () {//返回取消订阅
@@ -440,23 +451,7 @@ export default {
this.chatRoomService.quitRoom(); this.chatRoomService.quitRoom();
}, },
methods:{ methods:{
errors(a){
console.log(a)
},
newpeople(list){
this.room.onlineUsers = list
console.log(list.users.length)
this.$forceUpdate();
},
sendMessage (messageType, content) {//发送消息 sendMessage (messageType, content) {//发送消息
if(!this.chatRoomService.status){
uni.showToast({
title: '连接聊天室中,请稍等',
duration: 2000,
icon: "none"
});
return
}
console.log(this.room,this.room.id,messageType, content) console.log(this.room,this.room.id,messageType, content)
if(content == "" && messageType == 0) return; if(content == "" && messageType == 0) return;
var message = { var message = {
@@ -466,8 +461,6 @@ export default {
} }
this.chatRoomService.sendMessages(this.room.id, message); this.chatRoomService.sendMessages(this.room.id, message);
this.danmutext = "" this.danmutext = ""
this.danmu = false
uni.hideKeyboard()
}, },
whenNewMessage (message) {//新消息监听 whenNewMessage (message) {//新消息监听
// if(message.type == this.room.MessageType.PROP){ // if(message.type == this.room.MessageType.PROP){
@@ -489,19 +482,11 @@ export default {
}); });
}, },
guanzhu(){ guanzhu(){
if(!this.$store.state.hasLogin){
uni.showToast({
title: '请先登录',
duration: 2000,
icon:"none"
});
return ;
}
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
let that = this let that = this
console.log(token) console.log(token)
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/member/attentionMember", url:"https://dmmall.sdbairui.com/api/member/attentionMember",
data:{ data:{
member_id:that.info.user_id member_id:that.info.user_id
}, },
@@ -512,7 +497,7 @@ export default {
success(res){ success(res){
console.log(res) console.log(res)
uni.request({ uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/livingUserInfo", url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
data:{ data:{
live_id:that.id live_id:that.id
}, },
@@ -522,11 +507,7 @@ export default {
}, },
success(res){ success(res){
console.log(res) console.log(res)
that.info = res.data.data; that.info = res.data.data
uni.showToast({
title: res.data.message,
icon: "none"
})
// that.list= res.data.data // that.list= res.data.data
} }
}) })

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Some files were not shown because too many files have changed in this diff Show More