Compare commits

..

1 Commits

Author SHA1 Message Date
cjl520cy e979d83902 提交 2026-04-03 14:52:28 +08:00
3178 changed files with 736570 additions and 61055 deletions

View File

@ -1,15 +0,0 @@
{
"version" : "1.0",
"configurations" : [
{
"customPlaygroundType" : "local",
"playground" : "custom",
"type" : "uni-app:app-ios"
},
{
"customPlaygroundType" : "local",
"playground" : "custom",
"type" : "uni-app:app-android"
}
]
}

540
App.vue
View File

@ -1,285 +1,299 @@
<script> <script>
// #ifdef APP-PLUS // #ifdef APP-PLUS
import { import {
isNotificationsEnabled, isNotificationsEnabled,
permissions, permissions,
registPush registPush
} from '@/utils/AS-NotifyTheAuthority.js' } from '@/utils/AS-NotifyTheAuthority.js'
import { import {
permissionListener permissionListener
} from './utils/permissionTips.js' } from './utils/permissionTips.js'
// import { appUpdateListener } from '@/common/utils/appUpdateTips.js' // import { appUpdateListener } from '@/common/utils/appUpdateTips.js'
import locationService from './utils/locationService.js' import locationService from './utils/locationService.js'
// import uploadApp from './utils/uploadApp.js' // import uploadApp from './utils/uploadApp.js'
// #endif // #endif
import request from './utils/request' import request from './utils/request'
import { import {
setVersion setVersion
} from './utils/version.js' } from './utils/version.js'
// //
const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns'); const aLiSDKModule = uni.requireNativePlugin('AliCloud-NirvanaPns');
export default { export default {
globalData: { globalData: {
artisanType: 2, artisanType: null,
latitude: '38.366667', latitude: '38.366667',
longitude: '117.333333', longitude: '117.333333',
address: '黄骅市', address: '黄骅市',
servers_region: `河北省-沧州市-黄骅市`, servers_region: `河北省-沧州市-黄骅市`,
deviceid: '', deviceid: '',
addressRes: { addressRes: {
"type": "gcj02", "type": "gcj02",
"altitude": 0, "altitude": 0,
"latitude": 38.372266, "latitude": 38.372266,
"longitude": 117.332895, "longitude": 117.332895,
"speed": 0, "speed": 0,
"accuracy": 30, "accuracy": 30,
"adcode": "130983",
"cCode": "130900",
"pcode": "130000",
"address": {
"country": "中国",
"province": "河北省",
"city": "沧州市",
"district": "黄骅市",
"street": "渤海西路",
"streetNum": "35号",
// "poiName": "",
"poiName": "黄骅市人民政府",
"cityCode": "0317",
"adcode": "130983", "adcode": "130983",
"cCode": "130900", "cCode": "130900",
"pcode": "130000", "pcode": "130000",
"address": {
"country": "中国",
"province": "河北省",
"city": "沧州市",
"district": "黄骅市",
"street": "渤海西路",
"streetNum": "35号",
// "poiName": "",
"poiName": "黄骅市人民政府",
"cityCode": "0317",
"adcode": "130983",
"cCode": "130900",
"pcode": "130000",
}
} }
} },
}, onLaunch: async function() {
onLaunch: async function () { // plus.android.requestPermissions(['POST_NOTIFICATIONS'], function(e) {
// #ifdef APP-PLUS // console.log('1111111111' + e.deniedAlways.length);
uni.hideTabBar(); // if (e.deniedAlways.length > 0) { //
if (uni.getStorageSync('accessToken')) { // //
registPush() // console.log('Always Denied!!! ' + e.deniedAlways.toString());
// }
// if (e.deniedPresent.length > 0) { //
// // plus.android.requestPermissions
// console.log('Present Denied!!! ' + e.deniedPresent.toString());
// }
// if (e.granted.length > 0) { //
// //
// console.log('Granted!!! ' + e.granted.toString());
// }
// }, function(e) {
// console.log('Request Permissions error:' + JSON.stringify(e));
// });
// #ifdef APP-PLUS
if (uni.getStorageSync('accessToken')) {
registPush()
}
// #endif
// //
this.messageUpudateNum() this.messageUpudateNum()
}
// #endif
// //Tabar
// await setVersion() uni.hideTabBar({
animation: true
});
//
// await setVersion()
//访 //访
// GET // GET
let version = uni.getStorageSync('setVersion') let version = uni.getStorageSync('setVersion')
let baseUrl let baseUrl
await uni.request({ await uni.request({
url: 'https://api.mrrwlkj.top/api/openPuc/getSjApiUrl', // url: 'https://app.mrrweb.com.cn/api/openPuc/getApiUrl', //
method: 'GET', // GET method: 'GET', // GET
header: { header: {
'Content-Type': 'application/json', // 'Content-Type': 'application/json', //
'VersionCode': version.VersionCode, 'VersionCode': version.VersionCode,
'DeviceBrand': version.DeviceBrand, 'DeviceBrand': version.DeviceBrand,
'DeviceType': version.DeviceType 'DeviceType': version.DeviceType
}, },
success: (res) => { success: (res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN
uni.setStorageSync('baseUrl', res.data.data.url) uni.setStorageSync('baseUrl', res.data.data.url)
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.setStorageSync('baseUrl', res.data.data.url) wx.setStorageSync('baseUrl', res.data.data.url)
// #endif // #endif
this.$store.commit("setLocation", true) this.$store.commit("setLocation", true)
}
console.log('请求成功', res.data);
},
fail: (err) => {
console.log('请求失败', err);
},
complete: () => {
console.log('请求完成(无论成功失败都会执行)');
}
});
// #ifdef APP-PLUS
//
plus.screen.lockOrientation("portrait-primary")
// #endif
// #ifdef APP-PLUS
//
let systemInfo = uni.getSystemInfoSync();
let platform = systemInfo.platform;
if (platform === 'android') {
// console.log('')
permissionListener()
} else if (platform === 'ios') {
// console.log('')
} else {
// console.log('')
}
//
let sdkInfo = '';
//
if (platform == 'android') {
//SDK
aLiSDKModule.setLoggerEnable(true);
aLiSDKModule.expandAuthPageCheckedScope(true);
//
//aLiSDKModule.closeAuthPageReturnBack(true);
//
aLiSDKModule.userControlAuthPageCancel();
//
aLiSDKModule.setAuthPageUseDayLight(false);
sdkInfo =
'cvJWYFO9s7xgJrzD+Ok2m2kCh3x0kdRkfJzGI0oxnyUXGlNAwAzvj87Yd6y030BWposVHUT84av2adBG9SdHl5CJpL0mGi+BRtachnyADJjfdpkJC0e0Uqb45pO7h7ZZvT+sNWQs1sa4JpL0U7hYKkgCP1iVXHoA1zKfzZynON6eKyvkzL1xpoPPag4O50slww4+6XuRVplCOSNCcsLRtot4CYnfsdcMvlV34MY5qB/rV+HNb1velpx4rg5atk3iTEiSLjla69c6pOT6vpjkK1qFVpNMxrEY';
} else if (platform == 'ios') {
sdkInfo =
'BONXQSabNMt1a8Cru1TjeW94aXen5rQHeAxzLGgpFzIUicDYeb9SD0l35MkKvjq7gQemE2HDp6B7adKZ8nrdUk4wgg1LIYSGDYVSc/Q1CwrJ9A3lMUeBfS1UUu3nBBg58bDvG1bl3j6tS4h6FjnYmP5+dDsyqb0YNmIhlSmia5Et7cfBMv2OT85N9WLJc/tOMQ9ZQCnuizKVlofkmDGFgjsBN/Bf2gLq6lTQyVqsgPJE5yEPd4riNg=='
}
aLiSDKModule.setAuthSDKInfo(sdkInfo)
// await uploadApp.uploadApp('onLaunch');
// #endif
console.log('App Launch')
this.globalData.deviceId = uni.getDeviceInfo().deviceId;
// this.globalData.deviceid = 'AC6F605124DFA87DCE40D5C062C94C3B';
// #ifndef MP-WEIXIN
if (uni.getStorageSync('refreshToken')) {
let endTime = uni.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
uni.removeStorageSync('accessToken')
uni.removeStorageSync('refreshToken')
}
}
// #endif
// #ifdef MP-WEIXIN
if (wx.getStorageSync('refreshToken')) {
let endTime = wx.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
wx.removeStorageSync('accessToken')
wx.removeStorageSync('refreshToken')
}
}
// #endif
},
onShow: function () {
uni.hideTabBar();
console.log('App Show')
uni.$emit('appShowRefresh')
},
onHide: function () {
console.log('App Hide')
},
methods: {
//
verifyLogin() {
if (!vuex.state.userInfo.token) {
uni.showModal({
title: '提示',
content: '您需要登陆后才能进行此操作',
confirmColor: '#F1AC66',
success(e) {
if (e.confirm) {
// uni.oprPresentLogin()
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
}
} }
}) console.log('请求成功', res.data);
},
fail: (err) => {
console.log('请求失败', err);
},
complete: () => {
console.log('请求完成(无论成功失败都会执行)');
}
});
// #ifdef APP-PLUS
//
plus.screen.lockOrientation("portrait-primary")
// #endif
// #ifdef APP-PLUS
//
let systemInfo = uni.getSystemInfoSync();
let platform = systemInfo.platform;
if (platform === 'android') {
// console.log('')
permissionListener()
} else if (platform === 'ios') {
// console.log('')
} else { } else {
return true // console.log('')
}
},
/**
* /县adcode转换为6位市adcode后两位补0
* @param {string|number} districtAdcode - 6位区/县编码字符串或数字类型
* @returns {string|null} 6位市编码无效编码返回null
*/
districtAdcodeTo6DigitCityAdcode(districtAdcode) {
// 1.
const adcodeStr = String(districtAdcode).trim();
// 2. 6
const adcodeReg = /^\d{6}$/;
if (!adcodeReg.test(adcodeStr)) {
console.warn('无效的区/县编码必须是6位数字');
return null;
} }
// 3. 4 + "00" 6 //
const cityAdcode4Digit = adcodeStr.slice(0, 4); let sdkInfo = '';
const cityAdcode6Digit = cityAdcode4Digit + '00'; //
if (platform == 'android') {
// 4. 6 //SDK
if (!/^\d{6}$/.test(cityAdcode6Digit)) { aLiSDKModule.setLoggerEnable(true);
console.warn('编码转换异常'); aLiSDKModule.expandAuthPageCheckedScope(true);
return null; //
//aLiSDKModule.closeAuthPageReturnBack(true);
//
aLiSDKModule.userControlAuthPageCancel();
//
aLiSDKModule.setAuthPageUseDayLight(false);
sdkInfo =
'VXQhWWtyx6hqQIh6W8oMB2Kdzarg+2TSlQOvRb8fCUA1ygRWUKLsYkTuncn1VB1EK5gVvwoYZNXPF26x853cRzOfYW+lLKDNjMX7QZFgift8remIOFof9wjwyZFuHW2gBQAef6O6vxXeobInLVmJ/6sPqpJylk0ipYe+KBkEhKwiaNZudEHGrTFMQ2PvaNNjnnIWTB6WQJRTljArPvbgVT4FjXTwY8BJlFBR84CGE4k6HRRs1/ov1cBbON3zz6xE9DUlJhS43eEYVRYosJxrfDHfgz+++CfjinSGOX1m474=';
} else if (platform == 'ios') {
sdkInfo =
'+4L59pm2xfA84cMIyUc4//tTAznhbtCGZ5bXa3Ax8UUTCH3IwxX0F0o8gVw7eanDoI3XVvriXMpQA3wcnAEbBD75JswXKAG0+ekz2cVUAgpHLGU3rDkakqTyRC9LIS4aHsJ/i9yv94tEAifXkxlIzdmZbT6dyYAexeJL6dLd6olEnFuKaaSRRl0VBtvSC5HQKlYqRZQ82ljIpAWCqaDG74lvsKfdxKU0wQPBQPzO15nJQOSfLIQpRsBm8STvkmeR'
} }
aLiSDKModule.setAuthSDKInfo(sdkInfo)
return cityAdcode6Digit;
// await uploadApp.uploadApp('onLaunch');
// #endif
console.log('App Launch')
this.globalData.deviceId = uni.getDeviceInfo().deviceId;
// this.globalData.deviceid = 'AC6F605124DFA87DCE40D5C062C94C3B';
// #ifndef MP-WEIXIN
if (uni.getStorageSync('refreshToken')) {
let endTime = uni.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
uni.removeStorageSync('accessToken')
uni.removeStorageSync('refreshToken')
}
}
// #endif
// #ifdef MP-WEIXIN
if (wx.getStorageSync('refreshToken')) {
let endTime = wx.getStorageSync('refresh_token_expries');
endTime = new Date(endTime)
//
var nowTime = new Date();
var residueTime = (endTime.getTime() - nowTime.getTime() / 1000);
// 4 14400
if (residueTime < 4 * 60 * 60) {
console.log('----------------------------')
wx.removeStorageSync('accessToken')
wx.removeStorageSync('refreshToken')
}
}
// #endif
}, },
// onShow: function() {
updateAddress(item) { //Tabar
console.log('item', item) uni.hideTabBar()
let location = item.location.split(','); console.log('App Show')
this.globalData.latitude = location[1];
this.globalData.longitude = location[0];
this.globalData.address = item.name;
this.globalData.servers_region = `${item.pname}-${item.cityname}-${item.adname}`;
this.globalData.pcode = item.pcode;
this.globalData.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.adcode = item.adcode;
//
this.globalData.addressRes.latitude = location[1];
this.globalData.addressRes.longitude = location[0];
this.globalData.addressRes.address.province = item.pname;
this.globalData.addressRes.address.city = item.cityname;
this.globalData.addressRes.address.district = item.adname;
this.globalData.addressRes.address.street = item.address;
this.globalData.addressRes.address.poiName = item.name;
this.globalData.addressRes.address.streetNum = '';
this.globalData.addressRes.address.cityCode = '';
this.globalData.addressRes.address.pcode = item.pcode;
this.globalData.addressRes.address.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.address.adcode = item.adcode;
this.globalData.addressRes.pcode = item.pcode;
this.globalData.addressRes.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.adcode = item.adcode;
console.log('globalData', this.globalData)
uni.setStorageSync('userAdrees', this.globalData)
}, },
onHide: function() {
console.log('App Hide')
},
methods: {
//
verifyLogin() {
if (!vuex.state.userInfo.token) {
uni.showModal({
title: '提示',
content: '您需要登陆后才能进行此操作',
confirmColor: '#F1AC66',
success(e) {
if (e.confirm) {
// uni.oprPresentLogin()
uni.navigateTo({
url: '/pages/blogPopup/blogPopup'
});
}
}
})
} else {
return true
}
},
/**
* /县adcode转换为6位市adcode后两位补0
* @param {string|number} districtAdcode - 6位区/县编码字符串或数字类型
* @returns {string|null} 6位市编码无效编码返回null
*/
districtAdcodeTo6DigitCityAdcode(districtAdcode) {
// 1.
const adcodeStr = String(districtAdcode).trim();
// 2. 6
const adcodeReg = /^\d{6}$/;
if (!adcodeReg.test(adcodeStr)) {
console.warn('无效的区/县编码必须是6位数字');
return null;
}
// 3. 4 + "00" 6
const cityAdcode4Digit = adcodeStr.slice(0, 4);
const cityAdcode6Digit = cityAdcode4Digit + '00';
// 4. 6
if (!/^\d{6}$/.test(cityAdcode6Digit)) {
console.warn('编码转换异常');
return null;
}
return cityAdcode6Digit;
},
//
updateAddress(item) {
console.log('item', item)
let location = item.location.split(',');
this.globalData.latitude = location[1];
this.globalData.longitude = location[0];
this.globalData.address = item.name;
this.globalData.servers_region = `${item.pname}-${item.cityname}-${item.adname}`;
this.globalData.pcode = item.pcode;
this.globalData.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.adcode = item.adcode;
//
this.globalData.addressRes.latitude = location[1];
this.globalData.addressRes.longitude = location[0];
this.globalData.addressRes.address.province = item.pname;
this.globalData.addressRes.address.city = item.cityname;
this.globalData.addressRes.address.district = item.adname;
this.globalData.addressRes.address.street = item.address;
this.globalData.addressRes.address.poiName = item.name;
this.globalData.addressRes.address.streetNum = '';
this.globalData.addressRes.address.cityCode = '';
this.globalData.addressRes.address.pcode = item.pcode;
this.globalData.addressRes.address.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.address.adcode = item.adcode;
this.globalData.addressRes.pcode = item.pcode;
this.globalData.addressRes.cCode = this.districtAdcodeTo6DigitCityAdcode(item.adcode);
this.globalData.addressRes.adcode = item.adcode;
console.log('globalData', this.globalData)
uni.setStorageSync('userAdrees', this.globalData)
},
}
} }
}
</script> </script>
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
@import '@/static/css/common.css'; @import '@/static/css/common.css';
</style>
/* App.vue全局style */
page,
html,
body {
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
}
</style>

View File

@ -1,92 +0,0 @@
# 改动记录
## 2026-06-12
### 后台长时间运行后首页登录态不同步
问题现象:
- APP 后台运行较长时间后再次进入。
- 商家首页显示未登录或无法及时获取商家信息。
- “我的”页面仍显示已登录。
- 从“我的”页面切回首页后,首页才能正常获取商家信息。
涉及文件:
- `App.vue`
- `pages/home/home.vue`
- `utils/request.js`
改动内容:
- `App.vue`
- 在全局 `onShow` 中新增 `uni.$emit('appShowRefresh')`
- APP 从后台恢复前台时主动通知页面刷新状态,避免只依赖页面级 `onShow`
- `pages/home/home.vue`
- 新增 `refreshPageState` 方法,统一处理首页登录态刷新。
- `onShow`、下拉刷新、APP 前台恢复事件都调用同一套刷新逻辑。
- `onLoad` 注册 `appShowRefresh` 事件。
- `onUnload` 解除 `appShowRefresh` 事件,避免重复监听。
- 有 token 时主动重新请求 `/sj/user/getUser`
- 无 token 时清空 `userInfo`、`authDetails`、`sjId`,并重置 `isUserInfoLoaded`
- `getUserInfo` 请求成功后显式设置 `isLogin = true``isUserInfoLoaded = true`
- `getUserInfo` 请求失败时,如果本地 token 已被清理,则同步首页为未登录状态。
- `utils/request.js`
- `refreshToken` 兼容后端返回结构:
- 支持 token 在 `res.access_token`
- 支持 token 在 `res.data.access_token`
- 刷新 token 成功后同步更新:
- `accessToken`
- `refreshToken`
- `refresh_token_expries`
- 如果刷新接口成功但没有返回 `access_token`,主动抛错,避免写入 `undefined` token。
验证情况:
- 已检查相关 diff未做全文件重构。
- `pages/home/home.vue` 原文件为 CRLF 行尾;为避免整文件行尾改造造成大面积 diff本次保留原行尾。
- 项目 `package.json` 未配置 build/lint 脚本,未执行完整构建校验。
### 订单详情顾客头像被挤压
问题现象:
- `pages/shop/SellerDetail` 页面“顾客信息”一栏中,客户头像在部分图片比例下显示被拉伸或挤压。
涉及文件:
- `pages/shop/SellerDetail.vue`
改动内容:
- 给顾客头像 `<image>` 增加 `mode="aspectFill"`,按头像容器比例裁剪填充,避免原图比例不一致时被拉伸。
- 为 `.shop_photo` 增加 `min-width``min-height`,在 flex 布局中进一步锁定头像为固定正方形尺寸。
验证情况:
- 已执行 `pages/shop/SellerDetail.vue``CHANGE_RECORD.md` 的空白格式检查。
### 核销成功后工时/工位订单详情跳转错误
问题现象:
- 商家扫码核销或输入核销码核销成功后,工时订单和工位订单跳转到详情页时参数或页面类型不正确。
- 工时订单会进入工位详情链路,工位订单会落到普通订单详情链路。
涉及文件:
- `pages/shop/verify/verify-order-detail.vue`
改动内容:
- 新增 `getOrderDetailUrl`,统一按 `order_type` 生成核销成功后的详情页地址。
- `order_type=3` 工时订单跳转到 `/pages/shop/SellerDetail?order_id=...&identity=1`,使用手艺人工时订单详情链路。
- `order_type=4` 工位订单跳转到 `/pages/shop/SellerDetail?order_id=...`,使用商家工位订单详情链路。
- `order_type=6` 自营订单跳转普通订单详情并携带 `serviceType=2`
- 其他普通订单跳转普通订单详情,不再误携带自营参数。
验证情况:
- 已执行 `pages/shop/verify/verify-order-detail.vue``CHANGE_RECORD.md` 的空白格式检查。

27
Info.plist Normal file
View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WeChat</key>
<dict>
<key>appid</key>
<string>wx5b1c0c8d01ded35d</string>
<key>universalLink</key>
<string>https://app.mrrweb.com.cn/</string>
</dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>WeChat</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx5b1c0c8d01ded35d</string>
</array>
</dict>
</array>
</dict>
</plist>

View File

@ -2,7 +2,7 @@
"version" : "1", "version" : "1",
"prompt" : "template", "prompt" : "template",
"title" : "美融融平台服务协议及隐私政策", "title" : "美融融平台服务协议及隐私政策",
"message" : "您注册为美融融用户的过程中,需要完成我们的注册流程并且以点击的形式在线签署以下协议, 请您务必仔细阅读、充分理解协议中的条款内容后点击同意: <a href=\"https://www.mrrweb.com.cn/junit/system/sjappzcxy\">《美融融商家服务协议》</a>和<a href=\"https://www.mrrweb.com.cn/junit/system/sjappyszc\">《隐私政策》</a>", "message" : "您注册为美融融用户的过程中,需要完成我们的注册流程并且以点击的形式在线签署以下协议, 请您务必仔细阅读、充分理解协议中的条款内容后点击同意: <a href=\"https://www.mrrweb.com.cn/junit/system/yhxy\">《美融融平台服务协议》</a>和<a href=\"https://www.mrrweb.com.cn/junit/system/yszc\">《隐私政策》</a>",
"buttonAccept" : "同意", "buttonAccept" : "同意",
"buttonRefuse" : "不同意", "buttonRefuse" : "不同意",
"hrefLoader" : "system", "hrefLoader" : "system",

View File

@ -3,7 +3,7 @@
"apps": [], "apps": [],
"details": [ "details": [
{ {
"appID": "wx17eef65c270b4869", "appID": "wx5b1c0c8d01ded35d",
"paths": ["*"] "paths": ["*"]
} }
] ]

View File

@ -95,7 +95,7 @@ export default {
color: #999; color: #999;
} }
.tab-text.active { .tab-text.active {
color: #FF4767; /* 选中颜色 */ color: #E8101E; /* 选中颜色 */
} }
.tab-badge { .tab-badge {
position: absolute; position: absolute;

View File

@ -188,101 +188,115 @@ export default {
}, },
// //
async handleUpload() { async handleUpload() {
const systemInfo = uni.getSystemInfoSync(); //
const isIOS = systemInfo.platform === 'ios';
//
const res = await new Promise((resolve, reject) => {
uni.showActionSheet({
itemList: ['拍照', '从相册选择'],
success: resolve,
fail: reject
});
}).catch(() => ({ tapIndex: -1 }));
if (res.tapIndex === -1) return;
//
if (res.tapIndex === 0) {
if (isIOS) {
this._openPicker('camera');
} else {
//
this.$emit('ckeckisShowPer', true);
this.$emit('ckecknowQer', 'xj');
const { granted } = await permissionUtils.checkPermission('camera', '需要相机权限以拍照');
if (granted) {
this.$emit('ckeckisShowPer', false);
this._openPicker('camera');
return;
}
this.$emit('ckeckisShowPer', false);
const confirm = await this.showPermissionDialog('相机权限申请', '我们需要访问您的相机权限,以便您拍照上传');
if (!confirm) return;
const result = await permissionUtils.requestPermission('camera', '需要相机权限以拍照');
if (result) {
this._openPicker('camera');
} else {
locationService.openAppSettings();
}
}
}
//
else if (res.tapIndex === 1) {
if (isIOS) {
this._openPicker('album');
} else {
//
this.$emit('ckeckisShowPer', true);
this.$emit('ckecknowQer', 'xc');
const { granted } = await permissionUtils.checkPermission('photo_library', '需要存储权限以选择照片');
if (granted) {
this.$emit('ckeckisShowPer', false);
this._openPicker('album');
return;
}
this.$emit('ckeckisShowPer', false);
const confirm = await this.showPermissionDialog('存储权限申请', '我们需要访问您的相册权限,以便您选择照片');
if (!confirm) return;
const result = await permissionUtils.requestPermission('photo_library', '需要存储权限以选择照片');
if (result) {
this._openPicker('album');
} else {
locationService.openAppSettings();
}
}
}
},
//
async _openPicker(sourceType) {
try { try {
if (this.accept === 'image/*') { const systemInfo = uni.getSystemInfoSync()
const count = this.maxCount - this.fileList.length; if(systemInfo.platform === 'ios') {
if (count <= 0) { this.openCamera();
uni.showToast({ title: `最多上传${this.maxCount}个文件`, icon: 'none' }); }else {
return; let xcpermission = '';
} let xjpermission = '';
const res = await uni.chooseImage({ if(systemInfo.platform === 'ios') {
count: count, xcpermission = 'photo_library',
sizeType: ['compressed'], xjpermission = 'camera'
sourceType: [sourceType] }else {
}); xcpermission = `android.permission.READ_EXTERNAL_STORAGE,android.permission.WRITE_EXTERNAL_STORAGE`
for (const file of res.tempFiles) { xjpermission = 'android.permission.CAMERA'
await this.uploadFile(file); }
} const xjfirstRequest = !plus.storage.getItem(`perm_${xjpermission}`)
} else if (this.accept === 'video/*') { const xcfirstRequest = !plus.storage.getItem(`perm_${xcpermission}`)
const res = await uni.chooseVideo({ if(xcfirstRequest || xjfirstRequest) {
sourceType: [sourceType], // this.isShowPer = true;
compressed: true, console.log('ckeckisShowPer',true)
maxDuration: 60 this.$emit('ckeckisShowPer',true)
}); }
await this.uploadFile(res);
} // 1.
// const { granted } = await permissionUtils.checkPermission('photo_library', '');
this.$emit('ckecknowQer','xc')
const xc = await permissionUtils.checkPermission('photo_library', '需要相册权限用于上传照片');
this.$emit('ckecknowQer','xj')
const xj = await permissionUtils.checkPermission('camera', '需要相机权限用于拍摄照片');
this.$emit('ckeckisShowPer',false)
this.$emit('ckecknowQer','')
if (xc.granted && xj.granted) {
this.openCamera();
return;
}
// this.isShowPer = false;
// 2.
const confirm = await this.showPermissionDialog(
'相机相册权限申请',
'我们需要访问您的相机以及相册以完成更换头像功能'
);
if (!confirm) return;
// 3.
this.$emit('ckeckisShowPer',true)
this.$emit('ckecknowQer','xc')
const result1 = await permissionUtils.requestPermission('photo_library', '我们需要访问您的相册以上传图片/视频');
this.$emit('ckecknowQer','xj')
const result2 = await permissionUtils.requestPermission('camera', '我们需要访问您的相机以上传图片/视频');
if (result1 && result2) {
this.openCamera();
} else {
locationService.openAppSettings();
// uni.showToast({ title: '', icon: 'none' });
}
this.$emit('ckeckisShowPer',false)
this.$emit('ckecknowQer','')
}
} catch (error) { } catch (error) {
console.error('选择文件失败:', error); console.error('上传出错:', error)
this.$emit('error', error)
} finally {
this.loading = false
} }
}, },
async openCamera() {
if (this.loading) return
if (this.fileList.length >= this.maxCount) {
return uni.showToast({
title: `最多上传${this.maxCount}个文件`,
icon: 'none'
})
}
try {
this.loading = true
let res;
let tempFiles;
if(this.accept == 'image/*') {
const res = await uni.chooseImage({
count: this.maxCount - this.fileList.length,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera']
})
const tempFiles = res.tempFiles
for (const file of tempFiles) {
await this.uploadFile(file)
}
}else if(this.accept == 'video/*') {
const res = await uni.chooseVideo({
count: 1,
sourceType: ['album', 'camera'],
compressed: false
})
// #ifdef H5
const file = res.tempFile;
// #endif
// #ifdef APP-PLUS || MP-WEIXIN
const file = res;
// #endif
await this.uploadFile(file)
}
} catch (error) {
console.error('上传出错:', error)
this.$emit('error', error)
}
},
// OSS // OSS
async uploadFile(file) { async uploadFile(file) {
// //

View File

@ -43,7 +43,7 @@ export default {
// //
color: { color: {
type: String, type: String,
default: '#FF4767' default: '#E8101E'
}, },
// //
backgroundColor: { backgroundColor: {

View File

@ -402,7 +402,7 @@ export default {
} }
.time-option.active .time-text { .time-option.active .time-text {
color: #FF4767; color: #E8101E;
font-weight: 500; font-weight: 500;
} }
@ -413,7 +413,7 @@ export default {
.time-discount { .time-discount {
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
padding: 4rpx 12rpx; padding: 4rpx 12rpx;
background-color: #fff5f6; background-color: #fff5f6;
border-radius: 20rpx; border-radius: 20rpx;
@ -444,7 +444,7 @@ export default {
color: #666; color: #666;
} }
.active { .active {
color: #FF4767; /* 选中态主题色 */ color: #E8101E; /* 选中态主题色 */
} }
/* 服务时间按钮专属:控制下拉图标尺寸 */ /* 服务时间按钮专属:控制下拉图标尺寸 */

View File

@ -218,7 +218,7 @@
/* 列表容器 */ /* 列表容器 */
.list-container { .list-container {
padding: 0 24rpx; padding: 0 20rpx;
} }
/* 加载提示 */ /* 加载提示 */

View File

@ -52,7 +52,7 @@ export default {
// props // props
activeColor: { activeColor: {
type: String, type: String,
default: "#FF4767", default: "#E8101E",
}, },
// props // props
inactiveColor: { inactiveColor: {
@ -138,8 +138,6 @@ export default {
font-size: 30rpx; font-size: 30rpx;
color: var(--inactive-color); color: var(--inactive-color);
transition: color 0.2s; transition: color 0.2s;
white-space: nowrap;
} }
/* 激活色使用CSS变量 --active-color */ /* 激活色使用CSS变量 --active-color */

View File

@ -59,7 +59,7 @@ export default {
// //
activeColor: { activeColor: {
type: String, type: String,
default: "#FF4767", default: "#E8101E",
}, },
// //
inactiveColor: { inactiveColor: {
@ -129,7 +129,7 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
border: 2rpx solid #FF4767; border: 2rpx solid #E8101E;
border-radius: 48rpx; border-radius: 48rpx;
} }
@ -143,6 +143,6 @@ export default {
} }
.icon-item.active .icon-text { .icon-item.active .icon-text {
color: #FF4767; color: #E8101E;
} }
</style> </style>

View File

@ -208,7 +208,7 @@ export default {
padding-left: 30rpx; padding-left: 30rpx;
position: relative; position: relative;
&__point { &__point {
background-color: #FF4767; background-color: #E8101E;
height: 6rpx; height: 6rpx;
width: 6rpx; width: 6rpx;
border-radius: 50%; border-radius: 50%;
@ -221,7 +221,7 @@ export default {
} }
.active { .active {
background: #ffffff; background: #ffffff;
color: #FF4767; color: #E8101E;
} }
} }
&__right { &__right {
@ -295,17 +295,17 @@ export default {
height: 82rpx; height: 82rpx;
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;
color: #FF4767; color: #E8101E;
line-height: 42rpx; line-height: 42rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
&__sure { &__sure {
border-radius: 41rpx; border-radius: 41rpx;
border: 2rpx solid #FF4767; border: 2rpx solid #E8101E;
} }
&__reset { &__reset {
background: #FF4767; background: #E8101E;
border-radius: 41rpx; border-radius: 41rpx;
color: #ffffff; color: #ffffff;
} }

View File

@ -114,8 +114,8 @@ export default {
} }
.active { .active {
background: rgba(252, 67, 124, 0.1); background: rgba(252, 67, 124, 0.1);
color: #FF4767; color: #E8101E;
border: 1rpx solid #FF4767; border: 1rpx solid #E8101E;
} }
} }
</style> </style>

View File

@ -548,7 +548,7 @@
width: 690rpx; width: 690rpx;
height: 68rpx; height: 68rpx;
background: #FFFFFF; background: #FFFFFF;
border: 2rpx solid #FF4767; border: 2rpx solid #E8101E;
background-color: #fafafa; background-color: #fafafa;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -121,7 +121,7 @@ export default {
border: 1rpx solid #fba9bb; border: 1rpx solid #fba9bb;
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
} }
@ -197,7 +197,7 @@ export default {
margin-top: 10rpx; margin-top: 10rpx;
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;

View File

@ -1,56 +1,32 @@
<template> <template>
<view class="noData"> <view class="noData">
<image <image src="/static/images/shop/noData.png" class="noData-img" mode="widthFix"></image>
:style="{ 'margin-top': top }" <text class="noData-text">暂无数据哦</text>
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/57309ff1-476c-43ec-8bad-f9e529e0a25b" </view>
class="noData-img"
mode="widthFix"
></image>
<text class="noData-text">{{ tipText }}</text>
</view>
</template> </template>
<script> <script>
export default {
name: "noData",
data() {
return {};
},
props: {
tipText: {
type: String,
default: "暂无数据哦~",
},
top: {
type: String,
default: "154rpx",
},
},
components: {},
methods: {},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.noData { .noData{
display: flex; display: flex;
align-items: center; align-items: center;
// justify-content: center; justify-content: center;
flex-direction: column; flex-wrap: wrap;
height: 100%; .noData-img{
.noData-img { margin-top: 100rpx;
margin-top: 154rpx; width: 348rpx;
width: 348rpx; height: 348rpx;
height: 348rpx; }
} .noData-text{
.noData-text { width: 100%;
width: 100%; font-weight: 400;
font-weight: 400; font-size: 28rpx;
font-size: 28rpx; color: #666666;
color: #666666; line-height: 40rpx;
line-height: 40rpx; text-align: center;
text-align: center; font-style: normal;
font-style: normal; }
} }
} </style>
</style>

View File

@ -1,71 +0,0 @@
<template>
<view class="noLogin">
<image
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55d8e65a-04e4-4164-b956-278c6bc28a2b.png"
class="noLogin-img"
mode="widthFix"
></image>
<text class="noLogin-text">{{ tipText }}</text>
<view class="loginBtn" @click="goLogin">立即登录</view>
</view>
</template>
<script>
export default {
name: "noLogin",
data() {
return {};
},
props: {
tipText: {
type: String,
default: "您还没有登录,请登录后查看订单",
},
},
components: {},
methods: {
goLogin() {
uni.navigateTo({
url: "/pages/blogPopup/blogPopup",
});
},
},
};
</script>
<style lang="less" scoped>
.noLogin {
display: flex;
flex-direction: column;
align-items: center;
// justify-content: center;
height: 100%;
.noLogin-img {
margin-top: 154rpx;
width: 247rpx;
height: 187rpx;
}
.noLogin-text {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 30rpx;
color: #333333;
line-height: 42rpx;
text-align: left;
font-style: normal;
margin-top: 60rpx;
margin-bottom: 31rpx;
}
.loginBtn {
width: 262rpx;
height: 86rpx;
background: #FF4767;
border-radius: 43rpx;
text-align: center;
line-height: 86rpx;
font-weight: 500;
font-size: 34rpx;
color: #ffffff;
}
}
</style>

View File

@ -1,216 +0,0 @@
<template>
<view class="popup-picker" v-if="show">
<!-- 遮罩层 -->
<view
class="popup-mask"
v-if="show"
:class="{ show: show }"
@click="handleClose"
></view>
<!-- 选择器内容 -->
<view class="popup-content" :class="{ show: show }">
<!-- 头部 -->
<view class="popup-header">
<text class="cancel" @click="handleClose">取消</text>
<text class="title">{{ title }}</text>
<text class="confirm" @click="handleConfirm">确定</text>
</view>
<!-- 选择器 -->
<picker-view
:value="currentValue"
@change="handleChange"
class="picker-view"
immediate-change
>
<picker-view-column v-for="(column, index) in columns" :key="index">
<view
class="picker-item"
v-for="(item, itemIndex) in column"
:key="item.id"
>
{{ item[labelKey] || item.title }}
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</template>
<script>
export default {
name: "PopupPicker",
props: {
//
show: {
type: Boolean,
default: false,
},
//
title: {
type: String,
default: "请选择",
},
//
columns: {
type: Array,
default: () => [],
},
//
value: {
type: Array,
default: () => [0],
},
//
labelKey: {
type: String,
default: "label",
},
},
data() {
return {
currentValue: this.value,
};
},
watch: {
value: {
handler(val) {
console.log("selectedType.id", val);
this.currentValue = val;
},
immediate: true,
},
},
methods: {
//
handleChange(e) {
console.log(e.detail.value, "e.detail.value");
this.currentValue = e.detail.value;
},
//
handleClose() {
this.$emit("close");
setTimeout(() => {
this.show = false;
}, 300);
},
//
handleConfirm() {
const selectedItems = this.columns;
console.log(selectedItems, "selectedItems");
if (this.currentValue[0] >= selectedItems[0].length) {
this.currentValue = [0];
}
this.$emit("confirm", {
value: this.currentValue[0],
items: selectedItems[0],
item: selectedItems[0][this.currentValue[0] || 0],
});
this.handleClose();
},
},
};
</script>
<style>
.popup-picker {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
}
/* 遮罩层 */
.popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s ease;
}
.popup-mask.show {
opacity: 1;
}
/* 内容区 */
.popup-content {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
border-radius: 24rpx 24rpx 0 0;
transform: translateY(-100%);
opacity: 0;
transition: all 0.3s ease;
visibility: hidden;
}
.popup-content.show {
transform: translateY(0);
opacity: 1;
visibility: visible;
}
/* 头部 */
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 88rpx;
padding: 0 32rpx;
border-bottom: 1rpx solid #eeeeee;
}
.cancel {
font-size: 32rpx;
color: #999999;
}
.title {
font-size: 32rpx;
color: #333333;
font-weight: 500;
}
.confirm {
font-size: 32rpx;
color: #4080ff;
}
/* 选择器 */
.picker-view {
width: 100%;
height: 480rpx;
}
.picker-item {
line-height: 68rpx;
text-align: center;
font-size: 32rpx;
color: #333333;
}
/* 平台适配 */
/* #ifdef H5 */
.popup-content {
padding-bottom: env(safe-area-inset-bottom);
}
/* #endif */
/* #ifdef MP-WEIXIN */
.popup-content {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
/* #endif */
</style>

View File

@ -35,13 +35,13 @@
class="time-picker-content__time__list__item" class="time-picker-content__time__list__item"
v-for="(time, index) in timeOptions[selectedDateIndex]" v-for="(time, index) in timeOptions[selectedDateIndex]"
:key="index" :key="index"
:class="[getItemClass(time.state || 0),{ :class="[getItemClass(time.state || 0), {
lastActive:selectedTimeIndex + serviceTimeNum==index, firstActive: selectedTimeIndex == index,
firstActive:selectedTimeIndex==index, lastActive: selectedTimeIndex + serviceTimeNum - 1 == index,
isActive: isActive: index >= selectedTimeIndex &&
index >= selectedTimeIndex && index <= selectedTimeIndex + serviceTimeNum && index <= selectedTimeIndex + serviceTimeNum - 1 &&
sureTimeDataIndex === selectedDateIndex && sureTimeDataIndex === selectedDateIndex &&
selectedTimeIndex !== null, selectedTimeIndex !== null
}]" }]"
@click="selectTime(time, index)" @click="selectTime(time, index)"
> >
@ -149,7 +149,7 @@ export default {
watch: { watch: {
service: { service: {
handler(newValue) { handler(newValue) {
this.serviceTimeNum = Math.max(1, Math.ceil((newValue.server_time || 0) / 10)); this.serviceTimeNum = Math.max(1, Math.ceil((newValue.server_time || 0) / 10 + 1));
}, },
deep: true, deep: true,
immediate: true, immediate: true,
@ -408,11 +408,11 @@ export default {
.isActive { .isActive {
background: rgba(252, 67, 124, 0.08); background: rgba(252, 67, 124, 0.08);
color: #FF4767 !important; color: #e8101e !important;
} }
.isActive .time-picker-content__time__list__item__text { .isActive .time-picker-content__time__list__item__text {
color: #FF4767 !important; color: #e8101e !important;
} }
/* 选中样式前后弧度 */ /* 选中样式前后弧度 */
@ -433,7 +433,7 @@ border-radius: 0rpx 51rpx 51rpx 0rpx}
.time-picker-content__time__sure__box { .time-picker-content__time__sure__box {
width: 648rpx; width: 648rpx;
height: 94rpx; height: 94rpx;
background: #FF4767; background: #E8101E;
border-radius: 48rpx; border-radius: 48rpx;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -467,8 +467,8 @@
.isActive { .isActive {
background: rgba(252, 67, 124, 0.08); background: rgba(252, 67, 124, 0.08);
border-radius: 10rpx; border-radius: 10rpx;
border: 1rpx solid #FF4767; border: 1rpx solid #E8101E;
color: #FF4767; color: #E8101E;
/* 选中状态 */ /* 选中状态 */
} }
@ -493,7 +493,7 @@
&__box { &__box {
width: 648rpx; width: 648rpx;
height: 94rpx; height: 94rpx;
background: linear-gradient(140deg, #fa4e9a 0%, #FF4767 100%); background: linear-gradient(140deg, #fa4e9a 0%, #E8101E 100%);
border-radius: 48rpx; border-radius: 48rpx;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,19 +1,30 @@
<template> <template>
<view class="service-code-modal" v-if="show" :style="{ bottom: `${popBotom}px` }"> <view class="service-code-modal" v-if="show" :style="{bottom:`${popBotom}px`}">
<view class="modal-mask" @touchmove.stop.prevent></view> <view class="modal-mask" @touchmove.stop.prevent></view>
<view class="modal-content"> <view class="modal-content">
<view class="modal-title">开始服务</view> <view class="modal-title">开始服务</view>
<view class="modal-subtitle">请输入服务码</view> <view class="modal-subtitle">请输入服务码</view>
<view class="code-box"> <view class="code-box">
<view v-for="(item, idx) in codeLength" :key="idx" <view
v-for="(item, idx) in codeLength"
:key="idx"
:class="['code-cell', idx === currentIndex ? 'active' : '', code[idx] ? 'filled' : '']"> :class="['code-cell', idx === currentIndex ? 'active' : '', code[idx] ? 'filled' : '']">
<text v-if="code[idx]">{{ code[idx] }}</text> <text v-if="code[idx]">{{ code[idx] }}</text>
</view> </view>
<!-- 隐藏真实输入框 --> <!-- 隐藏真实输入框 -->
<input :adjust-position="false" class="real-input" type="number" :maxlength="codeLength" <input
v-model="inputValue" :focus="true" @input="onInput" @focus="onFocus" :adjust-position="false"
@keyboardheightchange="onkeyboardheightchange" @blur="onBlur" cursor-spacing="100" class="real-input"
cursor-color="transparent" ref="realInput" /> type="number"
:maxlength="codeLength"
v-model="inputValue"
:focus="true"
@input="onInput"
@focus="onFocus"
@keyboardheightchange="onkeyboardheightchange"
@blur="onBlur"
cursor-spacing="100"
ref="realInput" />
</view> </view>
<button class="confirm-btn" :disabled="code.length < codeLength" @click="onConfirm">确定</button> <button class="confirm-btn" :disabled="code.length < codeLength" @click="onConfirm">确定</button>
<view class="close-btn" @click="close">×</view> <view class="close-btn" @click="close">×</view>
@ -22,212 +33,210 @@
</template> </template>
<script> <script>
export default { export default {
name: 'serviceCodeInput', name: 'serviceCodeInput',
props: { props: {
show: { show: {
type: Boolean, type: Boolean,
default: false default: false
}, },
codeLength: { codeLength: {
type: Number, type: Number,
default: 6 default: 6
}
},
data() {
return {
inputValue: '',
isFocus: true,
keyboardHeight: 0,
popBotom: 0,
}
},
computed: {
code() {
return this.inputValue.split('').slice(0, this.codeLength)
},
currentIndex() {
return this.inputValue.length
}
},
watch: {
// show(val) {
// if (val) {
// this.$refs.realInput && this.$refs.realInput.focus
// } else {
// this.inputValue = ''
// }
// }
},
mounted() {
// uni.onKeyboardHeightChange((res)=>{
// this.keyboardHeight = res.height;
// })
},
methods: {
onInput(e) {
let val = e.detail.value.replace(/[^0-9]/g, '').slice(0, this.codeLength)
this.inputValue = val
this.$emit('input', val)
if (val.length === this.codeLength) {
this.$emit('finish', val)
} }
}, },
onFocus(e) { data() {
this.isFocus = true return {
this.inputValue = '' inputValue: '',
}, isFocus: true,
onkeyboardheightchange(e) { keyboardHeight: 0,
this.popBotom = e.target.height || 0 popBotom:0,
},
onBlur() {
this.isFocus = false
},
onConfirm() {
if (this.inputValue.length === this.codeLength) {
this.$emit('confirm', this.inputValue);
} }
}, },
close() { computed: {
this.$emit('close') code() {
return this.inputValue.split('').slice(0, this.codeLength)
},
currentIndex() {
return this.inputValue.length
}
},
watch: {
// show(val) {
// if (val) {
// this.$refs.realInput && this.$refs.realInput.focus
// } else {
// this.inputValue = ''
// }
// }
},
mounted() {
// uni.onKeyboardHeightChange((res)=>{
// this.keyboardHeight = res.height;
// })
},
methods: {
onInput(e) {
let val = e.detail.value.replace(/[^0-9]/g, '').slice(0, this.codeLength)
this.inputValue = val
this.$emit('input', val)
if (val.length === this.codeLength) {
this.$emit('finish', val)
}
},
onFocus(e) {
this.isFocus = true
this.inputValue = ''
},
onkeyboardheightchange(e){
this.popBotom = e.target.height || 0
},
onBlur() {
this.isFocus = false
},
onConfirm() {
if (this.inputValue.length === this.codeLength) {
this.$emit('confirm', this.inputValue);
}
},
close() {
this.$emit('close')
}
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.service-code-modal { .service-code-modal {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 999999;
.modal-mask {
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background: rgba(0, 0, 0, 0.5); z-index: 999999;
z-index: -1;
}
.modal-content { .modal-mask {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #fff;
border-radius: 32rpx 32rpx 0 0;
padding: 56rpx 40rpx 40rpx 40rpx;
box-shadow: 0 -8rpx 32rpx rgba(0, 0, 0, 0.08);
min-height: 340rpx;
align-items: center;
display: flex;
flex-direction: column;
animation: modalUp 0.25s;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: #222;
text-align: center;
}
.modal-subtitle {
font-size: 28rpx;
color: #888;
margin: 24rpx 0 40rpx 0;
text-align: center;
}
.code-box {
flex-direction: row;
display: flex;
justify-content: center;
margin-bottom: 48rpx;
position: relative;
.code-cell {
width: 72rpx;
height: 72rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
margin-right: 24rpx;
font-size: 40rpx;
color: #ff4d8d;
background: #fff;
text-align: center;
line-height: 72rpx;
box-sizing: border-box;
transition: border-color 0.2s;
&.active {
border-color: #ff4d8d;
}
&.filled {
border-color: #ff4d8d;
}
&:last-child {
margin-right: 0;
}
}
.real-input {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.15);
}
.modal-content {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #fff;
border-radius: 32rpx 32rpx 0 0;
padding: 56rpx 40rpx 40rpx 40rpx;
box-shadow: 0 -8rpx 32rpx rgba(0, 0, 0, 0.08);
min-height: 340rpx;
align-items: center;
display: flex;
flex-direction: column;
animation: modalUp 0.25s;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: #222;
text-align: center;
}
.modal-subtitle {
font-size: 28rpx;
color: #888;
margin: 24rpx 0 40rpx 0;
text-align: center;
}
.code-box {
flex-direction: row;
display: flex;
justify-content: center;
margin-bottom: 48rpx;
position: relative;
.code-cell {
width: 72rpx;
height: 72rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
margin-right: 24rpx;
font-size: 40rpx;
color: #ff4d8d;
background: #fff;
text-align: center;
line-height: 72rpx;
box-sizing: border-box;
transition: border-color 0.2s;
&.active {
border-color: #ff4d8d;
}
&.filled {
border-color: #ff4d8d;
}
&:last-child {
margin-right: 0;
}
}
.real-input {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
z-index: 2;
}
}
.confirm-btn {
width: 100%; width: 100%;
height: 100%; height: 88rpx;
opacity: 0; background: #ff4d8d;
z-index: 2;
caret-color: transparent;
}
}
.confirm-btn {
width: 100%;
height: 88rpx;
background: #ff4d8d;
color: #fff;
font-size: 32rpx;
border-radius: 16rpx;
margin-top: 16rpx;
text-align: center;
line-height: 88rpx;
border: none;
&:disabled {
background: #ffd1e3;
color: #fff; color: #fff;
font-size: 32rpx;
border-radius: 16rpx;
margin-top: 16rpx;
text-align: center;
line-height: 88rpx;
border: none;
&:disabled {
background: #ffd1e3;
color: #fff;
}
}
.close-btn {
position: absolute;
right: 32rpx;
top: 32rpx;
font-size: 48rpx;
color: #bbb;
z-index: 10;
font-weight: bold;
line-height: 1;
} }
} }
.close-btn { @keyframes modalUp {
position: absolute; from {
right: 32rpx; transform: translateY(100%);
top: 32rpx; }
font-size: 48rpx;
color: #bbb;
z-index: 10;
font-weight: bold;
line-height: 1;
}
}
@keyframes modalUp { to {
from { transform: translateY(0);
transform: translateY(100%); }
} }
to {
transform: translateY(0);
}
}
</style> </style>

View File

@ -181,7 +181,7 @@
position: absolute; position: absolute;
top: 0rpx; top: 0rpx;
left: 0rpx; left: 0rpx;
background-color: #FF4767; background-color: #E8101E;
color: #FFFFFF; color: #FFFFFF;
font-size: 24rpx; font-size: 24rpx;
padding: 6rpx 14rpx; padding: 6rpx 14rpx;
@ -247,7 +247,7 @@
.price-symbol { .price-symbol {
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -256,7 +256,7 @@
.price-value { .price-value {
font-weight: 500; font-weight: 500;
font-size: 36rpx; font-size: 36rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -332,12 +332,12 @@
.price-symbol { .price-symbol {
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
} }
.price-value { .price-value {
font-size: 32rpx; font-size: 32rpx;
color: #FF4767; color: #E8101E;
font-weight: 500; font-weight: 500;
margin-right: 12rpx; margin-right: 12rpx;
} }

View File

@ -336,7 +336,7 @@
.price-text{ .price-text{
font-weight: 500; font-weight: 500;
font-size: 24rpx; font-size: 24rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -345,7 +345,7 @@
.price-symbol { .price-symbol {
font-weight: 500; font-weight: 500;
font-size: 20rpx; font-size: 20rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -354,7 +354,7 @@
.price-value { .price-value {
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
color: #FF4767; color: #E8101E;
line-height: 33rpx; line-height: 33rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;

View File

@ -1,54 +1,63 @@
<template> <template>
<view class="step-tab"> <view class="step-tab">
<view class="step-container"> <view class="step-container">
<!-- 步骤1: 入驻协议 -->
<view class="step-item" :class="getStepClass(0)"> <view class="step-item" :class="getStepClass(0)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="mappedStep === 0" v-if="currentStep === 0"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d62a1d01-52cb-418e-ba5b-afef513061b9.png" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="mappedStep > 0" class="step-done">1</view> <view v-else-if="currentStep > 0" class="step-done">1</view>
<view v-else class="step-number">1</view> <view v-else class="step-number">1</view>
</view> </view>
<text class="step-text" :class="{ active: mappedStep === 0 }">入驻协议</text> <text class="step-text" :class="{ active: currentStep === 0 }">入驻协议</text>
</view> </view>
<!-- 第一个连接线 -->
<view class="line-segment line-1"> <view class="line-segment line-1">
<view class="line-progress" :class="{ active: line1Active, deactivating: line1Deactivating }"></view> <view class="line-progress" :class="{ active: line1Active, deactivating: line1Deactivating }"></view>
</view> </view>
<!-- 步骤2: 根据身份显示不同信息 -->
<view class="step-item" :class="getStepClass(1)"> <view class="step-item" :class="getStepClass(1)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="mappedStep === 1" v-if="currentStep === 1"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d62a1d01-52cb-418e-ba5b-afef513061b9.png" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="mappedStep > 1" class="step-done">2</view> <view v-else-if="currentStep > 1" class="step-done">2</view>
<view v-else class="step-number">2</view> <view v-else class="step-number">2</view>
</view> </view>
<text class="step-text" :class="{ active: mappedStep === 1 }">基本信息</text> <text class="step-text" :class="{ active: currentStep === 1 }">
{{ identity === 1 ? '个人信息' : '资质信息' }}
</text>
</view> </view>
<!-- 第二个连接线 -->
<view class="line-segment line-2"> <view class="line-segment line-2">
<view class="line-progress" :class="{ active: line2Active, deactivating: line2Deactivating }"></view> <view class="line-progress" :class="{ active: line2Active, deactivating: line2Deactivating }"></view>
</view> </view>
<!-- 步骤3: 根据身份显示不同信息 -->
<view class="step-item" :class="getStepClass(2)"> <view class="step-item" :class="getStepClass(2)">
<view class="step-icon"> <view class="step-icon">
<image <image
v-if="mappedStep === 2" v-if="currentStep === 2"
src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/d62a1d01-52cb-418e-ba5b-afef513061b9.png" src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/55a51333-318f-4ae4-8402-aca265bd499d"
class="step-img active-circle" class="step-img active-circle"
mode="aspectFit" mode="aspectFit"
/> />
<view v-else-if="mappedStep > 2" class="step-done">3</view> <view v-else-if="currentStep > 2" class="step-done">3</view>
<view v-else class="step-number">3</view> <view v-else class="step-number">3</view>
</view> </view>
<text class="step-text" :class="{ active: mappedStep === 2 }">资质认证</text> <text class="step-text" :class="{ active: currentStep === 2 }">
{{ identity === 1 ? '资质信息' : '门店信息' }}
</text>
</view> </view>
</view> </view>
</view> </view>
@ -58,23 +67,32 @@
export default { export default {
name: "StepTab", name: "StepTab",
props: { props: {
mappedStep: { // (0, 1, 2)
currentStep: {
type: Number, type: Number,
default: 0 default: 0
},
// 1-2-
identity: {
type: Number,
default: 2
} }
}, },
data() { data() {
return { return {
prevStep: 0, prevStep: 0, //
line1Active: false, line1Active: false, // 线
line2Active: false, line2Active: false, // 线
line1Deactivating: false, line1Deactivating: false, // 线
line2Deactivating: false line2Deactivating: false // 线
}; };
}, },
watch: { watch: {
mappedStep(newVal, oldVal) { // currentStep线
currentStep(newVal, oldVal) {
this.prevStep = oldVal; this.prevStep = oldVal;
//
if (newVal > oldVal) { if (newVal > oldVal) {
if (newVal >= 1) { if (newVal >= 1) {
this.line1Active = true; this.line1Active = true;
@ -84,34 +102,38 @@ export default {
this.line2Active = true; this.line2Active = true;
this.line2Deactivating = false; this.line2Deactivating = false;
} }
} else if (newVal < oldVal) { }
//
else if (newVal < oldVal) {
if (newVal < 2) { if (newVal < 2) {
this.line2Deactivating = true; this.line2Deactivating = true;
setTimeout(() => { setTimeout(() => {
this.line2Active = false; this.line2Active = false;
this.line2Deactivating = false; this.line2Deactivating = false;
}, 300); }, 300); //
} }
if (newVal < 1) { if (newVal < 1) {
this.line1Deactivating = true; this.line1Deactivating = true;
setTimeout(() => { setTimeout(() => {
this.line1Active = false; this.line1Active = false;
this.line1Deactivating = false; this.line1Deactivating = false;
}, 300); }, 300); //
} }
} }
} }
}, },
mounted() { mounted() {
this.line1Active = this.mappedStep >= 1; // 线
this.line2Active = this.mappedStep >= 2; this.line1Active = this.currentStep >= 1;
this.line2Active = this.currentStep >= 2;
}, },
methods: { methods: {
// CSS
getStepClass(stepIndex) { getStepClass(stepIndex) {
if (stepIndex === this.mappedStep) { if (stepIndex === this.currentStep) {
return 'active'; return 'active';
} }
else if (stepIndex < this.mappedStep) { else if (stepIndex < this.currentStep) {
return 'completed'; return 'completed';
} }
return ''; return '';
@ -184,7 +206,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
color: #FF4767; color: #E8101E;
font-weight: 500; font-weight: 500;
transition: all 0.3s ease; transition: all 0.3s ease;
box-shadow: inset 0 0 4rpx rgba(232, 16, 30, 0.2); box-shadow: inset 0 0 4rpx rgba(232, 16, 30, 0.2);
@ -237,16 +259,35 @@ export default {
transform-origin: left center; transform-origin: left center;
} }
/* 激活状态的线条 - 前进动画 */
.line-progress.active { .line-progress.active {
width: 100%; width: 100%;
background-color: #FF4767; background-color: #E8101E;
transition: width 0.3s ease; transition: width 0.3s ease;
} }
/* 取消激活状态的线条 - 返回动画 */
.line-progress.deactivating { .line-progress.deactivating {
width: 0%; width: 0%;
background-color: #FF4767; background-color: #E8101E;
transition: width 0.3s ease; transition: width 0.3s ease;
transform-origin: right center; transform-origin: right center;
} }
</style>
/* 响应式调整 */
@media (max-width: 750rpx) {
.step-container {
/* padding: 5rpx 40rpx; */
}
.line-segment {
/* width: 100rpx; */
}
/* .line-1,
.line-2 {
margin-left: 15rpx;
margin-right: 15rpx;
} */
}
</style>

View File

@ -1,209 +1,124 @@
<template> <template>
<uv-tabbar <uv-tabbar fixed :value="selected" @change="change1" activeColor="#ee0a24" :placeholder="false"
v-if="tabbarReady" :safeAreaInsetBottom="false" :customStyle="{height:`110rpx`}">
:key="refreshKey" <uv-tabbar-item v-for="(item,index) in $store.state.tabbarList" :key="index" :badge="getNum(index)" :customStyle="{height:`110rpx`}">
fixed <template v-slot:active-icon>
:value="currentTabIndex" <image class="icon" :src="item.selectedIconPath"></image>
@change="onTabChange" </template>
activeColor="#FF4767" <template v-slot:inactive-icon>
:placeholder="false" <image class="icon" :src="item.iconPath"></image>
:safeAreaInsetBottom="false" </template>
:customStyle="{height:'110rpx'}" </uv-tabbar-item>
> </uv-tabbar>
<uv-tabbar-item
v-for="(item, idx) in tabbarList"
:key="idx"
:name="idx"
:text="item.text"
:badge="getNum(idx)"
:customStyle="{height:'110rpx'}"
@click="onItemClick(idx)"
>
<template v-slot:active-icon>
<image class="icon" :src="item.selectedIconPath"></image>
</template>
<template v-slot:inactive-icon>
<image class="icon" :src="item.iconPath"></image>
</template>
</uv-tabbar-item>
</uv-tabbar>
</template> </template>
<script> <script>
import { mapState, mapMutations } from 'vuex'; import request from "@/utils/request";
import request from "@/utils/request"; export default {
name: "tab-bar",
props: {
selected: {
type: [Number, String]
}
},
data() {
return {
tabbarList: [{
"iconPath": "/static/images/tabbar/new_home_gray.png",
"text": "首页",
"selectedIconPath": "/static/images/tabbar/new_home.png",
"pagePath": "/pages/home/home"
},
{
"iconPath": "/static/images/tabbar/new_order_gray.png",
"text": "订单",
"selectedIconPath": "/static/images/tabbar/new_order.png",
"pagePath": "/pages/order/userorder-list"
},
{
"iconPath": "/static/images/tabbar/new_message_gray.png",
"text": "消息",
"selectedIconPath": "/static/images/tabbar/new_message.png",
"pagePath": "/pages/message/message"
},
{
"iconPath": "/static/images/tabbar/new_my_gray.png",
"text": "我的",
"selectedIconPath": "/static/images/tabbar/new_my.png",
"pagePath": "/pages/my/my"
}
]
};
},
computed:{
messageNum(){
return this.$store.state.messageNum || 0
}
},
async created() {
if (!this.$store.state.tabbarList.length) {
let isnNetwork = uni.getStorageSync("isnNetwork");
if (isnNetwork) {
await this.getButtonImg()
} else {
uni.getNetworkType({
success: (res) => {
console.log(res.networkType);
if (res.networkType == "none") {
this.$store.commit("setTabbarList", this.tabbarList)
} else {
//
uni.setStorageSync("isnNetwork", 1);
this.getButtonImg()
}
},
});
}
export default { }
name: "tab-bar",
// props.selected Vuex
data() {
return {
refreshKey: 0, //
tabbarReady: false, //
tabbarList: [ // tab
{
iconPath: "/static/images/tabbar/new_home_gray.png",
text: "首页",
selectedIconPath: "/static/images/tabbar/new_home.png",
pagePath: "/pages/home/home"
},
{
iconPath: "/static/images/tabbar/new_order_gray.png",
text: "订单",
selectedIconPath: "/static/images/tabbar/new_order.png",
pagePath: "/pages/order/userorder-list"
},
{
iconPath: "/static/images/tabbar/new_message_gray.png",
text: "消息",
selectedIconPath: "/static/images/tabbar/new_message.png",
pagePath: "/pages/message/message"
},
{
iconPath: "/static/images/tabbar/new_my_gray.png",
text: "我的",
selectedIconPath: "/static/images/tabbar/new_my.png",
pagePath: "/pages/my/my"
}
]
};
},
computed: {
//
...mapState(['messageNum']),
// ========= =========
// Vuex
currentTabIndex() {
try {
//
const pages = getCurrentPages();
if (pages && pages.length > 0) {
//
const currentPage = pages[pages.length - 1];
//
const currentPath = '/' + (currentPage.route || currentPage.__route__);
// tabbarList
const index = this.tabbarList.findIndex(item => item.pagePath === currentPath);
if (index !== -1) {
return index;
}
}
// Vuex
return this.$store.state.currentTabIndex || 0;
} catch (e) {
return this.$store.state.currentTabIndex || 0;
}
}
// =================================================
},
watch: {
// tabbarList
tabbarList: {
deep: true,
handler() {
this.rebuildTabbar();
}
}
},
created() {
//
this.tabbarReady = false;
this.$nextTick(() => {
this.tabbarReady = true;
//
// this.getButtonImg();
});
},
methods: {
...mapMutations(['SET_CURRENT_TAB_INDEX']),
// },
setCurrentTabIndex(index) { methods: {
this.SET_CURRENT_TAB_INDEX(index); getNum(index){
}, if(index==2){
return this.messageNum
// uv-tabbar }else{
rebuildTabbar() { return 0
this.tabbarReady = false; }
this.$nextTick(() => { },
this.refreshKey++; //
this.tabbarReady = true; async getButtonImg() {
}); let res = await request.post("/user/poster/getButtonImg", {});
}, if (res.code == 200) {
// if (res.data?.photo) {
// tab > 0 // this.topBgImage = res.data?.photo + '?time=666'
getNum(index) { // }
if (index === 2 && this.messageNum > 0) { this.tabbarList.forEach((item, index) => {
return this.messageNum; if (res.data[index].iconPath) {
} item.iconPath = res.data[index].iconPath
return null; }
}, if (res.data[index].selectedIconPath) {
item.selectedIconPath = res.data[index].selectedIconPath
// }
async getButtonImg() { })
try { }
let res = await request.post("/sj/poster/getButtonImg", {}); this.$store.commit("setTabbarList", this.tabbarList)
if (res.code === 200) { },
this.tabbarList.forEach((item, index) => { change1(val) {
if (res.data[index]?.iconPath) { // pages tabbar
item.iconPath = res.data[index].iconPath; // 使navigateTo 使
} uni.switchTab({
if (res.data[index]?.selectedIconPath) { url: this.tabbarList[val].pagePath
item.selectedIconPath = res.data[index].selectedIconPath; })
} }
}); }
this.$store.commit("setTabbarList", this.tabbarList); }
//
this.rebuildTabbar();
}
} catch (err) {
console.error('getButtonImg 请求失败', err);
}
},
// uv-tabbar change
onTabChange(val) {
const idx = parseInt(val, 10);
this.doJump(idx);
},
// item
onItemClick(idx) {
this.doJump(idx);
},
// +
doJump(index) {
const idx = parseInt(index, 10);
if (isNaN(idx) || !this.tabbarList[idx]) return;
// Vuex
this.setCurrentTabIndex(idx);
//
const targetPage = this.tabbarList[idx].pagePath;
uni.switchTab({
url: targetPage,
fail: (err) => console.error('switchTab 失败', err)
});
//
if (typeof this.messageUpudateNum === 'function') {
this.messageUpudateNum();
}
}
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
.icon { .icon {
height: 54rpx; height: 98rpx;
width: 54rpx; width: 98rpx;
} }
::v-deep .uv-tabbar__content {
z-index: 999 !important;
}
</style> </style>

View File

@ -383,7 +383,7 @@
justify-content: center; justify-content: center;
width: 690rpx; width: 690rpx;
height: 80rpx; height: 80rpx;
background: #FF4767; background: #E8101E;
border-radius: 38rpx; border-radius: 38rpx;
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;

View File

@ -169,7 +169,7 @@ export default {
justify-content: center; justify-content: center;
width: 690rpx; width: 690rpx;
height: 80rpx; height: 80rpx;
background: #FF4767; background: #E8101E;
border-radius: 38rpx; border-radius: 38rpx;
font-weight: 400; font-weight: 400;
font-size: 30rpx; font-size: 30rpx;

View File

@ -89,7 +89,7 @@
</template> </template>
<script> <script>
import request from "@/utils/request"; import request from "../../utils/request";
import uniPopup from "@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"; import uniPopup from "@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue";
export default { export default {
name: "uploadAppVue", name: "uploadAppVue",
@ -237,7 +237,7 @@ export default {
return this.version; return this.version;
}, },
async getUpdateInfo() { async getUpdateInfo() {
const response = await request.post("/sj/getAppVersion"); const response = await request.post("/user/getappversion");
this.newVersion = response.data?.version; this.newVersion = response.data?.version;
this.updateAPKPath = response.data?.url; this.updateAPKPath = response.data?.url;
this.is_force = response.data?.is_force; this.is_force = response.data?.is_force;
@ -307,7 +307,7 @@ export default {
&__text { &__text {
font-weight: 400; font-weight: 400;
font-size: 18rpx; font-size: 18rpx;
color: #FF4767; color: #E8101E;
line-height: 25rpx; line-height: 25rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -371,7 +371,7 @@ export default {
&__immediately { &__immediately {
width: 236rpx; width: 236rpx;
height: 78rpx; height: 78rpx;
background: #FF4767; background: #E8101E;
border-radius: 39rpx; border-radius: 39rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -405,7 +405,7 @@ export default {
&__active { &__active {
height: 28rpx; height: 28rpx;
background: linear-gradient(270deg, #fe78b3 0%, #FF4767 100%); background: linear-gradient(270deg, #fe78b3 0%, #E8101E 100%);
border-radius: 39rpx; border-radius: 39rpx;
} }

View File

@ -1,25 +1,15 @@
{ {
"name" : "美融融商家", "name" : "美融融plus",
"appid" : "__UNI__BBE6285", "appid" : "__UNI__DA7CE05",
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。", "description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
"versionName" : "1.0.21", "versionName" : "1.2.20",
"versionCode" : 1021, "versionCode" : 1220,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,
"screenOrientation" : [
//
"portrait-primary", //
"portrait-secondary", //
"landscape-primary", //
"landscape-secondary" //
],
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"video" : { "video" : {
"hardwareAcceleration" : "auto", "hardwareAcceleration" : "auto",
"decode" : { "decode" : {
@ -41,8 +31,7 @@
"Payment" : {}, "Payment" : {},
"VideoPlayer" : {}, "VideoPlayer" : {},
"OAuth" : {}, "OAuth" : {},
"Camera" : {}, "Camera" : {}
"Barcode" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -77,7 +66,6 @@
}, },
/* ios */ /* ios */
"ios" : { "ios" : {
"UIRequiresFullScreen" : false, //
"urlschemewhitelist" : [ "iosmap" ], "urlschemewhitelist" : [ "iosmap" ],
"dSYMs" : false, "dSYMs" : false,
"plistcmds" : [ "plistcmds" : [
@ -116,8 +104,8 @@
"payment" : { "payment" : {
"weixin" : { "weixin" : {
"__platform__" : [ "ios", "android" ], "__platform__" : [ "ios", "android" ],
"appid" : "wx17eef65c270b4869", "appid" : "wx2381a791a52a402d",
"UniversalLinks" : "https://api.mrrwlkj.top/" "UniversalLinks" : "https://app.mrrweb.com.cn/"
}, },
"appleiap" : {}, "appleiap" : {},
"alipay" : { "alipay" : {
@ -126,8 +114,8 @@
}, },
"share" : { "share" : {
"weixin" : { "weixin" : {
"appid" : "wx17eef65c270b4869", "appid" : "wx2381a791a52a402d",
"UniversalLinks" : "https://api.mrrwlkj.top/" "UniversalLinks" : "https://app.mrrweb.com.cn/"
} }
}, },
"geolocation" : { "geolocation" : {
@ -143,8 +131,8 @@
}, },
"oauth" : { "oauth" : {
"weixin" : { "weixin" : {
"appid" : "wx17eef65c270b4869", "appid" : "wx2381a791a52a402d",
"UniversalLinks" : "https://api.mrrwlkj.top/" "UniversalLinks" : "https://app.mrrweb.com.cn/"
} }
} }
}, },
@ -192,8 +180,10 @@
"description" : "阿里云号码认证SDK包含一键登录和本机号码校验两个功能。", "description" : "阿里云号码认证SDK包含一键登录和本机号码校验两个功能。",
"platforms" : "Android,iOS", "platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=4297", "url" : "https://ext.dcloud.net.cn/plugin?id=4297",
"android_package_name" : "cn.mrrsj", "android_package_name" : "cn.mrrweb",
"ios_bundle_id" : "cn.mrrsj", "ios_bundle_id" : "cn.mrrweb",
"android_package_name" : "cn.mrrweb",
"ios_bundle_id" : "cn.mrrweb",
"isCloud" : true, "isCloud" : true,
"bought" : 1, "bought" : 1,
"pid" : "4297", "pid" : "4297",
@ -206,7 +196,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx17eef65c270b4869", "appid" : "wxb486b10a60d2c78d",
"privacy" : { "privacy" : {
"requiredPrivateInfos" : [ "getBackgroundFetchData" ] "requiredPrivateInfos" : [ "getBackgroundFetchData" ]
}, },

View File

@ -110,25 +110,12 @@ export default {
let screenWidth = this.$store.state.systemInfo.screenWidth let screenWidth = this.$store.state.systemInfo.screenWidth
return this.pxToRpx(statusBarHeight, screenWidth) return this.pxToRpx(statusBarHeight, screenWidth)
}, },
//消息数量跟新 //消息数量跟新
messageUpudateNum() { messageUpudateNum() {
if (uni.getStorageSync('accessToken')) { request.post("/user/push/messageUnreadNum").then(res => {
request.post("/sj/push/messageUnreadNum").then(res => { if( res.code==200){
if (res.code == 200) { this.$store.commit("setMessageNum", res.data.count)
this.$store.commit("setMessageNum", res.data.count) }
}
})
}
},
//消息列表跳转阅读
messageRead(id) {
request.post("/sj/push/messageRead", {
id: id
}).then(res => {
console.log("messageRead:", res)
this.messageUpudateNum()
}) })
}, },

View File

@ -1 +1 @@
{"agcgw":{"url":"connect-drcn.dbankcloud.cn","backurl":"connect-drcn.hispace.hicloud.com","websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn","websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com"},"agcgw_all":{"SG":"connect-dra.dbankcloud.cn","SG_back":"connect-dra.hispace.hicloud.com","CN":"connect-drcn.dbankcloud.cn","CN_back":"connect-drcn.hispace.hicloud.com","RU":"connect-drru.hispace.dbankcloud.ru","RU_back":"connect-drru.hispace.dbankcloud.cn","DE":"connect-dre.dbankcloud.cn","DE_back":"connect-dre.hispace.hicloud.com"},"websocketgw_all":{"SG":"connect-ws-dra.hispace.dbankcloud.cn","SG_back":"connect-ws-dra.hispace.dbankcloud.com","CN":"connect-ws-drcn.hispace.dbankcloud.cn","CN_back":"connect-ws-drcn.hispace.dbankcloud.com","RU":"connect-ws-drru.hispace.dbankcloud.ru","RU_back":"connect-ws-drru.hispace.dbankcloud.cn","DE":"connect-ws-dre.hispace.dbankcloud.cn","DE_back":"connect-ws-dre.hispace.dbankcloud.com"},"client":{"cp_id":"10086000895395701","product_id":"101653523863625063","client_id":"1897301574611379136","client_secret":"B08B3EE2C3107D65FE6E6F5172E65ED76FAEF6448CFEB18B440D86A7D90A24BF","project_id":"101653523863625063","app_id":"117020145","api_key":"DgEDALJ+x0TW5eLso9RiPSEPqw63X0kvUB19D44f1oJuRlgh6O1k6JJswepOpPs15POJ7QXZLHRHgx6+FgmrwAeVR6/tewiLexEwmg==","package_name":"cn.mrrsj"},"oauth_client":{"client_id":"117020145","client_type":1},"app_info":{"app_id":"117020145","package_name":"cn.mrrsj"},"service":{"analytics":{"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn","collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn","collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn","collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com","collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn","resource_id":"p1","channel_id":""},"ml":{"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"},"cloudstorage":{"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn","storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru","storage_url_sg":"https://ops-dra.agcstorage.link","storage_url_de":"https://ops-dre.agcstorage.link","storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn","storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru","storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia","storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu","storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn"},"search":{"url":"https://search-drcn.cloud.huawei.com"},"edukit":{"edu_url":"edukit.cloud.huawei.com.cn","dh_url":"edukit.cloud.huawei.com.cn"}},"region":"CN","configuration_version":"3.0","appInfos":[{"package_name":"cn.mrrsj","client":{"app_id":"117020145"},"app_info":{"package_name":"cn.mrrsj","app_id":"117020145"},"oauth_client":{"client_type":1,"client_id":"117020145"}}]} {"agcgw":{"url":"connect-drcn.dbankcloud.cn","backurl":"connect-drcn.hispace.hicloud.com","websocketurl":"connect-ws-drcn.hispace.dbankcloud.cn","websocketbackurl":"connect-ws-drcn.hispace.dbankcloud.com"},"agcgw_all":{"SG":"connect-dra.dbankcloud.cn","SG_back":"connect-dra.hispace.hicloud.com","CN":"connect-drcn.dbankcloud.cn","CN_back":"connect-drcn.hispace.hicloud.com","RU":"connect-drru.hispace.dbankcloud.ru","RU_back":"connect-drru.hispace.dbankcloud.cn","DE":"connect-dre.dbankcloud.cn","DE_back":"connect-dre.hispace.hicloud.com"},"websocketgw_all":{"SG":"connect-ws-dra.hispace.dbankcloud.cn","SG_back":"connect-ws-dra.hispace.dbankcloud.com","CN":"connect-ws-drcn.hispace.dbankcloud.cn","CN_back":"connect-ws-drcn.hispace.dbankcloud.com","RU":"connect-ws-drru.hispace.dbankcloud.ru","RU_back":"connect-ws-drru.hispace.dbankcloud.cn","DE":"connect-ws-dre.hispace.dbankcloud.cn","DE_back":"connect-ws-dre.hispace.dbankcloud.com"},"client":{"cp_id":"260086000058238908","product_id":"461323198430018699","client_id":"1707180678149323456","client_secret":"2FCF8113D06D9C43DDDD4D291632F3769D4B991BBBF142448955B982673F3BF6","project_id":"461323198430018699","app_id":"114445451","api_key":"DgEDAP73r+rgXVMxFcwnVKN09OMmc1zg7Je7hSyx1o+hZpcOBR7cBZC40l/ehJBUzOuUGblIPOhhJOVPMHBdX1L1SFnEMcUjAEtgWA==","package_name":"cn.mrrweb"},"oauth_client":{"client_id":"114445451","client_type":1},"app_info":{"app_id":"114445451","package_name":"cn.mrrweb"},"service":{"analytics":{"collector_url":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn","collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn","collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn","collector_url_ru":"datacollector-drru.dt.dbankcloud.ru,datacollector-drru.dt.hicloud.com","collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn","resource_id":"p1","channel_id":""},"ml":{"mlservice_url":"ml-api-drcn.ai.dbankcloud.com,ml-api-drcn.ai.dbankcloud.cn"},"cloudstorage":{"storage_url":"https://agc-storage-drcn.platform.dbankcloud.cn","storage_url_ru":"https://agc-storage-drru.cloud.huawei.ru","storage_url_sg":"https://ops-dra.agcstorage.link","storage_url_de":"https://ops-dre.agcstorage.link","storage_url_cn":"https://agc-storage-drcn.platform.dbankcloud.cn","storage_url_ru_back":"https://agc-storage-drru.cloud.huawei.ru","storage_url_sg_back":"https://agc-storage-dra.cloud.huawei.asia","storage_url_de_back":"https://agc-storage-dre.cloud.huawei.eu","storage_url_cn_back":"https://agc-storage-drcn.cloud.huawei.com.cn"},"search":{"url":"https://search-drcn.cloud.huawei.com"},"edukit":{"edu_url":"edukit.cloud.huawei.com.cn","dh_url":"edukit.cloud.huawei.com.cn"}},"region":"CN","configuration_version":"3.0","appInfos":[{"package_name":"cn.mrrweb","client":{"app_id":"114445451"},"app_info":{"package_name":"cn.mrrweb","app_id":"114445451"},"oauth_client":{"client_type":1,"client_id":"114445451"}}]}

View File

@ -1 +1 @@
{"version":"1.0.1","cn.mrrsj":{"manifestPlaceholders":{"VIVO_APPKEY":"50d16a217c1eedc0217f1de2a3a065f2","VIVO_APPID":"106043356","HONOR_APPID":"104549279"},"xiaomiPushBussinessId":"46241","xiaomiPushAppId":"2882303761520503034","xiaomiPushAppKey":"5732050392034","huaweiPushBussinessId":"46244","huaweiBadgeClassName":"","honorPushBussinessId":"46249","honorBadgeClassName":"","oppoPushBussinessId":"46311","oppoPushAppKey":"aa07e769bacb4e0db3c6e35be2047c2e","oppoPushAppSecret":"b2d753036c7a47d582e1fc534af4db2f","vivoPushBussinessId":"46313"}} {"version":"1.0.1","cn.mrrweb":{"manifestPlaceholders":{"VIVO_APPKEY":"aa27f4e4839fd1345bf57025778df558","VIVO_APPID":"105916679","HONOR_APPID":"104505186"},"oppoPushBussinessId":"46175","oppoPushAppKey":"b30fc37dd1f54108bb464e963dc427df","oppoPushAppSecret":"7cfff81389cf426c92e249d89f41ddb0","huaweiPushBussinessId":"46176","huaweiBadgeClassName":"","honorPushBussinessId":"46177","honorBadgeClassName":"","xiaomiPushBussinessId":"46191","xiaomiPushAppId":"2882303761520423236","xiaomiPushAppKey":"5772042339236","vivoPushBussinessId":"46192"}}

View File

@ -1,5 +1,5 @@
{ {
"VIVO_APPKEY": "50d16a217c1eedc0217f1de2a3a065f2 ", "VIVO_APPKEY": "aa27f4e4839fd1345bf57025778df558 ",
"VIVO_APPID": "106043356", "VIVO_APPID": "105916679",
"HONOR_APPID":"104549279" "HONOR_APPID":"104505186"
} }

View File

@ -1,6 +1,6 @@
{ {
"developer_id":"110000156162", "developer_id":"110000064495",
"app_id":"104549279", "app_id":"104505186",
"package_name":"cn.mrrsj", "package_name":"cn.mrrweb",
"version":"1.0" "version":"1.0"
} }

View File

@ -1,3 +1,3 @@
{ {
"businessID":"48032" "businessID":"47959"
} }

16
node_modules/.bin/mime generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
else
exec node "$basedir/../mime/cli.js" "$@"
fi

1
node_modules/.bin/mime generated vendored Symbolic link
View File

@ -0,0 +1 @@
../mime/cli.js

17
node_modules/.bin/mime.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*

28
node_modules/.bin/mime.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../mime/cli.js" $args
} else {
& "node$exe" "$basedir/../mime/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/mkdirp generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
else
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
fi

1
node_modules/.bin/mkdirp generated vendored Symbolic link
View File

@ -0,0 +1 @@
../mkdirp/bin/cmd.js

17
node_modules/.bin/mkdirp.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*

28
node_modules/.bin/mkdirp.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
} else {
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/nanoid generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
else
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
fi

1
node_modules/.bin/nanoid generated vendored Symbolic link
View File

@ -0,0 +1 @@
../nanoid/bin/nanoid.cjs

17
node_modules/.bin/nanoid.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*

28
node_modules/.bin/nanoid.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
} else {
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
} else {
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/os-name generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../os-name/cli.js" "$@"
else
exec node "$basedir/../os-name/cli.js" "$@"
fi

1
node_modules/.bin/os-name generated vendored Symbolic link
View File

@ -0,0 +1 @@
../os-name/cli.js

17
node_modules/.bin/os-name.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\os-name\cli.js" %*

28
node_modules/.bin/os-name.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../os-name/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../os-name/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../os-name/cli.js" $args
} else {
& "node$exe" "$basedir/../os-name/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/osx-release generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../osx-release/cli.js" "$@"
else
exec node "$basedir/../osx-release/cli.js" "$@"
fi

1
node_modules/.bin/osx-release generated vendored Symbolic link
View File

@ -0,0 +1 @@
../osx-release/cli.js

17
node_modules/.bin/osx-release.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\osx-release\cli.js" %*

28
node_modules/.bin/osx-release.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../osx-release/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../osx-release/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../osx-release/cli.js" $args
} else {
& "node$exe" "$basedir/../osx-release/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/parser generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
else
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
fi

1
node_modules/.bin/parser generated vendored Symbolic link
View File

@ -0,0 +1 @@
../@babel/parser/bin/babel-parser.js

17
node_modules/.bin/parser.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*

28
node_modules/.bin/parser.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
} else {
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
} else {
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

16
node_modules/.bin/semver generated vendored
View File

@ -1,16 +0,0 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../semver/bin/semver" "$@"
else
exec node "$basedir/../semver/bin/semver" "$@"
fi

1
node_modules/.bin/semver generated vendored Symbolic link
View File

@ -0,0 +1 @@
../semver/bin/semver

17
node_modules/.bin/semver.cmd generated vendored
View File

@ -1,17 +0,0 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %*

28
node_modules/.bin/semver.ps1 generated vendored
View File

@ -1,28 +0,0 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
} else {
& "$basedir/node$exe" "$basedir/../semver/bin/semver" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../semver/bin/semver" $args
} else {
& "node$exe" "$basedir/../semver/bin/semver" $args
}
$ret=$LASTEXITCODE
}
exit $ret

10
node_modules/.package-lock.json generated vendored
View File

@ -1,5 +1,5 @@
{ {
"name": "mrr.sj.front", "name": "mrr.app.front",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
@ -60,6 +60,12 @@
"license": "MIT", "license": "MIT",
"peer": true "peer": true
}, },
"node_modules/@tencentcloud/chat": {
"version": "3.6.5",
"resolved": "https://registry.npmmirror.com/@tencentcloud/chat/-/chat-3.6.5.tgz",
"integrity": "sha512-2Wseaqn8AWdkO4iaznJcdtvIsD6U/rujoWWOlFtSK778ZFASWNLEdw0PFwycZaGZJYUb2WSyR9oOXqQH/YvrCw==",
"license": "ISC"
},
"node_modules/@vue/compiler-core": { "node_modules/@vue/compiler-core": {
"version": "3.5.18", "version": "3.5.18",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.18.tgz", "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.18.tgz",
@ -1347,7 +1353,7 @@
}, },
"node_modules/weapp-qrcode-canvas-2d": { "node_modules/weapp-qrcode-canvas-2d": {
"version": "1.1.6", "version": "1.1.6",
"resolved": "https://registry.npmjs.org/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.6.tgz", "resolved": "https://registry.npmmirror.com/weapp-qrcode-canvas-2d/-/weapp-qrcode-canvas-2d-1.1.6.tgz",
"integrity": "sha512-98/Al6OgYJwJIQFRypux43a21TZpeVy/63uYzAR4YQrIm9+vxq7bKH5v+hRwshWdku4TySDmhXC8la8wZmh5UQ==", "integrity": "sha512-98/Al6OgYJwJIQFRypux43a21TZpeVy/63uYzAR4YQrIm9+vxq7bKH5v+hRwshWdku4TySDmhXC8la8wZmh5UQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

0
node_modules/@babel/parser/bin/babel-parser.js generated vendored Normal file → Executable file
View File

205
node_modules/@tencentcloud/chat/README.md generated vendored Normal file
View File

@ -0,0 +1,205 @@
# Official JavaScript SDK for Tencent Cloud Chat
## About Tencent Cloud Chat
[Tencent Cloud Chat](https://trtc.io/products/chat) provides globally interconnected chat APIs, multi-platform SDKs, and UIKit components to help you quickly bring messaging capabilities such as one-to-one chat, group chat, chat rooms, and system notifications to your applications and websites.
## Benefits
### Higher Engagement with Our Feature-rich Chat
<img src="https://trtc.io/_next/static/media/pic1.3de62d45.png?auto=format&fit=max&w=3840" width=580 height=360 />
### Manage Groups and Conversations at Ease
<img src="https://trtc.io/_next/static/media/pic2.55b58e0d.png?auto=format&fit=max&w=3840" width=580 height=360 />
### Build Your Own Chat App in just One Day
<img src="https://trtc.io/_next/static/media/pic3.a1b13e76.png?auto=format&fit=max&w=3840" width=580 height=360 />
👉🏻 [Free Demo](https://trtc.io/demo/homepage/#/detail?scene=messenger)
📄 [Documentation](https://trtc.io/document/50061?platform=web&product=chat)
## Global Compliance Certifications
<table>
<tr>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/Vk2L735_1SOC.png" width=90 height=80 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/Mp5i133_2ISO%209001.png" width=88 height=90 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/AfnR546_4ISO%2027001.png" width=90 height=87 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/WQjf098_5ISO%2027017.png" width=90 height=87 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/aNQJ919_6ISO%2027018.png" width=90 height=86 /> </td>
</tr>
<tr>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/Rj5T795_7CSASTAR.png" width=90 height=90 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/BXNX111_8NIST%20CSF.png" width=90 height=84 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/dHEg621_9ISO%2027701.png" width=90 height=86 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/BLQI655_10ISO%2029151.png" width=90 height=86 /> </td>
<td> <img src="https://staticintl.cloudcachetci.com/cms/backend-cms/dHDE860_11BS10012.png" width=90 height=42 /> </td>
</tr>
</table>
## Core Capabilities
- 1 Billion+ Monthly active users
- 550 Billion+ Daily peak messages
- 100,000+ Customers worldwid
- 99.99% Message success rate
## Use Cases
### Social
Build real-time community interactions in your app using a simple chat API.
✓Various message types ✓Announcement ✓Group chat
<img src="https://trtc.io/_next/static/media/group1.3289e577.png?auto=format&fit=max&w=3840" width=588 height=602 />
### Live
Welcome a large audience to your immersive live show using a simple chat API.
✓Unlimited participants ✓Interactive live streaming ✓Online chat
<img src="https://trtc.io/_next/static/media/group6.3937f7d8.png?auto=format&fit=max&w=3840" width=588 height=602 />
### Metaverse
Bridge the limitless virtual and physical worlds using simple chat SDKs.
✓Chat in metaverse ✓User profile and management ✓Immersive interactions
<img src="https://trtc.io/_next/static/media/group5.6975e625.png?auto=format&fit=max&w=3840" width=588 height=602 />
### Gaming
Intensify gaming with real-time chat engagement using a simple chat API.
✓Chat in game ✓Global message access ✓User profile and management
<img src="https://trtc.io/_next/static/media/group4.0361228f.png?auto=format&fit=max&w=3840" width=588 height=602 />
### Education
Create interactive virtual classrooms with real-time chat experiences using simple chat SDK and API.
✓Class start notifications ✓Student management ✓Class messages
<img src="https://trtc.io/_next/static/media/group2.08a44cc6.png?auto=format&fit=max&w=3840" width=588 height=602 />
### On-demand Service
Resolve order issues with in-app conversations quickly, with simple SDK and API.
✓Customer service support ✓Order cancellations minimization ✓Social features
<img src="https://trtc.io/_next/static/media/group3.45675954.png?auto=format&fit=max&w=3840" width=588 height=602 />
## Installation
```javascript
npm install @tencentcloud/chat --save
// The upload plugin is required to send messages such as images and files.
npm install tim-upload-plugin --save
```
## Getting started
```javascript
import TencentCloudChat from '@tencentcloud/chat';
import TIMUploadPlugin from 'tim-upload-plugin';
// Create an SDK instance.
// The `TencentCloudChat.create()` method returns the same instance for the same `SDKAppID`.
// The SDK instance is usually represented by `chat`.
let chat = TencentCloudChat.create({
SDKAppID: 0 // Replace `0` with the `SDKAppID` of your Chat app during access.
});
// Common level. You are advised to use this level during connection as it covers more logs.
chat.setLogLevel(0);
// Release level, at which the SDK outputs important information.
// You are advised to use this log level in a production environment.
// chat.setLogLevel(1);
// Register the Tencent Cloud Chat upload plugin.
chat.registerPlugin({'tim-upload-plugin': TIMUploadPlugin});
```
## Sending your first message
### 1. Generate UserSig
UserSig is a password used to log in to Tencent Cloud Chat. It is the ciphertext obtained after data such as UserID is encrypted. This [document](https://trtc.io/document/34385) describes how to generate a UserSig.
### 2. Listen to the SDK_READY event
```javascript
// This event is triggered when the SDK enters the ready state.
// When SDK is ready, the access side can call SDK APIs such as the message sending API to use various features of the SDK
let onSdkReady = function(event) {
// Now you can create a message instance and send it.
};
chat.on(TencentCloudChat.EVENT.SDK_READY, onSdkReady);
let onMessageReceived = function(event) {
// A newly pushed one-to-one message, group message, group tip, or group system notification is received. You can traverse event.data to obtain the message list and render it to the UI.
// event.name - TencentCloudChat.EVENT.MESSAGE_RECEIVED
// event.data - An array that stores Message objects - [Message]
};
chat.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onMessageReceived);
```
### 3. Login in to the Chat SDK
```javascript
let promise = chat.login({userID: 'your userID', userSig: 'your userSig'});
promise.then(function(imResponse) {
console.log(imResponse.data); // Login successful
if (imResponse.data.repeatLogin === true) {
// Indicates that the account has logged in and that the current login will be a repeated login.
console.log(imResponse.data.errorInfo);
}
}).catch(function(imError) {
console.warn('login error:', imError); // Error information
});
```
After successful login, to call APIs that require authentication, such as `sendMessage`, you must wait until the SDK enters the ready state (you can obtain the status of the SDK by listening to the `TencentCloudChat.EVENT.SDK_READY` event.
### 3. Create a message instance
```javascript
let message = chat.createTextMessage({
to: 'user1',
conversationType: TencentCloudChat.TYPES.CONV_C2C,
payload: {
text: 'Hello Tencent!'
},
// Message custom data (saved in the cloud, will be sent to the peer end, and can still be pulled after the app is uninstalled and reinstalled)
// cloudCustomData: 'your cloud custom data'
});
```
### 4. Send the message instance
```javascript
let promise = chat.sendMessage(message);
promise.then(function(imResponse) {
// The message is sent successfully.
console.log(imResponse);
}).catch(function(imError) {
// The message fails to be sent.
console.warn('sendMessage error:', imError);
});
```
## Contact Us
Join a Tencent Cloud Chat developer group for Reliable technical support & Product details & Constant exchange of ideas.
- Telegram group (EN): [join](https://t.me/+1doS9AUBmndhNGNl)
- WhatsApp group (EN): [join](https://chat.whatsapp.com/Gfbxk7rQBqc8Rz4pzzP27A)
- Telegram group (ZH): [join](https://t.me/tencent_imsdk)
- WhatsApp group (ZH): [join](https://chat.whatsapp.com/IVa11ZkVmKTEwSWsAzSyik)
## Supported Browsers
| Browser | Supported versions |
| ---- | ---- |
| Chrome | 16 or higher |
| Edge | 13 or higher |
| Firefox | 11 or higher |
| Safari | 7 or higher |
| Internet Explorer | 10 or higher |
| Opera | 12.1 or higher |
| iOS Safari | 7 or higher |
| Android Browswer | 4.4 (Kitkat) or higher |

3130
node_modules/@tencentcloud/chat/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/@tencentcloud/chat/index.es.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/@tencentcloud/chat/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

13
node_modules/@tencentcloud/chat/package.json generated vendored Normal file
View File

@ -0,0 +1,13 @@
{
"name": "@tencentcloud/chat",
"version": "3.6.5",
"description": "Tencent Cloud Chat SDK for Web/Mini Program/uni-app/React Native/Donut",
"main": "index.js",
"keywords": ["chat", "real-time chat", "uni-app", "React Native", "Donut", "push", "messaging", "IM", "trtc"],
"repository": {
"type": "git",
"url": "https://trtc.io/products/chat"
},
"author": "Tencent Cloud Terminal R&D Center",
"license": "ISC"
}

View File

@ -20145,232 +20145,232 @@ function objectToString(o) {
} }
},{"buffer":103}],383:[function(require,module,exports){ },{"buffer":103}],383:[function(require,module,exports){
/* /*
* Date Format 1.2.3 * Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> * (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license * MIT license
* *
* Includes enhancements by Scott Trenda <scott.trenda.net> * Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/> * and Kris Kowal <cixar.com/~kris.kowal/>
* *
* Accepts a date, a mask, or a date and a mask. * Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date. * Returns a formatted version of the given date.
* The date defaults to the current date/time. * The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default. * The mask defaults to dateFormat.masks.default.
*/ */
(function(global) { (function(global) {
'use strict'; 'use strict';
var dateFormat = (function() { var dateFormat = (function() {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g; var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g;
var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g; var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;
var timezoneClip = /[^-+\dA-Z]/g; var timezoneClip = /[^-+\dA-Z]/g;
// Regexes and supporting functions are cached through closure // Regexes and supporting functions are cached through closure
return function (date, mask, utc, gmt) { return function (date, mask, utc, gmt) {
// You can't provide utc if you skip other args (use the 'UTC:' mask prefix) // You can't provide utc if you skip other args (use the 'UTC:' mask prefix)
if (arguments.length === 1 && kindOf(date) === 'string' && !/\d/.test(date)) { if (arguments.length === 1 && kindOf(date) === 'string' && !/\d/.test(date)) {
mask = date; mask = date;
date = undefined; date = undefined;
} }
date = date || new Date; date = date || new Date;
if(!(date instanceof Date)) { if(!(date instanceof Date)) {
date = new Date(date); date = new Date(date);
} }
if (isNaN(date)) { if (isNaN(date)) {
throw TypeError('Invalid date'); throw TypeError('Invalid date');
} }
mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']); mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']);
// Allow setting the utc/gmt argument via the mask // Allow setting the utc/gmt argument via the mask
var maskSlice = mask.slice(0, 4); var maskSlice = mask.slice(0, 4);
if (maskSlice === 'UTC:' || maskSlice === 'GMT:') { if (maskSlice === 'UTC:' || maskSlice === 'GMT:') {
mask = mask.slice(4); mask = mask.slice(4);
utc = true; utc = true;
if (maskSlice === 'GMT:') { if (maskSlice === 'GMT:') {
gmt = true; gmt = true;
} }
} }
var _ = utc ? 'getUTC' : 'get'; var _ = utc ? 'getUTC' : 'get';
var d = date[_ + 'Date'](); var d = date[_ + 'Date']();
var D = date[_ + 'Day'](); var D = date[_ + 'Day']();
var m = date[_ + 'Month'](); var m = date[_ + 'Month']();
var y = date[_ + 'FullYear'](); var y = date[_ + 'FullYear']();
var H = date[_ + 'Hours'](); var H = date[_ + 'Hours']();
var M = date[_ + 'Minutes'](); var M = date[_ + 'Minutes']();
var s = date[_ + 'Seconds'](); var s = date[_ + 'Seconds']();
var L = date[_ + 'Milliseconds'](); var L = date[_ + 'Milliseconds']();
var o = utc ? 0 : date.getTimezoneOffset(); var o = utc ? 0 : date.getTimezoneOffset();
var W = getWeek(date); var W = getWeek(date);
var N = getDayOfWeek(date); var N = getDayOfWeek(date);
var flags = { var flags = {
d: d, d: d,
dd: pad(d), dd: pad(d),
ddd: dateFormat.i18n.dayNames[D], ddd: dateFormat.i18n.dayNames[D],
dddd: dateFormat.i18n.dayNames[D + 7], dddd: dateFormat.i18n.dayNames[D + 7],
m: m + 1, m: m + 1,
mm: pad(m + 1), mm: pad(m + 1),
mmm: dateFormat.i18n.monthNames[m], mmm: dateFormat.i18n.monthNames[m],
mmmm: dateFormat.i18n.monthNames[m + 12], mmmm: dateFormat.i18n.monthNames[m + 12],
yy: String(y).slice(2), yy: String(y).slice(2),
yyyy: y, yyyy: y,
h: H % 12 || 12, h: H % 12 || 12,
hh: pad(H % 12 || 12), hh: pad(H % 12 || 12),
H: H, H: H,
HH: pad(H), HH: pad(H),
M: M, M: M,
MM: pad(M), MM: pad(M),
s: s, s: s,
ss: pad(s), ss: pad(s),
l: pad(L, 3), l: pad(L, 3),
L: pad(Math.round(L / 10)), L: pad(Math.round(L / 10)),
t: H < 12 ? 'a' : 'p', t: H < 12 ? 'a' : 'p',
tt: H < 12 ? 'am' : 'pm', tt: H < 12 ? 'am' : 'pm',
T: H < 12 ? 'A' : 'P', T: H < 12 ? 'A' : 'P',
TT: H < 12 ? 'AM' : 'PM', TT: H < 12 ? 'AM' : 'PM',
Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''), Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''),
o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10],
W: W, W: W,
N: N N: N
}; };
return mask.replace(token, function (match) { return mask.replace(token, function (match) {
if (match in flags) { if (match in flags) {
return flags[match]; return flags[match];
} }
return match.slice(1, match.length - 1); return match.slice(1, match.length - 1);
}); });
}; };
})(); })();
dateFormat.masks = { dateFormat.masks = {
'default': 'ddd mmm dd yyyy HH:MM:ss', 'default': 'ddd mmm dd yyyy HH:MM:ss',
'shortDate': 'm/d/yy', 'shortDate': 'm/d/yy',
'mediumDate': 'mmm d, yyyy', 'mediumDate': 'mmm d, yyyy',
'longDate': 'mmmm d, yyyy', 'longDate': 'mmmm d, yyyy',
'fullDate': 'dddd, mmmm d, yyyy', 'fullDate': 'dddd, mmmm d, yyyy',
'shortTime': 'h:MM TT', 'shortTime': 'h:MM TT',
'mediumTime': 'h:MM:ss TT', 'mediumTime': 'h:MM:ss TT',
'longTime': 'h:MM:ss TT Z', 'longTime': 'h:MM:ss TT Z',
'isoDate': 'yyyy-mm-dd', 'isoDate': 'yyyy-mm-dd',
'isoTime': 'HH:MM:ss', 'isoTime': 'HH:MM:ss',
'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso', 'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso',
'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'', 'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'',
'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z' 'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z'
}; };
// Internationalization strings // Internationalization strings
dateFormat.i18n = { dateFormat.i18n = {
dayNames: [ dayNames: [
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
], ],
monthNames: [ monthNames: [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
] ]
}; };
function pad(val, len) { function pad(val, len) {
val = String(val); val = String(val);
len = len || 2; len = len || 2;
while (val.length < len) { while (val.length < len) {
val = '0' + val; val = '0' + val;
} }
return val; return val;
} }
/** /**
* Get the ISO 8601 week number * Get the ISO 8601 week number
* Based on comments from * Based on comments from
* http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html
* *
* @param {Object} `date` * @param {Object} `date`
* @return {Number} * @return {Number}
*/ */
function getWeek(date) { function getWeek(date) {
// Remove time components of date // Remove time components of date
var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate());
// Change date to Thursday same week // Change date to Thursday same week
targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3);
// Take January 4th as it is always in week 1 (see ISO 8601) // Take January 4th as it is always in week 1 (see ISO 8601)
var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); var firstThursday = new Date(targetThursday.getFullYear(), 0, 4);
// Change date to Thursday same week // Change date to Thursday same week
firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3);
// Check if daylight-saving-time-switch occurred and correct for it // Check if daylight-saving-time-switch occurred and correct for it
var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();
targetThursday.setHours(targetThursday.getHours() - ds); targetThursday.setHours(targetThursday.getHours() - ds);
// Number of weeks between target Thursday and first Thursday // Number of weeks between target Thursday and first Thursday
var weekDiff = (targetThursday - firstThursday) / (86400000*7); var weekDiff = (targetThursday - firstThursday) / (86400000*7);
return 1 + Math.floor(weekDiff); return 1 + Math.floor(weekDiff);
} }
/** /**
* Get ISO-8601 numeric representation of the day of the week * Get ISO-8601 numeric representation of the day of the week
* 1 (for Monday) through 7 (for Sunday) * 1 (for Monday) through 7 (for Sunday)
* *
* @param {Object} `date` * @param {Object} `date`
* @return {Number} * @return {Number}
*/ */
function getDayOfWeek(date) { function getDayOfWeek(date) {
var dow = date.getDay(); var dow = date.getDay();
if(dow === 0) { if(dow === 0) {
dow = 7; dow = 7;
} }
return dow; return dow;
} }
/** /**
* kind-of shortcut * kind-of shortcut
* @param {*} val * @param {*} val
* @return {String} * @return {String}
*/ */
function kindOf(val) { function kindOf(val) {
if (val === null) { if (val === null) {
return 'null'; return 'null';
} }
if (val === undefined) { if (val === undefined) {
return 'undefined'; return 'undefined';
} }
if (typeof val !== 'object') { if (typeof val !== 'object') {
return typeof val; return typeof val;
} }
if (Array.isArray(val)) { if (Array.isArray(val)) {
return 'array'; return 'array';
} }
return {}.toString.call(val) return {}.toString.call(val)
.slice(8, -1).toLowerCase(); .slice(8, -1).toLowerCase();
}; };
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
define(function () { define(function () {
return dateFormat; return dateFormat;
}); });
} else if (typeof exports === 'object') { } else if (typeof exports === 'object') {
module.exports = dateFormat; module.exports = dateFormat;
} else { } else {
global.dateFormat = dateFormat; global.dateFormat = dateFormat;
} }
})(this); })(this);
},{}],384:[function(require,module,exports){ },{}],384:[function(require,module,exports){
'use strict'; 'use strict';

4
node_modules/dateformat/.npmignore generated vendored
View File

@ -1,2 +1,2 @@
test test
.travis.yml .travis.yml

View File

@ -1,3 +1,3 @@
{ {
"CurrentProjectSetting": null "CurrentProjectSetting": null
} }

File diff suppressed because it is too large Load Diff

40
node_modules/dateformat/LICENSE generated vendored
View File

@ -1,20 +1,20 @@
(c) 2007-2009 Steven Levithan <stevenlevithan.com> (c) 2007-2009 Steven Levithan <stevenlevithan.com>
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

268
node_modules/dateformat/Readme.md generated vendored
View File

@ -1,134 +1,134 @@
# dateformat # dateformat
A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function. A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.
[![Build Status](https://travis-ci.org/felixge/node-dateformat.svg)](https://travis-ci.org/felixge/node-dateformat) [![Build Status](https://travis-ci.org/felixge/node-dateformat.svg)](https://travis-ci.org/felixge/node-dateformat)
## Modifications ## Modifications
* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers. * Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.
* Added a `module.exports = dateFormat;` statement at the bottom * Added a `module.exports = dateFormat;` statement at the bottom
* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week * Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week
## Installation ## Installation
```bash ```bash
$ npm install dateformat $ npm install dateformat
$ dateformat --help $ dateformat --help
``` ```
## Usage ## Usage
As taken from Steven's post, modified to match the Modifications listed above: As taken from Steven's post, modified to match the Modifications listed above:
```js ```js
var dateFormat = require('dateformat'); var dateFormat = require('dateformat');
var now = new Date(); var now = new Date();
// Basic usage // Basic usage
dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
// Saturday, June 9th, 2007, 5:46:21 PM // Saturday, June 9th, 2007, 5:46:21 PM
// You can use one of several named masks // You can use one of several named masks
dateFormat(now, "isoDateTime"); dateFormat(now, "isoDateTime");
// 2007-06-09T17:46:21 // 2007-06-09T17:46:21
// ...Or add your own // ...Or add your own
dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"'; dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
dateFormat(now, "hammerTime"); dateFormat(now, "hammerTime");
// 17:46! Can't touch this! // 17:46! Can't touch this!
// You can also provide the date as a string // You can also provide the date as a string
dateFormat("Jun 9 2007", "fullDate"); dateFormat("Jun 9 2007", "fullDate");
// Saturday, June 9, 2007 // Saturday, June 9, 2007
// Note that if you don't include the mask argument, // Note that if you don't include the mask argument,
// dateFormat.masks.default is used // dateFormat.masks.default is used
dateFormat(now); dateFormat(now);
// Sat Jun 09 2007 17:46:21 // Sat Jun 09 2007 17:46:21
// And if you don't include the date argument, // And if you don't include the date argument,
// the current date and time is used // the current date and time is used
dateFormat(); dateFormat();
// Sat Jun 09 2007 17:46:22 // Sat Jun 09 2007 17:46:22
// You can also skip the date argument (as long as your mask doesn't // You can also skip the date argument (as long as your mask doesn't
// contain any numbers), in which case the current date/time is used // contain any numbers), in which case the current date/time is used
dateFormat("longTime"); dateFormat("longTime");
// 5:46:22 PM EST // 5:46:22 PM EST
// And finally, you can convert local time to UTC time. Simply pass in // And finally, you can convert local time to UTC time. Simply pass in
// true as an additional argument (no argument skipping allowed in this case): // true as an additional argument (no argument skipping allowed in this case):
dateFormat(now, "longTime", true); dateFormat(now, "longTime", true);
// 10:46:21 PM UTC // 10:46:21 PM UTC
// ...Or add the prefix "UTC:" or "GMT:" to your mask. // ...Or add the prefix "UTC:" or "GMT:" to your mask.
dateFormat(now, "UTC:h:MM:ss TT Z"); dateFormat(now, "UTC:h:MM:ss TT Z");
// 10:46:21 PM UTC // 10:46:21 PM UTC
// You can also get the ISO 8601 week of the year: // You can also get the ISO 8601 week of the year:
dateFormat(now, "W"); dateFormat(now, "W");
// 42 // 42
// and also get the ISO 8601 numeric representation of the day of the week: // and also get the ISO 8601 numeric representation of the day of the week:
dateFormat(now,"N"); dateFormat(now,"N");
// 6 // 6
``` ```
### Mask options ### Mask options
Mask | Description Mask | Description
---- | ----------- ---- | -----------
`d` | Day of the month as digits; no leading zero for single-digit days. `d` | Day of the month as digits; no leading zero for single-digit days.
`dd` | Day of the month as digits; leading zero for single-digit days. `dd` | Day of the month as digits; leading zero for single-digit days.
`ddd` | Day of the week as a three-letter abbreviation. `ddd` | Day of the week as a three-letter abbreviation.
`dddd` | Day of the week as its full name. `dddd` | Day of the week as its full name.
`m` | Month as digits; no leading zero for single-digit months. `m` | Month as digits; no leading zero for single-digit months.
`mm` | Month as digits; leading zero for single-digit months. `mm` | Month as digits; leading zero for single-digit months.
`mmm` | Month as a three-letter abbreviation. `mmm` | Month as a three-letter abbreviation.
`mmmm` | Month as its full name. `mmmm` | Month as its full name.
`yy` | Year as last two digits; leading zero for years less than 10. `yy` | Year as last two digits; leading zero for years less than 10.
`yyyy` | Year represented by four digits. `yyyy` | Year represented by four digits.
`h` | Hours; no leading zero for single-digit hours (12-hour clock). `h` | Hours; no leading zero for single-digit hours (12-hour clock).
`hh` | Hours; leading zero for single-digit hours (12-hour clock). `hh` | Hours; leading zero for single-digit hours (12-hour clock).
`H` | Hours; no leading zero for single-digit hours (24-hour clock). `H` | Hours; no leading zero for single-digit hours (24-hour clock).
`HH` | Hours; leading zero for single-digit hours (24-hour clock). `HH` | Hours; leading zero for single-digit hours (24-hour clock).
`M` | Minutes; no leading zero for single-digit minutes. `M` | Minutes; no leading zero for single-digit minutes.
`MM` | Minutes; leading zero for single-digit minutes. `MM` | Minutes; leading zero for single-digit minutes.
`N` | ISO 8601 numeric representation of the day of the week. `N` | ISO 8601 numeric representation of the day of the week.
`o` | GMT/UTC timezone offset, e.g. -0500 or +0230. `o` | GMT/UTC timezone offset, e.g. -0500 or +0230.
`s` | Seconds; no leading zero for single-digit seconds. `s` | Seconds; no leading zero for single-digit seconds.
`ss` | Seconds; leading zero for single-digit seconds. `ss` | Seconds; leading zero for single-digit seconds.
`S` | The date's ordinal suffix (st, nd, rd, or th). Works well with `d`. `S` | The date's ordinal suffix (st, nd, rd, or th). Works well with `d`.
`l` | Milliseconds; gives 3 digits. `l` | Milliseconds; gives 3 digits.
`L` | Milliseconds; gives 2 digits. `L` | Milliseconds; gives 2 digits.
`t` | Lowercase, single-character time marker string: a or p. `t` | Lowercase, single-character time marker string: a or p.
`tt` | Lowercase, two-character time marker string: am or pm. `tt` | Lowercase, two-character time marker string: am or pm.
`T` | Uppercase, single-character time marker string: A or P. `T` | Uppercase, single-character time marker string: A or P.
`TT` | Uppercase, two-character time marker string: AM or PM. `TT` | Uppercase, two-character time marker string: AM or PM.
`W` | ISO 8601 week number of the year, e.g. 42 `W` | ISO 8601 week number of the year, e.g. 42
`Z` | US timezone abbreviation, e.g. EST or MDT. With non-US timezones or in the `Z` | US timezone abbreviation, e.g. EST or MDT. With non-US timezones or in the
`'...'`, `"..."` | Literal character sequence. Surrounding quotes are removed. `'...'`, `"..."` | Literal character sequence. Surrounding quotes are removed.
`UTC:` | Must be the first four characters of the mask. Converts the date from local time to UTC/GMT/Zulu time before applying the mask. The "UTC:" prefix is removed. `UTC:` | Must be the first four characters of the mask. Converts the date from local time to UTC/GMT/Zulu time before applying the mask. The "UTC:" prefix is removed.
### Named Formats ### Named Formats
Name | Mask | Example Name | Mask | Example
---- | ---- | ------- ---- | ---- | -------
`default` | `ddd mmm dd yyyy HH:MM:ss` | Sat Jun 09 2007 17:46:21 `default` | `ddd mmm dd yyyy HH:MM:ss` | Sat Jun 09 2007 17:46:21
`shortDate` | `m/d/yy` | 6/9/07 `shortDate` | `m/d/yy` | 6/9/07
`mediumDate` | `mmm d, yyyy` | Jun 9, 2007 `mediumDate` | `mmm d, yyyy` | Jun 9, 2007
`longDate` | `mmmm d, yyyy` | June 9, 2007 `longDate` | `mmmm d, yyyy` | June 9, 2007
`fullDate` | `dddd, mmmm d, yyyy` | Saturday, June 9, 2007 `fullDate` | `dddd, mmmm d, yyyy` | Saturday, June 9, 2007
`shortTime` | `h:MM TT` | 5:46 PM `shortTime` | `h:MM TT` | 5:46 PM
`mediumTime` | `h:MM:ss TT` | 5:46:21 PM `mediumTime` | `h:MM:ss TT` | 5:46:21 PM
`longTime` | `h:MM:ss TT Z` | 5:46:21 PM EST `longTime` | `h:MM:ss TT Z` | 5:46:21 PM EST
`isoDate` | `yyyy-mm-dd` | 2007-06-09 `isoDate` | `yyyy-mm-dd` | 2007-06-09
`isoTime` | `HH:MM:ss` | 17:46:21 `isoTime` | `HH:MM:ss` | 17:46:21
`isoDateTime` | `yyyy-mm-dd'T'HH:MM:ss` | 2007-06-09T17:46:21 `isoDateTime` | `yyyy-mm-dd'T'HH:MM:ss` | 2007-06-09T17:46:21
`isoUtcDateTime` | `UTC:yyyy-mm-dd'T'HH:MM:ss'Z'` | 2007-06-09T22:46:21Z `isoUtcDateTime` | `UTC:yyyy-mm-dd'T'HH:MM:ss'Z'` | 2007-06-09T22:46:21Z
## License ## License
(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license. (c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.
[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format [dateformat]: http://blog.stevenlevithan.com/archives/date-time-format
[stevenlevithan]: http://stevenlevithan.com/ [stevenlevithan]: http://stevenlevithan.com/

View File

@ -1,226 +1,226 @@
/* /*
* Date Format 1.2.3 * Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> * (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license * MIT license
* *
* Includes enhancements by Scott Trenda <scott.trenda.net> * Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/> * and Kris Kowal <cixar.com/~kris.kowal/>
* *
* Accepts a date, a mask, or a date and a mask. * Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date. * Returns a formatted version of the given date.
* The date defaults to the current date/time. * The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default. * The mask defaults to dateFormat.masks.default.
*/ */
(function(global) { (function(global) {
'use strict'; 'use strict';
var dateFormat = (function() { var dateFormat = (function() {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g; var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g;
var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g; var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;
var timezoneClip = /[^-+\dA-Z]/g; var timezoneClip = /[^-+\dA-Z]/g;
// Regexes and supporting functions are cached through closure // Regexes and supporting functions are cached through closure
return function (date, mask, utc, gmt) { return function (date, mask, utc, gmt) {
// You can't provide utc if you skip other args (use the 'UTC:' mask prefix) // You can't provide utc if you skip other args (use the 'UTC:' mask prefix)
if (arguments.length === 1 && kindOf(date) === 'string' && !/\d/.test(date)) { if (arguments.length === 1 && kindOf(date) === 'string' && !/\d/.test(date)) {
mask = date; mask = date;
date = undefined; date = undefined;
} }
date = date || new Date; date = date || new Date;
if(!(date instanceof Date)) { if(!(date instanceof Date)) {
date = new Date(date); date = new Date(date);
} }
if (isNaN(date)) { if (isNaN(date)) {
throw TypeError('Invalid date'); throw TypeError('Invalid date');
} }
mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']); mask = String(dateFormat.masks[mask] || mask || dateFormat.masks['default']);
// Allow setting the utc/gmt argument via the mask // Allow setting the utc/gmt argument via the mask
var maskSlice = mask.slice(0, 4); var maskSlice = mask.slice(0, 4);
if (maskSlice === 'UTC:' || maskSlice === 'GMT:') { if (maskSlice === 'UTC:' || maskSlice === 'GMT:') {
mask = mask.slice(4); mask = mask.slice(4);
utc = true; utc = true;
if (maskSlice === 'GMT:') { if (maskSlice === 'GMT:') {
gmt = true; gmt = true;
} }
} }
var _ = utc ? 'getUTC' : 'get'; var _ = utc ? 'getUTC' : 'get';
var d = date[_ + 'Date'](); var d = date[_ + 'Date']();
var D = date[_ + 'Day'](); var D = date[_ + 'Day']();
var m = date[_ + 'Month'](); var m = date[_ + 'Month']();
var y = date[_ + 'FullYear'](); var y = date[_ + 'FullYear']();
var H = date[_ + 'Hours'](); var H = date[_ + 'Hours']();
var M = date[_ + 'Minutes'](); var M = date[_ + 'Minutes']();
var s = date[_ + 'Seconds'](); var s = date[_ + 'Seconds']();
var L = date[_ + 'Milliseconds'](); var L = date[_ + 'Milliseconds']();
var o = utc ? 0 : date.getTimezoneOffset(); var o = utc ? 0 : date.getTimezoneOffset();
var W = getWeek(date); var W = getWeek(date);
var N = getDayOfWeek(date); var N = getDayOfWeek(date);
var flags = { var flags = {
d: d, d: d,
dd: pad(d), dd: pad(d),
ddd: dateFormat.i18n.dayNames[D], ddd: dateFormat.i18n.dayNames[D],
dddd: dateFormat.i18n.dayNames[D + 7], dddd: dateFormat.i18n.dayNames[D + 7],
m: m + 1, m: m + 1,
mm: pad(m + 1), mm: pad(m + 1),
mmm: dateFormat.i18n.monthNames[m], mmm: dateFormat.i18n.monthNames[m],
mmmm: dateFormat.i18n.monthNames[m + 12], mmmm: dateFormat.i18n.monthNames[m + 12],
yy: String(y).slice(2), yy: String(y).slice(2),
yyyy: y, yyyy: y,
h: H % 12 || 12, h: H % 12 || 12,
hh: pad(H % 12 || 12), hh: pad(H % 12 || 12),
H: H, H: H,
HH: pad(H), HH: pad(H),
M: M, M: M,
MM: pad(M), MM: pad(M),
s: s, s: s,
ss: pad(s), ss: pad(s),
l: pad(L, 3), l: pad(L, 3),
L: pad(Math.round(L / 10)), L: pad(Math.round(L / 10)),
t: H < 12 ? 'a' : 'p', t: H < 12 ? 'a' : 'p',
tt: H < 12 ? 'am' : 'pm', tt: H < 12 ? 'am' : 'pm',
T: H < 12 ? 'A' : 'P', T: H < 12 ? 'A' : 'P',
TT: H < 12 ? 'AM' : 'PM', TT: H < 12 ? 'AM' : 'PM',
Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''), Z: gmt ? 'GMT' : utc ? 'UTC' : (String(date).match(timezone) || ['']).pop().replace(timezoneClip, ''),
o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), o: (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10], S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10],
W: W, W: W,
N: N N: N
}; };
return mask.replace(token, function (match) { return mask.replace(token, function (match) {
if (match in flags) { if (match in flags) {
return flags[match]; return flags[match];
} }
return match.slice(1, match.length - 1); return match.slice(1, match.length - 1);
}); });
}; };
})(); })();
dateFormat.masks = { dateFormat.masks = {
'default': 'ddd mmm dd yyyy HH:MM:ss', 'default': 'ddd mmm dd yyyy HH:MM:ss',
'shortDate': 'm/d/yy', 'shortDate': 'm/d/yy',
'mediumDate': 'mmm d, yyyy', 'mediumDate': 'mmm d, yyyy',
'longDate': 'mmmm d, yyyy', 'longDate': 'mmmm d, yyyy',
'fullDate': 'dddd, mmmm d, yyyy', 'fullDate': 'dddd, mmmm d, yyyy',
'shortTime': 'h:MM TT', 'shortTime': 'h:MM TT',
'mediumTime': 'h:MM:ss TT', 'mediumTime': 'h:MM:ss TT',
'longTime': 'h:MM:ss TT Z', 'longTime': 'h:MM:ss TT Z',
'isoDate': 'yyyy-mm-dd', 'isoDate': 'yyyy-mm-dd',
'isoTime': 'HH:MM:ss', 'isoTime': 'HH:MM:ss',
'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso', 'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso',
'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'', 'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'',
'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z' 'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z'
}; };
// Internationalization strings // Internationalization strings
dateFormat.i18n = { dateFormat.i18n = {
dayNames: [ dayNames: [
'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
], ],
monthNames: [ monthNames: [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
] ]
}; };
function pad(val, len) { function pad(val, len) {
val = String(val); val = String(val);
len = len || 2; len = len || 2;
while (val.length < len) { while (val.length < len) {
val = '0' + val; val = '0' + val;
} }
return val; return val;
} }
/** /**
* Get the ISO 8601 week number * Get the ISO 8601 week number
* Based on comments from * Based on comments from
* http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html
* *
* @param {Object} `date` * @param {Object} `date`
* @return {Number} * @return {Number}
*/ */
function getWeek(date) { function getWeek(date) {
// Remove time components of date // Remove time components of date
var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate());
// Change date to Thursday same week // Change date to Thursday same week
targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3); targetThursday.setDate(targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3);
// Take January 4th as it is always in week 1 (see ISO 8601) // Take January 4th as it is always in week 1 (see ISO 8601)
var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); var firstThursday = new Date(targetThursday.getFullYear(), 0, 4);
// Change date to Thursday same week // Change date to Thursday same week
firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3); firstThursday.setDate(firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3);
// Check if daylight-saving-time-switch occurred and correct for it // Check if daylight-saving-time-switch occurred and correct for it
var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();
targetThursday.setHours(targetThursday.getHours() - ds); targetThursday.setHours(targetThursday.getHours() - ds);
// Number of weeks between target Thursday and first Thursday // Number of weeks between target Thursday and first Thursday
var weekDiff = (targetThursday - firstThursday) / (86400000*7); var weekDiff = (targetThursday - firstThursday) / (86400000*7);
return 1 + Math.floor(weekDiff); return 1 + Math.floor(weekDiff);
} }
/** /**
* Get ISO-8601 numeric representation of the day of the week * Get ISO-8601 numeric representation of the day of the week
* 1 (for Monday) through 7 (for Sunday) * 1 (for Monday) through 7 (for Sunday)
* *
* @param {Object} `date` * @param {Object} `date`
* @return {Number} * @return {Number}
*/ */
function getDayOfWeek(date) { function getDayOfWeek(date) {
var dow = date.getDay(); var dow = date.getDay();
if(dow === 0) { if(dow === 0) {
dow = 7; dow = 7;
} }
return dow; return dow;
} }
/** /**
* kind-of shortcut * kind-of shortcut
* @param {*} val * @param {*} val
* @return {String} * @return {String}
*/ */
function kindOf(val) { function kindOf(val) {
if (val === null) { if (val === null) {
return 'null'; return 'null';
} }
if (val === undefined) { if (val === undefined) {
return 'undefined'; return 'undefined';
} }
if (typeof val !== 'object') { if (typeof val !== 'object') {
return typeof val; return typeof val;
} }
if (Array.isArray(val)) { if (Array.isArray(val)) {
return 'array'; return 'array';
} }
return {}.toString.call(val) return {}.toString.call(val)
.slice(8, -1).toLowerCase(); .slice(8, -1).toLowerCase();
}; };
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
define(function () { define(function () {
return dateFormat; return dateFormat;
}); });
} else if (typeof exports === 'object') { } else if (typeof exports === 'object') {
module.exports = dateFormat; module.exports = dateFormat;
} else { } else {
global.dateFormat = dateFormat; global.dateFormat = dateFormat;
} }
})(this); })(this);

0
node_modules/is-class-hotfix/.editorconfig generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/.gitattributes generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/CHANGELOG.md generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/LICENSE.md generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/README.md generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/bower.json generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/is-class.js generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/package.json generated vendored Normal file → Executable file
View File

0
node_modules/is-class-hotfix/test/is-class.js generated vendored Normal file → Executable file
View File

8
node_modules/js-pinyin/.babelrc generated vendored
View File

@ -1,5 +1,5 @@
{ {
"presets": [ "presets": [
"es2015" "es2015"
] ]
} }

42
node_modules/js-pinyin/LICENSE generated vendored
View File

@ -1,21 +1,21 @@
MIT License MIT License
Copyright (c) 2017 Copyright (c) 2017
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

52
node_modules/js-pinyin/README.md generated vendored
View File

@ -1,26 +1,26 @@
# 汉字转拼音 # 汉字转拼音
把汉字转化为拼音字母,由[chinalu/JSPinyin](https://github.com/chinalu/JSPinyin)改写使用新语法并去掉mootools的依赖 把汉字转化为拼音字母,由[chinalu/JSPinyin](https://github.com/chinalu/JSPinyin)改写使用新语法并去掉mootools的依赖
## 安装 ## 安装
```base ```base
npm install js-pinyin npm install js-pinyin
import pinyin from 'js-pinyin' import pinyin from 'js-pinyin'
``` ```
## 使用示例 ## 使用示例
```js ```js
let pinyin = require('js-pinyin'); let pinyin = require('js-pinyin');
pinyin.setOptions({checkPolyphone: false, charCase: 0}); pinyin.setOptions({checkPolyphone: false, charCase: 0});
console.log(pinyin.getFullChars('管理员')) console.log(pinyin.getFullChars('管理员'))
console.log(pinyin.getCamelChars('管理员')) console.log(pinyin.getCamelChars('管理员'))
console.log(pinyin.getCamelChars('1234')) console.log(pinyin.getCamelChars('1234'))
console.log(pinyin.getCamelChars('english')) console.log(pinyin.getCamelChars('english'))
console.log(pinyin.getCamelChars('昕')) console.log(pinyin.getCamelChars('昕'))
console.log(pinyin.getCamelChars('佛')) console.log(pinyin.getCamelChars('佛'))
console.log(pinyin.getFullChars('佛')) console.log(pinyin.getFullChars('佛'))
console.log(pinyin.getFullChars('凃一二')) console.log(pinyin.getFullChars('凃一二'))
console.log(pinyin.getCamelChars('凃一二')) console.log(pinyin.getCamelChars('凃一二'))
``` ```

View File

@ -1,15 +1,15 @@
/** /**
* @fileOverview 汉字拼音转换主题功能 * @fileOverview 汉字拼音转换主题功能
* @author waterchestnut 2017/3/13 * @author waterchestnut 2017/3/13
* @module * @module
*/ */
'use strict'; 'use strict';
/** /**
* @typedef Option * @typedef Option
* @type Object * @type Object
* @property {Boolean} [checkPolyphone=false] 是否检查多音字 * @property {Boolean} [checkPolyphone=false] 是否检查多音字
* @property {Number} [charCase=0] 输出拼音的大小写模式0-首字母大写1-全小写2-全大写 * @property {Number} [charCase=0] 输出拼音的大小写模式0-首字母大写1-全小写2-全大写
*/ */
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
@ -17,9 +17,9 @@ var _createClass = function () { function defineProperties(target, props) { for
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Pinyin = function () { var Pinyin = function () {
/** /**
* 构造函数设置参数并初始化数据 * 构造函数设置参数并初始化数据
* @param {Option} [options] 参数对象 * @param {Option} [options] 参数对象
*/ */
function Pinyin(options) { function Pinyin(options) {
_classCallCheck(this, Pinyin); _classCallCheck(this, Pinyin);
@ -28,9 +28,9 @@ var Pinyin = function () {
this.initialize(); this.initialize();
} }
/** /**
* 设置参数 * 设置参数
* @param {Option} [options] 参数对象 * @param {Option} [options] 参数对象
*/ */
@ -41,8 +41,8 @@ var Pinyin = function () {
this.options = Object.assign({ checkPolyphone: false, charCase: 0 }, options); this.options = Object.assign({ checkPolyphone: false, charCase: 0 }, options);
} }
/** /**
* 初始化数据 * 初始化数据
*/ */
}, { }, {
@ -827,9 +827,9 @@ var Pinyin = function () {
}; };
} }
/** /**
* 获取拼音首字母 * 获取拼音首字母
* @param {String} str 输入的中文字符串 * @param {String} str 输入的中文字符串
*/ */
}, { }, {
@ -850,9 +850,9 @@ var Pinyin = function () {
return result; return result;
} }
/** /**
* 获取拼音 * 获取拼音
* @param {String} str 输入的中文字符串 * @param {String} str 输入的中文字符串
*/ */
}, { }, {
@ -890,8 +890,8 @@ var Pinyin = function () {
return false; return false;
} }
/** /**
* 首字母大写 * 首字母大写
*/ */
}, { }, {

94
node_modules/js-pinyin/index.d.ts generated vendored
View File

@ -1,47 +1,47 @@
/** /**
* *
*/ */
interface PinyinOptions { interface PinyinOptions {
/** /**
* *
* *
* @default false * @default false
*/ */
checkPolyphone: boolean checkPolyphone: boolean
/** /**
* *
* *
* @default 0 * @default 0
* @description `0` - `1` - `2` - * @description `0` - `1` - `2` -
*/ */
charCase: 0 | 1 | 2 charCase: 0 | 1 | 2
} }
/** /**
* *
*/ */
declare class Pinyin { declare class Pinyin {
constructor(options?: PinyinOptions) constructor(options?: PinyinOptions)
/** /**
* *
* @param options * @param options
*/ */
setOptions(options?: PinyinOptions): void setOptions(options?: PinyinOptions): void
/** /**
* *
* @param str * @param str
*/ */
getCamelChars(str: string): string getCamelChars(str: string): string
/** /**
* *
* @param str * @param str
*/ */
getFullChars(str: string): string getFullChars(str: string): string
} }
declare const pinyin: Pinyin declare const pinyin: Pinyin
export default pinyin export default pinyin

36
node_modules/js-pinyin/index.js generated vendored
View File

@ -1,19 +1,19 @@
/** /**
* @fileOverview 导出默认的实例 * @fileOverview 导出默认的实例
* @author waterchestnut 2017/3/13 * @author waterchestnut 2017/3/13
* @module * @module
*/ */
'use strict'; 'use strict';
let pinyin = new (require('./dist/pinyin'))({charCase:0}); let pinyin = new (require('./dist/pinyin'))({charCase:0});
/*pinyin.setOptions({checkPolyphone: true, charCase: 0}); /*pinyin.setOptions({checkPolyphone: true, charCase: 0});
console.log(pinyin.getFullChars('管理员')) console.log(pinyin.getFullChars('管理员'))
console.log(pinyin.getCamelChars('管理员')) console.log(pinyin.getCamelChars('管理员'))
console.log(pinyin.getCamelChars('1234')) console.log(pinyin.getCamelChars('1234'))
console.log(pinyin.getCamelChars('english')) console.log(pinyin.getCamelChars('english'))
console.log(pinyin.getCamelChars('昕')) console.log(pinyin.getCamelChars('昕'))
console.log(pinyin.getCamelChars('佛')) console.log(pinyin.getCamelChars('佛'))
console.log(pinyin.getFullChars('佛')) console.log(pinyin.getFullChars('佛'))
console.log(pinyin.getFullChars('凃一二')) console.log(pinyin.getFullChars('凃一二'))
console.log(pinyin.getCamelChars('凃一二'))*/ console.log(pinyin.getCamelChars('凃一二'))*/
module.exports = pinyin; module.exports = pinyin;

Some files were not shown because too many files have changed in this diff Show More