This commit is contained in:
2025-04-05 23:47:00 +08:00
commit 8001f8eaeb
215 changed files with 14655 additions and 0 deletions

275
pages/index/index.js Normal file
View File

@@ -0,0 +1,275 @@
var e = getApp(), t = require("../../utils/login.js");
Page({
data: {
showLoding: !0,
urlList: [ {
img: "https://jm-static.v0750.com/image/you.png",
name: "充值赠送",
dsc: "你的信任,我的回馈",
url: "voucher/voucher",
needlogin: !0
}, {
img: "https://jm-static.v0750.com/image/juan.png",
name: "我的卡券",
dsc:"卡券集中地",
url: "washCodeList/washCodeList",
needlogin: !0
}, {
img: "https://jm-static.v0750.com/image/xi.png",
name: "洗车教程",
dsc:"规范洗车,轻松安全",
url: "webview/webview?url=https://jmqf.v0750.com/video",
needlogin: !1
}, {
img: "https://jm-static.v0750.com/image/dui.png",
name: "团购兑换",
dsc:"抖音、美团",
url: "duiquan/duiquan",
needlogin: !0
}, {
img: "https://jm-static.v0750.com/image/member.png",
name: "会员中心",
dsc:"充值,消费明细",
url: "user/user",
needlogin: !0
}, {
img: "https://jm-static.v0750.com/image/kefu.png",
name: "联系客服",
dsc:"拨打客服电话",
url: "",
showimg: !0
} ],
wangdianList: [{
name:"三和大道店",
liangdian: [
{"name":"券","ys":"#FF6600"},
{"name":"PA壶","ys":"#37CE05"},
{"name":"人工帮洗","ys":"#0056A3"},
{"name":"轮胎打气","ys":"#08AFDE"},
],
tag:"冲水|泡沫|吸尘|吹气|洗手",
ads:"会城帝临南路18号",
yingye:"24小时",
juli:"12.68KM",
bili: "83%",
jiqi_zs: 12,
jiqi_kx: 10
},{
name:"三和大道店",
liangdian: [
{"name":"券","ys":"#FF6600"},
{"name":"PA壶","ys":"#37CE05"},
{"name":"人工帮洗","ys":"#0056A3"},
{"name":"轮胎打气","ys":"#08AFDE"},
],
tag:"冲水|泡沫|吸尘|吹气|洗手",
ads:"会城帝临南路18号",
yingye:"24小时",
juli:"12.68KM",
bili: "43%",
jiqi_zs: 12,
jiqi_kx: 5
},{
name:"三和大道店",
liangdian: [
{"name":"券","ys":"#FF6600"},
{"name":"PA壶","ys":"#37CE05"},
{"name":"人工帮洗","ys":"#0056A3"},
{"name":"轮胎打气","ys":"#08AFDE"},
],
tag:"冲水|泡沫|吸尘|吹气|洗手",
ads:"会城帝临南路18号",
yingye:"24小时",
juli:"12.68KM",
bili: "13%",
jiqi_zs: 12,
jiqi_kx: 5
},{
name:"三和大道店",
liangdian: [
{"name":"券","ys":"#FF6600"},
{"name":"PA壶","ys":"#37CE05"},
{"name":"人工帮洗","ys":"#0056A3"},
{"name":"轮胎打气","ys":"#08AFDE"},
],
tag:"冲水|泡沫|吸尘|吹气|洗手",
ads:"会城帝临南路18号",
yingye:"24小时",
juli:"12.68KM",
bili: "53%",
jiqi_zs: 12,
jiqi_kx: 5
}],
servicetel: "",
notice: "",
noticeurl: null,
banner: [],
isScan: !1,
user: {},
tmplIds: [],
joinUs: "",
tabStatus: {
coupon: !1,
shop: !1
}
},
bindViewTap: function() {
wx.navigateTo({
url: "../logs/logs"
});
},
onLoad: function() {
wx.showLoading({
title: ""
});
var a = this;
t.pageStart(e).then(function(t) {
a.getData(), a.setData({
servicetel: e.globalData.servicetel,
isScan: !!e.globalData.devicecode
});
});
},
getData: function() {
var a = this;
t.request(e.globalData.config.home, {}, !0).then(function(e) {
// a.data.urlList[1].url = e.data.tabStatus.shop ? "mall/mall" : "", a.setData({
a.setData({
banner: e.data.banner,
user: e.data.user,
tmplIds: e.data.tmplIds,
joinUs: e.data.joinUs,
notice: e.data.notice,
noticeurl: e.data.noticeurl,
tabStatus: e.data.tabStatus,
// urlList: e.data.urlList
}, function() {
wx.hideLoading(), 0 == e.data.banner.length ? a.setData({
showLoding: !1
}) : setTimeout(function() {
a.setData({
showLoding: !1
});
}, 50);
});
});
},
load: function(e) {
console.log(e);
var t = e.currentTarget.dataset.index, a = this.data.swiperWidth * e.detail.height / e.detail.width;
this.data.banner[t].height = a, this.setData({
swiperHeight: a
});
},
onShow: function() {
this.setData({
isScan: !!e.globalData.devicecode || this.data.isScan
}), e.globalData.config && e.globalData.config.home && (this.getData(), this.isneedUpload = !1);
},
toPage: function(t) {
console.info(t);
var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg;
if (console.log("showImg", n), i) {
this.isneedUpload = !0;
if (o && !e.globalData.user.session) return this.isneedUpload = !0, wx.navigateTo({
url: "/pages/login/login"
}), e.globalData.needJumpUrl = "/pages/".concat(i), !1;
wx.navigateTo({
url: "/pages/".concat(i)
}), this.isneedUpload = !0;
} else {
if (!n) return !1;
wx.previewImage({
urls: [ this.data.joinUs ]
});
}
},
toScan: function() {
e.globalData.needJumpUrl = !1;
var a = this;
wx.scanCode({
success: function(i) {
console.log(i), wx.showLoading({
title: ""
}), e.globalData.qrcode = i.result, t.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(t) {
console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode,
a.setData({
isScan: !!t.data.devicecode
});
}).catch(function(e) {
wx.hideLoading();
});
}
});
},
isSubmit: !1,
isneedUpload: !1,
isshowModal: !1,
needUpload: function() {
this.isneedUpload = !0;
},
toStart: function() {
e.globalData.needJumpUrl = !1, this.isneedUpload = !0;
var t = this;
if (console.log("this.isSubmit", this.isSubmit), this.isSubmit) return !1;
if (t.data.user.money <= 0) return t.startup(), !1;
if (t.data.user.money < 10) {
if (this.isshowModal) return t.startup(), !1;
this.isshowModal = !0, wx.showModal({
title: "提示",
content: "账户余额小于10元是否立即充值",
confirmText: "去充值",
cancelText: "立即启动",
success: function(e) {
e.confirm ? (wx.navigateTo({
url: "/pages/voucher/voucher"
}), t.isneedUpload = !0) : t.startup();
},
fail: function(e) {
console.log("fail:", e);
}
});
} else t.startup();
},
startup: function() {
var a = this;
wx.showModal({
title: "提示",
content: "你当前将要使用的机器编号是:".concat(e.globalData.devicecode, ",确认开机吗?"),
success: function(i) {
i.confirm && (a.isSubmit = !0, wx.showLoading({
title: "正在启动"
}), t.request(e.globalData.config.machine.startup, {
washcode: a.data.selectID
}, !0).then(function(e) {
a.isSubmit = !1, wx.hideLoading(), 200 == e.code && (wx.showModal({
title: "",
content: e.message
}), a.data.tmplIds.length > 0 && a.requestSubscribeMessage(), wx.redirectTo({
url: "/pages/user/user"
}), a.isneedUpload = !0), 888 == e.code && (wx.navigateTo({
url: "/pages/voucher/voucher"
}), a.isneedUpload = !0);
}).catch(function(e) {
a.isSubmit = !1, wx.hideLoading();
}));
},
fail: function(e) {
console.log("fail:", e);
}
});
},
requestSubscribeMessage: function() {
wx.requestSubscribeMessage({
tmplIds: this.data.tmplIds,
success: function(e) {
console.log("requestSubscribeMessage", e), t.request("https://jmqf.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {});
},
fail: function(e) {
console.log("requestSubscribeMessagefail", e);
}
});
},
onShareAppMessage: function() {}
});

10
pages/index/index.json Normal file
View File

@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "聚美汽服",
"usingComponents": {
"service-tel": "../../template/serviceTel/serviceTel",
"my-money": "../../template/myMoney/myMoney",
"head-swiper": "../../template/headSwiper/headSwiper",
"page-loding": "../../template/pageLoding/pageLoding"
},
"navigationStyle":"custom"
}

17
pages/index/index.wxml Normal file
View File

@@ -0,0 +1,17 @@
<import src="../common/common.wxml"></import>
<import src="../wangdianList/wangdianList.wxml"></import>
<view class="container">
<page-loding wx:if="{{showLoding}}"></page-loding>
<head-swiper banner="{{banner}}"></head-swiper>
<view class="money">
<my-money user="{{user}}"></my-money>
<view class="marquee-wrap" wx:if="{{notice}}">
<view bindtap="toPage" class="marquee-content" data-refresh="1" data-url="{{noticeurl}}"> {{notice}} </view>
</view>
</view>
<template is="pageList" data="{{urlList:urlList}}"></template>
<template is="wangdianList" data="{{wangdianList:wangdianList}}"></template>
<service-tel></service-tel>
<view bindtap="toScan" class="scan-btn" wx:if="{{!isScan}}"><view class="sha">扫码启动</view></view>
<view bindtap="toStart" class="scan-btn" wx:if="{{isScan}}"><view class="sha">立即启动</view></view>
</view>

160
pages/index/index.wxss Normal file
View File

@@ -0,0 +1,160 @@
.container {
box-sizing: border-box;
min-height: 100vh;
padding: 0 0 170rpx;
}
.money-box {
margin: 0 27rpx;
}
.money {
padding: 0 0 0;
}
.start-btn-box {
bottom: 0;
box-sizing: border-box;
display: flex;
height: 106rpx;
left: 0;
padding: 0 10rpx;
position: fixed;
width: 100vw;
}
.start-btn-box .scan-btn {
align-items: center;
border-radius: 5px;
display: flex;
flex: 1;
justify-content: center;
position: static;
}
.start-btn-box .scan-subscribe {
margin-right: 10rpx;
}
.index-wangdian-list {
padding: 0 28rpx 28rpx;
}
.index-wangdian-title {
line-height: 70rpx;
padding: 10rpx 0;
position: relative;
}
.index-wangdian-title .title_c {
font-size: 36rpx;
color: #0056A3;
}
.index-wangdian-title .title_c .line {
position: absolute;
bottom: 12rpx;
left: 18rpx;
height: 10rpx;
width: 15%;
border-radius: 20rpx;
background-color: #0056A3;
}
.index-wangdian-title .more {
position: absolute;
right: 0;
font-size: 24rpx;
color: #999;
}
.index-wangdian-box {
overflow: hidden;
padding: 20rpx;
border-radius: 20rpx;
background-color: #fff;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, .4);
position: relative;
margin-bottom: 30rpx;
}
.index-wangdian-box .info {
position: relative;
}
.index-wangdian-box .info .title_c {
display: inline-block;
font-size: 36rpx;
line-height: 48rpx;
margin-bottom: 10rpx;
}
.index-wangdian-box .info .title .ld {
display: inline-block;
font-size: 24rpx;
line-height: 36rpx;
height: 32rpx;
color: #fff;
border-radius: 10rpx;
padding: 0 6rpx;
margin-left: 6rpx;
}
.index-wangdian-box .info .tag, .index-wangdian-box .info .ads {
font-size: 28rpx;
line-height: 2;
color: #999;
}
.index-wangdian-box .info .jiqi {
font-size: 24rpx;
line-height: 2;
color: #37CE05;
}
.index-wangdian-box .info .yingye {
position: absolute;
right: -20rpx;
top: -20rpx;
color: #fff;
background-color: #0056A3;
font-size: 24rpx;
padding: 0 12rpx;
line-height: 36rpx;
border-radius: 0 0 0 20rpx;
}
.index-wangdian-box .info .dw {
position: absolute;
right: 20rpx;
bottom: 25rpx;
height: 120rpx;
width: 120rpx;
font-size: 24rpx;
color: #0056A3;
text-align: center;
}
.index-wangdian-box .info .dw .ico {
font-size: 80rpx;
}
.index-wangdian-box .xian {
position: absolute;
width: 100%;
bottom: 0;
left: 0;
/* color: #fff; */
font-size: 22rpx;
height: 6rpx;
background-color: #0056A3;
}
.index-wangdian-box .xian .bili {
position: absolute;
height: 6rpx;
bottom: 0;
right: 0;
display: block;
background-color: #37CE05;
}