作者 李芳银

二开结束,修改bug

正在显示 49 个修改的文件 包含 2291 行增加858 行删除
... ... @@ -84,6 +84,23 @@ App({
})
},
popSuccessTest(msg) {
wx.showToast({
title: msg,
icon: '',
duration: 1300,
mask: true
})
},
popTest(msg) {
wx.showToast({
title: msg,
icon: 'none',
duration: 1300,
mask: true
})
},
globalData: {
userInfo: null,
baseUrl: 'https://car.goorcar.com/',
... ...
... ... @@ -10,22 +10,22 @@
<view class="searchbox">
<view class="searchinput" bindtap="goSearch">
<image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image>
<input bindinput="navtosearch" type="text" placeholder="搜索您想要的商品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" />
<input bindinput="navtosearch" type="text" placeholder="搜索你想要的4S店产品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" />
</view>
</view>
<view class="top_tit">
<view class="tit_list">
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_2.png" />
<view class="item_names">口碑商品</view>
<view class="item_names">品牌授权</view>
</view>
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_3.png" />
<view class="item_names">仓储供应</view>
<view class="item_names">品质保障</view>
</view>
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_1.png" />
<view class="item_names">品质担保</view>
<view class="item_names">服务担保</view>
</view>
</view>
</view>
... ...
... ... @@ -8,6 +8,105 @@ Page({
_num: 1,
way: 1,
MyGarageNoCar: [],
list: [{
id: 0,
title: '标题1',
create_time: '2019-09-06'
}, {
id: 1,
title: '标题2',
create_time: '2019-09-06'
}, {
id: 2,
title: '标题3',
create_time: '2019-09-06'
}],
startX: 0, //开始坐标
startY: 0,
page: 1,
is_cloose: false,
},
touchE: function (e) {
// console.log(e);
var that = this
if (e.changedTouches.length == 1) {
//手指移动结束后触摸点位置的X坐标
var endX = e.changedTouches[0].clientX;
//触摸开始与结束,手指移动的距离
var disX = that.data.startX - endX;
var delBtnWidth = that.data.delBtnWidth;
//如果距离小于删除按钮的1/2,不显示删除按钮
var txtStyle = disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "rpx" : "left:0rpx";
//获取手指触摸的是哪一项
var index = e.currentTarget.dataset.index;
var MyGarageNoCar = that.data.MyGarageNoCar;
MyGarageNoCar[index].txtStyle = txtStyle;
//更新列表的状态
that.setData({
MyGarageNoCar: MyGarageNoCar
});
}
},
//手指触摸动作开始 记录起点X坐标
touchstart: function (e) {
//开始触摸时 重置所有删除
this.data.MyGarageNoCar.forEach(function (v, i) {
if (v.isTouchMove) //只操作为true的
v.isTouchMove = false;
})
this.setData({
startX: e.changedTouches[0].clientX,
startY: e.changedTouches[0].clientY,
MyGarageNoCar: this.data.MyGarageNoCar
})
},
//滑动事件处理
touchmove: function (e) {
var that = this,
index = e.currentTarget.dataset.index, //当前索引
startX = that.data.startX, //开始X坐标
startY = that.data.startY, //开始Y坐标
touchMoveX = e.changedTouches[0].clientX, //滑动变化坐标
touchMoveY = e.changedTouches[0].clientY, //滑动变化坐标
//获取滑动角度
angle = that.angle({
X: startX,
Y: startY
}, {
X: touchMoveX,
Y: touchMoveY
});
that.data.MyGarageNoCar.forEach(function (v, i) {
v.isTouchMove = false
//滑动超过30度角 return
if (Math.abs(angle) > 30) return;
if (i == index) {
if (touchMoveX > startX) //右滑
v.isTouchMove = false
else //左滑
v.isTouchMove = true
}
})
//更新数据
that.setData({
MyGarageNoCar: that.data.MyGarageNoCar
})
},
/**
* 计算滑动角度
* @param {Object} start 起点坐标
* @param {Object} end 终点坐标
*/
angle: function (start, end) {
var _X = end.X - start.X,
_Y = end.Y - start.Y
//返回角度 /Math.atan()返回数字的反正切值
return 360 * Math.atan(_Y / _X) / (2 * Math.PI);
},
... ... @@ -29,18 +128,21 @@ Page({
},
onShow: function () {
this.getMyGarageNoCar()
},
getMyGarageNoCar() { //获取待
let that = this
let cat = that.data._num
if (cat == 1) {
that.setData({
way: 1
way: 1,
is_cloose: false
})
that.getadd()
} else {
that.setData({
way: 2
way: 2,
is_cloose: false
})
that.getadd()
}
... ... @@ -66,6 +168,15 @@ Page({
that.setData({
MyGarageNoCar: data
})
if (data.length != 0) {
that.setData({
is_cloose: false
})
} else {
that.setData({
is_cloose: true
})
}
console.log(that.data.MyGarageNoCar, "有赞");
} catch (err) {
console.log(err);
... ... @@ -77,6 +188,50 @@ Page({
},
delOrder(e) { // 删除
let that = this
wx.showModal({
title: '提示',
content: '确定要删除该商品吗?',
success: async function (res) {
if (res.confirm) {
try {
const {
data
} = await request({
url: 'api/new2/zanShareDel',
data: {
id: e.currentTarget.dataset.id
}
})
console.log(data, "删除");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
setTimeout(() => {
that.getMyGarageNoCar()
}, 1000);
} else {
let msg = data.msg
a.popTest(msg)
}
} catch (err) {
let msg = err.msg
a.popTest(msg)
}
} else {
}
}
})
},
storeDetail(e) {
console.log(e);
let id = e.currentTarget.dataset.id
... ... @@ -89,13 +244,15 @@ Page({
title: this.data.msg,
icon: '',
duration: 1300,
mask: true
})
},
popTest() {
wx.showToast({
title: this.data.msg,
icon: 'none',
duration: 1300
duration: 1300,
mask: true
})
},
... ...
... ... @@ -49,152 +49,200 @@
}
.smallcontainer {
padding: 32rpx;
padding: 32rpx 0;
box-sizing: border-box;
/* 列表 */
.like_list {
width: 100%;
height: 100%;
display: flex;
padding: 30rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #F2F2F2;
.list_left {
width: 208rpx;
height: 208rpx;
flex: 0 0 auto;
.fei_del {
display: flex;
padding: 32rpx 0 32rpx 32rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.list_left {
width: 208rpx;
height: 208rpx;
flex: 0 0 auto;
.list_right {
padding-left: 40rpx;
box-sizing: border-box;
flex: 1;
height: 208rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.list_right_content {
font-size: 28rpx;
line-height: 38rpx;
height: 82rpx;
color: rgba(6, 18, 31, 1);
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.newzeng {
width: 100%;
.list_right {
padding: 0 32rpx;
box-sizing: border-box;
flex: 1;
height: 208rpx;
display: flex;
align-items: center;
flex-direction: column;
justify-content: space-between;
.status_change {
padding: 5rpx 10rpx;
color: #E8370F;
border: 1rpx solid #E8370F;
font-size: 24rpx;
.list_right_content {
font-size: 28rpx;
line-height: 38rpx;
height: 82rpx;
color: rgba(6, 18, 31, 1);
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.rit_text {
margin-left: 30rpx;
.newzeng {
width: 100%;
display: flex;
align-items: center;
.numPer {
color: #FF444B;
.status_change {
padding: 5rpx 10rpx;
color: #E8370F;
border: 1rpx solid #E8370F;
font-size: 24rpx;
}
.numperson {
font-size: 24rpx;
color: #8C9198;
}
}
}
.list_right_box {
display: flex;
align-items: center;
justify-content: space-between;
.let {
display: flex;
align-items: baseline;
.del {
margin-left: 10rpx;
.rit_text {
margin-left: 30rpx;
display: flex;
align-items: center;
.money_icon_ {
font-size: 20rpx;
line-height: 42rpx;
color: #8C9198;
.numPer {
color: #FF444B;
font-size: 24rpx;
}
.del_price_ {
.numperson {
font-size: 24rpx;
color: #8C9198;
text-decoration: line-through;
}
}
.zan_price {
}
.list_right_box {
display: flex;
align-items: center;
justify-content: space-between;
.let {
display: flex;
align-items: baseline;
line-height: 55rpx;
font-weight: bold;
justify-content: space-between;
.icon_name {
font-size: 28rpx;
color: #FF444B;
}
.money_icon {
.del_priced {
margin-left: 10rpx;
font-size: 20rpx;
line-height: 42rpx;
color: #FF444B;
}
.price_big {
color: #FF444B;
font-size: 32rpx;
.money_icon_ {
font-size: 20rpx;
line-height: 42rpx;
color: #8C9198;
}
.del_price_ {
font-size: 24rpx;
color: #8C9198;
text-decoration: line-through;
}
}
.zan_price {
display: flex;
align-items: baseline;
line-height: 55rpx;
font-weight: bold;
justify-content: space-between;
.icon_name {
font-size: 28rpx;
color: #FF444B;
}
.money_icon {
margin-left: 10rpx;
font-size: 20rpx;
line-height: 42rpx;
color: #FF444B;
}
.price_big {
color: #FF444B;
font-size: 32rpx;
}
}
}
}
.dateTime {
// height: 40rpx;
font-size: 24rpx;
color: #8C9198;
.dateTime {
// height: 40rpx;
font-size: 24rpx;
color: #8C9198;
}
}
}
}
}
.touch_item {
display: flex;
justify-content: space-between;
max-width: 750rpx;
overflow: hidden;
margin-bottom: 10rpx;
background: #f5f5f5;
.content {
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(90px);
transform: translateX(90px);
margin-left: -90px;
}
.del {
width: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #e8370f;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 35rpx;
}
}
.touch_move_active {
.del,
.content {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
/* 没图片的样式 */
.like_list_1 {
width: 100%;
... ... @@ -300,6 +348,8 @@
}
}
.noCar {
... ... @@ -322,4 +372,50 @@
}
.touch_item {
display: flex;
justify-content: space-between;
max-width: 750rpx;
overflow: hidden;
margin-bottom: 10rpx;
background: #f5f5f5;
height: 216rpx;
.content {
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(90px);
transform: translateX(90px);
margin-left: -90px;
.item {
width: 100%;
background-color: #fffccc;
}
}
.del {
width: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #cccfff;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 35rpx;
}
}
}
\ No newline at end of file
... ...
... ... @@ -8,72 +8,86 @@
</view>
</view>
<view class="smallcontainer" wx:if="{{MyGarageNoCar.length > 0}}">
<view wx:for="{{MyGarageNoCar}}" wx:key="*this" wx:for-item="item">
<view wx:if="{{item.good.img !=''}}" class="like_list" bindtap="storeDetail" data-num="1" data-id="{{item.good.id}}">
<view class="list_left">
<image src="{{item.good.img}}"></image>
</view>
<view class="list_right">
<text class="list_right_content">{{item.good.name}}</text>
<view class="newzeng">
<view class="status_change">{{item.good.shop_type}}</view>
<view class="rit_text">
<text class="numPer">{{item.good.sales_initial}}</text>
<text class="numperson">位车友推荐</text>
</view>
<view wx:for="{{MyGarageNoCar}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view wx:if="{{item.good.img !=''}}" class="like_list touch_item {{item.isTouchMove ? 'touch_move_active' : ''}}" bindtap="storeDetail" data-num="1" data-id="{{item.good.id}}">
<view class="fei_del content " style="{{item.txtStyle}}" data-index='{{index}}' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE">
<view class="list_left">
<image src="{{item.good.img}}"></image>
</view>
<view class="list_right_box">
<view class="let">
<view class="zan_price">
<text class="icon_name">点赞价:</text>
<text class="money_icon">¥</text>
<text class="price_big">{{item.good.price}}</text>
<view class="list_right">
<text class="list_right_content">{{item.good.name}}</text>
<view class="newzeng">
<view class="status_change">{{item.good.shop_type}}</view>
<view class="rit_text">
<text class="numPer">{{item.good.sales_initial}}</text>
<text class="numperson">位车友推荐</text>
</view>
<view class="del">
<text class="money_icon_">¥</text>
<text class="del_price_">{{item.good.line_price}}</text>
</view>
<view class="list_right_box">
<view class="let">
<view class="zan_price">
<text class="icon_name">点赞价:</text>
<text class="money_icon">¥</text>
<text class="price_big">{{item.good.price}}</text>
</view>
<view class="del_priced">
<text class="money_icon_">¥</text>
<text class="del_price_">{{item.good.line_price}}</text>
</view>
</view>
<view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view>
</view>
<view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view>
</view>
</view>
<view class="del" data-id="{{item.good.id}}" catchtap="delOrder" data-index="{{index}}">
删除
</view>
</view>
<view class="like_list_1" wx:else bindtap="storeDetail" data-id="{{item.good.id}}" data-num="2">
<text class="title_content2">{{item.good.name}}</text>
<view class="down_next">
<view class="newzeng">
<view class="status_change">{{item.good.shop_type}}</view>
<view class="rit_text">
<text class="numPer">{{item.good.sales_initial}}</text>
<text class="numperson">位车友推荐</text>
</view>
</view>
<view class="price_dP_">
<view class="let">
<view class="zan_price_">
<text class="icon_name_">点赞价:</text>
<text class="money_icon_">¥</text>
<text class="price_big_">{{item.good.price}}</text>
<view class="fei_del">
<text class="title_content2">{{item.good.name}}</text>
<view class="down_next">
<view class="newzeng">
<view class="status_change">{{item.good.shop_type}}</view>
<view class="rit_text">
<text class="numPer">{{item.good.sales_initial}}</text>
<text class="numperson">位车友推荐</text>
</view>
<view class="del">
<text class="money_icon_">¥</text>
<text class="del_price_">{{item.good.line_price}}</text>
</view>
<view class="price_dP_">
<view class="let">
<view class="zan_price_">
<text class="icon_name_">点赞价:</text>
<text class="money_icon_">¥</text>
<text class="price_big_">{{item.good.price}}</text>
</view>
<view class="del">
<text class="money_icon_">¥</text>
<text class="del_price_">{{item.good.line_price}}</text>
</view>
</view>
<view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view>
</view>
<view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view>
</view>
</view>
<view class="del" data-id="{{item.good.id}}" catchtap="delBtn" data-index="{{index}}">
删除
</view>
</view>
</view>
</view>
<view wx:else>
<view class="noCar" wx:if="{{way ==1}}">
<view class="c">挑选有赞商品</view>
<view class="c">喊好友助力可享超低折扣</view>
<block wx:if="{{is_cloose}}">
<view class="c">挑选有赞商品</view>
<view class="c">喊好友助力可享超低折扣</view>
</block>
</view>
<view class="noCar" wx:else>
<view class="c">您尚无好朋友为你点赞</view>
<view class="c">要和好朋友常联系哦</view>
<block wx:if="{{is_cloose}}">
<view class="c">您尚无好朋友为你点赞</view>
<view class="c">要和好朋友常联系哦</view>
</block>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -40,31 +40,32 @@
text-align: center;
}
.container .smallcontainer {
padding: 32rpx;
padding: 32rpx 0;
box-sizing: border-box;
/* 列表 */
/* 没图片的样式 */
}
.container .smallcontainer .like_list {
width: 100%;
height: 100%;
border-bottom: 1rpx solid #F2F2F2;
}
.container .smallcontainer .like_list .fei_del {
display: flex;
padding: 30rpx 0;
padding: 32rpx 0 32rpx 32rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #F2F2F2;
}
.container .smallcontainer .like_list .list_left {
.container .smallcontainer .like_list .fei_del .list_left {
width: 208rpx;
height: 208rpx;
flex: 0 0 auto;
}
.container .smallcontainer .like_list .list_left image {
.container .smallcontainer .like_list .fei_del .list_left image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
.container .smallcontainer .like_list .list_right {
padding-left: 40rpx;
.container .smallcontainer .like_list .fei_del .list_right {
padding: 0 32rpx;
box-sizing: border-box;
flex: 1;
height: 208rpx;
... ... @@ -72,7 +73,7 @@
flex-direction: column;
justify-content: space-between;
}
.container .smallcontainer .like_list .list_right .list_right_content {
.container .smallcontainer .like_list .fei_del .list_right .list_right_content {
font-size: 28rpx;
line-height: 38rpx;
height: 82rpx;
... ... @@ -83,77 +84,113 @@
text-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.container .smallcontainer .like_list .list_right .newzeng {
.container .smallcontainer .like_list .fei_del .list_right .newzeng {
width: 100%;
display: flex;
align-items: center;
}
.container .smallcontainer .like_list .list_right .newzeng .status_change {
.container .smallcontainer .like_list .fei_del .list_right .newzeng .status_change {
padding: 5rpx 10rpx;
color: #E8370F;
border: 1rpx solid #E8370F;
font-size: 24rpx;
}
.container .smallcontainer .like_list .list_right .newzeng .rit_text {
.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text {
margin-left: 30rpx;
display: flex;
align-items: center;
}
.container .smallcontainer .like_list .list_right .newzeng .rit_text .numPer {
.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text .numPer {
color: #FF444B;
font-size: 24rpx;
}
.container .smallcontainer .like_list .list_right .newzeng .rit_text .numperson {
.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text .numperson {
font-size: 24rpx;
color: #8C9198;
}
.container .smallcontainer .like_list .list_right .list_right_box {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box {
display: flex;
align-items: center;
justify-content: space-between;
}
.container .smallcontainer .like_list .list_right .list_right_box .let {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let {
display: flex;
align-items: baseline;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .del {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced {
margin-left: 10rpx;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .del .money_icon_ {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced .money_icon_ {
font-size: 20rpx;
line-height: 42rpx;
color: #8C9198;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .del .del_price_ {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced .del_price_ {
font-size: 24rpx;
color: #8C9198;
text-decoration: line-through;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price {
display: flex;
align-items: baseline;
line-height: 55rpx;
font-weight: bold;
justify-content: space-between;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .icon_name {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .icon_name {
font-size: 28rpx;
color: #FF444B;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .money_icon {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .money_icon {
margin-left: 10rpx;
font-size: 20rpx;
line-height: 42rpx;
color: #FF444B;
}
.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .price_big {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .price_big {
color: #FF444B;
font-size: 32rpx;
}
.container .smallcontainer .like_list .list_right .list_right_box .dateTime {
.container .smallcontainer .like_list .fei_del .list_right .list_right_box .dateTime {
font-size: 24rpx;
color: #8C9198;
}
.container .smallcontainer .touch_item {
display: flex;
justify-content: space-between;
max-width: 750rpx;
overflow: hidden;
margin-bottom: 10rpx;
background: #f5f5f5;
}
.container .smallcontainer .touch_item .content {
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(90px);
transform: translateX(90px);
margin-left: -90px;
}
.container .smallcontainer .touch_item .del {
width: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #e8370f;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 35rpx;
}
.container .smallcontainer .touch_move_active .del,
.container .smallcontainer .touch_move_active .content {
-webkit-transform: translateX(0);
transform: translateX(0);
}
.container .smallcontainer .like_list_1 {
width: 100%;
height: 100%;
... ... @@ -251,3 +288,39 @@
width: 100%;
text-align: center;
}
.container .touch_item {
display: flex;
justify-content: space-between;
max-width: 750rpx;
overflow: hidden;
margin-bottom: 10rpx;
background: #f5f5f5;
height: 216rpx;
}
.container .touch_item .content {
width: 100%;
margin-right: 0;
-webkit-transition: all 0.4s;
transition: all 0.4s;
-webkit-transform: translateX(90px);
transform: translateX(90px);
margin-left: -90px;
}
.container .touch_item .content .item {
width: 100%;
background-color: #fffccc;
}
.container .touch_item .del {
width: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
background-color: #cccfff;
-webkit-transform: translateX(90px);
transform: translateX(90px);
-webkit-transition: all 0.4s;
transition: all 0.4s;
font-size: 35rpx;
}
... ...
... ... @@ -20,6 +20,7 @@ Page({
esl: '',
nav_list: ['全部订单', '待付款', '待自提', '待发货', '待收货', '待评价', '已完成', '退款中', '已退款'],
it_collse: false,
deltrue: false
},
onLoad: function (options) { // 接收参数
... ... @@ -133,6 +134,59 @@ Page({
},
delOrder(e) { // 删除
let that = this
that.setData({
deltrue: true
})
wx.showModal({
title: '提示',
content: '确定要删除该订单吗?',
success: async function (res) {
if (res.confirm) {
try {
const {
data
} = await request({
url: 'api/new2/cheOrderDel',
data: {
order_no: e.currentTarget.dataset.order_no
}
})
console.log(data, "取消订单");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
setTimeout(() => {
that.getMyorder()
that.setData({
deltrue: false
})
}, 1000);
} else {
let msg = data.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} catch (err) {
let msg = err.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} else {
}
}
})
},
async Abholung(e) { // 已自提
let that = this
try {
... ...
page {
// background-color: #f9f9f9;
width: 100%;
height: 100%;
}
.container {
border-top: 1rpx solid #F9F9F9;
padding: 0 32rpx;
box-sizing: border-box;
.bottom_scroll {
height: 80rpx;
display: flex;
white-space: nowrap;
overflow-y: scroll;
border-bottom: 1rpx solid #f5f5f5;
.nav {
line-height: 80rpx;
.nav_tab {
padding: 0 20rpx;
box-sizing: border-box;
color: #06121E;
line-height: 80rpx;
font-size: 28rpx;
.container {
border-top: 1rpx solid #F9F9F9;
padding: 0 32rpx;
box-sizing: border-box;
.bottom_scroll {
height: 80rpx;
display: flex;
white-space: nowrap;
overflow-y: scroll;
border-bottom: 1rpx solid #f5f5f5;
}
.nav {
.active {
color: #E8370F;
font-weight: bold;
line-height: 80rpx;
position: relative;
}
.nav_tab {
padding: 0 20rpx;
box-sizing: border-box;
color: #06121E;
line-height: 80rpx;
font-size: 28rpx;
.active::after {
position: relative;
border-bottom: 4rpx solid #E8370F;
display: block;
content: '';
width: 40rpx;
height: 1rpx;
background: #E8370F;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
}
}
}
.active {
color: #E8370F;
font-weight: bold;
line-height: 80rpx;
position: relative;
}
.changeService {
background-color: #fff;
padding: 32rpx;
box-sizing: border-box;
border-radius: 8rpx;
display: flex;
flex-direction: column;
.active::after {
position: relative;
border-bottom: 4rpx solid #E8370F;
display: block;
content: '';
width: 40rpx;
height: 1rpx;
background: #E8370F;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
.service_title {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
.title_ {
font-size: 28rpx;
line-height: 40rpx;
font-weight: bold;
}
.title_status {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
}
.changeService {
background-color: #fff;
padding: 32rpx;
box-sizing: border-box;
border-radius: 8rpx;
.service_content {
display: flex;
flex-direction: column;
.service_title {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
align-items: center;
padding: 20rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
.title_ {
font-size: 28rpx;
line-height: 40rpx;
font-weight: bold;
}
.ser_img {
width: 208rpx;
height: 208rpx;
.title_status {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
image {
width: 100%;
}
}
.service_content {
display: flex;
align-items: center;
padding: 20rpx 0;
.ser_cont {
flex: 1;
height: 208rpx;
padding-left: 20rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
.ser_img {
width: 208rpx;
height: 208rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
image {
width: 100%;
}
.ser_title {
font-size: 28rpx;
line-height: 48rpx;
font-weight: bold;
}
.ser_cont {
flex: 1;
height: 208rpx;
padding-left: 20rpx;
box-sizing: border-box;
.baoma {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.ser_title {
font-size: 28rpx;
line-height: 48rpx;
font-weight: bold;
}
.pd {
.red_money_icon {
font-size: 24rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
.red_money {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
.baoma {
display: flex;
justify-content: space-between;
align-items: center;
.pd {
.red_money_icon {
font-size: 24rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
.red_money {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
}
}
.count {
font-size: 24rpx;
line-height: 40rpx;
.count {
font-size: 24rpx;
line-height: 40rpx;
}
}
}
}
}
.btns {
display: flex;
justify-content: flex-end;
padding: 32rpx 0 0;
box-sizing: border-box;
.btns {
.btn {
width: 152rpx;
height: 52rpx;
padding: 0;
line-height: 52rpx;
font-weight: 400;
font-size: 24rpx;
margin: 0 10rpx;
}
.btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
background-color: #fff;
}
.btn_2 {
color: #fff;
background-color: #E8370F;
}
.btn_3 {
background-color: #fff;
color: #999999;
}
.tuitime2 {}
.cd {
display: flex;
justify-content: flex-end;
padding: 32rpx 0 0;
box-sizing: border-box;
align-items: center;
.btn {
width: 152rpx;
... ... @@ -174,89 +209,50 @@ page {
background-color: #fff;
color: #999999;
}
}
}
.tuitime2 {}
.btnitem {
justify-content: space-between;
}
.cd {
display: flex;
align-items: center;
.btnRight {
justify-content: flex-end;
}
.btn {
width: 152rpx;
height: 52rpx;
padding: 0;
line-height: 52rpx;
font-weight: 400;
font-size: 24rpx;
margin: 0 10rpx;
}
.btn3 {
justify-content: flex-end !important;
}
.btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
}
}
.btn_2 {
color: #fff;
background-color: #E8370F;
}
.cno {
width: 100%;
// height: 800rpx;
display: flex;
align-items: center;
justify-content: center;
.btn_3 {
background-color: #fff;
color: #999999;
}
}
}
.kongbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 200rpx auto;
.btnitem {
justify-content: space-between;
}
.btnRight {
justify-content: flex-end;
image {
width: 500rpx;
}
.btn3 {
justify-content: flex-end !important;
.c_name {
margin-top: 30rpx;
font-size: 32rpx;
color: #ccc;
}
}
.dmc {
.emmpty4S {
width: 100%;
height: 100%;
position: relative;
padding-bottom: 200rpx;
.c_img {
width: 196rpx;
height: 196rpx;
position: absolute;
top: 400rpx;
left: 0;
bottom: 0;
right: 0;
margin: auto;
image {
width: 100%;
}
}
.textName {
width: 100%;
padding: 0 80rpx;
text-align: center;
line-height: 40rpx;
font-size: 28rpx;
color: #999999;
position: absolute;
top: 430rpx;
}
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -5,7 +5,7 @@
</view>
</view>
<!-- 列表 -->
<block wx:if="{{myOrder.length > 0}}">
<block wx:if="{{myOrder.length != 0}}">
<view class="changeService" wx:for="{{myOrder}}" wx:key="id" bindtap="tomyOrderObligation" data-order_no="{{item.order_no}}" data-stateway="{{item.way2}}" data-is_car="{{item.is_car}}">
<view class="service_title">
<view class="title_">{{item.shop}}</view>
... ... @@ -63,7 +63,9 @@
</button>
</view>
<view class="btns btnitem btn3" wx:if="{{item.way2 == 7}}">
<button class="btn btn_2 btnRight" data-order_no="{{item.order_no}}">已完成</button>
<button class="btn btn_1 btnRight" disabled="{{deltrue}}" catchtap="delOrder" data-order_no="{{item.order_no}}">
删除
</button>
</view>
<view class="btns btnitem" wx:if="{{item.way2 == 8}}">
<view class="date_time tuitime2">{{item.tui_time2}}</view>
... ... @@ -72,18 +74,16 @@
</view>
</view>
<view class="btns btnitem btn3" wx:if="{{item.way2 == 9}}">
<button class="btn btn_2 ">已完成</button>
<button class="btn btn_2 " disabled="{{deltrue}}" data-order_no="{{item.order_no}}">
已退款
</button>
</view>
</view>
</block>
<view class="dmc" wx:else>
<view class="emmpty4S" bindtap="goGuang" wx:if="{{it_collse}}">
<view class="c_img">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" />
</view>
<view class="textName">
<view class="c">您暂时没有相关订单</view>
</view>
<view class="cno" wx:else>
<view class="kongbox" wx:if="{{it_collse}}">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" />
<view class="c_name">暂无数据</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
page .container {
page {
width: 100%;
height: 100%;
}
.container {
border-top: 1rpx solid #F9F9F9;
padding: 0 32rpx;
box-sizing: border-box;
}
page .container .bottom_scroll {
.container .bottom_scroll {
height: 80rpx;
display: flex;
white-space: nowrap;
overflow-y: scroll;
border-bottom: 1rpx solid #f5f5f5;
}
page .container .bottom_scroll .nav {
.container .bottom_scroll .nav {
line-height: 80rpx;
}
page .container .bottom_scroll .nav .nav_tab {
.container .bottom_scroll .nav .nav_tab {
padding: 0 20rpx;
box-sizing: border-box;
color: #06121E;
line-height: 80rpx;
font-size: 28rpx;
}
page .container .bottom_scroll .nav .active {
.container .bottom_scroll .nav .active {
color: #E8370F;
font-weight: bold;
line-height: 80rpx;
position: relative;
}
page .container .bottom_scroll .nav .active::after {
.container .bottom_scroll .nav .active::after {
position: relative;
border-bottom: 4rpx solid #E8370F;
display: block;
... ... @@ -39,7 +43,7 @@ page .container .bottom_scroll .nav .active::after {
left: 50%;
transform: translateX(-50%);
}
page .container .changeService {
.container .changeService {
background-color: #fff;
padding: 32rpx;
box-sizing: border-box;
... ... @@ -47,7 +51,7 @@ page .container .changeService {
display: flex;
flex-direction: column;
}
page .container .changeService .service_title {
.container .changeService .service_title {
display: flex;
align-items: center;
justify-content: space-between;
... ... @@ -55,32 +59,32 @@ page .container .changeService .service_title {
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
page .container .changeService .service_title .title_ {
.container .changeService .service_title .title_ {
font-size: 28rpx;
line-height: 40rpx;
font-weight: bold;
}
page .container .changeService .service_title .title_status {
.container .changeService .service_title .title_status {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
page .container .changeService .service_content {
.container .changeService .service_content {
display: flex;
align-items: center;
padding: 20rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
page .container .changeService .service_content .ser_img {
.container .changeService .service_content .ser_img {
width: 208rpx;
height: 208rpx;
}
page .container .changeService .service_content .ser_img image {
.container .changeService .service_content .ser_img image {
width: 100%;
}
page .container .changeService .service_content .ser_cont {
.container .changeService .service_content .ser_cont {
flex: 1;
height: 208rpx;
padding-left: 20rpx;
... ... @@ -89,39 +93,39 @@ page .container .changeService .service_content .ser_cont {
flex-direction: column;
justify-content: space-between;
}
page .container .changeService .service_content .ser_cont .ser_title {
.container .changeService .service_content .ser_cont .ser_title {
font-size: 28rpx;
line-height: 48rpx;
font-weight: bold;
}
page .container .changeService .service_content .ser_cont .baoma {
.container .changeService .service_content .ser_cont .baoma {
display: flex;
justify-content: space-between;
align-items: center;
}
page .container .changeService .service_content .ser_cont .baoma .pd .red_money_icon {
.container .changeService .service_content .ser_cont .baoma .pd .red_money_icon {
font-size: 24rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
page .container .changeService .service_content .ser_cont .baoma .pd .red_money {
.container .changeService .service_content .ser_cont .baoma .pd .red_money {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
font-weight: bold;
}
page .container .changeService .service_content .ser_cont .baoma .count {
.container .changeService .service_content .ser_cont .baoma .count {
font-size: 24rpx;
line-height: 40rpx;
}
page .container .changeService .btns {
.container .changeService .btns {
display: flex;
justify-content: flex-end;
padding: 32rpx 0 0;
box-sizing: border-box;
}
page .container .changeService .btns .btn {
.container .changeService .btns .btn {
width: 152rpx;
height: 52rpx;
padding: 0;
... ... @@ -130,23 +134,24 @@ page .container .changeService .btns .btn {
font-size: 24rpx;
margin: 0 10rpx;
}
page .container .changeService .btns .btn_1 {
.container .changeService .btns .btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
background-color: #fff;
}
page .container .changeService .btns .btn_2 {
.container .changeService .btns .btn_2 {
color: #fff;
background-color: #E8370F;
}
page .container .changeService .btns .btn_3 {
.container .changeService .btns .btn_3 {
background-color: #fff;
color: #999999;
}
page .container .changeService .btns .cd {
.container .changeService .btns .cd {
display: flex;
align-items: center;
}
page .container .changeService .btns .cd .btn {
.container .changeService .btns .cd .btn {
width: 152rpx;
height: 52rpx;
padding: 0;
... ... @@ -155,53 +160,47 @@ page .container .changeService .btns .cd .btn {
font-size: 24rpx;
margin: 0 10rpx;
}
page .container .changeService .btns .cd .btn_1 {
.container .changeService .btns .cd .btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
}
page .container .changeService .btns .cd .btn_2 {
.container .changeService .btns .cd .btn_2 {
color: #fff;
background-color: #E8370F;
}
page .container .changeService .btns .cd .btn_3 {
.container .changeService .btns .cd .btn_3 {
background-color: #fff;
color: #999999;
}
page .container .changeService .btnitem {
.container .changeService .btnitem {
justify-content: space-between;
}
page .container .changeService .btnRight {
.container .changeService .btnRight {
justify-content: flex-end;
}
page .container .changeService .btn3 {
.container .changeService .btn3 {
justify-content: flex-end !important;
}
page .container .dmc .emmpty4S {
.container .cno {
width: 100%;
height: 100%;
position: relative;
padding-bottom: 200rpx;
}
page .container .dmc .emmpty4S .c_img {
width: 196rpx;
height: 196rpx;
position: absolute;
top: 400rpx;
left: 0;
bottom: 0;
right: 0;
margin: auto;
display: flex;
align-items: center;
justify-content: center;
}
page .container .dmc .emmpty4S .c_img image {
.container .cno .kongbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 200rpx auto;
}
page .container .dmc .emmpty4S .textName {
width: 100%;
padding: 0 80rpx;
text-align: center;
line-height: 40rpx;
font-size: 28rpx;
color: #999999;
position: absolute;
top: 430rpx;
.container .cno .kongbox image {
width: 500rpx;
}
.container .cno .kongbox .c_name {
margin-top: 30rpx;
font-size: 32rpx;
color: #ccc;
}
... ...
... ... @@ -12,6 +12,7 @@ Page({
time: 30 * 60 * 60 * 1000,
timeData: {},
storeList: 4,
it_collse: false
},
onLoad: function (options) {
let that = this
... ... @@ -19,6 +20,7 @@ Page({
that.setData({
// order_id: options.order_id,
})
that.getMoneyLog()
},
onChange(e) {
this.setData({
... ... @@ -29,7 +31,7 @@ Page({
goback() {
wx.navigateBack()
},
async public() {
async getMoneyLog() {
let that = this
try {
const {
... ... @@ -37,15 +39,23 @@ Page({
data
}
} = await request({
url: '',
data: {
goods_id: that.data.goods_id
}
url: 'api/new2/moneyLog',
})
console.log(data);
that.setData({
public: data
moneyLog: data
})
if (data.length != 0) {
that.setData({
it_collse: true
})
console.log(123);
console.log(that.data.it_cloose);
} else {
that.setData({
it_collse: false
})
}
} catch (err) {
console.log(err);
that.setData({
... ... @@ -54,6 +64,8 @@ Page({
that.popTest()
}
},
popTest() {
wx.showToast({
title: this.data.msg,
... ...
page {
background: #f9f9f9;
width: 100%;
height: 100%;
}
.container {
... ... @@ -37,6 +39,7 @@ page {
.health {
width: 100%;
height: 100%;
.rechange {
width: 100%;
... ... @@ -67,24 +70,64 @@ page {
}
}
.pt {
.lis_icoon {
display: flex;
align-items: baseline;
justify-content: flex-end;
align-items: center;
.pt_icon {
font-size: 22rpx;
.icon_is {
font-size: 32rpx;
color: #06121E;
}
.pt_price {
font-size: 32rpx;
color: #06121E;
.pt {
display: flex;
align-items: baseline;
justify-content: flex-end;
.pt_icon {
font-size: 22rpx;
color: #06121E;
}
.pt_price {
font-size: 32rpx;
color: #06121E;
}
}
}
}
}
.cno {
width: 100%;
// height: 800rpx;
display: flex;
align-items: center;
justify-content: center;
.kongbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 200rpx auto;
image {
width: 500rpx;
}
.c_name {
margin-top: 30rpx;
font-size: 32rpx;
color: #ccc;
}
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -7,19 +7,30 @@
</view>
</view>
<view class="health">
<view class="rechange">
<block wx:for-index="index" wx:for="{{four}}" wx:for-item="item" wx:key="index">
<view class="rechange" wx:if="{{moneyLog.length !=0}}">
<block wx:for-index="index" wx:for="{{moneyLog}}" wx:for-item="item" wx:key="index">
<view class="item_rechange">
<view class="left_item">
<view class="item_name">余额充值</view>
<view class="item_date">2020-10-22</view>
<view class="item_name">{{item.memo}}</view>
<view class="item_date">{{item.createtime2}}</view>
</view>
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">50</view>
<view class="lis_icoon">
<view class="icon_is" wx:if="{{item.sign==1}}">+</view>
<view class="icon_is" wx:if="{{item.sign==-1}}">-</view>
<view class="icon_is" wx:if="{{item.sign==0}}"></view>
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item.money2}}</view>
</view>
</view>
</view>
</block>
</view>
<view class="cno" wx:else>
<view class="kongbox" wx:if="{{it_collse}}">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" />
<view class="c_name">暂无数据</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
page {
background: #f9f9f9;
width: 100%;
height: 100%;
}
.container {
width: 100%;
... ... @@ -30,6 +32,7 @@ page {
}
.container .health {
width: 100%;
height: 100%;
}
.container .health .rechange {
width: 100%;
... ... @@ -54,16 +57,47 @@ page {
font-size: 24rpx;
color: #06121E;
}
.container .health .rechange .item_rechange .pt {
.container .health .rechange .item_rechange .lis_icoon {
display: flex;
align-items: center;
}
.container .health .rechange .item_rechange .lis_icoon .icon_is {
font-size: 32rpx;
color: #06121E;
}
.container .health .rechange .item_rechange .lis_icoon .pt {
display: flex;
align-items: baseline;
justify-content: flex-end;
}
.container .health .rechange .item_rechange .pt .pt_icon {
.container .health .rechange .item_rechange .lis_icoon .pt .pt_icon {
font-size: 22rpx;
color: #06121E;
}
.container .health .rechange .item_rechange .pt .pt_price {
.container .health .rechange .item_rechange .lis_icoon .pt .pt_price {
font-size: 32rpx;
color: #06121E;
}
.container .health .cno {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.container .health .cno .kongbox {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 200rpx auto;
}
.container .health .cno .kongbox image {
width: 500rpx;
}
.container .health .cno .kongbox .c_name {
margin-top: 30rpx;
font-size: 32rpx;
color: #ccc;
}
... ...
... ... @@ -24,12 +24,13 @@ Page({
let that = this
console.log(options);
that.setData({
// order_id: options.order_id,
kw: options.kw,
})
that.getmoreList()
},
onShow: function () {
let that = this
that.getmoreList()
},
goback() {
wx.navigateBack()
... ...
... ... @@ -186,8 +186,7 @@ page {
justify-content: center;
.kongbox {
width: 100%;
height: 100%;
width: 500rpx;
display: flex;
flex-direction: column;
justify-content: center;
... ... @@ -197,7 +196,6 @@ page {
image {
width: 100%;
height: 600rpx;
}
.c_name {
... ...
... ... @@ -36,7 +36,7 @@
</block>
<view class="cno" wx:else>
<view class="kongbox" wx:if="{{it_cloose}}">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" />
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" />
<view class="c_name">暂无数据</view>
</view>
</view>
... ...
... ... @@ -155,8 +155,7 @@ page {
justify-content: center;
}
.container .cno .kongbox {
width: 100%;
height: 100%;
width: 500rpx;
display: flex;
flex-direction: column;
justify-content: center;
... ... @@ -165,7 +164,6 @@ page {
}
.container .cno .kongbox image {
width: 100%;
height: 600rpx;
}
.container .cno .kongbox .c_name {
margin-top: 30rpx;
... ...
... ... @@ -10,22 +10,22 @@
<view class="searchbox">
<view class="searchinput" bindtap="goSearch">
<image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image>
<input bindinput="navtosearch" type="text" placeholder="搜索您想要的商品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" />
<input bindinput="navtosearch" type="text" placeholder="搜索你想要的4S店产品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" />
</view>
</view>
<view class="top_tit">
<view class="tit_list">
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_2.png" />
<view class="item_names">口碑商品</view>
<view class="item_names">品牌授权</view>
</view>
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_3.png" />
<view class="item_names">仓储供应</view>
<view class="item_names">品质保障</view>
</view>
<view class="tit_item">
<image src="{{imagesUrl}}assets/static/img/a_1.png" />
<view class="item_names">品质担保</view>
<view class="item_names">服务担保</view>
</view>
</view>
</view>
... ...
... ... @@ -4,7 +4,7 @@
<view class="search_box">
<view class="search">
<image src="{{imagesUrl}}assets/static/img/searchone.png"></image>
<input type="text" placeholder="请输入搜索内容" value="{{searchValue}}" confirm-type="search" bindinput="getInput" bindconfirm="bindconfirm" name="input"></input>
<input type="text" placeholder="请输入汽车4S店名称" value="{{searchValue}}" confirm-type="search" bindinput="getInput" bindconfirm="bindconfirm" name="input"></input>
</view>
<button class="search_btn" style="width:100rpx!important" formType='submit'>搜索</button>
</view>
... ...
... ... @@ -25,6 +25,7 @@ Page({
good_id: '',
good_name: '',
imgShare: '',
deltrue: false
},
onLoad: function (options) { // 接收参数
console.log(options);
... ... @@ -32,15 +33,9 @@ Page({
that.setData({
id: options.id
})
that.getMyorder()
},
onShow: function () {
this.getMyorder()
},
goGuang() {
// wx.switchTab({
// url: '/pages/home/home'
// })
},
onShow: function () {},
onChange(e) {
this.setData({
timeData: e.detail,
... ... @@ -70,8 +65,7 @@ Page({
}
},
// 去支付
gotoplay() {
gotoplay() { // 去支付
wx.navigateTo({
url: '/pages/cheConfirmAnOrder/cheConfirmAnOrder'
})
... ... @@ -177,33 +171,53 @@ Page({
},
async Abholung(e) { //
delOrder(e) { // 删除
let that = this
// try {
// const {
// data
// } = await request({
// url: 'api/my/qvOrder',
// data: {
// order_no: e.currentTarget.dataset.order_no
// }
// })
// console.log(data, "");
// that.setData({
// msg: data.msg
// })
// that.popSuccessTest()
// setTimeout(() => {
// that.getMyorder()
// }, 1300);
// } catch (err) {
// that.setData({
// msg: err.msg
// })
// that.popMaskTest()
// }
that.setData({
deltrue: true
})
wx.showModal({
title: '提示',
content: '确定要删除该订单吗?',
success: async function (res) {
if (res.confirm) {
try {
const {
data
} = await request({
url: 'api/new2/tuiOrderDel',
data: {
order_no: e.currentTarget.dataset.order_no
}
})
console.log(data, "取消订单");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
setTimeout(() => {
that.getMyorder()
that.setData({
deltrue: false
})
}, 1000);
} else {
let msg = data.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} catch (err) {
let msg = err.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} else {}
}
})
},
async returnStore(e) { // 申请退货
let that = this
... ... @@ -274,8 +288,6 @@ Page({
})
this.popMaskTest()
}
},
async CancelRefund(e) { //取消退款
let that = this
... ...
... ... @@ -249,6 +249,7 @@ page {
.btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
background-color: #fff;
}
.btn_2 {
... ...
... ... @@ -37,7 +37,7 @@
</view>
</view>
</view>
<view class="down_buttons" wx:if="{{item.way3 != 7 }}">
<view class="down_buttons">
<view class="pay_time_per">
<view class="surplus_times" wx:if="{{item.way3 == 3 }}">
<view class="buy_tims">剩余时间:</view>
... ... @@ -80,9 +80,11 @@
立即评价
</button>
</view>
<!-- <view class="btns btnitem btn3" wx:if="{{item.way3 == 7}}">
<button class="btn btn_2 btnRight" data-order_no="{{item.order_no}}">已完成</button>
</view> -->
<view class="btns btnitem btn3" wx:if="{{item.way3 == 7}}">
<button class="btn btn_1 btnRight" disabled="{{deltrue}}" catchtap="delOrder" data-order_no="{{item.order_no}}">
删除
</button>
</view>
<view class="btns btnitem" wx:if="{{item.way3 == 8}}">
<view class="date_time tuitime2">{{item.tui_time2}}</view>
<view class="cd">
... ... @@ -97,7 +99,7 @@
</block>
</block>
<view class="dmc" wx:else>
<view class="emmpty4S" bindtap="goGuang" wx:if="{{it_cloose == true}}">
<view class="emmpty4S" wx:if="{{it_cloose == true}}">
<view class="c_img">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" />
<view class="textName">暂无相关订单</view>
... ...
... ... @@ -203,6 +203,7 @@ page .container .tuan_order_lists .changeService .down_buttons .btns .btn {
page .container .tuan_order_lists .changeService .down_buttons .btns .btn_1 {
border: 2rpx solid #ccc;
color: #06121E;
background-color: #fff;
}
page .container .tuan_order_lists .changeService .down_buttons .btns .btn_2 {
color: #fff;
... ...
... ... @@ -56,9 +56,33 @@ Page({
name: e.detail.value
})
},
bindinputed(e) {
let that = this
let carNum = e.detail.value
let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
wx.showToast({
icon: 'none',
title: '请输入正确车牌号',
})
return;
} else {
that.setData({
pai: carNum
})
console.log(that.data.shengItem, "shengItem");
if (sheng_id != '') {
that.getRegister()
}
}
},
paiInput(e) { // c车牌号
let that = this
let carNum = e.detail.value
// let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
... ... @@ -71,9 +95,56 @@ Page({
that.setData({
pai: carNum
})
console.log(that.data.shengItem, "shengItem");
// if (sheng_id != '') {
// that.getRegister()
// }
}
},
async getRegister() { // 注册
let that = this
try {
const {
data
} = await request({
url: 'api/new2/checkPai',
data: {
sheng_id: that.data.sheng_id,
pai: that.data.pai,
}
})
console.log(data, "注册");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
} else {
let msg = data.msg
// a.popTest(msg)
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
})
} else {
}
}
})
}
} catch (err) {
let msg = err.msg
a.popTest(msg)
}
},
bindTimeChange(e) { // 时间
this.setData({
buy_time: e.detail.value
... ... @@ -233,6 +304,7 @@ Page({
tiveCar(e) { // 车牌号
let that = this
let idx = e.currentTarget.dataset.id
let pai = that.data.pai
that.setData({
idx: idx
})
... ... @@ -246,6 +318,9 @@ Page({
}
})
that.hideModal()
if (pai != '') {
that.getRegister()
}
},
async formSubmit(e) { // 保存时
let that = this
... ...
... ... @@ -11,10 +11,10 @@
<view class='select'>
<view class="colorHui" wx:if="{{color == 1}}">{{shengItem}}</view>
<view class="sheng_id" wx:else>{{shengItem}}</view>
<image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image>
<image class='select_img {{show &&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image>
</view>
</view>
<input type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" bindblur="paiInput" bindinput="bindinput" class="inputitem" maxlength="17" />
<input type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" bindblur="paiInput" bindinput="bindinputed" class="inputitem" maxlength="17" />
</view>
<view class="card_logo car">
<label for="车辆品牌" class="labelsitem">车辆品牌:</label>
... ...
... ... @@ -58,6 +58,7 @@ Page({
paiInput(e) { // c车牌号
let that = this
let carNum = e.detail.value
let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
... ... @@ -70,25 +71,79 @@ Page({
that.setData({
pai: carNum
})
if (sheng_id != '') {
that.getRegister()
}
}
},
bindinputed(e) {
let that = this
let carNum = e.detail.value
let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
wx.showToast({
icon: 'none',
title: '请输入正确车牌号',
})
return;
} else {
that.setData({
pai: carNum
})
console.log(that.data.shengItem, "shengItem");
if (sheng_id != '') {
that.getRegister()
}
}
},
async getRegister() { // 注册
let that = this
try {
const {
data
} = await request({
url: 'api/new2/checkPai',
data: {
sheng_id: that.data.sheng_id,
pai: that.data.pai,
}
})
console.log(data, "注册");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
} else {
let msg = data.msg
// a.popTest(msg)
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
})
} else {
}
}
})
}
} catch (err) {
that.setData({
msg: err.msg
})
that.popTest()
}
// let value = (e.detail.value || '').trim()
// console.log(value);
// if (value) {
// const reg = /[\u4e00-\u9fa5]/ig
// if ((reg.test(value))) {
// value = value.replace(reg, '')
// that.setData({
// msg: '不允许输入中文',
// pai: ''
// })
// that.popTest()
// } else {
// that.setData({
// pai: value
// })
// }
// }
},
bindTimeChange(e) { // 时间
this.setData({
buy_time: e.detail.value
... ... @@ -214,6 +269,7 @@ Page({
tiveCar(e) { // 车牌号
let that = this
let idx = e.currentTarget.dataset.id
let pai = that.data.pai
that.setData({
idx: idx
})
... ... @@ -228,6 +284,9 @@ Page({
})
// console.log(that.data.shengItem, that.data.sheng_id);
that.hideModal()
if (pai != '') {
that.getRegister()
}
},
async getShengSu() { // 默认省份
let that = this
... ...
... ... @@ -18,7 +18,7 @@
</view>
</view>
<view class="box_input">
<input type="text" maxlength="10" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchblur="paiInput" />
<input type="text" maxlength="10" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchinput="bindinputed" catchblur="paiInput" />
</view>
</view>
</view>
... ...
... ... @@ -10,14 +10,9 @@ Page({
way: 1,
msg: '',
it_cloosy: false,
deltrue: false
},
onShow: function () {
// wx.showToast({
// title: '加载中',
// icon: "loading",
// duration: 1500,
// mask: false
// })
this.getMyorder()
},
tomyOrderObligation(e) { // 进订单详情
... ... @@ -55,34 +50,71 @@ Page({
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popMaskTest()
let msg = err.msg
a.popTest(msg)
}
},
goGuang() {
wx.switchTab({
url: '/pages/home/home'
delOrder(e) { // 删除
let that = this
that.setData({
deltrue: true
})
},
popSuccessTest() {
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 1300, //停留时间
wx.showModal({
title: '提示',
content: '确定要删除该订单吗?',
success: async function (res) {
if (res.confirm) {
try {
const {
data
} = await request({
url: 'api/new2/activeOrderDel',
data: {
id: e.currentTarget.dataset.id
}
})
console.log(data, "删除");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
setTimeout(() => {
that.getMyorder()
that.setData({
deltrue: false
})
}, 1000);
} else {
let msg = data.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} catch (err) {
let msg = err.msg
a.popTest(msg)
that.setData({
deltrue: false
})
}
} else {
}
}
})
},
popMaskTest() {
wx.showToast({
title: this.data.msg,
duration: 1300,
icon: 'none',
mask: true //是否有透明蒙层,默认为false
//如果有透明蒙层,弹窗的期间不能点击文档内容
goGuang() {
wx.switchTab({
url: '/pages/home/home'
})
},
})
\ No newline at end of file
... ...
... ... @@ -124,6 +124,13 @@ page {
background-color: #E8370F;
}
.delbtn {
background-color: #fff;
color: #06121E;
margin-left: 20rpx;
border: 2rpx solid #ccc;
}
}
}
... ... @@ -150,8 +157,8 @@ page {
justify-content: center;
image {
width: 196rpx;
height: 196rpx;
width: 500rpx;
// height: 196rpx;
}
}
... ...
... ... @@ -22,13 +22,16 @@
</view>
<view class="btns">
<button class="btn" catchtap="tomyOrderObligation" data-id="{{item.id}}">查看订单</button>
<button class="btn delbtn" disabled="{{deltrue}}" catchtap="delOrder" data-id="{{item.id}}">
删除
</button>
</view>
</view>
</block>
<view class="dmc" wx:else>
<view class="emmpty4S" bindtap="goGuang" wx:if="{{it_cloosy}}">
<view class="c_img">
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" />
<image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" />
</view>
<view class="textName">
<view class="c">您暂时没有相关订单</view>
... ...
... ... @@ -103,6 +103,12 @@ page {
color: #fff;
background-color: #E8370F;
}
.container .changeService .btns .delbtn {
background-color: #fff;
color: #06121E;
margin-left: 20rpx;
border: 2rpx solid #ccc;
}
.container .dmc {
width: 100%;
position: relative;
... ... @@ -125,8 +131,7 @@ page {
justify-content: center;
}
.container .dmc .emmpty4S .c_img image {
width: 196rpx;
height: 196rpx;
width: 500rpx;
}
.container .dmc .emmpty4S .textName {
width: 100%;
... ...
... ... @@ -156,16 +156,6 @@ Page({
},
fail() { //这里是用户拒绝授权后的回调
// wx.openSetting({
// success: function (data) {
// console.log(data)
// if (data.authSetting["scope.writePhotosAlbum"] === true) {
// console.log("是否授权成功")
// } else {
// applyApi.toast("授权失败");
// }
// }
// })
wx.showModal({
title: '提示',
content: '您取消授权,无法保存图片,点击确定打开权限',
... ... @@ -175,10 +165,6 @@ Page({
wx.openSetting({
success(res) {
console.log(res.authSetting)
// res.authSetting = {
// "scope.userInfo": true,
// "scope.userLocation": true
// }
}
})
} else if (res.cancel) {
... ... @@ -229,14 +215,8 @@ Page({
complete: function (res) {
console.log('complete后的res数据:')
},
}) //,
})
},
// fail: function (res) {
// wx.showModal({
// title: '下载失败',
// content: '请联系管理员',
// })
// },
complete: function (res) {},
})
},
... ...
page {
background-color: #fff;
background-color: #f9f9f9;
width: 100%;
height: 100%;
}
.container {
padding: 0 18rpx;
box-sizing: border-box;
width: 100%;
.good {
width: 100%;
padding: 0 18rpx;
box-sizing: border-box;
.footlist_a {
width: 100%;
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
.foot_left_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
.cl_color {
width: 100%;
background: linear-gradient(90deg, #f02928, #fd7f2e);
border-radius: 8rpx;
position: relative;
padding: 10rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
.progess {
width: 100%;
padding: 0 10rpx;
box-sizing: border-box;
}
.cl_name {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
}
.image_color {
width: 32rpx;
height: 32rpx;
position: absolute;
top: -20rpx;
right: -10rpx;
}
}
}
}
.foot_right_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
.cl_color {
width: 100%;
background: linear-gradient(90deg, #f02928, #fd7f2e);
border-radius: 8rpx;
position: relative;
padding: 10rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
.progess {
width: 100%;
padding: 0 10rpx;
box-sizing: border-box;
}
.cl_name {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
}
.image_color {
width: 32rpx;
height: 32rpx;
position: absolute;
top: -20rpx;
right: -10rpx;
}
}
}
}
&::after {
content: '';
clear: both;
display: block;
}
}
}
.goods_list {
width: 100%;
... ... @@ -234,175 +547,6 @@ page {
}
// .like_list {
// width: 100%;
// height: 100%;
// display: flex;
// padding: 30rpx 0;
// box-sizing: border-box;
// border-bottom: 1rpx solid #EEEEEE;
// .list_left {
// width: 208rpx;
// height: 208rpx;
// margin-right: 20rpx;
// flex: 0 0 auto;
// image {
// width: 100%;
// }
// }
// .list_right {
// height: 208rpx;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// .like_list_text {
// font-size: 28rpx;
// line-height: 38rpx;
// height: 82rpx;
// color: rgba(6, 18, 31, 1);
// display: -webkit-box;
// -webkit-line-clamp: 2;
// overflow: hidden;
// text-overflow: ellipsis;
// -webkit-box-orient: vertical;
// }
// .newzeng {
// width: 100%;
// display: flex;
// align-items: center;
// .status_change {
// padding: 5rpx 10rpx;
// color: #E8370F;
// border: 1rpx solid #E8370F;
// font-size: 24rpx;
// }
// .rit_text {
// margin-left: 30rpx;
// display: flex;
// align-items: center;
// .numPer {
// color: #FF444B;
// font-size: 24rpx;
// }
// .numperson {
// font-size: 24rpx;
// color: #8C9198;
// }
// }
// }
// }
// }
/* 没图片的样式 */
// .like_list_1 {
// width: 100%;
// height: 100%;
// padding: 20rpx 0;
// box-sizing: border-box;
// border-bottom: 1rpx solid #EEEEEE;
// .like_list_text {
// display: block;
// height: 100%;
// line-height: 70rpx;
// color: #06121F;
// }
// .down_next {
// .newzeng {
// width: 100%;
// display: flex;
// align-items: center;
// .status_change {
// padding: 5rpx 10rpx;
// color: #E8370F;
// border: 1rpx solid #E8370F;
// font-size: 24rpx;
// }
// .rit_text {
// margin-left: 30rpx;
// display: flex;
// align-items: center;
// .numPer {
// color: #FF444B;
// font-size: 24rpx;
// }
// .numperson {
// font-size: 24rpx;
// color: #8C9198;
// }
// }
// }
// .price_dP_ {
// display: flex;
// line-height: 55rpx;
// .zan_price_ {
// display: flex;
// font-weight: bold;
// .icon_name_ {
// font-size: 28rpx;
// color: #FF444B;
// }
// .money_icon_ {
// margin-left: 10rpx;
// font-size: 20rpx;
// line-height: 61rpx;
// color: #FF444B;
// }
// .price_big_ {
// color: #FF444B;
// font-size: 32rpx;
// }
// }
// .del {
// display: flex;
// align-self: baseline;
// margin-left: 40rpx;
// .money_icon_ {
// font-size: 20rpx;
// color: #8C9198;
// line-height: 55rpx;
// }
// .del_price_ {
// font-size: 24rpx;
// color: #8C9198;
// text-decoration: line-through;
// }
// }
// }
// }
// }
}
}
\ No newline at end of file
... ...
<view class="container">
<view class="goods_list">
<view class="good">
<view class='footlist_a' wx:if="{{cateItem.length!=0}}">
<view class="foot_left_a">
<block wx:for="{{cateItem}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class='footbox' wx:if="{{index%2==0}}" bindtap="goDetail" data-id="{{item.goods_id}}">
<image class='cover' src="{{item.img}}" mode="widthFix"></image>
<view class="text_bx">
<view class="ster_nams title_content2">{{item.goods_name}}</view>
<view class="cen_tite">
<view class="lis_title">{{item.shop_type}}</view>
<view class="stay">
<view class="numbe">{{item.sales_initial}}</view>
<view class="ber_name">位车友推荐</view>
</view>
</view>
<view class="price_bx">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item.price}}</view>
</view>
<view class="del">¥{{item.line_price}}</view>
</view>
<view class="cl_color" wx:if="{{esl==3}}">
<view class="cl_name">去抢购</view>
<view class="progess">
<progress percent="{{item.bai_num}}" style="color:#fff" backgroundColor="white" activeColor="#FF9D00" duration="30" border-radius="20" bindtap="progress" show-info active></progress>
</view>
<image src="{{imagesUrl}}assets/static/img/x_t.png" class="image_color" />
</view>
</view>
</view>
</block>
</view>
<view class="foot_right_a">
<block wx:for="{{cateItem}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class='footbox' wx:if="{{index%2==1}}" bindtap="goDetail" data-id="{{item.goods_id}}">
<image class='cover' src="{{item.img}}" mode="widthFix"></image>
<view class="text_bx">
<view class="ster_nams title_content2">{{item.goods_name}}</view>
<view class="cen_tite">
<view class="lis_title">{{item.shop_type}}</view>
<view class="stay">
<view class="numbe">{{item.sales_initial}}</view>
<view class="ber_name">位车友推荐</view>
</view>
</view>
<view class="price_bx">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item.price}}</view>
</view>
<view class="del">¥{{item.line_price}}</view>
</view>
<view class="cl_color" wx:if="{{esl==3}}">
<view class="cl_name">去抢购</view>
<view class="progess">
<progress percent="{{item.bai_num}}" style="color:#fff" backgroundColor="white" activeColor="#FF9D00" duration="30" border-radius="20" bindtap="progress" show-info active></progress>
</view>
<image src="{{imagesUrl}}assets/static/img/x_t.png" class="image_color" />
</view>
</view>
</view>
</block>
</view>
</view>
</view>
<!-- <view class="goods_list">
<view wx:for="{{cateItem}}" wx:key="*this" wx:for-item="item">
<view class="like_list" wx:if="{{item.img !==''}}" bindtap="storeDetail" data-id="{{item.goods_id}}" data-num="1">
<view class="list_left">
... ... @@ -53,5 +119,5 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
\ No newline at end of file
... ...
page {
background-color: #fff;
background-color: #f9f9f9;
width: 100%;
height: 100%;
}
.container {
width: 100%;
}
.container .good {
width: 100%;
padding: 0 18rpx;
box-sizing: border-box;
}
.container .good .footlist_a {
width: 100%;
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.container .good .footlist_a .foot_left_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_left_a .footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
}
.container .good .footlist_a .foot_left_a .footbox image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay {
display: flex;
align-items: center;
justify-content: flex-end;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay .numbe {
font-size: 22rpx;
color: #E8370F;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay .ber_name {
font-size: 22rpx;
color: #06121E;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx {
width: 100%;
display: flex;
align-items: center;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt {
display: flex;
align-items: baseline;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt .pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt .pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
.container .good .footlist_a .foot_left_a .footbox .cl_color {
width: 100%;
background: linear-gradient(90deg, #f02928, #fd7f2e);
border-radius: 8rpx;
position: relative;
padding: 10rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
}
.container .good .footlist_a .foot_left_a .footbox .cl_color .progess {
width: 100%;
padding: 0 10rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_left_a .footbox .cl_color .cl_name {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
}
.container .good .footlist_a .foot_left_a .footbox .cl_color .image_color {
width: 32rpx;
height: 32rpx;
position: absolute;
top: -20rpx;
right: -10rpx;
}
.container .good .footlist_a .foot_right_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_right_a .footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
}
.container .good .footlist_a .foot_right_a .footbox image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay {
display: flex;
align-items: center;
justify-content: flex-end;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay .numbe {
font-size: 22rpx;
color: #E8370F;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay .ber_name {
font-size: 22rpx;
color: #06121E;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx {
width: 100%;
display: flex;
align-items: center;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt {
display: flex;
align-items: baseline;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt .pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt .pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
.container .good .footlist_a .foot_right_a .footbox .cl_color {
width: 100%;
background: linear-gradient(90deg, #f02928, #fd7f2e);
border-radius: 8rpx;
position: relative;
padding: 10rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
}
.container .good .footlist_a .foot_right_a .footbox .cl_color .progess {
width: 100%;
padding: 0 10rpx;
box-sizing: border-box;
}
.container .good .footlist_a .foot_right_a .footbox .cl_color .cl_name {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
text-align: center;
color: #ffffff;
}
.container .good .footlist_a .foot_right_a .footbox .cl_color .image_color {
width: 32rpx;
height: 32rpx;
position: absolute;
top: -20rpx;
right: -10rpx;
}
.container .good .footlist_a::after {
content: '';
clear: both;
display: block;
}
.container .goods_list {
width: 100%;
height: 100%;
... ... @@ -14,7 +267,6 @@ page {
margin-bottom: 15rpx;
/* 列表 */
/* 没图片的样式 */
/* 没图片的样式 */
}
.container .goods_list .like_list {
width: 100%;
... ...
... ... @@ -20,6 +20,10 @@ Page({
nominate_switch: '',
click_num: '',
childShow: false,
send: 0,
it_tue: false,
newindex: '',
top_true: true
},
onShow: function () {
... ... @@ -51,14 +55,18 @@ Page({
that.setData({
cateList2: value.cate2,
currentIndex: indexone,
newindex: indexone + 1
})
}
})
if (res.data.data.length != 0) {
if (that.data.id == '') {
that.setData({
cateList2: res.data.data[0].cate2
cateList2: res.data.data[0].cate2,
id: res.data.data[0].id,
newindex: 1
})
console.log(that.data.id, "id22222");
}
}
console.log("分类2 ", that.data.cateList2);
... ... @@ -68,9 +76,10 @@ Page({
console.log(e);
let that = this
that.setData({
id: e.currentTarget.dataset.id
id: e.currentTarget.dataset.id,
send: e.currentTarget.dataset.index
})
this.getLeftCates()
that.getLeftCates()
},
onReachBottom: function () {
let newpage = this.page;
... ... @@ -108,5 +117,62 @@ Page({
url: '/pages/cate3List/cate3List?id=' + id
})
},
lower(e) {
console.log(e);
let that = this
let leftCates = that.data.leftCates
let indexnum = Number(that.data.leftCates.length)
let id = that.data.id
let send = ''
console.log(id);
leftCates.forEach((item, index) => {
if (item.id == id) {
console.log(index);
send = index + 1
}
})
console.log(send);
if (send != indexnum) {
let idt = leftCates[send].id
console.log(idt);
that.setData({
id: idt,
it_tue: false
})
that.getLeftCates()
} else {
that.setData({
id,
it_tue: true
})
}
},
upper(e) {
console.log(e);
let that = this
let leftCates = that.data.leftCates
let id = that.data.id
let send = ''
console.log(id);
leftCates.forEach((item, index) => {
if (item.id == id) {
if (index != 0) {
send = index - 1
} else {
send = index
}
}
})
console.log(send);
let idt = leftCates[send].id
console.log(idt);
that.setData({
id: idt,
})
that.getLeftCates()
},
})
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ page {
.category_menu {
display: flex;
margin-right: 20rpx;
padding: 30rpx 0 0 20rpx;
padding-bottom: 32rpx;
box-sizing: border-box;
... ... @@ -96,7 +96,8 @@ page {
right: 0;
width: 74%;
height: 100%;
padding: 28rpx 0;
box-sizing: border-box;
.goods_group {
... ... @@ -134,40 +135,58 @@ page {
/* 分类 3级*/
.category {
margin-top: 30rpx;
box-sizing: border-box;
width: 100%;
display: flex;
flex-wrap: wrap;
padding-right: 20rpx;
box-sizing: border-box;
.category_list {
.los_cate {
width: 100%;
display: flex;
// flex: 0 0 auto;
flex-direction: column;
align-items: center;
justify-content: center;
width: 33.33%;
.imgae {
width: 156rpx;
height: 156rpx;
flex-wrap: wrap;
padding-right: 20rpx;
box-sizing: border-box;
.category_list {
display: flex;
// flex: 0 0 auto;
flex-direction: column;
align-items: center;
justify-content: center;
width: 33.33%;
.imgae {
width: 156rpx;
height: 156rpx;
}
.view_text {
display: inline-block;
color: #5B5E63;
font-size: 24rpx;
padding: 20rpx 0;
box-sizing: border-box;
}
&:nth-child(3n + 3) {
margin-right: 0;
}
}
.view_text {
display: inline-block;
color: #5B5E63;
font-size: 24rpx;
padding: 20rpx 0;
box-sizing: border-box;
}
&:nth-child(3n + 3) {
margin-right: 0;
}
}
.bts {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
box-sizing: border-box;
color: #8C9198;
font-size: 28rpx;
}
}
::-webkit-scrollbar {
... ...
<view class="container">
<view class="category_menu">
<scroll-view class="left_menu" scroll-y="true">
<!-- bindtap="itemTap" data-index="{{index}}" data-id="{{item.id}}" -->
<view class="menu_item" wx:for="{{leftCates}}" wx:key="index" wx:for-index="index" wx:for-item="item" bindtap="itemTap" data-id="{{item.id}}">
<view class="menu_item" wx:for="{{leftCates}}" wx:key="index" wx:for-index="index" wx:for-item="item" bindtap="itemTap" data-index="{{index}}" data-id="{{item.id}}">
<view class="fu_item {{index === currentIndex? 'active' :''}}">{{item.name}}</view>
</view>
</scroll-view>
<scroll-view class="right_menu" scroll-y="true" scroll-top="{{scroll_top}}">
<view>
<view class="goods_group" wx:for="{{cateList2}}" wx:for-item="item2" wx:key="*this">
<view class="goods_title">
<!-- <image class="image_title" src="{{imagesUrl}}assets/static/img/1_img@2x.png" /> -->
<view class="color_bg"></view>
<view class="text_title">{{item2.name}}</view>
<view class="color_bg"></view>
</view>
<!-- 三级分类 -->
<view class="category">
<scroll-view class="right_menu" scroll-y="true" scroll-top="{{scroll_top}}" bindscrolltoupper="upper" bindscrolltolower="lower">
<!-- <view> -->
<view class="goods_group" wx:for="{{cateList2}}" wx:for-item="item2" wx:key="index2" wx:for-index="index2">
<view class="goods_title">
<view class="color_bg"></view>
<view class="text_title">{{item2.name}}</view>
<view class="color_bg"></view>
</view>
<!-- 三级分类 -->
<view class="category">
<view class="los_cate">
<view class="category_list" bindtap="cateDetails" data-id='{{item3.id}}' wx:for="{{item2.cate3}}" wx:for-item="item3" wx:key="*this">
<image src="{{item3.img}}" class="imgae"></image>
<view class="view_text">{{item3.name}}</view>
</view>
</view>
<!-- <view class="bts" wx:if="{{top_true}}">上拉继续浏览 {{cateList2[newindex].name}}</view> -->
<view class="bts" wx:if="{{it_tue}}">到底了哦~</view>
</view>
</view>
<!-- </view> -->
</scroll-view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -7,7 +7,7 @@ page {
.container .category_menu {
display: flex;
margin-right: 20rpx;
padding: 30rpx 0 0 20rpx;
padding-bottom: 32rpx;
box-sizing: border-box;
}
.container .category_menu .left_menu {
... ... @@ -72,6 +72,8 @@ page {
right: 0;
width: 74%;
height: 100%;
padding: 28rpx 0;
box-sizing: border-box;
}
.container .category_menu .right_menu .goods_group {
width: 100%;
... ... @@ -103,32 +105,45 @@ page {
.container .category_menu .right_menu .goods_group .category {
margin-top: 30rpx;
width: 100%;
}
.container .category_menu .right_menu .goods_group .category .los_cate {
width: 100%;
display: flex;
flex-wrap: wrap;
padding-right: 20rpx;
box-sizing: border-box;
}
.container .category_menu .right_menu .goods_group .category .category_list {
.container .category_menu .right_menu .goods_group .category .los_cate .category_list {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 33.33%;
}
.container .category_menu .right_menu .goods_group .category .category_list .imgae {
.container .category_menu .right_menu .goods_group .category .los_cate .category_list .imgae {
width: 156rpx;
height: 156rpx;
}
.container .category_menu .right_menu .goods_group .category .category_list .view_text {
.container .category_menu .right_menu .goods_group .category .los_cate .category_list .view_text {
display: inline-block;
color: #5B5E63;
font-size: 24rpx;
padding: 20rpx 0;
box-sizing: border-box;
}
.container .category_menu .right_menu .goods_group .category .category_list:nth-child(3n + 3) {
.container .category_menu .right_menu .goods_group .category .los_cate .category_list:nth-child(3n + 3) {
margin-right: 0;
}
.container .category_menu .right_menu .goods_group .category .bts {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
box-sizing: border-box;
color: #8C9198;
font-size: 28rpx;
}
.container .category_menu .right_menu .goods_group ::-webkit-scrollbar {
width: 0;
height: 0;
... ...
... ... @@ -110,6 +110,7 @@ Page({
tiveCar(e) { // 车牌号
let that = this
let idx = e.currentTarget.dataset.id
let pai = that.data.pai
that.setData({
idx: idx
})
... ... @@ -122,6 +123,9 @@ Page({
}
})
that.hideModal()
if (pai != '') {
that.getRegister()
}
},
getInput(e) { //姓名
console.log(e);
... ... @@ -163,6 +167,74 @@ Page({
// }
// }
},
bindinputed(e) {
let that = this
let carNum = e.detail.value
let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
wx.showToast({
icon: 'none',
title: '请输入正确车牌号',
})
return;
} else {
that.setData({
pai: carNum
})
console.log(that.data.shengItem, "shengItem");
if (sheng_id != '') {
that.getRegister()
}
}
},
async getRegister() { // 注册
let that = this
try {
const {
data
} = await request({
url: 'api/new2/checkPai',
data: {
sheng_id: that.data.sheng_id,
pai: that.data.pai,
}
})
console.log(data, "注册");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
} else {
let msg = data.msg
// a.popTest(msg)
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
})
} else {
}
}
})
}
} catch (err) {
that.setData({
msg: err.msg
})
that.popTest()
}
},
bindTimeChange(e) { // 时间
this.setData({
buy_time2: e.detail.value
... ... @@ -242,7 +314,6 @@ Page({
console.log(err);
}
},
async formSubmit() { // 提交保存
let that = this
console.log(that.data.id);
... ...
... ... @@ -13,7 +13,7 @@
<image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image>
</view>
</view>
<input type="text" placeholder="请输入车牌号" maxlength="10" value="{{pai}}" catchblur="paiInput" placeholder-class="text_car" name="pai" />
<input type="text" placeholder="请输入车牌号" maxlength="10" catchinput="bindinputed" value="{{pai}}" catchblur="paiInput" placeholder-class="text_car" name="pai" />
</view>
<view class="card_logo car">
<view class="labelsItem">车辆品牌:</view>
... ...
... ... @@ -67,7 +67,7 @@ Page({
},
goSearch() {
wx.navigateTo({
url: '/pages/search/search'
url: '/pages/search/search?S4_num=1'
})
},
addLoveCared() { // 去添加车辆
... ... @@ -538,6 +538,50 @@ Page({
that.goLogin()
}
},
gobindChe() {
let that = this
wx.showModal({
title: '提示',
content: that.data.msg,
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
}
}
})
},
onShareAppMessage(options) {
var that = this;
var shareObj = {
title: "汽车互联网4S店",
path: '/pages/home/home',
imageUrl: '',
};
return shareObj;
},
async public() {
let that = this
try {
... ... @@ -595,21 +639,5 @@ Page({
duration: 1300, //停留时间
})
},
gobindChe() {
let that = this
wx.showModal({
title: '提示',
content: that.data.msg,
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
}
}
})
}
})
\ No newline at end of file
... ...
... ... @@ -101,7 +101,7 @@
</view>
<view class="nav_search" bindtap="goSearch">
<image src="{{imagesUrl}}assets/static/img/v-y.png" />
<input type="text" class="nav_sear" placeholder="请输入搜索内容" placeholder-class="input_placeholder" />
<input type="text" class="nav_sear" placeholder="请输入汽车4S店名称" placeholder-class="input_placeholder" />
</view>
<view class="bind_nm">
<view class="bind_box">
... ...
... ... @@ -65,7 +65,7 @@
</view>
<view class="list_count">
<view class="list_title">{{OrderObligation.shop}}</view>
<view class="list" wx:for="{{ConfirmAnOrder}}" wx:key="id">
<view class="list" wx:for="{{ConfirmAnOrder}}" wx:key="id" bindtap="godetails" data-id="{{item.id}}">
<view class="left_imgs">
<image src="{{item.img}}" />
</view>
... ...
... ... @@ -214,6 +214,7 @@ Page({
tiveCar(e) { // 车牌号
let that = this
let idx = e.currentTarget.dataset.id
let pai = that.data.pai
that.setData({
idx: idx
})
... ... @@ -227,6 +228,9 @@ Page({
}
})
that.hideModal()
if (pai != '') {
that.getRegister()
}
},
async getShengSu() { // 默认省份
let that = this
... ... @@ -253,6 +257,73 @@ Page({
}
},
bindinputed(e) {
let that = this
let carNum = e.detail.value
let sheng_id = that.data.sheng_id
let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/
const careg = reg.test(carNum);
if (!careg) {
wx.showToast({
icon: 'none',
title: '请输入正确车牌号',
})
return;
} else {
that.setData({
pai: carNum
})
console.log(that.data.shengItem, "shengItem");
if (sheng_id != '') {
that.getRegister()
}
}
},
async getRegister() { // 注册
let that = this
try {
const {
data
} = await request({
url: 'api/new2/checkPai',
data: {
sheng_id: that.data.sheng_id,
pai: that.data.pai,
}
})
console.log(data, "注册");
if (data.code == 1) {
let msg = data.msg
a.popSuccessTest(msg)
} else {
let msg = data.msg
// a.popTest(msg)
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
})
} else {
}
}
})
}
} catch (err) {
that.setData({
msg: err.msg
})
that.popTest()
}
},
formSubmit(e) { // 保存时
let that = this
let obj = {}
... ...
... ... @@ -26,7 +26,7 @@
<image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image>
</view>
</view>
<input maxlength="10" type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchblur="paiInput" />
<input maxlength="10" type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchinput="bindinputed" catchblur="paiInput" />
</view>
<view class="card_logo car">
<label for="车辆品牌" style="width:260rpx">车辆品牌:</label>
... ...
... ... @@ -15,34 +15,30 @@ Page({
msg: '',
content: '',
page: 1,
searchValue: ''
searchValue: '',
S4_num: '',
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this
let token = wx.getStorageSync('token')
// wx.showToast({
// title: '加载中',
// icon: "loading",
// duration: 2000,
// mask: false
// })
setTimeout(() => {
if (token) {
this.getList()
that.getList()
} else {
that.setData({
content: "您尚未登录,请登录后操作"
})
this.popConfirm()
that.popConfirm()
}
}, 1300);
},
onLoad: function (options) {},
onLoad: function (options) {
console.log(options);
this.setData({
S4_num: options.S4_num || ''
})
},
openHistorySearch() {
this.setData({
searchRecord: wx.getStorageSync('searchRecord') || []
... ... @@ -65,7 +61,7 @@ Page({
that.popMaskTest()
setTimeout(() => {
that.getList()
}, 1700);
}, 1000);
} catch (err) {
console.log(err);
... ... @@ -89,9 +85,16 @@ Page({
async searchInput() {
let that = this;
if (that.data.searchValue != '') {
wx.navigateTo({
url: '/pages/searchList/searchList?kw=' + that.data.searchValue + '&change=1'
})
if (that.data.S4_num == 1) {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList?kw=' + that.data.searchValue
})
} else {
wx.navigateTo({
url: '/pages/searchList/searchList?kw=' + that.data.searchValue + '&change=1'
})
}
that.setData({
page: 1,
list: [],
... ... @@ -135,13 +138,8 @@ Page({
searchRecord: searchRecord,
searchValue: ''
})
// console.log(that.data.searchRecord);
//将历史记录数组整体储存到缓存中
wx.setStorageSync('searchRecord', searchRecord)
// wx.navigateTo({
// url: '/pages/searchList/searchList?kw=' + inputVal
// })
const {
data: {
data
... ... @@ -173,7 +171,7 @@ Page({
popMaskTest() {
wx.showToast({
title: this.data.msg,
duration: 2000,
duration: 1300,
icon: 'none',
mask: true //是否有透明蒙层,默认为false
//如果有透明蒙层,弹窗的期间不能点击文档内容
... ... @@ -181,13 +179,20 @@ Page({
},
// 点击搜索历史进行搜索
async toSearch(e) {
toSearch(e) {
let that = this;
console.log(e);
let kw = e.currentTarget.dataset.value
wx.navigateTo({
url: '/pages/searchList/searchList?kw=' + kw + '&change=1'
})
if (that.data.S4_num == 1) {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList?kw=' + kw
})
} else {
wx.navigateTo({
url: '/pages/searchList/searchList?kw=' + kw + '&change=1'
})
}
that.setData({
searchValue: ''
})
... ... @@ -199,13 +204,11 @@ Page({
url: 'api/shop/souLog',
})
.then(res => {
if (res.data.data.length > 0) {
that.setData({
searchRecord: res.data.data
})
console.log(this.data.searchRecord, res.data.data,
"搜索")
console.log(this.data.searchRecord, res.data.data, "搜索")
} else {
that.setData({
msg: '暂无搜索记录'
... ... @@ -214,13 +217,17 @@ Page({
}
}).catch(err => {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
})
},
popTest() {
wx.showToast({
title: this.data.msg,
icon: 'none', //如果要纯文本,不要icon,将值设为'none'
duration: 2000
duration: 1300
})
},
popConfirm() {
... ...
... ... @@ -28,6 +28,7 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"useCompilerModule": false,
"userConfirmedUseCompilerModuleSwitch": false,
... ... @@ -152,6 +153,17 @@
"pathName": "pages/productdetailsImg/productdetailsImg",
"query": "type=1&id=63",
"scene": null
},
{
"name": "pages/MyGarageNoCar/MyGarageNoCar",
"pathName": "pages/MyGarageNoCar/MyGarageNoCar",
"query": "",
"scene": null
},
{
"name": "pages/center/index",
"pathName": "pages/center/index",
"scene": null
}
]
}
... ...