This commit is contained in:
Gdpao
2020-08-09 19:11:12 +08:00
28 changed files with 542 additions and 165 deletions

View File

@@ -90,7 +90,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px';
},
tabsChange(index) {
this.swiperCurrent = index;

View File

@@ -6,7 +6,7 @@
<scroll-view scroll-y class="scroll-coupon">
<view v-if="couponList[index]">
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
<Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
</view>
</view>
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
@@ -68,12 +68,22 @@ export default {
this.$forceUpdate();
})
},
useCoupon(id) {
console.log(id);
useCoupon(coupon) {
// console.log(coupon);
if(coupon.type == 1) {
this.$u.route({
type: 'switchTab',
url: 'pages/shop/index',
})
} else if(coupon.type == 2) {
this.$u.route('pageC/merchant/index', {
id: coupon.voucher_store_id,
});
}
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2 + 11 / 2) + 'px';
this.swiperHeight = res.windowHeight - (100 * (res.windowWidth / 750)) + 'px';
},
tabsChange(index) {
this.swiperCurrent = index;

View File

@@ -4,12 +4,12 @@
<view class="item-box">
<!-- 需求只显示最近五十条数据 后台未作限制 -->
<view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item">
<view class="item-title">
<view class="item-title" @click="viewStoreDetails(item.store_id)">
<image :src="item.store_avatar"></image>
<view>{{ item.store_name }}</view>
<view class="u-line-2">{{ item.store_name }}</view>
</view>
<image :src="item.goods_image" class="item-image"></image>
<view class="item-info">
<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="info-name u-line-1">{{ item.goods_name }}</view>
</view>
</view>
@@ -34,6 +34,22 @@ export default {
this.getBrowseList();
},
methods: {
viewStoreDetails(sid) {
this.$u.route({
url: 'pageC/merchant/index',
params: {
id: sid,
}
})
},
viewGoodsDetails(id) {
this.$u.route({
url: 'pageB/sdetails/index',
params: {
id: id,
}
})
},
async getBrowseList () {
const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = false;

View File

@@ -44,7 +44,7 @@
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">
确认完成
</view>
<view class="btn" v-if="item.order_status == 50" @click="toComment(item.laundry_id)">
<view class="btn" v-if="item.order_status == 50 && !item.comment" @click="toComment(item.laundry_id)">
去评价
</view>
</view>
@@ -192,7 +192,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px';
},
toComment(id) {
this.$u.route('/pageE/tool/washComment', {

View File

@@ -175,7 +175,7 @@
<view class="checkd">
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
<view class="radio">
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="24" shape="circle"></u-radio>
</view>
<view class="store_info">
<view class="info_img">
@@ -267,7 +267,7 @@ export default {
} else {
this.typeList = [];
}
console.log(this.typeList);
// console.log(this.typeList);
})
},
confirmType(e) {
@@ -388,7 +388,7 @@ export default {
},
radioChange(e){
const ids = e.split(" ");
console.log(ids)
// console.log(ids)
let checkedGoods = {};
this.orderList.forEach(order => {
if(order.order_id == ids[0]) {
@@ -438,9 +438,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
// this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
// this.swiperHeight = res.windowHeight + 500 + 'px';
this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
},
confirm(e){
this.showPopup = false;