Compare commits

...

No commits in common. "feature" and "master" have entirely different histories.

57 changed files with 412 additions and 4676 deletions

10
app.js
View File

@ -1,16 +1,6 @@
var t = require("./utils/login.js");
// 引入
require("./utils/xstat.js");
App({
xstatConfig: {
appKey: wx.getAccountInfoSync().miniProgram.appId, // 自动获取 小程序appid
debug: true, //是否打开调试模式
// 上报地址
LOG_URL: 'https://t-jm.v0750.com/send',
},
onLaunch: function(e) {
console.log("options", e), this.globalData.options = e, t.getLogin(this, !0);
try {

View File

@ -1,51 +1,37 @@
{
"pages": [
"pages/index/index",
"pages/mall/mall",
"pages/goodsDetails/goodsDetails",
"pages/orderDetails/orderDetails",
"pages/map/map",
"pages/orderPaySuccess/orderPaySuccess",
"pages/orderPay/orderPay",
"pages/goodsSearch/goodsSearch",
"pages/orderIndex/orderIndex",
"pages/orderList/orderList",
"pages/myAddress/myAddress",
"pages/addAddress/addAddress",
"pages/voucher/voucher",
"pages/listDetail/listDetail",
"pages/register/register",
"pages/singleStart/singleStart",
"pages/myDiscount/myDiscount",
"pages/washCodeList/washCodeList",
"pages/washCodeDetail/washCodeDetail",
"pages/login/login",
"pages/user/user",
"pages/webview/webview",
"pages/wangdian/wangdian",
"pages/duiquan/duiquan",
"pages/refund/refund",
"pages/washing/washing",
"pages/OnlineCarHailing/OnlineCarHailing"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "聚美汽服",
"navigationBarTextStyle": "black"
},
"permission": {
"scope.address": {
"desc": "获取您的通讯地址"
"pages": [
"pages/index/index",
"pages/mall/mall",
"pages/goodsDetails/goodsDetails",
"pages/orderDetails/orderDetails",
"pages/map/map",
"pages/orderPaySuccess/orderPaySuccess",
"pages/orderPay/orderPay",
"pages/goodsSearch/goodsSearch",
"pages/orderIndex/orderIndex",
"pages/orderList/orderList",
"pages/myAddress/myAddress",
"pages/addAddress/addAddress",
"pages/voucher/voucher",
"pages/listDetail/listDetail",
"pages/register/register",
"pages/singleStart/singleStart",
"pages/myDiscount/myDiscount",
"pages/washCodeList/washCodeList",
"pages/washCodeDetail/washCodeDetail",
"pages/login/login",
"pages/user/user",
"pages/webview/webview"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "聚美汽服",
"navigationBarTextStyle": "black"
},
"scope.userLocation": {
"desc": "你的位置信息将用于定位效果展示"
}
},
"lazyCodeLoading": "requiredComponents",
"requiredPrivateInfos": [
"chooseAddress",
"getLocation",
"chooseLocation"
]
"permission": {
"scope.address": { "desc": "获取您的通讯地址" },
"scope.userLocation": { "desc": "你的位置信息将用于定位效果展示" }
},
"requiredPrivateInfos": ["chooseAddress", "getLocation", "chooseLocation"]
}

186
app.wxss

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 428 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

83
img/iconfont.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

BIN
img/login-bg.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 712 KiB

BIN
img/logo2.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,118 +0,0 @@
// pages/OnlineCarHailing/OnlineCarHailing.js
var t = require("../../utils/login.js");
Page({
/**
* 页面的初始数据
*/
data: {
},
onSubmitToGroup(e) {
const mobile = e.detail.value.code
if (!mobile) {
wx.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
// 手机号格式验证
if (!/^1[3-9]\d{9}$/.test(mobile)) {
wx.showToast({
title: '请输入正确的手机号码',
icon: 'none'
})
return
}
// 二次确认
wx.showModal({
title: '确认提示',
content: '确定要将此手机号设置为网约车用户吗?',
success: (res) => {
if (res.confirm) {
wx.showLoading({
title: '提交中...'
})
t.request('/miniprogram/user/onlineCarHailing', { mobile }, !0).then((res) => {
wx.hideLoading()
if (res.code == 200) {
wx.showToast({
title: '设置成功',
icon: 'success'
})
setTimeout(() => {
wx.navigateBack()
}, 1500)
} else {
wx.showToast({
title: res.message || '设置失败',
icon: 'none'
})
}
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -1,9 +0,0 @@
<view class="contain">
<view class="content">
<view class="title">设置网约车用户</view>
<form bindsubmit="onSubmitToGroup">
<input class="input" name="code" auto-focus placeholder="请填写用户手机号码"/>
<button class="button" form-type="submit" type="primary">设置网约车用户</button>
</form>
</view>
</view>

View File

@ -1,25 +0,0 @@
.contain {
box-sizing: border-box;
min-height: 100vh;
background-color: #fafafa;
}
.content {
padding: 60rpx 40rpx;
}
.title {
font-size: 36rpx;
line-height: 1;
font-weight: 700;
color: #0056A3;
}
.input {
margin: 40rpx 0;
padding: 22rpx;
border-radius: 10rpx;
background-color: #fff;
border: 2rpx solid #eee;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1);
}

View File

@ -1,13 +1,11 @@
<template name="pageList">
<view class="index-href-box">
<view bindtap="toPage" class="item" data-needlogin="{{item.needlogin}}" data-refresh="{{item.refresh}}" data-showimg="{{item.showimg}}" data-url="{{item.url}}" data-phone="{{item.phone}}" wx:for="{{urlList}}" wx:key="index">
<view class="item_b" style="background-image:url({{item.img}}) ;">
<!-- <view class="btn">
<image class="video" src="../../img/video.png" wx:if="{{item.img=='video'}}"></image>
<text class="iconfont icon-{{item.img}}" wx:else></text>
</view> -->
<view class="name">{{item.name}}</view>
<view bindtap="toPage" class="item" data-needlogin="{{item.needlogin}}" data-refresh="{{item.refresh}}" data-showimg="{{item.showimg}}" data-url="{{item.url}}" wx:for="{{urlList}}" wx:key="index">
<view class="btn">
<image class="video" src="../../img/video.png" wx:if="{{item.img=='video'}}"></image>
<text class="iconfont icon-{{item.img}}" wx:else></text>
</view>
<view class="name">{{item.name}}</view>
</view>
</view>
</template>

View File

@ -1,124 +0,0 @@
var e = getApp(), t = require("../../utils/login.js");
Page({
data: {
pic: "https://jm-static.v0750.com/image/dui.jpg",
tips: "温馨提示:\n1、请在30分钟内完成兑换超时作废\n2、请在兑换完成后在本页面点击\"确认兑换\"\n3、兑换成功后将在3个工作日内发放奖品",
code: ''
},
onLoad() {
t.request('/miniprogram/coupons', {}, !0).then((res) => {
if (res.code == 200) {
this.setData({
tips: res.data.tips,
pic: res.data.pic
})
}
})
},
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("/miniprogram/identify", i, !0).then(function (t) {
console.log("data", t), wx.hideLoading();
// 保存设备编号
getApp().globalData.devicecode = t.data.devicecode || getApp().globalData.devicecode;
a.startup();
}).catch(function (e) {
wx.hideLoading();
});
}
});
},
// 启动
startup: function () {
if (getApp().globalData.devicecode) {
// 已扫码,启动机器
t.request('/miniprogram/machine/carwashcodestartup', { devicecode: getApp().globalData.devicecode, washcode: this.data.code }, !0).then((startRes) => {
if (startRes.code == 200) {
wx.showToast({ title: startRes.message || '启动成功', icon: 'success' });
// 跳转到洗车券列表页面
wx.redirectTo({
url: "/pages/washing/washing"
})
} else {
wx.redirectTo({
url: "/pages/washCodeList/washCodeList"
});
wx.showToast({ title: startRes.message || '启动失败', icon: 'none' });
}
});
} else {
// 未扫码,提示
wx.showToast({
title: '请先扫码',
icon: 'none'
})
}
},
onSubmitToGroup(e) {
const code = e.detail.value.code
if (!code) {
wx.showToast({
title: '请输入券码',
icon: 'none'
})
return
}
wx.showLoading({
title: '兑换中...'
})
t.request('/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
wx.hideLoading()
if (res.code == 200) {
// 在当前页面记下券码
this.setData({
code: res.data.code
})
wx.showModal({
title: '兑换成功',
content: '是否立即使用?',
success: (result) => {
if (result.confirm) {
// 判断是否已扫码
if (getApp().globalData.devicecode) {
wx.showModal({
title: "提示",
content: "你当前将要使用的机器编号是:".concat(getApp().globalData.devicecode, ",确认开机吗?"),
success: (res) => {
if (res.confirm) {
// 用户点击了确认按钮,执行开机操作
this.startup();
} else {
// 用户点击了取消按钮,跳转到洗车券列表页面
wx.navigateTo({ url: '/pages/washCodeList/washCodeList' });
}
}
});
} else {
// 未扫码,打开扫码页面
this.toScan(); // 调用toScan方法跳转到扫码页面
}
} else {
wx.navigateTo({ url: '/pages/washCodeList/washCodeList' });
}
}
});
} else {
wx.showToast({
title: res.message || '兑换失败',
icon: 'none'
})
}
})
}
})

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -1,14 +0,0 @@
<view class="contain">
<image src="{{pic}}" mode="widthFix" class="pic"></image>
<view class="content">
<view class="title">请输入券码</view>
<form bindsubmit="onSubmitToGroup">
<input class="input" name="code" auto-focus placeholder="支持抖音/美团/聚美券码"/>
<button class="button" form-type="submit" type="primary">立即兑换</button>
</form>
<text class="tips">
{{tips}}
</text>
</view>
</view>

View File

@ -1,37 +0,0 @@
.contain {
box-sizing: border-box;
min-height: 100vh;
background-color: #fafafa;
}
.pic {
width: 100%;
}
.content {
padding: 60rpx 40rpx;
}
.title {
font-size: 36rpx;
line-height: 1;
font-weight: 700;
color: #0056A3;
}
.input {
margin: 30rpx 0;
padding: 0 22rpx;
height: 88rpx;
line-height: 88rpx;
border-radius: 10rpx;
background-color: #fff;
border: 2rpx solid #eee;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1);
color: #333;
}
.tips {
color: #999;
line-height: 2;
font-size: 28rpx;
}

View File

@ -4,6 +4,8 @@
"enablePullDownRefresh": false,
"usingComponents": {
"page-header": "./pageHeader/pageHeader",
"kefu-box": "./kefuBox/kefuBox",
"match-wrap": "./matchWrap/matchWrap",
"shop-add": "./shopAdd/shopAdd",
"recomond-list": "./recomondList/recomondList",
"page-bottom": "./pageBottom/pageBottom",

View File

@ -3,8 +3,35 @@ var e = getApp(), t = require("../../utils/login.js");
Page({
data: {
showLoding: !0,
urlList: [],
wangdianList: [],
urlList: [ {
img: "chongzhi",
name: "充值赠送",
url: "voucher/voucher",
needlogin: !0
}, {
img: "video",
name: "洗车教程",
url: "webview/webview?url=https://jmqf.v0750.com/video",
needlogin: !1
}, {
img: "xichequan",
name: "网点分布",
url: "map/map"
}, {
img: "huiyuanzhongxin",
name: "会员中心",
url: "user/user",
needlogin: !0
}, {
img: "youhuiquan1",
name: "洗车券",
url: "washCodeList/washCodeList"
}, {
img: "shangjiajiameng",
name: "招募合伙人",
url: "",
showimg: !0
} ],
servicetel: "",
notice: "",
noticeurl: null,
@ -18,68 +45,39 @@ Page({
shop: !1
}
},
bindViewTap: function () {
bindViewTap: function() {
wx.navigateTo({
url: "../logs/logs"
});
},
onLoad: function () {
onLoad: function() {
wx.showLoading({
title: ""
});
var a = this;
// 获取地理位置
wx.getLocation({
type: 'gcj02',
success: function (res) {
// 存储经纬度
wx.setStorageSync('latitude', res.latitude);
wx.setStorageSync('longitude', res.longitude);
e.globalData.latitude = res.latitude;
e.globalData.longitude = res.longitude;
// 获取网点列表
t.request('/miniprogram/branch/lists', {
latitude: res.latitude || '',
longitude: res.longitude || ''
}, !0).then(function (res) {
a.setData({
wangdianList: res.data || []
});
});
},
fail: function () {
// 即使获取位置失败也加载网点列表,只是不传入经纬度参数
t.request('/miniprogram/branch/lists', {}, !0).then(function (res) {
a.setData({
wangdianList: res.data || []
});
});
},
complete: function () {
t.pageStart(e).then(function (t) {
a.getData();
a.setData({
servicetel: e.globalData.servicetel,
isScan: !!e.globalData.devicecode
});
});
}
t.pageStart(e).then(function(t) {
a.getData(), a.setData({
servicetel: e.globalData.servicetel,
isScan: !!e.globalData.devicecode
});
});
// 获取首页数据
t.request('/miniprogram/index/home', { method: 'GET' }, !0).then(function (e) {
a.setData({
},
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({
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 () {
}, function() {
wx.hideLoading(), 0 == e.data.banner.length ? a.setData({
showLoding: !1
}) : setTimeout(function () {
}) : setTimeout(function() {
a.setData({
showLoding: !1
});
@ -87,53 +85,19 @@ Page({
});
});
},
getData: function () {
var a = this;
// 获取首页数据
t.request('/miniprogram/index/balance', {}, !0).then(function (e) {
a.setData({
user: e.data || [],
});
// 存储进度订单
wx.setStorageSync('progressorder', e.data.progressorder || []);
});
},
load: function (e) {
load: function(e) {
console.log(e);
},
openLocation: function(e) {
var latitude = Number(e.currentTarget.dataset.latitude);
var longitude = Number(e.currentTarget.dataset.longitude);
var name = e.currentTarget.dataset.name;
var address = e.currentTarget.dataset.address;
wx.openLocation({
latitude: latitude,
longitude: longitude,
name: name,
address: address,
scale: 18
});
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 () {
onShow: function() {
this.setData({
isScan: !!e.globalData.devicecode || this.data.isScan
}), (this.getData(), this.isneedUpload = !1);
}), e.globalData.config && e.globalData.config.home && (this.getData(), this.isneedUpload = !1);
},
toPage: function (t) {
console.info(t);
// 增加打电话
if (t.currentTarget.dataset.phone) {
wx.makePhoneCall({
phoneNumber: "" + t.currentTarget.dataset.phone
});
return;
}
toPage: function(t) {
var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg;
if (console.log("showImg", n), i) {
this.isneedUpload = !0;
@ -146,23 +110,23 @@ Page({
} else {
if (!n) return !1;
wx.previewImage({
urls: [this.data.joinUs]
urls: [ this.data.joinUs ]
});
}
},
toScan: function () {
toScan: function() {
e.globalData.needJumpUrl = !1;
var a = this;
wx.scanCode({
success: function (i) {
success: function(i) {
console.log(i), wx.showLoading({
title: ""
}), e.globalData.qrcode = i.result, t.request("/miniprogram/identify", i, !0).then(function (t) {
}), 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) {
a.setData({
isScan: !!t.data.devicecode
});
}).catch(function(e) {
wx.hideLoading();
});
}
@ -171,10 +135,10 @@ Page({
isSubmit: !1,
isneedUpload: !1,
isshowModal: !1,
needUpload: function () {
needUpload: function() {
this.isneedUpload = !0;
},
toStart: function () {
toStart: function() {
e.globalData.needJumpUrl = !1, this.isneedUpload = !0;
var t = this;
if (console.log("this.isSubmit", this.isSubmit), this.isSubmit) return !1;
@ -186,55 +150,55 @@ Page({
content: "账户余额小于10元是否立即充值",
confirmText: "去充值",
cancelText: "立即启动",
success: function (e) {
success: function(e) {
e.confirm ? (wx.navigateTo({
url: "/pages/voucher/voucher"
}), t.isneedUpload = !0) : t.startup();
},
fail: function (e) {
fail: function(e) {
console.log("fail:", e);
}
});
} else t.startup();
},
startup: function () {
startup: function() {
var a = this;
wx.showModal({
title: "提示",
content: "你当前将要使用的机器编号是:".concat(e.globalData.devicecode, ",确认开机吗?"),
success: function (i) {
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) {
}, !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/washing/washing"
url: "/pages/user/user"
}), a.isneedUpload = !0), 888 == e.code && (wx.navigateTo({
url: "/pages/voucher/voucher"
}), a.isneedUpload = !0);
}).catch(function (e) {
}).catch(function(e) {
a.isSubmit = !1, wx.hideLoading();
}));
},
fail: function (e) {
fail: function(e) {
console.log("fail:", e);
}
});
},
requestSubscribeMessage: function () {
requestSubscribeMessage: function() {
wx.requestSubscribeMessage({
tmplIds: this.data.tmplIds,
success: function (e) {
console.log("requestSubscribeMessage", e), t.request("/miniprogram/index/newtmpl", e, !0).then(function (e) { }).catch(function (e) { });
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) {
fail: function(e) {
console.log("requestSubscribeMessagefail", e);
}
});
},
onShareAppMessage: function () { }
onShareAppMessage: function() {}
});

View File

@ -5,6 +5,5 @@
"my-money": "../../template/myMoney/myMoney",
"head-swiper": "../../template/headSwiper/headSwiper",
"page-loding": "../../template/pageLoding/pageLoding"
},
"navigationStyle":"custom"
}
}

View File

@ -1,27 +1,15 @@
<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 bindtap="toPage" class="marquee-content" data-refresh="1" data-url="{{noticeurl}}"> {{notice}} </view>
</view>
<navigator class="washing" hoverClass="hover" url="/pages/washing/washing" wx:if="{{user.progressorder}}">
<view class="l">您有一笔洗车订单进行中...</view>
<view class="r">点击查看></view>
</navigator>
</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 bindtap="toScan" class="scan-btn" wx:if="{{!isScan}}">扫码启动</view>
<view bindtap="toStart" class="scan-btn" wx:if="{{isScan}}">立即启动</view>
</view>

View File

@ -9,7 +9,7 @@
}
.money {
padding: 0 0 0;
padding: 34rpx 27rpx 0;
}
.start-btn-box {
@ -35,140 +35,3 @@
.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: 22rpx;
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;
}
.washing {
justify-content: space-between;
margin: 30rpx 0 0;
padding: 20rpx 28rpx;
display: flex;
background-color: #0056A3;
color: #fff;
font-size: 28rpx;
}
.washing .l {
flex: 1;
}

View File

@ -28,7 +28,7 @@ Page({
var n = Object.assign(this.userInfo, t, {
code: a
});
o.request('/miniprogram/index/authorization', n, !0).then(function(o) {
o.request(e.globalData.config.authorization, n, !0).then(function(o) {
if (wx.hideLoading(), console.log("toAuthorization", "app.globalData.needJumpUrl", e.globalData.needJumpUrl, o),
200 != o.code) return wx.showModal({
title: "提示",

View File

@ -1,5 +1,6 @@
{
"usingComponents": {
"match-list": "./matchList/matchList",
"recomond-list": "../goodsDetails/recomondList/recomondList",
"page-loding": "../../template/pageLoding/pageLoding"
}

View File

@ -1,110 +0,0 @@
var t = require("../../utils/login.js");
Page({
data: {
userInfo: {
mobile: '',
uid: '',
givenamount: "0.00",
money: "0.00",
principal: "0.00",
}, // 用户查询结果
list: [], // 退款记录列表
showResult: false // 控制查询结果显示
},
onSubmitToGroup(e) {
const mobile = e.detail.value.code
if (!mobile) {
wx.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
// 手机号格式验证
if (!/^1[3-9]\d{9}$/.test(mobile)) {
wx.showToast({
title: '请输入正确的手机号码',
icon: 'none'
})
return
}
wx.showLoading({
title: '查询中...'
})
t.request('/miniprogram/Refund/query', { mobile }, !0).then((res) => {
wx.hideLoading()
if (res.code == 200) {
this.setData({
userInfo: res.data.user,
list: res.data.list,
showResult: true
})
} else {
wx.showToast({
title: res.message || '查询失败',
icon: 'none'
})
}
})
},
// 线上退款
onSubmitToGroup1() {
wx.showModal({
title: '确认退款',
content: '确定退款,将清零用户赠送金额,退还本金',
success: (res) => {
if (res.confirm) {
wx.showLoading({
title: '退款中...'
})
if (!this.data.userInfo.recharge || !this.data.userInfo.token) {
wx.showToast({
title: '退款信息不完整',
icon: 'none'
})
return
}
t.request('/miniprogram/pay/refund', {token: this.data.userInfo.token}, !0).then((res) => {
wx.hideLoading()
if (res.code == 200) {
wx.showToast({
title: '退款成功',
icon: 'success'
})
// 刷新页面数据
this.setData({
showResult: false,
userInfo: {
mobile: '',
uid: '',
givenamount: "0.00",
money: "0.00",
principal: "0.00"
}
})
} else {
wx.showToast({
title: res.message || '退款失败',
icon: 'none'
})
}
})
}
}
})
},
// 线下退款
onSubmitToGroup2() {
wx.showToast({
title: '请联系客服, 线下退款',
icon: 'none'
})
}
})

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -1,55 +0,0 @@
<view class="contain">
<view class="content">
<view class="title">退款</view>
<form bindsubmit="onSubmitToGroup"> <!-- 查询前 -->
<input class="input" name="code" auto-focus placeholder="请填写用户手机号码"/>
<button class="button" form-type="submit" type="primary">查询用户订单</button>
</form>
<!-- 显示用户信息 .userInfo -->
<view class="userInfo" wx:if="{{showResult && userInfo}}">
<view class="info">
<view>手机号:<text>{{userInfo.mobile}}</text></view>
<view>用户ID<text>{{userInfo.uid}}</text></view>
<view class="balance-info">
<view class="balance-item">
<view class="label">总余额</view>
<view class="value r">{{userInfo.money}}</view>
</view>
<view class="balance-item">
<view class="label">洗车金</view>
<view class="value g">{{userInfo.principal}}</view>
</view>
<view class="balance-item">
<view class="label">赠送金额</view>
<view class="value b">{{userInfo.givenamount}}</view>
</view>
</view>
</view>
</view>
<block wx:if="{{showResult && userInfo}}">
<form bindsubmit="onSubmitToGroup1" wx:if="{{userInfo.refundType === 'online'}}"> <!-- 查询后 线上退款 -->
<view class="info">
<view>本金:<text class="r">{{userInfo.recharge.money || ''}}</text></view>
<view>赠送:{{userInfo.recharge.bonusamount || ''}}</view>
<view class="mt">订单号:{{userInfo.recharge.orderid || ''}}</view>
<view>充值时间:<text class="r">{{userInfo.recharge.date || ''}}</text></view>
<view>网点:<text class="r">{{userInfo.recharge.agent || ''}}</text></view>
</view>
<button class="button" form-type="submit" type="primary">线上退款</button>
</form>
<form bindsubmit="onSubmitToGroup2" wx:if="{{userInfo.refundType === 'offline'}}"> <!-- 查询后 线下退款 -->
<view class="info">
<view>本金:<text class="r">{{userInfo.recharge.money || ''}}</text></view>
<view>赠送:{{userInfo.recharge.bonusamount || ''}}</view>
<view class="mt">订单号:{{userInfo.recharge.orderid || ''}}</view>
<view>充值时间:<text class="r">{{userInfo.recharge.date || ''}}</text></view>
<view>网点:<text class="r">{{userInfo.recharge.agent || ''}}</text></view>
</view>
<button class="button" form-type="submit" type="warn">线下退款</button>
</form>
</block>
</view>
</view>

View File

@ -1,82 +0,0 @@
.contain {
box-sizing: border-box;
min-height: 100vh;
background-color: #fafafa;
}
.content {
padding: 60rpx 40rpx;
}
.title {
font-size: 36rpx;
line-height: 1;
font-weight: 700;
color: #0056A3;
}
.input {
margin: 40rpx 0;
padding: 22rpx;
border-radius: 10rpx;
background-color: #fff;
border: 2rpx solid #eee;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1);
}
.userInfo {
padding-top: 22rpx;
border-top: 2rpx solid #eee;
}
.info {
padding: 22rpx 32rpx;
border-radius: 10rpx;
background-color: #fff;
border: 2rpx solid #eee;
box-shadow: 0 6rpx 10rpx rgba(0, 0, 0, 0.1);
margin-bottom: 30rpx;
line-height: 2;
}
.info .mt {
margin-top: 30rpx;
}
.info .r {
color: #C13700;
font-weight: 700;
}
.info .g {
color: #60BB46;
font-weight: 700;
}
.balance-info {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
padding: 20rpx 0;
border-top: 2rpx solid #eee;
}
.balance-item {
flex: 1;
text-align: center;
}
.balance-item .label {
font-size: 24rpx;
color: #666;
margin-bottom: 10rpx;
}
.balance-item .value {
font-size: 32rpx;
font-weight: 700;
}
.balance-item .b {
color: #0056A3;
}

View File

@ -14,22 +14,22 @@ Page({
showTips: !1,
approve: !0
},
onLoad: function (a) {
onLoad: function(a) {
var e = this;
this.setData({
type: a.type || "login"
}), o.pageStart(t).then(function (o) {
}), o.pageStart(t).then(function(o) {
console.log(t.globalData), e.setData({
protocol: t.globalData.protocol
});
});
},
input: function (t) {
input: function(t) {
this.data.info[t.currentTarget.dataset.name] = t.detail.value, this.setData({
info: this.data.info
});
},
bindsubmit: function (t) {
bindsubmit: function(t) {
if (console.log(t.detail.formId), this.data.issubmit) return !1;
this.setData({
issubmit: !0
@ -38,26 +38,26 @@ Page({
});
var o = this;
"reset" == this.data.type ? this.submitForm() : wx.login({
success: function (t) {
success: function(t) {
console.log(t.code), wx.getUserInfo({
success: function (a) {
success: function(a) {
o.submitForm(t.code, a);
},
fail: function () {
fail: function() {
o.submitForm(t.code);
}
});
},
fail: function (t) { }
fail: function(t) {}
});
},
submitForm: function (a, e) {
submitForm: function(a, e) {
var i = this, n = {};
Object.assign(n, e, {
token: this.data.token,
smscode: this.data.info.smscode,
code: a
}), console.log(n), o.request(t.globalData.config.verify[i.data.type], n, !0).then(function (o) {
}), console.log(n), o.request(t.globalData.config.verify[i.data.type], n, !0).then(function(o) {
return wx.hideLoading(), i.setData({
issubmit: !1
}), 200 == o.code && (i.setData({
@ -70,40 +70,40 @@ Page({
}), t.globalData.needJumpUrl = !1, !1) : void wx.navigateBack({
delta: 1
}));
}).catch(function (t) {
}).catch(function(t) {
i.setData({
issubmit: !1
});
});
},
sendMsg: function () {
sendMsg: function() {
if ("" == this.data.info.mobile.trim()) return wx.showModal({
title: "提示",
content: "请输入手机号码~"
}), !1;
var a = this;
o.request('/miniprogram/verify/sms', {
o.request(t.globalData.config.verify.sms, {
mobile: a.data.info.mobile,
type: a.data.type
}, !0).then(function (t) {
}, !0).then(function(t) {
console.log("daa", t), wx.showToast({
title: "验证码已发送~",
icon: "none"
}), a.setData({
token: t.data.token,
countdowntime: t.data.countdowntime
}, function () {
a.timer = setInterval(function () {
}, function() {
a.timer = setInterval(function() {
if (0 == a.data.countdowntime) return clearInterval(a.timer), !1;
a.data.countdowntime--, a.setData({
countdowntime: a.data.countdowntime
});
}, 1e3);
});
}).catch(function (t) { });
}).catch(function(t) {});
},
timer: null,
showprovision: function () {
showprovision: function() {
this.setData({
showTips: !this.data.showTips
});

View File

@ -21,7 +21,7 @@ Page({
var n = this;
wx.showLoading({
title: ""
}), e.request('/miniprogram/user', {}, !0).then(function(t) {
}), e.request(t.globalData.config.user.log, {}, !0).then(function(t) {
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
@ -56,70 +56,5 @@ Page({
wx.makePhoneCall({
phoneNumber: "" + t.globalData.servicetel
});
},
updateUserAvatar: function() {
var that = this;
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: function(res) {
wx.uploadFile({
url: 'https://t-jm.v0750.com/miniprogram/upload',
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
success: function(uploadRes) {
var data = JSON.parse(uploadRes.data);
if (data.code == 200) {
e.request('/miniprogram/user/update', {
avatar: data.data.url
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
title: '头像更新成功',
icon: 'success'
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
});
}
}
});
}
});
},
updateUserNickname: function() {
var that = this;
wx.showModal({
title: '修改昵称',
editable: true,
placeholderText: '请输入新昵称',
success: function(res) {
if (res.confirm && res.content) {
// 发送请求到后端,更新用户昵称
e.request('/miniprogram/user/update', {
nickname: res.content
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
title: '昵称更新成功',
icon: 'success'
});
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
});
}
}
});
}
});

View File

@ -2,12 +2,12 @@
<page-loding wx:if="{{showLoding}}"></page-loding>
<view class="page-top">
<view class="user-info">
<view class="avatar" bindtap="updateUserAvatar">
<view class="avatar">
<image src="{{user.avatar}}"></image>
</view>
<view class="info">
<view class="left">
<view class="username" bindtap="updateUserNickname">{{user.nickname}}</view>
<view class="username">{{user.nickname}}</view>
<view class="tel">{{user.mobile}}</view>
</view>
<view class="right">

View File

@ -44,7 +44,7 @@ Page({
loading: !0
}), wx.showLoading({
title: ""
}), e.request('/miniprogram/recharge', {
}), e.request(t.globalData.config.recharge.init, {
page: this.data.page.next_page
}, !0).then(function (t) {
if (wx.hideLoading(), a.setData({
@ -68,7 +68,7 @@ Page({
var i = a.currentTarget.dataset.id;
wx.showLoading({
title: ""
}), e.request('/miniprogram/recharge/create', {
}), e.request(t.globalData.config.recharge.create, {
id: i
}, !0).then(function (t) {
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
@ -125,7 +125,7 @@ Page({
title: ""
});
var i = this;
e.request('/miniprogram/recharge/create', {
e.request(t.globalData.config.recharge.create, {
id: i.data.selectItemID
}, !0).then(function (t) {
if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({

View File

@ -1,162 +0,0 @@
// pages/wangdian/wangdian.js
var t = require("../../utils/login.js");
Page({
/**
* 页面的初始数据
*/
data: {
banner: [],
info: {},
jiqilist: [],
number: '',
machineCount: 0,
freeMachineCount: 0,
timer: null,
},
onLoad(options) {
// 如果没有wx.getStorageSync('latitude') 或者 wx.getStorageSync('longitude') 则获取当前位置
if (!wx.getStorageSync('latitude') || !wx.getStorageSync('longitude')) {
wx.getLocation({
type: 'wgs84',
success: (res) => {
wx.setStorageSync('latitude', res.latitude);
wx.setStorageSync('longitude', res.longitude);
this.getBranchDetail();
}
});
}
this.setData({
number: options.number || ''
});
this.getBranchDetail();
this.getMachineList();
// 设置定时器每10秒刷新一次机器状态
this.data.timer = setInterval(() => {
this.getMachineList();
}, 10000);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
// 页面卸载时清除定时器
if (this.data.timer) {
clearInterval(this.data.timer);
this.data.timer = null;
}
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
// 页面卸载时清除定时器
if (this.data.timer) {
clearInterval(this.data.timer);
this.data.timer = null;
}
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
// 获取网点详情信息
getBranchDetail() {
t.request('/miniprogram/branch/detail', {
number: this.data.number,
latitude: wx.getStorageSync('latitude'),
longitude: wx.getStorageSync('longitude'),
method: 'GET',
}, !0).then((res) => {
if (res.code == 200) {
this.setData({
banner: res.data.banner || [],
info: res.data.info || {},
});
}
})
},
// 获取机器列表
getMachineList() {
t.request('/miniprogram/branch/machine', {
number: this.data.number,
}).then((res) => {
if (res.code == 200) {
this.setData({
jiqilist: res.data || [],
});
// 计算机器数量, 与空闲机器数量 free machine
let machineCount = this.data.jiqilist.length;
let freeMachineCount = 0;
for (let i = 0; i < this.data.jiqilist.length; i++) {
if (this.data.jiqilist[i].devicestatus == 0) {
freeMachineCount++;
}
}
// 更新数据
this.setData({
machineCount,
freeMachineCount
});
}
})
},
// 打开地图导航
openLocation() {
if (this.data.info.latitude && this.data.info.longitude) {
wx.openLocation({
latitude: Number(this.data.info.latitude),
longitude: Number(this.data.info.longitude),
name: this.data.info.name,
address: this.data.info.address,
scale: 18
})
} else {
wx.showToast({
title: '暂无位置信息',
icon: 'none'
})
}
},
})

View File

@ -1,8 +0,0 @@
{
"usingComponents": {
"service-tel": "../../template/serviceTel/serviceTel",
"my-money": "../../template/myMoney/myMoney",
"head-swiper": "../../template/headSwiper/headSwiper",
"page-loding": "../../template/pageLoding/pageLoding"
}
}

View File

@ -1,51 +0,0 @@
<view class="container">
<page-loding wx:if="{{showLoding}}"></page-loding>
<head-swiper banner="{{banner}}"></head-swiper>
<view class="content info">
<view class="info">
<view class="title">
<view class="title_c">{{info.name}}</view>
<view class="ld" wx:for="{{info.service}}" wx:key="index_i" wx:for-item="s" style="background-color: {{s.color}};">{{s.label}}</view>
</view>
<view class="tag">{{info.tags}}</view>
<view class="ads" bindtap="openLocation"><text class="iconfont icon-dingwei"></text>{{info.address}}</view>
<view class="ads yingye"><text class="iconfont icon-shijian"></text>{{info.businesshours || "24小时"}}</view>
<view class="dw" bindtap="openLocation">
<text class="ico iconfont icon-daohangdaohang"></text>
<view class="jl">{{info.distance}}</view>
</view>
</view>
</view>
<view class="content">
<view class="index-wangdian-title">
<view class="more">空闲 {{freeMachineCount}}/{{machineCount}}台</view>
<view class="title_c">洗车机<view class="line"></view></view>
</view>
<view class="list">
<view class="jiqi" wx:for="{{jiqilist}}" wx:key="index" wx:for-item="i">
<view wx:if="{{i.devicestatus ==-1}}" class="j"> <!-- 禁用 -->
<view class="mac_state"><text>禁</text></view>
<text class="mac_id">{{i.number}}</text>
<view class="pa" wx:if="{{i.ispa}}">PA壶</view>
</view>
<view wx:elif="{{i.devicestatus == 1}}" class="w"> <!-- 使用中 -->
<view class="mac_state"><text>洗</text></view>
<text class="mac_id">{{i.number}}</text>
<view class="pa" wx:if="{{i.ispa}}">PA壶</view>
</view>
<view wx:elif="{{i.devicestatus == 0}}" class="x"> <!-- 空间 -->
<view class="mac_state"><text>闲</text></view>
<text class="mac_id">{{i.number}}</text>
<view class="pa" wx:if="{{i.ispa}}">PA壶</view>
</view>
<view wx:else class="d"> <!-- 离线 -->
<view class="mac_state"><text>离</text></view>
<text class="mac_id">{{i.number}}</text>
<view class="pa" wx:if="{{i.ispa}}">PA壶</view>
</view>
</view>
</view>
</view>
<service-tel></service-tel>
</view>

View File

@ -1,173 +0,0 @@
.content {
padding: 0 30rpx 30rpx;
margin-bottom: 40rpx;
background-color: #fff;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, .2);
}
.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: 14rpx;
height: 10rpx;
width: 10%;
border-radius: 20rpx;
background-color: #0056A3;
}
.index-wangdian-title .more {
position: absolute;
right: 0;
font-size: 28rpx;
color: #37CE05;
}
.info {
position: relative;
padding-top: 10rpx;
}
.info .title_c {
display: inline-block;
font-size: 36rpx;
line-height: 48rpx;
margin-bottom: 10rpx;
}
.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;
}
.info .tag, .info .ads {
font-size: 28rpx;
line-height: 2;
color: #999;
}
.info .jiqi {
font-size: 24rpx;
line-height: 2;
color: #37CE05;
}
.info .yingye {
}
.info .dw {
position: absolute;
right: 20rpx;
top: 35rpx;
height: 120rpx;
width: 120rpx;
font-size: 24rpx;
color: #0056A3;
text-align: center;
}
.info .dw .ico {
font-size: 80rpx;
}
.list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 20rpx 0 0;
text-align: center;
}
.list .jiqi {
flex-direction: column;
width: 22%;
margin: 20rpx 0 20rpx 0;
position: relative;
}
.list .jiqi:nth-child(4n+4) {
margin-right: 0;
}
.mac_state {
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
margin: 0 auto;
font-size: 40rpx;
border: 10rpx solid #aaa;
box-sizing: border-box;
line-height: 80rpx;
}
.mac_state text {
color: #fff;
}
.mac_id {
font-size: 24rpx;
}
.jiqi .pa {
position: absolute;
left: 50%;
margin-left: -34rpx;
top: -15rpx;
padding: 2rpx 10rpx;
border-radius: 8rpx;
}
.list .jiqi .x, .x .mac_state text {
color: #30b504;
}
.x .mac_state {
border-color: #30b504;
}
.list .jiqi .j, .j .mac_state text {
color: #C13700;
}
.j .mac_state {
border-color: #C13700;
}
.list .jiqi .w, .w .mac_state text {
color: #08AFDE;
}
.w .mac_state {
border-color: #08AFDE;
}
.list .jiqi .d, .d .mac_state text {
color: #aaa;
}
.list .jiqi .pa {
font-size: 20rpx;
color: #fff;
background-color: #f60;
}

View File

@ -1,27 +0,0 @@
<template name="wangdianList">
<view class="index-wangdian-list">
<view class="index-wangdian-title">
<view bindtap="toPage" class="more" data-refresh="1" data-url="map/map">全部网点></view>
<view class="title_c">离我最近<view class="line"></view></view>
</view>
<view class="index-wangdian-box" wx:for="{{wangdianList}}" wx:key="index" wx:for-item="item">
<view class="info" bindtap="toPage" data-refresh="1" data-url="wangdian/wangdian?number={{item.number}}">
<view class="title">
<view class="title_c">{{item.name}}</view>
<view class="ld" wx:for="{{item.service}}" wx:key="index_i" wx:for-item="s" style="background-color: {{s.color}};">{{s.label}}</view>
</view>
<view class="tag">{{item.tags}}</view>
<view class="ads"><text class="iconfont icon-dingwei"></text>{{item.address}}</view>
<view class="jiqi">洗车机:闲{{item.free}}/{{item.machine}}台</view>
<view class="yingye">{{item.businesshours || '24小时'}}</view>
<view class="dw" catchtap="openLocation" data-latitude="{{item.latitude}}" data-longitude="{{item.longitude}}" data-name="{{item.name}}" data-address="{{item.address}}">
<text class="ico iconfont icon-daohangdaohang"></text>
<view class="jl">{{item.distance}}</view>
</view>
</view>
<view class="xian">
<view class="bili" style="width:{{item.ratio}}"></view>
</view>
</view>
</view>
</template>

View File

@ -6,59 +6,59 @@ Page({
info: {},
id: ""
},
onLoad: function (t) {
onLoad: function(t) {
var o = this;
wx.showLoading({
title: ""
}), this.setData({
id: t.id || 0
}), i.pageStart(e).then(function (e) {
id: t.id || 1
}), i.pageStart(e).then(function(e) {
o.getList();
});
},
getList: function () {
getList: function() {
var o = this;
wx.showLoading({
title: ""
}), i.request('/miniprogram/coupons/details', {
}), i.request(e.globalData.config.carwashcoupon.details, {
id: this.data.id
}, !0).then(function (e) {
}, !0).then(function(e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
title: "提示",
content: e.message
}), !1;
e.data.starttime = t.changeTimeyear(new Date(1e3 * e.data.starttime)), e.data.deadline = t.changeTimeyear(new Date(1e3 * e.data.deadline)),
o.setData({
info: e.data,
showLoding: !1
}, function () { });
}).catch(function (e) {
o.setData({
info: e.data,
showLoding: !1
}, function() {});
}).catch(function(e) {
wx.hideLoading();
});
},
isSubmit: !1,
received: function () {
received: function() {
if (this.isSubmit) return !1;
var t = this;
this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request('/miniprogram/coupons/receive', {
this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request(e.globalData.config.carwashcoupon.receive, {
id: t.data.id,
token: t.data.info.token
}, !0).then(function (e) {
}, !0).then(function(e) {
console.log("receiveddqta", e), wx.hideLoading(), t.isSubmit = !1, console.log("recief"),
wx.showModal({
title: "提示",
content: e.message,
success: function (e) {
e.confirm && wx.redirectTo({
url: "/pages/index/index"
});
}
});
}).catch(function (e) {
wx.showModal({
title: "提示",
content: e.message,
success: function(e) {
e.confirm && wx.redirectTo({
url: "/pages/index/index"
});
}
});
}).catch(function(e) {
wx.hideLoading(), t.isSubmit = !1, console.log("提示提示提示提示", e), 201 == e.code && wx.showModal({
title: "提示",
content: e.message,
success: function (e) {
success: function(e) {
if (!e.confirm) return console.log("弹窗取消"), !1;
wx.redirectTo({
url: "/pages/index/index"

View File

@ -10,21 +10,21 @@ Page({
selectID: null,
isScan: !1
},
onLoad: function (a) {
onLoad: function(a) {
var i = this;
e.pageStart(t).then(function (e) {
e.pageStart(t).then(function(e) {
i.getList(), console.log("app.globalData.devicecode", t.globalData.user.money, t.globalData.devicecode),
i.setData({
isScan: !!t.globalData.devicecode
});
i.setData({
isScan: !!t.globalData.devicecode
});
});
},
onShow: function () {
onShow: function() {
this.isneedUpload && (this.getList(), this.isneedUpload = !1);
},
onPullDownRefresh: function () { },
onShareAppMessage: function () { },
toPage: function (t) {
onPullDownRefresh: function() {},
onShareAppMessage: function() {},
toPage: function(t) {
var e = t.currentTarget.dataset.url;
e ? wx.navigateTo({
url: "/pages/".concat(e)
@ -34,16 +34,7 @@ Page({
duration: 2e3
});
},
selectItem: function (t) {
// 1. 提示用户先绑定设备, isScan
if (!this.data.isScan) return wx.showModal({
title: "提示",
content: "请先扫码设备~"
}), !1;
selectItem: function(t) {
var e = t.currentTarget.dataset, a = (e.index, e.code);
if (1 != e.available) return wx.showToast({
title: "该洗车券不可用~",
@ -54,39 +45,39 @@ Page({
});
},
isloading: !1,
getList: function (i) {
getList: function(i) {
var o = this;
if (this.isloading) return !1;
wx.showLoading(), this.setData({
loading: !0
}), this.isloading = !0, e.request('/miniprogram/coupons/lists', { devicecode: t.globalData.devicecode }, !0).then(function (t) {
}), this.isloading = !0, e.request(t.globalData.config.carwashcoupon.lists, {}, !0).then(function(t) {
if (o.isloading = !1, o.setData({
loading: !1
}), wx.hideLoading(), 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
}), !1;
t.data.data.map(function (t) {
t.data.list.map(function(t) {
t.starttime = a.changeTimeyear(new Date(1e3 * t.starttime)), t.deadline = a.changeTimeyear(new Date(1e3 * t.deadline));
}), o.setData({
list: t.data.data,
list: t.data.list,
user: t.data.user,
showLoding: !1
});
}).catch(function (t) {
}).catch(function(t) {
o.isloading = !1, o.setData({
loading: !1
}), wx.hideLoading();
});
},
toScan: function () {
toScan: function() {
var a = this;
if (this.isSubmit) return !1;
wx.scanCode({
success: function (i) {
success: function(i) {
wx.showLoading({
title: ""
}), t.globalData.qrcode = i.result, e.request("/miniprogram/identify", i, !0).then(function (e) {
}), t.globalData.qrcode = i.result, e.request("https://jmqf.v0750.com/miniprogram/identify", i, !0).then(function(e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
title: "提示",
content: e.message
@ -94,7 +85,7 @@ Page({
t.globalData.devicecode = e.data.devicecode || t.globalData.devicecode, a.setData({
isScan: !!e.data.devicecode
}), a.getList();
}).catch(function (t) {
}).catch(function(t) {
wx.hideLoading(), a.isSubmit = !1;
});
}
@ -103,7 +94,7 @@ Page({
isSubmit: !1,
isneedUpload: !1,
isshowModal: !1,
toStart: function () {
toStart: function() {
var t = this;
return console.log("this.isSubmit", this.isSubmit), !this.isSubmit && (0 == this.data.list.length ? (wx.showModal({
title: "提示",
@ -113,28 +104,25 @@ Page({
content: "请选择洗车券"
}), !1));
},
startup: function () {
startup: function() {
var a = this;
wx.showModal({
title: "提示",
content: "你当前将要使用的机器编号是:".concat(t.globalData.devicecode, ",确认开机吗?"),
success: function (i) {
success: function(i) {
i.confirm && (a.isSubmit = !0, wx.showLoading({
title: "正在启动"
}), e.request('/miniprogram/machine/carwashcodestartup', {
}), e.request(t.globalData.config.machine.carwashcodestartup, {
washcode: a.data.selectID
}, !0).then(function (t) {
// 成功后返回提示
wx.showToast({ title: t.message || '启动成功', icon: 'success' });
// 成功后跳转
}, !0).then(function(t) {
a.isSubmit = !1, wx.hideLoading(), 200 == t.code && wx.redirectTo({
url: "/pages/washing/washing"
url: "/pages/user/user"
});
}).catch(function (t) {
}).catch(function(t) {
a.isSubmit = !1, wx.hideLoading();
}));
},
fail: function (t) {
fail: function(t) {
console.log("fail:", t);
}
});

View File

@ -5,15 +5,11 @@
<view bindtap="selectItem" class="{{item.available!=1?'item item-notavailable':selectID==item.code?'active item':'item'}}" data-available="{{item.available}}" data-code="{{item.code}}" wx:for="{{list}}" wx:key="index">
<view class="top">
<view class="radio"></view>
<view class="code">{{item.title}}</view>
<view class="code">{{item.code}}</view>
</view>
<view class="location">可使用网点:<block wx:for="{{item.agent}}" wx:for-index="i" wx:for-item="s">{{s.t_name}}{{ i< item.agent.length-1?'、':''}}</block>
<block wx:if="{{item.agent.length==0}}">不限</block>
<view class="location">可使用网点:<block wx:for="{{item.agent}}" wx:for-index="i" wx:for-item="s">{{s.t_name+(i<item.agent.length-1?'、':'')}} </block>
</view>
<view class="indate">有效期:{{item.starttime}} - {{item.deadline}}</view>
<view class="indate">兑换时间:{{item.created_at}}, 兑换码{{item.code}}</view>
<!-- 如果有note -->
<view class="indate" wx:if="{{item.note}}">{{item.note}}</view>
</view>
</view>
<view class="no-content" wx:if="{{list.length==0&&!loading}}">

View File

@ -72,7 +72,6 @@
border-radius: 18rpx;
box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75);
padding: 14rpx 20rpx 14rpx 14rpx;
margin-bottom: 20rpx;
}
.item .top {

View File

@ -1,178 +0,0 @@
var t = getApp(), e = require("../../utils/login.js");
Page({
/**
* 页面的初始数据
*/
data: {
countdown: '',
agentname: '',
devicecode: '',
remainingTime: 0,
orderid: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var a = this;
e.request('/miniprogram/index/balance', {}, !0).then(function (res) {
if (!res.data || !res.data.progressorder) {
wx.showToast({
title: '没有进行中的订单',
icon: 'none',
duration: 3000
});
setTimeout(() => {
// 跳转到首页
wx.redirectTo({
url: '/pages/index/index'
});
}, 1000);
return;
}
const orderInfo = res.data.progressorder;
const currentTime = Math.floor(Date.now() / 1000);
const remainingTime = Math.max(0, orderInfo.timestamp + orderInfo.siteoccupationTime * 60 - currentTime);
a.setData({
agentname: orderInfo.agentname,
devicecode: orderInfo.devicecode,
remainingTime: remainingTime,
orderid: orderInfo.id
});
if (remainingTime > 0) {
a.countdown();
}
}).catch(function (err) {
wx.showToast({
title: '获取订单信息失败',
icon: 'none',
duration: 2000
});
setTimeout(() => {
wx.redirectTo({
url: '/pages/index/index'
});
}, 1000);
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
handleSettlement() {
wx.showModal({
title: '确认结算',
content: '确定要结算此次洗车订单吗?',
success: (res) => {
if (res.confirm) {
e.request('/miniprogram/machine/shutdown', {
orderid: this.data.orderid
}, true).then((res) => {
if (res.code === 200) {
wx.showToast({
title: res.message || '结算成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
wx.removeStorageSync('progressorder');
wx.redirectTo({
url: '/pages/index/index'
});
}, 2000);
}
}).catch((err) => {
// setTimeout(() => {
// wx.removeStorageSync('progressorder');
// wx.reLaunch({
// url: '/pages/index/index'
// });
// }, 2000);
})
}
}
});
},
countdown() {
// 没有 Cannot read property 'remainingTime' of undefined
if (!this.data.remainingTime) {
this.setData({
countdown: '00:00'
});
return;
}
if (this.data.remainingTime <= 0) {
this.setData({
countdown: '00:00'
});
return;
}
const minute = Math.floor(this.data.remainingTime / 60);
const second = this.data.remainingTime % 60;
const formattedMinute = minute < 10 ? '0' + minute : minute;
const formattedSecond = second < 10 ? '0' + second : second;
this.setData({
countdown: formattedMinute + ':' + formattedSecond,
remainingTime: this.data.remainingTime - 1
});
setTimeout(this.countdown, 1000);
},
})

View File

@ -1,5 +0,0 @@
{
"usingComponents": {
"service-tel": "../../template/serviceTel/serviceTel"
}
}

View File

@ -1,42 +0,0 @@
<view class="spinner">
<view class="time">
<text class="wangdian">{{agentname}}</text>
<text class="mactime">{{countdown}}</text>
<text class="macid">{{devicecode}}</text>
</view>
<view class="spinner-container container1">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container2">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container3">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container4">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
<view class="spinner-container container5">
<view class="circle1"></view>
<view class="circle2"></view>
<view class="circle3"></view>
<view class="circle4"></view>
</view>
</view>
<view class="btn">
<button type="primary" bindtap="handleSettlement">结 算 洗 车</button>
</view>
<service-tel></service-tel>

View File

@ -1,167 +0,0 @@
.btn {
padding: 80rpx 100rpx 40rpx;
}
.spinner {
margin: 200rpx auto 80rpx;
width: 400rpx;
height: 400rpx;
position: relative;
border-radius: 400rpx;
border: 10rpx solid green;
}
.spinner .time {
font-family: 'Consolas', 'Lucida Console', 'DejaVu Sans Mono', monospace;
position: absolute;
width: 400rpx;
height: 320rpx;
padding-top: 80rpx;
text-align: center;
color: green;
}
.spinner .time text {
display: block;
}
.wangdian, .macid {
line-height: 2;
font-size: 40rpx;
}
.mactime {
font-size: 80rpx;
font-weight: 700;
}
.container1 > view, .container2 > view, .container3 > view, .container4 > view, .container5 > view {
width: 20rpx;
height: 20rpx;
background-color: green;
border-radius: 100%;
position: absolute;
-webkit-animation: bouncedelay 2.2s infinite ease-in-out;
animation: bouncedelay 2.2s infinite ease-in-out;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.spinner .spinner-container {
position: absolute;
width: 100%;
height: 100%;
}
.container2 {
-webkit-transform: rotateZ(22.5deg);
transform: rotateZ(22.5deg);
}
.container3 {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
}
.container4 {
-webkit-transform: rotateZ(67.5deg);
transform: rotateZ(67.5deg);
}
.container5 {
-webkit-transform: rotateZ(90deg);
transform: rotateZ(90deg);
}
.circle1 { top: 0; left: 0; }
.circle2 { top: 0; right: 0; }
.circle3 { right: 0; bottom: 0; }
.circle4 { left: 0; bottom: 0; }
.container1 .circle1 {
-webkit-animation-delay: -2s;
animation-delay: -2s;
}
.container2 .circle1 {
-webkit-animation-delay: -1.9s;
animation-delay: -1.9s;
}
.container3 .circle1 {
-webkit-animation-delay: -1.8s;
animation-delay: -1.8s;
}
.container4 .circle1 {
-webkit-animation-delay: -1.7s;
animation-delay: -1.7s;
}
.container5 .circle1 {
-webkit-animation-delay: -1.6s;
animation-delay: -1.6s;
}
.container1 .circle2 {
-webkit-animation-delay: -1.5s;
animation-delay: -1.5s;
}
.container2 .circle2 {
-webkit-animation-delay: -1.4s;
animation-delay: -1.4s;
}
.container3 .circle2 {
-webkit-animation-delay: -1.3s;
animation-delay: -1.3s;
}
.container4 .circle2 {
-webkit-animation-delay: -1.2s;
animation-delay: -1.2s;
}
.container5 .circle2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.container1 .circle3 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.container2 .circle3 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.container3 .circle3 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
.container4 .circle3 {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s;
}
.container5 .circle3 {
-webkit-animation-delay: -0.6s;
animation-delay: -0.6s;
}
.container1 .circle4 {
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s;
}
.container2 .circle4 {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s;
}
.container3 .circle4 {
-webkit-animation-delay: -0.3s;
animation-delay: -0.3s;
}
.container4 .circle4 {
-webkit-animation-delay: -0.2s;
animation-delay: -0.2s;
}
.container5 .circle4 {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s;
}
@-webkit-keyframes bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0.0) }
40% { -webkit-transform: scale(2.0) }
}
@keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 40% {
transform: scale(2.0);
-webkit-transform: scale(2.0);
}
}

View File

@ -13,7 +13,7 @@
"minified": true,
"enhance": false,
"ignoreDevUnusedFiles": false,
"ignoreUploadUnusedFiles": true,
"ignoreUploadUnusedFiles": false,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {

View File

@ -1,57 +0,0 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "JMApp",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/washing/washing",
"pathName": "pages/washing/washing",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/washCodeDetail/washCodeDetail",
"pathName": "pages/washCodeDetail/washCodeDetail",
"query": "id=6",
"launchMode": "default",
"scene": null
},
{
"name": "/pages/washCodeDetail/washCodeDetail",
"pathName": "/pages/washCodeDetail/washCodeDetail",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/refund/refund",
"pathName": "pages/refund/refund",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/OnlineCarHailing/OnlineCarHailing",
"pathName": "pages/OnlineCarHailing/OnlineCarHailing",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/wangdian/wangdian",
"pathName": "pages/wangdian/wangdian",
"query": "number=T1000126",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "3.3.4"
}

View File

@ -3,7 +3,7 @@
}
.swiper {
margin:0 0 0;
margin: 34rpx 27rpx 0;
}
image {

View File

@ -5,6 +5,6 @@
<view class="loader"></view>
</view>
</view>
<image class="logo" src="/img/logo.png"></image>
<image class="logo" src="/img/logo2.jpeg"></image>
</view>
</view>

View File

@ -1,8 +1,8 @@
var e = require("../@babel/runtime/helpers/typeof"), o = (require("./common.js"),
null), a = null;
null), a = null;
function t() {
return new Promise(function (e, o) {
return new Promise(function(e, o) {
return wx.login({
success: e,
fail: o
@ -12,20 +12,7 @@ function t() {
function n(a) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
// a 是否 https, 如果不是自动补全
if (!/^https/.test(a)) {
a = 'https://t-jm.v0750.com' + a;
}
// method 默认为 GET
let method = "POST";
if (t.method) {
method = t.method;
delete t.method;
}
return wx.showLoading(), new Promise(function (n, c) {
return wx.showLoading(), new Promise(function(n, c) {
console.log("requestdevicecode", o.globalData.devicecode);
var i = Object.assign({}, {
devicecode: o.globalData.devicecode
@ -39,8 +26,8 @@ function n(a) {
Cookie: "_miucms_session=" + wx.getStorageSync("_miucms_session"),
token: wx.getStorageSync("session") || ""
},
method: method,
success: function (o) {
method: "POST",
success: function(o) {
var t = o.data;
if ("object" != e(t) && null != t) {
t = t.replace("\ufeff", "");
@ -50,40 +37,40 @@ function n(a) {
wx.hideLoading();
var l = o.data;
switch (1 * l.code) {
case 200:
case 888:
n(l);
break;
case 200:
case 888:
n(l);
break;
case 201:
a.indexOf("carwashcoupon/receive") > -1 || wx.showModal({
title: "提示",
content: l.message
}), c(l);
break;
case 201:
a.indexOf("carwashcoupon/receive") > -1 || wx.showModal({
title: "提示",
content: l.message
}), c(l);
break;
case 404:
wx.showModal({
title: "提示",
content: "未找到当前接口"
}), c(l);
break;
case 404:
wx.showModal({
title: "提示",
content: "未找到当前接口"
}), c(l);
break;
case 401:
var s = getCurrentPages(), r = s[s.length - 1];
console.log(401, a), wx.redirectTo({
url: "/pages/login/login?fromPage=".concat(r.route)
}), c(l);
break;
case 401:
var s = getCurrentPages(), r = s[s.length - 1];
console.log(401, a), wx.redirectTo({
url: "/pages/login/login?fromPage=".concat(r.route)
}), c(l);
break;
default:
wx.showModal({
title: "提示",
content: l.message
}), c(l);
default:
wx.showModal({
title: "提示",
content: l.message
}), c(l);
}
},
fail: function (e) {
fail: function(e) {
wx.hideLoading(), console.log("reqest error", e), c("fail");
}
});
@ -91,37 +78,37 @@ function n(a) {
}
function c(e, a) {
console.log("appstart", e), o = a, n("https://t-jm.v0750.com/miniprogram", {
console.log("appstart", e), o = a, n("https://jmqf.v0750.com/miniprogram", {
code: e
}, !0).then(function (e) {
}, !0).then(function(e) {
var o = e.data;
console.log("总接口", o), a.globalData.user = o.user, wx.setStorageSync("session", o.user.session),
a.globalData.isUserAuthorization = o.user > 0 ? 2 : 1, a.globalData.config = o.config,
a.globalData.servicetel = o.servicetel, a.globalData.canGetData = !0, a.globalData.protocol = o.protocol;
a.globalData.isUserAuthorization = o.user > 0 ? 2 : 1, a.globalData.config = o.config,
a.globalData.servicetel = o.servicetel, a.globalData.canGetData = !0, a.globalData.protocol = o.protocol;
});
}
module.exports = {
initial_url: "https://t-jm.v0750.com/miniprogram",
initial_url: "https://jmqf.v0750.com/miniprogram",
login: t,
request: n,
pageStart: function (e) {
return new Promise(function (o, t) {
e.globalData.canGetData ? o() : a = setInterval(function () {
pageStart: function(e) {
return new Promise(function(o, t) {
e.globalData.canGetData ? o() : a = setInterval(function() {
e.globalData.canGetData && (clearInterval(a), o());
}, 1e3);
});
},
getLogin: function (e) {
o = e, t().then(function (a) {
getLogin: function(e) {
o = e, t().then(function(a) {
console.log("获取用户登录态成功!", a.code), o.globalData.code = a.code, c(a.code, e);
}).catch(function (o) {
}).catch(function(o) {
c(res.code, e);
});
},
baseUrl: "https://t-jm.v0750.com/",
getDevicecode: function (e, a) {
o = e, n("https://t-jm.v0750.com/miniprogram/identify/reload", a, !0).then(function (e) {
baseUrl: "https://jmqf.v0750.com/",
getDevicecode: function(e, a) {
o = e, n("https://jmqf.v0750.com/miniprogram/identify/reload", a, !0).then(function(e) {
var a = e.data;
console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
});

File diff suppressed because it is too large Load Diff