diff --git a/App.vue b/App.vue
index 14cb274..dcb3298 100644
--- a/App.vue
+++ b/App.vue
@@ -6,72 +6,76 @@
APIgeocodelocation
} from "@/common/api/api.js"
import {
- onLaunch
+ onLaunch,
+ onShow
} from '@dcloudio/uni-app';
import {
- getCurrentInstance
- } from 'vue'
+ getCurrentInstance,
+ nextTick
+ } from 'vue';
+ import {
+ Storelogin
+ } from '@/stores/user.js';
const {
proxy
} = getCurrentInstance()
// 小程序启动时执行
onLaunch(async () => {
// 标记应用启动完成
+ // clear
+ await nextTick()
const store = useNavbarStore();
- store.initNavbarHeight();
- try {
- uni.getLocation({
- type: 'wgs84',
- success: async (res) => {
- let successres = await APIgeocodelocation({
- lng: res.longitude,
- lat: res.latitude,
- })
- if (successres.code == 0) {
- let datastorage = {
- country: successres.data.addressComponent.country, // "中国"
- province: successres.data.addressComponent
- .province, //province: "陕西省"
- address: successres.data.addressComponent.city, //district: "西安市"
- district: successres.data.addressComponent
- .district, //district: "未央区"
- lng: res.longitude,
- lat: res.latitude,
- }
- uni.cache.set('getLocationstorage', datastorage);
- proxy.$isResolve()
- }
- },
+ await store.initNavbarHeight();
- });
- } catch (error) {
- let successres = await APIgeocodelocation({
- lng: '',
- lat: '',
- })
- if (successres.code == 0) {
- let datastorage = {
- country: successres.data.addressComponent.country, // "中国"
- province: successres.data.addressComponent
- .province, //province: "陕西省"
- address: successres.data.addressComponent.city, //district: "西安市"
- district: successres.data.addressComponent
- .district, //district: "未央区"
- lng: res.longitude,
- lat: res.latitude,
- }
- uni.cache.set('getLocationstorage', datastorage);
- proxy.$isResolve()
- }
- }
});
-
- // export default {
- // onLaunch: async function() {
-
-
- // },
- // onShow: function() {},
+ onShow(async () => {
+ try {
+ // #ifdef MP-WEIXIN
+ // 当向小程序后台请求完新版本信息,会进行回调。res: {hasUpdate: true, version: 1.0.0}
+ const updateManager = uni.getUpdateManager();
+ updateManager.onCheckForUpdate((res) => {
+ if (res.hasUpdate) { // 有更新
+ uni.showLoading({
+ title: '更新中...'
+ }); // 开始下载前,显示Loading
+ }
+ });
+ // 当新版本下载完成,会进行回调
+ updateManager.onUpdateReady(() => {
+ uni.hideLoading(); // 关闭 Loading
+ uni.showModal({ // 弹确认框(强制更新)
+ title: '更新提示',
+ content: '更新完毕,是否重启?',
+ success: function(res) {
+ if (res.confirm) {
+ updateManager.applyUpdate(); // 强制小程序重启并使用新版本。
+ }
+ }
+ })
+ });
+ // 当新版本下载失败,会进行回调
+ updateManager.onUpdateFailed(() => {
+ uni.hideLoading(); // 关闭 Loading
+ uni.showToast({
+ title: '更新失败,稍后再试...',
+ icon: "error"
+ });
+ });
+ // #endif
+ } catch (error) {
+ //TODO handle the exception
+ }
+ // #ifndef H5
+ // try {
+ const storelogin = Storelogin();
+ await storelogin.actionslogin()
+ proxy.$isResolve()
+ // } catch (error) {
+ // proxy.$isResolve()
+ // console.log(error)
+ // }
+ // #endif
+ })
// onHide: function() {}
// }
diff --git a/common/api/api.js b/common/api/api.js
index 696728d..25abaa5 100644
--- a/common/api/api.js
+++ b/common/api/api.js
@@ -1,20 +1,68 @@
// 引入 request 文件
import request from '@/common/api/request.js'
-
+const url = '/account'
//根据经纬度获取信息
export const APIgeocodelocation = (data) => {
return request({
- url: '/location/geocode',
+ url: url + '/user/geo/geocode',
method: 'get',
data: data,
toast: false
})
}
-//根据经纬度获取信息
-export const APIcustomlogin = (data) => {
+
+//登录
+export const APIuserlogin = (data) => {
return request({
- url: '/login/auth/custom/login',
+ url: url + '/user/login',
+ method: 'post',
+ data: data,
+ toast: false
+ })
+}
+
+//用户信息获取
+export const APIuser = (data) => {
+ return request({
+ url: url + '/user',
+ method: 'get',
+ data: data,
+ toast: false
+ })
+}
+
+//获取手机号
+export const APIuserphone = (data) => {
+ return request({
+ url: url + '/user/phone',
method: 'post',
data: data
})
+}
+
+//文件上传
+export const APIuserupload = (data) => {
+ return request({
+ url: url + '/user/common/upload',
+ method: 'post',
+ data: data
+ })
+}
+
+//用户密码修改
+export const APIuserpwd = (data) => {
+ return request({
+ url: url + '/user/pwd',
+ method: 'put',
+ data: data
+ })
+}
+
+//验证码获取
+export const APIusercode = (data) => {
+ return request({
+ url: url + '/user/code',
+ method: 'get',
+ data: data
+ })
}
\ No newline at end of file
diff --git a/common/api/index/coupons.js b/common/api/index/coupons.js
index 284107c..22e1111 100644
--- a/common/api/index/coupons.js
+++ b/common/api/index/coupons.js
@@ -1,9 +1,10 @@
// 引入 request 文件
import request from '@/common/api/request.js'
//获取优惠券参数列表
+const url = '/account'
export const APIordergetYhqPara = (data) => {
return request({
- url: '/order/getYhqPara',
+ url: url + '/order/getYhqPara',
method: 'get',
data: data
})
@@ -11,7 +12,7 @@ export const APIordergetYhqPara = (data) => {
//系统优惠券
export const APIorderfindCoupons = (data) => {
return request({
- url: '/order/findCoupons',
+ url: url + '/order/findCoupons',
method: 'get',
data: data
})
@@ -19,7 +20,7 @@ export const APIorderfindCoupons = (data) => {
// 我的优惠券
export const APIordermineCoupons = (data) => {
return request({
- url: '/order/mineCoupons',
+ url: url + '/order/mineCoupons',
method: 'post',
data: data,
toast: false
diff --git a/common/api/index/index.js b/common/api/index/index.js
index 908bfbe..a89a35f 100644
--- a/common/api/index/index.js
+++ b/common/api/index/index.js
@@ -1,46 +1,30 @@
// 引入 request 文件
+const url = '/product'
+// const url = '/account'
import request from '@/common/api/request.js'
//首页上半部分
export const APIhomehomePageUp = (data) => {
return request({
- url: '/home/homePageUp',
- method: 'post',
+ url: url + '/user/home/homePageUp',
+ method: 'GET',
data: data
})
}
-//首页上半部分
+//首页xia半部分
export const APIhome = (data) => {
return request({
- url: '/home',
- method: 'post',
+ url: url + '/user/home/product',
+ method: 'GET',
data: data,
toast: false
})
}
-//首页上半部分
-export const APIshopUserInfo = (data) => {
+// 获取咖啡
+export const userdict = (data) => {
return request({
- url: '/user/shopUserInfo',
- method: 'get',
+ url: '/account/user/dict',
+ method: 'GET',
data: data,
toast: false
})
}
-//首页上半部分
-export const APIgeocodelocation = (data) => {
- return request({
- url: '/location/geocode',
- method: 'get',
- data: data,
- toast: false
- })
-}
-///商户登录后 shopId和autokey
-export const APIshopExtend = (data) => {
- return request({
- url: '/common/shopExtend',
- method: 'post',
- data: data,
- toast: false
- })
-}
\ No newline at end of file
diff --git a/common/api/index/tothestore.js b/common/api/index/tothestore.js
index 5b2c188..7b540b4 100644
--- a/common/api/index/tothestore.js
+++ b/common/api/index/tothestore.js
@@ -1,9 +1,10 @@
// 引入 request 文件
import request from '@/common/api/request.js'
+const url = '/account'
//获取top部分(店铺列表)
export const APIdistiricttopCommon = (data) => {
return request({
- url: '/distirict/topCommon',
+ url: url + '/distirict/topCommon',
method: 'get',
data: data
})
@@ -11,7 +12,7 @@ export const APIdistiricttopCommon = (data) => {
//预约到店(店铺列表)
export const APIdistirictsubShopList = (data) => {
return request({
- url: '/distirict/subShopList',
+ url: url + '/user/shopInfo/subList',
method: 'get',
data: data
})
diff --git a/common/api/member.js b/common/api/member.js
new file mode 100644
index 0000000..72ffe14
--- /dev/null
+++ b/common/api/member.js
@@ -0,0 +1,114 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+const urlAccount = '/account'
+const urlProduct = '/product'
+const urlOrder = '/order'
+
+//桌码换取详细店铺信息
+export const APIproductqueryShop = (data) => {
+ return request({
+ url: urlAccount + '/user/shopInfo',
+ method: 'get',
+ data: data
+ })
+}
+
+// 获取登录用户店铺会员信息
+export const APIshopUserInfo = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser',
+ method: 'get',
+ data: data,
+ toast: false
+ })
+}
+
+// 加入会员
+export const APIshopUser = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser',
+ method: 'post',
+ data: data
+ })
+}
+
+// 获取动态会员码 3分钟内可用
+export const APIusershopUsercode = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser/code',
+ method: 'get',
+ data: data
+ })
+}
+
+// 获取当前用户所有店铺会员信息 列表
+export const APIusershopUservipCard = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser/vipCard',
+ method: 'get',
+ data: data
+ })
+}
+
+
+// 获取店铺详细信息
+export const APIusershopInfodetail = (data) => {
+ return request({
+ url: urlAccount + '/user/shopInfo/detail',
+ method: 'get',
+ data: data
+ })
+}
+
+//通过用户Id 查找优惠券
+export const APIcouponfindByUserId = (data) => {
+ return request({
+ url: urlAccount + '/user/coupon/findByUserId',
+ method: 'get',
+ data: data
+ })
+}
+//生成订单后使用
+export const APIfindCoupon = (data) => {
+ return request({
+ url: urlAccount + '/user/coupon/findCoupon',
+ method: 'get',
+ data: data
+ })
+}
+
+//桌码换取详细店铺信息
+export const APIuseractivate = (data) => {
+ return request({
+ url: urlAccount + '/user/activate',
+ method: 'get',
+ data: data
+ })
+}
+
+//获取余额余额明细
+export const APIshopUsermoneyRecord = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser/moneyRecord',
+ method: 'get',
+ data: data
+ })
+}
+
+//获取积分明细
+export const APIshopUserpointsRecord = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser/pointsRecord',
+ method: 'get',
+ data: data
+ })
+}
+
+//获取动态会员码
+export const APIshopUsercode = (data) => {
+ return request({
+ url: urlAccount + '/user/shopUser/code',
+ method: 'get',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/common/api/order/index.js b/common/api/order/index.js
new file mode 100644
index 0000000..52b5aac
--- /dev/null
+++ b/common/api/order/index.js
@@ -0,0 +1,65 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+const url = '/order'
+//订单列表
+export const APIuserorder = (data) => {
+ return request({
+ url: url + '/user/order',
+ method: 'get',
+ data: data
+ })
+}
+
+//生成订单
+export const APIcreateOrder = (data) => {
+ return request({
+ url: url + '/user/order/createOrder',
+ method: 'post',
+ data: data
+ })
+}
+
+//删除订单
+export const APIputuserorder = (data) => {
+ return request({
+ url: url + '/user/order/' + data,
+ method: 'put'
+ })
+}
+
+//历史订单(多次下单使用)
+export const APIhistoryOrder = (data) => {
+ return request({
+ url: url + '/user/order/historyOrder',
+ method: 'get',
+ data: data,
+ toast: false
+ })
+}
+
+//订单详情
+export const APIgetOrderById = (data) => {
+ return request({
+ url: url + '/user/order/getOrderById',
+ method: 'get',
+ data: data
+ })
+}
+
+//删除所有待支付订单
+export const APIcancelOrder = (data) => {
+ return request({
+ url: url + '/user/order/cancelOrder',
+ method: 'post',
+ data: data
+ })
+}
+
+//删除某一个待支付订单
+export const APIrmPlaceOrder = (data) => {
+ return request({
+ url: url + '/user/order/rmPlaceOrder',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/common/api/pay.js b/common/api/pay.js
new file mode 100644
index 0000000..27096fe
--- /dev/null
+++ b/common/api/pay.js
@@ -0,0 +1,32 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+const urlAccount = '/account'
+const urlProduct = '/product'
+const urlOrder = '/order'
+
+// 小程序会员充值支付
+export const APIpayltPayVip = (data) => {
+ return request({
+ url: urlOrder + '/pay/ltPayVip',
+ method: 'post',
+ data: data
+ })
+}
+
+// 小程序支付
+export const APIpayltPayOrder = (data) => {
+ return request({
+ url: urlOrder + '/pay/ltPayOrder',
+ method: 'post',
+ data: data
+ })
+}
+
+// 会员退款
+export const APIrefundVip = (data) => {
+ return request({
+ url: urlOrder + '/pay/vipPay',
+ method: 'post',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/common/api/product/product.js b/common/api/product/product.js
index ef683c1..e06706c 100644
--- a/common/api/product/product.js
+++ b/common/api/product/product.js
@@ -1,10 +1,48 @@
// 引入 request 文件
import request from '@/common/api/request.js'
+const urlAccount = '/account'
+const urlProduct = '/product'
+const urlOrder = '/order'
-//通过桌码获取店铺信息
-export const APIproductqueryShop = (data) => {
+//获取商品列表数据
+export const APIproductqueryProduct = (data) => {
return request({
- url: '/product/queryShop',
+ url: urlProduct + '/user/product/miniApp/home/queryProduct',
+ method: 'get',
+ data: data
+ })
+}
+
+//小程序点餐-热销商品查询
+export const productminiApphotsquery = (data) => {
+ return request({
+ url: urlProduct + '/user/product/miniApp/hots/query',
+ method: 'get',
+ data: data
+ })
+}
+
+//小程序点餐-分组商品列表
+export const APIgroupquery = (data) => {
+ return request({
+ url: urlProduct + '/user/product/miniApp/group/query',
+ method: 'get',
+ data: data
+ })
+}
+
+//小程序点餐-分组商品列表
+export const APIminiAppinfo = (data) => {
+ return request({
+ url: urlProduct + '/user/product/miniApp/info/' + data,
+ method: 'get'
+ })
+}
+
+//小程序点餐-分组商品列表
+export const APIminiAppskuinfo = (data) => {
+ return request({
+ url: urlProduct + '/user/product/miniApp/sku/info',
method: 'get',
data: data
})
diff --git a/common/api/request.js b/common/api/request.js
index 8c90c9f..003fdeb 100644
--- a/common/api/request.js
+++ b/common/api/request.js
@@ -8,22 +8,21 @@ export default (params) => {
version: uni.conf.version,
type: uni.getSystemInfoSync().platform,
// #ifdef APP-PLUS
- environment: 'app',
+ platformType: 'APP',
// #endif
// #ifdef H5
- environment: 'H5',
+ platformType: 'H5',
// #endif
// #ifdef MP-WEIXIN
- environment: 'wx',
+ platformType: 'WX',
// #endif
// #ifdef MP-ALIPAY
- environment: 'alipay',
+ platformType: 'ALI',
// #endif
- token: uni.cache.get('token'),
- openId: uni.cache.get('miniAppOpenId'),
- id: uni.cache.get('userInfo').id,
- shopId: uni.cache.get('shopId'),
- userId: uni.cache.get('userInfo').id,
+ token: uni.cache.get('token') || '',
+ id: uni.cache.get('userInfo').id || '',
+ shopId: uni.cache.get('shopId') || '',
+ userId: uni.cache.get('userInfo').id || '',
}
if (toast) {
uni.showLoading({
@@ -32,34 +31,37 @@ export default (params) => {
})
}
return new Promise((resolve, reject) => {
+ const timeoutDuration = params.timeout || 10000; // 可以通过 params 传入超时时间,默认 10 秒
uni.request({
url: uni.conf.baseUrl + url,
method: method,
header: header,
data: data,
+ timeout: timeoutDuration,
success(response) {
const res = response.data
// 根据返回的状态码做出对应的操作
//获取成功
- if (res.code == 0) {
+ if (res.code == 200) {
uni.hideLoading();
uni.hideToast();
- resolve(res);
+ resolve(res.data ? res.data : true);
} else {
switch (res.code) {
- case '-4':
- resolve(res)
+ case '501':
+ uni.cache.remove('shopId')
// uni.showToast({
- // title: res.message || res.msg || res.error,
+ // title: '',
// icon: "none",
// success: () => {
- // setTimeout(() => {
- // uni.reLaunch({
- // url: "/pages/login/index",
- // })
- // }, 1000);
+
// }
// })
+ setTimeout(() => {
+ uni.reLaunch({
+ url: "/pages/index/index",
+ })
+ }, 1000);
break;
case 404:
uni.showToast({
@@ -69,15 +71,14 @@ export default (params) => {
break;
default:
// 是否提示
- console.log(res)
if (toast) {
uni.showToast({
title: res.message || res.msg || res.error,
icon: "none",
success: () => {
setTimeout(res => {
-
- }, 2000)
+ reject(false);
+ }, 1000)
}
})
}
@@ -86,21 +87,18 @@ export default (params) => {
}
},
fail(err) {
- console.log(err)
if (err.errMsg.indexOf('request:fail') !== -1) {
- uni.showToast({
- title: '网络异常',
- icon: "error",
- duration: 2000
- })
- } else {
- uni.showToast({
- title: '未知异常',
- duration: 2000
- })
+ if (err.errMsg.indexOf('timeout') !== -1) {
+ if (toast) {
+ uni.showToast({
+ title: `请求超时,请稍后重试`,
+ icon: "error",
+ duration: 2000
+ });
+ }
+ }
}
reject(err);
-
},
complete() {
// 不管成功还是失败都会执行
@@ -111,5 +109,6 @@ export default (params) => {
}
});
- }).catch((e) => {});
+ }).catch((e) => {
+ });
};
\ No newline at end of file
diff --git a/common/api/shop/index.js b/common/api/shop/index.js
new file mode 100644
index 0000000..61f3575
--- /dev/null
+++ b/common/api/shop/index.js
@@ -0,0 +1,41 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+const urlAccount = '/account'
+const urlProduct = '/product'
+const urlOrder = '/order'
+
+//商品列表
+export const APIgeocodelocation = (data) => {
+ return request({
+ url: urlAccount + '/user/points/mall/goods/page',
+ method: 'get',
+ data: data
+ })
+}
+
+//001-会员积分账户信息
+export const APImemberPointsmyPoints = (data) => {
+ return request({
+ url: urlAccount + '/user/points/memberPoints/myPoints',
+ method: 'get',
+ data: data
+ })
+}
+
+//002-获取订单可用积分及抵扣金额(支付页面使用)
+export const APImemberPointscalcUsablePoints = (data) => {
+ return request({
+ url: urlAccount + '/user/points/memberPoints/calcUsablePoints',
+ method: 'get',
+ data: data
+ })
+}
+
+//003-根据积分计算可抵扣金额
+export const APImemberPointscalcDeductionAmount = (data) => {
+ return request({
+ url: urlAccount + '/user/points/memberPoints/calcDeductionAmount',
+ method: 'get',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/common/api/subscribeto.js b/common/api/subscribeto.js
new file mode 100644
index 0000000..c6a9e2d
--- /dev/null
+++ b/common/api/subscribeto.js
@@ -0,0 +1,58 @@
+// 引入 request 文件
+import request from '@/common/api/request.js'
+const urlAccount = '/account'
+const urlProduct = '/product'
+const urlOrder = '/order'
+
+// 获取叫号号码
+export const APIcallTabletakeNumber = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable/takeNumber',
+ method: 'post',
+ data: data
+ })
+}
+
+// 叫号桌型获取
+export const APIusercallTable = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable',
+ method: 'get',
+ data: data
+ })
+}
+
+// 获取叫号队列
+export const APIqueuecallTable = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable/queue',
+ method: 'get',
+ data: data
+ })
+}
+
+// 叫号队列详情
+export const APIqueuedetail = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable/queue/detail',
+ method: 'get',
+ data: data
+ })
+}
+
+// 消息订阅
+export const APIcallTablesubMsg = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable/subMsg',
+ method: 'post',
+ data: data
+ })
+}
+
+// 取消排队
+export const APIqueuecancel = (data) => {
+ return request({
+ url: urlAccount + '/user/callTable/cancel?queueId=' + data.queueId + '&shopId=' + data.shopId,
+ method: 'DELETE'
+ })
+}
\ No newline at end of file
diff --git a/common/js/uqrCode.js b/common/js/uqrCode.js
deleted file mode 100644
index 62a4ad4..0000000
--- a/common/js/uqrCode.js
+++ /dev/null
@@ -1,1437 +0,0 @@
-// uqrcode.js
-//---------------------------------------------------------------------
-// github https://github.com/Sansnn/uQRCode
-//---------------------------------------------------------------------
-
-let uQRCode = {};
-
-(function() {
- //---------------------------------------------------------------------
- // QRCode for JavaScript
- //
- // Copyright (c) 2009 Kazuhiko Arase
- //
- // URL: http://www.d-project.com/
- //
- // Licensed under the MIT license:
- // http://www.opensource.org/licenses/mit-license.php
- //
- // The word "QR Code" is registered trademark of
- // DENSO WAVE INCORPORATED
- // http://www.denso-wave.com/qrcode/faqpatent-e.html
- //
- //---------------------------------------------------------------------
-
- //---------------------------------------------------------------------
- // QR8bitByte
- //---------------------------------------------------------------------
-
- function QR8bitByte(data) {
- this.mode = QRMode.MODE_8BIT_BYTE;
- this.data = data;
- }
-
- QR8bitByte.prototype = {
-
- getLength: function(buffer) {
- return this.data.length;
- },
-
- write: function(buffer) {
- for (var i = 0; i < this.data.length; i++) {
- // not JIS ...
- buffer.put(this.data.charCodeAt(i), 8);
- }
- }
- };
-
- //---------------------------------------------------------------------
- // QRCode
- //---------------------------------------------------------------------
-
- function QRCode(typeNumber, errorCorrectLevel) {
- this.typeNumber = typeNumber;
- this.errorCorrectLevel = errorCorrectLevel;
- this.modules = null;
- this.moduleCount = 0;
- this.dataCache = null;
- this.dataList = new Array();
- }
-
- QRCode.prototype = {
-
- addData: function(data) {
- var newData = new QR8bitByte(data);
- this.dataList.push(newData);
- this.dataCache = null;
- },
-
- isDark: function(row, col) {
- if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
- throw new Error(row + "," + col);
- }
- return this.modules[row][col];
- },
-
- getModuleCount: function() {
- return this.moduleCount;
- },
-
- make: function() {
- // Calculate automatically typeNumber if provided is < 1
- if (this.typeNumber < 1) {
- var typeNumber = 1;
- for (typeNumber = 1; typeNumber < 40; typeNumber++) {
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
-
- var buffer = new QRBitBuffer();
- var totalDataCount = 0;
- for (var i = 0; i < rsBlocks.length; i++) {
- totalDataCount += rsBlocks[i].dataCount;
- }
-
- for (var i = 0; i < this.dataList.length; i++) {
- var data = this.dataList[i];
- buffer.put(data.mode, 4);
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
- data.write(buffer);
- }
- if (buffer.getLengthInBits() <= totalDataCount * 8)
- break;
- }
- this.typeNumber = typeNumber;
- }
- this.makeImpl(false, this.getBestMaskPattern());
- },
-
- makeImpl: function(test, maskPattern) {
-
- this.moduleCount = this.typeNumber * 4 + 17;
- this.modules = new Array(this.moduleCount);
-
- for (var row = 0; row < this.moduleCount; row++) {
-
- this.modules[row] = new Array(this.moduleCount);
-
- for (var col = 0; col < this.moduleCount; col++) {
- this.modules[row][col] = null; //(col + row) % 3;
- }
- }
-
- this.setupPositionProbePattern(0, 0);
- this.setupPositionProbePattern(this.moduleCount - 7, 0);
- this.setupPositionProbePattern(0, this.moduleCount - 7);
- this.setupPositionAdjustPattern();
- this.setupTimingPattern();
- this.setupTypeInfo(test, maskPattern);
-
- if (this.typeNumber >= 7) {
- this.setupTypeNumber(test);
- }
-
- if (this.dataCache == null) {
- this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
- }
-
- this.mapData(this.dataCache, maskPattern);
- },
-
- setupPositionProbePattern: function(row, col) {
-
- for (var r = -1; r <= 7; r++) {
-
- if (row + r <= -1 || this.moduleCount <= row + r) continue;
-
- for (var c = -1; c <= 7; c++) {
-
- if (col + c <= -1 || this.moduleCount <= col + c) continue;
-
- if ((0 <= r && r <= 6 && (c == 0 || c == 6)) ||
- (0 <= c && c <= 6 && (r == 0 || r == 6)) ||
- (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
- this.modules[row + r][col + c] = true;
- } else {
- this.modules[row + r][col + c] = false;
- }
- }
- }
- },
-
- getBestMaskPattern: function() {
-
- var minLostPoint = 0;
- var pattern = 0;
-
- for (var i = 0; i < 8; i++) {
-
- this.makeImpl(true, i);
-
- var lostPoint = QRUtil.getLostPoint(this);
-
- if (i == 0 || minLostPoint > lostPoint) {
- minLostPoint = lostPoint;
- pattern = i;
- }
- }
-
- return pattern;
- },
-
- createMovieClip: function(target_mc, instance_name, depth) {
-
- var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
- var cs = 1;
-
- this.make();
-
- for (var row = 0; row < this.modules.length; row++) {
-
- var y = row * cs;
-
- for (var col = 0; col < this.modules[row].length; col++) {
-
- var x = col * cs;
- var dark = this.modules[row][col];
-
- if (dark) {
- qr_mc.beginFill(0, 100);
- qr_mc.moveTo(x, y);
- qr_mc.lineTo(x + cs, y);
- qr_mc.lineTo(x + cs, y + cs);
- qr_mc.lineTo(x, y + cs);
- qr_mc.endFill();
- }
- }
- }
-
- return qr_mc;
- },
-
- setupTimingPattern: function() {
-
- for (var r = 8; r < this.moduleCount - 8; r++) {
- if (this.modules[r][6] != null) {
- continue;
- }
- this.modules[r][6] = (r % 2 == 0);
- }
-
- for (var c = 8; c < this.moduleCount - 8; c++) {
- if (this.modules[6][c] != null) {
- continue;
- }
- this.modules[6][c] = (c % 2 == 0);
- }
- },
-
- setupPositionAdjustPattern: function() {
-
- var pos = QRUtil.getPatternPosition(this.typeNumber);
-
- for (var i = 0; i < pos.length; i++) {
-
- for (var j = 0; j < pos.length; j++) {
-
- var row = pos[i];
- var col = pos[j];
-
- if (this.modules[row][col] != null) {
- continue;
- }
-
- for (var r = -2; r <= 2; r++) {
-
- for (var c = -2; c <= 2; c++) {
-
- if (r == -2 || r == 2 || c == -2 || c == 2 ||
- (r == 0 && c == 0)) {
- this.modules[row + r][col + c] = true;
- } else {
- this.modules[row + r][col + c] = false;
- }
- }
- }
- }
- }
- },
-
- setupTypeNumber: function(test) {
-
- var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
-
- for (var i = 0; i < 18; i++) {
- var mod = (!test && ((bits >> i) & 1) == 1);
- this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
- }
-
- for (var i = 0; i < 18; i++) {
- var mod = (!test && ((bits >> i) & 1) == 1);
- this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
- }
- },
-
- setupTypeInfo: function(test, maskPattern) {
-
- var data = (this.errorCorrectLevel << 3) | maskPattern;
- var bits = QRUtil.getBCHTypeInfo(data);
-
- // vertical
- for (var i = 0; i < 15; i++) {
-
- var mod = (!test && ((bits >> i) & 1) == 1);
- if (i < 6) {
- this.modules[i][8] = mod;
- } else if (i < 8) {
- this.modules[i + 1][8] = mod;
- } else {
- this.modules[this.moduleCount - 15 + i][8] = mod;
- }
- }
-
- // horizontal
- for (var i = 0; i < 15; i++) {
-
- var mod = (!test && ((bits >> i) & 1) == 1);
- if (i < 8) {
- this.modules[8][this.moduleCount - i - 1] = mod;
- } else if (i < 9) {
- this.modules[8][15 - i - 1 + 1] = mod;
- } else {
- this.modules[8][15 - i - 1] = mod;
- }
- }
-
- // fixed module
- this.modules[this.moduleCount - 8][8] = (!test);
-
- },
-
- mapData: function(data, maskPattern) {
-
- var inc = -1;
- var row = this.moduleCount - 1;
- var bitIndex = 7;
- var byteIndex = 0;
-
- for (var col = this.moduleCount - 1; col > 0; col -= 2) {
-
- if (col == 6) col--;
-
- while (true) {
-
- for (var c = 0; c < 2; c++) {
-
- if (this.modules[row][col - c] == null) {
-
- var dark = false;
-
- if (byteIndex < data.length) {
- dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
- }
-
- var mask = QRUtil.getMask(maskPattern, row, col - c);
-
- if (mask) {
- dark = !dark;
- }
-
- this.modules[row][col - c] = dark;
- bitIndex--;
-
- if (bitIndex == -1) {
- byteIndex++;
- bitIndex = 7;
- }
- }
- }
-
- row += inc;
-
- if (row < 0 || this.moduleCount <= row) {
- row -= inc;
- inc = -inc;
- break;
- }
- }
- }
-
- }
-
- };
-
- QRCode.PAD0 = 0xEC;
- QRCode.PAD1 = 0x11;
-
- QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
-
- var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
-
- var buffer = new QRBitBuffer();
-
- for (var i = 0; i < dataList.length; i++) {
- var data = dataList[i];
- buffer.put(data.mode, 4);
- buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
- data.write(buffer);
- }
-
- // calc num max data.
- var totalDataCount = 0;
- for (var i = 0; i < rsBlocks.length; i++) {
- totalDataCount += rsBlocks[i].dataCount;
- }
-
- if (buffer.getLengthInBits() > totalDataCount * 8) {
- throw new Error("code length overflow. (" +
- buffer.getLengthInBits() +
- ">" +
- totalDataCount * 8 +
- ")");
- }
-
- // end code
- if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
- buffer.put(0, 4);
- }
-
- // padding
- while (buffer.getLengthInBits() % 8 != 0) {
- buffer.putBit(false);
- }
-
- // padding
- while (true) {
-
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
- break;
- }
- buffer.put(QRCode.PAD0, 8);
-
- if (buffer.getLengthInBits() >= totalDataCount * 8) {
- break;
- }
- buffer.put(QRCode.PAD1, 8);
- }
-
- return QRCode.createBytes(buffer, rsBlocks);
- }
-
- QRCode.createBytes = function(buffer, rsBlocks) {
-
- var offset = 0;
-
- var maxDcCount = 0;
- var maxEcCount = 0;
-
- var dcdata = new Array(rsBlocks.length);
- var ecdata = new Array(rsBlocks.length);
-
- for (var r = 0; r < rsBlocks.length; r++) {
-
- var dcCount = rsBlocks[r].dataCount;
- var ecCount = rsBlocks[r].totalCount - dcCount;
-
- maxDcCount = Math.max(maxDcCount, dcCount);
- maxEcCount = Math.max(maxEcCount, ecCount);
-
- dcdata[r] = new Array(dcCount);
-
- for (var i = 0; i < dcdata[r].length; i++) {
- dcdata[r][i] = 0xff & buffer.buffer[i + offset];
- }
- offset += dcCount;
-
- var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
- var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
-
- var modPoly = rawPoly.mod(rsPoly);
- ecdata[r] = new Array(rsPoly.getLength() - 1);
- for (var i = 0; i < ecdata[r].length; i++) {
- var modIndex = i + modPoly.getLength() - ecdata[r].length;
- ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
- }
-
- }
-
- var totalCodeCount = 0;
- for (var i = 0; i < rsBlocks.length; i++) {
- totalCodeCount += rsBlocks[i].totalCount;
- }
-
- var data = new Array(totalCodeCount);
- var index = 0;
-
- for (var i = 0; i < maxDcCount; i++) {
- for (var r = 0; r < rsBlocks.length; r++) {
- if (i < dcdata[r].length) {
- data[index++] = dcdata[r][i];
- }
- }
- }
-
- for (var i = 0; i < maxEcCount; i++) {
- for (var r = 0; r < rsBlocks.length; r++) {
- if (i < ecdata[r].length) {
- data[index++] = ecdata[r][i];
- }
- }
- }
-
- return data;
-
- }
-
- //---------------------------------------------------------------------
- // QRMode
- //---------------------------------------------------------------------
-
- var QRMode = {
- MODE_NUMBER: 1 << 0,
- MODE_ALPHA_NUM: 1 << 1,
- MODE_8BIT_BYTE: 1 << 2,
- MODE_KANJI: 1 << 3
- };
-
- //---------------------------------------------------------------------
- // QRErrorCorrectLevel
- //---------------------------------------------------------------------
-
- var QRErrorCorrectLevel = {
- L: 1,
- M: 0,
- Q: 3,
- H: 2
- };
-
- //---------------------------------------------------------------------
- // QRMaskPattern
- //---------------------------------------------------------------------
-
- var QRMaskPattern = {
- PATTERN000: 0,
- PATTERN001: 1,
- PATTERN010: 2,
- PATTERN011: 3,
- PATTERN100: 4,
- PATTERN101: 5,
- PATTERN110: 6,
- PATTERN111: 7
- };
-
- //---------------------------------------------------------------------
- // QRUtil
- //---------------------------------------------------------------------
-
- var QRUtil = {
-
- PATTERN_POSITION_TABLE: [
- [],
- [6, 18],
- [6, 22],
- [6, 26],
- [6, 30],
- [6, 34],
- [6, 22, 38],
- [6, 24, 42],
- [6, 26, 46],
- [6, 28, 50],
- [6, 30, 54],
- [6, 32, 58],
- [6, 34, 62],
- [6, 26, 46, 66],
- [6, 26, 48, 70],
- [6, 26, 50, 74],
- [6, 30, 54, 78],
- [6, 30, 56, 82],
- [6, 30, 58, 86],
- [6, 34, 62, 90],
- [6, 28, 50, 72, 94],
- [6, 26, 50, 74, 98],
- [6, 30, 54, 78, 102],
- [6, 28, 54, 80, 106],
- [6, 32, 58, 84, 110],
- [6, 30, 58, 86, 114],
- [6, 34, 62, 90, 118],
- [6, 26, 50, 74, 98, 122],
- [6, 30, 54, 78, 102, 126],
- [6, 26, 52, 78, 104, 130],
- [6, 30, 56, 82, 108, 134],
- [6, 34, 60, 86, 112, 138],
- [6, 30, 58, 86, 114, 142],
- [6, 34, 62, 90, 118, 146],
- [6, 30, 54, 78, 102, 126, 150],
- [6, 24, 50, 76, 102, 128, 154],
- [6, 28, 54, 80, 106, 132, 158],
- [6, 32, 58, 84, 110, 136, 162],
- [6, 26, 54, 82, 110, 138, 166],
- [6, 30, 58, 86, 114, 142, 170]
- ],
-
- G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
- G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
- G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
-
- getBCHTypeInfo: function(data) {
- var d = data << 10;
- while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
- d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
- }
- return ((data << 10) | d) ^ QRUtil.G15_MASK;
- },
-
- getBCHTypeNumber: function(data) {
- var d = data << 12;
- while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
- d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
- }
- return (data << 12) | d;
- },
-
- getBCHDigit: function(data) {
-
- var digit = 0;
-
- while (data != 0) {
- digit++;
- data >>>= 1;
- }
-
- return digit;
- },
-
- getPatternPosition: function(typeNumber) {
- return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
- },
-
- getMask: function(maskPattern, i, j) {
-
- switch (maskPattern) {
-
- case QRMaskPattern.PATTERN000:
- return (i + j) % 2 == 0;
- case QRMaskPattern.PATTERN001:
- return i % 2 == 0;
- case QRMaskPattern.PATTERN010:
- return j % 3 == 0;
- case QRMaskPattern.PATTERN011:
- return (i + j) % 3 == 0;
- case QRMaskPattern.PATTERN100:
- return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
- case QRMaskPattern.PATTERN101:
- return (i * j) % 2 + (i * j) % 3 == 0;
- case QRMaskPattern.PATTERN110:
- return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
- case QRMaskPattern.PATTERN111:
- return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
-
- default:
- throw new Error("bad maskPattern:" + maskPattern);
- }
- },
-
- getErrorCorrectPolynomial: function(errorCorrectLength) {
-
- var a = new QRPolynomial([1], 0);
-
- for (var i = 0; i < errorCorrectLength; i++) {
- a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
- }
-
- return a;
- },
-
- getLengthInBits: function(mode, type) {
-
- if (1 <= type && type < 10) {
-
- // 1 - 9
-
- switch (mode) {
- case QRMode.MODE_NUMBER:
- return 10;
- case QRMode.MODE_ALPHA_NUM:
- return 9;
- case QRMode.MODE_8BIT_BYTE:
- return 8;
- case QRMode.MODE_KANJI:
- return 8;
- default:
- throw new Error("mode:" + mode);
- }
-
- } else if (type < 27) {
-
- // 10 - 26
-
- switch (mode) {
- case QRMode.MODE_NUMBER:
- return 12;
- case QRMode.MODE_ALPHA_NUM:
- return 11;
- case QRMode.MODE_8BIT_BYTE:
- return 16;
- case QRMode.MODE_KANJI:
- return 10;
- default:
- throw new Error("mode:" + mode);
- }
-
- } else if (type < 41) {
-
- // 27 - 40
-
- switch (mode) {
- case QRMode.MODE_NUMBER:
- return 14;
- case QRMode.MODE_ALPHA_NUM:
- return 13;
- case QRMode.MODE_8BIT_BYTE:
- return 16;
- case QRMode.MODE_KANJI:
- return 12;
- default:
- throw new Error("mode:" + mode);
- }
-
- } else {
- throw new Error("type:" + type);
- }
- },
-
- getLostPoint: function(qrCode) {
-
- var moduleCount = qrCode.getModuleCount();
-
- var lostPoint = 0;
-
- // LEVEL1
-
- for (var row = 0; row < moduleCount; row++) {
-
- for (var col = 0; col < moduleCount; col++) {
-
- var sameCount = 0;
- var dark = qrCode.isDark(row, col);
-
- for (var r = -1; r <= 1; r++) {
-
- if (row + r < 0 || moduleCount <= row + r) {
- continue;
- }
-
- for (var c = -1; c <= 1; c++) {
-
- if (col + c < 0 || moduleCount <= col + c) {
- continue;
- }
-
- if (r == 0 && c == 0) {
- continue;
- }
-
- if (dark == qrCode.isDark(row + r, col + c)) {
- sameCount++;
- }
- }
- }
-
- if (sameCount > 5) {
- lostPoint += (3 + sameCount - 5);
- }
- }
- }
-
- // LEVEL2
-
- for (var row = 0; row < moduleCount - 1; row++) {
- for (var col = 0; col < moduleCount - 1; col++) {
- var count = 0;
- if (qrCode.isDark(row, col)) count++;
- if (qrCode.isDark(row + 1, col)) count++;
- if (qrCode.isDark(row, col + 1)) count++;
- if (qrCode.isDark(row + 1, col + 1)) count++;
- if (count == 0 || count == 4) {
- lostPoint += 3;
- }
- }
- }
-
- // LEVEL3
-
- for (var row = 0; row < moduleCount; row++) {
- for (var col = 0; col < moduleCount - 6; col++) {
- if (qrCode.isDark(row, col) &&
- !qrCode.isDark(row, col + 1) &&
- qrCode.isDark(row, col + 2) &&
- qrCode.isDark(row, col + 3) &&
- qrCode.isDark(row, col + 4) &&
- !qrCode.isDark(row, col + 5) &&
- qrCode.isDark(row, col + 6)) {
- lostPoint += 40;
- }
- }
- }
-
- for (var col = 0; col < moduleCount; col++) {
- for (var row = 0; row < moduleCount - 6; row++) {
- if (qrCode.isDark(row, col) &&
- !qrCode.isDark(row + 1, col) &&
- qrCode.isDark(row + 2, col) &&
- qrCode.isDark(row + 3, col) &&
- qrCode.isDark(row + 4, col) &&
- !qrCode.isDark(row + 5, col) &&
- qrCode.isDark(row + 6, col)) {
- lostPoint += 40;
- }
- }
- }
-
- // LEVEL4
-
- var darkCount = 0;
-
- for (var col = 0; col < moduleCount; col++) {
- for (var row = 0; row < moduleCount; row++) {
- if (qrCode.isDark(row, col)) {
- darkCount++;
- }
- }
- }
-
- var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
- lostPoint += ratio * 10;
-
- return lostPoint;
- }
-
- };
-
-
- //---------------------------------------------------------------------
- // QRMath
- //---------------------------------------------------------------------
-
- var QRMath = {
-
- glog: function(n) {
-
- if (n < 1) {
- throw new Error("glog(" + n + ")");
- }
-
- return QRMath.LOG_TABLE[n];
- },
-
- gexp: function(n) {
-
- while (n < 0) {
- n += 255;
- }
-
- while (n >= 256) {
- n -= 255;
- }
-
- return QRMath.EXP_TABLE[n];
- },
-
- EXP_TABLE: new Array(256),
-
- LOG_TABLE: new Array(256)
-
- };
-
- for (var i = 0; i < 8; i++) {
- QRMath.EXP_TABLE[i] = 1 << i;
- }
- for (var i = 8; i < 256; i++) {
- QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^
- QRMath.EXP_TABLE[i - 5] ^
- QRMath.EXP_TABLE[i - 6] ^
- QRMath.EXP_TABLE[i - 8];
- }
- for (var i = 0; i < 255; i++) {
- QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
- }
-
- //---------------------------------------------------------------------
- // QRPolynomial
- //---------------------------------------------------------------------
-
- function QRPolynomial(num, shift) {
-
- if (num.length == undefined) {
- throw new Error(num.length + "/" + shift);
- }
-
- var offset = 0;
-
- while (offset < num.length && num[offset] == 0) {
- offset++;
- }
-
- this.num = new Array(num.length - offset + shift);
- for (var i = 0; i < num.length - offset; i++) {
- this.num[i] = num[i + offset];
- }
- }
-
- QRPolynomial.prototype = {
-
- get: function(index) {
- return this.num[index];
- },
-
- getLength: function() {
- return this.num.length;
- },
-
- multiply: function(e) {
-
- var num = new Array(this.getLength() + e.getLength() - 1);
-
- for (var i = 0; i < this.getLength(); i++) {
- for (var j = 0; j < e.getLength(); j++) {
- num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
- }
- }
-
- return new QRPolynomial(num, 0);
- },
-
- mod: function(e) {
-
- if (this.getLength() - e.getLength() < 0) {
- return this;
- }
-
- var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
-
- var num = new Array(this.getLength());
-
- for (var i = 0; i < this.getLength(); i++) {
- num[i] = this.get(i);
- }
-
- for (var i = 0; i < e.getLength(); i++) {
- num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
- }
-
- // recursive call
- return new QRPolynomial(num, 0).mod(e);
- }
- };
-
- //---------------------------------------------------------------------
- // QRRSBlock
- //---------------------------------------------------------------------
-
- function QRRSBlock(totalCount, dataCount) {
- this.totalCount = totalCount;
- this.dataCount = dataCount;
- }
-
- QRRSBlock.RS_BLOCK_TABLE = [
-
- // L
- // M
- // Q
- // H
-
- // 1
- [1, 26, 19],
- [1, 26, 16],
- [1, 26, 13],
- [1, 26, 9],
-
- // 2
- [1, 44, 34],
- [1, 44, 28],
- [1, 44, 22],
- [1, 44, 16],
-
- // 3
- [1, 70, 55],
- [1, 70, 44],
- [2, 35, 17],
- [2, 35, 13],
-
- // 4
- [1, 100, 80],
- [2, 50, 32],
- [2, 50, 24],
- [4, 25, 9],
-
- // 5
- [1, 134, 108],
- [2, 67, 43],
- [2, 33, 15, 2, 34, 16],
- [2, 33, 11, 2, 34, 12],
-
- // 6
- [2, 86, 68],
- [4, 43, 27],
- [4, 43, 19],
- [4, 43, 15],
-
- // 7
- [2, 98, 78],
- [4, 49, 31],
- [2, 32, 14, 4, 33, 15],
- [4, 39, 13, 1, 40, 14],
-
- // 8
- [2, 121, 97],
- [2, 60, 38, 2, 61, 39],
- [4, 40, 18, 2, 41, 19],
- [4, 40, 14, 2, 41, 15],
-
- // 9
- [2, 146, 116],
- [3, 58, 36, 2, 59, 37],
- [4, 36, 16, 4, 37, 17],
- [4, 36, 12, 4, 37, 13],
-
- // 10
- [2, 86, 68, 2, 87, 69],
- [4, 69, 43, 1, 70, 44],
- [6, 43, 19, 2, 44, 20],
- [6, 43, 15, 2, 44, 16],
-
- // 11
- [4, 101, 81],
- [1, 80, 50, 4, 81, 51],
- [4, 50, 22, 4, 51, 23],
- [3, 36, 12, 8, 37, 13],
-
- // 12
- [2, 116, 92, 2, 117, 93],
- [6, 58, 36, 2, 59, 37],
- [4, 46, 20, 6, 47, 21],
- [7, 42, 14, 4, 43, 15],
-
- // 13
- [4, 133, 107],
- [8, 59, 37, 1, 60, 38],
- [8, 44, 20, 4, 45, 21],
- [12, 33, 11, 4, 34, 12],
-
- // 14
- [3, 145, 115, 1, 146, 116],
- [4, 64, 40, 5, 65, 41],
- [11, 36, 16, 5, 37, 17],
- [11, 36, 12, 5, 37, 13],
-
- // 15
- [5, 109, 87, 1, 110, 88],
- [5, 65, 41, 5, 66, 42],
- [5, 54, 24, 7, 55, 25],
- [11, 36, 12],
-
- // 16
- [5, 122, 98, 1, 123, 99],
- [7, 73, 45, 3, 74, 46],
- [15, 43, 19, 2, 44, 20],
- [3, 45, 15, 13, 46, 16],
-
- // 17
- [1, 135, 107, 5, 136, 108],
- [10, 74, 46, 1, 75, 47],
- [1, 50, 22, 15, 51, 23],
- [2, 42, 14, 17, 43, 15],
-
- // 18
- [5, 150, 120, 1, 151, 121],
- [9, 69, 43, 4, 70, 44],
- [17, 50, 22, 1, 51, 23],
- [2, 42, 14, 19, 43, 15],
-
- // 19
- [3, 141, 113, 4, 142, 114],
- [3, 70, 44, 11, 71, 45],
- [17, 47, 21, 4, 48, 22],
- [9, 39, 13, 16, 40, 14],
-
- // 20
- [3, 135, 107, 5, 136, 108],
- [3, 67, 41, 13, 68, 42],
- [15, 54, 24, 5, 55, 25],
- [15, 43, 15, 10, 44, 16],
-
- // 21
- [4, 144, 116, 4, 145, 117],
- [17, 68, 42],
- [17, 50, 22, 6, 51, 23],
- [19, 46, 16, 6, 47, 17],
-
- // 22
- [2, 139, 111, 7, 140, 112],
- [17, 74, 46],
- [7, 54, 24, 16, 55, 25],
- [34, 37, 13],
-
- // 23
- [4, 151, 121, 5, 152, 122],
- [4, 75, 47, 14, 76, 48],
- [11, 54, 24, 14, 55, 25],
- [16, 45, 15, 14, 46, 16],
-
- // 24
- [6, 147, 117, 4, 148, 118],
- [6, 73, 45, 14, 74, 46],
- [11, 54, 24, 16, 55, 25],
- [30, 46, 16, 2, 47, 17],
-
- // 25
- [8, 132, 106, 4, 133, 107],
- [8, 75, 47, 13, 76, 48],
- [7, 54, 24, 22, 55, 25],
- [22, 45, 15, 13, 46, 16],
-
- // 26
- [10, 142, 114, 2, 143, 115],
- [19, 74, 46, 4, 75, 47],
- [28, 50, 22, 6, 51, 23],
- [33, 46, 16, 4, 47, 17],
-
- // 27
- [8, 152, 122, 4, 153, 123],
- [22, 73, 45, 3, 74, 46],
- [8, 53, 23, 26, 54, 24],
- [12, 45, 15, 28, 46, 16],
-
- // 28
- [3, 147, 117, 10, 148, 118],
- [3, 73, 45, 23, 74, 46],
- [4, 54, 24, 31, 55, 25],
- [11, 45, 15, 31, 46, 16],
-
- // 29
- [7, 146, 116, 7, 147, 117],
- [21, 73, 45, 7, 74, 46],
- [1, 53, 23, 37, 54, 24],
- [19, 45, 15, 26, 46, 16],
-
- // 30
- [5, 145, 115, 10, 146, 116],
- [19, 75, 47, 10, 76, 48],
- [15, 54, 24, 25, 55, 25],
- [23, 45, 15, 25, 46, 16],
-
- // 31
- [13, 145, 115, 3, 146, 116],
- [2, 74, 46, 29, 75, 47],
- [42, 54, 24, 1, 55, 25],
- [23, 45, 15, 28, 46, 16],
-
- // 32
- [17, 145, 115],
- [10, 74, 46, 23, 75, 47],
- [10, 54, 24, 35, 55, 25],
- [19, 45, 15, 35, 46, 16],
-
- // 33
- [17, 145, 115, 1, 146, 116],
- [14, 74, 46, 21, 75, 47],
- [29, 54, 24, 19, 55, 25],
- [11, 45, 15, 46, 46, 16],
-
- // 34
- [13, 145, 115, 6, 146, 116],
- [14, 74, 46, 23, 75, 47],
- [44, 54, 24, 7, 55, 25],
- [59, 46, 16, 1, 47, 17],
-
- // 35
- [12, 151, 121, 7, 152, 122],
- [12, 75, 47, 26, 76, 48],
- [39, 54, 24, 14, 55, 25],
- [22, 45, 15, 41, 46, 16],
-
- // 36
- [6, 151, 121, 14, 152, 122],
- [6, 75, 47, 34, 76, 48],
- [46, 54, 24, 10, 55, 25],
- [2, 45, 15, 64, 46, 16],
-
- // 37
- [17, 152, 122, 4, 153, 123],
- [29, 74, 46, 14, 75, 47],
- [49, 54, 24, 10, 55, 25],
- [24, 45, 15, 46, 46, 16],
-
- // 38
- [4, 152, 122, 18, 153, 123],
- [13, 74, 46, 32, 75, 47],
- [48, 54, 24, 14, 55, 25],
- [42, 45, 15, 32, 46, 16],
-
- // 39
- [20, 147, 117, 4, 148, 118],
- [40, 75, 47, 7, 76, 48],
- [43, 54, 24, 22, 55, 25],
- [10, 45, 15, 67, 46, 16],
-
- // 40
- [19, 148, 118, 6, 149, 119],
- [18, 75, 47, 31, 76, 48],
- [34, 54, 24, 34, 55, 25],
- [20, 45, 15, 61, 46, 16]
- ];
-
- QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
-
- var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
-
- if (rsBlock == undefined) {
- throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
- }
-
- var length = rsBlock.length / 3;
-
- var list = new Array();
-
- for (var i = 0; i < length; i++) {
-
- var count = rsBlock[i * 3 + 0];
- var totalCount = rsBlock[i * 3 + 1];
- var dataCount = rsBlock[i * 3 + 2];
-
- for (var j = 0; j < count; j++) {
- list.push(new QRRSBlock(totalCount, dataCount));
- }
- }
-
- return list;
- }
-
- QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
-
- switch (errorCorrectLevel) {
- case QRErrorCorrectLevel.L:
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
- case QRErrorCorrectLevel.M:
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
- case QRErrorCorrectLevel.Q:
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
- case QRErrorCorrectLevel.H:
- return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
- default:
- return undefined;
- }
- }
-
- //---------------------------------------------------------------------
- // QRBitBuffer
- //---------------------------------------------------------------------
-
- function QRBitBuffer() {
- this.buffer = new Array();
- this.length = 0;
- }
-
- QRBitBuffer.prototype = {
-
- get: function(index) {
- var bufIndex = Math.floor(index / 8);
- return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1;
- },
-
- put: function(num, length) {
- for (var i = 0; i < length; i++) {
- this.putBit(((num >>> (length - i - 1)) & 1) == 1);
- }
- },
-
- getLengthInBits: function() {
- return this.length;
- },
-
- putBit: function(bit) {
-
- var bufIndex = Math.floor(this.length / 8);
- if (this.buffer.length <= bufIndex) {
- this.buffer.push(0);
- }
-
- if (bit) {
- this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
- }
-
- this.length++;
- }
- };
-
- //---------------------------------------------------------------------
- // Support Chinese
- //---------------------------------------------------------------------
- function utf16To8(text) {
- var result = '';
- var c;
- for (var i = 0; i < text.length; i++) {
- c = text.charCodeAt(i);
- if (c >= 0x0001 && c <= 0x007F) {
- result += text.charAt(i);
- } else if (c > 0x07FF) {
- result += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
- result += String.fromCharCode(0x80 | c >> 6 & 0x3F);
- result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
- } else {
- result += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
- result += String.fromCharCode(0x80 | c >> 0 & 0x3F);
- }
- }
- return result;
- }
-
- uQRCode = {
-
- errorCorrectLevel: QRErrorCorrectLevel,
-
- defaults: {
- size: 354,
- margin: 0,
- backgroundColor: '#ffffff',
- foregroundColor: '#000000',
- fileType: 'png', // 'jpg', 'png'
- errorCorrectLevel: QRErrorCorrectLevel.H,
- typeNumber: -1
- },
-
- make: function(options) {
- return new Promise((reslove, reject) => {
- var defaultOptions = {
- canvasId: options.canvasId,
- componentInstance: options.componentInstance,
- text: options.text,
- size: this.defaults.size,
- margin: this.defaults.margin,
- backgroundColor: this.defaults.backgroundColor,
- foregroundColor: this.defaults.foregroundColor,
- fileType: this.defaults.fileType,
- errorCorrectLevel: this.defaults.errorCorrectLevel,
- typeNumber: this.defaults.typeNumber
- };
- if (options) {
- for (var i in options) {
- defaultOptions[i] = options[i];
- }
- }
- options = defaultOptions;
- if (!options.canvasId) {
- console.error('uQRCode: Please set canvasId!');
- return;
- }
-
- function createCanvas() {
- var qrcode = new QRCode(options.typeNumber, options.errorCorrectLevel);
- qrcode.addData(utf16To8(options.text));
- qrcode.make();
-
- var ctx = uni.createCanvasContext(options.canvasId, options.componentInstance);
- ctx.setFillStyle(options.backgroundColor);
- ctx.fillRect(0, 0, options.size, options.size);
-
- var tileW = (options.size - options.margin * 2) / qrcode.getModuleCount();
- var tileH = tileW;
-
- for (var row = 0; row < qrcode.getModuleCount(); row++) {
- for (var col = 0; col < qrcode.getModuleCount(); col++) {
- var style = qrcode.isDark(row, col) ? options.foregroundColor : options.backgroundColor;
- ctx.setFillStyle(style);
- var x = Math.round(col * tileW) + options.margin;
- var y = Math.round(row * tileH) + options.margin;
- var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
- var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
- ctx.fillRect(x, y, w, h);
- }
- }
-
- setTimeout(function() {
- ctx.draw(false, (function() {
- setTimeout(function() {
- uni.canvasToTempFilePath({
- canvasId: options.canvasId,
- fileType: options.fileType,
- width: options.size,
- height: options.size,
- destWidth: options.size,
- destHeight: options.size,
- success: function(res) {
- let resData; // 将统一为base64格式
- let tempFilePath = res.tempFilePath; // H5为base64,其他为相对路径
-
- // #ifdef H5
- resData = tempFilePath;
- options.success && options.success(resData);
- reslove(resData);
- // #endif
-
- // #ifdef APP-PLUS
- const path = plus.io.convertLocalFileSystemURL(tempFilePath) // 绝对路径
- let fileReader = new plus.io.FileReader();
- fileReader.readAsDataURL(path);
- fileReader.onloadend = res => {
- resData = res.target.result;
- options.success && options.success(resData);
- reslove(resData);
- };
- // #endif
-
- // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
- uni.getFileSystemManager().readFile({
- filePath: tempFilePath,
- encoding: 'base64',
- success: res => {
- resData = 'data:image/png;base64,' + res.data;
- options.success && options.success(resData);
- reslove(resData);
- }
- })
- // #endif
-
- // #ifndef H5 || APP-PLUS || MP-WEIXIN || MP-QQ || MP-TOUTIAO
- if (plus) {
- const path = plus.io.convertLocalFileSystemURL(tempFilePath) // 绝对路径
- let fileReader = new plus.io.FileReader();
- fileReader.readAsDataURL(path);
- fileReader.onloadend = res => {
- resData = res.target.result;
- options.success && options.success(resData);
- reslove(resData);
- };
- } else {
- uni.request({
- url: tempFilePath,
- method: 'GET',
- responseType: 'arraybuffer',
- success: res => {
- resData = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`; // 把arraybuffer转成base64
- options.success && options.success(resData);
- reslove(resData);
- }
- })
- }
- // #endif
- },
- fail: function(error) {
- options.fail && options.fail(error);
- reject(error);
- },
- complete: function(res) {
- options.complete && options.complete(res);
- }
- }, options.componentInstance);
- }, options.text.length + 100);
- })());
- }, 150);
- }
-
- createCanvas();
- });
- }
- }
-
-})()
-
-export default uQRCode
diff --git a/common/js/websocket.js b/common/js/websocket.js
index de6ffd8..a4138e0 100644
--- a/common/js/websocket.js
+++ b/common/js/websocket.js
@@ -1,231 +1,350 @@
-class webSocketUtils {
- constructor(url, time, params) {
- this.socketTask = null;
- this.is_open_socket = false; //避免重复连接
- this.url = url;
- this.params = params ? params : null; ////是否初始化请求
- this.connectNum = 1; // 重连次数
- //这个参数是防止重连失败之后onClose方法会重复执行reconnect方法,导致重连定时器出问题
- //连接并打开之后可重连,且只执行重连方法一次
- this.canReconnect = false; // 是否可以重连
- //心跳检测
- this.timeout = time ? time : 5000; //多少秒执行检测
- this.heartbeatInterval = null; //检测服务器端是否还活着
- this.reconnectTimeOut = null; //重连之后多久再次重连
- try {
-
- return this.connectSocketInit({
- data: this.params,
- type: 'connectSocketInit',
- });
- } catch (e) {
- // console.log('catch');
- this.reconnect();
- }
- }
- // 进入这个页面的时候创建websocket连接【整个页面随时使用】
- connectSocketInit(data) {
- let _this = this;
- this.data = data;
- // #ifdef MP-WEIXIN
- this.socketTask = uni.connectSocket({
- // #endif
- // #ifdef MP-ALIPAY
- my.connectSocket({
- // #endif
- url: this.url,
- success: (res) => {
- console.log('创建websocketc成功...');
- // uni.hideLoading();
- // 返回实例
- return this.socketTask;
- },
- fail: (res) => {
- }
- });
-
- // #ifdef MP-WEIXIN
- this.socketTask.onOpen((res) => {
- // #endif
- // #ifdef MP-ALIPAY
- my.onSocketOpen((res) => {
- // #endif
- uni.hideLoading()
- this.connectNum = 1;
- console.log('WebSocket连接正常!==',res);
- if (this.params) { //是否初始化请求
- this.send(this.params);
- }
- clearInterval(this.reconnectTimeOut);
- clearInterval(this.heartbeatInterval);
- this.is_open_socket = true;
- this.canReconnect = true;
- this.start();
- // 注:只有连接正常打开中 ,才能正常收到消息
- // #ifdef MP-WEIXIN
- this.socketTask.onMessage((e) => {
- // #endif
- // #ifdef MP-ALIPAY
- my.onSocketMessage((e)=>{
- // #endif
- // 字符串转json
- let res = JSON.parse(e.data);
- uni.$emit('message', res)
- // 普通socket信息处理 TODO
- });
- });
-
- // 监听连接失败,这里代码我注释掉的原因是因为如果服务器关闭后,和下面的onclose方法一起发起重连操作,这样会导致重复连接
- // #ifdef MP-WEIXIN
- uni.onSocketError((res) => {
- // #endif
- // #ifdef MP-ALIPAY
- my.onSocketError((res) => {
- // #endif
- console.log('网络断开,请检查!');
- this.socketTask = null;
- this.is_open_socket = false;
- // this.Close()
- this.canReconnect = true;
- clearInterval(this.heartbeatInterval);
- clearInterval(this.reconnectTimeOut);
- try {
- if (this.connectNum <= 10) {
- // uni.showLoading({
- // title: `网络连接失败,正尝试第${this.connectNum}次连接`,
- // mask: true
- // })
- uni.$emit('message', 1) //进行重连
- uni.showToast({
- title: `网络连接失败,正尝试第${this.connectNum}次连接`,
- icon: 'none',
- });
- this.reconnect();
- this.connectNum += 1;
- } else {
- // uni.$emit('connectError');
- uni.showToast({
- title: `网络连接失败,请检查网络!`,
- icon: 'none',
- });
- this.connectNum = 1;
- this.canReconnect = false;
- this.Close()
- setTimeout(res => {
- uni.switchTab({
- url: '/pages/index/index'
- })
- uni.hideLoading()
- }, 1000)
+import {
+ ref,
+ onMounted,
+ onBeforeUnmount
+} from 'vue';
+
+const useWebSocket = (options = {}) => {
+ const {
+ heartbeatInterval = 10000, //心跳是10秒一次
+ reconnectInterval = 3000, //重新连接间隔时间的一个参数
+ maxReconnectAttempts = 3, //最大重连接次数
+ initialReconnectInterval = 3000, // 初始重连间隔
+ initMessage,
+ initMessageRetryCount = 3, // 新增:初始化消息发送重试次数
+ initMessageRetryInterval = 2000, // 新增:初始化消息重试间隔
+ maxReconnectDuration = Infinity
+ } = options;
+
+ const autoReconnect = ref(true); //是否自动重新连接
+ const socketTask = ref(null);
+ const isConnected = ref(false); //表示是否已连接上。
+ const heartbeatTimer = ref(null); //心跳定时器
+ const reconnectTimer = ref(null); //重连定时器
+ const reconnectAttempts = ref(0); //重连的尝试次数
+ const isNetworkConnected = ref(true); //监听当前网络连接状态
+ const isManuallyClosed = ref(false); //是否是被手动关闭的
+ const receivedMessages = ref(); //储从 WebSocket 服务器接收到的消息
+ const initMessageSendAttempts = ref(0); //初始化连接多少次
+ const reconnectStartTime = ref(0); //新增:记录重连开始时间
+ const isPongReceived = ref(false)
+ const allowReconnect = ref(true); // 新增:控制是否允许重连
+ // 关闭现有连接并清理资源
+ const closeExistingConnection = () => {
+ if (socketTask.value) {
+ // 关闭 WebSocket 连接
+ socketTask.value.close({
+ success: () => {
+ console.log('WebSocket 连接已关闭');
+ },
+ fail: (err) => {
+ console.error('关闭 WebSocket 连接失败:', err);
}
- } catch (e) {
- //TODO handle the exception
- }
- });
- // 这里仅是事件监听【如果socket关闭了会执行】
- // #ifdef MP-WEIXIN
- this.socketTask.onClose(() => {
- // #endif
- // #ifdef MP-ALIPAY
- my.onSocketClose((res) => {
- // #endif
- console.log("socket关闭了")
- this.socketTask = null;
- clearInterval(this.heartbeatInterval);
- clearInterval(this.reconnectTimeOut);
- // #ifdef MP-ALIPAY
- // 支付宝小程序的ws连接问题,关闭连接时需关闭对于接受,防止关闭失败
- my.offSocketMessage();
- my.offSocketError();
- my.offSocketOpen();
- my.offSocketClose();
- // #endif
- this.is_open_socket = false;
- if (this.canReconnect) {
- this.reconnect();
- this.canReconnect = false;
- }
- });
- }
- // 主动关闭socket连接
- Close() {
- this.is_open_socket = true;
- this.canReconnect = false;
-
- // #ifdef MP-WEIXIN
- if (this.socketTask) {
- this.socketTask.close({
- success(res) {
- console.log('手动关闭成功');
- },
});
+
+ // 清除心跳定时器
+ clearInterval(heartbeatTimer.value);
+ heartbeatTimer.value = null;
+
+ // 清除重连定时器
+ clearTimeout(reconnectTimer.value);
+ reconnectTimer.value = null;
+
+ // 标记连接已断开
+ isConnected.value = false;
}
- // #endif
- // #ifdef MP-ALIPAY
- my.closeSocket({
- success(res) {
- console.log('手动关闭成功');
- // #ifdef MP-ALIPAY
- // 支付宝小程序的ws连接问题,关闭连接时需关闭对于接受,防止关闭失败
- my.offSocketMessage();
- my.offSocketError();
- my.offSocketOpen();
- my.offSocketClose();
- // #endif
-
+ };
+
+ // 连接 WebSocket
+ const connect = () => {
+ if (!isNetworkConnected.value) {
+ uni.showToast({
+ title: '网络未连接...',
+ icon: 'none'
+ })
+ setTimeout(() => {
+ uni.pro.switchTab('index/index')
+ }, 1000)
+ console.log('网络未连接,暂不尝试连接 WebSocket');
+ return;
+ }
+
+ // 关闭现有连接并清理资源
+ closeExistingConnection();
+
+ socketTask.value = uni.connectSocket({
+ url: uni.conf.baseUrlwws,
+ success: (res) => {
+ isConnected.value = true;
+ // 监听初始化成功在开启心跳
+ startHeartbeat();
},
- fail: (res) => {
- console.log('手动关闭失败==',res);
+ fail: () => {
+ console.error('WebSocket 连接失败,尝试重连');
+ if (autoReconnect.value && allowReconnect.value) {
+ handleReconnect();
+ }
}
});
- // #endif
- }
- //发送消息
- send(data) {
- // console.log("发送消息---------->", data);
- // 注:只有连接正常打开中 ,才能正常成功发送消息
-
- // #ifdef MP-WEIXIN
- if (this.socketTask) {
- this.socketTask.send({
+
+ if (socketTask.value) {
+ socketTask.value.onOpen(() => {
+ // 初始化 初始购物车
+ sendMessage(initMessage)
+ });
+ socketTask.value.onMessage((res) => {
+ receivedMessages.value = JSON.parse(res.data)
+ // receivedMessages.value.push(list);
+ if (receivedMessages.value == 'ok' || receivedMessages.value.operate_type == 'init') {
+ console.log('初始化正常,心跳响应正常');
+ // 清除重连定时器
+ clearTimeout(reconnectTimer.value);
+ allowReconnect.value = false
+ reconnectTimer.value = null;
+ }
+
+ });
+
+ socketTask.value.onClose((res) => {
+ console.log(res, 'WebSocket 连接已关闭,尝试重连');
+ isConnected.value = false;
+ clearInterval(heartbeatTimer.value); // 停止心跳定时器
+ clearTimeout(reconnectTimer.value); // 清除重连定时器
+ if (res.code == '1006' && !allowReconnect.value) {
+ uni.showToast({
+ title: '网络异常,请重新扫码',
+ icon: 'none'
+ });
+ autoReconnect.value = false;
+ setTimeout(() => {
+ uni.pro.switchTab('index/index');
+ }, 1000)
+ return false;
+ }
+ if (autoReconnect.value && !isManuallyClosed.value) {
+ handleReconnect();
+ }
+ });
+
+ socketTask.value.onError((err) => {
+ console.error('WebSocket 连接发生错误:', err);
+ isConnected.value = false;
+ clearInterval(heartbeatTimer.value);
+ if (autoReconnect.value && !isManuallyClosed.value) {
+ handleReconnect();
+ }
+ });
+ } else {
+ console.error('socketTask 未正确初始化');
+ }
+ };
+
+ // 启动心跳机制
+ const startHeartbeat = () => {
+ if (!isNetworkConnected.value) {
+ console.log('网络未连接,暂停心跳');
+ uni.showToast({
+ title: '网络未连接...',
+ icon: 'none'
+ });
+ setTimeout(() => {
+ uni.pro.switchTab('index/index');
+ }, 1000);
+ return;
+ }
+ heartbeatTimer.value = setInterval(() => {
+ if (isConnected.value) {
+ console.log('发送心跳消息');
+ isPongReceived.value = false; // 每次发送心跳消息前重置标记
+ socketTask.value.send({
+ data: JSON.stringify({
+ type: 'ping_interval',
+ set: 'shopping'
+ }),
+ success: () => {
+ console.log('心跳消息发送成功');
+ const pongTimer = setTimeout(() => {
+ if (!isPongReceived.value) {
+ console.error('心跳超时,未收到响应,尝试重连');
+ clearInterval(heartbeatTimer.value);
+ if (autoReconnect.value && reconnectAttempts.value <
+ maxReconnectAttempts && allowReconnect.value) {
+ handleReconnect();
+ } else {
+ console.error('重连次数达到上限,停止重连和心跳');
+ clearInterval(heartbeatTimer.value);
+ autoReconnect.value = false;
+ uni.pro.switchTab('index/index');
+ }
+ }
+ }, heartbeatInterval * 1.2);
+
+ const handlePong = (res) => {
+ try {
+ let data = JSON.parse(res.data);
+ if (data.operate_type == "init" || (data.msg === 'ok' &&
+ data.msg_id ==
+ 'ping_interval')) {
+ isPongReceived.value = true;
+ console.log('收到心跳响应,清除超时定时器');
+ clearTimeout(pongTimer);
+ }
+ } catch (error) {
+ console.error('解析心跳响应数据时出错:', error);
+ }
+ };
+ socketTask.value.onMessage(handlePong);
+ },
+ fail: () => {
+ console.error('心跳消息发送失败,尝试重连');
+ clearInterval(heartbeatTimer.value);
+ if (autoReconnect.value && reconnectAttempts.value <
+ maxReconnectAttempts && allowReconnect.value) {
+ handleReconnect();
+ } else {
+ console.error('重连次数达到上限,停止重连和心跳');
+ clearInterval(heartbeatTimer.value);
+ autoReconnect.value = false;
+ uni.pro.switchTab('index/index');
+ }
+ }
+ });
+ }
+ }, heartbeatInterval);
+ };
+
+
+ // 手动关闭连接
+ const closeSocket = () => {
+ isManuallyClosed.value = true;
+ closeExistingConnection();
+ };
+
+ // 发送消息
+ const sendMessage = async (data) => {
+ if (isConnected.value) {
+ await socketTask.value.send({
data: JSON.stringify(data),
- async success() {
- // console.log("消息发送成功");
+ success: () => {
+ // console.log('消息发送成功');
},
+ fail: () => {
+ // console.error('消息发送失败');
+ }
});
+ } else {
+ console.error('WebSocket 未连接,无法发送消息');
}
- // #endif
- // #ifdef MP-ALIPAY
- my.sendSocketMessage({
- data: JSON.stringify(data),
- success(res) {
- // console.log("消息发送成功");
+ };
+
+ // 处理重连逻辑
+ const handleReconnect = () => {
+ if (!isNetworkConnected.value) {
+ console.log('网络未连接,暂停重连');
+ return;
+ }
+ if (isManuallyClosed.value) {
+ console.log('手动关闭连接,不进行重连');
+ return;
+ }
+
+ if (!allowReconnect.value) {
+ console.log('重连功能已关闭,不进行重连');
+ return;
+ }
+
+ if (reconnectAttempts.value < maxReconnectAttempts) {
+ reconnectAttempts.value++;
+ const reconnectInterval = initialReconnectInterval * Math.pow(2, reconnectAttempts.value - 1);
+ const randomizedInterval = reconnectInterval + Math.floor(Math.random() * 1000);
+ uni.showLoading({
+ title: `正在努力连接..`,
+ mask: true
+ })
+ console.log(`尝试第 ${reconnectAttempts.value} 次重连,重连间隔: ${randomizedInterval}ms...`);
+
+ reconnectTimer.value = setTimeout(() => {
+ connect();
+ }, randomizedInterval);
+ } else {
+ console.error('重连次数达到上限,停止重连');
+ uni.showToast({
+ title: '重连次数达到上限,停止重连',
+ icon: 'none'
+ });
+ clearInterval(heartbeatTimer.value);
+ autoReconnect.value = false;
+ setTimeout(() => {
+ uni.hideLoading();
+ uni.pro.switchTab('index/index');
+ }, 1000)
+ }
+ };
+
+
+ // / 网络状态监听
+ const initNetworkListener = () => {
+ uni.getSystemInfo({
+ success: (res) => {
+ if (res.platform !== 'devtools') {
+ uni.onNetworkStatusChange((statusRes) => {
+ isNetworkConnected.value = statusRes.isConnected;
+ if (statusRes.isConnected && !isManuallyClosed.value) {
+ console.log('网络已连接,尝试重新连接 WebSocket');
+ if (!isConnected.value && autoReconnect.value) {
+ connect();
+ }
+ } else if (!statusRes.isConnected) {
+ console.log('网络已断开,暂停 WebSocket 操作');
+ clearInterval(heartbeatTimer.value);
+ clearTimeout(reconnectTimer.value);
+ if (socketTask.value) {
+ socketTask.value.close();
+ isConnected.value = false;
+ }
+ }
+ });
+ }
},
+ fail: (err) => {
+ console.error('获取系统信息失败:', err);
+ }
});
- // #endif
- }
- //开启心跳检测
- start(data) {
- // console.log('开启心跳检测', data)
- this.heartbeatInterval = setInterval(() => {
- this.send({
- data: '心跳检测',
- type: 'heartbeat',
- });
- }, this.timeout);
- }
- //重新连接
- reconnect() {
- //停止发送心跳
- clearInterval(this.heartbeatInterval);
- //如果不是人为关闭的话,进行重连
- if (!this.is_open_socket) {
- console.log('进行重连');
- this.canReconnect = true;
- this.reconnectTimeOut = setInterval(() => {
- this.connectSocketInit(this.data);
- }, this.timeout);
+
+ uni.getNetworkType({
+ success: (res) => {
+ isNetworkConnected.value = res.networkType !== 'none';
+ if (!isNetworkConnected.value) {
+ console.log('初始网络未连接,暂不尝试连接 WebSocket');
+ }
+ }
+ });
+ };
+
+ // 页面显示,尝试连接 WebSocket
+ const onShowconnect = () => {
+ if (autoReconnect.value) {
+ uni.showLoading({
+ title: `尝试再次连接`,
+ mask: true
+ })
+ connect();
}
}
-}
-module.exports = webSocketUtils;
\ No newline at end of file
+
+ onBeforeUnmount(() => {
+ closeSocket();
+ });
+
+ return {
+ isConnected,
+ sendMessage,
+ closeSocket,
+ receivedMessages,
+ closeExistingConnection,
+ onShowconnect,
+ initNetworkListener
+ };
+};
+
+export default useWebSocket;
\ No newline at end of file
diff --git a/components/CustomNavbar.vue b/components/CustomNavbar.vue
index ac43e8f..11e04ad 100644
--- a/components/CustomNavbar.vue
+++ b/components/CustomNavbar.vue
@@ -33,25 +33,32 @@
reactive,
watch,
onMounted,
- computed
+ computed,
+ toRefs,
+ watchEffect
} from 'vue';
const store = useNavbarStore();
const {
showBack,
rightText,
+ showSearch,
+ title,
isTransparent,
height,
- hasPlaceholder
- } = store;
- const showSearch = computed(() => store.showSearch);
- const title = computed(() => store.title);
+ hasPlaceholder,
+ scrollTop
+ } = toRefs(store);
+
const keyword = ref()
const goBack = () => {
- uni.navigateBack({
- delta: 1
- });
+ try {
+ uni.pro.switchTab('index/index')
+ } catch (error) {
+ uni.pro.switchTab('index/index')
+ //TODO handle the exception
+ }
};
const onRightTextClick = () => {
@@ -60,7 +67,7 @@
const navbarStyle = computed(() => {
return {
- height: `${height}px`,
+ // height: `${height}px`,store.showSearch=fa
backgroundColor: store.scrollTop >= 44 ? '#fff' : 'transparent'
};
});
@@ -69,22 +76,28 @@
oneStyle: {},
towStyle: {}
});
+
+ watchEffect(() => {
+ if (store.showSearch > 44) {
+
+ }
+ })
onMounted(() => {
- // #ifdef MP-WEIXIN
+ // #ifdef MP-WEIXIN || MP-ALIPAY
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
const systemInfo = uni.getSystemInfoSync();
const statusBarHeight = systemInfo.statusBarHeight;
- console.log(menuButtonInfo)
// 计算标题的垂直偏移量
+ const verticalOffset = menuButtonInfo.top;
// const verticalOffset = menuButtonInfo.top - statusBarHeight;
- const verticalOffset = menuButtonInfo.top > menuButtonInfo.height ? menuButtonInfo.height : Math.abs(
- menuButtonInfo.top - menuButtonInfo.height)
+ // const verticalOffset = menuButtonInfo.top > menuButtonInfo.height ? menuButtonInfo.height : Math.abs(
+ // menuButtonInfo.top - menuButtonInfo.height)
const titleHeight = menuButtonInfo.height;
centerContentStyle.oneStyle = {
paddingTop: `${verticalOffset}px`,
paddingRight: `${menuButtonInfo.width +20}px`,
// paddingTeft: `${menuButtonInfo.width +20}px`,
- height: `${height}px`,
+ // height: `${height}px`,
boxSizing: 'border-box',
};
centerContentStyle.towStyle = {
diff --git a/components/Loading.vue b/components/Loading.vue
new file mode 100644
index 0000000..c788fe2
--- /dev/null
+++ b/components/Loading.vue
@@ -0,0 +1,83 @@
+
+
+
+
+ 努力加载中...
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/indexnav.vue b/components/indexnav.vue
index 9b5fe3a..b997475 100644
--- a/components/indexnav.vue
+++ b/components/indexnav.vue
@@ -29,16 +29,16 @@
+
+
\ No newline at end of file
diff --git a/components/paymentMethod.vue b/components/paymentMethod.vue
new file mode 100644
index 0000000..b766881
--- /dev/null
+++ b/components/paymentMethod.vue
@@ -0,0 +1,228 @@
+
+
+
+
+ 支付方式
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ 会员卡余额¥{{orderVIP?orderVIP.amount:0}}
+ {{orderVIP.isVip == 0?'注册会员':'去充值'}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/framework/0-conf.js b/framework/0-conf.js
index 195733c..2c4a371 100644
--- a/framework/0-conf.js
+++ b/framework/0-conf.js
@@ -1,31 +1,28 @@
-const debug = process.env.NODE_ENV == 'development' ? true : false;
+// const debug = process.env.NODE_ENV == 'development' ? true : false;
+const debug = false
// #ifdef H5
const proxyApi = "/api"
// #endif
+
// #ifdef MP-WEIXIN || APP || MP-ALIPAY
-// const proxyApi = 'http://192.168.1.15:9888/cashierService' // 王伟
-// const proxyApi = 'http://192.168.1.27:9888/cashierService' // 帆哥
-// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
-// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
-// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
-// const proxyApi = 'https://pre-cashier.sxczgkj.cn/cashierService' // 预发布
-// const proxyApiwws = 'wss://pre-cashier.sxczgkj.cn/netty' // 预发布
-const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上
-const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上
+const proxyApi = 'http://192.168.1.31' // 调试地址
+const proxyApiwws = 'ws://192.168.1.31:2348' // 调试地址
+// 测试
+// const proxyApi = "https://fv901fw8033.vicp.fun"
+// const proxyApiwws = 'wss://sockets.sxczgkj.com/wss'
// #endif
+
// #ifdef H5
-const baseUrl = debug ? proxyApi + '/cashierService' : "https://cashier.sxczgkj.cn/cashierService"
-const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService'
+const baseUrl = debug ? proxyApi : "https://tapi.cashier.sxczgkj.cn"
+const baseUrlwws = 'wss://sockets.sxczgkj.com/wss'
// #endif
// #ifdef APP || MP-WEIXIN || MP-ALIPAY
-const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.cn/cashierService' // 线上
-const baseUrlwws = debug ? proxyApiwws : 'wss://cashier.sxczgkj.cn/netty' // 线上
-
-// const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
-// const baseUrlwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
+const baseUrl = debug ? proxyApi : 'https://cashier.sxczgkj.com' // 线上
+const baseUrlwws = debug ? proxyApiwws : 'wss://czgeatws.sxczgkj.com/wss' // 线上
// #endif
+
// import VConsole from "./vConsole.js"
// if (debug) {
// new VConsole()
diff --git a/framework/8-cache.js b/framework/8-cache.js
index 591f927..ffb7c77 100644
--- a/framework/8-cache.js
+++ b/framework/8-cache.js
@@ -7,33 +7,32 @@
function get(key) {
try {
let res = uni.getStorageSync(key)
-
if (!res) {
return ''
}
- // res = JSON.parse(res)
- if (res.__expiretime && res.__expiretime < uni.utils.timestamp()) {
+
+
+ if (res.expiretime && res.expiretime < Date.now()) {
remove(key)
return ''
} else {
- try {
- const parsed = JSON.parse(res);
- C
- } catch (e) {
- return res
- }
- // // #ifdef H5
- // try {
- // const parsed = JSON.parse(res);
- // return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed) ? parsed : ''
- // } catch (e) {
- // return res
- // }
- // // #endif
- // // #ifndef H5
- // return res
- // // #endif
+ // #ifdef APP-PLUS
+ return res.value
+ // #endif
+ // #ifdef H5
+ res = JSON.parse(res)
+ return res.value
+ // #endif
+ // #ifdef MP-WEIXIN
+ return res.value
+ // #endif
+ // #ifdef MP-ALIPAY
+ return res.value
+ // #endif
+
+
+
}
} catch (e) {
return ''
@@ -73,19 +72,13 @@ function getStorageData(key) {
*/
function set(key, value, expire = uni.conf.default_expire) {
let cacheItem = {}
- cacheItem = value
+ cacheItem.value = value
// console.log(cacheItem)
- // if (expire > 0) {
- // cacheItem.__expiretime = uni.utils.timestamp() + expire
- // }
- // // #ifdef H5
- // uni.setStorageSync(key, JSON.stringify(cacheItem))
- // // #endif
- // // #ifndef H5
- // uni.setStorageSync(key, cacheItem)
- // // #endif
- uni.setStorageSync(key, JSON.stringify(cacheItem))
- // uni.setStorageSync(key, cacheItem)
+ if (expire > 0) {
+ cacheItem.expiretime = Date.now() + expire * 60 * 1000;
+ }
+ // uni.setStorageSync(key,JSON.stringify(cacheItem))
+ uni.setStorageSync(key, cacheItem)
}
/**
@@ -156,7 +149,7 @@ function _removeExpired(key) {
}
res = JSON.parse(res)
- if (res.__expiretime && res.__expiretime < uni.utils.timestamp()) {
+ if (res.expiretime && res.expiretime < uni.utils.timestamp()) {
remove(key)
}
}
diff --git a/package-lock.json b/package-lock.json
index f8de150..7f4d7cb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,18 +1,1810 @@
{
- "name": "wepp",
+ "name": "cashier_wx",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
- "dayjs": "^1.11.13"
+ "dayjs": "^1.11.13",
+ "pinia": "^2.3.1",
+ "pinia-plugin-persistedstate": "^4.2.0"
}
},
+ "node_modules/@ampproject/remapping": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.3.0.tgz",
+ "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.26.2",
+ "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.26.2.tgz",
+ "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.25.9",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "license": "MIT"
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.26.8",
+ "resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.26.8.tgz",
+ "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.26.9.tgz",
+ "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==",
+ "license": "MIT",
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.26.2",
+ "@babel/generator": "^7.26.9",
+ "@babel/helper-compilation-targets": "^7.26.5",
+ "@babel/helper-module-transforms": "^7.26.0",
+ "@babel/helpers": "^7.26.9",
+ "@babel/parser": "^7.26.9",
+ "@babel/template": "^7.26.9",
+ "@babel/traverse": "^7.26.9",
+ "@babel/types": "^7.26.9",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/core/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.26.9.tgz",
+ "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.26.9",
+ "@babel/types": "^7.26.9",
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.25",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.26.5",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz",
+ "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.26.5",
+ "@babel/helper-validator-option": "^7.25.9",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz",
+ "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.25.9",
+ "@babel/types": "^7.25.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.26.0",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz",
+ "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.25.9",
+ "@babel/helper-validator-identifier": "^7.25.9",
+ "@babel/traverse": "^7.25.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
+ "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
+ "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.25.9",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz",
+ "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.26.9.tgz",
+ "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.26.9",
+ "@babel/types": "^7.26.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.9.tgz",
+ "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.26.9"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/standalone": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/standalone/-/standalone-7.26.9.tgz",
+ "integrity": "sha512-UTeQKy0kzJwWRe55kT1uK4G9H6D0lS6G4207hCU/bDaOhA5t2aC0qHN6GmID0Axv3OFLNXm27NdqcWp+BXcGtA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.26.9.tgz",
+ "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.26.2",
+ "@babel/parser": "^7.26.9",
+ "@babel/types": "^7.26.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.26.9.tgz",
+ "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.26.2",
+ "@babel/generator": "^7.26.9",
+ "@babel/parser": "^7.26.9",
+ "@babel/template": "^7.26.9",
+ "@babel/types": "^7.26.9",
+ "debug": "^4.3.1",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.26.9",
+ "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.26.9.tgz",
+ "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.25.9",
+ "@babel/helper-validator-identifier": "^7.25.9"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
+ "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/set-array": "^1.2.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz",
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.25",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nuxt/kit": {
+ "version": "3.15.4",
+ "resolved": "https://registry.npmmirror.com/@nuxt/kit/-/kit-3.15.4.tgz",
+ "integrity": "sha512-dr7I7eZOoRLl4uxdxeL2dQsH0OrbEiVPIyBHnBpA4co24CBnoJoF+JINuP9l3PAM3IhUzc5JIVq3/YY3lEc3Hw==",
+ "license": "MIT",
+ "dependencies": {
+ "c12": "^2.0.1",
+ "consola": "^3.4.0",
+ "defu": "^6.1.4",
+ "destr": "^2.0.3",
+ "globby": "^14.0.2",
+ "ignore": "^7.0.3",
+ "jiti": "^2.4.2",
+ "klona": "^2.0.6",
+ "knitwork": "^1.2.0",
+ "mlly": "^1.7.4",
+ "ohash": "^1.1.4",
+ "pathe": "^2.0.2",
+ "pkg-types": "^1.3.1",
+ "scule": "^1.3.0",
+ "semver": "^7.6.3",
+ "std-env": "^3.8.0",
+ "ufo": "^1.5.4",
+ "unctx": "^2.4.1",
+ "unimport": "^4.0.0",
+ "untyped": "^1.5.2"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ }
+ },
+ "node_modules/@sindresorhus/merge-streams": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmmirror.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz",
+ "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.6.tgz",
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
+ "license": "MIT"
+ },
+ "node_modules/@vue/compiler-core": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
+ "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.25.3",
+ "@vue/shared": "3.5.13",
+ "entities": "^4.5.0",
+ "estree-walker": "^2.0.2",
+ "source-map-js": "^1.2.0"
+ }
+ },
+ "node_modules/@vue/compiler-core/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@vue/compiler-dom": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
+ "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-core": "3.5.13",
+ "@vue/shared": "3.5.13"
+ }
+ },
+ "node_modules/@vue/compiler-sfc": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
+ "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/parser": "^7.25.3",
+ "@vue/compiler-core": "3.5.13",
+ "@vue/compiler-dom": "3.5.13",
+ "@vue/compiler-ssr": "3.5.13",
+ "@vue/shared": "3.5.13",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.11",
+ "postcss": "^8.4.48",
+ "source-map-js": "^1.2.0"
+ }
+ },
+ "node_modules/@vue/compiler-sfc/node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@vue/compiler-ssr": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
+ "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.5.13",
+ "@vue/shared": "3.5.13"
+ }
+ },
+ "node_modules/@vue/devtools-api": {
+ "version": "6.6.4",
+ "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
+ "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==",
+ "license": "MIT"
+ },
+ "node_modules/@vue/reactivity": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.13.tgz",
+ "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/shared": "3.5.13"
+ }
+ },
+ "node_modules/@vue/runtime-core": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.13.tgz",
+ "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/reactivity": "3.5.13",
+ "@vue/shared": "3.5.13"
+ }
+ },
+ "node_modules/@vue/runtime-dom": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz",
+ "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/reactivity": "3.5.13",
+ "@vue/runtime-core": "3.5.13",
+ "@vue/shared": "3.5.13",
+ "csstype": "^3.1.3"
+ }
+ },
+ "node_modules/@vue/server-renderer": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.13.tgz",
+ "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-ssr": "3.5.13",
+ "@vue/shared": "3.5.13"
+ },
+ "peerDependencies": {
+ "vue": "3.5.13"
+ }
+ },
+ "node_modules/@vue/shared": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz",
+ "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/acorn": {
+ "version": "8.14.1",
+ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz",
+ "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz",
+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.24.4",
+ "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.4.tgz",
+ "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001688",
+ "electron-to-chromium": "^1.5.73",
+ "node-releases": "^2.0.19",
+ "update-browserslist-db": "^1.1.1"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/c12": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmmirror.com/c12/-/c12-2.0.4.tgz",
+ "integrity": "sha512-3DbbhnFt0fKJHxU4tEUPmD1ahWE4PWPMomqfYsTJdrhpmEnRKJi3qSC4rO5U6E6zN1+pjBY7+z8fUmNRMaVKLw==",
+ "license": "MIT",
+ "dependencies": {
+ "chokidar": "^4.0.3",
+ "confbox": "^0.1.8",
+ "defu": "^6.1.4",
+ "dotenv": "^16.4.7",
+ "giget": "^1.2.4",
+ "jiti": "^2.4.2",
+ "mlly": "^1.7.4",
+ "ohash": "^2.0.4",
+ "pathe": "^2.0.3",
+ "perfect-debounce": "^1.0.0",
+ "pkg-types": "^1.3.1",
+ "rc9": "^2.1.2"
+ },
+ "peerDependencies": {
+ "magicast": "^0.3.5"
+ },
+ "peerDependenciesMeta": {
+ "magicast": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/c12/node_modules/ohash": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmmirror.com/ohash/-/ohash-2.0.11.tgz",
+ "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==",
+ "license": "MIT"
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001702",
+ "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001702.tgz",
+ "integrity": "sha512-LoPe/D7zioC0REI5W73PeR1e1MLCipRGq/VkovJnd6Df+QVqT+vT33OXCp8QUd7kA7RZrHWxb1B36OQKI/0gOA==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/chokidar": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-4.0.3.tgz",
+ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
+ "license": "MIT",
+ "dependencies": {
+ "readdirp": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 14.16.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/citty": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmmirror.com/citty/-/citty-0.1.6.tgz",
+ "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==",
+ "license": "MIT",
+ "dependencies": {
+ "consola": "^3.2.3"
+ }
+ },
+ "node_modules/confbox": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.1.8.tgz",
+ "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
+ "license": "MIT"
+ },
+ "node_modules/consola": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmmirror.com/consola/-/consola-3.4.0.tgz",
+ "integrity": "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.18.0 || >=16.10.0"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "license": "MIT"
+ },
+ "node_modules/csstype": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz",
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-pick-omit": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/deep-pick-omit/-/deep-pick-omit-1.2.1.tgz",
+ "integrity": "sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw==",
+ "license": "MIT"
+ },
+ "node_modules/defu": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmmirror.com/defu/-/defu-6.1.4.tgz",
+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
+ "license": "MIT"
+ },
+ "node_modules/destr": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/destr/-/destr-2.0.3.tgz",
+ "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==",
+ "license": "MIT"
+ },
+ "node_modules/dotenv": {
+ "version": "16.4.7",
+ "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.4.7.tgz",
+ "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.112",
+ "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.112.tgz",
+ "integrity": "sha512-oen93kVyqSb3l+ziUgzIOlWt/oOuy4zRmpwestMn4rhFWAoFJeFuCVte9F2fASjeZZo7l/Cif9TiyrdW4CwEMA==",
+ "license": "ISC"
+ },
+ "node_modules/entities": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
+ "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ }
+ },
+ "node_modules/exsolve": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/exsolve/-/exsolve-1.0.2.tgz",
+ "integrity": "sha512-ZEcIMbthn2zeX4/wD/DLxDUjuCltHXT8Htvm/JFlTkdYgWh2+HGppgwwNUnIVxzxP7yJOPtuBAec0dLx6lVY8w==",
+ "license": "MIT"
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.19.1",
+ "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.19.1.tgz",
+ "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz",
+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "license": "ISC",
+ "dependencies": {
+ "minipass": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/fs-minipass/node_modules/minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/giget": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmmirror.com/giget/-/giget-1.2.5.tgz",
+ "integrity": "sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==",
+ "license": "MIT",
+ "dependencies": {
+ "citty": "^0.1.6",
+ "consola": "^3.4.0",
+ "defu": "^6.1.4",
+ "node-fetch-native": "^1.6.6",
+ "nypm": "^0.5.4",
+ "pathe": "^2.0.3",
+ "tar": "^6.2.1"
+ },
+ "bin": {
+ "giget": "dist/cli.mjs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/globals": {
+ "version": "11.12.0",
+ "resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz",
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/globby": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmmirror.com/globby/-/globby-14.1.0.tgz",
+ "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==",
+ "license": "MIT",
+ "dependencies": {
+ "@sindresorhus/merge-streams": "^2.1.0",
+ "fast-glob": "^3.3.3",
+ "ignore": "^7.0.3",
+ "path-type": "^6.0.0",
+ "slash": "^5.1.0",
+ "unicorn-magic": "^0.3.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmmirror.com/ignore/-/ignore-7.0.3.tgz",
+ "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.4.2.tgz",
+ "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==",
+ "license": "MIT",
+ "bin": {
+ "jiti": "lib/jiti-cli.mjs"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-9.0.1.tgz",
+ "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",
+ "license": "MIT"
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-3.1.0.tgz",
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/klona": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmmirror.com/klona/-/klona-2.0.6.tgz",
+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/knitwork": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/knitwork/-/knitwork-1.2.0.tgz",
+ "integrity": "sha512-xYSH7AvuQ6nXkq42x0v5S8/Iry+cfulBz/DJQzhIyESdLD7425jXsPy4vn5cCXU+HhRN2kVw51Vd1K6/By4BQg==",
+ "license": "MIT"
+ },
+ "node_modules/local-pkg": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-1.1.1.tgz",
+ "integrity": "sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==",
+ "license": "MIT",
+ "dependencies": {
+ "mlly": "^1.7.4",
+ "pkg-types": "^2.0.1",
+ "quansync": "^0.2.8"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/local-pkg/node_modules/confbox": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.1.tgz",
+ "integrity": "sha512-hkT3yDPFbs95mNCy1+7qNKC6Pro+/ibzYxtM2iqEigpf0sVw+bg4Zh9/snjsBcf990vfIsg5+1U7VyiyBb3etg==",
+ "license": "MIT"
+ },
+ "node_modules/local-pkg/node_modules/pkg-types": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-2.1.0.tgz",
+ "integrity": "sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==",
+ "license": "MIT",
+ "dependencies": {
+ "confbox": "^0.2.1",
+ "exsolve": "^1.0.1",
+ "pathe": "^2.0.3"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lru-cache/node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "license": "ISC"
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.17",
+ "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz",
+ "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz",
+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/minipass": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz",
+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/minizlib": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-2.1.2.tgz",
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
+ "license": "MIT",
+ "dependencies": {
+ "minipass": "^3.0.0",
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/minizlib/node_modules/minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "license": "MIT",
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/mlly": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmmirror.com/mlly/-/mlly-1.7.4.tgz",
+ "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.14.0",
+ "pathe": "^2.0.1",
+ "pkg-types": "^1.3.0",
+ "ufo": "^1.5.4"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.8",
+ "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz",
+ "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/node-fetch-native": {
+ "version": "1.6.6",
+ "resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.6.tgz",
+ "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==",
+ "license": "MIT"
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz",
+ "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
+ "license": "MIT"
+ },
+ "node_modules/nypm": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmmirror.com/nypm/-/nypm-0.5.4.tgz",
+ "integrity": "sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==",
+ "license": "MIT",
+ "dependencies": {
+ "citty": "^0.1.6",
+ "consola": "^3.4.0",
+ "pathe": "^2.0.3",
+ "pkg-types": "^1.3.1",
+ "tinyexec": "^0.3.2",
+ "ufo": "^1.5.4"
+ },
+ "bin": {
+ "nypm": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": "^14.16.0 || >=16.10.0"
+ }
+ },
+ "node_modules/ohash": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmmirror.com/ohash/-/ohash-1.1.6.tgz",
+ "integrity": "sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==",
+ "license": "MIT"
+ },
+ "node_modules/path-type": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmmirror.com/path-type/-/path-type-6.0.0.tgz",
+ "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "license": "MIT"
+ },
+ "node_modules/perfect-debounce": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/perfect-debounce/-/perfect-debounce-1.0.0.tgz",
+ "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==",
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pinia": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.3.1.tgz",
+ "integrity": "sha512-khUlZSwt9xXCaTbbxFYBKDc/bWAGWJjOgvxETwkTN7KRm66EeT1ZdZj6i2ceh9sP2Pzqsbc704r2yngBrxBVug==",
+ "license": "MIT",
+ "dependencies": {
+ "@vue/devtools-api": "^6.6.3",
+ "vue-demi": "^0.14.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/posva"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.4.4",
+ "vue": "^2.7.0 || ^3.5.11"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pinia-plugin-persistedstate": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmmirror.com/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.2.0.tgz",
+ "integrity": "sha512-3buhA7ac+ssbOIx3VRCC8oHkoFwhDM9oHRCjo7nj+O8WUqnW+jRqh7eYT5eS/DNa3H28zp3dYf/nd/Vc8zj8eQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@nuxt/kit": "^3.14.1592",
+ "deep-pick-omit": "^1.2.1",
+ "defu": "^6.1.4",
+ "destr": "^2.0.3"
+ },
+ "peerDependencies": {
+ "@pinia/nuxt": ">=0.9.0",
+ "pinia": ">=2.3.0"
+ },
+ "peerDependenciesMeta": {
+ "@pinia/nuxt": {
+ "optional": true
+ },
+ "pinia": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pkg-types": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.3.1.tgz",
+ "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==",
+ "license": "MIT",
+ "dependencies": {
+ "confbox": "^0.1.8",
+ "mlly": "^1.7.4",
+ "pathe": "^2.0.1"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.3",
+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz",
+ "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "nanoid": "^3.3.8",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/quansync": {
+ "version": "0.2.8",
+ "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz",
+ "integrity": "sha512-4+saucphJMazjt7iOM27mbFCk+D9dd/zmgMDCzRZ8MEoBfYp7lAvoN38et/phRQF6wOPMy/OROBGgoWeSKyluA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/antfu"
+ },
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/sxzz"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/rc9": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmmirror.com/rc9/-/rc9-2.1.2.tgz",
+ "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==",
+ "license": "MIT",
+ "dependencies": {
+ "defu": "^6.1.4",
+ "destr": "^2.0.3"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-4.1.2.tgz",
+ "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 14.18.0"
+ },
+ "funding": {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz",
+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/scule": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
+ "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/slash": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmmirror.com/slash/-/slash-5.1.0.tgz",
+ "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "license": "BSD-3-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/std-env": {
+ "version": "3.8.1",
+ "resolved": "https://registry.npmmirror.com/std-env/-/std-env-3.8.1.tgz",
+ "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==",
+ "license": "MIT"
+ },
+ "node_modules/strip-literal": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/strip-literal/-/strip-literal-3.0.0.tgz",
+ "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==",
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^9.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/tar": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmmirror.com/tar/-/tar-6.2.1.tgz",
+ "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
+ "license": "ISC",
+ "dependencies": {
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^5.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/tinyexec": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz",
+ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",
+ "license": "MIT"
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.12",
+ "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.12.tgz",
+ "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==",
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.4.3",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyglobby/node_modules/fdir": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.4.3.tgz",
+ "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/ufo": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz",
+ "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==",
+ "license": "MIT"
+ },
+ "node_modules/unctx": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmmirror.com/unctx/-/unctx-2.4.1.tgz",
+ "integrity": "sha512-AbaYw0Nm4mK4qjhns67C+kgxR2YWiwlDBPzxrN8h8C6VtAdCgditAY5Dezu3IJy4XVqAnbrXt9oQJvsn3fyozg==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.14.0",
+ "estree-walker": "^3.0.3",
+ "magic-string": "^0.30.17",
+ "unplugin": "^2.1.0"
+ }
+ },
+ "node_modules/unicorn-magic": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
+ "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/unimport": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmmirror.com/unimport/-/unimport-4.1.2.tgz",
+ "integrity": "sha512-oVUL7PSlyVV3QRhsdcyYEMaDX8HJyS/CnUonEJTYA3//bWO+o/4gG8F7auGWWWkrrxBQBYOO8DKe+C53ktpRXw==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.14.0",
+ "escape-string-regexp": "^5.0.0",
+ "estree-walker": "^3.0.3",
+ "local-pkg": "^1.0.0",
+ "magic-string": "^0.30.17",
+ "mlly": "^1.7.4",
+ "pathe": "^2.0.3",
+ "picomatch": "^4.0.2",
+ "pkg-types": "^1.3.1",
+ "scule": "^1.3.0",
+ "strip-literal": "^3.0.0",
+ "tinyglobby": "^0.2.11",
+ "unplugin": "^2.2.0",
+ "unplugin-utils": "^0.2.4"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ }
+ },
+ "node_modules/unimport/node_modules/picomatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/unplugin": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmmirror.com/unplugin/-/unplugin-2.2.0.tgz",
+ "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==",
+ "license": "MIT",
+ "dependencies": {
+ "acorn": "^8.14.0",
+ "webpack-virtual-modules": "^0.6.2"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ }
+ },
+ "node_modules/unplugin-utils": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmmirror.com/unplugin-utils/-/unplugin-utils-0.2.4.tgz",
+ "integrity": "sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==",
+ "license": "MIT",
+ "dependencies": {
+ "pathe": "^2.0.2",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sxzz"
+ }
+ },
+ "node_modules/unplugin-utils/node_modules/picomatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/untyped": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmmirror.com/untyped/-/untyped-1.5.2.tgz",
+ "integrity": "sha512-eL/8PlhLcMmlMDtNPKhyyz9kEBDS3Uk4yMu/ewlkT2WFbtzScjHWPJLdQLmaGPUKjXzwe9MumOtOgc4Fro96Kg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.26.0",
+ "@babel/standalone": "^7.26.4",
+ "@babel/types": "^7.26.3",
+ "citty": "^0.1.6",
+ "defu": "^6.1.4",
+ "jiti": "^2.4.1",
+ "knitwork": "^1.2.0",
+ "scule": "^1.3.0"
+ },
+ "bin": {
+ "untyped": "dist/cli.mjs"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
+ "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/vue": {
+ "version": "3.5.13",
+ "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
+ "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.5.13",
+ "@vue/compiler-sfc": "3.5.13",
+ "@vue/runtime-dom": "3.5.13",
+ "@vue/server-renderer": "3.5.13",
+ "@vue/shared": "3.5.13"
+ },
+ "peerDependencies": {
+ "typescript": "*"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vue-demi": {
+ "version": "0.14.10",
+ "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
+ "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "vue-demi-fix": "bin/vue-demi-fix.js",
+ "vue-demi-switch": "bin/vue-demi-switch.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.0.0-rc.1",
+ "vue": "^3.0.0-0 || ^2.6.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-virtual-modules": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
+ "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==",
+ "license": "MIT"
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "license": "ISC"
}
}
}
diff --git a/package.json b/package.json
index 59eca92..52b8f6c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,8 @@
{
"dependencies": {
+ "@dcloudio/uni-app": "^2.0.2-4040520250103001",
"dayjs": "^1.11.13",
+ "jsbarcode": "^3.11.6",
"pinia": "^2.3.1",
"pinia-plugin-persistedstate": "^4.2.0"
}
diff --git a/pages.json b/pages.json
index 158022d..bf4d013 100644
--- a/pages.json
+++ b/pages.json
@@ -12,14 +12,25 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
- "navigationStyle": "custom"
+ "navigationStyle": "custom",
+ "mp-alipay": {
+ "transparentTitle": "always",
+ "titlePenetrate": "YES",
+ "autoBackButton": false,
+ "allowsBounceVertical": "NO"
+ }
}
},
{
- "path": "pages/index/indexs",
+ "path": "pages/index/drinks",
"style": {
- "navigationBarTitleText": "",
- "navigationStyle": "custom"
+ "navigationBarTitleText": "咖啡饮品"
+ }
+ },
+ {
+ "path": "pages/index/freedaily",
+ "style": {
+ "navigationBarTitleText": "每日免单"
}
},
{
@@ -35,6 +46,7 @@
"navigationBarTitleText": "红包中心"
}
},
+
{
"path": "pages/product/index",
"style": {
@@ -42,6 +54,30 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/product/choosetable",
+ "style": {
+ "navigationBarTitleText": "选择人数"
+ }
+ },
+ {
+ "path": "pages/order/index",
+ "style": {
+ "navigationBarTitleText": "订单列表"
+ }
+ },
+ {
+ "path": "pages/order/detail",
+ "style": {
+ "navigationBarTitleText": "订单详情"
+ }
+ },
+ {
+ "path": "pages/order/coupon",
+ "style": {
+ "navigationBarTitleText": "优惠劵"
+ }
+ },
{
"path": "pages/user/user",
"style": {
@@ -54,6 +90,77 @@
"allowsBounceVertical": "NO"
}
}
+ },
+ {
+ "path": "pages/user/member/index",
+ "style": {
+ "navigationBarTitleText": "会员充值"
+ }
+ },
+ {
+ "path": "pages/user/member/list",
+ "style": {
+ "navigationBarTitleText": "会员列表"
+ }
+ },
+ {
+ "path": "pages/user/member/memberdetails",
+ "style": {
+ "navigationBarTitleText": "会员卡"
+ }
+ },
+ {
+ "path": "pages/user/member/paycode",
+ "style": {
+ "navigationBarTitleText": "会员支付码"
+ }
+ },
+ {
+ "path": "pages/user/member/billDetails",
+ "style": {
+ "navigationBarTitleText": "账单明细"
+ }
+ },
+ {
+ "path": "pages/user/member/qrcode",
+ "style": {
+ "navigationBarTitleText": "会员支付码"
+ }
+ }, {
+ "path": "pages/user/member/setPassword",
+ "style": {
+ "navigationBarTitleText": "密码设置"
+ }
+ },
+ {
+ "path": "pages/user/member/storedManage",
+ "style": {
+ "navigationBarTitleText": "会员管理"
+ }
+ },
+ {
+ "path": "pages/user/member/instructions",
+ "style": {
+ "navigationBarTitleText": "使用须知"
+ }
+ },
+ {
+ "path": "pages/user/myself",
+ "style": {
+ "navigationBarTitleText": "个人资料"
+ }
+ },
+ {
+ "path": "pages/user/coupon",
+ "style": {
+ "navigationBarTitleText": "优惠劵"
+ }
+ },
+ {
+ "path": "pages/subscribeto/index",
+ "style": {
+ "navigationBarTitleText": "叫号"
+ }
}
],
"uniIdRouter": {},
@@ -73,6 +180,11 @@
"selectedIconPath": "static/tabbar/1-1.png",
"pagePath": "pages/index/index",
"text": "首页"
+ }, {
+ "iconPath": "static/tabbar/2.png",
+ "selectedIconPath": "static/tabbar/2-1.png",
+ "pagePath": "pages/order/index",
+ "text": "订单列表"
},
{
"iconPath": "static/tabbar/4.png",
diff --git a/pages/index/components/advertisement.vue b/pages/index/components/advertisement.vue
index 0a7269a..31c7886 100644
--- a/pages/index/components/advertisement.vue
+++ b/pages/index/components/advertisement.vue
@@ -3,11 +3,12 @@
现有
{{bannervo.coupons==null?116:bannervo.coupons}}人
+
已免单
-
+
+
+
+
+
+
-
+
{{item.name}}已省{{item.money}}元钱
-
+
@@ -35,7 +43,9 @@
defineProps,
onBeforeUnmount,
reactive,
- defineExpose
+ defineExpose,
+ ref,
+ watch
} from 'vue';
const props = defineProps({
bannervo: {
@@ -51,6 +61,13 @@
}] //
}
});
+
+ const listData = ref()
+ const listdataNumber = ref(4)
+ watch(() => props.bannervo, (n, o) => {
+ listData.value = [...props.bannervo,...props.bannervo]
+ })
+
const slideNote = reactive({
x: 0,
y: 0
@@ -137,6 +154,11 @@
align-items: center;
justify-content: center;
+ .swiperstyle {
+ position: relative;
+ animation: animationName 5s linear infinite;
+ }
+
.onecontentrightimage {
width: 65rpx;
position: relative;
@@ -207,7 +229,7 @@
.onecontentrighttext {
width: 232rpx;
-
+margin-left: 20rpx;
.swiper {
height: 28rpx;
// width: 232rpx;
@@ -239,4 +261,16 @@
z-index: 9999;
}
}
+
+ @keyframes animationName {
+ 0% {
+ /* 动画开始时的样式 */
+ left: 0;
+ }
+
+ 100% {
+ /* 动画结束时的样式 */
+ left: -290rpx;
+ }
+ }
\ No newline at end of file
diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue
index 170e7ef..14242b3 100644
--- a/pages/index/components/diamond.vue
+++ b/pages/index/components/diamond.vue
@@ -1,10 +1,12 @@
-
-
- {{item.name}}
+
+
+
+ {{item.name}}
+
+
@@ -14,15 +16,12 @@
defineProps
} from 'vue';
import {
- APIproductqueryShop
- } from "@/common/api/product/product.js";
- import {
- Storelogin
- } from '@/stores/share.js';
+ productStore
+ } from '@/stores/user.js';
const props = defineProps({
district: Array
});
- const clickdistrict = (item) => {
+ const clickdistrict = async (item) => {
switch (item.jumpType) {
case 'absolute':
uni.pro.navigateTo('webview/webview', {
@@ -36,47 +35,13 @@
uni.pro.navigateTo(item.absUrl);
break;
case 'scan':
+ // #ifndef H5
if (!uni.utils.pluschooseImage()) {
return false
}
- // #ifdef APP || MP-WEIXIN || MP-ALIPAY
- uni.scanCode({
- success: async (res) => {
- let tableCode = getQueryString(decodeURIComponent(res.result), 'code')
- uni.cache.set('tableCode', tableCode)
- if (tableCode) {
- let data = await APIproductqueryShop({
- code: uni.cache.get('tableCode'),
- })
- // -4请求登录
- const store = Storelogin();
- if (data.code == '-4') {
- if (await store.actionslogin()) {
- // 成功
- } else {
- // 失败接着请求
- await store.actionslogin()
- }
- }
- if (data.data.shopTableInfo && !data.data.shopTableInfo.choseCount) {
- uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
- tableCode: tableCode,
- shopId: data.data.storeInfo.id,
- })
- } else {
- uni.pro.navigateTo('order_food/order_food', {
- tableCode: tableCode,
- })
- }
-
- }
- },
- fail: (res) => {
- console.log(res)
- }
- });
// #endif
-
+ const store = productStore();
+ await store.scanCodeactions()
break;
}
}
@@ -121,8 +86,8 @@
}
}
- .towcontent_item:nth-child(1) {
- margin-left: 0rpx;
- }
+ // .towcontent_item:nth-child(1) {
+ // margin-left: 0rpx;
+ // }
}
\ No newline at end of file
diff --git a/pages/index/components/todaylist.vue b/pages/index/components/todaylist.vue
index cf26cf2..3970cce 100644
--- a/pages/index/components/todaylist.vue
+++ b/pages/index/components/todaylist.vue
@@ -1,9 +1,9 @@
-
+
- {{todayList.name}}
+ {{todayList.name|| ''}}
@@ -13,14 +13,14 @@
-
-
+
{{item.productName.length>5?item.productName.substring(0,5)+'...':item.productName}}
+ style="margin-left: 0;">{{item.name.length>5?item.name.substring(0,5)+'...':item.name}}
@@ -42,7 +42,7 @@
style="background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/towcontent_box2.png) no-repeat; background-size: cover;"
@click="jrtoday(1)">
- {{salesList.name}}
+ {{salesList.name || ''}}
@@ -54,17 +54,17 @@
-
+
TOP.{{index + 1}}
- {{ item.productName.length>5?item.productName.substring(0,5)+'...':item.productName }}
+ {{ item.name.length>5?item.name.substring(0,5)+'...':item.name }}
- 已抢{{item.realSalesNumber}}份
+ 已抢{{item.saleNum}}份
¥{{item.salePrice}}
@@ -82,13 +82,20 @@
defineProps
} from 'vue';
const props = defineProps({
- salesList: Object,
+ salesList: {
+ type: Object,
+ default: {
+ name: '',
+ date: '',
+ hotList: [],
+ }
+ },
todayList: {
type: Object,
default: () => ({
- name:'',
- date:'',
- hotList:[]
+ name: '',
+ date: '',
+ hotList: []
}) //
},
});
diff --git a/pages/index/coupons/index.vue b/pages/index/coupons/index.vue
index 3c31449..840eccc 100644
--- a/pages/index/coupons/index.vue
+++ b/pages/index/coupons/index.vue
@@ -186,8 +186,8 @@
const ordergetYhqParass = async () => {
let res = await APIordergetYhqPara()
try {
- orderview.list = res.data
- for (let i = 0; i <= res.data.length; i++) {
+ orderview.list = res
+ for (let i = 0; i <= res.length; i++) {
orderfindCouponses(i, orderview.list[i].name);
}
} catch (e) {
@@ -202,7 +202,7 @@
size: 10,
type: name
})
- orderview.list[i].orderview.listdata = res.data.list
+ orderview.list[i].orderview.listdata = res.list
console.log(orderview.list)
}
const ordermineCouponsthis = async () => {
@@ -214,8 +214,8 @@
orderId: ''
})
try {
- viewlist.totalnumber = res.data.total
- viewlist.list = res.data.list.slice(0, 2)
+ viewlist.totalnumber = res.total
+ viewlist.list = res.list.slice(0, 2)
} catch (e) {
//TODO handle the exception
}
@@ -272,8 +272,8 @@
// async ordergetYhqParass() { //类型列表
// let res = await this.api.ordergetYhqPara()
// try {
- // this.orderview.list = res.data
- // for (let i = 0; i <= res.data.length; i++) {
+ // this.orderview.list = res
+ // for (let i = 0; i <= res.length; i++) {
// this.orderfindCouponses(i, this.orderview.list[i].name);
// }
// } catch (e) {
@@ -286,7 +286,7 @@
// size: 10,
// type: name
// })
- // this.orderview.list[i].orderview.listdata = res.data.list
+ // this.orderview.list[i].orderview.listdata = res.list
// console.log(this.orderview.list)
// this.$forceUpdate();
// },
@@ -299,8 +299,8 @@
// orderId: ''
// })
// try {
- // this.viewlist.totalnumber = res.data.total
- // this.viewlist.list = res.data.list.slice(0, 2)
+ // this.viewlist.totalnumber = res.total
+ // this.viewlist.list = res.list.slice(0, 2)
// } catch (e) {
// //TODO handle the exception
// }
diff --git a/pages/index/drinks.vue b/pages/index/drinks.vue
index 80a8b20..bc5058f 100644
--- a/pages/index/drinks.vue
+++ b/pages/index/drinks.vue
@@ -1,310 +1,173 @@
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
- {{item.shopName}}
-
-
- {{item.distances}}
+
+ {{ item.distance }}m
+
+
+
+
+
+
+ {{ item.name }}
+ 已抢{{ item.saleNum
+ }}份
+
+
+
+
+
+
+ 到手
+
+ ¥{{item.salePrice}}
+
+ {{item.discount}}折
+ ¥{{item.originPrice}}
-
-
-
- {{s.name}}
-
+
+ 马上抢
+
+
+
+
+ 共省{{item.originPrice-item.salePrice}}元
+
+
+
+
-
-
-
-
-
- {{item.productName.length>7?item.productName.substring(0,7)+'...':item.productName}}
- 已抢{{item.realSalesNumber}}份
-
-
-
-
- {{c.name}}
-
-
-
-
- 马上抢
-
-
-
- 到手
- ¥{{item.salePrice}}
-
-
- {{item.discount || ''}}折
-
-
- ¥{{item.originPrice}}
-
-
-
- 共省{{item.save}}元
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/pages/index/freedaily.vue b/pages/index/freedaily.vue
index 2cffa2c..0b6524c 100644
--- a/pages/index/freedaily.vue
+++ b/pages/index/freedaily.vue
@@ -1,7 +1,5 @@
-
-
@@ -16,19 +14,18 @@
-
- {{item.userName}}* 免单{{item.orderAmount}}元订单号:{{item.orderNo}}
+ {{ item.userName }}* 免单{{ item.orderAmount }}元订单号:{{ item.orderNo }}
-
- 订单数:{{total}}
+ 订单数:10
@@ -43,36 +40,19 @@
金额
-
+
- {{item.isRefund == true ? '已免单':'待免单'}}
+ {{ item.isRefund == true ? '已免单' : '待免单' }}
- {{item.orderNo}}
+ {{ item.orderNo }}
- {{item.orderAmount}}元
+ {{ item.orderAmount }}元
-
@@ -83,295 +63,266 @@
-
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6cfdfcd..83b3903 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -3,140 +3,130 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
- {{item.shopName}}
-
-
- {{item.districts}} {{item.distances}}
-
-
-
-
-
- {{s.name}}
-
-
-
-
-
-
-
-
-
-
- {{item.productName.length>7?item.productName.substring(0,7)+'...':item.productName}}
-
- 已抢{{item.realSalesNumber}}份
-
-
-
-
- {{c.name}}
-
-
-
-
- 马上抢
-
-
-
- 到手
- ¥{{item.salePrice}}
-
-
- {{item.discount || ''}}折
-
-
- ¥{{item.originPrice}}
-
-
-
- 共省{{item.save}}元
-
-
-
-
- {{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}
-
- :
-
- {{ timeData.minutes>10?timeData.minutes:'0'+timeData.minutes }}
-
- :
-
- {{ timeData.seconds>10?timeData.seconds:'0'+timeData.seconds }}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ -->
+
+
-
+
@@ -148,7 +138,8 @@
reactive,
onBeforeUnmount,
watch,
- getCurrentInstance
+ getCurrentInstance,
+ nextTick
} from "vue";
import {
onLoad,
@@ -171,14 +162,19 @@
import Nav from '@/components/indexnav.vue'; //导航栏
import {
APIhomehomePageUp,
- APIhome,
- APIshopUserInfo
+ APIhome
} from "@/common/api/index/index.js"
+ import {
+ APIgeocodelocation
+ } from "@/common/api/api.js"
import {
useNavbarStore
} from '@/stores/navbarStore';
+ import {
+ productStore
+ } from '@/stores/user.js';
const store = useNavbarStore();
- // 动态更新导航栏配置
+ const storeuser = productStore();
store.updateNavbarConfig({
showBack: true, //左边返回键
rightText: '', //右边文字
@@ -191,8 +187,8 @@
const showindex = ref('index')
//计算广告图片的重合尺寸是位移
const getStyle = (e) => {
- if (e > hometoplist.bannervo.counponsInfo.length / 2) {
- var right = hometoplist.bannervo.counponsInfo.length - e
+ if (e > hometoplist.freeBannerList.length / 2) {
+ var right = hometoplist.freeBannerList.length - e
return {
transform: 'scale(' + (1) + ') translate(-' + (right * 20) + '%,0px)',
zIndex: 9999 - right,
@@ -210,32 +206,36 @@
const refbannervo = ref(null);
//数据
const hometoplist = reactive({
- bannervo: {
- counponsInfo: [],
- coupons: ''
- }
+
})
// 首页上面数据
const hometop = async () => {
try {
let res = await APIhomehomePageUp()
- Object.assign(hometoplist, res.data)
- if (hometoplist.bannervo.counponsInfo) {
- hometoplist.bannervo.counponsInfo.forEach((item, index) => {
- advertisementStyle.value.push(getStyle(index))
- })
- }
+ Object.assign(hometoplist, res)
+ hometoplist.freeBannerList.forEach((item, index) => {
+ advertisementStyle.value.push(getStyle(index))
+ })
+ // 数据加载完后获取dom 高度
+ setTimeout(() => {
+ const query = uni.createSelectorQuery().select('#fourcontent');
+ query.boundingClientRect((rect) => {
+ elementTop.value = rect.top - store.height
+ }).exec();
+ }, 500)
} catch (e) {}
}
// 下面初始数据
const formhomelist = reactive({ //筛选
address: '', //地址
- type: '', //品类
- orderBy: '', //1.理我最近 2.销量优先 3.价格优先
- other: '', //附近1KM 1选中 0不选中
+ categoryId: '1', //品类
+ orderType: '1', //1.理我最近 2.销量优先 3.价格优先
+ distanceType: '1000', //附近1KM 1选中 0不选中
page: 1, //页数
size: 10, //页容量
- status: 'loadmore'
+ status: 'loadmore',
+ name: '1',
+ list: []
})
// 使用 reactive 创建响应式对象
const timeData = ref({});
@@ -244,12 +244,11 @@
const onChange = (e) => {
timeData.value = e;
};
- const homelist = ref([]) //接收数据
const onLoadhome = async () => {
try {
let res = await APIhome(formhomelist)
var dates = new Date().getTime();
- res.data.list.forEach((item, index) => {
+ res.records.forEach((item, index) => {
var leftTime = item.endTime - dates; //计算两日期之间相差的毫秒数
if (leftTime >= 0) {
let d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
@@ -266,36 +265,40 @@
item.end_times = 0
}
})
- if (res.data.pages < formhomelist.page) {
+ if ((res.totalPage == 0 || res.totalPage == 1) && res.totalRow <= 10) {
+ console.log(res)
formhomelist.status = 'nomore'
- if (form.page == 1 && res.data.list.length == 0) {
-
+ formhomelist.list = res.records
+ if (formhomelist.page == 1 && res.records.length == 0) {
+ formhomelist.list = []
}
return false;
} else {
formhomelist.status = 'loading';
+ if (formhomelist.page == 1) {
+ formhomelist.list = res.records
+ } else {
+ formhomelist.list = [...formhomelist.list, ...res.records];
+ }
formhomelist.page = ++formhomelist.page;
- setTimeout(() => {
- homelist.value = [...homelist.value, ...res.data.list];
+ if (formhomelist.page > res.totalPage) {
+ formhomelist.status = 'nomore';
+ } else {
formhomelist.status = 'loading';
- if (res.data.pageNum == res.data.pages) {
- formhomelist.status = 'nomore';
- } else {
- formhomelist.status = 'loading';
- }
- }, 500)
+ }
}
+
} catch (e) {}
}
// /筛选数据处理
const init_fn = async () => {
- homelist.value = []
+ formhomelist.list = []
Object.assign(formhomelist, {
address: uni.cache.get('getLocationstorage').address, //地址
lng: uni.cache.get('getLocationstorage').lng,
lat: uni.cache.get('getLocationstorage').lat,
type: '', //品类
- orderBy: 0, //1.理我最近 2.销量优先 3.价格优先
+ // orderBy: 0, //1.理我最近 2.销量优先 3.价格优先
other: '', //附近1KM 1选中 0不选中
page: 1, //页数
size: 10, //页容量
@@ -304,11 +307,15 @@
onLoadhome()
}
+ const orderVIP = ref({
+ shopExtendList:''
+ })
+
// 弹出层处理
const showproductlist = ref(false);
// 定义方法
const openproductlist = (e) => {
- hometoplist.menu[viewHistoryindex.value].name = e //下标更改name
+ hometoplist.menuList[viewHistoryindex.value].name = e //下标更改name
showproductlist.value = !showproductlist.value
}
@@ -328,7 +335,7 @@
}
// 是否有弹出层
if (item.isChild) {
- showproductlist.value = showproductlist.value ? viewHistoryindex.value == index ? false : true : !
+ showproductlist.value = showproductlist.value ? (viewHistoryindex.value == index ? false : true) : !
showproductlist.value
}
viewHistoryindex.value = index
@@ -338,32 +345,70 @@
isSticky.value = res.scrollTop > elementTop.value ? true : false
uni.$u.debounce(store.scrollTop = res.scrollTop, 500)
});
- onShow(() => {})
- onMounted(async () => {
- await proxy.$onLaunched;
- console.log(uni.cache.get('shopId'))
- if (uni.cache.get('shopId') && uni.cache.get('token')) {
- showindex.value = 'shopIndex'
- let res = await APIshopUserInfo({
- "shopId": uni.cache.get('shopId'),
- "userId": uni.getStorageSync('userInfo').id,
- })
- if (res.code == 0) {
- //商家信息
- uni.cache.set('shopUserInfo', res.data)
+ onShow(async () => {
+ try {
+ uni.getLocation({
+ type: 'wgs84',
+ success: async (res) => {
+ let successres = await APIgeocodelocation({
+ lng: res.longitude,
+ lat: res.latitude,
+ })
+ if (successres) {
+ let datastorage = {
+ country: successres.addressComponent.country, // "中国"
+ province: successres.addressComponent
+ .province, //province: "陕西省"
+ address: successres.addressComponent.city, //district: "西安市"
+ district: successres.addressComponent.district, //district: "未央区"
+ lng: res.longitude,
+ lat: res.latitude,
+ }
+ uni.cache.set('getLocationstorage', datastorage);
+ // 登录
+ proxy.$isResolve()
+ }
+ },
+
+ });
+ } catch (error) {
+ try {
+ let successres = await APIgeocodelocation({
+ lng: '',
+ lat: '',
+ })
+ if (successres) {
+ let datastorage = {
+ country: successres.addressComponent.country, // "中国"
+ province: successres.addressComponent
+ .province, //province: "陕西省"
+ address: successres.addressComponent.city, //district: "西安市"
+ district: successres.addressComponent.district, //district: "未央区"
+ lng: res.longitude,
+ lat: res.latitude,
+ }
+ uni.cache.set('getLocationstorage', datastorage);
+ proxy.$isResolve()
+ }
+ } catch (error) {
+
}
+ }
+ await proxy.$onLaunched;
+ if (uni.cache.get('shopId')) {
+ showindex.value = 'shopIndex'
+ await storeuser.actionsproductqueryProduct()
+ await nextTick()
+ orderVIP.value = uni.cache.get('orderVIP')
} else {
+ showindex.value = 'index'
hometop()
init_fn()
- showindex.value = 'index'
// 获取初始定位高度
- setTimeout(() => {
- const query = uni.createSelectorQuery().select('#fourcontent');
- query.boundingClientRect((rect) => {
- elementTop.value = rect.top - store.height
- }).exec();
- }, 500)
}
+ })
+ onMounted(async () => {
+
});
onReachBottom(() => {
@@ -383,16 +428,22 @@
background: #F9F9F9;
.fourcontent {
+ position: sticky;
padding: 32rpx 0;
overflow-x: auto;
flex-wrap: nowrap;
background: #f9f9f9;
- margin: 0 32rpx;
+ z-index: 99;
+ left: 0;
+
+ .flex-between {
+ margin: 0 32rpx;
+ }
.componentsclass {
margin-top: 32rpx;
left: 0;
- position: absolute;
+ position: relative;
width: 100%;
height: 100vh;
transition-duration: 350ms;
@@ -417,9 +468,9 @@
background: #fee06a;
}
- .fourcontent_item:nth-child(1) {
- margin-left: 0;
- }
+ // .fourcontent_item:nth-child(1) {
+ // margin-left: 0;
+ // }
}
diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue
index c42a535..00cb5c6 100644
--- a/pages/index/indexs.vue
+++ b/pages/index/indexs.vue
@@ -1,7 +1,7 @@
+ :style="'background:url('+(shopExtend?shopExtend[0].value:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/shuangbackground.png')+') no-repeat center center / cover' ">
@@ -10,7 +10,8 @@
在线点不排队
-
+
@@ -18,7 +19,7 @@
入会享权益
-
+
@@ -35,59 +36,29 @@
\ No newline at end of file
diff --git a/pages/order/components/orderInfoAfter.vue b/pages/order/components/orderInfoAfter.vue
new file mode 100644
index 0000000..a4192e0
--- /dev/null
+++ b/pages/order/components/orderInfoAfter.vue
@@ -0,0 +1,1132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+ 桌台
+
+ {{ listinfo.tableName || '' }}
+
+
+
+
+
+
+
+
+ 第{{key}}次下单
+
+
+
+
+
+
+
+
+
+
+
+ {{item.productName}}
+ {{item.skuName}}
+
+
+
+
+ {{item.price}}
+
+ ¥{{orderVIP.isVip ==1 && ordershopUserInfo.isMemberPrice==1?(item.memberPrice|| item.price):item.price}}
+
+
+ x{{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 打包费
+
+
+ ¥
+ {{listinfo.packFeess}}
+
+
+
+
+
+
+ 餐位费
+
+ X{{listinfo.Seatcharge}}
+ ¥
+ {{listinfo.Seatcharge}}
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ {{item.value.uniqueIds}}张
+ ¥-{{item.value.Productroll}}
+
+
+
+
+
+
+
+ {{item.value.name}}
+
+
+
+
+
+
+ 使用 {{ calcUsablePointsData.integral}}
+ 积分抵扣¥{{props.listinfo.pointsDiscountAmount}}
+
+
+
+
+
+
+
+
+
+ 优惠折扣
+
+
+ {{item.name}}
+
+ {{item.amount}}元
+
+
+
+
+
+
+ 总计¥
+ {{listinfo.totalCost}}
+
+
+ 实付¥
+ {{listinfo.payAmount}}
+
+
+
+
+
+
+
+ 订单编号:
+ {{listinfo.orderNo}}(点击复制)
+
+
+ 下单时间:
+ {{$u.timeFormat(listinfo.updateTime, 'yyyy-mm-dd hh:MM:ss')}}
+
+
+ 下单台桌:
+ {{listinfo.tableName}}
+
+
+ 下单门店:
+ {{orderVIP.shopName}}
+
+
+ 用餐模式:
+ 堂食
+ 外带
+ 外卖
+
+
+ 备注:
+ {{ listinfo.remark || ""}}
+
+
+ 就餐人数:
+ {{ listinfo.seatNum || ""}}
+
+
+ 退款方式:
+ {{ listinfo.refundType == 'cash'?'手动退款':'原路退回'}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/rechargeFree.vue b/pages/order/components/rechargeFree.vue
new file mode 100644
index 0000000..9c18794
--- /dev/null
+++ b/pages/order/components/rechargeFree.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+ 优惠
+
+ 充值消费{{freeDineConfig.rechargeTimes}}倍(订单满¥{{freeDineConfig.rechargeThreshold}}元可用),本单立享免单!
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/components/topUpActivity.vue b/pages/order/components/topUpActivity.vue
new file mode 100644
index 0000000..8c70d68
--- /dev/null
+++ b/pages/order/components/topUpActivity.vue
@@ -0,0 +1,142 @@
+
+
+
+
+ 充值更划算
+
+
+ 首充优惠
+ {{ item.amount }}元
+ 赠{{ item.giftAmount }}元50积分
+ 赠送2张优惠券
+
+
+
+
+
+
+
+
+
diff --git a/pages/order/coupon.vue b/pages/order/coupon.vue
new file mode 100644
index 0000000..84cb40a
--- /dev/null
+++ b/pages/order/coupon.vue
@@ -0,0 +1,620 @@
+
+
+
+
+
+
+
+
+ 1
+ 张
+
+
+ ¥
+ {{item.discountAmount || 0}}
+
+
+
+ {{ item.type == 2 ? item.name : '优惠券(元)'}}
+
+
+
+
+
+
+ {{ item.shopName }}
+
+
+ 无门槛使用
+
+
+ {{ item.type == 2 ? '会员商品券' : item.name}}
+
+
+ 去使用
+
+
+
+
+
+
+
+
+ 不可使用
+
+
+
+ 有效期至:{{item.endTime}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
new file mode 100644
index 0000000..83230d7
--- /dev/null
+++ b/pages/order/detail.vue
@@ -0,0 +1,1057 @@
+
+
+
+
+
+ 待支付
+ 已完成
+ 退单
+ 部分退单
+ 取消订单
+
+ 下单时间:{{ listinfo.createTime }}
+
+ 付款时间:{{listinfo.paidTime}}
+
+
+
+
+
+ 扫码加好友,优惠多多
+ 优惠活动多
+ 充值有好礼
+ 会员享低价
+ 长按保存,微信内扫一扫加好友
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 实付金额:
+
+ ¥{{listinfo.totalCost}}
+
+
+
+
+ {{paymentmethod.paymentBtnText}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/index.vue b/pages/order/index.vue
new file mode 100644
index 0000000..7045a26
--- /dev/null
+++ b/pages/order/index.vue
@@ -0,0 +1,521 @@
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+ 下单日期:{{item.createTime}}
+
+
+
+
+
+
+ {{ item1.productName }}
+
+
+
+ ¥{{item.status == 'unpaid'?item.originAmount:item.orderAmount}}
+ 共{{item.goods.length}}件
+
+
+
+
+
+
+
+
+
+ 去点餐
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/choosetable.vue b/pages/product/choosetable.vue
new file mode 100644
index 0000000..fbaba4b
--- /dev/null
+++ b/pages/product/choosetable.vue
@@ -0,0 +1,272 @@
+
+
+
+
+
+
+ 请选择就餐人数
+ 桌号{{shopTable.name}}
+
+
+
+ {{index+1}}
+
+
+
+
+
+
+
+
+
+
+
+ 开始点餐
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/components/confirmorder.vue b/pages/product/components/confirmorder.vue
new file mode 100644
index 0000000..16ce7b0
--- /dev/null
+++ b/pages/product/components/confirmorder.vue
@@ -0,0 +1,1405 @@
+
+
+
+
+
+
+
+
+
+
+ 温馨提示:请适量点餐,避免浪费
+
+
+
+
+
+
+
+
+ 第{{key}}次下单
+
+
+
+
+
+
+
+
+
+
+
+ {{item.productName}}
+ {{item.skuName}}
+
+
+
+
+ ¥{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.price):item.price}}
+
+ x{{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ shopInfo.name }}
+
+
+
+
+ {{item.name}}
+
+
+ {{item.cartListinfo.sku_id == i.id ? i.name :""}}
+
+
+
+
+
+
+ {{i.proName }}
+
+
+
+
+ X{{ ifcartNumber(item) }}
+
+
+
+ ¥{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.salePrice):item.salePrice}}
+
+
+
+
+
+
+
+
+
+
+
+ 实付金额
+ ¥{{ totalPrices }}
+
+
+ 提交订单
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/components/shopindex.vue b/pages/product/components/shopindex.vue
new file mode 100644
index 0000000..6d123bb
--- /dev/null
+++ b/pages/product/components/shopindex.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+ {{ shopInfo.shopName }}
+
+
+
+
+ 商家信息
+
+
+ 营业时间:
+ {{ (shopInfo.businessStartDay || '--') +'至'+ (shopInfo.businessEndDay || '--') +' '+ (shopInfo.businessTime || '')}}
+
+
+ 商家地址:
+ {{ shopInfo.address }}
+
+
+ 商家电话:
+ {{ shopInfo.phone }}
+
+
+ 商家公告
+
+
+ 公告:
+ {{ shopInfo.detail }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/components/shoppingCartBilling.vue b/pages/product/components/shoppingCartBilling.vue
new file mode 100644
index 0000000..c4b5e2a
--- /dev/null
+++ b/pages/product/components/shoppingCartBilling.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+ {{cartLists_count<99?cartLists_count:'99+'}}
+
+
+ ¥
+ {{cartLists.memberAmount||'0.00'}}
+ {{cartLists.amount||'0.00'}}
+
+
+ 去结算
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/components/shoppingCartes.vue b/pages/product/components/shoppingCartes.vue
new file mode 100644
index 0000000..e91ec0e
--- /dev/null
+++ b/pages/product/components/shoppingCartes.vue
@@ -0,0 +1,880 @@
+
+
+
+
+
+
+
+
+
+
+ 购物车
+
+
+
+ 清空购物车
+
+
+
+
+
+
+
+
+
+ {{item.cartListinfo.is_temporary == 1?'临时菜' :item.name }}
+
+
+
+ {{item.cartListinfo.sku_id == i.id? i.name:"" }}
+
+
+
+
+
+
+ {{i.proName }}
+
+
+
+
+
+ ¥
+
+
+
+
+ {{item.cartListinfo.sku_id == i.id?(shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(i.memberPrice || i.salePrice):i.salePrice):''}}
+
+
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice || item.salePrice):item.salePrice}}
+
+
+
+
+
+
+
+
+
+
+ {{ ifcartNumber(item) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 待支付订单
+
+
+ 清空历史订单
+
+
+
+
+
+ 第{{key}}次下单
+
+
+ 清空
+
+
+
+
+
+
+
+
+
+
+
+ {{item.productName}}
+ {{item.skuName}}
+
+
+
+
+ ¥{{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.price):item.price}}
+
+ x{{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/index.vue b/pages/product/index.vue
index c0921fa..bca1ef0 100644
--- a/pages/product/index.vue
+++ b/pages/product/index.vue
@@ -1,8 +1,413 @@
-
+
+
+
+
+
+
+ {{ shopInfo.shopName }}
+
+
+
+
+ 距离您{{ distance }}
+
+
+
+ 营业时间:{{ (shopInfo.businessStartDay || '--') +' 至 '+ (shopInfo.businessEndDay || '--')}}
+ {{endTimeref.startTime}} -
+ {{endTimeref.endTime < '05'?` 凌晨${endTimeref.endTime}`:endTimeref.endTime}}
+
+
+ 查看
+
+
+
+
+
+ 本店招牌菜
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ 本店回头客第{{index+1}}名
+
+
+ 招牌
+
+ 「{{item.suitNum}}{{item.unitName}}起点」
+
+
+
+
+
+
+
+ ¥
+
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice||item.salePrice):item.salePrice}}
+
+
+ /{{item.unitName}}
+
+
+
+
+ 未开售
+ 已售罄
+
+
+
+
+
+
+
+ ¥
+
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item.memberPrice|| item.salePrice):item.salePrice}}
+
+ /{{item.unitName}}
+
+
+
+
+
+
+
+ 选择套餐
+ 选规格
+ {{ ifcartNumber(item) <99?ifcartNumber(item):'99+'}}
+
+
+
+
+ singleclick(item, '-'), 500)">
+
+
+ {{ ifcartNumber(item) }}
+
+
+ singleclick(item, '+'), 500)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+ TOP{{index1+1}}
+
+ {{ item1.name }}
+
+ 热销
+ {{item1.shortTitle?item1.shortTitle:''}}
+
+
+ 「{{item1.suitNum}}{{item1.unitName}}起点」
+
+
+
+ ¥
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1 ?(item1.memberPrice||item1.salePrice):item1.salePrice}}
+
+ /{{item1.unitName}}
+
+
+
+ 未开售
+ 已售罄
+
+
+
+
+
+ ¥
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1?(item1.memberPrice||item1.salePrice):item1.salePrice}}
+
+ /{{item1.unitName}}
+
+
+
+
+ 选择套餐
+ 选规格
+ {{ ifcartNumber(item1) <99?ifcartNumber(item1):'99+'}}
+
+
+
+
+
+ singleclick(item1, '-'), 500)">
+
+
+
+ {{ ifcartNumber(item1) }}
+
+
+ singleclick(item1, '+'), 500)">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{cartLists_count<99?cartLists_count:'99+'}}
+
+
+ ¥
+ {{totalPrices}}
+
+
+ 去结算
+
+
+
+
+
+
+
+
+
+
+
+
+ {{specifications.item.name}}
+
+ {{specifications.item.shortTitle?specifications.item.shortTitle:''}}
+
+
+
+
+ {{specType }}
+
+
+
+ {{option}}
+
+ 售罄
+
+
+ 已下架
+
+
+
+
+
+
+
+
+
+
+ {{setmenu.title}} {{setmenu.count }} 选{{setmenu.number }}
+
+
+
+ {{option.proName}}
+ /{{option.unitName}}
+
+ 售罄
+
+
+
+
+
+
+
+
+
+
+
+ ¥
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1? (specifications.item.result.memberPrice||specifications.item.result.salePrice):specifications.item.result.salePrice}}
+ /{{specifications.item.unitName}}
+
+ 「{{specifications.item.result.suitNum}}{{specifications.item.result.unitName}}起点」
+
+
+
+ ¥
+
+ {{shopInfo.isVip ==1 && shopInfo.isMemberPrice==1? (specifications.item.memberPrice||specifications.item.salePrice):specifications.item.salePrice}}
+
+
+ /{{specifications.item.unitName}}
+
+
+ 「{{specifications.item.suitNum}}{{specifications.item.unitName}}起点」
+
+
+
+
+
+
+
+
+
+ {{ shopCartNumber }}
+
+
+
+
+
+
+
+
+ {{selectedSpecsStr }}
+
+
+ {{skuBtnText}}
+
+
+ {{skuBtnText}}
+
+
+
+
+
+
@@ -10,21 +415,78 @@
import {
ref,
reactive,
- onMounted
+ onMounted,
+ watchEffect,
+ getCurrentInstance,
+ computed,
+ watch
} from "vue";
+
import {
onLoad,
onReady,
onShow,
+ onHide,
onPageScroll
} from '@dcloudio/uni-app'
- import Nav from '@/components/CustomNavbar.vue'; //导航栏
+
+ //导航栏
+ import Nav from '@/components/CustomNavbar.vue';
+ import shopindex from './components/shopindex.vue'
+ import shoppingCartes from './components/shoppingCartes.vue'
+ import confirmorder from './components/confirmorder.vue'
+ import Loading from '@/components/Loading.vue';
+ import dayjs from 'dayjs';
+ import isBetween from 'dayjs/plugin/isBetween'
+ dayjs.extend(isBetween)
+
+ // 获取全局属性
+ const {
+ proxy
+ } = getCurrentInstance();
+
+ //接口引入
+ import {
+ productminiApphotsquery,
+ APIgroupquery,
+ APIminiAppinfo,
+ APIminiAppskuinfo
+ } from "@/common/api/product/product.js";
+
+ import {
+ APIhistoryOrder,
+ APIcancelOrder,
+ APIrmPlaceOrder
+ } from "@/common/api/order/index.js";
+
+ // websocket
+ import useWebSocket from '@/common/js/websocket.js';
+
// pinia管理
import {
useNavbarStore
} from '@/stores/navbarStore';
+
+ // 结账管理
+ import {
+ Memberpay
+ } from '@/stores/pay.js';
+
+ const storeMemberpay = Memberpay();
const store = useNavbarStore();
+ import {
+ productStore
+ } from '@/stores/user.js';
+
+ const userStore = productStore();
+
+ // 金额管理
+ import {
+ useCartStore
+ } from '@/stores/order.js';
+ const cartStore = useCartStore()
+
// 动态更新导航栏配置
store.updateNavbarConfig({
showBack: true, //左边返回键
@@ -34,14 +496,2056 @@
isTransparent: false,
hasPlaceholder: false //是否要占位符
});
-
- // 标题滑动滑动
+
+ const shopInfo = uni.cache.get('shopInfo')
+ const shopTable = uni.cache.get('shopTable')
+ const distance = uni.cache.get('distance') //距离
+
+
+ //店铺详情
+ const showShopInfoRef = ref(null)
+
+ // 初始加载中
+ const isLoading = ref(true);
+
+ //调用shop组件
+ const callChildMethod = () => {
+ if (showShopInfoRef.value) {
+ showShopInfoRef.value.childMethod();
+ }
+ }
+
+ try {
+ const shopExtend = uni.cache.get('shopTable').shopExtendMap.shopinfo_bg
+ } catch (error) {}
+
+ // 计算高度
+ const navScroll = ref(null)
+
+ // 获取商品数据
+ const shopProductList = reactive({
+ hots: [],
+ productInfo: [],
+ })
+
+ // * 图片加载
+ const imageLoaded = (item, index, index1) => {
+ // shopProductList.productInfo[index].products[index1]['imgLoad'] = true;
+ }
+
+ // 计算左侧位置
+ const leftIndex = ref(0)
+
+ //距离顶部的高度
+ const scrollTopSiz = ref(0)
+
+ //元素最低端的距离
+ const lastbottom = ref('')
+
+ //储存元素的下标
+ const topArr = ref([])
+
+ // 填充高度,用于最后一项低于滚动区域时使用
+ const fillHeight = ref(200)
+
+ //距离顶部的高度
+ const scrollTopSize = ref(0)
+
+ //左侧导航点击
+ const leftTap = (index) => {
+ uni.pageScrollTo({
+ scrollTop: topArr.value[index] - store.height,
+ duration: 0
+ });
+ leftIndex.value = index
+ }
+
+ /* 计算左侧滚动位置定位 */
+ const leftIntoView = computed(() => {
+ return `left-${leftIndex.value? leftIndex.value:0}`
+ })
+
+ /* 获取元素顶部信息 */
+ const getElementTop = () => {
+ new Promise((resolve, reject) => {
+ let view = uni.createSelectorQuery().selectAll('.main-item');
+ view.boundingClientRect(async data => {
+ resolve(data);
+ }).exec();
+ proxy.$uGetRect('.scroll-panel').then(res => {
+ scrollTopSize.value = res.top; //元素距离顶部的距离
+ })
+ }).then((res) => {
+ try {
+ topArr.value = res.map((item) => {
+ return item.top; /* 减去滚动容器距离顶部的距离 加导航栏高度*/
+ });
+
+ // 获取最后一个元素最低端的盒子到顶点的距离
+ for (let i = 0; i <= (topArr.value.length - 1); i++) {
+ if ((store.screenHeight - 200) >= (topArr.value[topArr.value.length - 1] - topArr.value[
+ i])) {
+ // 获取距离最后一个index
+ lastbottom.value = i;
+ break;
+ }
+ }
+ /* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
+ let last = res[res.length - 1].height;
+ if (last - 20 < store.screenHeight) {
+ fillHeight.value = 200;
+ }
+ } catch (error) {
+ //TODO handle the exception
+ }
+ });
+ }
+
+ // 定时器
+ const mainThrottle = ref(null)
+
+ /* 主区域滚动监听 */
+ const mainScroll = (e) => {
+ // 节流方法
+ clearTimeout(mainThrottle.value);
+ mainThrottle.value = setTimeout(() => {
+ scrollFn();
+ }, 10);
+ let scrollFn = () => {
+ let top = e.scrollTop;
+ let index = 0;
+ // 判断左边是否可以滑动
+
+ for (let i = (topArr.value.length - 1); i >= 0; i--) {
+ /* 在部分安卓设备上,因手机逻辑分辨率与rpx单位计算不是整数,滚动距离与有误差,增加2px来完善该问题 */
+ if ((top + 2) >= topArr.value[i] - store.height) {
+ index = i;
+ break;
+ }
+ }
+ /* 查找当前滚动距离 */
+ if (index >= lastbottom.value) { //
+ leftIndex.value = index > leftIndex.value ? index : leftIndex.value
+ // this.leftIndex = this.leftIndex
+ } else {
+ leftIndex.value = (index < 0 ? 0 : index);
+ }
+ }
+ }
+
+ //动态导航栏滑动距离
onPageScroll((res) => {
- // isSticky.value = res.scrollTop > elementTop.value ? true : false
- // uni.$u.debounce(store.scrollTop = res.scrollTop, 500)
+ uni.$u.debounce(store.scrollTop = res.scrollTop, 500)
+ uni.$u.debounce(navScroll.value = res.scrollTop, 500)
+ uni.$u.debounce(mainScroll(res), 500)
});
+
+ // 点击详情
+ const showShopsku = ref(false)
+
+ // 规格信息
+ const specifications = reactive({
+ item: {},
+ index: '',
+ inedxs: '',
+ type: '',
+ product_id: '',
+ sku_id: '',
+ groupSnap: {},
+ item: {
+ groupSnap: [],
+ result: {
+ isSoldStock: 0
+ }
+ },
+
+ })
+ // 用于判断接口数据是否加载完成
+ const isDataLoaded = ref(false);
+
+ // 存储用户当前选择的规格,初始为空对象
+ const selectedSpecs = ref({});
+
+ // 能否提交的状态
+ const canSubmit = ref(false);
+
+ //字形判断
+ const skuBtnText = ref('添加到购物车')
+
+ // 计算属性,判断是否所有规格类型都有选中项
+ const allSpecsSelected = computed(() => {
+ // 获取所有规格类型的键
+ const specKeys = Object.keys(specifications.item.selectSpecInfo);
+ // skuBtnText.value = selectedSpecsStr.value ? `您还没选择${specKeys[1]}哦` : ``
+ // 检查每个规格类型是否都在 selectedSpecs 中有对应的选中值
+ return specKeys.every(key => selectedSpecs.value[key]);
+ });
+
+ // 处理规格选择的方法
+ const selectSpec = async (specType, option) => {
+ // 规格清零
+ shopCartNumber.value = 0
+
+ // 更新 selectedSpecs 对象,将当前规格类型的选中值设置为用户点击的选项
+ const newSelectedSpecs = {};
+ const specKeys = Object.keys(specifications.item.selectSpecInfo);
+ for (const key of specKeys) {
+ if (key === specType) {
+ newSelectedSpecs[key] = option;
+ } else {
+ newSelectedSpecs[key] = selectedSpecs.value[key];
+ }
+ }
+ selectedSpecs.value = newSelectedSpecs;
+ if (allSpecsSelected.value) {
+ // try {
+ let result = await APIminiAppskuinfo({
+ specInfo: selectedSpecsStr.value,
+ id: specifications.item.id
+ });
+ // skuList
+ if (result != true) {
+ specifications.sku_id = result.id
+ specifications.product_id = result.productId
+ // 添加多规格分组
+ specifications.item.result = result
+ if (result.isSoldStock == 0) {
+ canSubmit.value = true;
+ } else {
+ canSubmit.value = false;
+ }
+ } else {
+ specifications.item.result = 'kong'
+ canSubmit.value = false;
+ }
+
+ } else {
+ canSubmit.value = false;
+ }
+ };
+
+ // 监听 specifications 的变化
+ watch(
+ () => specifications.item.groupSnap,
+ (newGroupSnap) => {
+ if (Array.isArray(newGroupSnap)) {
+ selectedOptions.value = newGroupSnap.map(() => []);
+ }
+ }
+ );
+
+ // 存储选中的选项,二维数组
+ const selectedOptions = ref(
+ specifications.item.groupSnap.map(() => [])
+ );
+
+ // / 选择规格的方法
+ const goodsidClick = (setmenuindex, option, goodsid) => {
+ if (!selectedOptions.value[setmenuindex]) {
+ // 如果 selectedOptions.value[setmenuindex] 不存在,初始化一个空数组
+ selectedOptions.value[setmenuindex] = [];
+ }
+ if (isOptionSelected(setmenuindex, option)) {
+ // 如果已经选中,取消选中
+ selectedOptions.value[setmenuindex] = selectedOptions.value[setmenuindex].filter(item => item.proId !==
+ option.proId);
+ } else if (!isMaxSelected(setmenuindex)) {
+ // 如果未达到最大选择数量,添加到选中列表
+ selectedOptions.value[setmenuindex].push(option);
+ }
+ };
+
+ // 判断选项是否已选中
+ const isOptionSelected = (setmenuindex, option) => {
+ // 确保 selectedOptions.value[setmenuindex] 存在
+ if (selectedOptions.value[setmenuindex]) {
+ return selectedOptions.value[setmenuindex].some(item => item.proId === option.proId);
+ }
+ return false;
+ };
+
+ // 判断是否达到最大选择数量
+ const isMaxSelected = (setmenuindex) => {
+ // 确保 selectedOptions.value[setmenuindex] 存在
+ if (selectedOptions.value[setmenuindex]) {
+ return selectedOptions.value[setmenuindex].length >= specifications.item.groupSnap[setmenuindex]
+ .number;
+ }
+ return false;
+ };
+
+ // 计算所有选中条件是否都符合
+ const allConditionsSatisfied = computed(() => {
+ // 检查 specifications.item.groupSnap 是否存在
+ if (!specifications.item?.groupSnap) {
+ return false;
+ }
+ return specifications.item.groupSnap.every((optionGroup, index) => {
+ // 获取当前索引对应的已选选项,如果不存在则默认为空数组
+ const selected = selectedOptions.value[index] || [];
+ // 检查是否达到最大选择数量
+ const hasEnoughSelection = selected.length === optionGroup.number;
+ return hasEnoughSelection;
+ });
+ });
+
+ // 提交选择,套餐选中最后处理的数据
+ const selectedGroupSnap = ref([]);
+
+ // 计算属性,将 selectedSpecs 转换为字符串形式
+ const selectedSpecsStr = computed(() => {
+ const values = Object.values(selectedSpecs.value);
+ return values.join(',');
+ });
+
+ //添加购物车数量
+ const shopCartNumber = ref(0)
+
+ // 多规格 套餐添加数量
+ const shopCart = async (i) => {
+ if (i == '-' && shopCartNumber.value >= 0) {
+ shopCartNumber.value = 0
+ return false;
+ }
+ let res = await shoppingcart()
+ if (i == '-') {
+ if (!res && shopCartNumber.value == specifications.item.suitNum) {
+ uni.showToast({
+ title: `起点${specifications.item.suitNum}个`,
+ icon: 'none'
+ })
+ return false;
+ } else {
+ shopCartNumber.value--;
+ }
+ } else {
+ if (!res && shopCartNumber.value < 1) {
+ console.log(res, specifications)
+ if (specifications.type == 'sku') {
+ shopCartNumber.value = parseFloat(specifications.item.result.suitNum);
+ } else {
+ shopCartNumber.value = parseFloat(specifications.item.suitNum);
+ }
+ } else {
+ shopCartNumber.value++;
+ }
+ }
+ }
+
+ // 套餐比较两个对象是否相等
+ function isObjectEqual(obj1, obj2) {
+ if (typeof obj1 !== 'object' || obj1 === null || typeof obj2 !== 'object' || obj2 === null) {
+ return obj1 === obj2;
+ }
+ const keys1 = Object.keys(obj1);
+ const keys2 = Object.keys(obj2);
+ if (keys1.length !== keys2.length) {
+ return false;
+ }
+ for (const key of keys1) {
+ if (Array.isArray(obj1[key]) && Array.isArray(obj2[key])) {
+ if (!isArrayEqual(obj1[key], obj2[key])) {
+ return false;
+ }
+ } else if (!isObjectEqual(obj1[key], obj2[key])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // 比较两个数组是否相等(忽略顺序)
+ function isArrayEqual(arr1, arr2) {
+ if (arr1.length !== arr2.length) {
+ return false;
+ }
+ const usedIndices = new Array(arr2.length).fill(false);
+ for (const item1 of arr1) {
+ let found = false;
+ for (let i = 0; i < arr2.length; i++) {
+ if (!usedIndices[i] && isObjectEqual(item1, arr2[i])) {
+ usedIndices[i] = true;
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // 根据购物车的数据匹配选中的商品查找是否有匹配的数组
+ const matchingProduct = async (data) => {
+ return matchedProducts.value.find((product, index) => {
+ if (specifications.type == 'package') {
+ // 套餐
+ let result = false;
+ try {
+ if (product.type == "package") {
+ let res = JSON.parse(product.cartListinfo.pro_group_info);
+ result = isArrayEqual(res, selectedGroupSnap.value);
+ }
+ } catch (error) {
+ //TODO handle the exception
+ }
+ // 直接返回布尔值
+ return result;
+ } else if (specifications.item.type == 'sku') {
+ // 多规格
+ return product.cartListinfo.sku_id == data.id && product.cartListinfo.product_id == data
+ .productId
+ } else {
+ // 其他
+ return product.skuId == data.skuId && product.id == data.id
+ }
+ });
+ }
+
+ // 判断多规格和套餐 商品是否在购物车有数据
+ const shoppingcart = async () => {
+ let res = null
+ if (specifications.item.type == "package") {
+ if (!allConditionsSatisfied.value) {
+ return false
+ }
+ // 是否是套餐package
+ selectedGroupSnap.value = specifications.item.groupSnap.map((setmenu, index) => {
+ return {
+ ...setmenu,
+ goods: selectedOptions.value[index]
+ };
+ });
+ res = await matchingProduct(selectedGroupSnap.value)
+ } else {
+ if (!canSubmit.value) {
+ return false
+ }
+ res = await matchingProduct(specifications.item.result)
+ }
+ return res;
+ }
+
+
+ // 提交选择并执行下一步操作的方法
+ const submitSelection = async () => {
+ if (!isProductAvailable(specifications.productListitem.days, specifications.productListitem.startTime,
+ specifications.productListitem.endTime)) {
+ uni.showToast({
+ title: '不在可售时间内'
+ })
+ return false;
+ }
+ // 判断购物车是否有该选中商品
+ // 数量不能少于0
+ if (shopCartNumber.value <= 0) {
+ return;
+ }
+ if ((specifications.item.type == 'package' && allConditionsSatisfied.value) || (specifications.item.type ==
+ 'sku' && canSubmit.value)) {
+ let res = await shoppingcart()
+
+ // 是否是套餐 有就传
+ if (specifications.item.type == "package") {
+ // 需求更改:所所有商品套餐都是add,没有修改
+ res = null
+ } else {
+ selectedGroupSnap.value = []
+ }
+
+ websocketsendMessage({
+ id: res ? res.cartListId : '',
+ type: 'shopping',
+ suitNum: specifications.productListitem.suitNum,
+ table_code: uni.cache.get('tableCode'),
+ shop_id: uni.cache.get('shopId'),
+ operate_type: res ? 'edit' : 'add',
+ product_id: specifications.product_id,
+ sku_id: specifications.sku_id,
+ number: res ? await calculateValue(res.cartNumber, '+', shopCartNumber.value) :
+ shopCartNumber
+ .value,
+ pro_group_info: selectedGroupSnap.value,
+ goods_type: specifications.item.type == "package" ? 'package' : '',
+ is_print: 1,
+ product_type: specifications.item.type
+ })
+ // 清空套餐选中
+ selectedGroupSnap.value = []
+ showShopsku.value = false
+ } else {
+ return;
+ }
+ }
+
+ //获取多规格数据
+ const clickspecifications = async (item, index, indexs, type) => {
+ console.log(item)
+ // 商品类型 single-单规格商品 sku-多规格商品 package-套餐商品 weight-称重商品 coupon-团购券
+ if (item.isSoldStock == 1 || (item.isSaleTime == 0 && !item.isSaleTimeshow) || item.type == 'single' ||
+ item
+ .type == 'weight' || (
+ item.type == 'package' && item.groupType == '0')) {
+ return false;
+ }
+ // 数量清零
+ shopCartNumber.value = 0
+ // 初始化
+ let data = {
+ item: item,
+ productListitem: item,
+ type: '',
+ product_id: '',
+ sku_id: ''
+ }
+ Object.assign(specifications, data);
+ // 初始化 多规格选中
+ selectedSpecs.value = {}
+ canSubmit.value = false
+ // skuBtnText.value = '请选择规格'
+ // single-单规格商品 sku-多规格商品 package-套餐商品 weight-称重商品 coupon-团购券
+ let res = await APIminiAppinfo(item.id)
+ specifications.item = res
+ if (specifications.item.type == "package") {
+ selectedOptions.value = []
+ specifications.product_id = res.id
+ specifications.sku_id = item.skuId
+ shopCartNumber.value = 1
+ }
+ // 购物车是否有商品
+ specifications.type = res.type
+ specifications.item.selectSpecInfo = Object.fromEntries(
+ Object.entries(specifications.item.selectSpecInfo).filter(([_, value]) => value.length > 0)
+ );
+ // 给默认数量
+ specifications.item.amountcartNumber = 0
+ showShopsku.value = true
+ }
+ // 判断商品是否在可售时间内
+ const isProductAvailable = async (sellDaysStr, startTimeStr, endTimeStr) => {
+ // 将后端返回的字符串转换为数组
+ const sellDays = sellDaysStr.split(',');
+ const now = dayjs();
+ const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+ const currentDay = days[now.day()];
+
+ // console.log('当前日期:', currentDay);
+ // console.log('可售日期列表:', sellDays);
+
+ // 检查当前周几是否在可售周几列表中
+ if (!sellDays.includes(currentDay)) {
+ // console.log('当前日期不在可售日期列表中');
+ return false;
+ }
+
+ const startTime = dayjs(`${now.format('YYYY-MM-DD')} ${startTimeStr}`);
+ let endTime = dayjs(`${now.format('YYYY-MM-DD')} ${endTimeStr}`);
+
+ // 处理跨天情况
+ if (endTime.isBefore(startTime)) {
+ endTime = endTime.add(1, 'day');
+ }
+
+ // console.log('当前时间:', now.format('YYYY-MM-DD HH:mm:ss'));
+ // console.log('开始时间:', startTime.format('YYYY-MM-DD HH:mm:ss'));
+ // console.log('结束时间:', endTime.format('YYYY-MM-DD HH:mm:ss'));
+
+ const isInRange = now.isBetween(startTime, endTime, null, '[)');
+ // console.log('当前时间是否在可售时间范围内:', isInRange);
+
+ return isInRange;
+ }
+
+ // 单规格
+ const singleclick = async (item, i) => {
+ if (!isProductAvailable(item.days, item.startTime, item.endTime)) {
+ uni.showToast({
+ title: '不在可售时间内'
+ })
+ return false;
+ }
+ // 判断购物车是否有该选中商品
+ let res = null
+ try {
+ res = matchedProducts.value.find((product, index) => {
+ return product.skuId == item.skuId && product.id == item.id
+ });
+ } catch (error) {
+ //TODO handle the exception
+ }
+
+ // 保存这次点击的
+ specifications.productListitem = item
+
+ // 是否起售 如果小于或者大于都是1
+ let suitNum = 1;
+ const cartNumberFloat = parseFloat(item.cartNumber);
+ if (!res && item.suitNum > cartNumberFloat) {
+ suitNum = item.suitNum;
+ } else if (item.suitNum >= cartNumberFloat && i === '-') {
+ suitNum = item.cartNumber;
+ }
+ websocketsendMessage({
+ id: res ? item.cartListId : '',
+ type: 'shopping',
+ suitNum: item.suitNum,
+ table_code: uni.cache.get('tableCode'),
+ shop_id: uni.cache.get('shopId'),
+ operate_type: await calculateValue(item.cartNumber, i, suitNum) == 'del' ? 'del' : res ?
+ 'edit' : 'add',
+ product_id: item.id,
+ sku_id: item.skuId,
+ number: await calculateValue(item.cartNumber, i, suitNum),
+ is_print: 1,
+ product_type: item.type
+ })
+ }
+
+
+ const calculateValue = (cartNumber, i, step = 1) => {
+ if (i == '+') {
+ const result = parseFloat(cartNumber) + parseFloat(step);
+ return result.toFixed(2);
+ } else {
+ // 当减到0返回del
+ const result = parseFloat(cartNumber) - parseFloat(step);
+ return result == 0 ? 'del' : result.toFixed(2);
+ }
+ }
+
+ // WebSocket处理 // 初始化配置
+ const options = {
+ initMessage: {
+ type: 'shopping',
+ operate_type: 'init',
+ table_code: uni.cache.get('tableCode'),
+ shop_id: uni.cache.get('shopId')
+ }
+ }
+
+ const {
+ isConnected,
+ sendMessage,
+ closeSocket: manualClose,
+ receivedMessages,
+ closeExistingConnection,
+ onShowconnect,
+ initNetworkListener
+ } = useWebSocket(options);
+
+ //购物车显示
+ const showCart = ref(false)
+
+ // 提交订单显示
+ const confirmordershow = ref(false)
+
+ // 购物车数组
+ const cartList = ref([])
+
+ // 更新商品数量的方法
+ const updateProductQuantities = () => {
+ // 先将所有商品的 cartNumber 初始化为 0
+ shopProductList.hots.forEach((i) => {
+ i.cartNumber = 0
+ })
+ // 遍历商品列表二维数组
+ shopProductList.productInfo.forEach((group) => {
+ group.productList.forEach((product) => {
+ product.cartNumber = 0
+ });
+ });
+
+ // 再去更新数组的值
+ cartListFilter.value.forEach((cartItem) => {
+ shopProductList.productInfo.forEach((group) => {
+ group.productList.forEach((product) => {
+ if (product.id == cartItem.product_id && product.skuId == cartItem
+ .sku_id) {
+ product.cartNumber = cartItem.number
+ product.cartListId = cartItem.id
+ }
+ });
+ });
+ });
+ // 遍历购物车数组
+ cartListFilter.value.forEach((cartItem) => {
+ // 遍历商品列表二维数组
+ shopProductList.hots.forEach((group) => {
+ // 商品 id 匹配
+ if (group.id == cartItem.product_id) {
+ // 更新商品的数量
+ group.cartListId = cartItem.id
+ group.cartNumber = cartItem.number
+ }
+ });
+ });
+ }
+
+ //websocket产值
+ const websocketsendMessage = (data) => {
+ uni.$u.debounce(sendMessage(data), 500)
+ }
+
+ // 用于记录已经处理过的消息的 msg_id
+ const processedMessageIds = new Set();
+
+ // 监听接收到的消息变化
+ watchEffect(async () => {
+ if (isDataLoaded.value && receivedMessages.value) {
+ const Message = receivedMessages.value
+ if (Message) {
+ // 心跳返回 过滤
+ if (Message.type == "ping_interval" || Message.msg_id == "ping_interval") {
+ isLoading.value = false;
+ return false
+ }
+ // 检查消息是否已经处理过
+ if (processedMessageIds.has(Message.msg_id)) {
+ return;
+ }
+ processedMessageIds.add(Message.msg_id);
+
+ // 初始化
+ if (Message.operate_type == "init") {
+ cartList.value = Message.data
+ uni.hideLoading();
+ isLoading.value = false;
+ }
+
+ // 清空购物车
+ if (Message.operate_type == 'cleanup') {
+ cartList.value = []
+ setTimeout(() => {
+ Historicalorders()
+ }, 400)
+ showCart.value = false
+ }
+
+ // 删除除购物车
+ if (Message.operate_type == 'del' && Message.status == 1) {
+ // 优化:使用可选链操作符避免报错
+ cartList.value = cartList.value.filter(item => item.id !== Message.data?.id);
+ // cartList.value = cartList.value.filter(item => item.id != Message.data.id);
+ }
+
+ // 添加或者减少购物后返回
+ if (Message.operate_type == 'add' || Message.operate_type == 'edit') {
+ [Message.data].forEach((objA) => {
+ const index = cartList.value.findIndex((objB) => objB.id == objA.id);
+ if (index !== -1) {
+ cartList.value[index] = objA;
+ } else {
+ cartList.value.push(objA);
+ }
+ });
+ }
+
+ // 历史订单
+ if (Message.operate_type == 'clearOrder') {
+ Historicalorders()
+ }
+
+ // 购物车数据更新从新请求
+ if (Message.type == 'product' && Message.data_type == 'product_update' && Message
+ .operate_type == 'product_update') {
+ isDataLoaded.value = false;
+ productqueryProduct()
+ }
+
+ // 提示
+ if (Message.status == 0 && Message.type != 'no_suit_num') {
+ uni.showToast({
+ title: Message.msg,
+ icon: "none"
+ })
+ }
+
+ if (Message.type == 'no_suit_num') {
+ // console.log(specifications)
+ uni.showModal({
+ title: '提示',
+ showCancel: false,
+ content: '此商品库存不足起售数量!',
+ success: async (data) => {
+ await websocketsendMessage({
+ id: Message.id,
+ type: 'shopping',
+ table_code: uni.cache.get('tableCode'),
+ shop_id: uni.cache.get('shopId'),
+ operate_type: 'del',
+ is_print: 1,
+ })
+ }
+ });
+ }
+
+ //除去p 每次返回都回执消息
+ await websocketsendMessage({
+ type: 'receipt',
+ msg_id: Message.msg_id
+ })
+
+ // 初始化商品数量
+ await updateProductQuantities()
+
+ }
+ }
+ })
+
+ // 更新购物车数据shopProductList.hots
+ const matchedProducts = computed(() => {
+ if (cartList.value.length > 0) {
+ let Specialstop = null
+
+ try {
+ Specialstop = [...[{
+ id: "",
+ name: "",
+ productList: shopProductList.hots
+ }], ...shopProductList.productInfo]
+ } catch (error) {
+ Specialstop = shopProductList.productInfo
+ //TODO handle the exception
+ }
+ return cartList.value.flatMap((cartItem) => {
+ for (const group of Specialstop) {
+ for (const product of group.productList) {
+ if (product.id == cartItem.product_id) {
+ return {
+ ...product,
+ cartListinfo: cartItem,
+ cartListId: cartItem.id, //购物车id
+ cartNumber: cartItem.number //增加一个数量算法
+ // cartNumberToAdd: cartItem.number //增加一个数量算法
+ };
+
+ }
+ }
+ }
+ if (cartItem.is_temporary === 1) {
+ return [{
+ ...cartItem,
+ memberPrice: cartItem.discount_sale_amount,
+ salePrice: cartItem.discount_sale_amount,
+ cartListinfo: cartItem,
+ cartListId: cartItem.id, // 购物车id
+ cartNumber: cartItem.number // 增加一个数量算法
+ }];
+ }
+ // 如果没找到匹配的商品,返回 null 或者其他默认值,这里返回 null
+ return null;
+ }).filter(item => item !== null);
+ } else {
+ return []
+ }
+
+ })
+
+ //删除某一个待支付订单
+ const clickcancelOrder = async (data) => {
+ if (data.i == 'all') {
+ await APIcancelOrder({
+ shopId: uni.cache.get('shopId'),
+ orderId: orderinfo.value.id,
+ })
+ } else {
+ await APIrmPlaceOrder({
+ shopId: uni.cache.get('shopId'),
+ orderId: orderinfo.value.id,
+ placeNum: data.key
+ })
+ }
+ Historicalorders()
+ }
+
+ // 储存是否存在多次下单
+ const orderinfo = ref({})
+ const confirmorderref = ref(null)
+
+ // 结账
+ const orderdetail = async () => {
+ try {
+ await Historicalorders()
+ } catch (error) {}
+ confirmordershow.value = true
+ showCart.value = false
+ }
+
+ // 历史订单
+ const Historicalorders = async (W) => {
+ let res = await APIhistoryOrder({
+ tableCode: uni.cache.get('tableCode'),
+ })
+ orderinfo.value = {
+ id: res.id,
+ detailMap: res.detailMap,
+ placeNum: res.placeNum
+ }
+ if (W) {
+ showCart.value = !showCart.value
+ }
+ }
+
+ // 提取合并 orderinfo.detailMap 数组的逻辑
+ function combineOrderInfoDetailMap(orderinfo) {
+ if (!orderinfo) return [];
+ let combinedArray = [];
+ for (const key in orderinfo.detailMap) {
+ if (orderinfo.detailMap.hasOwnProperty(key)) {
+ let subArray = orderinfo.detailMap[key];
+ combinedArray = [...combinedArray, ...subArray];
+ }
+ }
+ return combinedArray;
+ }
+
+ // 计算购物车商品费用
+ const totalPrices = computed(() => {
+ // 待支付订单
+ let cartone = 0
+ if (orderinfo.value) {
+ let combinedArray = [];
+ for (const key in orderinfo.value.detailMap) {
+ if (orderinfo.value.detailMap.hasOwnProperty(key)) {
+ let subArray = orderinfo.value.detailMap[key];
+ combinedArray = [...combinedArray, ...subArray]
+ }
+ }
+ // 购物车总数价格
+ cartone = combinedArray.reduce((total, item) => {
+ // 是否启用会员价 0否1是
+ if (shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1) {
+ // memberPrice会员价
+ return total + (parseFloat(item.memberPrice || item.price) * parseFloat(item.num - item
+ .returnNum));
+ } else {
+ // salePrice销售价
+ return total + (parseFloat(item.price || 0) * parseFloat(item.num - item.returnNum));
+ }
+ }, 0);
+ }
+ // 购物车总数价格
+ let cart = 0
+ if (matchedProducts.value.length > 0) {
+ // 购物车总数价格
+ cart = matchedProducts.value.reduce((total, item) => {
+ if (item.type == 'sku') {
+ item.skuList.forEach((i, t) => {
+ if (item.cartListinfo.sku_id == i.id) {
+ item.memberPrice = i.memberPrice
+ item.salePrice = i.salePrice
+ }
+ })
+ }
+ // 是否启用会员价 0否1是
+ if (shopInfo.isVip == 1 && shopInfo.isMemberPrice == 1) {
+ // memberPrice会员价
+ return total + parseFloat(item.memberPrice || item.salePrice) * parseFloat(item
+ .cartNumber);
+ } else {
+ // salePrice销售价
+ return total + parseFloat(item.salePrice || 0) * parseFloat(item.cartNumber);
+ }
+ }, 0);
+ }
+ cart = parseFloat(cartone) + parseFloat(cart)
+ // 向上取整并保留两位小数
+ return parseFloat(cart.toFixed(2));
+ });
+
+ // 计算购物车商品总数量
+ const cartLists_count = computed(() => {
+ const combinedOrderInfo = combineOrderInfoDetailMap(orderinfo.value);
+ const orderInfoCount = combinedOrderInfo.reduce((sum, item) => {
+ return sum + parseFloat(item.num);
+ }, 0);
+
+ const matchedProductsCount = matchedProducts.value.reduce((sum, item) => {
+ const num = typeof item.cartNumber === 'string' ? parseFloat(item.cartNumber) : item
+ .cartNumber;
+ return sum + num;
+ }, 0);
+
+ const totalCount = orderInfoCount + matchedProductsCount;
+ return parseFloat(totalCount.toFixed(2));
+ });
+
+ // 定义 ifcartNumber 计算属性方法 展示数量
+ const ifcartNumber = computed(() => {
+ return (item) => {
+ // 如果 item 为空或者 cartNumber 不是字符串类型,返回 0
+ if (!item || typeof item.cartNumber !== 'string') {
+ return 0;
+ }
+ let numValue = parseFloat(item.cartNumber);
+ if (isNaN(numValue)) {
+ // 如果转换结果是 NaN,说明 cartNumber 不是有效的数字字符串,返回 0
+ return 0;
+ }
+ // type string 商品类型 single-单规格商品 sku-多规格商品 package-套餐商品 weight-称重商品 coupon-团购券
+ if (item.type === 'weight') {
+ // 如果类型是称重重量,将值保留两位小数
+ return parseFloat(numValue.toFixed(2));
+ } else {
+ // 如果类型是整数,将值转换为整数
+ return Math.round(numValue);
+ }
+ // 如果类型不匹配,返回原始值
+ return item.cartNumber;
+ };
+ })
+
+ // 计算处理后的购物车列表 // 用于筛选后的购物车数组
+ const cartListFilter = computed(() => {
+ // 使用 reduce 方法对 cartList 进行处理
+ const grouped = cartList.value.reduce((acc, item) => {
+ const productId = item.product_id;
+ const num = parseFloat(item.number);
+
+ if (!acc[productId]) {
+ // 如果 acc 中还没有该 product_id 的记录,创建一个新对象
+ acc[productId] = {
+ ...item,
+ number: num
+ };
+ } else {
+ // 如果已经有该 product_id 的记录,将当前对象的 number 值累加到已有记录的 number 属性上
+ acc[productId].number += num;
+ }
+ return acc;
+ }, {});
+ // 将累加结果保留两位小数,并将对象转换为数组
+ return Object.values(grouped).map(item => ({
+ ...item,
+ number: item.number.toFixed(2)
+ }));
+ })
+
+ const endTimeref = reactive({
+ startTime: '',
+ endTime: ''
+ })
+
+ // 获取当前时间
+ const getCurrentTime = () => {
+ const now = new Date();
+ const hours = now.getHours().toString().padStart(2, '0');
+ const minutes = now.getMinutes().toString().padStart(2, '0');
+ return `${hours}:${minutes}`;
+ };
+
+ // 计算是否在营业时间内
+ const isBusinessTime = computed(() => {
+ if (!shopInfo.businessTime) {
+ return true;
+ }
+ const currentTime = getCurrentTime();
+ const [startTime, endTime] = shopInfo.businessTime.split('-');
+ endTimeref.startTime = startTime
+ endTimeref.endTime = endTime
+ // 如果开始时间大于结束时间,说明是跨天的营业时间
+ if (startTime > endTime) {
+ return currentTime >= startTime || currentTime <= endTime;
+ }
+ return currentTime >= startTime && currentTime <= endTime;
+ });
+
+
+ // 列表请求
+ const productqueryProduct = async () => {
+ try {
+ shopProductList.hots = await productminiApphotsquery()
+ shopProductList.productInfo = await APIgroupquery()
+ } catch (error) {
+ uni.showToast({
+ title: '网络不稳定,请重新扫码进入',
+ icon: 'none'
+ })
+ setTimeout(() => {
+ uni.pro.switchTab('index/index')
+ }, 1000)
+ }
+ if (shopProductList.productInfo.length > 0 || shopProductList.hots.length > 0) {
+ //TODO handle the exception
+ //第一步:将所有商品的 cartNumber 初始化为 0
+ shopProductList.productInfo.forEach((group) => {
+ group.productList.forEach(async (product) => {
+ product.cartNumber = 0;
+ product.isSaleTimeshow = await isProductAvailable(product.days, product
+ .startTime, product.endTime)
+ });
+ });
+ shopProductList.hots.forEach(async (i) => {
+ i.cartNumber = 0
+ i.isSaleTimeshow = await isProductAvailable(i.days, i.startTime, i.endTime)
+ })
+ scrollTopSize.value = 0
+ topArr.value = []
+ // userStore.actionsAPIuser()
+ // 数据可以更新
+ isDataLoaded.value = true;
+ // 历史订单
+ Historicalorders()
+ } else {
+ uni.showToast({
+ title: '暂无列表数据,请重新扫码',
+ icon: "none"
+ });
+ isDataLoaded.value = false;
+ setTimeout(() => {
+ uni.pro.switchTab('index/index')
+ }, 1000)
+ return false;
+ }
+
+
+ }
+
+ onLoad(async (e) => {
+ await proxy.$onLaunched;
+ })
+
+ onShow(() => {
+ // 监听页面显示和隐藏
+ onShowconnect()
+ })
+
+ onHide(() => {
+ closeExistingConnection()
+ })
+
+ onMounted(async () => {
+ await proxy.$onLaunched;
+ // 获取当前页面栈
+ const pages = getCurrentPages();
+ // 获取当前页面实例
+ const currentPage = pages[pages.length - 1];
+ // 获取页面参数
+ const options = currentPage.options;
+ await productqueryProduct()
+ setTimeout(() => {
+ // 启动网络监听
+ initNetworkListener()
+ getElementTop()
+ }, 500)
+ })
\ No newline at end of file
diff --git a/pages/subscribeto/index.vue b/pages/subscribeto/index.vue
new file mode 100644
index 0000000..83c4f8c
--- /dev/null
+++ b/pages/subscribeto/index.vue
@@ -0,0 +1,678 @@
+
+
+
+
+
+
+ 排队成功
+
+
+
+ {{dataform.shopInfo.shopName}}
+ 当前门店
+
+ {{dataform.queueInfo.callNum}}
+ {{dataform.queueInfo.tableName}}{{dataform.queueInfo.tableNote||''}}
+
+
+
+
+ 订阅通知
+
+
+ 取消排队
+
+
+
+
+
+
+
+
+
+
+
+ {{dataform.shopInfo.shopName}}
+ {{dataform.shopInfo.status == 1 ? '营业中' : '休息中'}}
+
+
+
+
+ 餐桌类型
+ 等待桌数
+ 预计等待
+
+
+
+ {{item.name||''}}
+ {{item.note||''}}
+
+
+ {{item.nearNum}}
+ 桌
+
+ 约{{item.waitTime}}分钟
+
+
+
+
+
+ 立即排队
+
+
+
+
+
+
+
+
+ 取号
+
+
+
+
+ 选择桌型
+
+
+
+ {{item.name||''}}
+ {{item.note||''}}
+
+
+
+
+
+ 手机号码
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
index b91d16d..d9465ae 100644
--- a/pages/user/coupon.vue
+++ b/pages/user/coupon.vue
@@ -2,27 +2,26 @@
-
+
{{item.name}}
-
-
+
-
+
+ :class="{'containertopboxitemleft_vip': item.type == 2,'containertopboxitemlefts': fromInfo.status == 0}">
+ :class="fromInfo.status != 0?'':'containertopboxitemleft_ones'">
- {{item.num || 0}}
+ 1
张
@@ -32,7 +31,7 @@
{{ item.type == 2 ? item.name : '优惠券(元)'}}
@@ -44,16 +43,16 @@
- {{ item.shopName }}
+ mode="aspectFill">
+ {{ item.shopName }}
无门槛使用
{{ item.type == 2 ? '会员商品券' : item.name}}
- {{status == 1 ? '去使用':'已使用'}}
+ :class="fromInfo.status == 0?'containertopboxitemright_four containertopboxitemright_btn':'containertopboxitemright_fours containertopboxitemright_btn'">
+ {{fromInfo.status == 0 ? '去使用':'已使用'}}
@@ -63,333 +62,164 @@
-
-
+
+
+
+
-
- 暂不使用券
-
-
\ No newline at end of file
diff --git a/pages/user/member/billDetails.vue b/pages/user/member/billDetails.vue
new file mode 100644
index 0000000..5971016
--- /dev/null
+++ b/pages/user/member/billDetails.vue
@@ -0,0 +1,301 @@
+
+
+
+
+
+ 我的余额
+ {{formData.info.amount||0}}
+
+
+ 我的积分
+ {{formData.info.accountPoints||0}}
+
+
+
+
+ 余额明细
+
+
+
+ 积分明细
+
+
+
+
+
+
+
+
+
+
+ 现金充值
+
+
+ 微信小程序充值
+
+
+ 支付宝小程序充值
+
+
+ 充值奖励
+
+
+ 充值退款
+
+
+ 订单消费
+
+
+ 订单退款
+
+
+ 管理员充值
+
+
+ 管理员消费
+
+
+
+ {{item.content}}
+
+
+
+ {{ item.amount }}
+
+
+ {{item.floatPoints}}
+
+
+
+
+ {{item.createTime}}
+
+ 余额:{{item.balance}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/components/registermember.vue b/pages/user/member/components/registermember.vue
new file mode 100644
index 0000000..0eb2ed6
--- /dev/null
+++ b/pages/user/member/components/registermember.vue
@@ -0,0 +1,489 @@
+
+
+
+
+ 欢迎加入{{shopUserInfo.shopName?shopUserInfo.shopName:'本店'}}
+ 请完善个人信息完成会员注册
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 昵称*
+
+
+
+ 生日
+
+ {{ formInfo.birthDay || '请选择日期'}}
+
+
+
+
+
+
+
+
+ 手机号
+
+
+
+
+ 我已阅读并同意以下内容
+
+
+
+
+ 用户协议/隐私条款
+
+
+
+ 快速注册
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/index.vue b/pages/user/member/index.vue
new file mode 100644
index 0000000..2601dba
--- /dev/null
+++ b/pages/user/member/index.vue
@@ -0,0 +1,708 @@
+
+
+
+
+
+ {{ infoForn.shopUserInfo.shopName }}
+
+
+
+
+ 账户余额(元)
+
+ {{infoForn.userInfo.amount || '0.00'}}
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ ¥
+
+
+ 自定义金额
+
+
+
+
+
+
+ 充值
+
+ ¥{{item.amount}}
+
+
+
+ 赠
+ ¥{{ item.giftAmount }}
+
+
+
+ 赠送{{item.giftAmount}}元
+
+
+
+
+
+
+
+
+
+ 您将获得:
+
+
+
+ {{ item.title }} * {{ item.number}}
+
+
+
+
+
+
+ 适用门店
+ {{ infoForn.shopUserInfo.shopName }}
+
+
+ 充值说明
+ 1.充值金额1家门店可用
+ 2.储值完成后不支持自助退款,可联系商家处理
+ 3.钱包余额不支持转赠,不可提现,长期有效
+
+
+
+
+
+
+
+
+
+ 已同意
+ 《用户隐私协议》
+
+ 立即充值
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/instructions.vue b/pages/user/member/instructions.vue
new file mode 100644
index 0000000..2e488eb
--- /dev/null
+++ b/pages/user/member/instructions.vue
@@ -0,0 +1,135 @@
+
+
+
+
+ {{ item.title }}
+
+
+ {{ item1.title }}
+
+ {{item2}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/list.vue b/pages/user/member/list.vue
new file mode 100644
index 0000000..e2cf873
--- /dev/null
+++ b/pages/user/member/list.vue
@@ -0,0 +1,207 @@
+
+
+
+ 我的会员卡({{orderForm.list.length}})
+
+
+
+
+
+
+ {{item.chainName}}
+
+
+
+ 余额:{{item.amount}}
+ {{item.shopName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/memberdetails.vue b/pages/user/member/memberdetails.vue
new file mode 100644
index 0000000..2979de1
--- /dev/null
+++ b/pages/user/member/memberdetails.vue
@@ -0,0 +1,651 @@
+
+
+
+
+
+
+
+
+
+
+ {{shopUserInfo.shopInfo.shopName||''}}会员卡
+
+
+ VL1
+
+
+
+
+
+
+
+ {{ shopUserInfo.shopInfo.isVip == 0 ? '尚未开通会员暂无法享受会员权益' : '欢迎加入本店会员~'}}
+
+
+
+
+
+ {{shopUserInfo.amount || '0.00'}}储值
+
+
+ {{shopUserInfo.accountPoints || '0'}}积分
+
+
+ {{shopUserInfo.couponNum || '0'}}优惠券
+
+
+ 0权益卡
+
+
+
+
+
+
+
+
+
+
+
+ 感谢你 2 天陪伴
+
+ 您今天的幸运词:林波微步
+
+
+
+
+
+
+
+
+ 专享2项权益
+
+
+
+ 会员专属活动
+
+
+
+ 福利商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/memberinfo.vue b/pages/user/member/memberinfo.vue
new file mode 100644
index 0000000..4db73bb
--- /dev/null
+++ b/pages/user/member/memberinfo.vue
@@ -0,0 +1,399 @@
+
+
+
+
+
+
+
+
+
+
+ {{data.title}}
+ {{data.show}}
+
+
+ 加购
+
+
+
+ {{Number(data.user_sec_y_frequ)}}/{{Number(data.user_sec_z_frequ)}} 次
+
+
+ {{data.vip_number || ''}}
+ {{data.end_time}}
+
+
+
+
+ 会员详情
+
+
+
+
+ 订单明细
+
+
+
+
+
+
+
+
+ {{data.store_title}}
+
+
+
+ 商品
+
+
+
+ {{data.title}}
+
+
+ ¥{{data.price}}
+
+
+
+
+ 共计:¥{{data.price}}
+
+
+ 立即购买
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/memberinfos.vue b/pages/user/member/memberinfos.vue
new file mode 100644
index 0000000..5f333a4
--- /dev/null
+++ b/pages/user/member/memberinfos.vue
@@ -0,0 +1,600 @@
+
+
+
+
+
+
+ {{data.title}}
+ {{data.show}}
+
+
+
+ ¥{{data.price}}/{{data.frequ}}次
+ {{data.end_time}}
+
+
+
+
+ 商品
+
+
+
+ {{data.title}}
+
+
+ ¥{{data.price}}
+
+
+
+ {{data.show}}
+
+
+ 权益
+
+
+ {{data.frequ}}次{{data.show}}
+
+
+
+
+ 手机号码{{data.mobile}}
+
+
+ 该号码不会提供给商家,仅用于接收平台通知信息
+
+
+
+
+ 使用说明
+
+
+
+
+
+
+
+
+ 应付金额:
+
+
+ ¥{{data.price}}
+
+
+
+ 立即付款
+
+
+
+ 立即付款
+
+
+
+
+
+
+
+ 【洗剪吹】新娘造型
+
+
+
+ 商品
+
+
+
+ 年卡会员
+
+
+ ¥300
+
+
+
+
+ 共计:¥300
+
+
+ 立即购买
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/memberone.vue b/pages/user/member/memberone.vue
new file mode 100644
index 0000000..db9f9fa
--- /dev/null
+++ b/pages/user/member/memberone.vue
@@ -0,0 +1,339 @@
+
+
+
+
+
+
+
+
+ {{nickname || '暂无昵称'}}
+
+
+
+
+ 可用余额:{{memberlist.money || '0.00'}}
+
+
+
+
+ {{memberlist.vip_number}}
+
+
+
+
+
+
+
+
+
+ 充{{item.amount}}元
+ 送{{item.deliver}}
+
+
+
+
+ 立即充值
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/paycode.vue b/pages/user/member/paycode.vue
new file mode 100644
index 0000000..cd18d4e
--- /dev/null
+++ b/pages/user/member/paycode.vue
@@ -0,0 +1,184 @@
+
+
+
+
+
+ 账户余额:
+ {{formInfo.shopInfo.amount || '0'}}
+
+
+
+
+
+
+
+
+
+ 使用门店:{{formInfo.shopInfo.shopName || '--'}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/qrcode.vue b/pages/user/member/qrcode.vue
new file mode 100644
index 0000000..5979865
--- /dev/null
+++ b/pages/user/member/qrcode.vue
@@ -0,0 +1,38 @@
+
+
+
+
+ 条形码:
+
+
+
+
+ 二维码:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/setPassword.vue b/pages/user/member/setPassword.vue
new file mode 100644
index 0000000..68f34f8
--- /dev/null
+++ b/pages/user/member/setPassword.vue
@@ -0,0 +1,324 @@
+
+
+
+
+
+ 当前账号
+
+
+
+
+
+
+
+ {{ datalist.Recapture }}
+
+
+ {{ datalist.second }}s重新发送
+
+
+
+
+ 新密码
+
+
+
+ 确认密码
+
+
+
+
+
+ 确定
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/member/storedManage.vue b/pages/user/member/storedManage.vue
new file mode 100644
index 0000000..8a8a11e
--- /dev/null
+++ b/pages/user/member/storedManage.vue
@@ -0,0 +1,93 @@
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_info.vue b/pages/user/my_info.vue
deleted file mode 100644
index 112123e..0000000
--- a/pages/user/my_info.vue
+++ /dev/null
@@ -1,453 +0,0 @@
-
-
-
-
-
-
- 头像
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 昵称
-
-
-
-
-
- 账号
-
-
-
-
-
-
-
-
- 请授权手机号
-
-
-
-
- {{phonetitle }}
- 绑定的手机号不能修改
-
-
-
-
-
- 性别
-
- {{sexText}}
-
-
-
-
-
- 生日
-
- {{ birthDay || '生日一旦填写不能修改'}}
-
-
-
-
-
-
-
-
- 绑定微信
-
- 已绑定
-
-
-
-
-
- 保存
-
-
-
-
-
-
diff --git a/pages/user/myself.vue b/pages/user/myself.vue
new file mode 100644
index 0000000..1613931
--- /dev/null
+++ b/pages/user/myself.vue
@@ -0,0 +1,427 @@
+
+
+
+
+
+ 头像
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 昵称
+
+
+
+
+
+ 账号
+
+
+
+
+
+
+
+
+
+
+
+ 请授权手机号
+
+
+
+
+ {{phonetitle }}
+ 绑定的手机号不能修改
+
+
+
+
+
+ 性别
+
+ {{sexText}}
+
+
+
+
+
+ 生日
+
+
+ {{ birthDay || '生日一旦填写不能修改'}}
+
+
+
+
+
+
+
+
+
+ 绑定微信
+
+ 已绑定
+
+
+
+
+
+ 保存
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/repairpasswordtwo.vue b/pages/user/repairpasswordtwo.vue
deleted file mode 100644
index aa857be..0000000
--- a/pages/user/repairpasswordtwo.vue
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
- {{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
-
-
-
- {{consumeFee.slice(0,1)}}
-
-
- {{consumeFee.slice(1,2)}}
-
-
- {{consumeFee.slice(2,3)}}
-
-
- {{consumeFee.slice(3,4)}}
-
-
- {{consumeFee.slice(4,5)}}
-
-
- {{consumeFee.slice(5,6)}}
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/user/user.vue b/pages/user/user.vue
index 4a66e6d..9a09f01 100644
--- a/pages/user/user.vue
+++ b/pages/user/user.vue
@@ -1,31 +1,45 @@
- {{userInfo.nickName || '无'}}
+ {{userInfo.nickName}}
-
-
+
免费入会
-
-
+
我的资产
-
-
- {{item.name}}
- {{item.num || '**'}}
+
+
+
+ 储值
+ {{userInfo.amount || '0'}}
+
+
+
+
+ 积分
+ {{userInfo.accountPoints || 0}}
+
+
+
+
+ 优惠券
+ {{userInfo.couponNum ||'0'}}
@@ -33,8 +47,8 @@
我的功能
-
+
{{item.name}}
@@ -63,28 +77,10 @@
onReady,
onShow
} from '@dcloudio/uni-app'
- const myAssetsList = ref([
- [{
- name: "储值",
- type: "recharge",
- num: 0,
- icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"
- },
- {
- name: "积分",
- type: "points",
- num: 0,
- icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"
- },
- {
- name: "优惠券",
- type: "my_coupon",
- num: 0,
- icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"
- },
- // { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
- ]
- ])
+ import {
+ productStore
+ } from '@/stores/user.js';
+ const store = productStore();
const myFunList = ref([{
name: "我的优惠券",
type: "my_coupon",
@@ -96,11 +92,11 @@
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png"
},
// { name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
- {
- name: "个人资料",
- type: "my_info",
- icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"
- },
+ // {
+ // name: "个人资料",
+ // type: "myself",
+ // icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"
+ // },
{
name: "我的会员卡",
type: "my_member",
@@ -108,15 +104,108 @@
},
// { name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
])
- const shopInfo = reactive({
- isVip: 0
+
+ const userInfo = reactive({})
+
+ const ShopId = ref(uni.cache.get('shopId'))
+
+
+ const clickEvent = () => {
+ if (ShopId.value) {
+ if (userInfo.isVip == 0) {
+ uni.pro.navigateTo('user/member/memberdetails', {
+ shopId: uni.cache.get('shopId')
+ })
+ } else {
+ uni.pro.navigateTo('user/member/paycode', {
+ shopId: uni.cache.get('shopId'),
+ shopInfo: JSON.stringify(uni.cache.get('orderVIP').shopInfo)
+ })
+ }
+ } else {
+ uni.pro.navigateTo('member/list', {
+ type: 'user_payCode'
+ })
+ }
+ }
+
+ // 我的资产
+ const Myassets = () => {
+ if (uni.cache.get('shopId')) {
+ uni.pro.navigateTo('user/member/memberdetails', {
+ shopId: uni.cache.get('shopId'),
+ type: 'index'
+ })
+ } else {
+ uni.pro.navigateTo('user/member/list', {
+ shopId: uni.cache.get('shopId'),
+ type: 'index'
+ })
+ }
+ }
+
+ const clickTo = (item, index) => {
+ let shopId = null;
+ switch (item.type) {
+ case 'my_order':
+ uni.pro.switchTab('order/index')
+ break
+ case 'my_member':
+ uni.pro.navigateTo('user/member/list')
+ break
+ case 'recharge':
+ if (uni.cache.get('shopId') && uni.cache.get('token')) {
+ uni.pro.navigateTo('member/index', {
+ shopId: uni.cache.get('shopId'),
+ type: 'index',
+ })
+ } else {
+ uni.pro.navigateTo('member/list', {
+ type: 'user_recharge'
+ })
+ }
+ break
+ case 'points': //积分
+ if (uni.cache.get('shopId') && uni.cache.get('token')) {
+ uni.pro.navigateTo('/pagesPoints/index/index', {
+ shopId: uni.cache.get('shopId'),
+ type: 'user',
+ })
+ } else {
+ uni.pro.navigateTo('member/list', {
+ type: 'user_points'
+ })
+ }
+ break;
+ case 'my_coupon': //优惠券
+ uni.pro.navigateTo('user/coupon', {
+ shopId: uni.cache.get('shopId') || ''
+ })
+ break;
+ case 'myself': //内部页面
+ uni.pro.navigateTo('user/myself')
+ break;
+ case 'scan_applet':
+ uni.navigateToMiniProgram(JSON.parse(item.value))
+ break
+ case 'absolute': //外链url
+ uni.navigateTo({
+ url: `/pages/webview/webview?url=${item.menuUrl}`
+ });
+ break;
+ }
+ }
+ onShow(() => {
+ store.actionsAPIuser()
+ if (uni.cache.get('shopId')) {
+ Object.assign(userInfo, uni.cache.get('orderVIP'))
+ } else {
+ Object.assign(userInfo, {
+ ...uni.cache.get('userInfo'),
+ ...uni.cache.get('userInfo').assetsSummary
+ })
+ }
})
- const userInfo = reactive({
- nickName: '无名',
- headImg: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png'
- })
- const teblist = ref([])
- const shopExtend = ref(null)
diff --git a/uni_modules/uni-countdown/package.json b/uni_modules/uni-countdown/package.json
new file mode 100644
index 0000000..9ec970b
--- /dev/null
+++ b/uni_modules/uni-countdown/package.json
@@ -0,0 +1,84 @@
+{
+ "id": "uni-countdown",
+ "displayName": "uni-countdown 倒计时",
+ "version": "1.2.4",
+ "description": "CountDown 倒计时组件",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "countdown",
+ "倒计时"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": ["uni-scss"],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-countdown/readme.md b/uni_modules/uni-countdown/readme.md
new file mode 100644
index 0000000..4bcb1aa
--- /dev/null
+++ b/uni_modules/uni-countdown/readme.md
@@ -0,0 +1,10 @@
+
+
+## CountDown 倒计时
+> **组件名:uni-countdown**
+> 代码块: `uCountDown`
+
+倒计时组件。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-countdown)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/uni-scss/changelog.md b/uni_modules/uni-scss/changelog.md
new file mode 100644
index 0000000..b863bb0
--- /dev/null
+++ b/uni_modules/uni-scss/changelog.md
@@ -0,0 +1,8 @@
+## 1.0.3(2022-01-21)
+- 优化 组件示例
+## 1.0.2(2021-11-22)
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
+## 1.0.1(2021-11-22)
+- 修复 vue3中scss语法兼容问题
+## 1.0.0(2021-11-18)
+- init
diff --git a/uni_modules/uni-scss/index.scss b/uni_modules/uni-scss/index.scss
new file mode 100644
index 0000000..1744a5f
--- /dev/null
+++ b/uni_modules/uni-scss/index.scss
@@ -0,0 +1 @@
+@import './styles/index.scss';
diff --git a/uni_modules/uni-scss/package.json b/uni_modules/uni-scss/package.json
new file mode 100644
index 0000000..7cc0ccb
--- /dev/null
+++ b/uni_modules/uni-scss/package.json
@@ -0,0 +1,82 @@
+{
+ "id": "uni-scss",
+ "displayName": "uni-scss 辅助样式",
+ "version": "1.0.3",
+ "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+ "keywords": [
+ "uni-scss",
+ "uni-ui",
+ "辅助样式"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.1.0"
+ },
+ "dcloudext": {
+ "category": [
+ "JS SDK",
+ "通用 SDK"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "n",
+ "联盟": "n"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-scss/readme.md b/uni_modules/uni-scss/readme.md
new file mode 100644
index 0000000..b7d1c25
--- /dev/null
+++ b/uni_modules/uni-scss/readme.md
@@ -0,0 +1,4 @@
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/index.scss b/uni_modules/uni-scss/styles/index.scss
new file mode 100644
index 0000000..ffac4fe
--- /dev/null
+++ b/uni_modules/uni-scss/styles/index.scss
@@ -0,0 +1,7 @@
+@import './setting/_variables.scss';
+@import './setting/_border.scss';
+@import './setting/_color.scss';
+@import './setting/_space.scss';
+@import './setting/_radius.scss';
+@import './setting/_text.scss';
+@import './setting/_styles.scss';
diff --git a/uni_modules/uni-scss/styles/setting/_border.scss b/uni_modules/uni-scss/styles/setting/_border.scss
new file mode 100644
index 0000000..12a11c3
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_border.scss
@@ -0,0 +1,3 @@
+.uni-border {
+ border: 1px $uni-border-1 solid;
+}
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/setting/_color.scss b/uni_modules/uni-scss/styles/setting/_color.scss
new file mode 100644
index 0000000..1ededd9
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_color.scss
@@ -0,0 +1,66 @@
+
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
+// @mixin get-styles($k,$c) {
+// @if $k == size or $k == weight{
+// font-#{$k}:#{$c}
+// }@else{
+// #{$k}:#{$c}
+// }
+// }
+$uni-ui-color:(
+ // 主色
+ primary: $uni-primary,
+ primary-disable: $uni-primary-disable,
+ primary-light: $uni-primary-light,
+ // 辅助色
+ success: $uni-success,
+ success-disable: $uni-success-disable,
+ success-light: $uni-success-light,
+ warning: $uni-warning,
+ warning-disable: $uni-warning-disable,
+ warning-light: $uni-warning-light,
+ error: $uni-error,
+ error-disable: $uni-error-disable,
+ error-light: $uni-error-light,
+ info: $uni-info,
+ info-disable: $uni-info-disable,
+ info-light: $uni-info-light,
+ // 中性色
+ main-color: $uni-main-color,
+ base-color: $uni-base-color,
+ secondary-color: $uni-secondary-color,
+ extra-color: $uni-extra-color,
+ // 背景色
+ bg-color: $uni-bg-color,
+ // 边框颜色
+ border-1: $uni-border-1,
+ border-2: $uni-border-2,
+ border-3: $uni-border-3,
+ border-4: $uni-border-4,
+ // 黑色
+ black:$uni-black,
+ // 白色
+ white:$uni-white,
+ // 透明
+ transparent:$uni-transparent
+) !default;
+@each $key, $child in $uni-ui-color {
+ .uni-#{"" + $key} {
+ color: $child;
+ }
+ .uni-#{"" + $key}-bg {
+ background-color: $child;
+ }
+}
+.uni-shadow-sm {
+ box-shadow: $uni-shadow-sm;
+}
+.uni-shadow-base {
+ box-shadow: $uni-shadow-base;
+}
+.uni-shadow-lg {
+ box-shadow: $uni-shadow-lg;
+}
+.uni-mask {
+ background-color:$uni-mask;
+}
diff --git a/uni_modules/uni-scss/styles/setting/_radius.scss b/uni_modules/uni-scss/styles/setting/_radius.scss
new file mode 100644
index 0000000..9a0428b
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_radius.scss
@@ -0,0 +1,55 @@
+@mixin radius($r,$d:null ,$important: false){
+ $radius-value:map-get($uni-radius, $r) if($important, !important, null);
+ // Key exists within the $uni-radius variable
+ @if (map-has-key($uni-radius, $r) and $d){
+ @if $d == t {
+ border-top-left-radius:$radius-value;
+ border-top-right-radius:$radius-value;
+ }@else if $d == r {
+ border-top-right-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == b {
+ border-bottom-left-radius:$radius-value;
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == l {
+ border-top-left-radius:$radius-value;
+ border-bottom-left-radius:$radius-value;
+ }@else if $d == tl {
+ border-top-left-radius:$radius-value;
+ }@else if $d == tr {
+ border-top-right-radius:$radius-value;
+ }@else if $d == br {
+ border-bottom-right-radius:$radius-value;
+ }@else if $d == bl {
+ border-bottom-left-radius:$radius-value;
+ }
+ }@else{
+ border-radius:$radius-value;
+ }
+}
+
+@each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $key} {
+ @include radius($key)
+ }
+ }@else{
+ .uni-radius {
+ @include radius($key)
+ }
+ }
+}
+
+@each $direction in t, r, b, l,tl, tr, br, bl {
+ @each $key, $child in $uni-radius {
+ @if($key){
+ .uni-radius-#{"" + $direction}-#{"" + $key} {
+ @include radius($key,$direction,false)
+ }
+ }@else{
+ .uni-radius-#{$direction} {
+ @include radius($key,$direction,false)
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-scss/styles/setting/_space.scss b/uni_modules/uni-scss/styles/setting/_space.scss
new file mode 100644
index 0000000..3c89528
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_space.scss
@@ -0,0 +1,56 @@
+
+@mixin fn($space,$direction,$size,$n) {
+ @if $n {
+ #{$space}-#{$direction}: #{$size*$uni-space-root}px
+ } @else {
+ #{$space}-#{$direction}: #{-$size*$uni-space-root}px
+ }
+}
+@mixin get-styles($direction,$i,$space,$n){
+ @if $direction == t {
+ @include fn($space, top,$i,$n);
+ }
+ @if $direction == r {
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == b {
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == l {
+ @include fn($space, left,$i,$n);
+ }
+ @if $direction == x {
+ @include fn($space, left,$i,$n);
+ @include fn($space, right,$i,$n);
+ }
+ @if $direction == y {
+ @include fn($space, top,$i,$n);
+ @include fn($space, bottom,$i,$n);
+ }
+ @if $direction == a {
+ @if $n {
+ #{$space}:#{$i*$uni-space-root}px;
+ } @else {
+ #{$space}:#{-$i*$uni-space-root}px;
+ }
+ }
+}
+
+@each $orientation in m,p {
+ $space: margin;
+ @if $orientation == m {
+ $space: margin;
+ } @else {
+ $space: padding;
+ }
+ @for $i from 0 through 16 {
+ @each $direction in t, r, b, l, x, y, a {
+ .uni-#{$orientation}#{$direction}-#{$i} {
+ @include get-styles($direction,$i,$space,true);
+ }
+ .uni-#{$orientation}#{$direction}-n#{$i} {
+ @include get-styles($direction,$i,$space,false);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-scss/styles/setting/_styles.scss b/uni_modules/uni-scss/styles/setting/_styles.scss
new file mode 100644
index 0000000..689afec
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_styles.scss
@@ -0,0 +1,167 @@
+/* #ifndef APP-NVUE */
+
+$-color-white:#fff;
+$-color-black:#000;
+@mixin base-style($color) {
+ color: #fff;
+ background-color: $color;
+ border-color: mix($-color-black, $color, 8%);
+ &:not([hover-class]):active {
+ background: mix($-color-black, $color, 10%);
+ border-color: mix($-color-black, $color, 20%);
+ color: $-color-white;
+ outline: none;
+ }
+}
+@mixin is-color($color) {
+ @include base-style($color);
+ &[loading] {
+ @include base-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &[loading],
+ &:not([hover-class]):active {
+ color: $-color-white;
+ border-color: mix(darken($color,10%), $-color-white);
+ background-color: mix($color, $-color-white);
+ }
+ }
+
+}
+@mixin base-plain-style($color) {
+ color:$color;
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 70%);
+ &:not([hover-class]):active {
+ background: mix($-color-white, $color, 80%);
+ color: $color;
+ outline: none;
+ border-color: mix($-color-white, $color, 50%);
+ }
+}
+@mixin is-plain($color){
+ &[plain] {
+ @include base-plain-style($color);
+ &[loading] {
+ @include base-plain-style($color);
+ &::before {
+ margin-right:5px;
+ }
+ }
+ &[disabled] {
+ &,
+ &:active {
+ color: mix($-color-white, $color, 40%);
+ background-color: mix($-color-white, $color, 90%);
+ border-color: mix($-color-white, $color, 80%);
+ }
+ }
+ }
+}
+
+
+.uni-btn {
+ margin: 5px;
+ color: #393939;
+ border:1px solid #ccc;
+ font-size: 16px;
+ font-weight: 200;
+ background-color: #F9F9F9;
+ // TODO 暂时处理边框隐藏一边的问题
+ overflow: visible;
+ &::after{
+ border: none;
+ }
+
+ &:not([type]),&[type=default] {
+ color: #999;
+ &[loading] {
+ background: none;
+ &::before {
+ margin-right:5px;
+ }
+ }
+
+
+
+ &[disabled]{
+ color: mix($-color-white, #999, 60%);
+ &,
+ &[loading],
+ &:active {
+ color: mix($-color-white, #999, 60%);
+ background-color: mix($-color-white,$-color-black , 98%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+
+ &[plain] {
+ color: #999;
+ background: none;
+ border-color: $uni-border-1;
+ &:not([hover-class]):active {
+ background: none;
+ color: mix($-color-white, $-color-black, 80%);
+ border-color: mix($-color-white, $-color-black, 90%);
+ outline: none;
+ }
+ &[disabled]{
+ &,
+ &[loading],
+ &:active {
+ background: none;
+ color: mix($-color-white, #999, 60%);
+ border-color: mix($-color-white, #999, 85%);
+ }
+ }
+ }
+ }
+
+ &:not([hover-class]):active {
+ color: mix($-color-white, $-color-black, 50%);
+ }
+
+ &[size=mini] {
+ font-size: 16px;
+ font-weight: 200;
+ border-radius: 8px;
+ }
+
+
+
+ &.uni-btn-small {
+ font-size: 14px;
+ }
+ &.uni-btn-mini {
+ font-size: 12px;
+ }
+
+ &.uni-btn-radius {
+ border-radius: 999px;
+ }
+ &[type=primary] {
+ @include is-color($uni-primary);
+ @include is-plain($uni-primary)
+ }
+ &[type=success] {
+ @include is-color($uni-success);
+ @include is-plain($uni-success)
+ }
+ &[type=error] {
+ @include is-color($uni-error);
+ @include is-plain($uni-error)
+ }
+ &[type=warning] {
+ @include is-color($uni-warning);
+ @include is-plain($uni-warning)
+ }
+ &[type=info] {
+ @include is-color($uni-info);
+ @include is-plain($uni-info)
+ }
+}
+/* #endif */
diff --git a/uni_modules/uni-scss/styles/setting/_text.scss b/uni_modules/uni-scss/styles/setting/_text.scss
new file mode 100644
index 0000000..a34d08f
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_text.scss
@@ -0,0 +1,24 @@
+@mixin get-styles($k,$c) {
+ @if $k == size or $k == weight{
+ font-#{$k}:#{$c}
+ }@else{
+ #{$k}:#{$c}
+ }
+}
+
+@each $key, $child in $uni-headings {
+ /* #ifndef APP-NVUE */
+ .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+ /* #ifdef APP-NVUE */
+ .container .uni-#{$key} {
+ @each $k, $c in $child {
+ @include get-styles($k,$c)
+ }
+ }
+ /* #endif */
+}
diff --git a/uni_modules/uni-scss/styles/setting/_variables.scss b/uni_modules/uni-scss/styles/setting/_variables.scss
new file mode 100644
index 0000000..557d3d7
--- /dev/null
+++ b/uni_modules/uni-scss/styles/setting/_variables.scss
@@ -0,0 +1,146 @@
+// @use "sass:math";
+@import '../tools/functions.scss';
+// 间距基础倍数
+$uni-space-root: 2 !default;
+// 边框半径默认值
+$uni-radius-root:5px !default;
+$uni-radius: () !default;
+// 边框半径断点
+$uni-radius: map-deep-merge(
+ (
+ 0: 0,
+ // TODO 当前版本暂时不支持 sm 属性
+ // 'sm': math.div($uni-radius-root, 2),
+ null: $uni-radius-root,
+ 'lg': $uni-radius-root * 2,
+ 'xl': $uni-radius-root * 6,
+ 'pill': 9999px,
+ 'circle': 50%
+ ),
+ $uni-radius
+);
+// 字体家族
+$body-font-family: 'Roboto', sans-serif !default;
+// 文本
+$heading-font-family: $body-font-family !default;
+$uni-headings: () !default;
+$letterSpacing: -0.01562em;
+$uni-headings: map-deep-merge(
+ (
+ 'h1': (
+ size: 32px,
+ weight: 300,
+ line-height: 50px,
+ // letter-spacing:-0.01562em
+ ),
+ 'h2': (
+ size: 28px,
+ weight: 300,
+ line-height: 40px,
+ // letter-spacing: -0.00833em
+ ),
+ 'h3': (
+ size: 24px,
+ weight: 400,
+ line-height: 32px,
+ // letter-spacing: normal
+ ),
+ 'h4': (
+ size: 20px,
+ weight: 400,
+ line-height: 30px,
+ // letter-spacing: 0.00735em
+ ),
+ 'h5': (
+ size: 16px,
+ weight: 400,
+ line-height: 24px,
+ // letter-spacing: normal
+ ),
+ 'h6': (
+ size: 14px,
+ weight: 500,
+ line-height: 18px,
+ // letter-spacing: 0.0125em
+ ),
+ 'subtitle': (
+ size: 12px,
+ weight: 400,
+ line-height: 20px,
+ // letter-spacing: 0.00937em
+ ),
+ 'body': (
+ font-size: 14px,
+ font-weight: 400,
+ line-height: 22px,
+ // letter-spacing: 0.03125em
+ ),
+ 'caption': (
+ 'size': 12px,
+ 'weight': 400,
+ 'line-height': 20px,
+ // 'letter-spacing': 0.03333em,
+ // 'text-transform': false
+ )
+ ),
+ $uni-headings
+);
+
+
+
+// 主色
+$uni-primary: #2979ff !default;
+$uni-primary-disable:lighten($uni-primary,20%) !default;
+$uni-primary-light: lighten($uni-primary,25%) !default;
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37 !default;
+$uni-success-disable:lighten($uni-success,20%) !default;
+$uni-success-light: lighten($uni-success,25%) !default;
+
+$uni-warning: #f3a73f !default;
+$uni-warning-disable:lighten($uni-warning,20%) !default;
+$uni-warning-light: lighten($uni-warning,25%) !default;
+
+$uni-error: #e43d33 !default;
+$uni-error-disable:lighten($uni-error,20%) !default;
+$uni-error-light: lighten($uni-error,25%) !default;
+
+$uni-info: #8f939c !default;
+$uni-info-disable:lighten($uni-info,20%) !default;
+$uni-info-light: lighten($uni-info,25%) !default;
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a !default; // 主要文字
+$uni-base-color: #6a6a6a !default; // 常规文字
+$uni-secondary-color: #909399 !default; // 次要文字
+$uni-extra-color: #c7c7c7 !default; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0 !default;
+$uni-border-2: #EDEDED !default;
+$uni-border-3: #DCDCDC !default;
+$uni-border-4: #B9B9B9 !default;
+
+// 常规色
+$uni-black: #000000 !default;
+$uni-white: #ffffff !default;
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
+
+// 背景色
+$uni-bg-color: #f7f7f7 !default;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px !default;
+$uni-spacing-base: 15px !default;
+$uni-spacing-lg: 30px !default;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
diff --git a/uni_modules/uni-scss/styles/tools/functions.scss b/uni_modules/uni-scss/styles/tools/functions.scss
new file mode 100644
index 0000000..ac6f63e
--- /dev/null
+++ b/uni_modules/uni-scss/styles/tools/functions.scss
@@ -0,0 +1,19 @@
+// 合并 map
+@function map-deep-merge($parent-map, $child-map){
+ $result: $parent-map;
+ @each $key, $child in $child-map {
+ $parent-has-key: map-has-key($result, $key);
+ $parent-value: map-get($result, $key);
+ $parent-type: type-of($parent-value);
+ $child-type: type-of($child);
+ $parent-is-map: $parent-type == map;
+ $child-is-map: $child-type == map;
+
+ @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
+ $result: map-merge($result, ( $key: $child ));
+ }@else {
+ $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
+ }
+ }
+ @return $result;
+};
diff --git a/uni_modules/uni-scss/theme.scss b/uni_modules/uni-scss/theme.scss
new file mode 100644
index 0000000..80ee62f
--- /dev/null
+++ b/uni_modules/uni-scss/theme.scss
@@ -0,0 +1,31 @@
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+// 主色
+$uni-primary: #2979ff;
+// 辅助色
+$uni-success: #4cd964;
+// 警告色
+$uni-warning: #f0ad4e;
+// 错误色
+$uni-error: #dd524d;
+// 描述色
+$uni-info: #909399;
+// 中性色
+$uni-main-color: #303133;
+$uni-base-color: #606266;
+$uni-secondary-color: #909399;
+$uni-extra-color: #C0C4CC;
+// 背景色
+$uni-bg-color: #f5f5f5;
+// 边框颜色
+$uni-border-1: #DCDFE6;
+$uni-border-2: #E4E7ED;
+$uni-border-3: #EBEEF5;
+$uni-border-4: #F2F6FC;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
diff --git a/uni_modules/uni-scss/variables.scss b/uni_modules/uni-scss/variables.scss
new file mode 100644
index 0000000..1c062d4
--- /dev/null
+++ b/uni_modules/uni-scss/variables.scss
@@ -0,0 +1,62 @@
+@import './styles/setting/_variables.scss';
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+
+// 主色
+$uni-primary: #2979ff;
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
+$uni-primary-light: mix(#fff,$uni-primary,80%);
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37;
+$uni-success-disable:mix(#fff,$uni-success,50%);
+$uni-success-light: mix(#fff,$uni-success,80%);
+
+$uni-warning: #f3a73f;
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
+$uni-warning-light: mix(#fff,$uni-warning,80%);
+
+$uni-error: #e43d33;
+$uni-error-disable:mix(#fff,$uni-error,50%);
+$uni-error-light: mix(#fff,$uni-error,80%);
+
+$uni-info: #8f939c;
+$uni-info-disable:mix(#fff,$uni-info,50%);
+$uni-info-light: mix(#fff,$uni-info,80%);
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a; // 主要文字
+$uni-base-color: #6a6a6a; // 常规文字
+$uni-secondary-color: #909399; // 次要文字
+$uni-extra-color: #c7c7c7; // 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0;
+$uni-border-2: #EDEDED;
+$uni-border-3: #DCDCDC;
+$uni-border-4: #B9B9B9;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
+
+// 背景色
+$uni-bg-color: #f7f7f7;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px;
+$uni-spacing-base: 15px;
+$uni-spacing-lg: 30px;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4);
diff --git a/vite.config.js b/vite.config.js
index 106ebfa..c04048e 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -9,7 +9,7 @@ export default defineConfig({
hmr: true,
proxy: {
'/api': {
- target: 'https://cashier.sxczgkj.cn',
+ target: 'https://tapi.cashier.sxczgkj.cn',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
secure: false