first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

23
衣莎项目/源码/msx/.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules/
unpackage/
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.project
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

View File

@@ -0,0 +1,4 @@
{
"singleQuote":true,
"semi":false
}

View File

@@ -0,0 +1 @@
9d7bf585-41a8-4ce5-bc28-a83ebb46727d

View File

@@ -0,0 +1,26 @@
# myu
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
https://test.yishaxiyi.com/h5/?channelKey=Qs8x5QbbaGkcudjrykYQkjTVZs96UsIiElMS+z3apv+dPlVE5dyWTxKTrhdbvAI5uh9YcLRr58ky7/0PrYMNliFJV6zZfE3wjOc2DuIvy/6ECb44vQ/sLfRthrfCQlqNJb7tj2iycI8bk66eMfQVUO/VpSHQ5EQpgJ0ZSnNboTw=
https://test.yishaxiyi.com/h5/?channelKey=KdeQf9E8560oI4B4vQJHVCqLcSTEoO2ULuPPklXN0UGUynrIzhNfRk5nVVUkuc3CBkNE934u%2FpLU7QyhmWk1Y4z8URFTBK5NJXpdJwpgXKxr44s5KQdao1PlofO4yZFRL7Tyn4aW0zaCrpwMQhWL6tWr45Wp7eQzGLOCufT7jGs%3D

View File

@@ -0,0 +1,54 @@
const plugins = []
if (process.env.UNI_OPT_TREESHAKINGNG) {
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
}
if (process.env.UNI_PLATFORM === 'app-plus' && process.env.UNI_USING_V8) {
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
const input = normalizePath(process.env.UNI_INPUT_DIR)
try {
plugins.push([
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
{
file (file) {
file = normalizePath(file)
if (file.indexOf(input) === 0) {
return path.relative(input, file)
}
return false
}
}
])
} catch (e) {}
}
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
process.UNI_LIBRARIES.forEach(libraryName => {
plugins.push([
'import',
{
'libraryName': libraryName,
'customName': (name) => {
return `${libraryName}/lib/${name}/${name}`
}
}
])
})
module.exports = {
presets: [
[
'@vue/app',
{
modules: 'commonjs',
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
}
]
],
plugins
}

View File

@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.3&key=4cdb760ab32f0dab1f8ccea2e5ca157f"></script>
</head>
<body>
<script>
var mapObj = new AMap.Map('iCenter');
mapObj.plugin('AMap.Geolocation', function () {
let geolocation = new AMap.Geolocation({
enableHighAccuracy: true, // 是否使用高精度定位,默认:true
timeout: 10000, // 超过10秒后停止定位默认无穷大
maximumAge: 0, // 定位结果缓存0毫秒默认0
convert: true, // 自动偏移坐标偏移后的坐标为高德坐标默认true
showButton: true, // 显示定位按钮默认true
buttonPosition: 'LB', // 定位按钮停靠位置,默认:'LB',左下角
buttonOffset: new AMap.Pixel(10, 20), // 定位按钮与设置的停靠位置的偏移量默认Pixel(10, 20)
showMarker: true, // 定位成功后在定位到的位置显示点标记默认true
showCircle: true, // 定位成功后用圆圈表示定位精度范围默认true
panToLocation: true, // 定位成功后将定位到的位置作为地图中心点默认true
zoomToAccuracy:true // 定位成功后调整地图视野范围使定位位置及精度范围视野内可见默认false
});
mapObj.addControl(geolocation);
geolocation.getCurrentPosition();
AMap.event.addListener(geolocation, 'complete', onComplete); // 返回定位信息
AMap.event.addListener(geolocation, 'error', onError); // 返回定位出错信息
});
function onComplete(obj){
var res = '经纬度:' + obj.position +
'\n精度范围' + obj.accuracy +
'米\n定位结果的来源' + obj.location_type +
'\n状态信息' + obj.info +
'\n地址' + obj.formattedAddress +
'\n地址信息' + JSON.stringify(obj.addressComponent, null, 4);
alert(res);
}
function onError(obj) {
alert(obj.info + '--' + obj.message);
console.log(obj);
}
</script>
</body>
</html>

12794
衣莎项目/源码/msx/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,81 @@
{
"name": "myu",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js"
},
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.0-24220191115006",
"@dcloudio/uni-h5": "^2.0.0-24220191115006",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-migration": "^2.0.0-26120200226001",
"@dcloudio/uni-mp-alipay": "^2.0.0-24220191115006",
"@dcloudio/uni-mp-baidu": "^2.0.0-24220191115006",
"@dcloudio/uni-mp-qq": "^2.0.0-24220191115006",
"@dcloudio/uni-mp-toutiao": "^2.0.0-24220191115006",
"@dcloudio/uni-mp-weixin": "^2.0.0-24220191115006",
"@dcloudio/uni-stat": "^2.0.0-24220191115006",
"@vant/weapp": "^1.0.0",
"axios": "^0.19.0",
"flyio": "^0.6.2",
"node-sass": "^4.14.1",
"pug": "^2.0.4",
"pug-plain-loader": "^1.0.0",
"regenerator-runtime": "^0.12.1",
"sass-loader": "^8.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"vue": "^2.6.10",
"vue-class-component": "^6.3.2",
"vue-property-decorator": "^8.0.0",
"vuex": "^3.0.1",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"@babel/plugin-syntax-typescript": "^7.2.0",
"@dcloudio/types": "*",
"@dcloudio/uni-cli-shared": "^2.0.0-24220191115006",
"@dcloudio/uni-template-compiler": "^2.0.0-24220191115006",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-24220191115006",
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-24220191115006",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-24220191115006",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-24220191115006",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-24220191115006",
"@vue/cli-plugin-babel": "3.5.1",
"@vue/cli-plugin-typescript": "^3.5.1",
"@vue/cli-service": "^3.5.1",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.0",
"node-sass": "^4.13.1",
"postcss-comment": "^2.0.0",
"style-resources-loader": "^1.3.2",
"typescript": "^3.0.0",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}

View File

@@ -0,0 +1,10 @@
module.exports = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import'),
require('autoprefixer')({
remove: process.env.UNI_PLATFORM !== 'h5'
}),
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}

View File

@@ -0,0 +1 @@
9491adda-94dd-4a01-b007-d6f5cb92c835

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.3&key=6f568c1e45c1ceb4da8a2f658d500820"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1 @@
2c70cfff-384e-44d9-92b7-102cc830928f

View File

@@ -0,0 +1 @@
51718370-80da-48ee-af3e-28ae8c22b6e8

View File

@@ -0,0 +1 @@
ef228389-c7eb-4309-b8eb-ead57fb937ab

View File

@@ -0,0 +1,89 @@
// vue 插件配置
// 自定义的非vue插件
import Service from "../service/imports";
import { Utils } from '../utils';
import { UserUtils } from '../utils/user'
let DevUrl = 'https://msx.yishaxiyi.com'
// #ifdef H5
DevUrl = 'https://msx.yishaxiyi.com'
// #endif
export class config {
/**
* 接口配置,测试环境,正式环境,具体接口
*/
public static AjaxConfig: any = {
DevUrl: 'https://msx.yishaxiyi.com',
ProdUrl: 'https://msx.yishaxiyi.com',
ApiList: {
productLists: '/msx/productLists', // 首页衣物数据
agreement: '/msx/agreement',// 获取首页协议
getTime: '/storeapi/getTime', // 预约取件时间接口
getUserAddress: '/storeapi/getUserAddress', // 获取用户收货地址列表
getUserAddressInfo: '/storeapi/getUserAddress',// 获取用户收货地址详情 和列表接口名相同 请求方式不同
editUserAddress: '/storeapi/editUserAddress',// 编辑收货地址
userAddress: '/storeapi/userAddress',// 添加收货地址
deleteAddress: '/storeapi/deleteAddress', //删除地址
msxOrder: '/msx/msxOrder', // 订单下单
msxOrderPay: '/msx/msxOrderPay', //订单支付
orderList: '/msx/orderList',//小马哥订单列表
userOrderList: '/msx/orderLists',//用户订单
createDiffOrder: '/msx/createDiffOrder',//订单补差价数据更新
payDiffPrice: '/msx/payDiffPrice',//补差价支付接口
orderDetail: '/msx/orderDetail',// 订单详情
cancelOrder: '/msx/cancelOrder',// 取消订单
banner: '/storeapi/banner',// 轮播图
description: '/msx/description',//订单详情的洗衣说明
verify: '/storeapi/verify',//验证token是否过期
login: '/storeapi/login',// 登录接口
getTel: '/storeapi/getTel',//授权手机号
personalInfo: '/storeapi/personalInfo', //用户个人信息
rechargeMoney: '/msx/rechargeMoney', // 充值配置
recharge: '/msx/Recharge', // 确认充值
userCoupon: '/storeapi/userCoupon', //用户优惠券
defaultUserAddress: '/storeapi/defaultUserAddress', // 用户默认收货地址
getWxaqrCode: '/storeapi/getWxaqrCode', //邀请好友的海报
recommend: '/storeapi/recommend', // 我推荐的人
shoplist: '/storeapi/shoplist', // 所有的门店信息列表
getDistrict: '/storeapi/getDistrict', //省\市\县[区]联动查询
apply: '/storeapi/apply', //申请成为小马哥
logisticsOrderTong: '/storeapi/logisticsOrderTong', //物流人员不同订单状态数量统计
logisticsStatus: '/storeapi/logisticsStatus', //物流人员状态查询和更改
updateOrderStatus: '/msx/updateOrderStatus', //小马哥更新订单物流状态
details: '/storeapi/news/details', //新闻 一些 新闻 和 公司介绍
shareGiftInfo: '/msx/shareGiftInfo',//分享有礼奖励信息
withDraw: '/storeapi/withDraw', //佣金提现
confirm: '/msx/confirm', // 订单用户确认收货
huiLogin: '/storeapi/huiLogin', //惠生活登录
h5PayBack: '/msx/h5PayBack', //H5订单支付查询接口
},
};
/**
* 本地存储的前缀
*/
public static prefix: string ='msx2_'
/**
* 需要被挂载的节点
*/
public static mountElement: string = '#app';
/**
* 非Vue插件
*/
public static NotVuePlugs: Array<Object> = [
{ n: '$http', f: Service },
{ n: '$utils', f: Utils },
{ m: '$config', f: config },
{ n: '$userUtils', f: UserUtils }
];
/**
* Vue插件
*/
public static VuePlugs: Array<any> = [];
}

View File

@@ -0,0 +1 @@
5bd25fd9-e19a-4bec-bb49-13565a47b248

View File

@@ -0,0 +1,131 @@
import {Utils} from '../utils';
import axios, {AxiosInstance} from 'axios';
/**
* 小程序端不可用
*/
export class Axios {
private instance: AxiosInstance;
// @ts-ignore
public async constructor() {
this.instance = axios.create({
baseURL: Utils.CheckAjaxUrl(),
timeout: 3000
});
this.ResponseInterceptor();
this.RequestInterceptor();
}
/**
* Get 请求
* 请求参数请参考接口RequestParams
* @param params
*/
public async get(params: { url: string, data: Object }): Promise<Object> {
// let token:string = localStorage.getItem('token') || ''
// if(!!token) token = JSON.parse(token);
try {
return await this.instance.get(params.url, {
params: params.data
})
} catch (e) {
return e.message
}
}
/**
* Post 请求
* 请求参数请参考接口RequestParams
* @param params
*/
public async post(params: { url: string, data: Object, headers?: Object }): Promise<Object> {
console.log(Utils.CheckAjaxUrl()+params.url);
try {
return await this.instance.post(params.url, params.data, {})
} catch (e) {
return e.message
}
}
/**
* Put 请求
* 请求参数请参考接口RequestParams
* @param params
*/
public async put(params: { url: string, data: Object }): Promise<Object> {
try {
return await this.instance.put(params.url, params.data)
} catch (e) {
return e.message
}
}
/**
* delete 请求
* 请求参数请参考接口RequestParams
* @param params
*/
public async delete(params: { url: string, data: Object }): Promise<Object> {
try {
return await this.instance.delete(params.url, {params: params.data})
} catch (e) {
return e.message
}
}
/**
* 添加响应拦截器
* @constructor
*/
public async ResponseInterceptor(): Promise<any> {
this.instance.interceptors.response.use(response => {
this.CloseLoadingData();
switch (response.data.status) {
case 1:
return response.data.data;
break;
case 500:
console.log(response.data.msg);
break;
default:
console.log(response.data.msg);
break;
}
}, function (error) {
return Promise.reject(error)
})
}
/**
* 添加请求拦截器
* @constructor
*/
public async RequestInterceptor(): Promise<any> {
this.instance.interceptors.request.use(config => {
this.OpenLoadingData();
return config
}, function (error) {
return Promise.reject(error)
})
}
/**
* 显示加载进度
* @constructor
*/
private OpenLoadingData(): void {
uni.showLoading({
title: '加载中...',
mask: true
});
}
/**
* 清除加载进度条
*/
private CloseLoadingData(): void {
uni.hideLoading();
}
}

View File

@@ -0,0 +1,237 @@
import { Utils } from '../utils';
interface AxiosConfig {
baseUrl: string
header: any
data: any
method: string
dataType: string
responseType: string,
success: Function
fail: Function
complete: Function
}
interface Interceptor {
request: Function
response: Function
}
export class Axios {
private config: AxiosConfig
private interceptor: Interceptor
private Utils: Utils = new Utils()
constructor() {
this.config = {
baseUrl: Utils.CheckAjaxUrl(),
header: {
'content-type': 'application/x-www-form-urlencoded'
},
data: {},
method: "GET",
dataType: "json", /* 如设为json会对返回的数据做一次 JSON.parse */
responseType: "text",
success() { },
fail() { },
complete() { }
}
this.interceptor = {
request: null || Function,
response: null || Function
}
}
/**
* 封装 请求函数
* @param options
*/
private async request(options: any): Promise<any> {
let Original: any = { ...options }
if (!options) {
options = {}
}
options.baseUrl = options.baseUrl || this.config.baseUrl
options.dataType = options.dataType || this.config.dataType
options.url = options.baseUrl + options.url
options.data = options.data || {}
options.method = options.method || this.config.method
//TODO 加密数据
let token: string = await this.Utils.getStorage('token')
if (!!token) {
options.header = { token: token }
}
//TODO 数据签名
/*
_token = {'token': getStorage(STOREKEY_LOGIN).token || 'undefined'},
_sign = {'sign': sign(JSON.stringify(options.data))}
options.header = Object.assign({}, options.header, _token,_sign)
*/
return new Promise((resolve, reject) => {
let _config: any = null
options.complete = async (response: any) => {
let statusCode = response.data.status
response.config = _config
if (process.env.NODE_ENV === 'development') {
if (statusCode === 200) {
// console.log("【" + _config.requestId + "】 结果:" + JSON.stringify(response.data))
}
}
// if (this.interceptor.response) {
// let newResponse = this.interceptor.response(response)
// if (newResponse) {
// response = newResponse
// }
// }
// 统一的响应日志记录
_reslog(response)
if (statusCode === 1) { //成功
resolve(response.data.data);
} else if (statusCode === 401) {
// token过期自动刷新
if (!!token) {
let that = this
// #ifdef MP-WEIXIN
uni.login({
async success(res) {
if (res.code) {
let rel = await that.post({ url: '/storeapi/login', data: { code: res.code } })
that.Utils.setStorage('token', rel.token, () => {
that.request(Original)
.then(toRes => {
resolve(toRes);
})
})
}
}
})
// #endif
// #ifdef H5
// 获取加密字符串重新调用登录接口
let channelKey: string = await this.Utils.getStorage('channelKey')
if(!!channelKey){
let rel = await that.post({ url: '/storeapi/huiLogin', data: {channelKey: channelKey} })
that.Utils.setStorage('token', rel.token, () => {
that.request(Original)
.then(toRes => {
resolve(toRes);
})
})
}
// #endif
}
} else {
uni.showToast({
title: response.data.msg,
icon: 'none'
})
reject(response)
}
}
_config = Object.assign({}, this.config, options)
_config.requestId = new Date().getTime()
// if (this.interceptor.request) {
// this.interceptor.request(_config)
// }
// 统一的请求日志记录
_reqlog(_config)
if (process.env.NODE_ENV === 'development') {
// console.log("【" + _config.requestId + "】 地址:" + _config.url)
if (_config.data) {
// console.log("【" + _config.requestId + "】 参数:" + JSON.stringify(_config.data))
}
}
uni.request(_config);
});
}
public get(options: any): Promise<any> {
if (!options) {
options = {}
}
options.url = options.url
options.data = options.data
options.method = 'GET'
return this.request(options)
}
public post(options: any): Promise<any> {
if (!options) {
options = {}
}
options.url = options.url
options.data = options.data
options.method = 'POST'
return this.request(options)
}
public put(options: any): Promise<any> {
if (!options) {
options = {}
}
options.url = options.url
options.data = options.data
options.method = 'PUT'
return this.request(options)
}
public delete(options: any): Promise<any> {
if (!options) {
options = {}
}
options.url = options.url
options.data = options.data
options.method = 'DELETE'
return this.request(options)
}
}
/**
* 请求接口日志记录
*/
function _reqlog(req: any) {
// uni.showLoading({
// title: '加载中...',
// mask: true
// });
// if (process.env.NODE_ENV === 'development') {
// console.log("【" + req.requestId + "】 地址:" + req.url)
// if (req.data) {
// console.log("【" + req.requestId + "】 请求参数:" + JSON.stringify(req.data))
// }
// }
//TODO 调接口异步写入日志数据库
}
/**
* 响应接口日志记录
*/
function _reslog(res: any) {
let _statusCode = res.statusCode;
// uni.hideLoading();
// if (process.env.NODE_ENV === 'development') {
// console.log("【" + res.config.requestId + "】 地址:" + res.config.url)
// if (res.config.data) {
// console.log("【" + res.config.requestId + "】 请求参数:" + JSON.stringify(res.config.data))
// }
// console.log("【" + res.config.requestId + "】 响应结果:" + JSON.stringify(res))
// }
//TODO 除了接口服务错误外,其他日志调接口异步写入日志数据库
switch (_statusCode) {
case 200:
break;
case 401:
break;
case 404:
break;
default:
break;
}
}

View File

@@ -0,0 +1 @@
9ab2d76e-41ad-4c54-a49f-f7314e400884

View File

@@ -0,0 +1,30 @@
import Vue, {VueConstructor} from 'vue';
import App from '@/view/App.vue';
// import '../class-component-hooks';
import {config} from '../config'
/**
* 初始化Vue需要的插件和构造Vue启动参数
*/
export class init {
private initVuePlugsArray: Array<any> = config.VuePlugs;
private initOtherPlugsArray: Array<Object> = config.NotVuePlugs;
protected router: any;
protected Vues: any = Vue;
public static App: VueConstructor = App;
constructor() {
this.Vues.config.productionTip = false;
this.initPlugs();
}
/**
* 初始化Vue和非Vue插件
*/
private initPlugs(): void {
// @ts-ignore
this.initOtherPlugsArray.forEach(v => this.Vues.prototype[v['n']] = new (v['f'])());
this.initVuePlugsArray.forEach(v => this.Vues.use(v));
}
}

View File

@@ -0,0 +1 @@
0d25ab86-00dc-40f5-93af-4da4287256dd

View File

@@ -0,0 +1,8 @@
export interface HomeService {
getProductLists(type:number): Promise<Array<Object>>
getAgreement(type:number): Promise<Array<Object>>
banner(): Promise<Array<Object>>
verify(): Promise<Array<Object>>
shoplist(data: any): Promise<Array<Object>>
details(id: string): Promise<Array<Object>>
}

View File

@@ -0,0 +1,20 @@
export interface OrderServeice {
getTime(): Promise<Array<Object>>;
getUserAddress(): Promise<Array<Object>>;
getUserAddressInfo(id: string): Promise<Array<Object>>;
editUserAddress(data:any): Promise<Array<Object>>;
userAddress(data:any): Promise<Array<Object>>;
deleteAddress(id: string): Promise<Array<Object>>;
msxOrder(data:any): Promise<Array<Object>>;
orderList(data:any): Promise<Array<Object>>;
orderDetail(id:string): Promise<Array<Object>>;
cancelOrder(id:string): Promise<Array<Object>>;
description(): Promise<Array<Object>>;
msxOrderPay(data: any): Promise<Array<Object>>;
updateOrderStatus(data: any): Promise<Array<Object>>;
userOrderList(data: any): Promise<Array<Object>>;
createDiffOrder(data: any): Promise<Array<Object>>;
payDiffPrice(data: any): Promise<Array<Object>>;
confirm(id: number): Promise<Array<Object>>;
h5PayBack(data: any): Promise<Array<Object>>;
}

View File

@@ -0,0 +1,18 @@
export interface UserService {
login(data: any): Promise<Array<Object>>
getTel(data: any): Promise<Array<Object>>
getUserInfo(): Promise<Array<Object>>
getRechargeMoney(): Promise<Array<Object>>
recharge(data: any): Promise<Array<Object>>
userCoupon(data: any): Promise<Array<Object>>
defaultUserAddress(): Promise<Array<Object>>
getWxaqrCode(): Promise<Array<Object>>
recommend(): Promise<Array<Object>>
getDistrict(data: any): Promise<Array<Object>>
apply(data: any): Promise<Array<Object>>
logisticsOrderTong(): Promise<Array<Object>>
logisticsStatus(status: number): Promise<Array<Object>>
shareGiftInfo(): Promise<Array<Object>>
withDraw(money: number): Promise<Array<Object>>
huiLogin(channelKey: string): Promise<Array<Object>>
}

View File

@@ -0,0 +1 @@
0055c442-ac72-4028-bd31-b0aa913f4a88

View File

@@ -0,0 +1,72 @@
import {HomeService} from "../HomeService"
import { Axios } from '../../dao/interface'
import {config} from "../../config";
export class HomeServiceImpl extends Axios implements HomeService {
/**
* 首页衣物数据
* @param type 参数 1 任意洗 2 单品洗
*/
public async getProductLists(type:number): Promise<any> {
return await this.post({
url: config.AjaxConfig.ApiList.productLists,
data: {
type:type
}
});
}
/**
* 协议
* @param type
*/
public async getAgreement(type:number): Promise<any>{
return await this.get({
url: config.AjaxConfig.ApiList.agreement,
data: {
type:type
}
});
}
/**
* banner 获取
*/
public async banner(): Promise<any>{
return await this.get({
url: config.AjaxConfig.ApiList.banner,
data: {}
});
}
public async verify(): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.verify,
data: {}
});
}
/**
* 所有门店列表
* https://www.showdoc.cc/yisha?page_id=2499977052234560
*/
public async shoplist(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.shoplist,
data: data
});
}
/**
* 富文本新闻和公司介绍
* @param id 新闻id
* https://www.showdoc.cc/yisha?page_id=2721262938113473
*/
public async details(id: string): Promise<any>{
return await this.get({
url: `${config.AjaxConfig.ApiList.details}/${id}`,
data: {}
});
}
}

View File

@@ -0,0 +1,218 @@
import {OrderServeice} from "../OrderServeice"
// import {Axios} from "../../dao";
import { Axios } from '../../dao/interface'
import {config} from "../../config";
export class OrderServeiceImp extends Axios implements OrderServeice {
/**
* 获取服务时间
*/
public async getTime(): Promise<any> {
return await this.post({
url: config.AjaxConfig.ApiList.getTime,
data: {}
});
}
/**
* 获取用户地址列表
*/
public async getUserAddress(): Promise<any> {
return await this.post({
url: config.AjaxConfig.ApiList.getUserAddress,
data: {}
});
}
/**
* 获取用户地址详情
*/
public async getUserAddressInfo(id: string): Promise<any>{
return await this.get({
url: config.AjaxConfig.ApiList.getUserAddressInfo,
data: {
id: id
}
});
}
/**
* 编辑收货地址
* @param data 地址数据
* 接口文档查看数据 https://www.showdoc.cc/yisha?page_id=2598267181634310
*/
public async editUserAddress(data:any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.editUserAddress,
data: data
});
}
/**
* 添加收货地址
* @param data 地址数据
* 接口文档查看数据 https://www.showdoc.cc/yisha?page_id=2491191669187167
*/
public async userAddress(data:any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.userAddress,
data: data
});
}
/**
* 删除地址
* @param id 地址id
* https://www.showdoc.cc/yisha?page_id=2861152761583113
*/
public async deleteAddress(id: string): Promise<any>{
return await this.get({
url: config.AjaxConfig.ApiList.deleteAddress,
data: {
id:id
}
});
}
/**
* 订单下单
* @param data
* 接口文档查看数据 https://www.showdoc.cc/yisha?page_id=3529926530809762
*/
public async msxOrder(data:any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.msxOrder,
data: data
});
}
/**
* 订单支付
* @param data
* https://www.showdoc.cc/yisha?page_id=3530143671094352
*/
public async msxOrderPay(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.msxOrderPay,
data: data
});
}
/**
* 小马哥订单列表
* @param data
* 接口文档查看数据 https://www.showdoc.cc/yisha?page_id=3618190851026338
*/
public async orderList(data:any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.orderList,
data: data
});
}
public async userOrderList(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.userOrderList,
data: data
});
}
/**
* 订单详情
* @param id 订单id
*/
public async orderDetail(id: string): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.orderDetail,
data: {
order_id: id
}
});
}
/**
* 取消订单
* @param id 订单id
*/
public async cancelOrder(id: string): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.cancelOrder,
data: {
order_id: id
}
});
}
/**
* 洗衣说明
*/
public async description(): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.description,
data: {}
});
}
/**
* 小马哥更新订单物流状态接口
* @param data
* https://www.showdoc.cc/yisha?page_id=3618283428294574
*/
public async updateOrderStatus(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.updateOrderStatus,
data: data
});
}
/**
* 补差价下单
* @param data
* https://www.showdoc.cc/yisha?page_id=3624366704922224
*/
public async createDiffOrder(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.createDiffOrder,
data: data
});
}
/**
* 补差价支付
* @param data
* https://www.showdoc.cc/yisha?page_id=3624501281855549
*/
public async payDiffPrice(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.payDiffPrice,
data: data
});
}
/**
* 订单用户确认收货
* @param id 订单id
* https://www.showdoc.cc/yisha?page_id=3669698458505266
*/
public async confirm(id: number): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.confirm,
data: {
order_id: id
}
});
}
/**
* H5订单支付查询接口
* @param data
* https://www.showdoc.cc/yisha?page_id=3955758929850455
*/
public async h5PayBack(data: any): Promise<any>{
return await this.post({
url: config.AjaxConfig.ApiList.h5PayBack,
data: data
});
}
}

View File

@@ -0,0 +1,195 @@
import { UserService } from "../UserService"
import { Axios } from '../../dao/interface'
import { config } from "../../config";
export class UserServiceImp extends Axios implements UserService {
/**
* 用户登录授权
* @param data
* https://www.showdoc.cc/yisha?page_id=2488301121921063
*/
public async login(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.login,
data: data
});
}
/**
* 用户手机号授权
* @param data
* https://www.showdoc.cc/yisha?page_id=3536430839551050
*/
public async getTel(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.getTel,
data: data
});
}
/**
* 获取用户个人信息
* https://www.showdoc.cc/yisha?page_id=2488285228305452
*/
public async getUserInfo(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.personalInfo,
data: {}
});
}
/**
* 获取充值的配置列表
* https://www.showdoc.cc/yisha?page_id=3587433652396468
*/
public async getRechargeMoney(): Promise<Array<Object>> {
return await this.get({
url: config.AjaxConfig.ApiList.rechargeMoney,
data: {}
});
}
/**
* 充值
* https://www.showdoc.cc/yisha?page_id=3587441595061807
*/
public async recharge(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.recharge,
data: data
});
}
/**
* 获取用户优惠券
* @param data
* https://www.showdoc.cc/yisha?page_id=2490652077184542
*/
public async userCoupon(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.userCoupon,
data: data
});
}
/**
* 获取用户默认收货地址
* https://www.showdoc.cc/yisha?page_id=2585114923561199
*/
public async defaultUserAddress(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.defaultUserAddress,
data: {}
});
}
/**
* 邀请好友
* https://www.showdoc.cc/yisha?page_id=2492987427497935
*/
public async getWxaqrCode(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.getWxaqrCode,
data: {}
});
}
/**
* 我推荐的人列表
* https://www.showdoc.cc/yisha?page_id=2582330801130376
*/
public async recommend(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.recommend,
data: {}
});
}
/**
* 省\市\县[区]联动查询
* @param data
* https://www.showdoc.cc/yisha?page_id=2617730209714866
*/
public async getDistrict(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.getDistrict,
data: data
});
}
/**
* 申请小马哥
* @param data
* https://www.showdoc.cc/yisha?page_id=2798709255303106
*/
public async apply(data: any): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.apply,
data: data
});
}
/**
* 小马哥首页信息
* https://www.showdoc.cc/yisha?page_id=2645954657286509
*/
public async logisticsOrderTong(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.logisticsOrderTong,
data: {}
});
}
/**
*
*/
public async logisticsStatus(status: number): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.logisticsStatus,
data: {
status: status
}
});
}
/**
* 分享有礼奖励信息
* https://www.showdoc.cc/yisha?page_id=3648329088338525
*/
public async shareGiftInfo(): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.shareGiftInfo,
data: {}
});
}
/**
* 佣金提现
* @param money
* https://www.showdoc.cc/yisha?page_id=2962904961994375
*/
public async withDraw(money: number): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.withDraw,
data: {
total_money: money
}
});
}
/**
* 惠生活的登录接口
* @param channelKey 加密字符串
* https://www.showdoc.cc/yisha?page_id=3698517527371905
*/
public async huiLogin(channelKey: string): Promise<Array<Object>> {
return await this.post({
url: config.AjaxConfig.ApiList.huiLogin,
data: {
channelKey: channelKey
}
});
}
}

View File

@@ -0,0 +1,9 @@
import {HomeServiceImpl} from "./impl/HomeServiceImpl"
import {OrderServeiceImp} from "./impl/OrderServeiceImp"
import {UserServiceImp} from "./impl/UserServiceImpl"
export default class Imports {
public HomeService = new HomeServiceImpl()
public OrderServeice = new OrderServeiceImp()
public UserService = new UserServiceImp()
}

View File

@@ -0,0 +1 @@
f05e7083-1654-44d8-9ed4-4b364fcbcfc6

View File

@@ -0,0 +1,13 @@
import { Commit } from 'vuex'
export default {
COUPON(context: { commit: Commit }, n: Object){
context.commit('SET_COUPON', n)
},
USERINFO(context: { commit: Commit }, n: Object){
context.commit('SET_USERINFO', n)
},
SHOPDATA(context: { commit: Commit }, n: Object){
context.commit('SET_SHOPDATA', n)
}
}

View File

@@ -0,0 +1,14 @@
export default {
getCoupon: (state:any) => {
return state.couponData
},
getUserInfo: (state:any) => {
return state.userInfo
},
getShopData: (state:any) => {
return state.shopData
},
getEnv: (state:any) => {
return state.env
}
}

View File

@@ -0,0 +1,33 @@
import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'
Vue.use(Vuex)
// 如果是1 则是h5环境 2则是微信环境
type envType = 1 | 2
let env: envType = 1
// #ifdef MP-WEIXIN
env = 2
// #endif
const store = new Vuex.Store({
state:{
env: env, // 环境变量
couponData:{},//选中的优惠券
userInfo:{},//个人信息
shopData: {
totalPrice: 0, //总价
totalNum: 0, //总数
shopData: [] //商品数据
},//购物车数据
},
actions,
mutations,
getters
})
export default store

View File

@@ -0,0 +1 @@
b7667104-a3ae-4be4-afc8-0de6b82e725d

View File

@@ -0,0 +1,11 @@
export default {
SET_COUPON (state:any, n: Object) {
state.couponData = n
},
SET_USERINFO (state:any, n: Object) {
state.userInfo = n
},
SET_SHOPDATA (state:any, n: Object) {
state.shopData = n
}
}

View File

@@ -0,0 +1 @@
056991b9-92b8-40b6-87e8-43514f2400e4

View File

@@ -0,0 +1,217 @@
type AnimationType = 'rotate' | 'spot'
interface AnimationConfig {
// 外部gif图的地址
url?: string
// 自带的动画类型
type?: AnimationType
// 动画播放时间 如果为0时则不自动关闭 默认时间2s
time?: number
// 需要播放的外部节点
id?: string
// 最低层背景色
backgroundColor?: string
// 动画大小
width?: number
height?: number
// 按比例缩放gif
size?: number
}
class Animation {
private AnimationConfig: AnimationConfig = {
url: '',
type: 'rotate',
time: 2000,
id: '',
backgroundColor: '#ffffff',
width: 30,
height: 20,
size: 0
}
constructor(option?: AnimationConfig) {
if (option !== void 0) {
Object.assign(this.AnimationConfig, option)
}
}
// 绘制动画
private establish() {
let { id, type, url, backgroundColor, width, height, size } = this.AnimationConfig, f: HTMLElement, imgUrl: string = '';
f = id == '' ? document.getElementsByTagName("body")[0] : document.getElementById(String(id)) as HTMLElement;
if (url !== '' && url !== void 0) {
imgUrl = url
} else {
switch (type) {
case 'rotate':
imgUrl = 'http://img3.imgtn.bdimg.com/it/u=2328090802,2049847791&fm=26&gp=0.jpg'
break;
case 'spot':
imgUrl = 'http://img3.imgtn.bdimg.com/it/u=2328090802,2049847791&fm=26&gp=0.jpg'
break;
default:
break;
}
}
// 创建背景
let back: HTMLElement = document.createElement('div')
back.id = 'loading'
back.style.width = f.offsetWidth + 'px'
back.style.height = f.offsetHeight + 'px'
back.style.backgroundColor = String(backgroundColor)
back.style.position = 'fixed'
back.style.top = '0px'
back.style.left = '0px'
back.style.right = '0px'
back.style.zIndex = '9999'
f.appendChild(back)
// 动画居中
let loadGif: HTMLElement = document.createElement('div')
loadGif.id = 'load_gif'
loadGif.style.position = 'absolute'
loadGif.style.width = '100%'
loadGif.style.height = '100%'
loadGif.style.display = 'flex'
loadGif.style.justifyContent = 'center'
loadGif.style.alignItems = 'center'
back.appendChild(loadGif)
// 设置动画
let gif: HTMLImageElement = document.createElement('img')
gif.id = 'gif_img'
gif.src = imgUrl
if (size == 0) {
gif.style.width = width + 'px'
gif.style.height = height + 'px'
} else {
gif.style.width = size + '%'
gif.style.height = 'auto'
}
loadGif.appendChild(gif)
}
// 动画开始
public draw(option: AnimationConfig = {}) {
let loading: HTMLElement | null = document.getElementById('loading')
if (loading !== void 0 && loading !== null) {
loading.style.display = 'block'
return
}
if (option !== void 0) {
Object.assign(this.AnimationConfig, option)
}
if (!option.id) {
let html: HTMLElement | null = document.getElementsByTagName("html")[0]
html.style.overflow = 'hidden'
}
let { time } = this.AnimationConfig
if (time !== 0) {
setTimeout(() => {
this.close()
}, time);
}
this.establish()
}
// 关闭动画
public close() {
let loading: HTMLElement = document.getElementById('loading') as HTMLElement
let html: HTMLElement | null = document.getElementsByTagName("html")[0]
loading.style.display = 'none'
html.style.overflow = ''
}
}
type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'UPDATE'
interface AjaxConfig extends AnimationConfig {
// 请求接口地址
url: string
// 请求类型
method: Method
// 请求参数
data?: any
// 头部信息
headers?: any
}
interface AjaxStatic {
// 请求基地址
url?: string
// 公共头部
headers?: any
// 公共参数
data?: any
}
class Ajax {
private AjaxConfig: AjaxStatic = {
url: '',
headers: {},
data: {}
}
public async request(option: AjaxConfig): Promise<AxiosResponse> {
let headers = option.headers !== void 0 ? option.headers : {}
let data = option.data !== void 0 ? option.data : {}
return new Promise((resovle, reject) => {
fetch(this.AjaxConfig.url + option.url, {
method: option.method,
body: JSON.stringify(data),
headers: new Headers(Object.assign(this.AjaxConfig.headers, headers))
}).then(res => {
console.log(res);
resovle({
data: res,
status: 200,
statusText: '',
headers: headers,
config: option
})
}).catch(err => {
reject(err)
})
})
}
public create(option: AjaxStatic = {}): void {
Object.assign(this.AjaxConfig, option)
}
}
export interface AxiosResponse<T = any> {
data: T;
status: number;
statusText: string;
headers: any;
config: AjaxConfig;
}
export default {
Animation: new Animation()
}

View File

@@ -0,0 +1,161 @@
import { config } from '../config';
// 支付参数
interface payParam {
data: any
type?: 'h5' | 'wx'
success: Function
fail?: Function
}
export class Utils {
/**
* 检测当前环境动态返回ajax接口的对应的URL地址
* @constructor
*/
public static CheckAjaxUrl(): string {
if (process.env.NODE_ENV === 'production') {
return config.AjaxConfig.ProdUrl;
} else {
return config.AjaxConfig.DevUrl;
}
}
/**
* 异步加载组件,仅限 pages 中组件
* @param fileName 组件的文件名称
* @constructor
*/
public static AsyncComponentHook(fileName: String): Function {
const component = import(/* webpackChunkName: "[request]" */ `@/view/pages/${fileName}.vue`);
component.catch(e => console.error(`组件加载失败: ${e}`));
return () => component;
}
/**
* 动态设置网页title
* @param title
*/
public setTitle(title: string): void {
document.title = title;
}
/**
* 和PHP一样的时间戳格式化函数
*/
public formatDate(date: any): string {
date = new Date(date * 1000)
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
// return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
return year + '-' + (String(month).length > 1 ? month : '0' + month) + '-' +
(String(day).length > 1 ? day : '0' + day) + ' ' + (String(hour).length > 1 ? hour : '0' + hour) + ':' + (String(minute).length > 1 ? minute : '0' + minute)
}
/**
* 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个异步函数
*/
public setStorage(key: string, data: any, success: Function): void {
uni.setStorage({
key: `${config.prefix}${key}`,
data: JSON.stringify(data),
success: function () {
success()
}
})
}
/**
* 从本地缓存中同步获取指定 key 对应的内容
*/
public getStorage(key: string): any {
try {
const value = uni.getStorageSync(`${config.prefix}${key}`)
if (value) {
return JSON.parse(value)
}
} catch (e) {
// error
}
}
/**
* 判断本地缓存有无授权过手机号
*/
public isTel(): Promise<any> {
return new Promise(async (resolve: any, reject: any) => {
let isTel = await this.getStorage('isTel')
resolve(isTel)
})
}
/**
* 未登录询问用户调转登录
*/
public async isLogin(): Promise<any> {
let isTel = await this.isTel()
return new Promise((resolve, reject) => {
if (!isTel) {
resolve(false)
uni.showModal({
title: '是否前往登录',
content: '点击确定去登录',
success: function (res) {
if (res.confirm) {
uni.navigateTo({
url: '/view/pages/Signin/index'
})
}
}
})
} else {
resolve(true)
}
})
}
/**
* 支付
*/
public pay(payParam: payParam): void {
// #ifdef H5
window.location.href = payParam.data
return
// #endif
uni.requestPayment({
provider: 'wxpay',
timeStamp: payParam.data.timeStamp,
nonceStr: payParam.data.nonceStr,
package: payParam.data.package,
signType: payParam.data.signType,
paySign: payParam.data.paySign,
success: function (res) {
payParam.success(JSON.stringify(res))
},
fail: function (err) {
uni.showToast({
title: '取消支付',
duration: 2000,
icon: 'none'
});
if (payParam.fail) payParam.fail(JSON.stringify(err));
}
});
}
// 微信支付时存储接口参数和一些信息
public setPay(data: any): void {
this.setStorage('payData', data, ()=>{
})
}
// 从微信返回时,获取存储的参数做相应处理
public getPay(): void {
return this.getStorage('payData')
}
}

View File

@@ -0,0 +1,18 @@
import { Utils } from './index'
import { UserServiceImp } from '../service/impl/UserServiceImpl'
import store from '../store/index'
export class UserUtils {
private userServiceImp: UserServiceImp = new UserServiceImp()
private utils: Utils = new Utils()
// 更新用户信息
public async updateUserInfo(): Promise<void> {
let res = await this.userServiceImp.getUserInfo()
this.utils.setStorage('userInfo', res, () => {
store.commit('SET_USERINFO', res)
})
}
}

View File

@@ -0,0 +1,19 @@
import {init} from './croe/run/init';
import {config} from './croe/config';
import store from './croe/store/index';
/**
* Vue项目的启动文件
*/
class Run extends init {
public initApp(): void {
new this.Vues({
store,
render: (h: (arg0: any) => void): any => h(init.App)
}).$mount(config.mountElement);
}
}
(new Run()).initApp();

View File

@@ -0,0 +1,79 @@
{
"name": "myu",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx":false,
"app-plus": {
"modules": {
},
"distribute": {
"android": {
"permissions": ["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios": {
},
"sdkConfigs": {
}
},
"usingComponents":true
},
"quickapp": {
},
"mp-weixin": {
"usingComponents":true,
"appid": "wx741960a386f5347b",
"setting" : {
"urlCheck" : true
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
},
"h5": {
"router": {
"mode": "history",
"base": "/h5/"
}
}
}

View File

@@ -0,0 +1,131 @@
{
"pages": [
{
"path": "view/pages/Auto/index",
"style": {
"navigationBarTitleText": "马上洗"
}
},
{
"path": "view/pages/BookingOrder/index",
"style": {
"navigationBarTitleText": "预约订单"
}
},
{
"path": "view/pages/Address/AddressList",
"style": {
"navigationBarTitleText": "地址列表"
}
},
{
"path": "view/pages/Address/edit/edit",
"style": {
"navigationBarTitleText": "添加地址"
}
},
{
"path": "view/pages/Recharge/index",
"style": {
"navigationBarTitleText": "充值"
}
},
{
"path": "view/pages/SharingCourtesy/index",
"style": {
"navigationBarTitleText": "邀请好友"
}
},
{
"path": "view/pages/NearbyStore/index",
"style": {
"navigationBarTitleText": "附近门店"
}
},
{
"path": "view/pages/CouponList/index",
"style": {
"navigationBarTitleText": "优惠券",
"usingComponents":{
"i-tabs": "/wxcomponents/tabs/index",
"i-tab": "/wxcomponents/tab/index"
}
}
},
{
"path": "view/pages/ParIncome/ParIncome",
"style": {
"navigationBarTitleText": "合伙人收益"
}
},
{
"path": "view/pages/Logistics/LogCentre/LogCentre",
"style": {
"navigationBarTitleText": "物流中心"
}
},
{
"path": "view/pages/Logistics/OrderList/OrderList",
"style": {
"navigationBarTitleText": "线上订单",
"usingComponents":{},
"enablePullDownRefresh": true
}
},
{
"path": "view/pages/RichText/RichText",
"style": {
"navigationBarTitleText": "关于我们",
"usingComponents":{}
}
},
{
"path": "view/pages/Signin/index",
"style": {
"navigationBarTitleText": "登录",
"usingComponents":{}
}
},
{
"path": "view/pages/AppLogistics/AppLogistics",
"style": {
"navigationBarTitleText": "申请小马哥",
"usingComponents":{}
}
},
{
"path": "view/pages/AppLogistics/inApplication/inApplication",
"style": {
"navigationBarTitleText": "小马哥审核中",
"usingComponents":{}
}
},
{
"path": "view/pages/OrderInfo/OrderInfo",
"style": {
"navigationBarTitleText": "订单详情",
"usingComponents":{}
}
},
{
"path": "view/pages/Withdrawals/index",
"style": {
"navigationBarTitleText": "提现",
"usingComponents":{}
}
},
{
"path": "view/pages/ResultPage/ResultPage",
"style": {
"navigationBarTitleText": "支付结果",
"usingComponents":{}
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "马上洗",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF"
}
}

4
衣莎项目/源码/msx/src/sfc.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
declare module "*.vue" {
import Vue from 'vue'
export default Vue
}

View File

@@ -0,0 +1 @@
99f3c076-a1a9-4dc9-b983-10e1538f7a09

View File

@@ -0,0 +1 @@
1b422906-7c8f-4c0f-8b25-720b9c99ae65

View File

@@ -0,0 +1,150 @@
/* 全局盒子模型样式 */
.mt7{
margin-top: 7rpx;
}
.mt10{
margin-top: 10rpx;
}
.mt20{
margin-top: 20rpx;
}
.mt30{
margin-top: 30rpx;
}
.mt35{
margin-top: 35rpx;
}
.mt40{
margin-top: 40rpx;
}
.mt50{
margin-top: 50rpx;
}
.mt90{
margin-top: 90rpx;
}
.mt100{
margin-top: 100rpx;
}
.mt150{
margin-top: 150rpx;
}
.mr10{
margin-right: 10rpx;
}
.mr15{
margin-right: 15rpx;
}
.mr20{
margin-right: 20rpx;
}
.mr30{
margin-right: 30rpx;
}
.mb5{
margin-bottom: 5rpx;
}
.mb10{
margin-bottom: 10rpx;
}
.mb20{
margin-bottom: 20rpx;
}
.mb50{
margin-bottom: 50rpx;
}
.ml10{
margin-left: 10rpx;
}
.ml20{
margin-left: 20rpx;
}
.ml30{
margin-left: 30rpx;
}
.ml40{
margin-left: 40rpx;
}
.mtb20{
margin: 20rpx 0;
}
.pt10{
padding-top: 10rpx;
}
.pt20{
padding-top: 20rpx;
}
.pt30{
padding-top: 30rpx;
}
.pt40{
padding-top: 40rpx;
}
.pr10{
padding-right: 10rpx;
}
.pb10{
padding-bottom: 10rpx;
}
.pb20{
padding-bottom: 20rpx;
}
.pl10{
padding-left: 10rpx;
}
.pl20{
padding-left: 20rpx;
}
.pl30{
padding-left: 30rpx;
}
.pt40{
padding-top: 40rpx;
}
.pl{
padding: 0 38rpx;
}
.pd20{
padding: 0 20rpx;
}
.pd25{
padding: 0 25rpx;
}
.pd30{
padding: 0 30rpx;
}
.pd40{
padding: 0 40rpx;
}
.pdtb10{
padding: 10rpx 0;
}
.pdtb20{
padding: 20rpx 0;
}
.pdtb30{
padding: 30rpx 0;
}
.fl{
float: left;
}
.fr{
float: right;
}
.w100{
width: 100%;
}
.fw500{
font-weight: 500;
}

View File

@@ -0,0 +1,215 @@
/* 全局css */
.TabBar{
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99999;
}
/* 平铺水平对齐 */
.flex-con1 {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/* 垂直居中对齐 */
.flex-con2 {
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
}
/* 水平垂直居中 */
.flex-con3 {
display: -webkit-flex;
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
/* 垂直平铺 */
.flex-con4 {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
}
/* 水平居中右对齐 */
.flex-con5{
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
-webkit-align-items: center;
align-items: center;
}
/* 右对齐,盒子底部 */
.flex-con6{
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap-reverse;
flex-wrap: wrap-reverse;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
/* 溢出隐藏 */
.clamp1 {
display: -webkit-box !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
/* flex布局横向 */
.dis-flex{
display: flex;
}
/* flex布局纵向 */
.dis-flex1{
display: flex;
flex-flow: column;
}
.flex1{
flex: 1;
}
.flex2{
flex: 2;
}
.text-left{
text-align: left;
}
.text-right{
text-align: right;
}
.load-all{
height: 100%;
width: 100%;
}
.load-bac{
height: 100%;
width: 100%;
background: #ffffff;
}
.clear{
clear: both;
}
/* 空列表 */
.empty {
height: 600rpx;
width: 100%;
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: 400;
font-stretch: normal;
color: #999;
}
.empty_img {
width: 116rpx;
height: 83rpx;
}
/* 固定到底部按钮 */
.add{
position: fixed;
bottom: 0;
height: 100rpx;
width: 100%;
background-image: linear-gradient(
#1dbf53,
#1dbf53),
linear-gradient(
#2dc44e,
#2dc44e);
background-blend-mode: normal,
normal;
font-family: PingFang-SC-Medium;
font-size: 38rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #ffffff;
text-align: center;
line-height: 100rpx;
}
/* 提交按钮 */
.sub{
margin: 90rpx auto 0;
width: 690rpx;
height: 100rpx;
background-image: linear-gradient(
#1dbf53,
#1dbf53),
linear-gradient(
#2fd152,
#2fd152);
background-blend-mode: normal,
normal;
border-radius: 50rpx;
text-align: center;
line-height: 100rpx;
font-family: PingFang-SC-Bold;
font-size: 38rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #ffffff;
}
/* 动画 */
.live{
}
@keyframes living {
0%{
transform: scale(1);
opacity: 0.5;
}
50%{
transform: scale(1.5);
opacity: 0; /*圆形放大的同时透明度逐渐减小为0*/
}
100%{
transform: scale(1);
opacity: 0.5;
}
}
.liveSpan{
position: absolute;
width: 128rpx;
height: 128rpx;
top: -110rpx;
left: 6px;
right: 0;
background: #21d85c;
border-radius: 50%;
-webkit-animation: living 3s linear infinite;
z-index: -1;
}
.liveSpan:nth-child(2){
-webkit-animation-delay: 1.5s; /*第二个span动画延迟1.5秒*/
}
@keyframes loading {
0%{
transform: scale(0.2);
opacity: 0.5;
}
100%{
transform: scale(1);
opacity: 0; /*圆形放大的同时透明度逐渐减小为0*/
}
}

View File

@@ -0,0 +1 @@
e8164472-bf97-41d0-82c1-ab3b634d17df

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1 @@
55d80afc-5cdd-409b-a41f-677d50fc9f20

View File

@@ -0,0 +1 @@
e3574ecd-9506-402c-b5b0-3041cefebe74

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,139 @@
/* eslint-disable */
var provinceData = [{
"label": "北京市",
"value": "11"
},
{
"label": "天津市",
"value": "12"
},
{
"label": "河北省",
"value": "13"
},
{
"label": "山西省",
"value": "14"
},
{
"label": "内蒙古自治区",
"value": "15"
},
{
"label": "辽宁省",
"value": "21"
},
{
"label": "吉林省",
"value": "22"
},
{
"label": "黑龙江省",
"value": "23"
},
{
"label": "上海市",
"value": "31"
},
{
"label": "江苏省",
"value": "32"
},
{
"label": "浙江省",
"value": "33"
},
{
"label": "安徽省",
"value": "34"
},
{
"label": "福建省",
"value": "35"
},
{
"label": "江西省",
"value": "36"
},
{
"label": "山东省",
"value": "37"
},
{
"label": "河南省",
"value": "41"
},
{
"label": "湖北省",
"value": "42"
},
{
"label": "湖南省",
"value": "43"
},
{
"label": "广东省",
"value": "44"
},
{
"label": "广西壮族自治区",
"value": "45"
},
{
"label": "海南省",
"value": "46"
},
{
"label": "重庆市",
"value": "50"
},
{
"label": "四川省",
"value": "51"
},
{
"label": "贵州省",
"value": "52"
},
{
"label": "云南省",
"value": "53"
},
{
"label": "西藏自治区",
"value": "54"
},
{
"label": "陕西省",
"value": "61"
},
{
"label": "甘肃省",
"value": "62"
},
{
"label": "青海省",
"value": "63"
},
{
"label": "宁夏回族自治区",
"value": "64"
},
{
"label": "新疆维吾尔自治区",
"value": "65"
},
{
"label": "台湾",
"value": "66"
},
{
"label": "香港",
"value": "67"
},
{
"label": "澳门",
"value": "68"
}
]
export default provinceData;

View File

@@ -0,0 +1 @@
1ad77a3d-05b8-425f-bdae-957b1f0aee41

View File

@@ -0,0 +1,58 @@
<script lang="ts">
import Vue from 'vue'
import { config } from '../croe/config/index'
const conf = new config()
export default Vue.extend({
mpType: 'app',
onLaunch(options: any) {
//#ifdef MP-WEIXIN
if (!!options.scene) {
uni.setStorageSync(`${config.prefix}scene`, options.scene)
}
if (!!options.query.scene) {
uni.setStorageSync(`${config.prefix}scene`, options.query.scene)
}
// 版本更新
if (uni.canIUse('getUpdateManager')) {
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function(res) {
// 请求完新版本信息的回调
if (res.hasUpdate) {
updateManager.onUpdateReady(function() {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function(res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function() {
// 新的版本下载失败
uni.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
})
})
}
})
}
//#endif
},
onShow() {
console.log('App Show')
},
onHide() {
console.log('App Hide')
}
})
</script>
<style lang='stylus'>
</style>

View File

@@ -0,0 +1 @@
ed142e27-835f-4477-a80e-95857d25dff0

View File

@@ -0,0 +1 @@
c701e591-d653-4431-9ab3-10af0d087229

View File

@@ -0,0 +1,4 @@
// vue.config.js被导入
@import "./tpl/colors.styl";
@import "./tpl/mixins.styl";
@import './tpl/_public.styl';

View File

@@ -0,0 +1 @@
0f2e0b76-b6e5-4b12-b137-df9424649921

View File

@@ -0,0 +1,198 @@
/* view/logistics/appLogistics/appLogistics.wxss */
page {
background-color: #fff !important;
}
.appLogistics{
padding-bottom: 90upx;
}
.applog-bac-img {
width: 100%;
}
.list_text {
background-color: #fff;
}
.text_row {
display: flex;
height: 100rpx;
width: 100%;
border-bottom: 2rpx solid #ebebeb;
}
.text_row1 {
flex: 2;
font-size: 30rpx;
font-weight: 400;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
}
.text_row2 {
/* padding-left: 40rpx; */
flex: 7;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #666;
}
.text_row2 span {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #ccc;
display: -webkit-box !important;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.text_row3 {
flex: 1;
}
.text_row3 img {
width: 15rpx;
height: 33rpx;
}
/* .text_row:last-child {
border: 0;
} */
.label-1__text, .label-2__text {
display: inline-block;
vertical-align: middle;
height: 100%;
width: 50%;
}
.label-1__icon {
position: relative;
margin-right: 10px;
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
background: #fcfff4;
}
.label-1__icon-checked {
position: absolute;
top: 3px;
left: 3px;
width: 12px;
height: 12px;
background: #1aad19;
}
.label-2__icon {
position: relative;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
width: 18px;
height: 18px;
border: #ebebeb solid 2rpx;
background: #fff;
border-radius: 50px;
}
.label-2__icon-checked {
position: absolute;
left: 50%;
top: 50%;
margin: -6px 0 0 -6px;
width: 12px;
height: 12px;
background: #1aad19;
border-radius: 50%;
}
.label-4_text {
text-align: center;
margin-top: 15px;
}
.list_text_tit {
margin-top: 35rpx;
font-size: 30rpx;
font-weight: 700;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
padding-left: 30rpx;
}
.list_text_tit_img {
margin-top: 60rpx;
padding: 0 30rpx;
width: 100%;
display: flex;
height: 214rpx;
box-sizing: border-box;
}
.update-all {
background-color: #f2f2f2;
border-radius: 10rpx;
}
.update {
text-align: center;
}
.update-icon {
width: 50rpx;
height: 50rpx;
}
.update-text {
font-family: PingFang-SC-Regular;
font-size: 26rpx;
font-weight: 400;
font-stretch: normal;
color: #999999;
}
.updateImg {
max-width: 100%;
height: 100%;
}
.updateImg img {
width: 100%;
height: 214rpx;
}
.sub {
margin-bottom: 50rpx;
}
/* */
.sub {
margin: 90rpx auto 0;
width: 690rpx;
height: 100rpx;
background-image: linear-gradient(
#1dbf53,
#1dbf53
), linear-gradient(
#2fd152,
#2fd152
);
background-blend-mode: normal, normal;
border-radius: 50rpx;
text-align: center;
line-height: 100rpx;
font-family: PingFang-SC-Bold;
font-size: 38rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #ffffff;
}

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