diff --git a/app.js b/app.js
index b311b4a..fec3b41 100644
--- a/app.js
+++ b/app.js
@@ -3,15 +3,31 @@ var t = require("./utils/login.js");
// 引入
require("./utils/xstat.js");
+function generateRandomCode(length) {
+ let result = '';
+ const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
+ const charactersLength = characters.length;
+ for (let i = 0; i < length; i++) {
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
+ }
+
+ return result;
+}
App({
xstatConfig: {
appKey: wx.getAccountInfoSync().miniProgram.appId, // 自动获取 小程序appid
debug: true, //是否打开调试模式
// 上报地址
- LOG_URL: 'https://t-jm.v0750.com/send',
+ LOG_URL: 'https://t-jm.v0750.com/v2/stat/send',
},
- onLaunch: function(e) {
+ onLaunch: function (e) {
+
+ // 40 位的随机码
+ if (!wx.getStorageSync("session")) {
+ wx.setStorageSync("session", generateRandomCode(40));
+ }
+
console.log("options", e), this.globalData.options = e, t.getLogin(this, !0);
try {
var o = wx.getSystemInfoSync();
@@ -25,16 +41,16 @@ App({
});
}
},
- onShow: function(e) {
+ onShow: function (e) {
console.log("onshowwwwwwwoptions", e);
var o = e.scene;
- [ 1011, 1012, 1013, 1024, 1047, 1048, 1049 ].indexOf(o) > -1 && (console.log("扫码进入的"),
- t.getDevicecode(this, e));
+ [1011, 1012, 1013, 1024, 1047, 1048, 1049].indexOf(o) > -1 && (console.log("扫码进入的"),
+ t.getDevicecode(this, e));
},
- computeNavigateBarHeight: function(t) {
+ computeNavigateBarHeight: function (t) {
var e = wx.getMenuButtonBoundingClientRect(), o = e.bottom + 6, i = t.windowHeight, n = e.top, a = e.height;
i < 10 && (i = t.windowHeight, a = o - (n = t.statusBarHeight)), o < 10 && (console.log("更新"),
- o = 68, /iPhone X|MI 8|PAAM00|COR-AL00/.test(t.model) ? o = 88 : /iPhone/.test(t.model) && (o = 64));
+ o = 68, /iPhone X|MI 8|PAAM00|COR-AL00/.test(t.model) ? o = 88 : /iPhone/.test(t.model) && (o = 64));
var s = t.windowWidth;
this.globalData.screen_data = {
windowWidth: s,
@@ -58,6 +74,12 @@ App({
isneedUpload: !1,
needJumpUrl: !1,
devicecode: "",
+ deviceData: {
+ type: 'machine',
+ devicecode: '',
+ options: {},
+ title: '',
+ },
protocol: {},
tips: ""
}
diff --git a/app.json b/app.json
index 79628b1..fb4c15d 100644
--- a/app.json
+++ b/app.json
@@ -23,7 +23,11 @@
"pages/user/user",
"pages/webview/webview",
"pages/wangdian/wangdian",
- "pages/duiquan/duiquan"
+ "pages/duiquan/duiquan",
+ "pages/refund/refund",
+ "pages/washing/washing",
+ "pages/substituteWash/substituteWash",
+ "pages/OnlineCarHailing/OnlineCarHailing"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index a631881..dd9d319 100644
--- a/app.wxss
+++ b/app.wxss
@@ -125,7 +125,7 @@
bottom: 0;
color: #fff;
font-size: 44rpx;
- height: 136rpx;
+ height: 126rpx;
left: 0;
line-height: 106rpx;
position: fixed;
@@ -133,7 +133,6 @@
width: 100vw;
z-index: 6;
border-radius: 40rpx 40rpx 0 0;
- overflow: hidden;
}
.scan-btn .sha {
animation: shake 2s infinite;
@@ -184,6 +183,7 @@
font-size: 26rpx;
justify-content: center;
line-height: 40rpx;
+ border:none;
}
.index-href-box,.service-tel {
@@ -208,15 +208,6 @@
background-image: linear-gradient(to bottom, #C7E1F9, #fff);
}
-.index-href-box button.item {
- border: 0;
- padding: 0;
-}
-
-.index-href-box button.item .name {
- line-height: 40rpx;
-}
-
.index-href-box .item_b {
width: 100%;
height: 100%;
diff --git a/img/iconfont---.svg b/img/iconfont---.svg
deleted file mode 100644
index dbfacb8..0000000
--- a/img/iconfont---.svg
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
diff --git a/img/logo2.jpeg b/img/logo2.jpeg
deleted file mode 100644
index 78257df..0000000
Binary files a/img/logo2.jpeg and /dev/null differ
diff --git a/pages/OnlineCarHailing/OnlineCarHailing.js b/pages/OnlineCarHailing/OnlineCarHailing.js
new file mode 100644
index 0000000..5ffdb55
--- /dev/null
+++ b/pages/OnlineCarHailing/OnlineCarHailing.js
@@ -0,0 +1,118 @@
+// 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() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/OnlineCarHailing/OnlineCarHailing.json b/pages/OnlineCarHailing/OnlineCarHailing.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/OnlineCarHailing/OnlineCarHailing.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/OnlineCarHailing/OnlineCarHailing.wxml b/pages/OnlineCarHailing/OnlineCarHailing.wxml
new file mode 100644
index 0000000..1ed4301
--- /dev/null
+++ b/pages/OnlineCarHailing/OnlineCarHailing.wxml
@@ -0,0 +1,9 @@
+
+
+ 设置网约车用户
+
+
+
\ No newline at end of file
diff --git a/pages/OnlineCarHailing/OnlineCarHailing.wxss b/pages/OnlineCarHailing/OnlineCarHailing.wxss
new file mode 100644
index 0000000..e597b4c
--- /dev/null
+++ b/pages/OnlineCarHailing/OnlineCarHailing.wxss
@@ -0,0 +1,25 @@
+.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);
+}
\ No newline at end of file
diff --git a/pages/common/common.wxml b/pages/common/common.wxml
index 4ea3067..1f33a3b 100644
--- a/pages/common/common.wxml
+++ b/pages/common/common.wxml
@@ -1,20 +1,16 @@
-
-
-
-
-
- {{item.name}}
+
+
+
+
+ {{item.name}}
+
-
-
-
-
diff --git a/pages/common/common.wxss b/pages/common/common.wxss
deleted file mode 100644
index e69de29..0000000
diff --git a/pages/duiquan/duiquan.js b/pages/duiquan/duiquan.js
index a31e33a..90b4901 100644
--- a/pages/duiquan/duiquan.js
+++ b/pages/duiquan/duiquan.js
@@ -1,12 +1,13 @@
-var t = require("../../utils/login.js");
+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) => {
+ t.request('/miniprogram/coupons/index', {}, !0).then((res) => {
if (res.code == 200) {
this.setData({
tips: res.data.tips,
@@ -15,7 +16,58 @@ Page({
}
})
},
+ 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/index", i, !0).then(function (t) {
+ console.log("data", t), wx.hideLoading();
+ // 保存设备编号
+ getApp().globalData.deviceData = t.data || getApp().globalData.deviceData || {};
+ getApp().globalData.devicecode = t.data.devicecode || getApp().globalData.devicecode;
+ a.startup();
+ }).catch(function (e) {
+ wx.hideLoading();
+ });
+ }
+ });
+ },
+ // 启动
+ startup: function () {
+ if (getApp().globalData.deviceData.devicecode) {
+ // 合并参数 t.globalData.deviceData 与 washcode
+ let params = Object.assign(getApp().globalData.deviceData, {
+ washcode: this.data.code
+ });
+
+ // 已扫码,启动机器
+ t.request('/miniprogram/' + getApp().globalData.deviceData.type + '/carwashcodestartup', params, !0).then((startRes) => {
+ if (startRes.code == 200) {
+ wx.showToast({ title: startRes.message || '启动成功', icon: 'success' });
+ // 跳转到洗车券列表页面
+ wx.redirectTo({
+ // url: "/pages/washing/washing"
+ url: "/pages/index/index"
+ })
+ } 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) {
@@ -32,15 +84,43 @@ Page({
t.request('/miniprogram/coupons/importDouyin', { code: code }, !0).then((res) => {
wx.hideLoading()
if (res.code == 200) {
- wx.showToast({
- title: '兑换成功',
- icon: 'success'
- });
- setTimeout(() => {
- wx.navigateTo({
- url: '/pages/washCodeList/washCodeList'
- })
+
+ // 在当前页面记下券码
+ 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.deviceData.title || getApp().globalData.deviceData.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 || '兑换失败',
diff --git a/pages/duiquan/duiquan.wxss b/pages/duiquan/duiquan.wxss
index 7142362..a41d302 100644
--- a/pages/duiquan/duiquan.wxss
+++ b/pages/duiquan/duiquan.wxss
@@ -20,11 +20,14 @@
.input {
margin: 30rpx 0;
- padding: 22rpx;
+ 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 {
diff --git a/pages/goodsDetails/goodsDetails.js b/pages/goodsDetails/goodsDetails.js
index 0415505..2442307 100644
--- a/pages/goodsDetails/goodsDetails.js
+++ b/pages/goodsDetails/goodsDetails.js
@@ -1,4 +1,4 @@
-var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(),
+var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(),
require("../../utils/login.js")), i = require("../../utils/common.js");
Page({
@@ -39,7 +39,7 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- return s, e.prev = 1, e.next = 4, n.request(n.baseUrl + "shop/details", {
+ return s, e.prev = 1, e.next = 4, n.request("https://t-jm.v0750.com/shop/details", {
id: s.data.id
}, !0);
@@ -76,7 +76,7 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ],
+ r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ],
i = 0, s = 0;
case 5:
diff --git a/pages/goodsDetails/kefuBox/kefuBox.js b/pages/goodsDetails/kefuBox/kefuBox.js
deleted file mode 100644
index d544c30..0000000
--- a/pages/goodsDetails/kefuBox/kefuBox.js
+++ /dev/null
@@ -1,7 +0,0 @@
-Component({
- properties: {},
- data: {
- showDialog: !1
- },
- methods: {}
-});
\ No newline at end of file
diff --git a/pages/goodsDetails/kefuBox/kefuBox.json b/pages/goodsDetails/kefuBox/kefuBox.json
deleted file mode 100644
index 7e37c03..0000000
--- a/pages/goodsDetails/kefuBox/kefuBox.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "component": true,
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/goodsDetails/kefuBox/kefuBox.wxml b/pages/goodsDetails/kefuBox/kefuBox.wxml
deleted file mode 100644
index 392c918..0000000
--- a/pages/goodsDetails/kefuBox/kefuBox.wxml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
- 霸王餐福利
- 加客服进「声色福利群」
-
-
- 点我添加
-
-
-
-
-
-
-
-
-
-
- 购买须知
-
-
-
- 此券属平台与商家补贴,一经售出无法退款,请确认后再下单。
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/goodsDetails/kefuBox/kefuBox.wxss b/pages/goodsDetails/kefuBox/kefuBox.wxss
deleted file mode 100644
index d90d54f..0000000
--- a/pages/goodsDetails/kefuBox/kefuBox.wxss
+++ /dev/null
@@ -1,189 +0,0 @@
-.keufubox:last-child {
- margin-bottom: -5.333vw;
-}
-
-.kebox {
- border-radius: 1.6vw;
- width: 92vw;
-}
-
-.kebox,.mykefu {
- background: #fff;
-}
-
-.mykefu {
- -webkit-box-pack: justify;
- -ms-flex-pack: justify;
- height: 17.067vw;
- justify-content: space-between;
-}
-
-.mykefu .le {
- -webkit-box-flex: 1;
- flex: 1;
-}
-
-.mykefu,.mykefu .le {
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
-}
-
-.mykefu .le image {
- border-radius: 50%;
- height: 9.6vw;
- margin-right: 3.467vw;
- max-width: 100%;
- width: 9.6vw;
-}
-
-.mykefu .le .box {
- width: 57.333vw;
-}
-
-.mykefu .le .title {
- color: #2a2a2a;
- font-size: 3.733vw;
-}
-
-.mykefu .le .desc,.mykefu .le .title {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.mykefu .le .desc {
- color: #969696;
- font-size: 3.2vw;
- line-height: 4.133vw;
- width: 57.333vw;
-}
-
-.kebox .btn {
- border-radius: 6.667vw;
- color: #fff;
- font-size: 3.2vw;
- height: 8.667vw;
- line-height: 8.667vw;
- position: relative;
- text-align: center;
-}
-
-.mykefu .btn {
- background: #28c418;
- font-size: 3.2vw;
- width: 18.267vw;
-}
-
-.modal-dialog {
- position: fixed;
- z-index: 20;
-}
-
-.modal-dialog,.modal-dialog .modal {
- height: 100%;
- left: 0;
- top: 0;
- width: 100%;
-}
-
-.modal-dialog .modal {
- background: rgba(0,0,0,.5);
- position: absolute;
- transition: all .3s;
-}
-
-.infopop-wrap {
- left: 50%;
- position: absolute;
- top: 45%;
- transform: translate(-50%,-50%);
-}
-
-.infopop-content {
- background-color: #fff;
- border-radius: 2.133vw;
- color: #666;
- font-size: 4vw;
- line-height: 5.333vw;
- overflow: hidden;
- padding-bottom: 6.667vw;
- text-align: center;
- width: 69.867vw;
-}
-
-.info-buy_notice .top {
- color: #fff;
- height: 21.867vw;
- margin-bottom: 3.467vw;
- overflow: hidden;
- position: relative;
-}
-
-.info-buy_notice ._top {
- background: #06a2b3;
- border-radius: 0 0 50% 50%;
- height: 100%;
- left: 50%;
- margin-bottom: 4vw;
- position: absolute;
- top: 0;
- transform: translateX(-50%);
- width: 120%;
-}
-
-.info-buy_notice .top .title {
- color: #fff;
- font-size: 4.8vw;
- left: 0;
- position: absolute;
- text-align: center;
- top: 50%;
- transform: translateY(-50%);
- width: 100%;
-}
-
-.info-buy_notice .txt {
- font-size: 3.733vw;
- line-height: 5.333vw;
- padding: 0 4vw;
- text-align: left;
-}
-
-.info-buy_notice .btn {
- background-color: #06a2b3;
- border-radius: 10.667vw;
- color: #fff;
- font-size: 4vw;
- height: 10.667vw;
- line-height: 10.667vw;
- margin-bottom: -2.133vw;
- margin-top: 5.333vw;
- text-align: center;
- width: 34.667vw;
-}
-
-.infopop-close {
- background-color: #fff;
- border-radius: 50%;
- color: rgba(0,0,0,.6);
- font-size: 8.267vw;
- height: 8.533vw;
- left: 50%;
- line-height: 8.033vw;
- margin: 4.267vw 0 0 -4.267vw;
- padding: 0;
- position: absolute;
- text-align: center;
- top: 100%;
- width: 8.533vw;
-}
-
-.info-buy_notice .btn::after,.info-buy_notice .btn::before {
- background: transparent;
- border: none;
-}
\ No newline at end of file
diff --git a/pages/goodsDetails/matchWrap/matchWrap.js b/pages/goodsDetails/matchWrap/matchWrap.js
deleted file mode 100644
index a85704f..0000000
--- a/pages/goodsDetails/matchWrap/matchWrap.js
+++ /dev/null
@@ -1,5 +0,0 @@
-Component({
- properties: {},
- data: {},
- methods: {}
-});
\ No newline at end of file
diff --git a/pages/goodsDetails/matchWrap/matchWrap.json b/pages/goodsDetails/matchWrap/matchWrap.json
deleted file mode 100644
index 7e37c03..0000000
--- a/pages/goodsDetails/matchWrap/matchWrap.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "component": true,
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/goodsDetails/matchWrap/matchWrap.wxml b/pages/goodsDetails/matchWrap/matchWrap.wxml
deleted file mode 100644
index 2b3e41c..0000000
--- a/pages/goodsDetails/matchWrap/matchWrap.wxml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- 为您搭配更优惠
-
-
-
-
-
-
-
- 【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券!
-
-
-
-
- ¥
- 9.
- 90
-
-
- ¥100.00
-
-
-
- 立即抢购
-
-
-
-
-
-
-
diff --git a/pages/goodsDetails/matchWrap/matchWrap.wxss b/pages/goodsDetails/matchWrap/matchWrap.wxss
deleted file mode 100644
index 5274675..0000000
--- a/pages/goodsDetails/matchWrap/matchWrap.wxss
+++ /dev/null
@@ -1,171 +0,0 @@
-.match-wrap {
- border-top: 2.667vw solid #f8f8f8;
-}
-
-.goods-match {
- background-color: #fff;
- border-radius: 2.133vw;
- display: block;
- padding: 12vw 3.6vw 3.6vw;
- position: relative;
-}
-
-.goods-match .til {
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- background-color: #06a2b3;
- border-radius: .533vw 2.933vw 2.933vw .533vw;
- color: #fff;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- font-size: 3.2vw;
- height: 5.867vw;
- left: -.267vw;
- padding-left: 1.467vw;
- position: absolute;
- top: 2.667vw;
- width: 33.333vw;
-}
-
-.goods-match .til view {
- margin-right: 1.333vw;
-}
-
-.goods-match .item {
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
-}
-
-.goods-match .hd {
- -webkit-box-flex: 25.333vw;
- border-radius: 1.6vw;
- flex: 25.333vw 0 0;
- height: 25.333vw;
- overflow: hidden;
- width: 25.333vw;
-}
-
-.image-box.__100 {
- padding-top: 100%;
-}
-
-.image-box {
- background-color: #ebebeb;
- height: 0;
- overflow: hidden;
- position: relative;
-}
-
-.image-box image {
- height: 100%;
- left: 0;
- position: absolute;
- top: 0;
- width: 100%;
-}
-
-.goods-match .bd {
- -webkit-box-flex: 1;
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-box-pack: justify;
- -ms-flex-pack: justify;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- flex: 1;
- flex-direction: column;
- justify-content: space-between;
- padding: 0 0 0 2.667vw;
-}
-
-.goods-match .bd_name {
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 3;
- color: #2a2a2a;
- display: -webkit-box;
- font-size: 3.733vw;
- height: 16vw;
- line-height: 5.333vw;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
-}
-
-.goods-match .bd ._btm {
- -webkit-box-align: end;
- -ms-flex-align: end;
- align-items: flex-end;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
-}
-
-.goods-match .bd ._btm_lt {
- -webkit-box-flex: 1;
- flex: 1;
-}
-
-.goods-match .bd_price {
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
-}
-
-.now-price {
- color: #eb5252;
- font-family: DIN;
- font-size: 3.2vw;
- line-height: 1.75em;
-}
-
-.goods-match .bd_price .old {
- color: #9b9b9b;
- font-family: DIN;
- font-size: 3.2vw;
- margin-left: 1.333vw;
- text-decoration: line-through;
-}
-
-.goods-match .bd_btn {
- background-color: #06a2b3;
- border-radius: 3.333vw;
- color: #fff;
- font-size: 3.2vw;
- height: 6.667vw;
- line-height: 6.667vw;
- padding: 0 3.6vw;
- text-align: center;
-}
-
-.now-price .symbol {
- display: inline;
- margin: 0 .267vw 0 0;
-}
-
-.now-price.__normal .buck {
- display: inline;
- font-size: 4.8vw;
-}
-
-.cent {
- display: inline;
-}
-
-.hot {
- display: inline-block;
- height: 13px;
- margin-right: 4px;
- width: 13px;
-}
\ No newline at end of file
diff --git a/pages/goodsSearch/goodsSearch.js b/pages/goodsSearch/goodsSearch.js
index 3ee570e..28f0bd0 100644
--- a/pages/goodsSearch/goodsSearch.js
+++ b/pages/goodsSearch/goodsSearch.js
@@ -1,4 +1,4 @@
-var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(),
+var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(),
require("../../utils/login.js"));
Page({
@@ -43,7 +43,7 @@ Page({
page: 1
});
var t = this.data.historyList.indexOf(this.data.kw);
- t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw),
+ t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw),
this.setData({
historyList: this.data.historyList
}), this.getData();
@@ -64,12 +64,12 @@ Page({
case 2:
return r.setData({
loading: !0
- }), r, t.prev = 4, t.next = 7, s.request(s.baseUrl + "shop/search", {
+ }), r, t.prev = 4, t.next = 7, s.request("https://t-jm.v0750.com/shop/search", {
keyword: r.data.kw
}, !0);
case 7:
- n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1,
+ n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1,
o.data.forEach(function(t) {
var a = t.price.split("."), i = e(a, 2);
t.price_buck = i[0], t.price_cent = i[1];
diff --git a/pages/index/index.js b/pages/index/index.js
index 672f086..b3aa033 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -16,7 +16,10 @@ Page({
tabStatus: {
coupon: !1,
shop: !1
- }
+ },
+ showOneTimeOptions: !1,
+ oneTimeOptions: [],
+ oneTimeLoading: !1
},
bindViewTap: function () {
wx.navigateTo({
@@ -86,22 +89,22 @@ Page({
}, 50);
});
});
-
- e.globalData.devicecode = "1840001"; // 强制设置扫码状态
},
getData: function () {
var a = this;
// 获取首页数据
- t.request('/miniprogram/index/balance', {}, !0).then(function (e) {
+ t.request('/miniprogram/index/balance', e.globalData.deviceData, !0).then(function (e) {
a.setData({
user: e.data || [],
});
+ // 存储进度订单
+ wx.setStorageSync('progressorder', e.data.progressorder || []);
});
},
load: function (e) {
console.log(e);
},
- openLocation: function(e) {
+ openLocation: function (e) {
var latitude = Number(e.currentTarget.dataset.latitude);
var longitude = Number(e.currentTarget.dataset.longitude);
var name = e.currentTarget.dataset.name;
@@ -125,7 +128,19 @@ Page({
}), (this.getData(), this.isneedUpload = !1);
},
toPage: function (t) {
- console.info(t);
+
+ if (t.currentTarget.dataset.phone) {
+
+ // 打开客服聊天窗口
+ return wx.openCustomerServiceChat();
+
+
+ // 增加打电话
+ wx.makePhoneCall({
+ phoneNumber: "" + t.currentTarget.dataset.phone
+ });
+ return;
+ }
var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg;
if (console.log("showImg", n), i) {
this.isneedUpload = !0;
@@ -149,11 +164,13 @@ Page({
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(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode,
- a.setData({
- isScan: !!t.data.devicecode
- });
+ }), e.globalData.qrcode = i.result, t.request("/miniprogram/identify/index", i, !0).then(function (t) {
+ console.log("data", t), wx.hideLoading(),
+ e.globalData.deviceData = t.data || e.globalData.deviceData || {};
+ e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode;
+ a.setData({
+ isScan: !!t.data.devicecode
+ });
}).catch(function (e) {
wx.hideLoading();
});
@@ -170,41 +187,140 @@ Page({
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({
+ wx.showActionSheet({
+ itemList: ["单次消费", "立即启动"],
+ success: function (res) {
+ if (res.tapIndex === 0) {
+ t.openOneTimeOptions();
+ } else {
+ if (t.data.user.money == 0) {
+ wx.showModal({
+ title: "提示",
+ content: "您的洗车金额为0元,是否需要购买洗车金额?",
+ confirmText: "去购买",
+ cancelText: "取消",
+ success: function (m) {
+ if (m.confirm) {
+ wx.navigateTo({
+ url: "/pages/voucher/voucher"
+ }), t.isneedUpload = !0;
+ }
+ }
+ });
+ return;
+ }
+ else if (t.data.user.money < 10) {
+ wx.showModal({
+ title: "提示",
+ content: "洗车金额不足10元,是否需要购买洗车金额还是直接开机?",
+ confirmText: "去购买",
+ cancelText: "直接开机",
+ success: function (m) {
+ if (m.confirm) {
+ wx.navigateTo({
+ url: "/pages/voucher/voucher"
+ }), t.isneedUpload = !0;
+ } else {
+ t.startup();
+ }
+ }
+ });
+ return;
+ }
+ t.startup();
+ }
+ }
+ });
+ },
+ openOneTimeOptions: function () {
+ var a = this;
+ if (a.data.oneTimeLoading) return !1;
+ a.setData({ oneTimeLoading: !0 });
+
+ // 获取单次洗车配置
+ t.request('/miniprogram/single/getAgentConfig', e.globalData.deviceData || {}, !0).then(function (res) {
+ a.setData({
+ oneTimeOptions: (res.data && Array.isArray(res.data)) ? res.data : (res.data && res.data.list ? res.data.list : []),
+ showOneTimeOptions: !0,
+ oneTimeLoading: !1
+ });
+ }).catch(function () {
+ a.setData({ oneTimeLoading: !1 });
+ });
+ },
+ closeOneTimeOptions: function () {
+ this.setData({ showOneTimeOptions: !1 });
+ },
+ payOneTime: function (evt) {
+ var a = this, i = evt.currentTarget.dataset.token;
+ if (!i) return !1;
+ wx.showLoading({ title: "" });
+ t.request('/miniprogram/single/create', {
+ token: i
+ }, !0).then(function (res) {
+ if (wx.hideLoading(), 200 != res.code) return 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);
+ content: res.message || ""
+ }), !1;
+ var r = res.data.result;
+ var orderid = res.data.orderid;
+ wx.requestPayment({
+ timeStamp: r.timeStamp,
+ nonceStr: r.nonceStr,
+ package: r.package,
+ signType: r.signType,
+ paySign: r.paySign,
+ success: function () {
+ a.setData({ showOneTimeOptions: !1 });
+ var poll = function () {
+ t.request('/miniprogram/single/notify', {
+ orderid: orderid
+ }, !0).then(function (res) {
+ if (200 == res.code) {
+ wx.showModal({
+ title: "提示",
+ content: "支付成功"
+ });
+ wx.navigateTo({
+ url: "/pages/voucher/voucher"
+ });
+ return;
+ }
+ }).catch(function (err) {
+ if (err && err.code == 202) {
+ setTimeout(poll, 1500);
+ return;
+ }
+ if (err && err.code == 201) {
+ wx.showModal({
+ title: "提示",
+ content: err.message || ""
+ });
+ }
+ });
+ };
+ poll();
}
});
- } else t.startup();
+ }).catch(function () {
+ wx.hideLoading();
+ });
},
startup: function () {
var a = this;
wx.showModal({
title: "提示",
- content: "你当前将要使用的机器编号是:".concat(e.globalData.devicecode, ",确认开机吗?"),
+ content: "你当前将要使用的机器编号是:".concat(e.globalData.deviceData.title || e.globalData.deviceData.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) {
+ }), t.request('/miniprogram/' + e.globalData.deviceData.type + '/startup', e.globalData.deviceData || {}, !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"
+ // url: "/pages/washing/washing"
+ url: "/pages/index/index"
}), a.isneedUpload = !0), 888 == e.code && (wx.navigateTo({
url: "/pages/voucher/voucher"
}), a.isneedUpload = !0);
@@ -229,4 +345,4 @@ Page({
});
},
onShareAppMessage: function () { }
-});
\ No newline at end of file
+});
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index bec8583..d8f9803 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -6,19 +6,35 @@
- {{notice}}
+
+ {{notice}}
+
+
+ 您有一笔洗车订单进行中...
+ 点击查看>
+
- 扫码启动
-
-
- 单次启动
-
-
- 余额启动
-
+
+ 扫码启动
-
\ No newline at end of file
+
+ 立即启动
+
+
+
+ 选择单次消费档位
+ 限单次洗车
+
+
+ {{item.title}}
+ 支付{{item.actualprice}}元 · 洗车时间最长{{item.usetime}}分钟
+
+
+ 取消
+
+
+
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 2006e10..4f04e51 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -32,17 +32,6 @@
position: static;
}
-.two-btn .two-btns {
- float: left;
- width: 50%;
- height: 126rpx;
- padding-top: 10rpx;
-}
-
-.two-btns.yue {
- background-color: #f60;
-}
-
.start-btn-box .scan-subscribe {
margin-right: 10rpx;
}
@@ -129,7 +118,7 @@
top: -20rpx;
color: #fff;
background-color: #0056A3;
- font-size: 24rpx;
+ font-size: 22rpx;
padding: 0 12rpx;
line-height: 36rpx;
border-radius: 0 0 0 20rpx;
@@ -168,4 +157,69 @@
right: 0;
display: block;
background-color: #37CE05;
-}
\ No newline at end of file
+}
+
+.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;
+}
+
+/* 单次消费弹窗 */
+.one-time-modal {
+ position: fixed;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ background: rgba(0,0,0,0.5);
+ z-index: 1000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.one-time-inner {
+ width: 84%;
+ background: #fff;
+ border-radius: 16rpx;
+ padding: 24rpx 24rpx 16rpx;
+ box-shadow: 0 10rpx 30rpx rgba(0,0,0,.2);
+}
+.one-time-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #333;
+ text-align: center;
+}
+.one-time-tip {
+ font-size: 24rpx;
+ color: #999;
+ text-align: center;
+ margin-top: 8rpx;
+}
+.one-time-list {
+ margin-top: 20rpx;
+}
+.one-time-item {
+ border: 1px solid #eee;
+ border-radius: 12rpx;
+ padding: 20rpx;
+ margin-bottom: 16rpx;
+}
+.one-time-cancel {
+ margin-top: 8rpx;
+ background-color: #06a2b3;
+ color: #fff;
+ text-align: center;
+ line-height: 80rpx;
+ height: 80rpx;
+ border-radius: 12rpx;
+}
diff --git a/pages/listDetail/listDetail.js b/pages/listDetail/listDetail.js
index 2c61e29..2582244 100644
--- a/pages/listDetail/listDetail.js
+++ b/pages/listDetail/listDetail.js
@@ -15,7 +15,7 @@ Page({
this.setData({
type: a.type
}), wx.setNavigationBarTitle({
- title: "invest" == a.type ? "充值记录" : "消费明细"
+ title: "invest" == a.type ? "购买记录" : "消费明细"
}), e.pageStart(t).then(function(t) {
n.getContent();
});
@@ -45,7 +45,7 @@ Page({
wx.showLoading({
title: ""
});
- var a = this, n = "invest" == this.data.type ? t.globalData.config.recharge.log : t.globalData.config.consume.init;
+ var a = this, n = "invest" == this.data.type ? '/miniprogram/recharge/log' : '/miniprogram/consume/index';
e.request(n, {
page: this.data.page.next_page
}, !0).then(function(t) {
diff --git a/pages/listDetail/listDetail.wxml b/pages/listDetail/listDetail.wxml
index f09b21b..68db0c6 100644
--- a/pages/listDetail/listDetail.wxml
+++ b/pages/listDetail/listDetail.wxml
@@ -7,7 +7,7 @@
{{item.message}}
@@ -17,5 +17,5 @@
暂无相关数据
- 立即充值
+ 立即购买洗车金额
diff --git a/pages/mall/mall.js b/pages/mall/mall.js
index bd46c5f..c2b991c 100644
--- a/pages/mall/mall.js
+++ b/pages/mall/mall.js
@@ -1,4 +1,4 @@
-var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(),
+var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(),
require("../../utils/login.js"));
Page({
@@ -54,7 +54,7 @@ Page({
return a.default.wrap(function(t) {
for (;;) switch (t.prev = t.next) {
case 0:
- return e, t.prev = 1, t.next = 4, r.request(r.baseUrl + "shop/home", {}, !0);
+ return e, t.prev = 1, t.next = 4, r.request("https://t-jm.v0750.com/shop/home", {}, !0);
case 4:
o = t.sent, (s = o.data).recommendedList.forEach(function(e) {
@@ -99,7 +99,7 @@ Page({
case 3:
return s.setData({
loading: !0
- }), e.prev = 4, e.next = 7, r.request(r.baseUrl + "shop/home/shopList", {
+ }), e.prev = 4, e.next = 7, r.request("https://t-jm.v0750.com/shop/home/shopList", {
type: s.data.tab,
point: {
lng: s.longitude,
diff --git a/pages/map/map.wxml b/pages/map/map.wxml
index 0231ca8..58194c0 100644
--- a/pages/map/map.wxml
+++ b/pages/map/map.wxml
@@ -39,10 +39,8 @@
-
-
diff --git a/pages/map/map.wxss b/pages/map/map.wxss
index 28dc745..252da3c 100644
--- a/pages/map/map.wxss
+++ b/pages/map/map.wxss
@@ -8,11 +8,6 @@
position: fixed;
}
-.custom-btn .btn button {
- border: 0;
-
-}
-
.custom-btn .btn {
background: #fff;
border: 2rpx solid #e4e4e4;
@@ -25,7 +20,6 @@
text-align: center;
width: 88rpx;
z-index: 130;
- overflow: hidden;
}
.iconfont {
diff --git a/pages/orderDetails/orderDetails.js b/pages/orderDetails/orderDetails.js
index 5e4b49d..670a79c 100644
--- a/pages/orderDetails/orderDetails.js
+++ b/pages/orderDetails/orderDetails.js
@@ -1,4 +1,4 @@
-var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
+var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
require("../../utils/login.js")), a = require("../../utils/common.js");
Page({
@@ -26,12 +26,12 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request(t.baseUrl + "shop/order/detail", {
+ return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request("https://t-jm.v0750.com/shop/order/detail", {
orderid: o
}, !0);
case 5:
- if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
+ if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
d.orderValidity && d.orderValidity.length > 0) for (c = 0; c < d.orderValidity.length; c++) i.data.orderValidity[c] = a.changeTime(new Date(1e3 * d.orderValidity[c]));
i.setData({
showLoding: !1,
diff --git a/pages/orderIndex/orderIndex.js b/pages/orderIndex/orderIndex.js
index 0d8fa99..dc606c5 100644
--- a/pages/orderIndex/orderIndex.js
+++ b/pages/orderIndex/orderIndex.js
@@ -1,4 +1,4 @@
-var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
+var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
require("../../utils/login.js"));
Page({
@@ -82,7 +82,7 @@ Page({
return t.default.wrap(function(t) {
for (;;) switch (t.prev = t.next) {
case 0:
- return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/create", {
+ return t.prev = 0, t.next = 3, a.request("https://t-jm.v0750.com/shop/order/create", {
token: n.data.token
}, !0);
@@ -119,7 +119,7 @@ Page({
return t.default.wrap(function(t) {
for (;;) switch (t.prev = t.next) {
case 0:
- return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/num", {
+ return t.prev = 0, t.next = 3, a.request("https://t-jm.v0750.com/shop/order/num", {
uniqid: n.data.shoppingCartList.uniqid,
cartnum: n.data.num
}, !0);
diff --git a/pages/orderList/orderList.js b/pages/orderList/orderList.js
index a2e23a3..ffbe438 100644
--- a/pages/orderList/orderList.js
+++ b/pages/orderList/orderList.js
@@ -1,4 +1,4 @@
-var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(),
+var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(),
require("../../utils/login.js"));
Page({
@@ -70,7 +70,7 @@ Page({
case 2:
return r.setData({
loading: !0
- }), t.prev = 3, t.next = 6, n.request(n.baseUrl + "shop/order/lists", {
+ }), t.prev = 3, t.next = 6, n.request("https://t-jm.v0750.com/shop/order/lists", {
page: r.data.next_page,
typeid: r.data.tab
}, !0);
@@ -79,7 +79,7 @@ Page({
s = t.sent, i = s.data, r.setData({
loading: !1,
showLoding: !1
- }), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1,
+ }), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1,
r.setData({
type: i.type,
count: i.count,
@@ -108,7 +108,7 @@ Page({
case 0:
return s = a.currentTarget.dataset, i = s.orderid, o = s.index, wx.showLoading({
title: "正在删除"
- }), t.prev = 2, t.next = 5, n.request(n.baseUrl + "shop/order/delete", {
+ }), t.prev = 2, t.next = 5, n.request("https://t-jm.v0750.com/shop/order/delete", {
orderid: i
}, !0);
diff --git a/pages/orderPay/orderPay.js b/pages/orderPay/orderPay.js
index fb7f55e..50d636f 100644
--- a/pages/orderPay/orderPay.js
+++ b/pages/orderPay/orderPay.js
@@ -1,4 +1,4 @@
-var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
+var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
require("../../utils/login.js")), r = require("../../utils/common.js");
Page({
@@ -41,7 +41,7 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- return r, e.prev = 1, e.next = 4, a.request(a.baseUrl + "shop/order/submit", {
+ return r, e.prev = 1, e.next = 4, a.request("https://t-jm.v0750.com/shop/order/submit", {
uniqid: r.data.uniqid,
name: r.data.name,
mobile: r.data.mobile,
@@ -74,15 +74,15 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request(a.baseUrl + "shop/order/detail", {
+ return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request("https://t-jm.v0750.com/shop/order/detail", {
orderid: s
}, !0);
case 5:
- i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status),
+ i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status),
1 == o.orderData.status && wx.redirectTo({
url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + o.orderData.orderid
- }), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)),
+ }), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)),
n.setData({
showLoding: !1,
ordercart: o.ordercart,
@@ -143,7 +143,7 @@ Page({
return e.abrupt("return", !1);
case 7:
- return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request(a.baseUrl + "shop/order/pay", {
+ return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request("https://t-jm.v0750.com/shop/order/pay", {
token: r.data.token,
mark: r.data.tips
}, !0);
diff --git a/pages/orderPaySuccess/matchList/matchList.js b/pages/orderPaySuccess/matchList/matchList.js
deleted file mode 100644
index a85704f..0000000
--- a/pages/orderPaySuccess/matchList/matchList.js
+++ /dev/null
@@ -1,5 +0,0 @@
-Component({
- properties: {},
- data: {},
- methods: {}
-});
\ No newline at end of file
diff --git a/pages/orderPaySuccess/matchList/matchList.json b/pages/orderPaySuccess/matchList/matchList.json
deleted file mode 100644
index 7e37c03..0000000
--- a/pages/orderPaySuccess/matchList/matchList.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "component": true,
- "usingComponents": {}
-}
\ No newline at end of file
diff --git a/pages/orderPaySuccess/matchList/matchList.wxml b/pages/orderPaySuccess/matchList/matchList.wxml
deleted file mode 100644
index 145afe0..0000000
--- a/pages/orderPaySuccess/matchList/matchList.wxml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- 搭配更优惠
-
-
-
-
-
-
-
- 【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券!
-
-
-
- ¥9.90
- ¥100.00
-
- 立即抢购
-
-
-
-
-
diff --git a/pages/orderPaySuccess/matchList/matchList.wxss b/pages/orderPaySuccess/matchList/matchList.wxss
deleted file mode 100644
index 85a80ee..0000000
--- a/pages/orderPaySuccess/matchList/matchList.wxss
+++ /dev/null
@@ -1,137 +0,0 @@
-.info-wrap {
- background-color: #fff;
- border-top: 3.2vw solid #f8f8f8;
- padding: 0 4vw 5.333vw;
-}
-
-.module-title {
- color: #2a2a2a;
- font-size: 4.267vw;
- font-weight: 700;
- line-height: 1;
- margin: 5.333vw 0 8.533vw;
- text-align: center;
-}
-
-.module-title .tit {
- display: inline-block;
- position: relative;
- vertical-align: top;
-}
-
-.module-title .line {
- background-color: #06a2b3;
- border-radius: .8vw;
- height: .8vw;
- left: 35%;
- margin-top: 2.133vw;
- position: absolute;
- top: 100%;
- width: 30%;
-}
-
-.tuijian-goods {
- border-radius: 1.6vw;
- box-shadow: 0 1.067vw 2.667vw 0 rgba(0,0,0,.08);
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- padding: 3.6vw;
-}
-
-.tuijian-goods .lt {
- -ms-flex-negative: 0;
- flex-shrink: 0;
-}
-
-.tuijian-goods .lt image {
- display: block;
- height: 26vw;
- width: 26vw;
-}
-
-.tuijian-goods .tuijian-rt {
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-box-pack: justify;
- -ms-flex-pack: justify;
- -webkit-box-flex: 1;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- flex: 1;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 3.2vw;
-}
-
-.tuijian-goods .vip-price {
- width: max-content;
-}
-
-.tuijian-goods .goods-name {
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- color: #2a2a2a;
- display: -webkit-box;
- font-size: 3.733vw;
- font-weight: 500;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
-}
-
-.tuijian-goods .goods-info .price {
- -webkit-box-align: center;
- -ms-flex-align: center;
- -webkit-box-pack: justify;
- -ms-flex-pack: justify;
- align-items: center;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- justify-content: space-between;
-}
-
-.tuijian-goods .goods-info .now-price {
- color: #eb5252;
- font-size: 3.467vw;
- font-weight: 500;
- margin-right: 3.2vw;
-}
-
-.tuijian-goods .goods-info .old-price {
- color: #9b9b9b;
- font-size: 3.2vw;
- text-decoration: line-through;
-}
-
-.tuijian-goods .goods-info .btn {
- -ms-flex-negative: 0;
- background-color: #06a2b3;
- border-radius: .933vw;
- color: #fff;
- flex-shrink: 0;
- font-size: 3.2vw;
- height: 6.667vw;
- line-height: 6.667vw;
- text-align: center;
- width: 18.667vw;
-}
-
-.vip-price {
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- background-color: #2a2a2a;
- border-radius: .8vw;
- display: -webkit-box;
- display: -ms-flexbox;
- display: -webkit-flex;
- display: flex;
- font-size: 2.933vw;
- margin-right: 2.667vw;
-}
\ No newline at end of file
diff --git a/pages/orderPaySuccess/orderPaySuccess.js b/pages/orderPaySuccess/orderPaySuccess.js
index ea3c5ff..f0e5a54 100644
--- a/pages/orderPaySuccess/orderPaySuccess.js
+++ b/pages/orderPaySuccess/orderPaySuccess.js
@@ -1,4 +1,4 @@
-var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(),
+var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(),
require("../../utils/login.js"));
require("../../utils/common.js");
@@ -22,7 +22,7 @@ Page({
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
- return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request(i.baseUrl + "shop/notify/paymentSuccessful", {
+ return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request("https://t-jm.v0750.com/shop/notify/paymentSuccessful", {
orderid: a
}, !0);
diff --git a/pages/refund/refund.js b/pages/refund/refund.js
new file mode 100644
index 0000000..c377a87
--- /dev/null
+++ b/pages/refund/refund.js
@@ -0,0 +1,149 @@
+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.showModal({
+ title: '确认退款',
+ content: `确定退款金额:${this.data.userInfo.money}元`,
+ success: (res) => {
+ if (res.confirm) {
+ wx.showLoading({
+ title: '退款中...'
+ })
+ if (!this.data.userInfo.token) {
+ wx.showToast({
+ title: '退款信息不完整',
+ icon: 'none'
+ })
+ return
+ }
+ t.request('/miniprogram/pay/refundOffline', {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'
+ })
+ }
+ })
+ }
+ }
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/refund/refund.json b/pages/refund/refund.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/refund/refund.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/refund/refund.wxml b/pages/refund/refund.wxml
new file mode 100644
index 0000000..a220553
--- /dev/null
+++ b/pages/refund/refund.wxml
@@ -0,0 +1,61 @@
+
+
+ 退款
+
+
+
+
+
+ 手机号:{{userInfo.mobile}}
+ 用户ID:{{userInfo.uid}}
+
+
+ 总余额
+ {{userInfo.money}}
+
+
+ 洗车金
+ {{userInfo.principal}}
+
+
+ 赠送金额
+ {{userInfo.givenamount}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 没有可退款记录
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/refund/refund.wxss b/pages/refund/refund.wxss
new file mode 100644
index 0000000..4ce75bd
--- /dev/null
+++ b/pages/refund/refund.wxss
@@ -0,0 +1,93 @@
+.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;
+}
+
+.no-refund-info {
+ margin-top: 20rpx;
+}
+
+.no-refund-text {
+ text-align: center;
+ color: #999;
+ font-size: 28rpx;
+ padding: 40rpx 0;
+}
\ No newline at end of file
diff --git a/pages/singleStart/singleStart.wxml b/pages/singleStart/singleStart.wxml
index 0917333..682476d 100644
--- a/pages/singleStart/singleStart.wxml
+++ b/pages/singleStart/singleStart.wxml
@@ -1,75 +1,12 @@
请选择单次洗车金额
-
-
-
- 3元购
- 5洗车金
-
- 1、洗车金用完,机器自动停止。\n 2、洗车金没用完,到达[ 10分钟 ]机器自动停止。
-
-
-
-
-
- 6元购
- 10洗车金
-
- 1、洗车金用完,机器自动停止。\n 2、洗车金没用完,到达[ 20分钟 ]机器自动停止。
-
-
-
-
-
- 10元购
- 15洗车金
-
- 1、洗车金用完,机器自动停止。\n 2、洗车金没用完,到达[ 30分钟 ]机器自动停止。
-
-
-
-
-
- 10元购
- 15洗车金
-
- 1、洗车金用完,机器自动停止。\n 2、洗车金没用完,到达[ 30分钟 ]机器自动停止。
-
-
+ 6.00元
-
-
-
- 暂无相关数据
-
-
-
-
- 暂无相关数据
-
- 立即启动·单次洗车
-
-
-
-
-
-
- 注意事项:
-
- 1、没有完成洗车,请勿按红色“结束”按钮;
- 2、单次洗车不支持余额支付;
- 3、单次洗车仅限1次洗车,不得分开多次使用;
- 4、购买单次洗车后,将获得相应的洗车金和洗车时长;
- 5、购买单次洗车后,洗车机将立即启动,请确保你在洗车机前;
- 6、洗车金为本次最多可用金额,按量扣费;
- 7、洗车时长为本次最长可用时间,洗车机启动后开始计时;
- 8、当洗车金为0或达到洗车时长,洗车机将自动结束洗车;
-
-
-
+
diff --git a/pages/singleStart/singleStart.wxss b/pages/singleStart/singleStart.wxss
index 1172729..ab19788 100644
--- a/pages/singleStart/singleStart.wxss
+++ b/pages/singleStart/singleStart.wxss
@@ -11,163 +11,42 @@
padding: 0;
}
-.list .item {
- position: relative;
- padding-left: 286rpx;
- background: #fff;
- border: 5rpx solid #0281db;
- border-radius: 26rpx;
- box-sizing: border-box;
- color: #0281db;
- flex-direction: column;
- height: 158rpx;
- justify-content: center;
- margin: 0 0 28rpx;
- width: 100%;
- overflow: hidden;
+.item {
+ background-color: #fff;
+ border-radius: 18rpx;
+ box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,40%,.3);
+ color: #333;
+ font-size: 87rpx;
+ height: 180rpx;
+ line-height: 180rpx;
+ margin-bottom: 32rpx;
+ text-align: center;
}
-.list .item .g, .list .item .j {
- position: absolute;
-}
-.list .item .g {
- left: 0;
- top: 0;
- height: 153rpx;
- width: 158rpx;
- line-height: 153rpx;
- text-align: center;
- background-color: #0281db;
- color: #fff;
- font-size: 50rpx;
+.item.active {
+ box-shadow: 0 0rpx 9rpx 4rpx rgba(255,102,0,.3);
+ color: #f60;
}
-.list .item .g .u {
- position: absolute;
- right: -25rpx;
- top: 55rpx;
- width: 40rpx;
- height: 40rpx;
- font-size: 26rpx;
- line-height: 40rpx;
- border-radius: 100rpx;
- border: 5rpx solid #0281db;
- color: #0281db;
- background-color: #fff;
+.footer-btn-box {
+ bottom: 0;
+ color: #fff;
+ display: flex;
+ font-size: 44rpx;
+ left: 0;
+ position: fixed;
+ width: 100vw;
}
-.list .item .j {
- left: 158rpx;
- top: 0;
- height: 153rpx;
- width: 138rpx;
- font-size: 66rpx;
- line-height: 108rpx;
- text-align: center;
+.footer-btn-box .btn {
+ align-items: center;
+ background: #4cadf1;
+ display: inline-flex;
+ flex: 1;
+ height: 104rpx;
+ justify-content: center;
}
-.list .item .j .p {
- font-size: 26rpx;
- line-height: 1;
-}
-
-.list .item .t {
- font-size: 25rpx;
- height: 153rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0 20rpx;
- background-color: #eee;
-}
-
-.list .item .t .b {
- font-weight: 700;
- color: #1baa1c;
-}
-
-.list .item.select, .list .item.select .g .u {
- border-color: #f50;
- color: #f50;
-}
-
-.list .item.select .g {
- background-color: #f50;
-}
-
-.list .item.active, .list .item.active .g .u {
- border-color: #4cadf1;
- color: #4cadf1;
-}
-
-.list .item.active .g {
- background-color: #4cadf1;
-}
-
-.list .item.active.select, .list .item.active.select .g .u {
- border-color: #f90;
- color: #f90;
-}
-
-.list .item.active.select .g {
- background-color: #f90;
-}
-
-
-.tobuy-btn {
- align-items: center;
- background: #1baa1c;
- border: 2rpx solid #218721;
- border-radius: 18rpx;
- color: #fff;
- display: flex;
- font-size: 33rpx;
- height: 91rpx;
- justify-content: center;
- margin-top: 3rpx;
-}
-
-.tobuy-btn.disabled {
- opacity: .7;
-}
-
-.provision {
- display: block;
- margin: 40rpx 0 0;
- font-size: 26rpx;
-}
-
-.provision .text {
- color: #0281db;
- display: inline-block;
-}
-
-.warm-prompt {
- padding: 60rpx 0;
-}
-
-.warm-prompt .title {
- color: #f30;
- font-size: 32rpx;
- font-weight: 600;
- margin-bottom: 16rpx;
-}
-
-.warm-prompt .content {
- color: #666;
- font-size: 26rpx;
- line-height: 1.8;
-}
-
-.warm-prompt .content .view {
- margin-bottom: 10rpx;
-}
-
-.warm-prompt .content view b {
- font-weight: 700;
- color: red;
-}
-
-.scan-btn {
- background-color: #218721;
+.btn.yellow {
+ background: #fccaa9;
}
\ No newline at end of file
diff --git a/pages/substituteWash/substituteWash.js b/pages/substituteWash/substituteWash.js
new file mode 100644
index 0000000..f7321b1
--- /dev/null
+++ b/pages/substituteWash/substituteWash.js
@@ -0,0 +1,199 @@
+var t = getApp(), e = require("../../utils/login.js");
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ userInfo: {},
+ balance: 0,
+ loading: true,
+ paySuccess: false,
+ orderInfo: {},
+ token: '',
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onShow(options) {
+ var a = this;
+ // 等待全局接口执行完成后再初始化页面
+ e.pageStart(t).then(function () {
+ a.initPage();
+ });
+ },
+
+ /**
+ * 初始化页面数据
+ */
+ initPage() {
+ var a = this;
+ a.setData({
+ loading: true
+ });
+
+ e.request('/miniprogram/substituteWash/index', {}, true).then(function (res) {
+ a.setData({
+ loading: false
+ });
+
+ if (res.code === 200 && res.data) {
+ a.setData({
+ orderInfo: res.data.orderInfo || {},
+ balance: res.data.balance || 0,
+ token: res.data.token || '',
+ });
+ } else {
+ wx.showToast({
+ title: res.message || '获取数据失败',
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ }).catch(function (err) {
+ a.setData({
+ loading: false
+ });
+
+ wx.showToast({
+ title: '获取数据失败',
+ icon: 'none',
+ duration: 2000
+ });
+ });
+ },
+
+ /**
+ * 确认洗车
+ */
+ confirmWash() {
+ var a = this;
+
+ wx.showModal({
+ title: '确认洗车',
+ content: '确定要进行帮洗服务吗?',
+ success: (res) => {
+ if (res.confirm) {
+ a.payForWash();
+ }
+ }
+ });
+ },
+
+ /**
+ * 支付洗车费用
+ */
+ payForWash() {
+ var a = this;
+
+ wx.showLoading({
+ title: '处理中',
+ mask: true
+ });
+
+ e.request('/miniprogram/substituteWash/pay', { token: a.data.token }, true).then(function (res) {
+ wx.hideLoading();
+
+ if (res.code === 200) {
+ wx.showToast({
+ title: '支付成功',
+ icon: 'success',
+ duration: 2000
+ });
+
+ // 更新余额信息和支付状态
+ let updateData = {
+ paySuccess: true
+ };
+
+ if (res.data && res.data.balance !== undefined) {
+ updateData.balance = res.data.balance;
+ }
+
+ if (res.data && res.data.orderInfo) {
+ updateData.orderInfo = res.data.orderInfo;
+ }
+
+ a.setData(updateData);
+
+ // 可以在这里添加支付成功后的其他操作
+ } else {
+ wx.showModal({
+ title: '支付失败',
+ content: res.message || '请稍后再试',
+ showCancel: false
+ });
+ }
+ }).catch(function (err) {
+ wx.hideLoading();
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+ // 如果不是支付成功状态,则重新初始化页面
+ if (!this.data.paySuccess) {
+ var a = this;
+ e.pageStart(t).then(function () {
+ a.initPage();
+ });
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+ var a = this;
+ e.pageStart(t).then(function () {
+ a.initPage();
+ wx.stopPullDownRefresh();
+ });
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 禁止页面分享
+ */
+ onShareAppMessage: null,
+
+ /**
+ * 返回首页
+ */
+ backToIndex() {
+ wx.redirectTo({
+ url: '/pages/index/index'
+ });
+ }
+})
\ No newline at end of file
diff --git a/pages/substituteWash/substituteWash.json b/pages/substituteWash/substituteWash.json
new file mode 100644
index 0000000..30272a9
--- /dev/null
+++ b/pages/substituteWash/substituteWash.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "帮洗服务",
+ "enablePullDownRefresh": true,
+ "backgroundColor": "#f8f8f8",
+ "usingComponents": {
+ "service-tel": "/template/serviceTel/serviceTel"
+ }
+}
\ No newline at end of file
diff --git a/pages/substituteWash/substituteWash.wxml b/pages/substituteWash/substituteWash.wxml
new file mode 100644
index 0000000..6fe5127
--- /dev/null
+++ b/pages/substituteWash/substituteWash.wxml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+
+
+
+
+ 支付成功
+
+
+
+ 洗车网点
+ {{orderInfo.agentname || userInfo.nickname || '---'}}
+
+
+ 订单编号
+ {{orderInfo.orderNo || '---'}}
+
+
+ 支付金额
+ {{orderInfo.amount || '0'}} 元
+
+
+ 账户余额
+ {{balance}} 元
+
+
+
+
+ 温馨提示
+
+ 1. 请向工作人员出示此页面
+ 2. 确认支付成功后即可开始洗车服务
+ 3. 如有疑问请联系客服
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 洗车网点
+ {{orderInfo.agentname || userInfo.nickname || '---'}}
+
+
+ 洗车费用
+ {{orderInfo.amount || '0'}} 元
+
+
+ 账户余额
+ {{balance}} 元
+
+
+
+
+ 服务说明
+
+ 1. 帮洗服务由专业人员提供
+ 2. 确认后将从您的账户余额中扣除相应费用
+ 3. 服务完成后可在订单中查看详情
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/substituteWash/substituteWash.wxss b/pages/substituteWash/substituteWash.wxss
new file mode 100644
index 0000000..2f31cb0
--- /dev/null
+++ b/pages/substituteWash/substituteWash.wxss
@@ -0,0 +1,292 @@
+.container {
+ padding: 0;
+ font-size: 28rpx;
+ background-color: #f8f8f8;
+ min-height: 100vh;
+ border: none;
+}
+
+/* 加载动画 */
+.loading-container {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100vh;
+}
+
+.spinner {
+ margin: 0 auto;
+ width: 120rpx;
+ height: 120rpx;
+ position: relative;
+}
+
+.spinner .spinner-container {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+.container1 > view, .container2 > view, .container3 > view {
+ width: 20rpx;
+ height: 20rpx;
+ background-color: #1aad19;
+ border-radius: 100%;
+ position: absolute;
+ -webkit-animation: bouncedelay 1.2s infinite ease-in-out;
+ animation: bouncedelay 1.2s infinite ease-in-out;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
+}
+
+.container2 {
+ -webkit-transform: rotateZ(45deg);
+ transform: rotateZ(45deg);
+}
+
+.container3 {
+ -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: -1.1s;
+ animation-delay: -1.1s;
+}
+.container2 .circle1 {
+ -webkit-animation-delay: -1.0s;
+ animation-delay: -1.0s;
+}
+.container3 .circle1 {
+ -webkit-animation-delay: -0.9s;
+ animation-delay: -0.9s;
+}
+
+.container1 .circle2 {
+ -webkit-animation-delay: -0.8s;
+ animation-delay: -0.8s;
+}
+.container2 .circle2 {
+ -webkit-animation-delay: -0.7s;
+ animation-delay: -0.7s;
+}
+.container3 .circle2 {
+ -webkit-animation-delay: -0.6s;
+ animation-delay: -0.6s;
+}
+
+.container1 .circle3 {
+ -webkit-animation-delay: -0.5s;
+ animation-delay: -0.5s;
+}
+.container2 .circle3 {
+ -webkit-animation-delay: -0.4s;
+ animation-delay: -0.4s;
+}
+.container3 .circle3 {
+ -webkit-animation-delay: -0.3s;
+ animation-delay: -0.3s;
+}
+
+.container1 .circle4 {
+ -webkit-animation-delay: -0.2s;
+ animation-delay: -0.2s;
+}
+.container2 .circle4 {
+ -webkit-animation-delay: -0.1s;
+ animation-delay: -0.1s;
+}
+.container3 .circle4 {
+ -webkit-animation-delay: 0s;
+ animation-delay: 0s;
+}
+
+@-webkit-keyframes bouncedelay {
+ 0%, 80%, 100% { -webkit-transform: scale(0.0) }
+ 40% { -webkit-transform: scale(1.0) }
+}
+
+@keyframes bouncedelay {
+ 0%, 80%, 100% {
+ transform: scale(0.0);
+ -webkit-transform: scale(0.0);
+ } 40% {
+ transform: scale(1.0);
+ -webkit-transform: scale(1.0);
+ }
+}
+
+.loading-text {
+ margin-top: 30rpx;
+ color: #999;
+}
+
+/* 内容区域 */
+.content {
+ padding: 30rpx;
+}
+
+.header {
+ text-align: center;
+ margin-bottom: 60rpx;
+ padding-top: 40rpx;
+}
+
+.title {
+ font-size: 48rpx;
+ font-weight: bold;
+ color: #333;
+}
+
+.subtitle {
+ font-size: 28rpx;
+ color: #666;
+ margin-top: 10rpx;
+}
+
+.user-info {
+ background-color: #fff;
+ border-radius: 12rpx;
+ padding: 0 30rpx;
+ margin-bottom: 30rpx;
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.info-item {
+ display: flex;
+ justify-content: space-between;
+ padding: 20rpx 0;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.info-item:last-child {
+ border-bottom: none;
+}
+
+.label {
+ color: #666;
+}
+
+.value {
+ color: #333;
+ font-weight: 500;
+}
+
+.balance {
+ color: #1aad19;
+ font-weight: bold;
+ font-size: 32rpx;
+}
+
+.wash-info {
+ background-color: #fff;
+ border-radius: 12rpx;
+ padding: 30rpx;
+ margin-bottom: 60rpx;
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.wash-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 20rpx;
+}
+
+.wash-desc {
+ color: #666;
+}
+
+.desc-item {
+ line-height: 1.8;
+ margin-bottom: 10rpx;
+}
+
+.btn-area {
+ padding: 40rpx 60rpx;
+}
+
+.confirm-btn {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ font-size: 32rpx;
+ border-radius: 44rpx;
+ background-color: #1aad19;
+}
+
+/* 支付成功样式 */
+.success-content {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 30rpx;
+}
+
+.success-icon {
+ margin: 40rpx 0;
+}
+
+.success-title {
+ font-size: 48rpx;
+ font-weight: bold;
+ color: #1aad19;
+ margin-bottom: 60rpx;
+}
+
+.success-info {
+ width: 100%;
+ background-color: #fff;
+ border-radius: 12rpx;
+ padding: 0 30rpx;
+ margin-bottom: 30rpx;
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.highlight {
+ color: #ff6600;
+ font-weight: bold;
+ font-size: 32rpx;
+}
+
+.success-tips {
+ width: 100%;
+ background-color: #fff;
+ border-radius: 12rpx;
+ padding: 30rpx;
+ margin-bottom: 30rpx;
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.tips-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ margin-bottom: 20rpx;
+}
+
+.tips-content {
+ color: #666;
+}
+
+.tips-item {
+ line-height: 1.8;
+ margin-bottom: 10rpx;
+}
+
+.back-btn {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ font-size: 32rpx;
+ border-radius: 44rpx;
+ background-color: #f8f8f8;
+ color: #333;
+ border: 1rpx solid #ddd;
+}
\ No newline at end of file
diff --git a/pages/user/user.js b/pages/user/user.js
index 6ff2944..d52140a 100644
--- a/pages/user/user.js
+++ b/pages/user/user.js
@@ -6,22 +6,22 @@ Page({
urlList: [],
user: {}
},
- onLoad: function(n) {
+ onLoad: function (n) {
var o = this;
- e.pageStart(t).then(function(t) {
+ e.pageStart(t).then(function (t) {
o.getContent();
});
},
- onShow: function() {
+ onShow: function () {
this.refresh && this.getContent();
},
- onPullDownRefresh: function() {},
- onShareAppMessage: function() {},
- getContent: function() {
+ onPullDownRefresh: function () { },
+ onShareAppMessage: function () { },
+ getContent: function () {
var n = this;
wx.showLoading({
title: ""
- }), e.request('/miniprogram/user', {}, !0).then(function(t) {
+ }), e.request('/miniprogram/user', {}, !0).then(function (t) {
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
@@ -30,18 +30,18 @@ Page({
showLoding: !1,
user: t.data.user,
urlList: t.data.menu
- }, function() {});
- }).catch(function(t) {
+ }, function () { });
+ }).catch(function (t) {
wx.hideLoading();
});
},
- islogin: function() {
+ islogin: function () {
wx.showLoading({
title: "加载中"
});
},
refresh: 0,
- toPage: function(t) {
+ toPage: function (t) {
var e = t.currentTarget.dataset, n = (e.refresh, e.url);
n ? wx.navigateTo({
url: "/pages/".concat(n)
@@ -51,29 +51,29 @@ Page({
duration: 2e3
}), this.refresh = 1;
},
- callUs: function() {
+ callUs: function () {
if (!t.globalData.servicetel) return !1;
wx.makePhoneCall({
phoneNumber: "" + t.globalData.servicetel
});
},
- updateUserAvatar: function() {
+ updateUserAvatar: function () {
var that = this;
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
- success: function(res) {
+ success: function (res) {
wx.uploadFile({
- url: 'https://t-jm.v0750.com/miniprogram/upload',
+ url: 'https://t-jm.v0750.com/miniprogram/user/upload',
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
- success: function(uploadRes) {
+ 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) {
+ }, true).then(function (res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
@@ -93,18 +93,18 @@ Page({
}
});
},
- updateUserNickname: function() {
+ updateUserNickname: function () {
var that = this;
wx.showModal({
title: '修改昵称',
editable: true,
placeholderText: '请输入新昵称',
- success: function(res) {
+ success: function (res) {
if (res.confirm && res.content) {
// 发送请求到后端,更新用户昵称
e.request('/miniprogram/user/update', {
nickname: res.content
- }, true).then(function(res) {
+ }, true).then(function (res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
diff --git a/pages/user/user.wxml b/pages/user/user.wxml
index 664406e..9649b07 100644
--- a/pages/user/user.wxml
+++ b/pages/user/user.wxml
@@ -11,14 +11,14 @@
{{user.mobile}}
-
-
+
+
我的资产
- 立即充值 >
+ 立即购买 >
@@ -62,17 +62,14 @@
{{item.name}}
-
-
diff --git a/pages/user/user.wxss b/pages/user/user.wxss
index 6bad531..daa769f 100644
--- a/pages/user/user.wxss
+++ b/pages/user/user.wxss
@@ -194,23 +194,8 @@ button::after {
width: 33.33%;
}
-.url-list .item button {
- border: 0;
- padding: 0;
- margin: 0;
- width: 100%;
-}
-.url-list .item button .iconfont {
- line-height: 52rpx;
-}
-
-.url-list .item button .name {
- margin-top: -2rpx;
-}
-
.url-list .item .name {
margin-top: 22rpx;
- line-height: 1;
}
.footer-btn {
diff --git a/pages/voucher/voucher.js b/pages/voucher/voucher.js
index 23f0cb1..e8aee6a 100644
--- a/pages/voucher/voucher.js
+++ b/pages/voucher/voucher.js
@@ -118,47 +118,54 @@ Page({
icon: "none"
}), !1;
if (!this.data.selectItemID || this.isSubmit) return wx.showToast({
- title: "请选择充值金额~",
+ title: "请选择购买洗车金额~",
icon: "none"
}), !1;
- this.isSubmit = !0, wx.showLoading({
- title: ""
- });
var i = this;
- e.request('/miniprogram/recharge/create', {
- id: i.data.selectItemID
- }, !0).then(function (t) {
- if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({
- title: "提示",
- content: t.message
- }), !1;
- var r = t.data.result;
- wx.requestPayment({
- timeStamp: r.timeStamp,
- nonceStr: r.nonceStr,
- package: r.package,
- signType: r.signType,
- paySign: r.paySign,
- success: function (o) {
+ wx.showModal({
+ title: "提示",
+ content: "购买洗车金额后不可退,请谨慎购买",
+ success: function (res) {
+ if (!res.confirm) return !1;
+ i.isSubmit = !0, wx.showLoading({
+ title: ""
+ });
+ e.request('/miniprogram/recharge/create', {
+ id: i.data.selectItemID
+ }, !0).then(function (t) {
+ if (wx.hideLoading(), i.isSubmit = !1, 200 != t.code) return wx.showModal({
+ title: "提示",
+ content: t.message
+ }), !1;
+ var r = t.data.result;
+ wx.requestPayment({
+ timeStamp: r.timeStamp,
+ nonceStr: r.nonceStr,
+ package: r.package,
+ signType: r.signType,
+ paySign: r.paySign,
+ success: function (o) {
- if (t.data.notify_url) {
- // 加载回调接口
- e.request(t.data.notify_url, {
- orderid: t.data.orderid
- }, !0).then(function (t) {
- console.log('pay_success', t);
- }).catch(function (t) {
- console.log('pay_success', t);
- });
- }
+ if (t.data.notify_url) {
+ // 加载回调接口
+ e.request(t.data.notify_url, {
+ orderid: t.data.orderid
+ }, !0).then(function (t) {
+ console.log('pay_success', t);
+ }).catch(function (t) {
+ console.log('pay_success', t);
+ });
+ }
- getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
- url: "/pages/index/index"
+ getCurrentPages().length > 1 ? wx.navigateBack({}) : wx.redirectTo({
+ url: "/pages/index/index"
+ });
+ }
});
- }
- });
- }).catch(function (t) {
- wx.hideLoading(), i.isSubmit = !1;
+ }).catch(function (t) {
+ wx.hideLoading(), i.isSubmit = !1;
+ });
+ }
});
},
showprovision: function () {
@@ -172,4 +179,4 @@ Page({
approve: 1 == e
});
}
-});
\ No newline at end of file
+});
diff --git a/pages/voucher/voucher.wxml b/pages/voucher/voucher.wxml
index fb73106..e781146 100644
--- a/pages/voucher/voucher.wxml
+++ b/pages/voucher/voucher.wxml
@@ -15,8 +15,7 @@
- 优惠
-购买
+ 优惠购买
@@ -25,13 +24,13 @@
- 选择充值金额
+ 选择购买洗车金额
余额:{{user.money}}
- {{item.paymentamount}}元购买
- {{(item.bonusamount*1+item.paymentamount*1)}}洗车金
+ {{item.paymentamount}}元
+ 赠送{{item.bonusamount*1}}洗车金额
@@ -41,10 +40,10 @@
暂无相关数据
- 立即充值
+ 立即购买
diff --git a/pages/voucher/voucher.wxss b/pages/voucher/voucher.wxss
index 7aaa42e..8686b67 100644
--- a/pages/voucher/voucher.wxss
+++ b/pages/voucher/voucher.wxss
@@ -59,11 +59,6 @@
margin-right: 50rpx;
}
-.edition1-item .now em {
- font-size: 24rpx;
- padding-left: 4rpx;
-}
-
.info .origin {
color: #999;
text-decoration: line-through;
diff --git a/pages/washCodeDetail/washCodeDetail.js b/pages/washCodeDetail/washCodeDetail.js
index b4432d5..86d1b44 100644
--- a/pages/washCodeDetail/washCodeDetail.js
+++ b/pages/washCodeDetail/washCodeDetail.js
@@ -11,7 +11,7 @@ Page({
wx.showLoading({
title: ""
}), this.setData({
- id: t.id || 1
+ id: t.id || 0
}), i.pageStart(e).then(function (e) {
o.getList();
});
@@ -20,7 +20,7 @@ Page({
var o = this;
wx.showLoading({
title: ""
- }), i.request('/miniprogram/carwashcoupon/details', {
+ }), i.request('/miniprogram/coupons/details', {
id: this.data.id
}, !0).then(function (e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
@@ -40,7 +40,7 @@ Page({
received: function () {
if (this.isSubmit) return !1;
var t = this;
- this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request('/miniprogram/carwashcoupon/receive', {
+ this.isSubmit = !0, wx.showLoading(), console.log("received"), i.request('/miniprogram/coupons/receive', {
id: t.data.id,
token: t.data.info.token
}, !0).then(function (e) {
diff --git a/pages/washCodeList/washCodeList.js b/pages/washCodeList/washCodeList.js
index 970977a..924e070 100644
--- a/pages/washCodeList/washCodeList.js
+++ b/pages/washCodeList/washCodeList.js
@@ -35,6 +35,15 @@ Page({
});
},
selectItem: function (t) {
+
+
+ // 1. 提示用户先绑定设备, isScan
+ if (!this.data.isScan) return wx.showModal({
+ title: "提示",
+ content: "请先扫码设备~"
+ }), !1;
+
+
var e = t.currentTarget.dataset, a = (e.index, e.code);
if (1 != e.available) return wx.showToast({
title: "该洗车券不可用~",
@@ -77,11 +86,12 @@ Page({
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("/miniprogram/identify/index", i, !0).then(function (e) {
if (wx.hideLoading(), 200 != e.code) return wx.showModal({
title: "提示",
content: e.message
}), !1;
+ t.globalData.deviceData = e.data || t.globalData.deviceData || {};
t.globalData.devicecode = e.data.devicecode || t.globalData.devicecode, a.setData({
isScan: !!e.data.devicecode
}), a.getList();
@@ -108,15 +118,22 @@ Page({
var a = this;
wx.showModal({
title: "提示",
- content: "你当前将要使用的机器编号是:".concat(t.globalData.devicecode, ",确认开机吗?"),
+ content: "你当前将要使用的机器编号是:".concat(t.globalData.deviceData.title || t.globalData.deviceData.devicecode, ",确认开机吗?"),
success: function (i) {
+
+ // 合并参数 t.globalData.deviceData 与 washcode
+ let params = Object.assign(t.globalData.deviceData, {
+ washcode: a.data.selectID
+ });
+
i.confirm && (a.isSubmit = !0, wx.showLoading({
title: "正在启动"
- }), e.request('/miniprogram/machine/carwashcodestartup', {
- washcode: a.data.selectID
- }, !0).then(function (t) {
+ }), e.request('/miniprogram/' + t.globalData.deviceData.type + '/carwashcodestartup', params, !0).then(function (t) {
+ // 成功后返回提示
+ wx.showToast({ title: t.message || '启动成功', icon: 'success' });
+ // 成功后跳转
a.isSubmit = !1, wx.hideLoading(), 200 == t.code && wx.redirectTo({
- url: "/pages/user/user"
+ url: "/pages/washing/washing"
});
}).catch(function (t) {
a.isSubmit = !1, wx.hideLoading();
diff --git a/pages/washCodeList/washCodeList.wxml b/pages/washCodeList/washCodeList.wxml
index 4819047..80f15c7 100644
--- a/pages/washCodeList/washCodeList.wxml
+++ b/pages/washCodeList/washCodeList.wxml
@@ -5,11 +5,15 @@
- {{item.code}}
+ {{item.title}}
- 可使用网点:{{s.t_name+(i
+ 可使用网点:{{s.t_name}}{{ i< item.agent.length-1?'、':''}}
+ 不限
有效期:{{item.starttime}} - {{item.deadline}}
+ 兑换时间:{{item.created_at}}, 兑换码: {{item.code}}
+
+ {{item.note}}
diff --git a/pages/washCodeList/washCodeList.wxss b/pages/washCodeList/washCodeList.wxss
index efcaf18..1624b9f 100644
--- a/pages/washCodeList/washCodeList.wxss
+++ b/pages/washCodeList/washCodeList.wxss
@@ -72,6 +72,7 @@
border-radius: 18rpx;
box-shadow: 0 0rpx 9rpx 4rpx hsla(0,0%,80%,.75);
padding: 14rpx 20rpx 14rpx 14rpx;
+ margin-bottom: 20rpx;
}
.item .top {
diff --git a/pages/washing/washing.js b/pages/washing/washing.js
new file mode 100644
index 0000000..bc2266c
--- /dev/null
+++ b/pages/washing/washing.js
@@ -0,0 +1,179 @@
+var t = getApp(), e = require("../../utils/login.js");
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ countdown: '',
+ agentname: '',
+ devicecode: '',
+ remainingTime: 0,
+ orderid: '',
+ title: getApp().globalData.deviceData.title || getApp().globalData.deviceData.devicecode
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ var a = this;
+ e.request('/miniprogram/index/balance', getApp().globalData.deviceData, !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/' + getApp().globalData.deviceData.type + '/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);
+ },
+})
\ No newline at end of file
diff --git a/pages/washing/washing.json b/pages/washing/washing.json
new file mode 100644
index 0000000..d78ffd9
--- /dev/null
+++ b/pages/washing/washing.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "service-tel": "../../template/serviceTel/serviceTel"
+ }
+}
\ No newline at end of file
diff --git a/pages/washing/washing.wxml b/pages/washing/washing.wxml
new file mode 100644
index 0000000..d4a1cd9
--- /dev/null
+++ b/pages/washing/washing.wxml
@@ -0,0 +1,42 @@
+
+
+ {{agentname}}
+ {{countdown}}
+ {{title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/washing/washing.wxss b/pages/washing/washing.wxss
new file mode 100644
index 0000000..c16203b
--- /dev/null
+++ b/pages/washing/washing.wxss
@@ -0,0 +1,167 @@
+.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);
+ }
+}
+
+
diff --git a/project.private.config.json b/project.private.config.json
deleted file mode 100644
index 4f8319e..0000000
--- a/project.private.config.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "projectname": "%E8%81%9A%E7%BE%8E%E6%B1%BD%E6%9C%8D%2B",
- "setting": {
- "compileHotReLoad": true,
- "urlCheck": false
- },
- "condition": {
- "miniprogram": {
- "list": [
- {
- "name": "pages/wangdian/wangdian",
- "pathName": "pages/wangdian/wangdian",
- "query": "number=T1000126",
- "launchMode": "default",
- "scene": null
- }
- ]
- }
- },
- "libVersion": "3.13.0"
-}
\ No newline at end of file
diff --git a/template/pageLoding/pageLoding.wxml b/template/pageLoding/pageLoding.wxml
index e3da721..20260ae 100644
--- a/template/pageLoding/pageLoding.wxml
+++ b/template/pageLoding/pageLoding.wxml
@@ -5,6 +5,6 @@
-
+
diff --git a/template/serviceTel/serviceTel.wxml b/template/serviceTel/serviceTel.wxml
index fac1541..9d8e70e 100644
--- a/template/serviceTel/serviceTel.wxml
+++ b/template/serviceTel/serviceTel.wxml
@@ -1,3 +1,5 @@
-
-
+
+
+
\ No newline at end of file
diff --git a/utils/login.js b/utils/login.js
index 6fd6ada..eef1bb5 100644
--- a/utils/login.js
+++ b/utils/login.js
@@ -11,11 +11,14 @@ function t() {
}
function n(a) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
+
+ var baseUrl = "https://t-jm.v0750.com/v3";
+
+ var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
// a 是否 https, 如果不是自动补全
if (!/^https/.test(a)) {
- a = 'https://t-jm.v0750.com' + a;
+ a = baseUrl + a;
}
// method 默认为 GET
@@ -27,6 +30,7 @@ function n(a) {
return wx.showLoading(), new Promise(function (n, c) {
console.log("requestdevicecode", o.globalData.devicecode);
+
var i = Object.assign({}, {
devicecode: o.globalData.devicecode
}, o.globalData.options, t);
@@ -36,7 +40,7 @@ function n(a) {
header: {
"content-type": "application/json",
Accept: "application/json, text/plain",
- Cookie: "_miucms_session=" + wx.getStorageSync("_miucms_session"),
+ Cookie: "XPHP_SESSION_ID=" + wx.getStorageSync("session"),
token: wx.getStorageSync("session") || ""
},
method: method,
@@ -91,7 +95,7 @@ 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("/miniprogram/index", {
code: e
}, !0).then(function (e) {
var o = e.data;
@@ -102,7 +106,6 @@ function c(e, a) {
}
module.exports = {
- initial_url: "https://t-jm.v0750.com/miniprogram",
login: t,
request: n,
pageStart: function (e) {
@@ -119,11 +122,13 @@ module.exports = {
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) {
+ o = e, n("/miniprogram/identify/reload", a, !0).then(function (e) {
var a = e.data;
- console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
+ if (e.code == 200) {
+ o.globalData.deviceData = a || {};
+ o.globalData.devicecode = a.devicecode || '';
+ }
});
}
};
\ No newline at end of file