Enzo 4 years ago
parent
commit
4ebe098c62
  1. 4
      components/index-banner/index-banner.vue
  2. 9
      components/lf-payPassword/lf-payPassword.vue
  3. 6
      pages/coupon/index/index.vue
  4. 6
      pages/index/category/category.vue
  5. 7
      pages/order/cashier/cashier.vue
  6. 39
      pages/order/confirm/confirm.vue
  7. 10
      pages/order/newdetail/newdetail.vue
  8. 30
      pages/shop/goodsdetail.vue
  9. 18
      pages/store/cart/cart.vue

4
components/index-banner/index-banner.vue

@ -14,7 +14,7 @@
:style="
'height: ' +
imgHeight +
'px; padding-left: ' +
'rpx; padding-left: ' +
meta.padding_left +
'px; padding-right: ' +
meta.padding_right +
@ -41,7 +41,7 @@ export default {
// data
data() {
return {
imgHeight: '450'
imgHeight: 900
};
},
options: {

9
components/lf-payPassword/lf-payPassword.vue

@ -50,7 +50,8 @@
data(){
return {
code: '', //
time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime()
time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime(),
is_auto: false
}
},
created(){
@ -64,12 +65,18 @@
this.code = event;
if(this.code.length >= 6){
this.comfirm();
this.is_auto = true;
}else{
this.is_auto = false;
}
},
comfirm(){
if(this.code.length < 6){
return this.$msg('请输入完整支付密码');
}
if(this.is_auto){
return;
}
this.$emit('comfirm', this.code);
}
}

6
pages/coupon/index/index.vue

@ -250,10 +250,12 @@
align-items: flex-start;
display: flex;
flex-direction: column;
margin-left: 84rpx;
margin-left: 54rpx;
width: 380rpx;
}
.coupon-left {
margin-left: 20rpx;
// margin-left: 20rpx;
width: 182rpx;
display: flex;
flex-direction: column;
justify-content: center;

6
pages/index/category/category.vue

@ -70,7 +70,8 @@
</view>
</view>
</view>
<lf-nocontent src="/static/images/empty.png" v-if="brand_list.length <= 0"></lf-nocontent>
<view style="height: 40rpx;" v-if="brand_list.length > 0"></view>
<lf-nocontent src="/static/images/empty.png" v-else></lf-nocontent>
</scroll-view>
<!-- 锚点定位 -->
<view class="fixed-point" v-if="point_list.length">
@ -637,6 +638,9 @@
margin-top: 30rpx;
}
}
.brand-item:last-child{
margin-bottom: 0rpx;
}
.img{
width: 150rpx;
height: 150rpx;

7
pages/order/cashier/cashier.vue

@ -129,7 +129,7 @@
this.confirm();
},
//
confirm() {
confirm(event) {
if (this.clickContinue == true) {
this.clickContinue = false;
if (this.is_date_finish) return this.$msg('订单超时未支付');
@ -143,6 +143,9 @@
this.show_pw = true;
return;
}
uni.showLoading({
title: '正在支付,请稍后'
})
this.getOpenid().then(res => {
var data = {
@ -164,6 +167,7 @@
Authorization: this.token
}
}).then(res => {
uni.hideLoading()
res = res.data;
if (res.status) {
// this.formId = e.detail.formId || '';
@ -184,6 +188,7 @@
this.setData({
loading: false
});
uni.hideLoading()
wx.showModal({
content: '支付失败',
showCancel: false

39
pages/order/confirm/confirm.vue

@ -83,10 +83,10 @@
<view class="lf-font-28 lf-color-777">运费</view>
<view class="lf-font-26" style="color: #F63434;">+¥{{ order_detail.order.payable_freight_yuan || 0 }}</view>
</view>
<view class="lf-row-between lf-m-t-20">
<!-- <view class="lf-row-between lf-m-t-20">
<view class="lf-font-28 lf-color-777">优惠</view>
<view class="lf-font-26" style="color: #F63434;">-¥{{ fullMinus(order_detail.discounts) }}</view>
</view>
</view> -->
</view>
<view class="spread-out"></view>
<view class="fixed-bottom">
@ -107,11 +107,11 @@
<!-- 选择优惠券弹出层 -->
<u-popup v-model="show_coupon" mode="bottom" :round="true" borderRadius="20">
<view class="popup-content">
<view class="lf-row-between" v-for="(item, index) in order_detail.coupons" :key="index">
<label class="lf-row-between" v-for="(item, index) in order_detail.coupons" :key="index">
<radio-group @change="couponChange">
<radio :value="index" :checked="coupon_index == index"></radio>
</radio-group>
<view class="coupon-card lf-m-b-30" :class="{'invalid-bg': item.ifpast == true}">
<view class="coupon-card lf-m-b-30" >
<view class="coupon-circle-top">
<view class="coupon-circle1"></view>
</view>
@ -129,15 +129,6 @@
<text class="lf-font-70 lf-font-bold">{{item.discount.action_type.value}}</text>
<text>%</text>
</view>
<view class="coupon-tag" v-if="item.used_at != ''">
已使用
</view>
<view class="coupon-tag" v-if="item.ifpast">
已过期
</view>
<view class="coupon-tag" v-if="!item.ifpast && item.used_at == ''">
待使用
</view>
</view>
<view class="coupon-right">
<view class="lf-font-32 lf-font-bold lf-color-white">{{item.discount.title}}</view>
@ -145,14 +136,15 @@
</view>
</view>
</view>
</view>
</label>
<!-- 不使用优惠券 -->
<view class="lf-flex">
<label class="lf-flex">
<radio-group @change="couponChange">
<radio value="null" :checked="coupon_index == null"></radio>
</radio-group>
<view>不使用优惠券</view>
</view>
</label>
<view style="height: 40rpx;"></view>
</view>
</u-popup>
</block>
@ -338,8 +330,6 @@
address_id: this.address.id,
note: this.value,
}
// TODO id
if(this.coupon_index != null){
par.coupon_id = this.order_detail.coupons[this.coupon_index].id;
}
@ -472,8 +462,8 @@
height: max-content;
background-color: #FFFFFF;
border-top: 1rpx solid #e5e5e5;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
.fixed-content{
width: 100%;
height: 118rpx;
@ -500,9 +490,10 @@
width: 750rpx;
height: max-content;
max-height: 70vh;
overflow-y: scroll;
// overflow-y: scroll;
padding: 40rpx 32rpx;
background: #FFFFFF;
padding-bottom: 0rpx;
}
.coupon-circle1 {
width: 40rpx;
@ -544,10 +535,12 @@
align-items: flex-start;
display: flex;
flex-direction: column;
margin-left: 90rpx;
margin-left: 54rpx;
width: 380rpx;
}
.coupon-left {
margin-left: 30rpx;
// margin-left: 30rpx;
width: 182rpx;
display: flex;
flex-direction: column;
justify-content: center;

10
pages/order/newdetail/newdetail.vue

@ -291,9 +291,13 @@
Authorization: this.$cookieStorage.get('user_token')
}
}).then(res => {
this.$msg(res.data.message).then(() => {
this.getOrderDetails();
})
if(res.data.status){
this.$msg('确认收货成功', {icon: 'success'}).then(() => {
this.getOrderDetails();
})
}else{
this.$msg(res.data.message || '确认收货失败');
}
})
},
searchLogistics() {

30
pages/shop/goodsdetail.vue

@ -1,5 +1,5 @@
<template>
<view>
<view style="overflow-x: hidden;">
<lf-nav title="商品详情" titleColor="#fff" :spreadOut="false" :showIcon="true" bgColor="transparent"></lf-nav>
<skeleton :loading="skeletonLoading" :row="12" :showAvatar="false" :showTitle="true">
<block>
@ -63,15 +63,15 @@
<view class="cu-bar padding-lr">
<view class="lf-flex">
<text class="lf-color-777 lf-font-28">优惠</text>
<view style="width: 580rpx;">
<view class="lf-color-222 lf-font-26 lf-m-l-30"
v-for="(item, index) in coupons" :key="index">{{ item.title }}
</view>
<view style="width: 580rpx; padding-left: 20rpx;">
<text class="lf-color-222 lf-font-26"
v-for="(item, index) in coupons" :key="index">{{ item.title }};
</text>
</view>
</view>
<view>
<!-- <view>
<text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
</view>
</view> -->
</view>
</view>
</block>
@ -169,7 +169,7 @@
<!-- 商品详情 -->
<view class="goods-detail">
<view class="lf-font-32 lf-font-bold lf-m-b-20">商品详情</view>
<rich-text :nodes="formatRichText(goods_detail.content)"></rich-text>
<rich-text :nodes="goods_content"></rich-text>
<!-- <image class="goods-img" :src="item" v-for="(item, index) in goods_detail.content" :key="index" v-if="goods_detail.content_type == 'img'"></image> -->
</view>
<!-- 修饰专用 -->
@ -293,7 +293,8 @@
coupons: [], //
goods_num: 1,
is_date_finish: false,
car_num: 0
car_num: 0,
goods_content: ''
}
},
computed: {
@ -358,16 +359,9 @@
}else {
this.car_num = res.data.data;
}
} else {
wx.showModal({
content: '请下拉页面刷新重试',
showCancel: false
});
}
})
.catch(() => {
wx.stopPullDownRefresh();
wx.hideLoading();
wx.showModal({
content: '请求失败',
showCancel: false
@ -542,6 +536,7 @@
}).then(res => {
if(res.data.code == 200){
this.$msg('加入购物车成功', {icon: 'success'})
this.getcarNum()
}else{
this.$msg('加入购物车失败', {icon: 'error'})
}
@ -635,6 +630,7 @@
this.goods_detail = goods_detail;
this.pictures = [res.data.data.img];
this.is_collect = Boolean(res.data.data.is_collect) || false;
this.goods_content = this.formatRichText(goods_detail.content);
let type = 'mail';
if(this.$isRight(goods_detail.is_largess)){
type = 'point';
@ -1005,6 +1001,7 @@
padding: 0;
width: 88rpx;
position: relative;
color: #555555;
&:first-child{
padding-left: 0;
}
@ -1013,6 +1010,7 @@
width: 50rpx;
font-size: 40rpx;
line-height: 1;
color: #555555;
}
}
.btn1{

18
pages/store/cart/cart.vue

@ -103,7 +103,8 @@
backgroundColor: '#15716E'
}
}],
show: false
show: false,
show_count: 0
}
},
watch: {
@ -130,6 +131,15 @@
this.token = this.$cookieStorage.get('user_token');
this.getCartList();
},
onShow(){
this.show_count++;
if(this.show_count > 1){
this.allChecked = false;
this.total_price = '';
this.total_count = '';
this.getCartList();
}
},
methods: {
//
changeNum(type, parentIndex, childIndex){
@ -166,6 +176,9 @@
})
},
getCartList(){
uni.showLoading({
title: '正在查询购物车'
})
this.$http.get({
api: 'api/cart',
header: {
@ -173,6 +186,7 @@
}
}).then(res => {
console.log("===", res);
uni.hideLoading();
let data = res.data.data;
let list = [];
for(let i in data){
@ -188,7 +202,7 @@
})
}
this.list = list;
})
}).catch(err => uni.hideLoading())
},
//
goodsCheckChange(event, parentIndex, childIndex) {

Loading…
Cancel
Save