更换版本

This commit is contained in:
2024-01-22 18:48:00 +08:00
parent 9f65ea8fd9
commit 00e6dcaec0
1158 changed files with 70609 additions and 51780 deletions

214
pages/store/index.js Normal file
View File

@@ -0,0 +1,214 @@
var a, t, e;
(a = getApp()),
(t = 2),
(e = 2),
Page({
data: {
fans: 0,
release: 0,
browse: 0,
cars: [],
cars2: [],
details: [],
is_cars: !0,
is_cars2: !0,
scanReachBottom: !1,
scanReachBottom2: !1,
follow_status: !0,
ensure: [],
appscene: 0,
},
onLoad: function (t) {
if (
((1007 != a.data.appscene &&
1008 != a.data.appscene &&
1011 != a.data.appscene &&
1012 != a.data.appscene &&
1013 != a.data.appscene &&
1014 != a.data.appscene) ||
this.setData({ appscene: 1 }),
(s = this),
t.scene)
)
e = t.scene;
else var e = t.uid;
e || (e = a.getuid()), s.setData({ store_uid: e });
var s = this;
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
uid: a.getuid(),
thatuid: e,
r: "sale.index.getstoredetail",
},
success: function (a) {
console.log(a),
wx.setNavigationBarTitle({ title: a.data.data.detail.nickname }),
console.log(a.data.data.ensure),
s.setData({
fans: a.data.data.fans,
release: a.data.data.release,
browse: a.data.data.browse,
details: a.data.data.detail,
cars: a.data.data.cars,
cars2: a.data.data.cars2,
follow_status: a.data.data.iffollow,
ensure: a.data.data.ensure,
});
var t = a.data.data.cars.length;
console.log(t),
t < 1
? s.setData({ is_cars: !1 })
: t < 4 && s.setData({ scanReachBottom: !0 });
var e = a.data.data.cars2.length;
e < 1
? s.setData({ is_cars2: !1 })
: e < 5 && s.setData({ scanReachBottom2: !0 });
},
});
},
detile: function (a) {
console.log(a),
wx.navigateTo({
url:
"/pages/home/carMessage/carMessage?id=" +
a.currentTarget.dataset.id,
});
},
message: function () {
wx.navigateTo({
url:
"/pages/home/jubao/jubao?car_uid=" +
this.data.store_uid +
"&form_type=1",
});
},
report: function () {
wx.navigateTo({
url:
"/pages/home/jubao/jubao?car_uid=" +
this.data.store_uid +
"&form_type=2",
});
},
makephone: function () {
this.data.details && this.data.details.phone
? wx.makePhoneCall({ phoneNumber: this.data.details.phone })
: wx.showModal({
content: "该商家暂未没有留下联系方式",
showCancel: !1,
});
},
follow: function () {
var t = this;
a.util.getUserInfo(function (a) {
a.memberInfo || that.setData({ isShow: !0 });
}),
console.log(this.data.store_uid),
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
r: "me.follow",
uid: a.getuid(),
type: 1,
ucar_id: this.data.store_uid,
},
cachetime: "0",
success: function (a) {
t.setData({
follow_status: !t.data.follow_status,
follow: a.data.data,
});
},
});
},
storetopcars: function () {
var e = this,
s = e.data.cars;
e.data.scanReachBottom ||
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
leftid: t,
is_vip: 1,
r: "sale.index.getstoredetail",
thatuid: e.data.store_uid,
},
success: function (a) {
if ("null" != a.data.data) {
var o = a.data.data.length;
if ((t++, o > 0)) {
for (var d = 0; d < o; d++) s.push(a.data.data[d]);
o < 4 && e.setData({ scanReachBottom: !0 }),
e.setData({ cars: s });
} else e.setData({ scanReachBottom: !0 });
} else e.setData({ scanReachBottom: !0 });
},
});
},
storecars2: function () {
var t = this,
s = t.data.cars2;
t.data.scanReachBottom2 ||
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
leftid: e,
is_vip: 2,
r: "sale.index.getstoredetail",
thatuid: t.data.store_uid,
},
success: function (a) {
if ("null" != a.data.data) {
var o = a.data.data.length;
if ((e++, o > 0)) {
for (var d = 0; d < o; d++) s.push(a.data.data[d]);
o < 5 && t.setData({ scanReachBottom2: !0 }),
t.setData({ cars2: s });
} else t.setData({ scanReachBottom2: !0 });
} else t.setData({ scanReachBottom2: !0 });
},
});
},
onReachBottom: function () {
var e = this,
s = e.data.cars;
if (!e.data.scanReachBottom) {
if (e.data.details.is_member) return !1;
console.log(e.data.store_uid),
a.util.request({
url: "entry/wxapp/Api",
data: {
m: "monai_market",
leftid: t,
r: "sale.index.getstoredetail",
thatuid: e.data.store_uid,
},
success: function (a) {
if ("null" != a.data.data) {
var o = a.data.data.length;
if ((t++, o > 0)) {
for (var d = 0; d < o; d++) s.push(a.data.data[d]);
e.setData({ cars: s });
} else e.setData({ scanReachBottom: !0 });
}
},
});
}
},
onShareAppMessage: function () {
return {
title: this.data.details.nickname,
path: "/pages/store/index?uid=" + this.data.store_uid,
};
},
shouyewdj_btn: function () {
console.log(123),
wx.switchTab({ url: "/pages/index/index" }),
(a.data.appscene = 0);
},
});

1
pages/store/index.json Normal file
View File

@@ -0,0 +1 @@
{ "navigationBarTitleText": " 我的店铺", "usingComponents": {} }

111
pages/store/index.wxml Normal file
View File

@@ -0,0 +1,111 @@
<view wx:if="{{details.is_member}}">
<view class="banner">
<view class="banner_backmengceng">
<image class="banner_headImg" src="{{details.head_image}}"></image>
<view class="banner_name">{{details.nickname}}</view>
<view class="banner_title">人气 {{browse?browse:'0'}}丨发布 {{release?release:'0'}}丨粉丝 {{fans?fans:'0'}}</view>
<view class="banner_style">认证店铺 <image class="banner_style_img" src="/pages/image/zuanshi_icn.png"></image>
</view>
</view>
<image class="banner_backImg" src="{{details.store_img?details.store_img:'/pages/image/back.png'}}"></image>
</view>
<view wx:if="{{is_cars}}">
<view class="name_nav">最新上架</view>
<view class="shop_modle_border">
<view bindtap="detile" class="shop_modle" data-id="{{item.id}}" wx:for="{{cars}}" wx:for-index="indexs" wx:key="6">
<image class="shop_modle_img" src="{{item.img_patch}}"></image>
<view class="shop_modle_name">{{item.name}}</view>
<view class="shop_modle_num">{{item.year}} | {{item.km}}万公里</view>
<view class="shop_modle_price">
<text class="shop_modle_price_num">{{item.price}}万</text>
</view>
</view>
</view>
<view bindtap="storetopcars" class="look_modle" wx:if="{{!scanReachBottom}}">查看更多 <image class="look_modle_img" src="/pages/image/youjiantou_btn.png"></image>
</view>
<view class="look_modle" wx:if="{{scanReachBottom}}">没有更多了 </view>
</view>
<view wx:if="{{is_cars2}}">
<view class="name_nav">往日推荐</view>
<view class="modle" wx:for="{{cars2}}" wx:for-index="indexs" wx:key="6">
<view class="tuijian" wx:if="{{item['top_status']}}">推荐</view>
<image bindtap="detile" class="modle_img" data-id="{{item.id}}" mode="aspectFill" src="{{item.img_patch}}"></image>
<view bindtap="detile" class="message_border" data-id="{{item.id}}">
<view class="modle_name">
<view class="ziying" wx:if="{{item.is_vip==1}}">认证车商</view>
<view class="ziying" wx:if="{{item.uid==0}}">自营</view> {{item.name}} {{item.agelimit==0?'全新车':'车龄 '+item.agelimit+'年'}} {{item.exhaust}} {{item.gearbox==0?'手自一体':''}}{{item.gearbox==1?'手动档':''}}{{item.gearbox==2?'自动档':''}}</view>
<view class="modle_chexing"> {{item.year}} | {{item.km}}万公里 </view>
<view class="modle_price">{{item.price}}万 </view>
</view>
</view>
<view bindtap="storecars2" class="look_modle" wx:if="{{!scanReachBottom2}}">查看更多 <image class="look_modle_img" src="/pages/image/youjiantou_btn.png"></image>
</view>
<view class="look_modle" wx:if="{{scanReachBottom2}}">没有更多了 </view>
</view>
<view>
<view class="name_nav">服务保障</view>
<view class="baozhang" wx:for="{{ensure}}" wx:key="4">
<image class="baozhang_img" src="{{item['image']}}"></image>
<view class="baozhang_text">{{item['name']}}</view>
</view>
</view>
<view class="page_nav"></view>
</view>
<view wx:if="{{!details.is_member}}">
<view class="banner1"></view>
<view class="banner_modle1">
<view class="banner_modle_top1">
<image class="banner_modle_top_img1" src="{{details.head_image}}"></image>
<view class="banner_modle_top_title1">{{details.nickname}}</view>
<view class="banner_modle_top_btn1">会员</view>
</view>
<view class="banner_modle_down1">
<view class="banner_modle_down_modle1">
<view class="banner_modle_down_modle_top1">{{browse?browse:'0'}}</view>
<view class="banner_modle_down_modle_down1">人气</view>
</view>
<view class="banner_modle_down_border1"></view>
<view class="banner_modle_down_modle1">
<view class="banner_modle_down_modle_top1">{{release?release:'0'}}</view>
<view class="banner_modle_down_modle_down1">发布</view>
</view>
<view class="banner_modle_down_border1"></view>
<view class="banner_modle_down_modle1">
<view class="banner_modle_down_modle_top1">{{fans?fans:'0'}}</view>
<view class="banner_modle_down_modle_down1">粉丝</view>
</view>
</view>
</view>
</view>
<view class="modle_border" wx:if="{{!details.is_member}}">
<view class="modle" wx:for="{{cars}}" wx:for-index="indexs" wx:key="6">
<view class="tuijian" wx:if="{{item['top_status']}}">推荐</view>
<image bindtap="detile" class="modle_img" data-id="{{item.id}}" mode="aspectFill" src="{{item.img_patch}}"></image>
<view bindtap="detile" class="message_border" data-id="{{item.id}}">
<view class="modle_name">
<view class="ziying" wx:if="{{item.is_vip==1}}">认证车商</view>
<view class="ziying" wx:if="{{item.uid==0}}">自营</view> {{item.name}} {{item.agelimit==0?'全新车':'车龄 '+item.agelimit+'年'}} {{item.exhaust}} {{item.gearbox==0?'手自一体':''}}{{item.gearbox==1?'手动档':''}}{{item.gearbox==2?'自动档':''}}</view>
<view class="modle_chexing"> {{item.time}} | {{item.km}}万公里 </view>
<view class="modle_price">{{item.price}}万 </view>
</view>
</view>
<view class="end_none" wx:if="{{scanReachBottom}}">没有更多了...</view>
</view>
<view class="nav_nav"></view>
<view class="btm_nav">
<view bindtap="shouyewdj_btn" class="btm_nav_small">
<image class="btm_nav_small_img" src="/pages/image/shouyewdj_btn.png"></image>
<view class="btm_nav_small_title">首页</view>
</view>
<view bindtap="follow" class="btm_nav_small">
<image class="btm_nav_small_img" src="/pages/image/guanzhu_btn.png" wx:if="{{follow_status}}"></image>
<image class="btm_nav_small_img" src="/pages/image/yiguanzhu_btn.png" wx:if="{{!follow_status}}"></image>
<view class="btm_nav_small_title">关注</view>
</view>
<view bindtap="message" class="btm_nav_small">
<image class="btm_nav_small_img" src="/pages/image/liuyan_btn.png"></image>
<view class="btm_nav_small_title">留言</view>
</view>
<button bindtap="makephone" class="btm_nav_big_index">联系车主</button>
<button class="btm_nav_big_second" openType="share">立即分享</button>
</view>

399
pages/store/index.wxss Normal file
View File

@@ -0,0 +1,399 @@
page {
background: #fff;
}
.banner {
overflow: hidden;
}
.banner,
.banner_backImg,
.banner_backmengceng {
height: 310rpx;
width: 100%;
}
.banner_backmengceng {
background: rgba(0, 0, 0, 0.4);
position: absolute;
z-index: 5;
}
.banner_headImg {
border-radius: 10rpx;
height: 150rpx;
margin-left: 30rpx;
width: 150rpx;
}
.banner_headImg,
.banner_name {
margin-top: 80rpx;
position: absolute;
}
.banner_name {
color: #fff;
font-size: 30rpx;
font-weight: 700;
margin-left: 210rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500rpx;
word-break: keep-all;
}
.banner_title {
margin-top: 140rpx;
}
.banner_style,
.banner_title {
color: #fff;
font-size: 24rpx;
margin-left: 210rpx;
position: absolute;
width: 500rpx;
}
.banner_style {
margin-top: 195rpx;
}
.banner_style_img {
height: 30rpx;
margin-top: -5rpx;
padding-left: 5rpx;
vertical-align: middle;
width: 30rpx;
}
.name_nav {
color: #000;
font-size: 30rpx;
font-weight: 700;
padding: 30rpx;
}
.shop_modle_border {
margin-left: 10rpx;
width: 730rpx;
}
.shop_modle {
display: inline-block;
margin-left: 20rpx;
padding-bottom: 40rpx;
width: 335rpx;
}
.shop_modle_img {
display: block;
height: 250rpx;
width: 335rpx;
}
.shop_modle_name {
color: #333;
font-size: 30rpx;
font-weight: 700;
}
.shop_modle_name,
.shop_modle_num {
margin-top: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 335rpx;
word-break: keep-all;
}
.shop_modle_num {
color: #7a7a7a;
font-size: 24rpx;
}
.shop_modle_price {
color: #7a7a7a;
font-size: 20rpx;
margin-top: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 335rpx;
word-break: keep-all;
}
.shop_modle_price_num {
color: #f75f5f;
font-size: 30rpx;
font-weight: 700;
}
.look_modle {
border-bottom: 30rpx solid #f5f5f5;
border-top: 1rpx solid #f5f5f5;
color: #7a7a7a;
font-size: 24rpx;
line-height: 73rpx;
text-align: center;
width: 100%;
}
.look_modle_img {
height: 30rpx;
margin-top: -5rpx;
vertical-align: middle;
width: 30rpx;
}
.guanggao_border {
margin: 0 auto;
}
.guanggao_border,
.guanggao_border_img {
height: 200rpx;
width: 690rpx;
}
.guanggao_border_more {
background: rgba(0, 0, 0, 0.4);
color: #fff;
font-size: 18rpx;
height: 30rpx;
line-height: 30rpx;
margin-left: 37rpx;
margin-top: 23rpx;
position: absolute;
text-align: center;
width: 70rpx;
}
.baozhang {
display: inline-block;
width: 25%;
}
.baozhang_img {
display: block;
height: 58rpx;
margin: 0 auto;
width: 58rpx;
}
.baozhang_text {
color: #555;
font-size: 24rpx;
text-align: center;
width: 100%;
}
.page_nav {
height: 50rpx;
width: 100%;
}
.modle_border {
background: #fff;
margin-top: 20rpx;
width: 100%;
}
.btm_nav,
.nav_nav {
height: 88rpx;
width: 100%;
}
.btm_nav {
background: #fff;
bottom: 0rpx;
box-shadow: 0-1rpx 0 0 rgba(0, 0, 0, 0.1);
position: fixed;
}
.btm_nav_small {
color: #555;
display: inline-block;
font-size: 20rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
vertical-align: top;
width: 17.333%;
}
.btm_nav_small_img {
display: block;
height: 40rpx;
margin: 14rpx auto 0;
width: 40rpx;
}
.btm_nav_small_title {
color: #555;
font-size: 20rpx;
line-height: 35rpx;
text-align: center;
width: 100%;
}
.btm_nav_big_index {
background: #3d61f0;
}
.btm_nav_big_index,
.btm_nav_big_second {
border-radius: 0;
color: #fff;
display: inline-block;
font-size: 28rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
vertical-align: top;
width: 24%;
}
.btm_nav_big_second {
background: #fb9145;
}
button::after {
border: none;
}
.end_none {
color: #8a8a8a;
font-size: 28rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
width: 100%;
}
.banner1 {
background: #3d61f0;
height: 300rpx;
width: 100%;
}
.banner_modle1 {
background: #fff;
border-radius: 10rpx;
box-shadow: 0 4rpx 6rpx 0 rgba(0, 0, 0, 0.1);
height: 300rpx;
margin: -240rpx auto 0;
width: 690rpx;
}
.banner_modle_top1 {
border-bottom: 1rpx solid #f9f9f9;
height: 100rpx;
margin-left: 30rpx;
padding-bottom: 30rpx;
padding-top: 30rpx;
width: 630rpx;
}
.banner_modle_top_img1 {
border-radius: 100%;
float: left;
height: 100rpx;
width: 100rpx;
}
.banner_modle_top_title1 {
color: #000;
float: left;
font-size: 30rpx;
margin-left: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 70%;
word-break: keep-all;
}
.banner_modle_top_btn1 {
border: 1px solid #3d61f0;
border-radius: 100rpx;
color: #3d61f0;
float: left;
font-size: 20rpx;
height: 36rpx;
line-height: 34rpx;
margin-left: 35rpx;
margin-top: 20rpx;
text-align: center;
width: 90rpx;
}
.banner_modle_down1 {
display: block;
height: 135rpx;
margin: 0 auto;
padding-top: 1rpx;
width: 630rpx;
}
.banner_modle_down_modle1 {
display: inline-block;
height: 137rpx;
vertical-align: top;
width: 208rpx;
}
.banner_modle_down_modle_top1 {
color: #000;
font-size: 30rpx;
margin-top: 30rpx;
text-align: center;
width: 100%;
}
.banner_modle_down_modle_down1 {
color: #9295a8;
font-size: 24rpx;
text-align: center;
width: 100%;
}
.banner_modle_down_border1 {
background: #f0f0f0;
display: inline-block;
height: 30rpx;
margin-top: 50rpx;
vertical-align: top;
width: 1rpx;
}
.modle {
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
height: 180rpx;
margin: 0 auto;
padding-bottom: 30rpx;
padding-top: 30rpx;
width: 690rpx;
}
.modle_img {
background: #e0e0e0;
border-radius: 10rpx;
float: left;
height: 180rpx;
width: 270rpx;
}
.modle_name {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
color: #333;
display: -webkit-box;
font-size: 30rpx;
font-weight: 700;
overflow: hidden;
padding-left: 20rpx;
text-overflow: ellipsis;
width: 100%;
}
.modle_chexing {
color: #7a7a7a;
font-size: 24rpx;
margin-top: 20rpx;
}
.modle_chexing,
.modle_price {
overflow: hidden;
padding-left: 20rpx;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
word-break: keep-all;
}
.modle_price {
bottom: 0rpx;
color: #f75f5f;
font-size: 30rpx;
font-weight: 700;
position: absolute;
}
.message_border {
float: left;
height: 180rpx;
position: relative;
width: 420rpx;
}
.ziying {
background: #3d61f0;
display: inline-block;
margin-left: 10rpx;
margin-top: -5rpx;
vertical-align: middle;
width: 80rpx;
}
.tuijian,
.ziying {
border-radius: 5rpx;
color: #fff;
font-size: 16rpx;
height: 30rpx;
line-height: 30rpx;
text-align: center;
}
.tuijian {
background: #ec6d6e;
margin-top: 152rpx;
position: absolute;
width: 56rpx;
}