作者 李芳银

修改了全部车型

正在显示 58 个修改的文件 包含 3025 行增加646 行删除

要显示太多修改。

为保证性能只显示 58 of 58+ 个文件。

... ... @@ -100,6 +100,48 @@ App({
mask: true
})
},
checkLogin() {
wx.showModal({
title: '提示',
content: '您尚未登录,请登录后操作',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization'
})
} else {
console.log('点击取消回调')
}
}
})
},
setPhone(mobile) {
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/;
if (mobile == '') {
wx.showToast({
title: '手机号不能为空',
icon: 'none',
duration: 1000,
})
return false;
} else if (mobile.length != 11) {
wx.showToast({
title: '手机号长度有误!',
icon: 'none',
duration: 1000,
})
return false;
}
if (!myreg.test(mobile)) {
wx.showToast({
title: '手机号有误!',
icon: 'none',
duration: 1000,
})
return false;
}
return mobile
},
globalData: {
userInfo: null,
... ...
... ... @@ -111,7 +111,8 @@
"pages/VSpikeMallDetail/VSpikeMallDetail",
"pages/VSpikeMall/VSpikeMall",
"pages/VtuanOrderDetail/VtuanOrderDetail",
"pages/Vnew4Sstore/Vnew4Sstore"
"pages/Vnew4Sstore/Vnew4Sstore",
"pages/carDetails/carDetails"
],
"window": {
"backgroundTextStyle": "dark",
... ...
... ... @@ -32,6 +32,12 @@ page {
font-size: 24rpx;
}
button::after {
border: 0 none !important;
}
/**
去除横向滚动条
*/
... ...
... ... @@ -26,7 +26,10 @@ Page({
it_cloose: false,
showItem: false,
s4_id: '',
hotModel: [],
},
// 同 VehicleList 是一个页面
onLoad: function (options) {
console.log(options);
},
... ... @@ -66,6 +69,7 @@ Page({
that.getHotModels()
that.getgood3List()
that.getProducts()
that.getNewcar()
}, 100);
... ... @@ -177,6 +181,30 @@ Page({
}
},
async getNewcar() { // 获取热销车型
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/shop4s2/cheGood',
data: {
s4_id: that.data.s4_id
}
})
console.log(data);
that.setData({
hotModel: data,
})
} catch (err) {
console.log(err, "出错了");
a.popTest(err.msg)
}
},
async getProducts() { // 获取配件商品
let that = this
try {
... ... @@ -271,6 +299,12 @@ Page({
url: '/pages/MyGarage/MyGarage?tdTap=2'
})
},
goCarDetails(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + id
})
},
goSearch() {
wx.navigateTo({
url: '/pages/search/search'
... ... @@ -283,6 +317,23 @@ Page({
url: '/pages/Vnewslist/Vnewslist?s4_id=' + s4_id
})
},
allche() {
let that = this
let token = wx.getStorageSync("token")
let decorations = that.data.decorations
let s4_id = decorations.id
console.log(s4_id);
if (token) {
wx.navigateTo({
url: '/pages/VehicleList/VehicleList?id=' + s4_id
})
} else {
this.setData({
msg: '请登录后操作'
})
this.popTest()
}
},
hotProducts() { //热销车型
let that = this
let token = wx.getStorageSync("token")
... ... @@ -293,6 +344,7 @@ Page({
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id=' + s4_id
})
} else {
this.setData({
msg: '请登录后操作'
... ...
... ... @@ -36,15 +36,13 @@ page {
.btd {
width: 100%;
height: 380rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
.searchbox {
width: 100%;
// padding: 0 32rpx;
// box-sizing: border-box;
.searchinput {
width: 100%;
... ... @@ -372,7 +370,7 @@ page {
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
height: 30rpx;
background: #E8370F;
border-radius: 4rpx;
... ... @@ -429,9 +427,9 @@ page {
&::after {
content: '';
position: absolute;
top: 32rpx;
top: 36rpx;
left: 0;
width: 4rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
... ... @@ -497,57 +495,9 @@ page {
.rt_box {
width: 50%;
// border-radius: 24rpx;
// box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(70, 18, 5, 0.08);
// padding: 20rpx 0;
// box-sizing: border-box;
.ry_top {
// width: 100%;
// padding: 30rpx 10rpx;
// box-sizing: border-box;
// background: #ffffff;
border-radius: 24rpx;
// box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(70, 18, 5, 0.08);
// .time_set {
// width: 100%;
// padding: 0 20rpx;
// box-sizing: border-box;
// display: flex;
// align-items: center;
// .set_name {
// flex: 1;
// font-size: 24rpx;
// color: #06121F;
// }
// // .time_is {
// // display: flex;
// // align-items: center;
// // justify-content: center;
// // width: 120rpx;
// // .item {
// // display: inline-block;
// // width: 32rpx;
// // height: 32rpx;
// // margin-right: 10rpx;
// // color: #fff;
// // font-size: 20rpx;
// // text-align: center;
// // background-color: #E8370F;
// // border-radius: 4rpx;
// // line-height: 32rpx;
// // &:last-child {
// // margin: 0;
// // }
// // }
// // }
// }
.set_ti {
width: 100%;
... ... @@ -627,33 +577,9 @@ page {
padding: 0 32rpx;
box-sizing: border-box;
// .stores_name {
// font-size: 32rpx;
// font-family: PingFang SC,
// PingFang SC-Medium;
// font-weight: 600;
// text-align: left;
// color: #06121f;
// position: relative;
// width: 100%;
// padding: 28rpx 0 28rpx 16rpx;
// box-sizing: border-box;
// &::after {
// content: '';
// position: absolute;
// top: 32rpx;
// left: 0;
// width: 4rpx;
// height: 30rpx;
// background-color: #E8370F;
// border-radius: 4rpx;
// }
// }
.love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 0rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -673,10 +599,10 @@ page {
&::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -775,18 +701,83 @@ page {
}
}
}
.new_car {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.nv_item {
width: 48%;
padding: 0 0 20rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
image {
width: 100%;
height: 280rpx;
flex-shrink: 0;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.big_titles {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #323233;
font-weight: 600;
}
.pri_box {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
.store_price {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 24rpx;
color: #E8370F;
font-weight: 600;
}
.pt_price {
font-size: 32rpx;
color: #E8370F;
font-weight: 600;
}
}
}
&:nth-child(2n+1) {
margin-right: 24rpx;
}
&:nth-child(2n+2) {
margin-right: 0;
}
}
}
}
.car_love,
.armature_love {
width: 100%;
padding: 0 32rpx;
padding: 0 18rpx;
box-sizing: border-box;
margin-top: 20rpx;
.love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -806,10 +797,10 @@ page {
&::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -1189,14 +1180,26 @@ page {
}
.btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
.slj {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
padding: 0;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -74,7 +74,8 @@
</view>
</view>
<view class="cate">
<view class="scroll_1 catePublic" bindtap="hotProducts">
<view class="scroll_1 catePublic" bindtap="allche">
<!-- <view class="scroll_1 catePublic" bindtap="hotProducts"> -->
<image src="{{imagesUrl}}assets/static/img/ress_d.png" class="publicImg" />
<view class="cate_1 cate_public">全部车型</view>
</view>
... ... @@ -113,69 +114,36 @@
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" bindtap="hotProducts" data-tir="0">
<!-- <view class="car_name">BMW 1系三厢运动</view>
<view class="car_name_price">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">9.80</view>
</view>
</view>
<view class="car_down_img">
<image class="" src="{{imagesUrl}}assets/static/img/v-t.png" />
</view> -->
<image src="{{goodDetal.img1}}" />
</view>
<view class="rt_box">
<view class="ry_top" bindtap="hotProducts" data-tir="1">
<!-- <view class="set_ti">
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
<view class="ti_text">BMW 1系三厢运动</view>
</view> -->
<image src="{{goodDetal.img2}}" />
</view>
<view class="ry_down" bindtap="hotProducts" data-tir="2">
<!-- <view class="set_ti">
<view class="ti_text">BMW 1系三厢运动</view>
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
</view> -->
<image src="{{goodDetal.img3}}" />
</view>
</view>
</view>
</view>
<view class="hot_stores " wx:if="{{hotModels.length !=0}}">
<view class="hot_stores " wx:if="{{hotModel.length !=0}}">
<view class="love_car">
<view class="car_name">热销车型</view>
<!-- <view class="car_more" bindtap="hotProducts">查看更多 ></view> -->
</view>
<block wx:for="{{hotModels}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="list_" bindtap="goToPay" data-id="{{item.id}}">
<view class="list_store">
<view class="store_content">
<view class="item_name title_content2">{{item.name}}</view>
</view>
<view class="store_price">{{item.begin}}万起</view>
<view class="store_guide_price">
<view class="item_suggest">厂商指导价:</view>
<view class="item_suggest">{{item.suggest}}万元</view>
<view class="imgs_downArrow">
<image src="{{imagesUrl}}assets/static/img/downArrow.png" class="imgs_down" />
<view class="item_you">{{item.you}}万</view>
<view class="new_car">
<block wx:for="{{hotModel}}" wx:key="index" wx:for-index="index" wx:for-item="item" wx:if="{{index < 4}}">
<view class="nv_item" bindtap="goCarDetails" data-id="{{item.id}}">
<image src="{{item.img}}" />
<view class="big_titles title_content2">{{item.name}}</view>
<view class="pri_box">
<view class="store_price">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item.begin_price}}万起</view>
</view>
</view>
</view>
<view class="change">
<button type="default" catchtap="bindMakePhone" data-phone="{{item.phone}}" class="btn_1 btn_3">
获取底价
</button>
<button class="btn_1 btn_2" plain catchtap="goToPay" data-id="{{item.id}}">立即购买</button>
</view>
</view>
</block>
</block>
</view>
</view>
<view class="armature_love" wx:if="{{products.length!=0}}">
<view class="love_car">
... ... @@ -232,7 +200,9 @@
<view class="text_title">您尚未关联4S店,无法获取您的保养/维修信息</view>
<view class="text_title">请您绑定常去的4S店</view>
</view>
<button class="btn" bindtap="noBinding4S">绑定4S店</button>
<view class="slj">
<button class="btn" bindtap="noBinding4S">绑定4S店</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -30,7 +30,7 @@ page {
.container .health .btd {
width: 100%;
height: 380rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ... @@ -298,7 +298,7 @@ page {
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
height: 30rpx;
background: #E8370F;
border-radius: 4rpx;
}
... ... @@ -340,9 +340,9 @@ page {
.container .health .week_hot .star_name::after {
content: '';
position: absolute;
top: 32rpx;
top: 36rpx;
left: 0;
width: 4rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
... ... @@ -459,7 +459,7 @@ page {
}
.container .health .hot_stores .love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 0rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -478,10 +478,10 @@ page {
.container .health .hot_stores .love_car .car_name::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -562,17 +562,71 @@ page {
border: 2rpx solid #E8370F;
color: #E8370F;
}
.container .health .hot_stores .new_car {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.container .health .hot_stores .new_car .nv_item {
width: 48%;
padding: 0 0 20rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
}
.container .health .hot_stores .new_car .nv_item image {
width: 100%;
height: 280rpx;
flex-shrink: 0;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.container .health .hot_stores .new_car .nv_item .big_titles {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #323233;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item .pri_box {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price {
display: flex;
align-items: baseline;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price .pt_icon {
font-size: 24rpx;
color: #E8370F;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price .pt_price {
font-size: 32rpx;
color: #E8370F;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item:nth-child(2n+1) {
margin-right: 24rpx;
}
.container .health .hot_stores .new_car .nv_item:nth-child(2n+2) {
margin-right: 0;
}
.container .health .car_love,
.container .health .armature_love {
width: 100%;
padding: 0 32rpx;
padding: 0 18rpx;
box-sizing: border-box;
margin-top: 20rpx;
}
.container .health .car_love .love_car,
.container .health .armature_love .love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -593,10 +647,10 @@ page {
.container .health .armature_love .love_car .car_name::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -942,10 +996,21 @@ page {
line-height: 60rpx;
color: #3D444C;
}
.container .noBinding .s_empty .btn {
.container .noBinding .s_empty .slj {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.container .noBinding .s_empty .slj .btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
padding: 0;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
}
... ...
... ... @@ -350,7 +350,6 @@ Page({
title: "车唛分享", // 默认是小程序的名称(可以写slogan等)
path: '/pages/RecommendCar/RecommendCar', // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
};
// 返回shareObj
return shareObj;
... ...
... ... @@ -29,14 +29,17 @@ Page({
that.setData({
id: options.id,
})
that.getMyorder()
},
onChange(e) {
let that = this
this.setData({
timeData: e.detail,
});
},
onShow: function () {},
onShow: function () {
this.getMyorder()
},
goback() {
wx.navigateBack()
},
... ... @@ -58,7 +61,7 @@ Page({
that.setData({
detailsContent: data,
content: data.content,
time: data.sheng_time,
time: data.sheng_time * 1000,
})
console.log(that.data.detailsContent, "列表");
WxParse.wxParse('content', 'html', that.data.content, that, 5);
... ...
... ... @@ -830,33 +830,38 @@ page {
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
.si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn {
height: 100rpx;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
}
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -65,7 +65,8 @@
<view class="let_ith">
<view class="let_bane">活动时间:</view>
<view class="timer">
<van-count-down use-slot time="{{ time }}" bindchange="onChange">
<!-- -->
<van-count-down use-slot time="{{ time }}" bindchange="onChange" data-time="{{time}}">
<view class="time_is">
<view class="item0">仅剩</view>
<view class="item">{{ timeData.days }}</view>
... ... @@ -224,10 +225,16 @@
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</button> -->
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
... ...
... ... @@ -657,9 +657,14 @@ page {
padding: 20rpx 0;
background-color: #fff;
}
.container .health .phoneshou .downbtn .btn {
.container .health .phoneshou .downbtn .si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.container .health .phoneshou .downbtn .si_box .btn {
height: 100rpx;
width: 90%;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
... ... @@ -670,12 +675,12 @@ page {
justify-content: center;
border-radius: 50rpx;
}
.container .health .phoneshou .downbtn .btn image {
.container .health .phoneshou .downbtn .si_box .btn image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .health .phoneshou .downbtn .btn1 {
.container .health .phoneshou .downbtn .si_box .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -60,7 +60,7 @@ Page({
goToPay(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/confirmStoreOrder/confirmStoreOrder?id=' + id
url: '/pages/confirmStoreOrder/confirmStoreOrder?id=' + id + '&goto==2'
})
}
})
\ No newline at end of file
... ...
... ... @@ -26,11 +26,12 @@ Page({
that.setData({
kw: options.kw,
})
that.getmoreList()
},
onShow: function () {
let that = this
console.log(this.data.city_id);
that.getmoreList()
},
goback() {
wx.navigateBack()
... ...
... ... @@ -36,6 +36,9 @@ Page({
},
goVapplicationList() {
let che_id = this.data.id
this.setData({
shen_id: 0
})
wx.navigateTo({
url: '/pages/VapplicationList/VapplicationList?che_id=' + che_id
})
... ...
... ... @@ -26,7 +26,10 @@ Page({
it_cloose: false,
showItem: false,
s4_id: '',
hotModel: [],
},
// 同 4Sstore 页面相同
onLoad: function (options) {
let that = this
let s4_id = options.s4_id
... ... @@ -34,18 +37,7 @@ Page({
that.setData({
s4_id
})
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
onShow: function () {
let that = this
that.setData({
// s4_id,
products: [],
decorations: [],
kefu: [],
... ... @@ -55,11 +47,23 @@ Page({
page: 1
})
console.log(that.data.s4_id);
that.getNewcar()
that.getDecorations()
that.getHotActivity()
that.getHotModels()
that.getgood3List()
that.getProducts()
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
onShow: function () {
},
gohomepage() {
wx.switchTab({
... ... @@ -89,6 +93,36 @@ Page({
url: '/pages/my4S/my4S'
})
},
async getNewcar() { // 获取热销车型
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/shop4s2/cheGood',
data: {
s4_id: that.data.s4_id
}
})
console.log(data);
that.setData({
hotModel: data,
})
} catch (err) {
console.log(err, "出错了");
a.popTest(err.msg)
}
},
goCarDetails(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + id
})
},
async clickAttention() { // 点击关注
let that = this
let decorations = that.data.decorations
... ... @@ -294,6 +328,23 @@ Page({
url: '/pages/Vnewslist/Vnewslist?s4_id=' + s4_id
})
},
allche() {
let that = this
let token = wx.getStorageSync("token")
let decorations = that.data.decorations
let s4_id = decorations.id
console.log(s4_id);
if (token) {
wx.navigateTo({
url: '/pages/VehicleList/VehicleList?id=' + s4_id
})
} else {
this.setData({
msg: '请登录后操作'
})
this.popTest()
}
},
hotProducts() { //热销车型
let that = this
let token = wx.getStorageSync("token")
... ... @@ -304,6 +355,7 @@ Page({
wx.navigateTo({
url: '/pages/VSpikeMall/VSpikeMall?id=' + s4_id
})
} else {
this.setData({
msg: '请登录后操作'
... ...
... ... @@ -38,7 +38,7 @@ page {
.btd {
width: 100%;
height: 380rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ... @@ -374,7 +374,7 @@ page {
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
height: 30rpx;
background: #E8370F;
border-radius: 4rpx;
... ... @@ -431,9 +431,9 @@ page {
&::after {
content: '';
position: absolute;
top: 32rpx;
top: 34rpx;
left: 0;
width: 4rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
... ... @@ -629,33 +629,9 @@ page {
padding: 0 32rpx;
box-sizing: border-box;
// .stores_name {
// font-size: 32rpx;
// font-family: PingFang SC,
// PingFang SC-Medium;
// font-weight: 600;
// text-align: left;
// color: #06121f;
// position: relative;
// width: 100%;
// padding: 28rpx 0 28rpx 16rpx;
// box-sizing: border-box;
// &::after {
// content: '';
// position: absolute;
// top: 32rpx;
// left: 0;
// width: 4rpx;
// height: 30rpx;
// background-color: #E8370F;
// border-radius: 4rpx;
// }
// }
.love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 0rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -675,10 +651,10 @@ page {
&::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -777,18 +753,83 @@ page {
}
}
}
.new_car {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.nv_item {
width: 48%;
padding: 0 0 20rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
image {
width: 100%;
height: 280rpx;
flex-shrink: 0;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.big_titles {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #323233;
font-weight: 600;
}
.pri_box {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
.store_price {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 24rpx;
color: #E8370F;
font-weight: 600;
}
.pt_price {
font-size: 32rpx;
color: #E8370F;
font-weight: 600;
}
}
}
&:nth-child(2n+1) {
margin-right: 24rpx;
}
&:nth-child(2n+2) {
margin-right: 0;
}
}
}
}
.car_love,
.armature_love {
width: 100%;
padding: 0 32rpx;
padding: 0 18rpx;
box-sizing: border-box;
margin-top: 20rpx;
.love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -808,10 +849,10 @@ page {
&::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -1186,17 +1227,26 @@ page {
color: #3D444C;
}
}
.btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
.slj {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
padding: 0;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
}
}
}
... ...
... ... @@ -74,7 +74,8 @@
</view>
</view>
<view class="cate">
<view class="scroll_1 catePublic" bindtap="hotProducts">
<view class="scroll_1 catePublic" bindtap="allche">
<!-- <view class="scroll_1 catePublic" bindtap="hotProducts"> -->
<image src="{{imagesUrl}}assets/static/img/ress_d.png" class="publicImg" />
<view class="cate_1 cate_public">全部车型</view>
</view>
... ... @@ -113,69 +114,36 @@
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" bindtap="hotProducts" data-tir="0">
<!-- <view class="car_name">BMW 1系三厢运动</view>
<view class="car_name_price">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">9.80</view>
</view>
</view>
<view class="car_down_img">
<image class="" src="{{imagesUrl}}assets/static/img/v-t.png" />
</view> -->
<image src="{{goodDetal.img1}}" />
</view>
<view class="rt_box">
<view class="ry_top" bindtap="hotProducts" data-tir="1">
<!-- <view class="set_ti">
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
<view class="ti_text">BMW 1系三厢运动</view>
</view> -->
<image src="{{goodDetal.img2}}" />
</view>
<view class="ry_down" bindtap="hotProducts" data-tir="2">
<!-- <view class="set_ti">
<view class="ti_text">BMW 1系三厢运动</view>
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
</view> -->
<image src="{{goodDetal.img3}}" />
</view>
</view>
</view>
</view>
<view class="hot_stores " wx:if="{{hotModels.length !=0}}">
<view class="hot_stores " wx:if="{{hotModel.length !=0}}">
<view class="love_car">
<view class="car_name">热销车型</view>
<!-- <view class="car_more" bindtap="hotProducts">查看更多 ></view> -->
</view>
<block wx:for="{{hotModels}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="list_" bindtap="goToPay" data-id="{{item.id}}">
<view class="list_store">
<view class="store_content">
<view class="item_name title_content2">{{item.name}}</view>
</view>
<view class="store_price">{{item.begin}}万起</view>
<view class="store_guide_price">
<view class="item_suggest">厂商指导价:</view>
<view class="item_suggest">{{item.suggest}}万元</view>
<view class="imgs_downArrow">
<image src="{{imagesUrl}}assets/static/img/downArrow.png" class="imgs_down" />
<view class="item_you">{{item.you}}万</view>
<view class="new_car">
<block wx:for="{{hotModel}}" wx:key="index" wx:for-index="index" wx:for-item="item" wx:if="{{index < 4}}">
<view class="nv_item" bindtap="goCarDetails" data-id="{{item.id}}">
<image src="{{item.img}}" />
<view class="big_titles title_content2">{{item.name}}</view>
<view class="pri_box">
<view class="store_price">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item.begin_price}}万起</view>
</view>
</view>
</view>
<view class="change">
<button type="default" catchtap="bindMakePhone" data-phone="{{item.phone}}" class="btn_1 btn_3">
获取底价
</button>
<button class="btn_1 btn_2" plain catchtap="goToPay" data-id="{{item.id}}">立即购买</button>
</view>
</view>
</block>
</block>
</view>
</view>
<view class="armature_love" wx:if="{{products.length!=0}}">
<view class="love_car">
... ... @@ -232,7 +200,9 @@
<view class="text_title">您尚未关联4S店,无法获取您的保养/维修信息</view>
<view class="text_title">请您绑定常去的4S店</view>
</view>
<button class="btn" bindtap="noBinding4S">绑定4S店</button>
<view class="slj">
<button class="btn" bindtap="noBinding4S">绑定4S店</button>
</view>
</view>
</view>
<view class="lt_4s_lite">
... ...
... ... @@ -32,7 +32,7 @@ page {
.container .health .btd {
width: 100%;
height: 380rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ... @@ -300,7 +300,7 @@ page {
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
height: 30rpx;
background: #E8370F;
border-radius: 4rpx;
}
... ... @@ -342,9 +342,9 @@ page {
.container .health .week_hot .star_name::after {
content: '';
position: absolute;
top: 32rpx;
top: 34rpx;
left: 0;
width: 4rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
... ... @@ -461,7 +461,7 @@ page {
}
.container .health .hot_stores .love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 0rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -480,10 +480,10 @@ page {
.container .health .hot_stores .love_car .car_name::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -564,17 +564,71 @@ page {
border: 2rpx solid #E8370F;
color: #E8370F;
}
.container .health .hot_stores .new_car {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.container .health .hot_stores .new_car .nv_item {
width: 48%;
padding: 0 0 20rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
}
.container .health .hot_stores .new_car .nv_item image {
width: 100%;
height: 280rpx;
flex-shrink: 0;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.container .health .hot_stores .new_car .nv_item .big_titles {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #323233;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item .pri_box {
width: 100%;
padding: 5rpx 10rpx;
box-sizing: border-box;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price {
display: flex;
align-items: baseline;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price .pt_icon {
font-size: 24rpx;
color: #E8370F;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item .pri_box .store_price .pt_price {
font-size: 32rpx;
color: #E8370F;
font-weight: 600;
}
.container .health .hot_stores .new_car .nv_item:nth-child(2n+1) {
margin-right: 24rpx;
}
.container .health .hot_stores .new_car .nv_item:nth-child(2n+2) {
margin-right: 0;
}
.container .health .car_love,
.container .health .armature_love {
width: 100%;
padding: 0 32rpx;
padding: 0 18rpx;
box-sizing: border-box;
margin-top: 20rpx;
}
.container .health .car_love .love_car,
.container .health .armature_love .love_car {
width: 100%;
padding: 32rpx 0;
padding: 32rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
... ... @@ -595,10 +649,10 @@ page {
.container .health .armature_love .love_car .car_name::after {
content: '';
position: absolute;
top: 4rpx;
top: 8rpx;
left: 0;
width: 4rpx;
height: 32rpx;
width: 6rpx;
height: 30rpx;
background-color: #E8370F;
border-radius: 4rpx;
}
... ... @@ -944,12 +998,23 @@ page {
line-height: 60rpx;
color: #3D444C;
}
.container .noBinding .s_empty .btn {
.container .noBinding .s_empty .slj {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.container .noBinding .s_empty .slj .btn {
color: #fff;
background-color: #E8370F;
width: 378rpx;
height: 88rpx;
margin: 50rpx auto;
padding: 0;
font-weight: 400;
display: flex;
align-items: center;
justify-content: center;
}
.container .lt_4s_lite {
width: 100%;
... ...
... ... @@ -44,7 +44,7 @@
</view>
<view class="pin_list">
<block wx:for="{{tuan_data}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="pin_box_a">
<view class="pin_box_a" wx:if="{{item.sheng_time*1000 != 0}}">
<view class="lef_pin_a">
<view class="image_list_a">
<block wx:for="{{item.img_arr}}" wx:for-index="index1" wx:key="index1" wx:for-item="item1">
... ... @@ -65,7 +65,7 @@
</view>
<view class="out_time_a">
<view class="time_name_a">剩余</view>
<van-count-down millisecond format="HH:mm:ss" time="{{ item.sheng_time }}" bindchange="onChange" />
<van-count-down millisecond format="HH:mm:ss" time="{{ item.sheng_time*1000 }}" bindchange="onChange" />
</view>
</view>
<view class="go_ping_a" wx:if="{{share==1}}" data-onclick="0" catchtap="onclickitem" data-tuan_id="{{item.id}}" data-id="{{tuanDetail.goods_id}}">
... ...
... ... @@ -41,7 +41,7 @@
<view class="pay_time_per">
<view class="surplus_times" wx:if="{{item.way3 == 3 }}">
<view class="buy_tims">剩余时间:</view>
<van-count-down millisecond format="HH:mm:ss" time="{{ item.share_time }}" />
<van-count-down millisecond format="HH:mm:ss" time="{{ item.share_time*1000 }}" />
</view>
<view class="pay_per" wx:if="{{item.way3 == 3 }}">
<view class="per_a">剩余</view>
... ...
... ... @@ -119,28 +119,24 @@ Page({
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)
// a.popTest(msg)
console.log(err);
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
} else {
}
}
})
}
... ...
... ... @@ -116,30 +116,21 @@ Page({
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({
}
})
} catch (err) {
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
} else {
}
}
})
}
} else {
} catch (err) {
that.setData({
msg: err.msg
}
}
})
that.popTest()
}
},
... ...
... ... @@ -48,6 +48,7 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
that.showModal();
}
}).catch(err => {
... ...
... ... @@ -125,24 +125,29 @@ page {
bottom: 0;
left: 0;
background-color: #fff;
padding: 0 32rpx;
box-sizing: border-box;
.btn {
width: 686rpx;
height: 88rpx;
margin: 10rpx 0 28rpx;
line-height: 88rpx;
padding: 0;
font-weight: 400;
font-size: 28rpx;
background-color: #E8370F;
color: #fff;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
.dow_click {
width: 100%;
padding: 20rpx 32rpx;
box-sizing: border-box;
.btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
padding: 0;
font-weight: 400;
font-size: 28rpx;
background-color: #E8370F;
color: #fff;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
}
... ...
... ... @@ -6,7 +6,6 @@
<view class="title_name">获得你的公开信息(昵称、头像等)</view>
<view class="bu">
<button class="btn" open-type='getUserInfo' bindgetuserinfo="bindGetUserInfo">立即授权</button>
<!-- <button class="btn_ btn" bindtap="noBinding4S">暂不授权</button> -->
</view>
<!-- 屏幕背景变暗的背景 -->
<view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view>
... ... @@ -16,10 +15,11 @@
<view class="phone_title">请先授权手机号</view>
<view class="tips_content">为了更好的为你提供服务,请允许手机号授权</view>
<view class="downbtn">
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
手机号授权
</button>
<!-- <button class="btn btn1" bindtap="hideModal">暂不授权</button> -->
<view class="dow_click">
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
手机号授权
</button>
</view>
</view>
</view>
</view>
... ...
... ... @@ -108,13 +108,15 @@ page {
bottom: 0;
left: 0;
background-color: #fff;
padding: 0 32rpx;
}
.container .commodity_attr_box .phoneshou .downbtn .dow_click {
width: 100%;
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .phoneshou .downbtn .btn {
width: 686rpx;
.container .commodity_attr_box .phoneshou .downbtn .dow_click .btn {
width: 100%;
height: 88rpx;
margin: 10rpx 0 28rpx;
line-height: 88rpx;
padding: 0;
font-weight: 400;
... ... @@ -122,7 +124,7 @@ page {
background-color: #E8370F;
color: #fff;
}
.container .commodity_attr_box .phoneshou .downbtn .btn1 {
.container .commodity_attr_box .phoneshou .downbtn .dow_click .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
import {
request
} from "../../request/index.js"
const a = getApp()
var WxParse = require('../../wxParse/wxParse.js');
Page({
data: {
imagesUrl: a.globalData.baseUrl,
detailsContent: [],
id: '',
gui_arr: [], //规格ID数组;如[53,40];单规格商品不用传
goods_id: '',
gui: [], // 规格商品选择
_num: 1,
content: '',
msg: '',
changedShop: [], // 购买时的规格列表
jiaOrPay: '购买',
num: 1,
changed: true, // 规格显示
show: false,
addshow: false,
currentItemText: '',
type: 3,
pingList: [],
s4_id: '',
fx_user: '',
showDialog: false,
},
onLoad: function (options) {
let that = this
console.log(options);
let token = wx.getStorageSync('token')
if (!options.scene) {
that.setData({
id: options.id,
})
} else {
that.setData({
id: options.id,
})
}
if (token) {
that.getDetailsContent()
that.getPingList()
} else {
that.getToken()
}
},
onShow: function () {
},
goConfirm(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/confirmStoreOrder/confirmStoreOrder?id=' + id + '&goto=1'
})
},
previewImage: function (e) {
var current = e.target.dataset.src;
var imgList = e.target.dataset.list
//图片预览
wx.previewImage({
current: current, // 当前显示图片的http链接
urls: imgList // 需要预览的图片http链接列表
})
},
bindMakePhone(e) {
console.log(e);
let phone = e.currentTarget.dataset.phone
wx.makePhoneCall({
phoneNumber: phone
})
},
async getDetailsContent() {
let that = this;
const {
data: {
data
}
} = await request({
url: 'api/shop4s2/cheDetail',
data: {
id: that.data.id,
},
})
console.log(data);
that.setData({
s4_id: data.s4_id,
detailsContent: data,
content: data.content,
})
WxParse.wxParse('content', 'html', that.data.content, that, 5);
},
changeTitle(e) { // 详情 评价 切换
let that = this
that.setData({
_num: e.currentTarget.dataset.num
})
},
async getPingList() { // 获取评价
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/ping/pingList',
data: {
type: that.data.type,
id: that.data.id
}
})
that.setData({
pingList: data
})
console.log(data, "获取评价");
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popMaskTest()
}
},
clickme(e) { //立即购买 弹窗妞
let that = this
that.setData({
show: true,
addshow: false,
id: e.currentTarget.dataset.id
})
this.showModal();
request({
method: 'get',
url: 'api/shop4s/peiDetail',
data: {
id: that.data.id
}
}).then(res => {
let arryNew = []
that.setData({
changedShop: res.data.data,
gui: arryNew
})
}).catch(err => {
console.log(err);
that.setData({
msg: err.msg
})
that.popMaskTest()
})
},
countMinus() { // 商品数量减
let that = this
let a = that.data.num - 1
if (a >= 1) {
that.setData({
num: a
})
} else {
that.setData({
num: 1
})
}
},
countPlus() { // 商品数量加
let that = this
let a = that.data.num + 1
that.setData({
num: a
})
},
changeitem(e) { // 选中规格
let that = this
let a = e.currentTarget.dataset.gui_id
let parindex = e.currentTarget.dataset.parindex;
let secindex = e.currentTarget.dataset.index;
that.data.gui[parindex].lineId = secindex;
let obj = that.data.gui_arr
obj.push(a)
let guiArr = [...new Set(obj)]
that.setData({
gui: that.data.gui,
gui_arr: guiArr
})
},
payStore(e) { // 购买 跳页面
// console.log(e, "参数");
let id = e.currentTarget.dataset.id
let num = this.data.num
let token = wx.getStorageSync("token")
if (token) {
wx.navigateTo({
url: '/pages/4SshopcartOrder/4SshopcartOrder?id=' + id + '&num=' + num
})
} else {
this.setData({
msg: '请登录后操作'
})
this.popMaskTest()
}
},
showModal() { //显示对话框
// 显示遮罩层
var animation = wx.createAnimation({
duration: 200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step()
this.setData({
animationData: animation.export(),
showModalStatus: true
})
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation.export()
})
}.bind(this), 200)
},
hideModal() { //隐藏对话框
// 隐藏遮罩层
var animation = wx.createAnimation({
duration: 200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step()
this.setData({
animationData: animation.export(),
})
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation.export(),
showModalStatus: false
})
}.bind(this), 200)
},
golookfuwu() {
let s4_id = this.data.s4_id
wx.navigateTo({
url: '/pages/addCarbook/addCarbook?s4_id=' + s4_id
})
},
popSuccessTest() { // 消息提示
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 2000, //停留时间
})
},
text(details) { // 详情的内容规格
var texts = ''; //待拼接的内容
while (details.indexOf('<img') != -1) { //寻找img 循环
texts += details.substring('0', details.indexOf('<img') + 4); //截取到<img前面的内容
details = details.substring(details.indexOf('<img') + 4); //<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "max-width:100%;height:auto;margin:0 auto; display:block; "; //从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
texts += ' style="max-width:100%;height:auto;margin:0 auto; display:block;" ';
}
}
while (details.indexOf('<td') != -1) { //寻找img 循环
texts += details.substring('0', details.indexOf('<td') + 4); //截取到<img前面的内容
details = details.substring(details.indexOf('<td') + 4); //<img 后面的内容
if (details.indexOf('style=') != -1 && details.indexOf('style=') < details.indexOf('>')) {
texts += details.substring(0, details.indexOf('style="') + 7) + "width:750rpx!important;height:auto;margin:0 auto;"; //从 <img 后面的内容 截取到style= 加上自己要加的内容
details = details.substring(details.indexOf('style="') + 7); //style后面的内容拼接
} else {
// console.log(34449898)
texts += ' style="width:750rpx;height:auto;margin:0 auto;" ';
}
}
texts += details; //最后拼接的内容
// console.log(texts)
return texts;
},
popMaskTest() {
wx.showToast({
title: this.data.msg,
duration: 2000,
icon: 'none',
mask: true //是否有透明蒙层,默认为false
//如果有透明蒙层,弹窗的期间不能点击文档内容
})
},
toggleDialog() {
this.setData({
showDialog: !this.data.showDialog
})
},
bindGetUserInfo(e) { // 立即授权
let that = this;
wx.login({
success(res) {
console.log(res);
that.setData({
code: res.code
})
request({
url: 'api/common/login',
method: "POST",
data: {
rawData: e.detail.rawData,
code: that.data.code,
}
})
.then(res => {
console.log(res);
if (res.data.code == 1) {
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.toggleDialog()
that.setData({
msg: res.data.msg
})
that.popSuccessTest();
that.getDetailsContent()
}).catch(err => {
console.log(err);
})
}
})
},
GOcanvas() {
let id = this.data.id
let token = wx.getStorageSync("token")
if (token) {
wx.navigateTo({
url: '/pages/canvasB/canvasB?id=' + id + '&type=2'
})
} else {
that.getToken()
}
},
onShareAppMessage(options) {
var that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: "车唛优选", // 默认是小程序的名称(可以写slogan等)
path: '/pages/carDetails/carDetails?id=' + that.data.id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
};
// 返回shareObj
return shareObj;
},
getToken() {
let that = this
wx.showModal({
title: '提示',
content: '您尚未登录,请登录后操作',
success: function (res) {
if (res.confirm) {
that.toggleDialog()
} else {
console.log('点击取消回调')
}
}
})
},
})
\ No newline at end of file
... ...
{
"usingComponents": {},
"navigationBarTitleText": "车型详情"
}
\ No newline at end of file
... ...
.container {
height: 100%;
background-color: #F9F9F9;
.top_img {
width: 100%;
height: 750rpx;
.banner {
width: 100%;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
}
.cards {
width: 100%;
padding: 14rpx 0rpx 0;
box-sizing: border-box;
.card {
width: 100%;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
.ittt {
display: flex;
position: relative;
.tent_name {
flex: 1;
.card_text {
width: 100%;
font-size: 32rpx;
color: #06121F;
font-weight: bold;
}
.zan_price {
width: 100%;
display: flex;
align-items: baseline;
margin-top: 10rpx;
.money_icon {
font-size: 20rpx;
color: #FF444B;
font-weight: 600;
}
.price_big {
color: #FF444B;
font-size: 32rpx;
font-weight: 600;
}
}
}
.imgbtns {
width: 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: flex-end;
// justify-content: space-between;
.s_btn {
width: 48rpx;
height: 48rpx;
image {
width: 100%;
flex: 0 auto;
}
}
.mm {
margin: 10rpx 0;
box-sizing: border-box;
}
button {
background-color: transparent;
padding: 0;
}
.buttonShare {
// border: 1rpx solid red;
position: absolute;
top: 55rpx;
right: 0;
width: 60rpx;
height: 60rpx;
z-index: 5;
}
}
}
.store_guide_price {
width: 100%;
display: flex;
align-items: center;
text {
font-size: 24rpx;
line-height: 34rpx;
margin-right: 20rpx;
}
.imgs_downArrow {
height: 24rpx;
line-height: 34rpx;
display: flex;
align-items: center;
.imgs_down {
width: 33rpx;
height: 100%;
}
text {
font-size: 24rpx;
color: #00C116;
}
}
}
.card_box {
width: 100%;
display: flex;
.card_left {
flex: 1;
align-items: center;
line-height: 55rpx;
.price_dP {
display: flex;
align-items: center;
.del {
display: flex;
margin-left: 10rpx;
.del_price {
color: #ccc;
font-size: 24rpx;
text-decoration: line-through;
}
.money_icon {
font-size: 24rpx;
line-height: 52rpx;
color: #ccc;
}
}
.zan_price {
display: flex;
align-items: flex-end;
align-items: baseline;
.icon_name {
font-size: 28rpx;
color: #FF444B;
}
.money_icon {
margin-left: 10rpx;
font-size: 20rpx;
color: #FF444B;
font-weight: 600;
}
.price_big {
color: #FF444B;
font-size: 32rpx;
font-weight: 600;
}
}
}
.num_buy {
font-size: 28rpx;
display: flex;
align-items: center;
.sales {
font-size: 28rpx;
}
.sales_per {
margin-left: 5rpx;
font-size: 28rpx;
line-height: 63rpx;
}
}
}
.card_right {
flex: 1;
align-items: center;
line-height: 55rpx;
padding-left: 20rpx;
box-sizing: border-box;
.collar {
font-size: 24rpx;
color: #000;
}
.count_num {
font-size: 26rpx;
}
}
}
}
}
.chefuWu {
width: 100%;
display: flex;
justify-content: space-between;
padding: 20rpx 50rpx;
box-sizing: border-box;
border-radius: 8rpx;
background-color: #fff;
margin: 20rpx 0;
align-items: center;
.c {
flex: 1;
.icon_conte {
margin-top: 10rpx;
width: 100%;
display: flex;
align-items: center;
.fw {
display: flex;
align-items: center;
margin-right: 20rpx;
.icon_fw {
width: 48rpx;
height: 48rpx;
image {
width: 100%;
}
}
.icon_title {
margin-left: 10rpx;
font-size: 24rpx;
font-weight: bold;
color: #E8370F;
}
}
.pubone {
margin-left: 20rpx;
}
.pub {
color: #666666;
font-size: 24rpx;
margin-right: 20rpx;
}
}
}
.icon_img {
width: 35rpx;
font-size: 38rpx;
}
}
/* 详情 评价 */
.details {
width: 100%;
height: 130rpx;
background-color: #fff;
padding: 32rpx 32rpx;
box-sizing: border-box;
display: flex;
.details_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
}
.appraise_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
margin: 0 70rpx;
}
.cur {
border-bottom: 4rpx solid #E8370F;
font-weight: 700;
font-size: 36rpx !important;
}
}
.details_box {
padding-bottom: 120rpx;
.details_img {
width: 100%;
padding: 24rpx 18rpx 32rpx;
box-sizing: border-box;
background-color: #f5f5f5;
image {
visibility: middle;
}
}
// 评价内容
.praise_content {
width: 100%;
padding: 32rpx 32rpx;
box-sizing: border-box;
.person_content {
display: flex;
justify-content: space-between;
.left_ziliao {
display: flex;
align-items: center;
.imgNum {
width: 80rpx;
height: 80rpx;
image {
width: 100%;
}
}
.per_item {
display: flex;
justify-content: space-between;
flex-direction: column;
height: 80rpx;
margin-left: 20rpx;
.nickname {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.dateTime {
color: #BDC4CE;
font-size: 24rpx;
line-height: 34rpx;
}
}
}
.praise_star {
width: 140rpx;
display: flex;
align-items: center;
image {
width: 48rpx;
height: 48rpx;
}
text {
margin-left: 20rpx;
font-size: 28rpx;
line-height: 40rpx;
}
}
}
.praise_text {
padding: 20rpx 0;
box-sizing: border-box;
font-size: 28rpx;
}
.imgsnox {
display: flex;
flex-wrap: wrap;
width: 100%;
.imgs {
width: 24%;
height: 172rpx;
margin: 5rpx 2rpx;
image {
border-radius: 12rpx;
width: 100%;
height: 100%;
}
}
}
}
.d {
padding: 32rpx;
box-sizing: border-box;
}
}
/* 立刻购买 */
.box_buy {
width: 100%;
background-color: #fff;
border-top: solid 1rpx #F9F9F9;
position: fixed;
bottom: 0;
left: 0;
.dowu {
width: 100%;
padding: 20rpx 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.kefu {
width: 44rpx;
height: 44rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-right: 20rpx;
.transparent {
background: transparent;
top: 0rpx;
left: 0;
border: none;
// border: 1rpx solid royalblue;
position: absolute;
width: 48rpx;
height: 48rpx;
padding: 0;
}
.img1 {
width: 44rpx;
height: 44rpx;
flex-shrink: 0;
}
}
.buy {
flex: 1;
display: flex;
align-items: center;
.bind {
width: 300rpx !important;
height: 68rpx;
color: #fff;
line-height: 68rpx;
padding: 0;
font-weight: 400;
margin-right: 20rpx !important;
font-size: 28rpx;
&:last-child {
margin-right: 0 !important;
}
}
.btn1 {
background-color: #FFBA00;
}
.btn2 {
background-color: #E8370F;
}
button {
margin: 0 !important;
padding: 0 !important;
}
}
}
}
// 弹窗
/*使屏幕变暗 */
.commodity_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.2;
overflow: hidden;
z-index: 1000;
color: #fff;
}
/*对话框 */
.commodity_attr_box {
height: 500rpx;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding: 20rpx;
box-sizing: border-box;
.updown {
width: 100%;
text-align: right;
image {
width: 40rpx;
height: 40rpx;
}
}
.buyStore {
display: flex;
align-items: center;
.storeImg {
width: 184rpx;
height: 184rpx;
image {
width: 100%;
}
}
.store_cont {
height: 184rpx;
flex: 1;
padding-left: 20rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
.store_cont_name {
// line-height: 30rpx;
text {
font-size: 28rpx;
line-height: 30rpx;
font-weight: bold;
}
}
.storeMoney {
// margin-top: 30rpx;
.icon_money {
font-size: 24rpx;
line-height: 30rpx;
font-weight: bold;
}
text {
font-size: 28rpx;
color: #E8370F;
line-height: 30rpx;
font-weight: 600;
}
}
.yichange {
// margin-top: 15rpx;
.change__ {
font-size: 28rpx;
line-height: 30rpx;
font-weight: 600;
margin-right: 20rpx;
}
}
}
}
.rules {
margin-top: 20rpx;
.left_num {
display: flex;
flex-direction: column;
.guiName {
font-size: 28rpx;
line-height: 40rpx;
font-weight: bold;
margin: 20rpx 0;
}
.rules_change {
display: flex;
align-items: center;
flex-wrap: wrap;
.down {
padding: 5rpx 30rpx;
box-sizing: border-box;
margin: 10rpx 20rpx;
background-color: #f9f9f9;
border-radius: 10rpx;
.aaatext {
color: #000;
text-align: center;
font-size: 26rpx;
line-height: 50rpx;
}
}
}
}
}
.number {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 50rpx;
padding: 0 10rpx;
box-sizing: border-box;
.left_num {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.right_num {
display: flex;
align-items: center;
.itemImg_ {
width: 40rpx;
height: 40rpx;
image {
width: 100%;
}
}
.center_num {
margin: 0 10rpx;
width: 60rpx;
text-align: center;
}
}
}
.btnbuy {
width: 100%;
position: fixed;
bottom: 0;
padding: 0;
.btnbuy__ {
height: 70rpx;
width: 92%;
color: #fff;
line-height: 70rpx;
padding: 0;
margin: 0 10rpx 10rpx;
box-sizing: border-box;
font-weight: 400;
background-color: #E8370F;
border-radius: 36rpx;
font-size: 28rpx;
}
}
}
.active_tag {
border: 2rpx solid rgba(232, 55, 15, 1);
.text {
color: rgba(232, 55, 15, 1);
}
}
/* 弹窗 */
.zan_dialog {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.5;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.phoneshou {
height: 500rpx;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding: 32rpx 32rpx 0;
box-sizing: border-box;
border-radius: 24rpx 24rpx 0 0;
.padlock {
width: 100%;
height: 48rpx;
display: flex;
align-items: center;
justify-content: flex-end;
image {
width: 48rpx;
height: 48rpx;
}
}
.phone_title {
width: 100%;
height: 70rpx;
font-size: 44rpx;
line-height: 70rpx;
color: #06121F;
font-family: PingFangSC, PingFangSC-Regular;
}
.tips_content {
width: 100%;
font-size: 32rpx;
line-height: 60rpx;
color: #8C9198;
padding: 30rpx 0;
box-sizing: border-box;
}
.downbtn {
width: 750rpx;
position: fixed;
bottom: 0;
right: 0;
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
}
\ No newline at end of file
... ...
<view class="container">
<view class="top_img">
<swiper class="banner" indicator-dots indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#fff">
<block>
<swiper-item wx:for="{{detailsContent.img_arr}}" wx:key="*this" wx:for-item="item">
<image src="{{item}}" data-src='{{item}}' data-list='{{detailsContent.img_arr}}' bindtap="previewImage"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 卡片 -->
<view class="cards">
<view class="card">
<view class="ittt">
<view class="tent_name">
<view class="title_content2 card_text">{{detailsContent.name}}</view>
<view class="zan_price">
<text class="money_icon">¥</text>
<text class="price_big">{{detailsContent.begin_price}}万起</text>
</view>
</view>
<view class="imgbtns">
<view class="s_btn" catchtap="GOcanvas">
<image class="bents" src="{{imagesUrl}}assets/static/img/2_icon@2x.png"></image>
</view>
<button open-type="share" class="buttonShare"></button>
<view class="s_btn mm">
<image class="bents" src="{{imagesUrl}}assets/static/img/1_icon@2x.png"></image>
</view>
</view>
</view>
<view class="store_guide_price">
<text>厂商指导价:</text>
<text>{{detailsContent.think_price}}万元</text>
<view class="imgs_downArrow">
<image src="{{imagesUrl}}assets/static/img/downArrow.png" class="imgs_down" />
<text>{{detailsContent.down_price}}万</text>
</view>
</view>
</view>
</view>
<view class="chefuWu" bindtap="golookfuwu">
<view class="c">
<view class="icon_conte">
<view class="fw">
<view class="icon_fw">
<image src="{{imagesUrl}}assets/static/img/web2x_vip_icon.png" />
</view>
<text class="icon_title">保障</text>
</view>
<text class="pub">4S店促销</text>
<text class="pub">商品优选</text>
<text class="pub">破损包退</text>
<text class="pub">极速赔付</text>
</view>
</view>
<view class="icon_img">></view>
</view>
<!-- 详情 评价 -->
<view class="details">
<view class="details_name {{_num == 1? 'cur':''}}" data-num="1" bindtap="changeTitle">详情</view>
<view class="appraise_name {{_num == 2? 'cur':''}}" data-num="2" bindtap="changeTitle">
评价
</view>
</view>
<view class="details_box">
<!-- 详情 -->
<view class="details_img" wx:if="{{_num == 1}}">
<import src="../../wxParse/wxParse.wxml" />
<template is="wxParse" data="{{wxParseData:content.nodes}}" />
</view>
<!-- 评价内容 -->
<block wx:if="{{_num == 2}}">
<view class="c" wx:if="{{pingList.length > 0}}">
<view class="praise_content" wx:for="{{pingList}}" wx:key="this">
<view class="person_content">
<view class="left_ziliao">
<view class="imgNum">
<image src="{{item.user.avatar}}" />
</view>
<view class="per_item">
<text class="nickname">{{item.user.nickname}}</text>
<view class="dateTime">{{item.time}}</view>
</view>
</view>
<view class="praise_star">
<image src="{{imagesUrl}}assets/static/img/haoping_icon@2x.png" wx:if="{{item.ping == 1}}" />
<image src="{{imagesUrl}}assets/static/img/zhongping_icon@2x.png" wx:if="{{item.ping == 2}}" />
<image src="{{imagesUrl}}assets/static/img/chaping_icon@2x.png" wx:if="{{item.ping == 3}}" />
<text wx:if="{{item.ping == 1}}">好评</text>
<text wx:if="{{item.ping == 2}}">中评</text>
<text wx:if="{{item.ping == 3}}">差评</text>
</view>
</view>
<view class="praise_text">{{item.cnt}}</view>
<view class="imgsnox">
<view class="imgs" wx:for="{{item.imgs}}" wx:key="this" wx:for-item="items">
<image src="{{items}}" />
</view>
</view>
</view>
</view>
<view class="d" wx:else>暂无评价</view>
</block>
</view>
<!-- 立刻购买 -->
<view class="box_buy">
<view class="dowu">
<view class="kefu">
<button open-type="contact" class="transparent"></button>
<image class="img1" src="{{imagesUrl}}assets/static/img/kefu_icon@2x.png"></image>
</view>
<view class="buy">
<button class="btn1 bind" bindtap="bindMakePhone" data-phone="{{detailsContent.phone}}">
获取底价
</button>
<button class="btn2 bind" bindtap="goConfirm" data-id="{{detailsContent.id}}">立刻购买</button>
</view>
</view>
</view>
<!-- 弹窗 -->
<view class="zan_dialog" catchtap="toggleDialog" wx:if="{{showDialog}}"></view>
<view class="phoneshou" wx:if="{{showDialog}}">
<view class="padlock" catchtap="toggleDialog">
<image src="{{imagesUrl}}assets/static/img/updown.png" />
</view>
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
.container {
height: 100%;
background-color: #F9F9F9;
/* 详情 评价 */
/* 立刻购买 */
/*使屏幕变暗 */
/*对话框 */
/* 弹窗 */
}
.container .top_img {
width: 100%;
height: 750rpx;
}
.container .top_img .banner {
width: 100%;
height: 100%;
}
.container .top_img .banner image {
width: 100%;
height: 100%;
}
.container .cards {
width: 100%;
padding: 14rpx 0rpx 0;
box-sizing: border-box;
}
.container .cards .card {
width: 100%;
padding: 30rpx;
box-sizing: border-box;
background-color: #fff;
}
.container .cards .card .ittt {
display: flex;
position: relative;
}
.container .cards .card .ittt .tent_name {
flex: 1;
}
.container .cards .card .ittt .tent_name .card_text {
width: 100%;
font-size: 32rpx;
color: #06121F;
font-weight: bold;
}
.container .cards .card .ittt .tent_name .zan_price {
width: 100%;
display: flex;
align-items: baseline;
margin-top: 10rpx;
}
.container .cards .card .ittt .tent_name .zan_price .money_icon {
font-size: 20rpx;
color: #FF444B;
font-weight: 600;
}
.container .cards .card .ittt .tent_name .zan_price .price_big {
color: #FF444B;
font-size: 32rpx;
font-weight: 600;
}
.container .cards .card .ittt .imgbtns {
width: 60rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: flex-end;
}
.container .cards .card .ittt .imgbtns .s_btn {
width: 48rpx;
height: 48rpx;
}
.container .cards .card .ittt .imgbtns .s_btn image {
width: 100%;
flex: 0 auto;
}
.container .cards .card .ittt .imgbtns .mm {
margin: 10rpx 0;
box-sizing: border-box;
}
.container .cards .card .ittt .imgbtns button {
background-color: transparent;
padding: 0;
}
.container .cards .card .ittt .imgbtns .buttonShare {
position: absolute;
top: 55rpx;
right: 0;
width: 60rpx;
height: 60rpx;
z-index: 5;
}
.container .cards .card .store_guide_price {
width: 100%;
display: flex;
align-items: center;
}
.container .cards .card .store_guide_price text {
font-size: 24rpx;
line-height: 34rpx;
margin-right: 20rpx;
}
.container .cards .card .store_guide_price .imgs_downArrow {
height: 24rpx;
line-height: 34rpx;
display: flex;
align-items: center;
}
.container .cards .card .store_guide_price .imgs_downArrow .imgs_down {
width: 33rpx;
height: 100%;
}
.container .cards .card .store_guide_price .imgs_downArrow text {
font-size: 24rpx;
color: #00C116;
}
.container .cards .card .card_box {
width: 100%;
display: flex;
}
.container .cards .card .card_box .card_left {
flex: 1;
align-items: center;
line-height: 55rpx;
}
.container .cards .card .card_box .card_left .price_dP {
display: flex;
align-items: center;
}
.container .cards .card .card_box .card_left .price_dP .del {
display: flex;
margin-left: 10rpx;
}
.container .cards .card .card_box .card_left .price_dP .del .del_price {
color: #ccc;
font-size: 24rpx;
text-decoration: line-through;
}
.container .cards .card .card_box .card_left .price_dP .del .money_icon {
font-size: 24rpx;
line-height: 52rpx;
color: #ccc;
}
.container .cards .card .card_box .card_left .price_dP .zan_price {
display: flex;
align-items: flex-end;
align-items: baseline;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .icon_name {
font-size: 28rpx;
color: #FF444B;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .money_icon {
margin-left: 10rpx;
font-size: 20rpx;
color: #FF444B;
font-weight: 600;
}
.container .cards .card .card_box .card_left .price_dP .zan_price .price_big {
color: #FF444B;
font-size: 32rpx;
font-weight: 600;
}
.container .cards .card .card_box .card_left .num_buy {
font-size: 28rpx;
display: flex;
align-items: center;
}
.container .cards .card .card_box .card_left .num_buy .sales {
font-size: 28rpx;
}
.container .cards .card .card_box .card_left .num_buy .sales_per {
margin-left: 5rpx;
font-size: 28rpx;
line-height: 63rpx;
}
.container .cards .card .card_box .card_right {
flex: 1;
align-items: center;
line-height: 55rpx;
padding-left: 20rpx;
box-sizing: border-box;
}
.container .cards .card .card_box .card_right .collar {
font-size: 24rpx;
color: #000;
}
.container .cards .card .card_box .card_right .count_num {
font-size: 26rpx;
}
.container .chefuWu {
width: 100%;
display: flex;
justify-content: space-between;
padding: 20rpx 50rpx;
box-sizing: border-box;
border-radius: 8rpx;
background-color: #fff;
margin: 20rpx 0;
align-items: center;
}
.container .chefuWu .c {
flex: 1;
}
.container .chefuWu .c .icon_conte {
margin-top: 10rpx;
width: 100%;
display: flex;
align-items: center;
}
.container .chefuWu .c .icon_conte .fw {
display: flex;
align-items: center;
margin-right: 20rpx;
}
.container .chefuWu .c .icon_conte .fw .icon_fw {
width: 48rpx;
height: 48rpx;
}
.container .chefuWu .c .icon_conte .fw .icon_fw image {
width: 100%;
}
.container .chefuWu .c .icon_conte .fw .icon_title {
margin-left: 10rpx;
font-size: 24rpx;
font-weight: bold;
color: #E8370F;
}
.container .chefuWu .c .icon_conte .pubone {
margin-left: 20rpx;
}
.container .chefuWu .c .icon_conte .pub {
color: #666666;
font-size: 24rpx;
margin-right: 20rpx;
}
.container .chefuWu .icon_img {
width: 35rpx;
font-size: 38rpx;
}
.container .details {
width: 100%;
height: 130rpx;
background-color: #fff;
padding: 32rpx 32rpx;
box-sizing: border-box;
display: flex;
}
.container .details .details_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
}
.container .details .appraise_name {
font-size: 28rpx;
height: 90rpx;
line-height: 90rpx;
margin: 0 70rpx;
}
.container .details .cur {
border-bottom: 4rpx solid #E8370F;
font-weight: 700;
font-size: 36rpx !important;
}
.container .details_box {
padding-bottom: 120rpx;
}
.container .details_box .details_img {
width: 100%;
padding: 24rpx 18rpx 32rpx;
box-sizing: border-box;
background-color: #f5f5f5;
}
.container .details_box .details_img image {
visibility: middle;
}
.container .details_box .praise_content {
width: 100%;
padding: 32rpx 32rpx;
box-sizing: border-box;
}
.container .details_box .praise_content .person_content {
display: flex;
justify-content: space-between;
}
.container .details_box .praise_content .person_content .left_ziliao {
display: flex;
align-items: center;
}
.container .details_box .praise_content .person_content .left_ziliao .imgNum {
width: 80rpx;
height: 80rpx;
}
.container .details_box .praise_content .person_content .left_ziliao .imgNum image {
width: 100%;
}
.container .details_box .praise_content .person_content .left_ziliao .per_item {
display: flex;
justify-content: space-between;
flex-direction: column;
height: 80rpx;
margin-left: 20rpx;
}
.container .details_box .praise_content .person_content .left_ziliao .per_item .nickname {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.container .details_box .praise_content .person_content .left_ziliao .per_item .dateTime {
color: #BDC4CE;
font-size: 24rpx;
line-height: 34rpx;
}
.container .details_box .praise_content .person_content .praise_star {
width: 140rpx;
display: flex;
align-items: center;
}
.container .details_box .praise_content .person_content .praise_star image {
width: 48rpx;
height: 48rpx;
}
.container .details_box .praise_content .person_content .praise_star text {
margin-left: 20rpx;
font-size: 28rpx;
line-height: 40rpx;
}
.container .details_box .praise_content .praise_text {
padding: 20rpx 0;
box-sizing: border-box;
font-size: 28rpx;
}
.container .details_box .praise_content .imgsnox {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.container .details_box .praise_content .imgsnox .imgs {
width: 24%;
height: 172rpx;
margin: 5rpx 2rpx;
}
.container .details_box .praise_content .imgsnox .imgs image {
border-radius: 12rpx;
width: 100%;
height: 100%;
}
.container .details_box .d {
padding: 32rpx;
box-sizing: border-box;
}
.container .box_buy {
width: 100%;
background-color: #fff;
border-top: solid 1rpx #F9F9F9;
position: fixed;
bottom: 0;
left: 0;
}
.container .box_buy .dowu {
width: 100%;
padding: 20rpx 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.container .box_buy .dowu .kefu {
width: 44rpx;
height: 44rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-right: 20rpx;
}
.container .box_buy .dowu .kefu .transparent {
background: transparent;
top: 0rpx;
left: 0;
border: none;
position: absolute;
width: 48rpx;
height: 48rpx;
padding: 0;
}
.container .box_buy .dowu .kefu .img1 {
width: 44rpx;
height: 44rpx;
flex-shrink: 0;
}
.container .box_buy .dowu .buy {
flex: 1;
display: flex;
align-items: center;
}
.container .box_buy .dowu .buy .bind {
width: 300rpx !important;
height: 68rpx;
color: #fff;
line-height: 68rpx;
padding: 0;
font-weight: 400;
margin-right: 20rpx !important;
font-size: 28rpx;
}
.container .box_buy .dowu .buy .bind:last-child {
margin-right: 0 !important;
}
.container .box_buy .dowu .buy .btn1 {
background-color: #FFBA00;
}
.container .box_buy .dowu .buy .btn2 {
background-color: #E8370F;
}
.container .box_buy .dowu .buy button {
margin: 0 !important;
padding: 0 !important;
}
.container .commodity_screen {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.2;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.container .commodity_attr_box {
height: 500rpx;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding: 20rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .updown {
width: 100%;
text-align: right;
}
.container .commodity_attr_box .updown image {
width: 40rpx;
height: 40rpx;
}
.container .commodity_attr_box .buyStore {
display: flex;
align-items: center;
}
.container .commodity_attr_box .buyStore .storeImg {
width: 184rpx;
height: 184rpx;
}
.container .commodity_attr_box .buyStore .storeImg image {
width: 100%;
}
.container .commodity_attr_box .buyStore .store_cont {
height: 184rpx;
flex: 1;
padding-left: 20rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.container .commodity_attr_box .buyStore .store_cont .store_cont_name text {
font-size: 28rpx;
line-height: 30rpx;
font-weight: bold;
}
.container .commodity_attr_box .buyStore .store_cont .storeMoney .icon_money {
font-size: 24rpx;
line-height: 30rpx;
font-weight: bold;
}
.container .commodity_attr_box .buyStore .store_cont .storeMoney text {
font-size: 28rpx;
color: #E8370F;
line-height: 30rpx;
font-weight: 600;
}
.container .commodity_attr_box .buyStore .store_cont .yichange .change__ {
font-size: 28rpx;
line-height: 30rpx;
font-weight: 600;
margin-right: 20rpx;
}
.container .commodity_attr_box .rules {
margin-top: 20rpx;
}
.container .commodity_attr_box .rules .left_num {
display: flex;
flex-direction: column;
}
.container .commodity_attr_box .rules .left_num .guiName {
font-size: 28rpx;
line-height: 40rpx;
font-weight: bold;
margin: 20rpx 0;
}
.container .commodity_attr_box .rules .left_num .rules_change {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.container .commodity_attr_box .rules .left_num .rules_change .down {
padding: 5rpx 30rpx;
box-sizing: border-box;
margin: 10rpx 20rpx;
background-color: #f9f9f9;
border-radius: 10rpx;
}
.container .commodity_attr_box .rules .left_num .rules_change .down .aaatext {
color: #000;
text-align: center;
font-size: 26rpx;
line-height: 50rpx;
}
.container .commodity_attr_box .number {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 50rpx;
padding: 0 10rpx;
box-sizing: border-box;
}
.container .commodity_attr_box .number .left_num {
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
}
.container .commodity_attr_box .number .right_num {
display: flex;
align-items: center;
}
.container .commodity_attr_box .number .right_num .itemImg_ {
width: 40rpx;
height: 40rpx;
}
.container .commodity_attr_box .number .right_num .itemImg_ image {
width: 100%;
}
.container .commodity_attr_box .number .right_num .center_num {
margin: 0 10rpx;
width: 60rpx;
text-align: center;
}
.container .commodity_attr_box .btnbuy {
width: 100%;
position: fixed;
bottom: 0;
padding: 0;
}
.container .commodity_attr_box .btnbuy .btnbuy__ {
height: 70rpx;
width: 92%;
color: #fff;
line-height: 70rpx;
padding: 0;
margin: 0 10rpx 10rpx;
box-sizing: border-box;
font-weight: 400;
background-color: #E8370F;
border-radius: 36rpx;
font-size: 28rpx;
}
.container .active_tag {
border: 2rpx solid #e8370f;
}
.container .active_tag .text {
color: #e8370f;
}
.container .zan_dialog {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.5;
overflow: hidden;
z-index: 1000;
color: #fff;
}
.container .phoneshou {
height: 500rpx;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
left: 0;
z-index: 2000;
background: #fff;
padding: 32rpx 32rpx 0;
box-sizing: border-box;
border-radius: 24rpx 24rpx 0 0;
}
.container .phoneshou .padlock {
width: 100%;
height: 48rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.container .phoneshou .padlock image {
width: 48rpx;
height: 48rpx;
}
.container .phoneshou .phone_title {
width: 100%;
height: 70rpx;
font-size: 44rpx;
line-height: 70rpx;
color: #06121F;
font-family: PingFangSC, PingFangSC-Regular;
}
.container .phoneshou .tips_content {
width: 100%;
font-size: 32rpx;
line-height: 60rpx;
color: #8C9198;
padding: 30rpx 0;
box-sizing: border-box;
}
.container .phoneshou .downbtn {
width: 750rpx;
position: fixed;
bottom: 0;
right: 0;
padding: 20rpx 0;
background-color: #fff;
}
.container .phoneshou .downbtn .btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
}
.container .phoneshou .downbtn .btn image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .phoneshou .downbtn .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -3,7 +3,7 @@
<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}}">
<view class='footbox' wx:if="{{index%2==0}}" bindtap="storeDetail" data-id="{{item.goods_id}}" data-num="1">
<image class='cover' src="{{item.img}}" mode="widthFix"></image>
<view class="text_bx">
<view class="ster_nams title_content2">{{item.goods_name}}</view>
... ... @@ -21,20 +21,20 @@
</view>
<view class="del">¥{{item.line_price}}</view>
</view>
<view class="cl_color" wx:if="{{esl==3}}">
<!-- <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>
</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}}">
<view class='footbox' wx:if="{{index%2==1}}" bindtap="storeDetail" data-id="{{item.goods_id}}" data-num="1">
<image class='cover' src="{{item.img}}" mode="widthFix"></image>
<view class="text_bx">
<view class="ster_nams title_content2">{{item.goods_name}}</view>
... ... @@ -52,13 +52,13 @@
</view>
<view class="del">¥{{item.line_price}}</view>
</view>
<view class="cl_color" wx:if="{{esl==3}}">
<!-- <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>
</view>
</block>
... ...
... ... @@ -18,14 +18,20 @@ Page({
msg: '',
heheight: '',
confirmStoreOrder: {},
goto: '',
},
onLoad: function (options) {
console.log(options);
this.setData({
id: options.id
id: options.id,
goto: options.goto
})
this.getconfirmStoreOrder()
if (this.data.goto == 1) {
this.getConfirmOrder()
} else {
this.getconfirmStoreOrder()
}
},
async getconfirmStoreOrder() {
let that = this
... ... @@ -43,16 +49,37 @@ Page({
console.log(data);
that.setData({
confirmStoreOrder: data,
// content: that.text(data.content),
order_no: data.order_no
})
} catch (err) {
console.log(err);
// that.setData({
// msg: err.msg
// })
// that.popMaskTest()
a.popTest(err.msg)
}
},
async getConfirmOrder() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/shop4s2/cheOrder',
data: {
id: that.data.id
}
})
console.log(data);
that.setData({
confirmStoreOrder: data,
order_no: data.order_no
})
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
... ...
... ... @@ -30,25 +30,38 @@ Page({
circular: true,
swiperError: 0,
zan: '点赞',
outzan: '点赞'
outzan: '点赞',
is_me: false
},
onLoad: function (options) {
console.log(options, "options");
let that = this
let token = wx.getStorageSync('token')
let user_id = wx.getStorageSync('user_id')
console.log(user_id, "wode user_id");
if (!options.scene) {
if (user_id == options.user_id) { /// 我自己打开
console.log('是我自己哦');
that.setData({
is_me: true
})
} else {
console.log('不是我的是我自己哦');
that.setData({
is_me: false
})
}
that.setData({
id: options.id,
fx_user: options.user_id ? options.user_id : ''
})
console.log(options, "optionss");
console.log(that.data.is_me, "这是我的is_me");
} else {
let getQueryString = {}
let strs = decodeURIComponent(options.scene).split('x')
getQueryString.other_id = strs[1];
getQueryString.id = strs[0];
console.log(strs);
console.log(getQueryString);
that.setData({
id: getQueryString.id || '',
fx_user: getQueryString.other_id || ''
... ... @@ -62,9 +75,11 @@ Page({
that.getToken()
}
// 获得popup组件
this.popup = this.selectComponent("#popup");
// this.popup = this.selectComponent("#popup");
},
onShow: function () {
},
onShow: function () {},
swiperChange(e) {
... ... @@ -177,19 +192,7 @@ Page({
that.popMaskTest()
}
} else {
wx.showModal({
title: '提示',
content: '您尚未登录,请登录后操作',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization'
})
} else {
console.log('点击取消回调')
}
}
})
a.checkLogin()
}
},
... ... @@ -201,19 +204,7 @@ Page({
url: '/pages/canvas/canvas?id=' + id
})
} else {
wx.showModal({
title: '提示',
content: '您尚未登录,请登录后操作',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization'
})
} else {
console.log('点击取消回调')
}
}
})
a.checkLogin()
}
},
... ... @@ -229,14 +220,28 @@ Page({
}
})
.then(res => {
if (that.data.is_me == true) { // 我自己点进来
console.log(that.data.is_me, "这是我的is_me");
if (res.data.data.have_num >= res.data.data.num) {
that.setData({
is_can: 1
})
} else {
that.setData({
is_can: 2
})
}
}
that.setData({
xian_num: res.data.data.xian_num,
detailsContent: res.data.data,
// content: that.text(res.data.data.content || ''),
content: res.data.data.content,
user_arr: res.data.data.user_arr,
user_id: res.data.data.user_id,
have_num: res.data.data.have_num
have_num: res.data.data.have_num,
num: res.data.data.num
})
console.log(res.data.data, "res.data.data");
console.log(that.data.user_arr);
... ... @@ -253,10 +258,7 @@ Page({
}).catch(err => {
console.log(err);
this.setData({
msg: err.msg
})
this.popMaskTest()
a.popTest(err.msg)
})
},
previewImage: function (e) {
... ... @@ -301,20 +303,7 @@ Page({
title: "我们之间只有一个赞的距离", // 默认是小程序的名称(可以写slogan等)
path: '/pages/detail/detail?id=' + that.data.id + '&user_id=' + that.data.user_id, // 默认是当前页面,必须是以‘/’开头的完整路径
imageUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
console.log(res);
that.setData({
msg: '易分享'
})
that.popMaskTest()
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {}
},
};
// 返回shareObj
return shareObj;
... ... @@ -537,6 +526,8 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.hideModal1()
... ...
... ... @@ -976,30 +976,38 @@
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
.si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn {
height: 100rpx;
width: 100%;
}
margin: 0 auto;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
}
... ...
... ... @@ -193,7 +193,7 @@
</view>
<!-- 立刻购买 -->
<view class="box_buy">
<view class="buy">
<view class="buy" wx:if="{{is_me == false}}">
<button open-type="contact" class="transparent"></button>
<image src="{{imagesUrl}}assets/static/img/kefu_icon@2x.png"></image>
<button class="btnPay" wx:if="{{detailsContent.btn == 'zan' && detailsContent.zan_id == 1 }}" data-id="{{detailsContent.id}}" catchtap="dianZan" data-zan_id="{{detailsContent.zan_id}}">
... ... @@ -209,6 +209,18 @@
分享好友,获得{{detailsContent.num}}个赞即可购买
</button>
</view>
<view class="buy" wx:else>
<button open-type="contact" class="transparent"></button>
<image src="{{imagesUrl}}assets/static/img/kefu_icon@2x.png"></image>
<block wx:if="{{is_can ==1}}">
<button class="btnPay" catchtap="gotopay" data-id="{{detailsContent.id}}" data-buy_id="{{detailsContent.buy_id}}">
立刻购买
</button>
</block>
<block wx:else>
<button class="btnPayno" open-type="share">分享好友,获得{{detailsContent.num}}个赞即可购买</button>
</block>
</view>
</view>
<!-- 屏幕背景变暗的背景 -->
<view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view>
... ... @@ -259,10 +271,12 @@
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
... ...
... ... @@ -784,9 +784,15 @@
padding: 20rpx 0;
background-color: #fff;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn {
height: 100rpx;
width: 90%;
width: 100%;
margin: 0 auto;
color: #fff;
padding: 0;
box-sizing: border-box;
... ... @@ -797,12 +803,12 @@
justify-content: center;
border-radius: 50rpx;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn image {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn1 {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -71,7 +71,7 @@ Page({
klist: data,
time_data: data.time_num,
content: data.content,
time: data.time_num,
time: data.time_num * 1000,
content2: that.text(data.say)
})
WxParse.wxParse('content', 'html', that.data.content, that, 5);
... ... @@ -260,6 +260,8 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.hideModal()
... ... @@ -302,7 +304,7 @@ Page({
wx.showToast({
title: this.data.msg,
icon: 'none',
duration: 2000,
duration: 1300,
mask: true //是否有透明蒙层,默认为false
//如果有透明蒙层,弹窗的期间不能点击文档内容
})
... ... @@ -311,7 +313,7 @@ Page({
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 2000, //停留时间
duration: 1300, //停留时间
})
},
... ...
... ... @@ -382,30 +382,36 @@
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
.si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn {
height: 100rpx;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
}
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
}
... ...
... ... @@ -84,10 +84,12 @@
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
... ...
... ... @@ -322,9 +322,14 @@
padding: 20rpx 0;
background-color: #fff;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn {
height: 100rpx;
width: 90%;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
... ... @@ -335,12 +340,12 @@
justify-content: center;
border-radius: 50rpx;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn image {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .login .commodity_attr_box .phoneshou .downbtn .btn1 {
.container .login .commodity_attr_box .phoneshou .downbtn .si_box .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -207,30 +207,21 @@ Page({
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({
}
})
} catch (err) {
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
} else {
}
}
})
}
} else {
} catch (err) {
that.setData({
msg: err.msg
}
}
})
that.popTest()
}
},
... ...
... ... @@ -73,14 +73,14 @@ Page({
that.setData({
time_id: 1
})
that.getSearchStoreList()
that.getAccessories()
} else {
that.setData({
time_id: 2
})
console.log(that.data.time_id);
that.getSearchStoreList()
that.getAccessories()
}
},
topPrice() { // 价格
... ... @@ -90,12 +90,12 @@ Page({
that.setData({
price_id: 1
})
that.getSearchStoreList()
that.getAccessories()
} else {
that.setData({
price_id: 2
})
that.getSearchStoreList()
that.getAccessories()
}
},
storeDetail(e) {
... ...
... ... @@ -362,6 +362,8 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.toggleDialog()
... ...
... ... @@ -748,30 +748,36 @@
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
.si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn {
height: 100rpx;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
}
image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
}
... ...
... ... @@ -194,10 +194,16 @@
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</button> -->
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -587,9 +587,14 @@
padding: 20rpx 0;
background-color: #fff;
}
.container .phoneshou .downbtn .btn {
.container .phoneshou .downbtn .si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.container .phoneshou .downbtn .si_box .btn {
height: 100rpx;
width: 90%;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
... ... @@ -600,12 +605,12 @@
justify-content: center;
border-radius: 50rpx;
}
.container .phoneshou .downbtn .btn image {
.container .phoneshou .downbtn .si_box .btn image {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .phoneshou .downbtn .btn1 {
.container .phoneshou .downbtn .si_box .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -45,7 +45,7 @@ page {
.top_new {
width: 100%;
// height: 508rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ...
... ... @@ -170,45 +170,13 @@
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}" data-tir="0">
<!-- <view class="car_name">BMW 1系三厢运动</view>
<view class="car_name_price">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">9.80</view>
</view>
</view>
<view class="car_down_img">
<image class="" src="{{imagesUrl}}assets/static/img/v-t.png" />
</view> -->
<image src="{{item.img_data.image1}}" />
</view>
<view class="rt_box">
<view class="ry_top" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}" data-tir="1">
<!-- <view class="time_set">
<view class="set_name">限时抢购</view>
<van-count-down use-slot time="{{ time }}" bindchange="onChange">
<view class="time_is">
<view class="item">{{ timeData.days }}</view>
<view class="item">{{ timeData.hours }}</view>
<view class="item">{{ timeData.minutes }}</view>
</view>
</van-count-down>
</view> -->
<!-- <view class="set_ti">
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
<view class="ti_text">BMW 1系三厢运动</view>
</view> -->
<image src="{{item.img_data.image2}}" />
</view>
<view class="ry_down" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}" data-tir="2">
<!-- <view class="set_ti">
<view class="ti_text">BMW 1系三厢运动</view>
<view class="ti_img">
<image src="{{imagesUrl}}assets/static/img/v-n.png" />
</view>
</view> -->
<image src="{{item.img_data.image3}}" />
</view>
</view>
... ...
... ... @@ -37,7 +37,7 @@ page {
}
.container .health .top_new {
width: 100%;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://car.goorcar.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ...
... ... @@ -297,30 +297,21 @@ Page({
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({
}
})
} catch (err) {
wx.showModal({
title: '提示',
content: '该车已被注册,是否申请加入车辆管理?',
success: function (res) {
if (res.confirm) {
} else {
}
}
})
}
} else {
} catch (err) {
that.setData({
msg: err.msg
}
}
})
that.popTest()
}
},
... ...
... ... @@ -673,6 +673,8 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.toggleDialog()
... ...
... ... @@ -938,29 +938,36 @@
padding: 20rpx 0;
background-color: #fff;
.btn {
height: 100rpx;
width: 90%;
color: #fff;
padding: 0;
.si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
.btn {
height: 100rpx;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
font-size: 32rpx;
background-color: #00C25F;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50rpx;
image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
}
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
.btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
}
... ...
... ... @@ -245,10 +245,16 @@
<view class="phone_title">请先授权登录</view>
<view class="tips_content">为了更好的为你提供服务,请允许微信授权后再使用功能</view>
<view class="downbtn">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<!-- <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</button> -->
<view class="si_box">
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
<image src="{{imagesUrl}}assets/static/img/icon_wechat.png" />
微信授权登录
</button>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -728,9 +728,14 @@
padding: 20rpx 0;
background-color: #fff;
}
.container .phoneshou .downbtn .btn {
.container .phoneshou .downbtn .si_box {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.container .phoneshou .downbtn .si_box .btn {
height: 100rpx;
width: 90%;
width: 100%;
color: #fff;
padding: 0;
box-sizing: border-box;
... ... @@ -741,12 +746,12 @@
justify-content: center;
border-radius: 50rpx;
}
.container .phoneshou .downbtn .btn image {
.container .phoneshou .downbtn .si_box .btn image {
width: 60rpx;
height: 48rpx;
margin-right: 20rpx;
}
.container .phoneshou .downbtn .btn1 {
.container .phoneshou .downbtn .si_box .btn1 {
margin-bottom: 20rpx;
background-color: #ccc;
}
... ...
... ... @@ -241,13 +241,13 @@ Page({
let that = this
let cheid = that.data.Cheid
let gouarr = this.data.Cheid.join(',')
console.log();
if (cheid.length != 0) {
wx.navigateTo({
url: '/pages/true4Sorder/true4Sorder?gouarr=' + gouarr
})
} else {
that.goLogin()
// that.goLogin()
a.popTest('请选择要购买的商品')
}
},
... ... @@ -265,32 +265,20 @@ Page({
}
})
console.log(data);
that.setData({
msg: data.msg,
// shopCart: list.filter(item => item.selected == false)
})
that.popMaskTest()
a.popSuccessTest(data.msg)
setTimeout(() => {
that.getShopCart()
}, 1500);
} catch (err) {
that.setData({
msg: err.msg
})
that.popMaskTest()
console.log(err);
a.popTest(err.msg)
}
},
changeTitle(e) { // 切换 4sdian 车唛
let way = e.currentTarget.dataset.num
// this.setData({
// _num: way,
// editor: 1,
// all_pay: 0,
// type: way
// })
// this.getShopCart()
this.setData({
_num: way,
editor: 1,
... ... @@ -377,7 +365,7 @@ Page({
url: '/pages/4SorderShop/4SorderShop?gouarr=' + gouarr
})
} else {
that.goLogin()
a.popTest('请选择要购买的商品')
}
},
totalMoney4S() { //购物车商品总价
... ...
... ... @@ -217,6 +217,8 @@ Page({
wx.setStorageSync('token', res.data.data.userInfo.token);
wx.setStorageSync('avatar', res.data.data.userInfo.avatar);
wx.setStorageSync('name', res.data.data.userInfo.nickname);
wx.setStorageSync('user_id', res.data.data.userInfo.user_id);
}
console.log(res.data.data.userInfo.token);
that.toggleDialog()
... ...