作者 李芳银

新建webview页面

... ... @@ -44,6 +44,10 @@ App({
}
})
}
let token = wx.getStorageSync('token')
if (token) {
this.getCommon()
}
},
onShow: function (res) {
console.log(res);
... ... @@ -117,6 +121,28 @@ App({
})
return
},
async getCommon() {
let that = this
wx.login({
success(res) {
console.log(res);
request({
url: 'api/common/getUnionid',
method: "POST",
data: {
code: res.code
}
})
.then(res => {
console.log(res, 'api/common/getUnionid');
console.log('新出的接口', res);
}).catch(err => {
console.log(err);
console.log('新出的接口出错', err);
})
}
})
},
tipsFun(item) {
wx.showToast({
title: item,
... ...
... ... @@ -112,7 +112,8 @@
"pages/VSpikeMall/VSpikeMall",
"pages/VtuanOrderDetail/VtuanOrderDetail",
"pages/Vnew4Sstore/Vnew4Sstore",
"pages/carDetails/carDetails"
"pages/carDetails/carDetails",
"pages/webview/webview"
],
"window": {
"backgroundTextStyle": "dark",
... ... @@ -121,7 +122,6 @@
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false
},
"tabBar": {
"color": "#8C9198",
"backgroundColor": "#fff",
... ... @@ -159,12 +159,11 @@
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"permission":{
"scope.userLocation" :{
"desc":"车唛优选小程序请求获取您的位置信息"
}
}
"permission": {
"scope.userLocation": {
"desc": "车唛优选小程序请求获取您的位置信息"
}
}
}
\ No newline at end of file
... ...
... ... @@ -30,6 +30,29 @@ Page({
goback() {
wx.navigateBack()
},
async common() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/my2/myGuan',
method: 'POST', //
data: {
id: that.data.id
}
})
console.log(data);
that.setData({
commonList: data,
})
} catch (err) {
console.log(err);
that.popTest(err.msg)
}
},
async getmoreList() { //获取
let that = this
try {
... ...
... ... @@ -16,7 +16,7 @@ Page({
i: 0,
city_id: '', //当前定位的城市ID
pin_id: '', // 品牌ID
id: '', // 4s店id
id: '', // 4s店id
name: '',
pai: '',
km: '',
... ...
... ... @@ -67,6 +67,7 @@ Page({
}
})
},
getPhoneNumber(e) { //手机号授权
let that = this
if (e.detail.errMsg == "getPhoneNumber:ok") {
... ...
import {
request
} from "../../request/index.js";
var QQMapWX = require('../../qqmap/qqmap-wx-jssdk.min.js');
var qqmapsdk;
const a = getApp()
Page({
data: {
baseUrl: a.globalData.baseUrl,
statusTop: a.globalData.statusHeight,
imagesUrl: a.globalData.imagesUrl,
four: 4,
six: 6,
msg: '',
autoplay: true,
interval: 3000,
indicatorDots: true,
indicator: '#F9F9F9',
indicatorActive: '#E8370F',
bind_car: 1,
time: 30 * 60 * 60 * 1000,
timeData: {},
pin_id: '1',
rest: false,
groom: [], // 推荐
homeInfo: [],
homeChe: {},
homeGouDay: {},
homeLoop: [],
S4Info: '',
id: '',
nobindCar: false,
goodDetal: {},
index4S: [],
city_id: '',
},
onLoad: function (options) {
let that = this
console.log(options);
qqmapsdk = new QQMapWX({
key: 'B4MBZ-3VICV-THBPQ-UCLHB-SLCEK-B7FIK'
});
},
onShow: function () {
let that = this
that.gethomeIndex()
that.gethomeLoop()
that.getS4Info()
that.getindexUser()
that.getCitied()
},
gohome() {
wx.switchTab({
url: '/pages/home/home'
})
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
more4SList() {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList'
})
},
goSearch() {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList?home=1'
})
},
addLoveCared() { // 去添加车辆
let that = this
let token = wx.getStorageSync("token")
if (token) {
if (that.data.nobindCar) {
wx.navigateTo({
url: '/pages/addcars/addcars'
})
} else {
wx.navigateTo({
url: '/pages/addcar/addcar'
})
}
} else {
that.goLogin()
}
},
async gethomeIndex() { // 获取首页
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/index',
})
console.log(data);
that.setData({
homeChe: data.che,
homeInfo: data.info,
homeGouDay: data.gou_day
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async gethomeLoop() { // 获取轮播
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/img',
})
console.log(data);
that.setData({
homeLoop: data,
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async getS4Info() { // 获取4s店数据
let that = this
try {
const {
data
} = await request({
url: 'api/index2/s4Info',
})
console.log(data);
if (data.code == 1) {
that.setData({
S4Info: data.data.name,
id: data.data.id,
bind_car: 1
})
} else {
//code为0的话,说明没绑定4s店
that.setData({
msg: data.msg,
bind_car: 0,
})
that.popTest()
}
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
// that.popTest()
if (err.code == 0) {
that.setData({
bind_car: 0,
})
}
}
},
async getindexUser() { // 获取 4s关注数据
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/indexUnder',
})
console.log(data, "4SD店列表");
if (data.length == 0) { // 如果是空数组,你调用的是【推荐4s店】这个接口
that.getCitied()
}
that.setData({
index4S: data
})
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
getCitied() { // 获取城市信息
let that = this
wx.getLocation({
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
success: function (res) {
qqmapsdk.reverseGeocoder({
//位置坐标,默认获取当前位置,非必须参数
//Object格式
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (res) { //成功后的回调
console.log(res);
var res = res.result;
let city = res.ad_info.city
that.saveCity(city)
},
fail: function (error) {
console.error(error);
},
complete: function (res) {
// console.log(res);
}
})
},
fail: res => {}
})
return
},
async saveCity(city) {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/citys/getCity',
data: {
city: city
}
})
console.log(data, "首页全局城市定位");
that.setData({
city_id: data.city_id
})
if (that.data.index4S.length == 0) {
that.getSuccessPage()
}
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
async getSuccessPage() { // 获取推荐
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/tuiList2',
data: {
city_id: that.data.city_id
}
})
console.log(data);
that.setData({
groom: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async clickAttention(e) { // 点击关注
let that = this
let id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
if (token) {
try {
const {
data
} = await request({
url: 'api/index2/guan',
data: {
id: id
}
})
console.log(data);
if (data.code == 1) {
a.popSuccessTest(data.msg)
}
setTimeout(() => { // 一旦有关注的店,就不显示推荐好店
// that.getSuccessPage()
that.getindexUser()
}, 500);
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
} else {
that.goLogin()
}
},
goToAccess(e) {
let id = e.currentTarget.dataset.id
console.log(e);
wx.navigateTo({
url: '/pages/goAccessoriesDetailIMG/goAccessoriesDetailIMG?id=' + id
})
},
gobind4S() { // 立即绑定4S店
let that = this
let pin_id = that.data.pin_id
wx.navigateTo({
url: '/pages/my4S/my4S?pin_id=' + pin_id,
})
},
goViolationQuery() { //
let that = this
let token = wx.getStorageSync('token')
if (token) {
wx.navigateTo({
url: '/pages/ViolationQuery/ViolationQuery'
})
} else {
that.goLogin()
}
},
goAccessoriesDetailIMG(e) { //进入配件详情
let that = this
let token = wx.getStorageSync('token')
let goodDetal = that.data.goodDetal
let tir = e.currentTarget.dataset.tir
if (token) {
if (tir == 1) {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good1_id
})
} else if (tir == 2) {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good2_id
})
} else {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good3_id
})
}
} else {
that.goLogin()
}
},
goV4Sstores(e) { // 进入我的4s店
let that = this
console.log(e);
let s4_id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
// a.globalData.stores_id = s4_id
console.log(s4_id);
if (token) {
wx.navigateTo({
// url: '/pages/4Sstore/4Sstore'
url: '/pages/Vnew4Sstore/Vnew4Sstore?s4_id=' + s4_id
})
} else {
that.goLogin()
}
},
ToV4Sstores(e) {
let that = this
let id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
if (token) {
wx.navigateTo({
url: '/pages/Vnew4Sstore/Vnew4Sstore?s4_id=' + id
})
} else {
that.goLogin()
}
},
goUpkeepimg() { // 保养预约
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe.length == 0) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe.length != 0 && id != '') {
wx.navigateTo({
url: '/pages/upkeepImg/upkeepImg?id=' + id
})
}
} else {
that.goLogin()
}
},
toMyGarage() { // 我的车库
let token = wx.getStorageSync("token")
if (token) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
this.goLogin()
}
},
goVopenPolicy() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
console.log(homeChe);
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicy/VopenPolicy?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
goVopenPolicyB() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicyB/VopenPolicyB?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
goVopenPolicyC() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicyC/VopenPolicyC?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
gobindChe() {
let that = this
wx.showModal({
title: '提示',
content: that.data.msg,
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
}
}
})
},
onShareAppMessage(options) {
var that = this;
var shareObj = {
title: "汽车互联网4S店",
path: '/pages/home/home',
imageUrl: '',
};
return shareObj;
},
toGoDetailA(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type1)
let good_id = idata.good1_id
that.publicDetails(jump, good_type, good_id)
},
toGoDetailB(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type2)
let good_id = idata.good2_id
that.publicDetails(jump, good_type, good_id)
},
toGoDetailC(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type3)
let good_id = idata.good3_id
that.publicDetails(jump, good_type, good_id)
},
publicDetails(jump, good_type, good_id) {
if (jump == 1) { //可以跳转
switch (good_type) {
case 1: // 人气好物
wx.navigateTo({
url: '/pages/detail/detail?id=' + good_id
})
break;
case 2: // 精选推荐
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + good_id
})
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VtuanDetail/VtuanDetail?id=' + good_id
})
break;
case 4: //限时抢购
wx.navigateTo({
url: '/pages/VSpikeMallDetail/VSpikeMallDetail?id=' + good_id
})
break;
case 5: //车型商品
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + good_id
})
break;
case -1: //推广活动详情
wx.navigateTo({
url: '/pages/activityDetails/activityDetails?id=' + good_id + '&type=1' + '&tap=0'
})
break;
case -2: //限时活动详情
wx.navigateTo({
url: '/pages/details/details?id=' + good_id + '&type=2'
})
break;
default:
break;
}
} else {
a.popTest('该4s店暂未运营')
}
},
async public() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: '',
data: {
goods_id: that.data.goods_id
}
})
console.log(data);
that.setData({
public: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
popTest() {
wx.showToast({
title: this.data.msg,
icon: 'none', //如果要纯文本,不要icon,将值设为'none'
duration: 1300
})
},
goLogin() {
wx.showModal({
title: '提示',
content: '您尚未登录,前往登录',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization?num=1'
})
} else {
// wx.switchTab({
// url: '/pages/home/home'
// })
}
}
})
},
popSuccessTest() {
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 1300, //停留时间
})
},
import {
request
} from "../../request/index.js";
var QQMapWX = require('../../qqmap/qqmap-wx-jssdk.min.js');
var qqmapsdk;
const a = getApp()
Page({
data: {
baseUrl: a.globalData.baseUrl,
statusTop: a.globalData.statusHeight,
imagesUrl: a.globalData.imagesUrl,
four: 4,
six: 6,
msg: '',
autoplay: true,
interval: 3000,
indicatorDots: true,
indicator: '#F9F9F9',
indicatorActive: '#E8370F',
bind_car: 1,
time: 30 * 60 * 60 * 1000,
timeData: {},
pin_id: '1',
rest: false,
groom: [], // 推荐
homeInfo: [],
homeChe: {},
homeGouDay: {},
homeLoop: [],
S4Info: '',
id: '',
nobindCar: false,
goodDetal: {},
index4S: [],
city_id: '',
},
onLoad: function (options) {
let that = this
console.log(options);
qqmapsdk = new QQMapWX({
key: 'B4MBZ-3VICV-THBPQ-UCLHB-SLCEK-B7FIK'
});
},
onShow: function () {
let that = this
that.gethomeIndex()
that.gethomeLoop()
that.getS4Info()
that.getindexUser()
that.getCitied()
},
gohome() {
wx.switchTab({
url: '/pages/home/home'
})
},
onChange(e) {
this.setData({
timeData: e.detail,
});
},
more4SList() {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList'
})
},
goSearch() {
wx.navigateTo({
url: '/pages/Vmore4SList/Vmore4SList?home=1'
})
},
linkWebview() {
wx.navigateTo({
url: '/pages/webview/webview?url=' + 'http://h5.goorcar.com/'
})
},
addLoveCared() { // 去添加车辆
let that = this
let token = wx.getStorageSync("token")
if (token) {
if (that.data.nobindCar) {
wx.navigateTo({
url: '/pages/addcars/addcars'
})
} else {
wx.navigateTo({
url: '/pages/addcar/addcar'
})
}
} else {
that.goLogin()
}
},
async gethomeIndex() { // 获取首页
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/index',
})
console.log(data);
that.setData({
homeChe: data.che,
homeInfo: data.info,
homeGouDay: data.gou_day
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async gethomeLoop() { // 获取轮播
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/img',
})
console.log(data);
that.setData({
homeLoop: data,
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async getS4Info() { // 获取4s店数据
let that = this
try {
const {
data
} = await request({
url: 'api/index2/s4Info',
})
console.log(data);
if (data.code == 1) {
that.setData({
S4Info: data.data.name,
id: data.data.id,
bind_car: 1
})
} else {
//code为0的话,说明没绑定4s店
that.setData({
msg: data.msg,
bind_car: 0,
})
that.popTest()
}
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
// that.popTest()
if (err.code == 0) {
that.setData({
bind_car: 0,
})
}
}
},
async getindexUser() { // 获取 4s关注数据
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/indexUnder',
})
console.log(data, "4SD店列表");
if (data.length == 0) { // 如果是空数组,你调用的是【推荐4s店】这个接口
that.getCitied()
}
that.setData({
index4S: data
})
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
getCitied() { // 获取城市信息
let that = this
wx.getLocation({
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
success: function (res) {
qqmapsdk.reverseGeocoder({
//位置坐标,默认获取当前位置,非必须参数
//Object格式
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function (res) { //成功后的回调
console.log(res);
var res = res.result;
let city = res.ad_info.city
that.saveCity(city)
},
fail: function (error) {
console.error(error);
},
complete: function (res) {
// console.log(res);
}
})
},
fail: res => {}
})
return
},
async saveCity(city) {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/citys/getCity',
data: {
city: city
}
})
console.log(data, "首页全局城市定位");
that.setData({
city_id: data.city_id
})
if (that.data.index4S.length == 0) {
that.getSuccessPage()
}
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
},
async getSuccessPage() { // 获取推荐
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/index2/tuiList2',
data: {
city_id: that.data.city_id
}
})
console.log(data);
that.setData({
groom: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
async clickAttention(e) { // 点击关注
let that = this
let id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
if (token) {
try {
const {
data
} = await request({
url: 'api/index2/guan',
data: {
id: id
}
})
console.log(data);
if (data.code == 1) {
a.popSuccessTest(data.msg)
}
setTimeout(() => { // 一旦有关注的店,就不显示推荐好店
// that.getSuccessPage()
that.getindexUser()
}, 500);
} catch (err) {
console.log(err);
a.popTest(err.msg)
}
} else {
that.goLogin()
}
},
goToAccess(e) {
let id = e.currentTarget.dataset.id
console.log(e);
wx.navigateTo({
url: '/pages/goAccessoriesDetailIMG/goAccessoriesDetailIMG?id=' + id
})
},
gobind4S() { // 立即绑定4S店
let that = this
let pin_id = that.data.pin_id
wx.navigateTo({
url: '/pages/my4S/my4S?pin_id=' + pin_id,
})
},
goViolationQuery() { //
let that = this
let token = wx.getStorageSync('token')
if (token) {
wx.navigateTo({
url: '/pages/ViolationQuery/ViolationQuery'
})
} else {
that.goLogin()
}
},
goAccessoriesDetailIMG(e) { //进入配件详情
let that = this
let token = wx.getStorageSync('token')
let goodDetal = that.data.goodDetal
let tir = e.currentTarget.dataset.tir
if (token) {
if (tir == 1) {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good1_id
})
} else if (tir == 2) {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good2_id
})
} else {
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + goodDetal.good3_id
})
}
} else {
that.goLogin()
}
},
goV4Sstores(e) { // 进入我的4s店
let that = this
console.log(e);
let s4_id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
// a.globalData.stores_id = s4_id
console.log(s4_id);
if (token) {
wx.navigateTo({
// url: '/pages/4Sstore/4Sstore'
url: '/pages/Vnew4Sstore/Vnew4Sstore?s4_id=' + s4_id
})
} else {
that.goLogin()
}
},
ToV4Sstores(e) {
let that = this
let id = e.currentTarget.dataset.id
let token = wx.getStorageSync('token')
if (token) {
wx.navigateTo({
url: '/pages/Vnew4Sstore/Vnew4Sstore?s4_id=' + id
})
} else {
that.goLogin()
}
},
goUpkeepimg() { // 保养预约
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe.length == 0) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe.length != 0 && id != '') {
wx.navigateTo({
url: '/pages/upkeepImg/upkeepImg?id=' + id
})
}
} else {
that.goLogin()
}
},
toMyGarage() { // 我的车库
let token = wx.getStorageSync("token")
if (token) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
this.goLogin()
}
},
goVopenPolicy() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
console.log(homeChe);
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicy/VopenPolicy?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
goVopenPolicyB() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicyB/VopenPolicyB?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
goVopenPolicyC() {
let that = this
let token = wx.getStorageSync('token')
let id = that.data.id
let homeChe = that.data.homeChe
if (token) {
if (id == '') {
that.setData({
msg: '您尚未绑定4S店'
})
that.popTest()
}
if (homeChe == null) {
that.setData({
msg: '请先绑定爱车'
})
that.popTest()
}
if (homeChe != null && id != '') {
wx.navigateTo({
url: '/pages/VopenPolicyC/VopenPolicyC?che_id=' + homeChe.id
})
}
} else {
that.goLogin()
}
},
gobindChe() {
let that = this
wx.showModal({
title: '提示',
content: that.data.msg,
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/MyGarage/MyGarage?tdTap=1'
})
} else {
}
}
})
},
onShareAppMessage(options) {
var that = this;
var shareObj = {
title: "汽车互联网4S店",
path: '/pages/home/home',
imageUrl: '',
};
return shareObj;
},
toGoDetailA(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type1)
let good_id = idata.good1_id
that.publicDetails(jump, good_type, good_id)
},
toGoDetailB(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type2)
let good_id = idata.good2_id
that.publicDetails(jump, good_type, good_id)
},
toGoDetailC(e) {
let that = this
let idata = e.currentTarget.dataset.idata
let jump = idata.jump_type
let good_type = Number(idata.good_type3)
let good_id = idata.good3_id
that.publicDetails(jump, good_type, good_id)
},
publicDetails(jump, good_type, good_id) {
if (jump == 1) { //可以跳转
switch (good_type) {
case 1: // 人气好物
wx.navigateTo({
url: '/pages/detail/detail?id=' + good_id
})
break;
case 2: // 精选推荐
wx.navigateTo({
url: '/pages/productdetailsImg/productdetailsImg?id=' + good_id
})
break;
case 3: // 团购热卖
wx.navigateTo({
url: '/pages/VtuanDetail/VtuanDetail?id=' + good_id
})
break;
case 4: //限时抢购
wx.navigateTo({
url: '/pages/VSpikeMallDetail/VSpikeMallDetail?id=' + good_id
})
break;
case 5: //车型商品
wx.navigateTo({
url: '/pages/carDetails/carDetails?id=' + good_id
})
break;
case -1: //推广活动详情
wx.navigateTo({
url: '/pages/activityDetails/activityDetails?id=' + good_id + '&type=1' + '&tap=0'
})
break;
case -2: //限时活动详情
wx.navigateTo({
url: '/pages/details/details?id=' + good_id + '&type=2'
})
break;
default:
break;
}
} else {
a.popTest('该4s店暂未运营')
}
},
async public() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: '',
data: {
goods_id: that.data.goods_id
}
})
console.log(data);
that.setData({
public: data
})
} catch (err) {
console.log(err);
that.setData({
msg: err.msg
})
that.popTest()
}
},
popTest() {
wx.showToast({
title: this.data.msg,
icon: 'none', //如果要纯文本,不要icon,将值设为'none'
duration: 1300
})
},
goLogin() {
wx.showModal({
title: '提示',
content: '您尚未登录,前往登录',
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/authorization/authorization?num=1'
})
} else {
// wx.switchTab({
// url: '/pages/home/home'
// })
}
}
})
},
popSuccessTest() {
wx.showToast({
title: this.data.msg,
icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success
duration: 1300, //停留时间
})
},
})
\ No newline at end of file
... ...
<view class="container">
<view class="header">
<view class="s" style='height:{{statusTop}}px'></view>
<view class="left_img">
<view class="title_oage" bindtap="gohome">汽车互联网4S店</view>
</view>
</view>
<view class="health">
<view class="top_new">
<view class="car_q">
<view class="nv_lf">
<view class="nv_two" wx:if="{{homeChe == null}}" bindtap="addLoveCared">
<image src="{{imagesUrl}}assets/static/img/v-o.png" />
<view class="nv_top_names">未添加爱车</view>
</view>
<view class="nv_one" wx:else>
<image src="{{homeChe.pin.img}}" />
<view class="car_img">
<view class="car_n">{{homeChe.pai_name}}</view>
<view class="car_m">{{homeChe.pin.name}}</view>
</view>
</view>
</view>
<view class="nv_rt" bindtap="toMyGarage">
<image src="{{imagesUrl}}assets/static/img/v-w.png" />
<view class="car_b">车库</view>
</view>
</view>
<view class="car_center">
<view class="car_item">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-k.png" />
<view class="car_i_text">车辆保险</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.xian_str!='???天到期'}}">
{{homeGouDay.xian_str}}
</view>
</view>
<view class="car_item" bindtap="goUpkeepimg">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-j.png" />
<view class="car_i_text">车辆保养</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.yang_str!='???天到期'}}">
{{homeGouDay.yang_str}}
</view>
</view>
<view class="car_item">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-l.png" />
<view class="car_i_text">车辆年检</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.jian_str!='???天到期'}}">
{{homeGouDay.jian_str}}
</view>
</view>
</view>
<view class="car_d_gong">
<image src="{{imagesUrl}}assets/static/img/v-z.png" />
<swiper class="tab_right" vertical="true" circular="true" autoplay="true" interval="2000" display-multiple-items='1'>
<block wx:for='{{homeInfo}}' wx:key="index" wx:for-index="index" wx:for-item="item">
<swiper-item>
<view class="time">{{item.cnt}}</view>
</swiper-item>
</block>
</swiper>
</view>
<!-- 轮播 -->
<view class="banner_image">
<swiper class="banner" indicator-color="{{indicator}}" indicator-active-color="{{indicatorActive}}" circular='{{circular}}' indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}">
<swiper-item wx:for="{{homeLoop}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<navigator class="ims" hover-class="none">
<image src="{{item.img}}" />
</navigator>
</swiper-item>
</swiper>
</view>
</view>
<view class="center_nav {{homeGouDay.yang_str !='???天到期'? '' : 'active_conter_nav'}}">
<view class="nav_new">
<!-- <view class="nav_item" bindtap="goViolationQuery">
<image src="{{imagesUrl}}assets/static/img/v-i.png" />
<view class="nav_text">违章查询</view>
</view> -->
<view class="nav_item" bindtap="goUpkeepimg">
<image src="{{imagesUrl}}assets/static/img/v-h.png" />
<view class="nav_text">保养预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicy">
<image src="{{imagesUrl}}assets/static/img/v-g.png" />
<view class="nav_text">保险预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicyC">
<image src="{{imagesUrl}}assets/static/img/v-f.png" />
<view class="nav_text">年检预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicyB">
<image src="{{imagesUrl}}assets/static/img/v-e.png" />
<view class="nav_text">爱车评估</view>
</view>
</view>
<view class="nav_search" bindtap="goSearch">
<image src="{{imagesUrl}}assets/static/img/v-y.png" />
<input type="text" class="nav_sear" placeholder="请输入汽车4S店名称" placeholder-class="input_placeholder" />
</view>
<view class="bind_nm">
<view class="bind_box">
<view class="bind_have" bindtap="gobind4S" wx:if="{{bind_car== 0}}">
<view class="bind_lf">
<image src="{{imagesUrl}}assets/static/img/v-r.png" />
<view class="bind_tex">未绑定4S店</view>
</view>
<view class="bind_rt" style="justify-content: flex-end;">
<view class="bind_tdt">立即绑定</view>
<image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
</view>
</view>
<view class="wu_bind">
<view class="no_bind" wx:if="{{bind_car== 0 && index4S.length ==0}}">
<view class="bind_good">推荐好店</view>
<view class="bind_list">
<block wx:for="{{groom}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="bind_item" bindtap="ToV4Sstores" data-id="{{item.id}}">
<view class="bind_box">
<view class="b_name">{{item.name}}</view>
<view class="b_star {{item.guan_id== 1?'ative' :''}}" catchtap="clickAttention" data-id="{{item.id}}">
<image src="{{imagesUrl}}assets/static/img/x_a.png" />
<view class="rext">{{item.guan_id ==1? '已关注' :'关注'}}</view>
</view>
</view>
<view class="b_address title_content2">{{item.address_detail}}</view>
</view>
</block>
</view>
</view>
</view>
<view class="you_bind" wx:if="{{index4S.length !=0}}">
<block wx:for="{{index4S}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="s_bind_box">
<view class="bind_have" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}">
<view class="bind_lf">
<image src="{{imagesUrl}}assets/static/img/v-r.png" />
<view class="bind_tex">{{item.s4_data.name}}</view>
</view>
<view class="bind_rt" style="justify-content: flex-end;">
<view class="bind_tdt">进入4S店</view>
<image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
</view>
</view>
<view class="star_Car" wx:if="{{item.ming_data.length !=0}}">
<view class="star_name">热卖商品</view>
<view class="star_list">
<scroll-view scroll-x="true" bindscroll="scroll" style="width:100%;" bindscrolltoupper="upper" bindscrolltolower="lower">
<view class="scro">
<view class="category_list" wx:for="{{item.ming_data}}" wx:key="index1" wx:for-index="index1" wx:for-item="item1" catchtap="goToAccess" data-id="{{item1.id}}">
<image src="{{item1.img}}"></image>
<view class="car_name">{{item1.name}}</view>
<view class="car_price">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item1.price}}</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="week_hot">
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" catchtap="toGoDetailA" data-idata="{{item.img_data}}" data-tir="0">
<image src="{{item.img_data.image1}}" />
</view>
<view class="rt_box">
<view class="ry_top" catchtap="toGoDetailB" data-idata="{{item.img_data}}" data-tir="1">
<image src="{{item.img_data.image2}}" />
</view>
<view class="ry_down" catchtap="toGoDetailC" data-idata="{{item.img_data}}" data-tir="2">
<image src="{{item.img_data.image3}}" />
</view>
</view>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
<view class="more_4S" bindtap="more4SList">
<image src="{{imagesUrl}}assets/static/img/v-u.png" />
<view class="more_name">关注更多4S店</view>
</view>
</view>
</view>
<view class="container">
<view class="header">
<view class="s" style='height:{{statusTop}}px'></view>
<view class="left_img">
<view class="title_oage" bindtap="gohome">汽车互联网4S店</view>
</view>
</view>
<view class="health">
<view class="top_new">
<view class="car_q">
<view class="nv_lf">
<view class="nv_two" wx:if="{{homeChe == null}}" bindtap="addLoveCared">
<image src="{{imagesUrl}}assets/static/img/v-o.png" />
<view class="nv_top_names">未添加爱车</view>
</view>
<view class="nv_one" wx:else>
<image src="{{homeChe.pin.img}}" />
<view class="car_img">
<view class="car_n">{{homeChe.pai_name}}</view>
<view class="car_m">{{homeChe.pin.name}}</view>
</view>
</view>
</view>
<view class="nv_rt" bindtap="toMyGarage">
<image src="{{imagesUrl}}assets/static/img/v-w.png" />
<view class="car_b">车库</view>
</view>
</view>
<view class="car_center">
<view class="car_item">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-k.png" />
<view class="car_i_text">车辆保险</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.xian_str!='???天到期'}}">
{{homeGouDay.xian_str}}
</view>
</view>
<view class="car_item" bindtap="goUpkeepimg">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-j.png" />
<view class="car_i_text">车辆保养</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.yang_str!='???天到期'}}">
{{homeGouDay.yang_str}}
</view>
</view>
<view class="car_item">
<view class="car_i_a">
<image src="{{imagesUrl}}assets/static/img/v-l.png" />
<view class="car_i_text">车辆年检</view>
</view>
<view class="car_i_b" wx:if="{{homeGouDay.jian_str!='???天到期'}}">
{{homeGouDay.jian_str}}
</view>
</view>
</view>
<view class="car_d_gong">
<image src="{{imagesUrl}}assets/static/img/v-z.png" />
<swiper class="tab_right" vertical="true" circular="true" autoplay="true" interval="2000" display-multiple-items='1'>
<block wx:for='{{homeInfo}}' wx:key="index" wx:for-index="index" wx:for-item="item">
<swiper-item>
<view class="time">{{item.cnt}}</view>
</swiper-item>
</block>
</swiper>
</view>
<!-- 轮播 -->
<view class="banner_image">
<swiper class="banner" indicator-color="{{indicator}}" indicator-active-color="{{indicatorActive}}" circular='{{circular}}' indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}">
<swiper-item wx:for="{{homeLoop}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<navigator class="ims" hover-class="none">
<image src="{{item.img}}" bindtap="linkWebview" />
</navigator>
</swiper-item>
</swiper>
</view>
</view>
<view class="center_nav {{homeGouDay.yang_str !='???天到期'? '' : 'active_conter_nav'}}">
<view class="nav_new">
<!-- <view class="nav_item" bindtap="goViolationQuery">
<image src="{{imagesUrl}}assets/static/img/v-i.png" />
<view class="nav_text">违章查询</view>
</view> -->
<view class="nav_item" bindtap="goUpkeepimg">
<image src="{{imagesUrl}}assets/static/img/v-h.png" />
<view class="nav_text">保养预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicy">
<image src="{{imagesUrl}}assets/static/img/v-g.png" />
<view class="nav_text">保险预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicyC">
<image src="{{imagesUrl}}assets/static/img/v-f.png" />
<view class="nav_text">年检预约</view>
</view>
<view class="nav_item" bindtap="goVopenPolicyB">
<image src="{{imagesUrl}}assets/static/img/v-e.png" />
<view class="nav_text">爱车评估</view>
</view>
</view>
<view class="nav_search" bindtap="goSearch">
<image src="{{imagesUrl}}assets/static/img/v-y.png" />
<input type="text" class="nav_sear" placeholder="请输入汽车4S店名称" placeholder-class="input_placeholder" />
</view>
<view class="bind_nm">
<view class="bind_box">
<view class="bind_have" bindtap="gobind4S" wx:if="{{bind_car== 0}}">
<view class="bind_lf">
<image src="{{imagesUrl}}assets/static/img/v-r.png" />
<view class="bind_tex">未绑定4S店</view>
</view>
<view class="bind_rt" style="justify-content: flex-end;">
<view class="bind_tdt">立即绑定</view>
<image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
</view>
</view>
<view class="wu_bind">
<view class="no_bind" wx:if="{{bind_car== 0 && index4S.length ==0}}">
<view class="bind_good">推荐好店</view>
<view class="bind_list">
<block wx:for="{{groom}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="bind_item" bindtap="ToV4Sstores" data-id="{{item.id}}">
<view class="bind_box">
<view class="b_name">{{item.name}}</view>
<view class="b_star {{item.guan_id== 1?'ative' :''}}" catchtap="clickAttention" data-id="{{item.id}}">
<image src="{{imagesUrl}}assets/static/img/x_a.png" />
<view class="rext">{{item.guan_id ==1? '已关注' :'关注'}}</view>
</view>
</view>
<view class="b_address title_content2">{{item.address_detail}}</view>
</view>
</block>
</view>
</view>
</view>
<view class="you_bind" wx:if="{{index4S.length !=0}}">
<block wx:for="{{index4S}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="s_bind_box">
<view class="bind_have" catchtap="goV4Sstores" data-id="{{item.s4_data.id}}">
<view class="bind_lf">
<image src="{{imagesUrl}}assets/static/img/v-r.png" />
<view class="bind_tex">{{item.s4_data.name}}</view>
</view>
<view class="bind_rt" style="justify-content: flex-end;">
<view class="bind_tdt">进入4S店</view>
<image src="{{imagesUrl}}assets/static/img/x-h.png" style="width : 28rpx ;height : 20rpx" />
</view>
</view>
<view class="star_Car" wx:if="{{item.ming_data.length !=0}}">
<view class="star_name">热卖商品</view>
<view class="star_list">
<scroll-view scroll-x="true" bindscroll="scroll" style="width:100%;" bindscrolltoupper="upper" bindscrolltolower="lower">
<view class="scro">
<view class="category_list" wx:for="{{item.ming_data}}" wx:key="index1" wx:for-index="index1" wx:for-item="item1" catchtap="goToAccess" data-id="{{item1.id}}">
<image src="{{item1.img}}"></image>
<view class="car_name">{{item1.name}}</view>
<view class="car_price">
<view class="pt">
<view class="pt_icon">¥</view>
<view class="pt_price">{{item1.price}}</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="week_hot">
<view class="star_name">本周特卖</view>
<view class="week_box">
<view class="left_big" catchtap="toGoDetailA" data-idata="{{item.img_data}}" data-tir="0">
<image src="{{item.img_data.image1}}" />
</view>
<view class="rt_box">
<view class="ry_top" catchtap="toGoDetailB" data-idata="{{item.img_data}}" data-tir="1">
<image src="{{item.img_data.image2}}" />
</view>
<view class="ry_down" catchtap="toGoDetailC" data-idata="{{item.img_data}}" data-tir="2">
<image src="{{item.img_data.image3}}" />
</view>
</view>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
<view class="more_4S" bindtap="more4SList">
<image src="{{imagesUrl}}assets/static/img/v-u.png" />
<view class="more_name">关注更多4S店</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
page {
height: 100%;
}
.city_box {
height: 100%;
background: #fff;
display: flex;
}
.city_left {
flex: 1;
}
.city_right {
width: 90rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.letter_item {
flex: 1;
font-size: 32rpx;
color: #33B9FF;
text-align: center;
}
.city_locate,
.national {
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 25rpx;
}
.city_locate_title {
color: #999;
margin-right: 20rpx;
}
.new_city {
/* background: #efefef; */
font-size: 28rpx;
}
.redaTitle {
padding-left: 25rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.redaTitle .new_city_title {
line-height: 50rpx;
color: #999;
padding-left: 25rpx;
margin-bottom: 20rpx;
}
.redaTitle .red {
width: 12rpx;
height: 30rpx;
background-color: #E8370F;
margin-bottom: 20rpx;
}
.new_city_box {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.new_city_text {
width: 198rpx;
text-align: center;
line-height: 70rpx;
background: #fff;
border-radius: 35rpx;
margin: 0 0 22rpx 22rpx;
border: 1rpx solid #ccc;
}
.city_first_letter {
height: 40rpx;
padding-left: 32rpx;
font-size: 34rpx;
color: #E8370F;
}
.city_name {
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 32rpx;
}
/* 自定义样式 */
.cityname {
display: flex;
width: 100%;
}
.cityname .address_tj {
width: 160rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 75rpx;
text-align: center;
}
.cityname .search {
flex: 1;
background-color: #eeeeee;
border-radius: 16rpx;
display: flex;
justify-content: center;
align-items: center;
float: left;
}
.cityname .search input {
text-indent: 15rpx;
color: #ccc;
font-size: 28rpx;
height: 70rpx;
line-height: 70rpx;
width: 100%;
}
.cityname .search image {
margin-left: 20rpx;
width: 31rpx;
height: 31rpx;
}
.ci {
width: 100%;
display: flex;
align-items: center;
padding: 40rpx 15rpx;
box-sizing: border-box;
}
.ci .dingwei {
display: flex;
align-items: center;
}
.ci .dingwei image {
width: 32rpx;
height: 32rpx;
}
.ci .dingwei .cityDW0 {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
}
.ci .tjcs {
font-size: 24rpx;
line-height: 40rpx;
color: #8C9198;
margin-left: 20rpx;
page {
height: 100%;
}
.city_box {
height: 100%;
background: #fff;
display: flex;
}
.city_left {
flex: 1;
}
.city_right {
width: 90rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.letter_item {
flex: 1;
font-size: 32rpx;
color: #33B9FF;
text-align: center;
}
.city_locate,
.national {
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 25rpx;
}
.city_locate_title {
color: #999;
margin-right: 20rpx;
}
.new_city {
/* background: #efefef; */
font-size: 28rpx;
}
.redaTitle {
padding-left: 25rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.redaTitle .new_city_title {
line-height: 50rpx;
color: #999;
padding-left: 25rpx;
margin-bottom: 20rpx;
}
.redaTitle .red {
width: 12rpx;
height: 30rpx;
background-color: #E8370F;
margin-bottom: 20rpx;
}
.new_city_box {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.new_city_text {
width: 198rpx;
text-align: center;
line-height: 70rpx;
background: #fff;
border-radius: 35rpx;
margin: 0 0 22rpx 22rpx;
border: 1rpx solid #ccc;
}
.city_first_letter {
height: 40rpx;
padding-left: 32rpx;
font-size: 34rpx;
color: #E8370F;
}
.city_name {
height: 80rpx;
line-height: 80rpx;
border-bottom: 1px solid #efefef;
font-size: 28rpx;
color: #333;
padding-left: 32rpx;
}
/* 自定义样式 */
.cityname {
display: flex;
width: 100%;
}
.cityname .address_tj {
width: 160rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 75rpx;
text-align: center;
}
.cityname .search {
flex: 1;
background-color: #eeeeee;
border-radius: 16rpx;
display: flex;
justify-content: center;
align-items: center;
float: left;
}
.cityname .search input {
text-indent: 15rpx;
color: #ccc;
font-size: 28rpx;
height: 70rpx;
line-height: 70rpx;
width: 100%;
}
.cityname .search image {
margin-left: 20rpx;
width: 31rpx;
height: 31rpx;
}
.ci {
width: 100%;
display: flex;
align-items: center;
padding: 40rpx 15rpx;
box-sizing: border-box;
}
.ci .dingwei {
display: flex;
align-items: center;
}
.ci .dingwei image {
width: 32rpx;
height: 32rpx;
}
.ci .dingwei .cityDW0 {
font-size: 28rpx;
line-height: 40rpx;
color: #E8370F;
}
.ci .tjcs {
font-size: 24rpx;
line-height: 40rpx;
color: #8C9198;
margin-left: 20rpx;
}
\ No newline at end of file
... ...
... ... @@ -36,6 +36,7 @@ Page({
is_id: '',
nomore: false,
},
onLoad: function (options) {
let that = this
... ... @@ -296,13 +297,15 @@ Page({
that.setData({
groomAList: that.data.groomAList.concat(data.data),
})
}
that.setData({
that.setData({
totalA: data.total,
current_page: data.current_page,
last_page: data.last_page,
})
console.log(this.data.groomAList);
wx.hideLoading()
} catch (err) {
... ...
page {
background: #f9f9f9;
}
.container {
width: 100%;
.header {
width: 100%;
// background: #f53526;
background: linear-gradient(180deg, #F53526 100%, #FD7F2E 100%);
.left_img {
width: 100%;
display: flex;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
height: 88rpx;
.title_oage {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 500;
}
}
}
.health_home {
width: 100%;
.bgs {
width: 100%;
box-sizing: border-box;
background: linear-gradient(180deg, #F53526 100%, #FD7F2E 100%);
.searchbox {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
.searchinput {
width: 100%;
display: flex;
align-items: center;
border-radius: 28rpx;
background-color: #fff;
padding: 10rpx 20rpx;
box-sizing: border-box;
.searchicon {
width: 32rpx;
height: 32rpx;
}
input {
flex: 1;
text-indent: 20rpx;
height: 100%;
}
}
}
.top_tit {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
.tit_list {
width: 100%;
height: 60rpx;
opacity: 0.6;
background: #db1d0e;
display: flex;
align-items: center;
margin-top: 14rpx;
.tit_item {
height: 60rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
image {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
.item_names {
font-size: 28rpx;
color: #fff;
}
}
}
}
.cate_nav {
width: 100%;
margin-top: 18rpx;
.tex {
display: flex;
align-items: center;
width: 100%;
height: 88rpx;
padding-left: 32rpx;
box-sizing: border-box;
position: relative;
.cate_list {
width: 100%;
padding-right: 88rpx;
box-sizing: border-box;
.cate_item {
min-width: 750rpx;
display: flex;
align-items: center;
white-space: nowrap;
overflow-y: scroll;
padding-bottom: 20rpx;
box-sizing: border-box;
.item_cater {
font-size: 28rpx;
color: #fff;
margin-right: 40rpx;
flex-shrink: 0;
}
.active {
position: relative;
font-size: 36rpx;
&::after {
content: '';
width: 60rpx;
height: 6rpx;
background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.4));
position: absolute;
bottom: -17rpx;
left: 50%;
transform: translateX(-50%);
z-index: 20;
}
}
}
}
.cateGory {
position: absolute;
top: 0;
right: 0;
width: 75rpx;
height: 88rpx;
background: #f53526;
display: flex;
align-items: center;
justify-content: center;
image {
width: 48rpx;
height: 48rpx;
}
}
}
.cate_child {
width: 100%;
padding: 32rpx;
box-sizing: border-box;
background-color: #f9f9f9;
.child_box {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
background-color: #fff;
border-radius: 8rpx;
.child_item {
width: 20%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
width: 120rpx;
height: 120rpx;
}
.child_name {
width: 100%;
text-align: center;
padding: 12rpx 0;
box-sizing: border-box;
font-size: 26rpx;
color: #06121E;
}
}
}
}
}
.health_home_item {
widows: 100%;
// 轮播
.banner_image {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.banner {
width: 100%;
height: 280rpx;
border-radius: 12rpx;
swiper-item {
width: 100%;
height: 100%;
border-radius: 12rpx;
.ims {
height: 280rpx;
border-radius: 12rpx;
image {
width: 100%;
height: 100%;
border-radius: 12rpx;
}
}
}
}
}
.wai_star {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
background: linear-gradient(180deg, rgba(255, 255, 255, 0), #f9f9f9);
.star_chan {
width: 100%;
padding: 20rpx 0 20rpx 20rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 8rpx;
.star_names {
width: 100%;
position: relative;
font-size: 28rpx;
color: #06121F;
font-weight: 500;
padding-left: 12rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
&::after {
content: '';
position: absolute;
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
background: #E8370F;
border-radius: 4rpx;
}
}
.star_list {
width: 100%;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.imgzU {
margin-right: 24rpx;
height: 180rpx;
flex-shrink: 0;
image {
width: 180rpx;
border-radius: 8rpx;
}
}
}
}
}
}
}
}
}
.li_nv {
width: 100%;
padding-bottom: 100rpx;
box-sizing: border-box;
.small_nav {
width: 100%;
margin-top: 20rpx;
padding-left: 32rpx;
box-sizing: border-box;
background-color: #f9f9f9;
.nav_slit {
width: 100%;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.smal_item {
min-width: 160rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
.s_item_name {
font-size: 32rpx;
color: #8C9198;
font-family: PingFang-SC-Bold;
line-height: 48rpx;
}
.s_item_color {
font-size: 24rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #8c9198;
line-height: 48rpx;
}
&::after {
content: '';
position: absolute;
right: 0;
border-right: 2rpx solid #bdc4ce;
height: 46rpx;
// top: 50%;
// transform: translate(-50%);
}
}
.activeColor {
.s_item_name {
font-size: 32rpx;
color: #06121E;
font-family: PingFang-SC-Bold;
font-weight: 600;
}
.s_item_color {
padding: 0 20rpx;
box-sizing: border-box;
background: #e8370f;
border-radius: 18rpx;
color: #fff;
height: 34rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 7rpx 0;
}
}
}
}
}
}
.store_list {
width: 100%;
padding: 0 14rpx 0;
box-sizing: border-box;
.list_masonry_a {
width: 100%;
.footlist_a {
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
.foot_left_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
.foot_right_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
&::after {
content: '';
clear: both;
display: block;
}
}
}
}
}
.bgt_center {
width: 100%;
padding: 32rpx 14rpx;
box-sizing: border-box;
.wai_star {
width: 100%;
// padding: 0 32rpx;
// box-sizing: border-box;
.star_chan {
width: 100%;
// padding: 20rpx 0;
box-sizing: border-box;
.bgs_star {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20rpx;
box-sizing: border-box;
.star_names {
position: relative;
font-size: 32rpx;
color: #06121F;
font-weight: 600;
padding-left: 16rpx;
box-sizing: border-box;
&::after {
content: '';
position: absolute;
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
background: #E8370F;
border-radius: 4rpx;
}
}
.star_more {
font-size: 24rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
color: #5b5e63;
}
}
.star_list {
width: 100%;
background-color: #fff;
border-radius: 8rpx;
padding: 20rpx 0rpx 20rpx 24rpx;
box-sizing: border-box;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.imgzU {
margin-right: 24rpx;
// width: 180rpx;
flex-shrink: 0;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
position: relative;
image {
width: 180rpx;
height: 180rpx;
border-radius: 8rpx;
}
.v_post {
width: 130rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
color: #Fff;
font-size: 22rpx;
background: #f02928;
border-radius: 4rpx;
position: absolute;
top: 0;
left: 0;
z-index: 2;
font-family: PingFang SC,
PingFang SC-Regular;
}
.text_dian {
width: 100%;
padding-top: 22rpx;
box-sizing: border-box;
.text_pt {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.pt_name {
font-size: 24rpx;
font-family: PingFangSC-Medium;
text-align: left;
color: #fe0e1f;
font-weight: 600;
}
.pt {
display: flex;
align-items: baseline;
margin-left: 5rpx;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 600;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 600;
}
}
}
.del {
width: 100%;
text-align: center;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
}
}
}
.tuijie {
width: 100%;
margin-top: 30rpx;
.tui_name {
width: 100%;
padding-bottom: 20rpx;
box-sizing: border-box;
font-size: 32rpx;
font-family: PingFang SC,
PingFang SC-Medium;
font-weight: 600;
text-align: center;
color: #06121e;
position: relative;
&::after {
content: '';
width: 40rpx;
height: 6rpx;
background: #E8370F;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
}
.list_masonry_b {
width: 100%;
.footlist_b {
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
.foot_left_b {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
.foot_right_b {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
&::after {
content: '';
clear: both;
display: block;
}
}
}
}
}
}
.down_test {
width: 100%;
padding: 28rpx 0;
box-sizing: border-box;
color: #8c9198;
font-size: 28rpx;
text-align: center;
}
page {
background: #f9f9f9;
}
.container {
width: 100%;
.header {
width: 100%;
// background: #f53526;
background: linear-gradient(180deg, #F53526 100%, #FD7F2E 100%);
.left_img {
width: 100%;
display: flex;
align-items: center;
padding: 0 32rpx;
box-sizing: border-box;
height: 88rpx;
.title_oage {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 500;
}
}
}
.health_home {
width: 100%;
.bgs {
width: 100%;
box-sizing: border-box;
background: linear-gradient(180deg, #F53526 100%, #FD7F2E 100%);
.searchbox {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
.searchinput {
width: 100%;
display: flex;
align-items: center;
border-radius: 28rpx;
background-color: #fff;
padding: 10rpx 20rpx;
box-sizing: border-box;
.searchicon {
width: 32rpx;
height: 32rpx;
}
input {
flex: 1;
text-indent: 20rpx;
height: 100%;
}
}
}
.top_tit {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
.tit_list {
width: 100%;
height: 60rpx;
opacity: 0.6;
background: #db1d0e;
display: flex;
align-items: center;
margin-top: 14rpx;
.tit_item {
height: 60rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
image {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
.item_names {
font-size: 28rpx;
color: #fff;
}
}
}
}
.cate_nav {
width: 100%;
margin-top: 18rpx;
.tex {
display: flex;
align-items: center;
width: 100%;
height: 88rpx;
padding-left: 32rpx;
box-sizing: border-box;
position: relative;
.cate_list {
width: 100%;
padding-right: 88rpx;
box-sizing: border-box;
.cate_item {
min-width: 750rpx;
display: flex;
align-items: center;
white-space: nowrap;
overflow-y: scroll;
padding-bottom: 20rpx;
box-sizing: border-box;
.item_cater {
font-size: 28rpx;
color: #fff;
margin-right: 40rpx;
flex-shrink: 0;
}
.active {
position: relative;
font-size: 36rpx;
&::after {
content: '';
width: 60rpx;
height: 6rpx;
background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.4));
position: absolute;
bottom: -17rpx;
left: 50%;
transform: translateX(-50%);
z-index: 20;
}
}
}
}
.cateGory {
position: absolute;
top: 0;
right: 0;
width: 75rpx;
height: 88rpx;
background: #f53526;
display: flex;
align-items: center;
justify-content: center;
image {
width: 48rpx;
height: 48rpx;
}
}
}
.cate_child {
width: 100%;
padding: 32rpx;
box-sizing: border-box;
background-color: #f9f9f9;
.child_box {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
background-color: #fff;
border-radius: 8rpx;
.child_item {
width: 20%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
width: 120rpx;
height: 120rpx;
}
.child_name {
width: 100%;
text-align: center;
padding: 12rpx 0;
box-sizing: border-box;
font-size: 26rpx;
color: #06121E;
}
}
}
}
}
.health_home_item {
widows: 100%;
// 轮播
.banner_image {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
.banner {
width: 100%;
height: 280rpx;
border-radius: 12rpx;
swiper-item {
width: 100%;
height: 100%;
border-radius: 12rpx;
.ims {
height: 280rpx;
border-radius: 12rpx;
image {
width: 100%;
height: 100%;
border-radius: 12rpx;
}
}
}
}
}
.wai_star {
width: 100%;
padding: 0 32rpx;
box-sizing: border-box;
background: linear-gradient(180deg, rgba(255, 255, 255, 0), #f9f9f9);
.star_chan {
width: 100%;
padding: 20rpx 0 20rpx 20rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 8rpx;
.star_names {
width: 100%;
position: relative;
font-size: 28rpx;
color: #06121F;
font-weight: 500;
padding-left: 12rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
&::after {
content: '';
position: absolute;
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
background: #E8370F;
border-radius: 4rpx;
}
}
.star_list {
width: 100%;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.imgzU {
margin-right: 24rpx;
height: 180rpx;
flex-shrink: 0;
image {
width: 180rpx;
border-radius: 8rpx;
}
}
}
}
}
}
}
}
}
.li_nv {
width: 100%;
padding-bottom: 100rpx;
box-sizing: border-box;
.small_nav {
width: 100%;
margin-top: 20rpx;
padding-left: 32rpx;
box-sizing: border-box;
background-color: #f9f9f9;
.nav_slit {
width: 100%;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.smal_item {
min-width: 160rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
position: relative;
.s_item_name {
font-size: 32rpx;
color: #8C9198;
font-family: PingFang-SC-Bold;
line-height: 48rpx;
}
.s_item_color {
font-size: 24rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #8c9198;
line-height: 48rpx;
}
&::after {
content: '';
position: absolute;
right: 0;
border-right: 2rpx solid #bdc4ce;
height: 46rpx;
// top: 50%;
// transform: translate(-50%);
}
}
.activeColor {
.s_item_name {
font-size: 32rpx;
color: #06121E;
font-family: PingFang-SC-Bold;
font-weight: 600;
}
.s_item_color {
padding: 0 20rpx;
box-sizing: border-box;
background: #e8370f;
border-radius: 18rpx;
color: #fff;
height: 34rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 7rpx 0;
}
}
}
}
}
}
.store_list {
width: 100%;
padding: 0 14rpx 0;
box-sizing: border-box;
.list_masonry_a {
width: 100%;
.footlist_a {
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
.foot_left_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
.foot_right_a {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
&::after {
content: '';
clear: both;
display: block;
}
}
}
}
}
.bgt_center {
width: 100%;
padding: 32rpx 14rpx;
box-sizing: border-box;
.wai_star {
width: 100%;
// padding: 0 32rpx;
// box-sizing: border-box;
.star_chan {
width: 100%;
// padding: 20rpx 0;
box-sizing: border-box;
.bgs_star {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 20rpx;
box-sizing: border-box;
.star_names {
position: relative;
font-size: 32rpx;
color: #06121F;
font-weight: 600;
padding-left: 16rpx;
box-sizing: border-box;
&::after {
content: '';
position: absolute;
top: 8rpx;
left: 0;
width: 6rpx;
height: 24rpx;
background: #E8370F;
border-radius: 4rpx;
}
}
.star_more {
font-size: 24rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
color: #5b5e63;
}
}
.star_list {
width: 100%;
background-color: #fff;
border-radius: 8rpx;
padding: 20rpx 0rpx 20rpx 24rpx;
box-sizing: border-box;
.scroll_view_H {
.buyclassimgs {
width: 750rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.imgzU {
margin-right: 24rpx;
// width: 180rpx;
flex-shrink: 0;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
position: relative;
image {
width: 180rpx;
height: 180rpx;
border-radius: 8rpx;
}
.v_post {
width: 130rpx;
height: 36rpx;
text-align: center;
line-height: 36rpx;
color: #Fff;
font-size: 22rpx;
background: #f02928;
border-radius: 4rpx;
position: absolute;
top: 0;
left: 0;
z-index: 2;
font-family: PingFang SC,
PingFang SC-Regular;
}
.text_dian {
width: 100%;
padding-top: 22rpx;
box-sizing: border-box;
.text_pt {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.pt_name {
font-size: 24rpx;
font-family: PingFangSC-Medium;
text-align: left;
color: #fe0e1f;
font-weight: 600;
}
.pt {
display: flex;
align-items: baseline;
margin-left: 5rpx;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 600;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 600;
}
}
}
.del {
width: 100%;
text-align: center;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
}
}
}
.tuijie {
width: 100%;
margin-top: 30rpx;
.tui_name {
width: 100%;
padding-bottom: 20rpx;
box-sizing: border-box;
font-size: 32rpx;
font-family: PingFang SC,
PingFang SC-Medium;
font-weight: 600;
text-align: center;
color: #06121e;
position: relative;
&::after {
content: '';
width: 40rpx;
height: 6rpx;
background: #E8370F;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
}
.list_masonry_b {
width: 100%;
.footlist_b {
position: relative;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
.foot_left_b {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
.foot_right_b {
float: left;
width: 50%;
padding: 24rpx 14rpx;
box-sizing: border-box;
.footbox {
width: 100%;
margin: 0 auto 20rpx;
background: #fff;
position: relative;
border-radius: 20rpx;
image {
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.text_bx {
width: 100%;
padding: 0 18rpx 20rpx;
box-sizing: border-box;
.ster_nams {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC,
PingFang SC-Regular;
font-weight: 400;
text-align: left;
color: #06121e;
line-height: 40rpx;
}
.cen_tite {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
box-sizing: border-box;
.lis_title {
padding: 5rpx 14rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
background-color: #F02928;
border-radius: 4rpx;
}
.stay {
display: flex;
align-items: center;
justify-content: flex-end;
.numbe {
font-size: 22rpx;
color: #E8370F;
}
.ber_name {
font-size: 22rpx;
color: #06121E;
}
}
}
.price_bx {
width: 100%;
display: flex;
align-items: center;
.pt {
display: flex;
align-items: baseline;
.pt_icon {
font-size: 22rpx;
color: #FF4444;
font-weight: 500;
}
.pt_price {
font-size: 28rpx;
color: #FF4444;
font-weight: 500;
}
}
.del {
margin-left: 30rpx;
font-size: 24rpx;
color: #5B5E63;
text-decoration: line-through;
}
}
}
}
}
&::after {
content: '';
clear: both;
display: block;
}
}
}
}
}
}
.down_test {
width: 100%;
padding: 28rpx 0;
box-sizing: border-box;
color: #8c9198;
font-size: 28rpx;
text-align: center;
}
}
\ No newline at end of file
... ...
// pages/webview/webview.js
Page({
/**
* 页面的初始数据
*/
data: {
waiUrl: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
waiUrl: options.url
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<web-view src="{{waiUrl}}" />
\ No newline at end of file
... ...
/* pages/webview/webview.wxss */
\ No newline at end of file
... ...
... ... @@ -100,6 +100,12 @@
{
"name": "pages/addcars/addcars",
"pathName": "pages/addcars/addcars",
"query": "",
"scene": null
},
{
"name": "pages/homeNoLogin2/homeNoLogin2",
"pathName": "pages/homeNoLogin2/homeNoLogin2",
"scene": null
}
]
... ...
// 导出一个封装好的异步请求
export const request = (params) => {
wx.showNavigationBarLoading()
const baseUrl = "https://car.goorcar.com/"
return new Promise((resolve, reject) => {
let header = {
// 'XX-Device-Type': 'wxapp',
'token': wx.getStorageSync("token") || ''
}
header = Object.assign(header)
let that = this;
wx.request({
...params,
url: baseUrl + params.url,
data: params.data,
header: header,
success: (res) => {
if (res.data.code == "1") {
resolve(res)
} else {
reject(res.data)
}
},
fail: (err) => {
reject(err)
wx.showNavigationBarLoading()
// wx.hideLoading();
// wx.showModal({
// title: '提示',
// showCancel: false,
// content: '请求超时,请重新进入',
// // success: function () {
// // wx.redirectTo({
// // url: '../scan/scan'
// // })
// // }
// })
},
complete: function () {
wx.hideNavigationBarLoading()
},
})
})
// 导出一个封装好的异步请求
export const request = (params) => {
wx.showNavigationBarLoading()
const baseUrl = "https://car.goorcar.com/"
return new Promise((resolve, reject) => {
let header = {
'token': wx.getStorageSync("token") || ''
}
header = Object.assign(header)
let that = this;
wx.request({
...params,
url: baseUrl + params.url,
data: params.data,
header: header,
success: (res) => {
if (res.data.code == "1") {
resolve(res)
} else {
reject(res.data)
}
},
fail: (err) => {
reject(err)
},
complete: function () {
wx.hideNavigationBarLoading()
},
})
})
}
\ No newline at end of file
... ...