|
@@ -104,7 +104,14 @@ import "vant/lib/button/style/index";
|
|
|
import "vant/lib/popup/style/index";
|
|
|
import "vant/lib/picker/style/index";
|
|
|
// import { urlSearchData } from "../utils/tool";
|
|
|
-// import { getAPPUser, apply, getAPPToken,getAPPUserDetail,orderList } from "../api/index";
|
|
|
+// import {
|
|
|
+// getAPPUser,
|
|
|
+// apply,
|
|
|
+// getAPPToken,
|
|
|
+// getAPPUserDetail,
|
|
|
+// goodsList,
|
|
|
+// applyrang,
|
|
|
+// } from "../api/index";
|
|
|
import { goodsList, apply, applyrang } from "../api/index";
|
|
|
import { isIphone, isAndroid } from "@/utils/isTerminal.js";
|
|
|
|
|
@@ -130,7 +137,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- // let search = urlSearchData(),that = this;
|
|
|
+ // let search = urlSearchData(),
|
|
|
+ // that = this;
|
|
|
// getAPPUser({
|
|
|
// ticket: search.ticket,
|
|
|
// }).then(r => {
|
|
@@ -140,30 +148,40 @@ export default {
|
|
|
// getAPPUserDetail({
|
|
|
// loginName: r,
|
|
|
// }).then(detail => {
|
|
|
- // const obj = JSON.parse(detail || "{}");
|
|
|
- // that.userphone = obj.telNumber;
|
|
|
- // that.username = obj.name;
|
|
|
- // orderList({
|
|
|
+ // const obj = JSON.parse(detail || "{}");
|
|
|
+ // that.userphone = obj.telNumber;
|
|
|
+ // that.username = obj.name;
|
|
|
+ // goodsList({
|
|
|
// userPhone: that.userphone || "",
|
|
|
// }).then(res => {
|
|
|
- // const li = res || [];
|
|
|
- // let l = [], g = {};
|
|
|
- // li.sort((a, b) => {
|
|
|
- // return new Date(a.orderTime) - new Date(b.orderTime);
|
|
|
+ // this.goodsLi = (res || []).map(v => {
|
|
|
+ // v.name = v.name + "(" + v.price + "元)";
|
|
|
+ // return v;
|
|
|
// });
|
|
|
- // for (let i = 0; i < li.length; i++) {
|
|
|
- // const v = li[i];
|
|
|
- // v.orderTime = v.orderTime.replace(/:00$/, "");
|
|
|
- // let key = v.orderTime.split(" ")[0]
|
|
|
- // if (g[key]) {
|
|
|
- // g[key].push(v);
|
|
|
+ // this.radio = (this.goodsLi[0] || {}).id;
|
|
|
+ // });
|
|
|
+ // applyrang().then(res => {
|
|
|
+ // let l = res || [],
|
|
|
+ // nl = [],
|
|
|
+ // o = {};
|
|
|
+ // for (let i = 0; i < l.length; i++) {
|
|
|
+ // const v = l[i];
|
|
|
+ // if (v.isOrder === 1) continue;
|
|
|
+ // let keys = v.startTime.split(" "),
|
|
|
+ // key = keys[0],
|
|
|
+ // val = keys[1];
|
|
|
+ // v.startTime = val.replace(/:00$/, "");
|
|
|
+ // if (o[key] >= 0) {
|
|
|
+ // nl[o[key]].children.push(v);
|
|
|
// } else {
|
|
|
- // l.push(key);
|
|
|
- // g[key] = [v];
|
|
|
+ // o[key] = nl.length;
|
|
|
+ // nl[o[key]] = {
|
|
|
+ // startTime: key,
|
|
|
+ // children: [v],
|
|
|
+ // };
|
|
|
// }
|
|
|
// }
|
|
|
- // that.group = g;
|
|
|
- // that.dataList = l;
|
|
|
+ // this.tagList = nl;
|
|
|
// });
|
|
|
// });
|
|
|
// });
|
|
@@ -269,7 +287,7 @@ export default {
|
|
|
},
|
|
|
onConfirmpro(date) {
|
|
|
this.program = false;
|
|
|
- this.radio = date.id
|
|
|
+ this.radio = date.id;
|
|
|
this.radioname = date.name;
|
|
|
},
|
|
|
},
|