Merge pull request 'store 8.13' (#170) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/170
This commit is contained in:
hansu 2020-08-13 11:55:13 +08:00
commit 1936105b1b
12 changed files with 118 additions and 84 deletions

View File

@ -15,7 +15,7 @@
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec"> <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text> <text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view> </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-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>

View File

@ -5,8 +5,8 @@
<view class="right"> <view class="right">
<view class="name u-line-1" @click="spikeGoods">{{ 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>
@ -19,7 +19,7 @@
<view class="right"> <view class="right">
<view class="name u-line-1" @click="toDetailsPage">{{ 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" @click="toDetailsPage">立即拼团</view> <view class="btn" @click="toDetailsPage">立即拼团</view>
</view> </view>
</view> </view>

View File

@ -103,7 +103,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 u-line-1">参与{{ involvemenGroupInfo[0].member_nickname }}的拼团</view> <view class="title">参与<text class="user-name u-line-1">{{ involvemenGroupInfo[0].member_nickname }}</text>的拼团</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>
@ -988,6 +988,13 @@ 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;

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, index) in goodsList" :key="index" class="goods-view" @click="toDetailsPage(goods.goods_id)"> <view v-for="(goods, index) in goodsList" :key="index" class="goods-view">
<goodsItem :info="goods"></goodsItem> <goodsItem :info="goods"></goodsItem>
</view> </view>
</view> </view>
@ -28,7 +28,7 @@ import goodsItem from "@/components/shop/list/item"
export default { export default {
data() { data() {
return { return {
pageSize: 15, pageSize: 5,
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,12 +118,6 @@ 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,15 +14,18 @@
<view>我的</view> <view>我的</view>
</view> </view>
</view> --> </view> -->
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}"> <view class="top" :style="{'background':'url(' + info.store_banner + ') 100% 100% no-repeat' }">
<image :src="info.store_avatar"></image> <view class="mantle"></view>
<view class="info"> <view class="main-container">
<view class="name u-line-1">{{info.store_name}}</view> <image :src="info.store_avatar"></image>
<view class="num">粉丝数{{info.store_collect}}</view> <view class="info">
</view> <view class="name u-line-1">{{info.store_name}}</view>
<view class="btn" @click="attentionMember"> <view class="num">粉丝数{{info.store_collect}}</view>
<image src="/static/image/shop/8.png"></image> </view>
<view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view> <view class="btn" @click="attentionMember">
<image :src="info.is_attention == 0 ? '/static/image/shop/14.png' : '/static/image/shop/8.png'"></image>
<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">
@ -104,8 +107,8 @@ export default {
// this.getStoreImgVideoList(); // this.getStoreImgVideoList();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
// console.log(e.index); console.log(e.index);
if(e.index == 1) this.$u.route('/pageC/cart/index'); if(e.index == 0) this.$u.route('/pageC/cart/index');
// if(e.index == 0) this.show = true; // if(e.index == 0) this.show = true;
}, },
methods: { methods: {
@ -127,7 +130,7 @@ 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)=>{
@ -232,48 +235,66 @@ export default {
z-index: 9; z-index: 9;
width: 750rpx; width: 750rpx;
height: 350rpx; height: 350rpx;
background-color: #999999; // background-color: #999999;
display: flex; .mantle {
align-items: center; width: 750rpx;
padding: 168rpx 60rpx 0 30rpx; height: 350rpx;
> image { position: absolute;
margin-right: 40rpx; top: 0;
width: 140rpx; left: 0;
height: 140rpx; z-index: 10;
border-radius: 50%; background-color: #999999;
background-color: aqua; opacity: 0.7;
} }
.info { .main-container {
width: 220rpx;
color: rgba(255,255,255,1);
.name {
margin-bottom: 30rpx;
font-size: 28rpx;
font-weight: 500;
}
.num {
font-size: 24rpx;
}
}
.btn {
margin-left: auto;
width: 162rpx;
height: 60rpx;
border: 2rpx solid rgba(255,255,255,1);
border-radius: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; padding: 54rpx 60rpx 0 30rpx;
position: absolute;
top: 0;
left: 0;
z-index: 19;
width: 750rpx;
height: 350rpx;
> image { > image {
width: 28rpx; margin-right: 40rpx;
height: 28rpx; width: 140rpx;
flex-shrink: 0; height: 140rpx;
margin-right: 14rpx; border-radius: 50%;
// background-color: aqua;
} }
> view { .info {
white-space: nowrap; width: 220rpx;
font-size: 26rpx;
color: rgba(255,255,255,1); color: rgba(255,255,255,1);
.name {
margin-bottom: 30rpx;
font-size: 28rpx;
font-weight: 500;
}
.num {
font-size: 24rpx;
}
}
.btn {
margin-left: auto;
width: 162rpx;
height: 60rpx;
border: 2rpx solid rgba(255,255,255,1);
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
> image {
width: 28rpx;
height: 28rpx;
flex-shrink: 0;
margin-right: 14rpx;
}
> view {
white-space: nowrap;
font-size: 26rpx;
color: rgba(255,255,255,1);
}
} }
} }
} }
@ -312,7 +333,7 @@ export default {
margin-right: 35rpx; margin-right: 35rpx;
} }
text-align: center; text-align: center;
width: 90rpx; width: 96rpx;
> image { > image {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;

View File

@ -8,14 +8,15 @@
<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" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate> <u-rate :count="5" min-count="1" 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" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate> <u-rate :count="5" min-count="1" 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>
@ -26,13 +27,14 @@ export default {
return { return {
orderId: '', orderId: '',
count: 3, // count: 3, //
logistics: 0, // logistics: 1, //
service: 0, // service: 1, //
describe: [], describe: [],
content: [], content: [],
imageList: [], // imageList: [], //
goodsList: [], goodsList: [],
uploadImageList: [], // 线 uploadImageList: [], // 线
debounce: true, //
} }
}, },
components: { components: {
@ -76,7 +78,7 @@ export default {
setModelKey(data) { setModelKey(data) {
data.forEach(() => { data.forEach(() => {
this.content.push(''); this.content.push('');
this.describe.push(0); this.describe.push(1);
this.imageList.push([]); this.imageList.push([]);
}) })
}, },
@ -123,29 +125,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('内容不可为空');
return false; status = false;
} }
}) })
return true; return status;
}, },
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) => {
if(idx < item.length-1) { if(idx < item.length-1) {
@ -161,11 +162,21 @@ 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,
}; };
console.log(params); if(files.length) {
Object.assign(params, { file: files })
}
// console.log(params);
this.$u.api.updateOrderEvaluate(params).then(res => { this.$u.api.updateOrderEvaluate(params).then(res => {
this.$u.toast(res.message); if(res.errCode == 0) {
this.$refs.uToast.show({
title: res.message,
back: true,
})
} else {
this.$u.toast(res.message);
this.debounce = true;
}
}) })
}, },
}, },

View File

@ -128,7 +128,7 @@ export default {
orderInfo: {}, orderInfo: {},
oid: '', oid: '',
timer: '', timer: '',
countdown: '', // countdown: '00:00:00', //
isSpike: false, // isSpike: false, //
} }
}, },

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" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate> <u-rate :count="5" min-count="1" 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: '', describe: 1,
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

@ -850,6 +850,7 @@
"style": { "style": {
"navigationBarTitleText": "勋章介绍", "navigationBarTitleText": "勋章介绍",
"app-plus": { "app-plus": {
"type": "transparent",
"titleSize": "36px", "titleSize": "36px",
"titleNView": { "titleNView": {
"backgroundColor": "rgba(255,255,255,0)", "backgroundColor": "rgba(255,255,255,0)",

View File

@ -180,7 +180,7 @@ export default {
.mine-top { .mine-top {
// width: 100%; // width: 100%;
height: 272rpx; height: 272rpx;
background-color: #F0AD4E; background-color: #FF7807;
.top { .top {
padding: 40rpx 0 0 30rpx; padding: 40rpx 0 0 30rpx;
display: flex; display: flex;

BIN
static/image/shop/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB