mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-09 21:15:58 +08:00
7
docs/docs/readme.md
Normal file
7
docs/docs/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: readme
|
||||
---
|
||||
|
||||
# 介绍
|
||||
|
||||
ECShopX实现线上线下融合, 重构消费链接. 通过引入社交玩法突破获客与转化瓶颈, 形成导购与顾客销售的互动,促进线下实体的商业数字化转型. 帮客户重构销售网络.
|
||||
7
docs/docs/rulfan.md
Normal file
7
docs/docs/rulfan.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: rulfan
|
||||
---
|
||||
|
||||
# 官网订单编辑订单
|
||||
|
||||

|
||||
81
docs/docs/summary_1.md
Normal file
81
docs/docs/summary_1.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
url: summary_1
|
||||
---
|
||||
|
||||
# SUMMARY_1.md
|
||||
|
||||
-
|
||||
[介绍](_README)
|
||||
|
||||
-
|
||||
[技术说明](_technical)
|
||||
|
||||
-
|
||||
系统部署
|
||||
|
||||
-
|
||||
准备工作
|
||||
|
||||
-
|
||||
[域名](_deploy_prepare_domain)
|
||||
|
||||
-
|
||||
[七牛](_deploy_prepare_qiniu)
|
||||
|
||||
-
|
||||
[微信开放平台第三方平台申请](_deploy_prepare_open_weixin)
|
||||
|
||||
-
|
||||
[域名备案](_deploy_prepare_domain_record)
|
||||
|
||||
-
|
||||
[服务器方案](_deploy_prepare_solution)
|
||||
|
||||
-
|
||||
[支付申请]
|
||||
|
||||
-
|
||||
[腾讯位置服务](_deploy_prepare_lbs)
|
||||
|
||||
-
|
||||
[EcshopX授权](_deplloy_prepare_license)
|
||||
|
||||
-
|
||||
短信方案
|
||||
|
||||
-
|
||||
物流跟踪
|
||||
|
||||
-
|
||||
客服工具
|
||||
|
||||
-
|
||||
微信小程序支付
|
||||
|
||||
-
|
||||
商品初始化/模版初始化
|
||||
|
||||
-
|
||||
部署方案
|
||||
|
||||
- [单机部署方案](_deploy_install)
|
||||
- [集群部署方案](_deploy_cluster_install)
|
||||
-
|
||||
框架
|
||||
|
||||
- 目录结构
|
||||
- 队列
|
||||
- orm
|
||||
-
|
||||
-
|
||||
快速入门
|
||||
|
||||
-
|
||||
API文档
|
||||
|
||||
-
|
||||
数据辞典
|
||||
|
||||
-
|
||||
数据库migration规则
|
||||
|
||||
7
docs/docs/sybril.md
Normal file
7
docs/docs/sybril.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: sybril
|
||||
---
|
||||
|
||||
# 冲红
|
||||
|
||||

|
||||
165
docs/docs/technical.md
Normal file
165
docs/docs/technical.md
Normal file
@@ -0,0 +1,165 @@
|
||||
---
|
||||
url: technical
|
||||
---
|
||||
|
||||
# 技术说明
|
||||
|
||||
<a name="6a6c10a5"></a>
|
||||
## 整体方案
|
||||
|
||||
<br />
|
||||
|
||||
| 名称 | 后端描述 |
|
||||
| --- | --- |
|
||||
| 后端开发语言 | php |
|
||||
| 后端开发框架 | lumen、doctrine、dingo |
|
||||
| 前端开发语言 | HTML5、CSS3、ES6、Typescript |
|
||||
| 前端开发框架 | Vue3、Vue2、Taro3、Nuxt |
|
||||
| 前端UI框架 | ElementUI、NuxtUI |
|
||||
| 数据库 | mysql |
|
||||
| 队列 | redis(默认)/rabbitmq |
|
||||
| 缓存 | redis(默认)/memcached |
|
||||
| cdn/oss | 七牛云/阿里OSS |
|
||||
| 图数据库 | neo4j(可选) |
|
||||
| 日志搜集 | Setntry/ELK |
|
||||
| 持续集成 | Git, Gitlab Ci |
|
||||
|
||||
|
||||
|
||||
<a name="17ce5a05"></a>
|
||||
### OSS&CDN方案
|
||||
|
||||
<br />支持方案: 七牛/阿里OSS<br />
|
||||
- 图片, 视频
|
||||
|
||||
|
||||
|
||||
<a name="918d1109"></a>
|
||||
## 前端技术方案
|
||||
|
||||
|
||||
<a name="3830e4e2"></a>
|
||||
### 各端
|
||||
|
||||
#### 管理后台
|
||||
- vue-router/vuex
|
||||
- ElementUI 组件封装
|
||||
|
||||
|
||||
<a name="PC"></a>
|
||||
#### PC商城
|
||||
|
||||
|
||||
- nuxt4 + vue3 + typescript
|
||||
- 响应式设计
|
||||
|
||||
|
||||
|
||||
<a name="699df59a"></a>
|
||||
#### 移动商城(H5、小程序)
|
||||
- Taro
|
||||
<br />Taro 是一套遵循 React 语法规范的 多端开发 解决方案。现如今市面上端的形态多种多样,Web、React-Native、微信小程序等各种端大行其道,当业务要求同时在不同的端都要求有所表现的时候,针对不同的端去编写多套代码的成本显然非常高,这时候只编写一套代码就能够适配到多端的能力就显得极为需要。<br />
|
||||
<br />使用 Taro,我们可以只书写一套代码,再通过 Taro 的编译工具,将源代码分别编译出可以在不同端(微信/百度/支付宝/字节跳动小程序、H5、React-Native 等)运行的代码。<br />
|
||||
<br />[Taro官网](https://taro.aotu.io)<br />
|
||||
|
||||
|
||||
<a name="5e94b215"></a>
|
||||
#### App(混合应用)
|
||||
|
||||
- h5页面内嵌, 与原生应用双向通讯
|
||||
|
||||
|
||||
|
||||
<a name="fece3c61"></a>
|
||||
### 工具链
|
||||
|
||||
|
||||
- webpack 资源打包/开发/发布
|
||||
- 基于vue-cli 3的开发框架
|
||||
- 命令行工具spx-cli, 用于安装/发布模块包
|
||||
- 基于vue-cli 3的插件, 生成样板代码 基础配置 注册模块等
|
||||
|
||||
|
||||
|
||||
<a name="ff885d24"></a>
|
||||
### 组件库
|
||||
|
||||
|
||||
- 基于ElementUI基础组件库
|
||||
- 基于NuxtUI基础组件库
|
||||
|
||||
|
||||
|
||||
<a name="e63024fc"></a>
|
||||
## 后端技术方案
|
||||
|
||||
|
||||
<a name="295bb704"></a>
|
||||
### 语言
|
||||
|
||||
|
||||
```
|
||||
php 8.2
|
||||
```
|
||||
|
||||
|
||||
<a name="41f1d2b6"></a>
|
||||
### 框架
|
||||
|
||||
<br />前后端分离, 后端脱离传统系统的后端页面渲染. 专心只做API服务端, 因此在技术选型上选择了, 轻量级的lumen框架.<br />
|
||||
|
||||
- Lumen<br />为速度而生的 Laravel 框架. Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。<br />[laravel官网](https://laravel.com/)<br />[lumen官网](https://lumen.laravel.com/)
|
||||
- Dingo
|
||||
- doctrine orm
|
||||
- 支持 master slave
|
||||
- 开发模式<br />service repository entity
|
||||
|
||||
|
||||
|
||||
<a name="fece3c61-1"></a>
|
||||
### 工具链
|
||||
|
||||
|
||||
- 包管理 - composer
|
||||
- 异常处理 - Sentry
|
||||
- API - swagger
|
||||
- doctrine
|
||||
|
||||
|
||||
|
||||
<a name="3bef0615"></a>
|
||||
### 使用服务
|
||||
|
||||
|
||||
- mysql
|
||||
- redis
|
||||
- neo4j(可选)
|
||||
- 队列服务
|
||||
- rabbitmq
|
||||
- redis
|
||||
- cdn+oss存储, 目前只支持 七牛云、阿里OSS
|
||||
|
||||
|
||||
|
||||
<a name="a060e264"></a>
|
||||
## 部署方案
|
||||
|
||||
|
||||
<a name="e6394116"></a>
|
||||
### 传统部署方案
|
||||
|
||||
|
||||
<a name="ba66c20e"></a>
|
||||
### kubernetes方案
|
||||
|
||||
<br />目前支持阿里云 华为云<br />
|
||||
|
||||
<a name="01a02133"></a>
|
||||
#### 技术栈
|
||||
|
||||
|
||||
- kubernets
|
||||
- docker
|
||||
- helm
|
||||
- helmfile
|
||||
- 持续集成: gitlab-ci
|
||||
287
docs/docs/test.md
Normal file
287
docs/docs/test.md
Normal file
@@ -0,0 +1,287 @@
|
||||
---
|
||||
url: test
|
||||
---
|
||||
|
||||
# Laravel Cashier
|
||||
|
||||
- [Introduction](_billing.md#introduction)
|
||||
- [Configuration](_billing.md#configuration)
|
||||
- [Subscribing To A Plan](_billing.md#subscribing-to-a-plan)
|
||||
- [No Card Up Front](_billing.md#no-card-up-front)
|
||||
- [Swapping Subscriptions](_billing.md#swapping-subscriptions)
|
||||
- [Subscription Quantity](_billing.md#subscription-quantity)
|
||||
- [Cancelling A Subscription](_billing.md#cancelling-a-subscription)
|
||||
- [Resuming A Subscription](_billing.md#resuming-a-subscription)
|
||||
- [Checking Subscription Status](_billing.md#checking-subscription-status)
|
||||
- [Handling Failed Payments](_billing.md#handling-failed-payments)
|
||||
- [Invoices](_billing.md#invoices)
|
||||
|
||||
<a name="Introduction"></a>
|
||||
## Introduction
|
||||
|
||||
Laravel Cashier provides an expressive, fluent interface to [Stripe's](https://stripe.com) subscription billing services. It handles almost all of the boilerplate subscription billing code you are dreading writing. In addition to basic subscription management, Cashier can handle coupons, swapping subscription, subscription "quantites", cancellation grace periods, and even generate invoice PDFs.
|
||||
|
||||
<a name="Configuration"></a>
|
||||
## Configuration
|
||||
|
||||
<a name="Composer"></a>
|
||||
### Composer
|
||||
|
||||
First, add the Cashier package to your `composer.json` file:
|
||||
|
||||
```
|
||||
"laravel/cashier": "~2.0"
|
||||
```
|
||||
|
||||
<a name="508a05a7"></a>
|
||||
### Service Provider
|
||||
|
||||
Next, register the `Laravel\Cashier\CashierServiceProvider` in your `app` configuration file.
|
||||
|
||||
<a name="Migration"></a>
|
||||
### Migration
|
||||
|
||||
Before using Cashier, we'll need to add several columns to your database. Don't worry, you can use the `cashier:table` Artisan command to create a migration to add the necessary column. Once the migration has been created, simply run the `migrate` command.
|
||||
|
||||
<a name="d29b2496"></a>
|
||||
### Model Setup
|
||||
|
||||
Next, add the BillableTrait and appropriate date mutators to your model definition:
|
||||
|
||||
```
|
||||
use Laravel\Cashier\BillableTrait;
|
||||
use Laravel\Cashier\BillableInterface;
|
||||
|
||||
class User extends Eloquent implements BillableInterface {
|
||||
|
||||
use BillableTrait;
|
||||
|
||||
protected $dates = ['trial_ends_at', 'subscription_ends_at'];
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
<a name="7e3f1d72"></a>
|
||||
### Stripe Key
|
||||
|
||||
Finally, set your Stripe key in one of your bootstrap files:
|
||||
|
||||
```
|
||||
User::setStripeKey('stripe-key');
|
||||
```
|
||||
|
||||
<a name="37762da0"></a>
|
||||
## Subscribing To A Plan
|
||||
|
||||
Once you have a model instance, you can easily subscribe that user to a given Stripe plan:
|
||||
|
||||
```
|
||||
$user = User::find(1);
|
||||
|
||||
$user->subscription('monthly')->create($creditCardToken);
|
||||
```
|
||||
|
||||
If you would like to apply a coupon when creating the subscription, you may use the `withCoupon` method:
|
||||
|
||||
```
|
||||
$user->subscription('monthly')
|
||||
->withCoupon('code')
|
||||
->create($creditCardToken);
|
||||
```
|
||||
|
||||
The `subscription` method will automatically create the Stripe subscription, as well as update your database with Stripe customer ID and other relevant billing information.
|
||||
|
||||
If your plan has a trial period, make sure to set the trial end date on your model after subscribing:
|
||||
|
||||
```
|
||||
$user->trial_ends_at = Carbon::now()->addDays(14);
|
||||
|
||||
$user->save();
|
||||
```
|
||||
|
||||
<a name="5283bb22"></a>
|
||||
## No Card Up Front
|
||||
|
||||
If your application offers a free-trial with no credit-card up front, set the `cardUpFront` property on your model to `false`:
|
||||
|
||||
```
|
||||
protected $cardUpFront = false;
|
||||
```
|
||||
|
||||
On account creation, be sure to set the trial end date on the model:
|
||||
|
||||
```
|
||||
$user->trial_ends_at = Carbon::now()->addDays(14);
|
||||
|
||||
$user->save();
|
||||
```
|
||||
|
||||
<a name="d008f056"></a>
|
||||
## Swapping Subscriptions
|
||||
|
||||
To swap a user to a new subscription, use the `swap` method:
|
||||
|
||||
```
|
||||
$user->subscription('premium')->swap();
|
||||
```
|
||||
|
||||
If the user is on trial, the trial will be maintained as normal. Also, if a "quantity" exists for the subscription, that quantity will also be maintained.
|
||||
|
||||
<a name="0d519501"></a>
|
||||
## Subscription Quantity
|
||||
|
||||
Sometimes subscriptions are affected by "quantity". For example, your application might charge $10 per month per user on an account. To easily increment or decrement your subscription quantity, use the `increment` and `decrement` methods:
|
||||
|
||||
```
|
||||
$user = User::find(1);
|
||||
|
||||
$user->subscription()->increment();
|
||||
|
||||
// Add five to the subscription's current quantity...
|
||||
$user->subscription()->increment(5)
|
||||
|
||||
$user->subscription->decrement();
|
||||
|
||||
// Subtract five to the subscription's current quantity...
|
||||
$user->subscription()->decrement(5)
|
||||
```
|
||||
|
||||
<a name="d184d833"></a>
|
||||
## Cancelling A Subscription
|
||||
|
||||
Cancelling a subscription is a walk in the park:
|
||||
|
||||
```
|
||||
$user->subscription()->cancel();
|
||||
```
|
||||
|
||||
When a subscription is cancelled, Cashier will automatically set the `subscription_ends_at` column on your database. This column is used to know when the `subscribed` method should begin returning `false`. For example, if a customer cancels a subscription on March 1st, but the subscription was not scheduled to end until March 5th, the `subscribed` method will continue to return `true` until March 5th.
|
||||
|
||||
<a name="b57077dd"></a>
|
||||
## Resuming A Subscription
|
||||
|
||||
If a user has cancelled their subscription and you wish to resume it, use the `resume` method:
|
||||
|
||||
```
|
||||
$user->subscription('monthly')->resume($creditCardToken);
|
||||
```
|
||||
|
||||
If the user cancels a subscription and then resumes that subscription before the subscription has fully expired, they will not be billed immediately. Their subscription will simply be re-activated, and they will be billed on the original billing cycle.
|
||||
|
||||
<a name="acd03e95"></a>
|
||||
## Checking Subscription Status
|
||||
|
||||
To verify that a user is subscribed to your application, use the `subscribed` command:
|
||||
|
||||
```
|
||||
if ($user->subscribed())
|
||||
{
|
||||
//
|
||||
}
|
||||
```
|
||||
|
||||
The `subscribed` method makes a great candidate for a route filter:
|
||||
|
||||
```
|
||||
Route::filter('subscribed', function()
|
||||
{
|
||||
if (Auth::user() && ! Auth::user()->subscribed())
|
||||
{
|
||||
return Redirect::to('billing');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
You may also determine if the user is still within their trial period (if applicable) using the `onTrial` method:
|
||||
|
||||
```
|
||||
if ($user->onTrial())
|
||||
{
|
||||
//
|
||||
}
|
||||
```
|
||||
|
||||
To determine if the user was once an active subscriber, but has cancelled their subscription, you may use the `cancelled` method:
|
||||
|
||||
```
|
||||
if ($user->cancelled())
|
||||
{
|
||||
//
|
||||
}
|
||||
```
|
||||
|
||||
You may also determine if a user has cancelled their subscription, but are still on their "grace period" until the subscription fully expires. For example, if a user cancels a subscription on March 5th that was scheduled to end on March 10th, the user is on their "grace period" until March 10th. Note that the `subscribed` method still returns `true` during this time.
|
||||
|
||||
```
|
||||
if ($user->onGracePeriod())
|
||||
{
|
||||
//
|
||||
}
|
||||
```
|
||||
|
||||
The `everSubscribed` method may be used to determine if the user has ever subscribed to a plan in your application:
|
||||
|
||||
```
|
||||
if ($user->everSubscribed())
|
||||
{
|
||||
//
|
||||
}
|
||||
```
|
||||
|
||||
<a name="9a5b8dde"></a>
|
||||
## Handling Failed Payments
|
||||
|
||||
What if a customer's credit card expires? No worries - Cashier includes a Webhook controller that can easily cancel the customer's subscription for you. Just point a route to the controller:
|
||||
|
||||
```
|
||||
Route::post('stripe/webhook', 'Laravel\Cashier\WebhookController@handleWebhook');
|
||||
```
|
||||
|
||||
That's it! Failed payments will be captured and handled by the controller. The controller will cancel the customer's subscription after three failed payment attempts. The `stripe/webhook` URI in this example is just for example. You will need to configure the URI in your Stripe settings.
|
||||
|
||||
If you have additional Stripe webhook events you would like to handle, simply extend the Webhook controller:
|
||||
|
||||
```
|
||||
class WebhookController extends Laravel\Cashier\WebhookController {
|
||||
|
||||
public function handleWebhook()
|
||||
{
|
||||
// Handle other events...
|
||||
|
||||
// Fallback to failed payment check...
|
||||
return parent::handleWebhook();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** In addition to updating the subscription information in your database, the Webhook controller will also cancel the subscription via the Stripe API.
|
||||
|
||||
|
||||
<a name="Invoices"></a>
|
||||
## Invoices
|
||||
|
||||
You can easily retrieve an array of a user's invoices using the `invoices` method:
|
||||
|
||||
```
|
||||
$invoices = $user->invoices();
|
||||
```
|
||||
|
||||
When listing the invoices for the customer, you may use these helper methods to display the relevant invoice information:
|
||||
|
||||
```
|
||||
{{ $invoice->id }}
|
||||
|
||||
{{ $invoice->dateString() }}
|
||||
|
||||
{{ $invoice->dollars() }}
|
||||
```
|
||||
|
||||
Use the `downloadInvoice` method to generate a PDF download of the invoice. Yes, it's really this easy:
|
||||
|
||||
```
|
||||
return $user->downloadInvoice($invoice->id, [
|
||||
'vendor' => 'Your Company',
|
||||
'product' => 'Your Product',
|
||||
]);
|
||||
```
|
||||
7
docs/docs/tmacx9.md
Normal file
7
docs/docs/tmacx9.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: tmacx9
|
||||
---
|
||||
|
||||
# 门店配送
|
||||
|
||||

|
||||
7
docs/docs/ufq9mc.md
Normal file
7
docs/docs/ufq9mc.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: ufq9mc
|
||||
---
|
||||
|
||||
# 开蓝
|
||||
|
||||

|
||||
231
docs/docs/voxh3o.md
Normal file
231
docs/docs/voxh3o.md
Normal file
@@ -0,0 +1,231 @@
|
||||
---
|
||||
url: voxh3o
|
||||
---
|
||||
|
||||
# swagger api注释规范
|
||||
|
||||
[swagger openapi文档](https://learnku.com/laravel/t/7430/how-to-write-api-documents-based-on-swagger-php)
|
||||
```json
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "1.0.0",
|
||||
"title": "Swagger Petstore",
|
||||
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
"name": "Swagger API Team"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT"
|
||||
}
|
||||
},
|
||||
"host": "petstore.swagger.io",
|
||||
"basePath": "/api",
|
||||
"schemes": [
|
||||
"http"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/pets": {
|
||||
"get": {
|
||||
"description": "Returns all pets from the system that the user has access to",
|
||||
"operationId": "findPets",
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/xml",
|
||||
"text/xml",
|
||||
"text/html"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"description": "tags to filter by",
|
||||
"required": false,
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv"
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "maximum number of results to return",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "pet response",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Pet"
|
||||
}
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "unexpected error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorModel"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Creates a new pet in the store. Duplicates are allowed",
|
||||
"operationId": "addPet",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "pet",
|
||||
"in": "body",
|
||||
"description": "Pet to add to the store",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NewPet"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "pet response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Pet"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "unexpected error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorModel"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/pets/{id}": {
|
||||
"get": {
|
||||
"description": "Returns a user based on a single ID, if the user does not have access to the pet",
|
||||
"operationId": "findPetById",
|
||||
"produces": [
|
||||
"application/json",
|
||||
"application/xml",
|
||||
"text/xml",
|
||||
"text/html"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "ID of pet to fetch",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "pet response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Pet"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "unexpected error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorModel"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "deletes a single pet based on the ID supplied",
|
||||
"operationId": "deletePet",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "ID of pet to delete",
|
||||
"required": true,
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "pet deleted"
|
||||
},
|
||||
"default": {
|
||||
"description": "unexpected error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ErrorModel"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"Pet": {
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/NewPet"
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"NewPet": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorModel": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
87
docs/docs/wgwqd5.md
Normal file
87
docs/docs/wgwqd5.md
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
url: wgwqd5
|
||||
---
|
||||
|
||||
# FAQ
|
||||
|
||||
- 用阿里云oss上传文件报错
|
||||
> lumen.ERROR: OSS\Core\OssException: : RequestId: 5EC37C223D124D353126DC73 in /Users/lujunyi/Sites/yuanyuanke/amore/amorestore/qianyi/development/espier-bloated/vendor/aliyuncs/oss-sdk-php/src/OSS/Result/Result.php:97
|
||||
> 解决:
|
||||
> a、一般都是配置错了,检查阿里oss配置
|
||||
> b、检查php的时区配置
|
||||
|
||||
|
||||
|
||||
- 本地部署环境的一些问题
|
||||
|
||||
其实也很简单,只是关键上的问题都出现了理解上的错误。
|
||||
|
||||
- docker环境需要和匹配的代码版本一致才能顺利部署
|
||||
- 测试环境 需要导入线上数据库数据 并且线上版本的数据库要和本地搭建的数据库版本一致才能正常匹配数据
|
||||
- 配置文件需要与线上一致 除了mysql neo4j redis 需要配置成本地的 其他的都需要与线上的一直。
|
||||
|
||||
上面这3个问题确认好了很快就能部署出来本地的开发环境。
|
||||
|
||||
- IS_SAAS,SYSTEM_COMPANY_ID等的配置问题,独立部署,这个值在env中需要与您的账号对应的company_id要一致,例如报错 "请使用授权的账号登录"
|
||||
- h5或者pc用微信支付报错
|
||||
|
||||
<br />可能是后台的公众账号ID没有填
|
||||
|
||||
- h5编译,在npm install 报错
|
||||
|
||||
配置npm镜像源<br />npm config set registry [http://registry.npm.ishopex.cn](http://registry.npm.ishopex.cn)
|
||||
|
||||
- 更新菜单后发现菜单没有更新
|
||||
|
||||
试试退出后重新登录再看看,菜单是在登录的时候才更新
|
||||
|
||||
- 下单之后分销商品没有返佣金
|
||||
- [营销-基础设置]推广员奖金设置是否配置,或者分销商品返佣金额是否配置<br />[营销-分销商品]返佣状态是否开启
|
||||
- 安装完毕,授权小程序或者公众号报错
|
||||
|
||||

|
||||
|
||||
- 一般都是授权测试公众号列表中的原始id不对,或者压根就是env中第三方平台配的不是这个第三方平台的信息
|
||||
- 确认授权者是这个公众号或者小程序的管理员
|
||||
- 执行 php artisan报错
|
||||
|
||||
<br />看看swoole_loader是否配置正确,swoole_Loader.so是否正确下载,zl文件路径是否配置正确
|
||||
|
||||
- 支付宝支付的配置问题
|
||||
|
||||
支付宝配置里面有四个钥<br />支付宝公钥(需要配置在商城后台)、支付宝私钥(支付宝后台)<br />商城公钥(需要配置在支付宝后台)、商城私钥(需要配置在商城后台)
|
||||
|
||||
- 导购代客下单后的支付码出不来
|
||||
|
||||
导购代客下单用的微信的native支付,所以需要开通此支付
|
||||
|
||||
- vue端composer install 的时候
|
||||
|
||||
<br />可能是您的服务器没有安装解压的zip
|
||||
> tar (child): bzip2: Cannot exec: No such file or directory
|
||||
> tar (child): Error is not recoverable: exiting now
|
||||
> tar: Child returned status 2
|
||||
> tar: Error is not recoverable: exiting now
|
||||
|
||||
原因是**linux下没有bzip2解压工具**<br />**直接通过yum来安装**
|
||||
> **yum -y install bzip2**
|
||||
|
||||
- **pc端访问 报 undefined index distributor_id**
|
||||
> **后台没有添加分类导致的**
|
||||
|
||||
- 后台页面访问报错 template not esist rid:
|
||||
|
||||

|
||||
> 这个是由于模板id没有在微信第三方平台模板库中,并且也没有在系统中配置个值
|
||||
|
||||
- 后台报错当前账号未绑定公众号
|
||||
> 这个一般是由于系统不需要公众号的时候,开启了env中不需要公众号的配置,因为微信相关功能用到了服务号的一些功能,如素材库。
|
||||
|
||||
- 安装composer包报内存错误的解决办法
|
||||
> 直接使用命令 php -d memory_limit=-1 `which composer` update/install -vvv, 去掉内存限制。
|
||||
> 如果还有问题,如果您用的是虚拟机,那要看看是不是物理机分配的内存不够了
|
||||
|
||||
- 后台激活的时候报错
|
||||
> 
|
||||
> 在.env中将这个链接的http改为https
|
||||
|
||||
7
docs/docs/xgtml0.md
Normal file
7
docs/docs/xgtml0.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
url: xgtml0
|
||||
---
|
||||
|
||||
# 售前退款官网配送
|
||||
|
||||

|
||||
111
docs/docs/yghxgb.md
Normal file
111
docs/docs/yghxgb.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
url: yghxgb
|
||||
---
|
||||
|
||||
# 本地性能调试
|
||||
|
||||
<a name="sf-article_title"></a>
|
||||
# [Tideways、xhprof 和 xhgui 打造 PHP 非侵入式监控平台](https://segmentfault.com/a/1190000019508358)
|
||||
|
||||
<br /><br />
|
||||
|
||||
<a name="item-2"></a>
|
||||
## 环境准备
|
||||
安装之前确保已经正确安装了以下软件
|
||||
|
||||
- PHP
|
||||
- Nginx
|
||||
- Mongodb
|
||||
<a name="item-3"></a>
|
||||
## 安装 PHP mongodb 扩展
|
||||
```
|
||||
$ sudo pecl install mongodb
|
||||
```
|
||||
PHP 配置文件中添加
|
||||
```
|
||||
[mongodb]
|
||||
extension=mongodb.so
|
||||
```
|
||||
<a name="item-4"></a>
|
||||
## 安装 PHP tideaways 扩展
|
||||
常规编译安装
|
||||
```
|
||||
$ git clone https://github.com/tideways/php-xhprof-extension.git
|
||||
$ cd /path/php-xhprof-extension
|
||||
$ phpize
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
```
|
||||
PHP 配置文件中添加
|
||||
```
|
||||
[tideways]
|
||||
extension=tideways_xhprof.so
|
||||
; 不需要自动加载,在程序中控制就行
|
||||
tideways.auto_prepend_library=0
|
||||
; 频率设置为100,在程序调用时可以修改
|
||||
tideways.sample_rate=100
|
||||
```
|
||||
<a name="item-5"></a>
|
||||
## 安装 xhgui-branch(xhgui 的汉化版)
|
||||
```
|
||||
$ git clone https://github.com/laynefyc/xhgui-branch.git
|
||||
$ cd xhgui-branch
|
||||
$ php install.php
|
||||
```
|
||||
修改 xhgui-branch 配置文件
|
||||
```
|
||||
<?php
|
||||
return array(
|
||||
...
|
||||
'extension' => 'tideways_xhprof',
|
||||
...
|
||||
'save.handler' => 'mongodb',
|
||||
'db.host' => 'mongodb://127.0.0.1:27017',
|
||||
'db.db' => 'xhprof',
|
||||
...
|
||||
);
|
||||
```
|
||||
<a name="item-6"></a>
|
||||
## 启动 mongodb 并设置 xhgui 索引,命令如下:
|
||||
```
|
||||
$ mongo
|
||||
> use xhprof
|
||||
> db.results.ensureIndex( { 'meta.SERVER.REQUEST_TIME' : -1 } )
|
||||
> db.results.ensureIndex( { 'profile.main().wt' : -1 } )
|
||||
> db.results.ensureIndex( { 'profile.main().mu' : -1 } )
|
||||
> db.results.ensureIndex( { 'profile.main().cpu' : -1 } )
|
||||
> db.results.ensureIndex( { 'meta.url' : 1 } )
|
||||
```
|
||||
<a name="item-7"></a>
|
||||
## xhgui 本地虚拟主机配置参考
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name xhgui.test;
|
||||
root /path/xhgui-branch/webroot;
|
||||
# access_log logs/access.log;
|
||||
error_log logs/error.log;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
index index.php index.html index.htm;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_read_timeout 150;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
<a name="item-8-1"></a>
|
||||
### 在项目入口的 PHP文件中 配置,告诉 PHP 程序在执行前要调用的服务
|
||||
```
|
||||
require_once('/path/wwwroot/xhgui-branch/external/header.php');
|
||||
```
|
||||
<br />
|
||||
103
docs/docs/yzimb6.md
Normal file
103
docs/docs/yzimb6.md
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
url: yzimb6
|
||||
---
|
||||
|
||||
# 云存储
|
||||
|
||||
<a name="b59c9e0f"></a>
|
||||
## 概念
|
||||
|
||||
|
||||
<a name="cdn"></a>
|
||||
### cdn
|
||||
|
||||
|
||||
> CDN的全称是Content Delivery Network,即内容分发网络。CDN是构建在网络之上的内容分发网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能模块,使用户就近获取所需内容,降低网络拥塞,提高用户访问响应速度和命中率。CDN的关键技术主要有内容存储和分发技术。
|
||||
|
||||
|
||||
|
||||
<a name="9e236b4b"></a>
|
||||
### 开放存储服务 OSS
|
||||
|
||||
|
||||
> 开放存储服务(OpenStorageService,简称OSS),是云对外提供的海量,安全,低成本,高可靠的云存储服务。用户可以通过简单的API(REST方式的接口),在任何时间、任何地点、任何互联网设备上进行数据上传和下载 保存js, ccs, 图片等静态资源
|
||||
|
||||
<a name="hBgmi"></a>
|
||||
## 存储设计
|
||||
在 ECShopX 中,抽象了三种存储方式:图片、视频、文件。在使用云存储时,需要建立三个不同的存储空间,详细设置如下:
|
||||
<a name="espier-import-files"></a>
|
||||
### espier-vue
|
||||
用来存储前端的 css js 及静态图片等
|
||||
|
||||
- 存储空间(bucket): espier-vue<br />
|
||||
- CDN 域名: https://b-cdn.yuanyuanke.cn
|
||||
- 访问控制: 公开空间
|
||||
<a name="8JwDn"></a>
|
||||
### espier-import-files
|
||||
用来存储系统导入 导出的相关数据
|
||||
|
||||
- 存储空间(bucket): espier-import-files
|
||||
- CDN 域名: [https://b-import-cdn.yuanyuanke.cn](https://b-import-cdn.yuanyuanke.cn)
|
||||
- 访问控制: 私有空间
|
||||
|
||||
|
||||
|
||||
<a name="espier-images"></a>
|
||||
### espier-image
|
||||
用来存储商品图片
|
||||
|
||||
- 存储空间(bucket): espier-images
|
||||
- CDN 加速域名: [https://b-img-cdn.yuanyuanke.cn](https://b-img-cdn.yuanyuanke.cn)
|
||||
- 访问控制: 公开空间
|
||||
<a name="Y37Hs"></a>
|
||||
## 支持的云存储供应商
|
||||
<a name="RQYlo"></a>
|
||||
### 阿里云
|
||||
存储空间配置,参见 [阿里云 oss 配置说明](https://shopex.yuque.com/mi09ga/rwcmzc/fiytfx)<br />在创建完成存储空间后,需要在`.env`中配置详细参数,实例如下:<br />
|
||||
|
||||
```bash
|
||||
DISK_DRIVER=oss
|
||||
|
||||
OSS_ACCESS_KEY=your KEY
|
||||
OSS_SECRET_KEY=your SECRET
|
||||
|
||||
OSS_FILE_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
|
||||
OSS_FILE_BUCKET=espier-import-files
|
||||
OSS_FILE_IS_CNAME=false
|
||||
|
||||
OSS_IMAGE_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
|
||||
OSS_IMAGE_BUCKET=espier-images
|
||||
OSS_IMAGE_IS_CNAME=false
|
||||
OSS_IMAGE_DOMAIN=https://b-img-cdn.yuanyuanke.cn
|
||||
|
||||
OSS_VIDEO_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
|
||||
OSS_VIDEO_BUCKET=espier-images
|
||||
OSS_VIDEO_IS_CNAME=flase
|
||||
OSS_VIDEO_DOMAIN=https://b-img-cdn.yuanyuanke.cn
|
||||
```
|
||||
|
||||
<br />[如何获取 阿里云 Access Key 和 Secret Key](https://help.aliyun.com/document_detail/154750.html)
|
||||
<a name="3phma"></a>
|
||||
### 七牛云
|
||||
具体配置,参见 [七牛云 配置说明](https://shopex.yuque.com/mi09ga/rwcmzc/beqq8s)<br />在创建完成存储空间后,需要在`.env`中配置详细参数,实例如下:<br />
|
||||
|
||||
```bash
|
||||
DISK_DRIVER=qiniu
|
||||
|
||||
QINIU_ACCESS_KEY=your KEY
|
||||
QINIU_SECRET_KEY=your SECRET
|
||||
|
||||
QINIU_IMAGE_DOMAIN=b-img-cdn.yuanyuanke.cn
|
||||
QINIU_IMAGE_NAME=espier-images
|
||||
QINIU_IMAGE_REGION=z2
|
||||
|
||||
QINIU_VIDEO_DOMAIN=b-video-cdn.yuanyuanke.cn
|
||||
QINIU_VIDEO_NAME=espier-videos
|
||||
QINIU_VIDEO_REGION=z2
|
||||
|
||||
QINIU__FILE_DOMAIN=https://b-import-cdn.yuanyuanke.cn
|
||||
QINIU_FILE_NAME=espier-files
|
||||
QINIU_FILE_REGION=z2
|
||||
```
|
||||
|
||||
<br />[怎么获取或者找到 七牛 Access Key 和 Secret Key](https://developer.qiniu.com/af/kb/1479/how-to-access-or-locate-the-access-key-and-secret-key)
|
||||
66
docs/docs/zdnf5m.md
Normal file
66
docs/docs/zdnf5m.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
url: zdnf5m
|
||||
---
|
||||
|
||||
# git提交规范
|
||||
|
||||
<a name="aa02f9d1"></a>
|
||||
# 
|
||||
<a name="ANNNC"></a>
|
||||
# 1. Git commit规范
|
||||
<a name="4df7b988"></a>
|
||||
## 1.1. 格式
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
```
|
||||
示例:
|
||||
```
|
||||
fix(ngRepeat): fix trackBy function being invoked with incorrect scope
|
||||
```
|
||||
<a name="12-type"></a>
|
||||
## 1.2. type
|
||||
主要的提交类型如下:
|
||||
|
||||
| Type | 说明 | 备注 |
|
||||
| --- | --- | --- |
|
||||
| `feat` | 提交新功能 | 常用 |
|
||||
| `fix` | 修复bug | 常用 |
|
||||
| `docs` | 修改文档 | |
|
||||
| `style` | 修改格式,例如格式化代码,空格,拼写错误等 | |
|
||||
| `refactor` | 重构代码,没有添加新功能也没有修复bug | |
|
||||
| `test` | 添加或修改测试用例 | |
|
||||
| `perf` | 代码性能调优 | |
|
||||
| `chore` | 修改构建工具、构建流程、更新依赖库、文档生成逻辑 | 例如vendor包 |
|
||||
|
||||
<a name="13-scope"></a>
|
||||
## 1.3. scope
|
||||
表示此次commit涉及的文件范围,可以使用`*`来表示涉及多个范围。
|
||||
<a name="14-subject"></a>
|
||||
## 1.4. subject
|
||||
描述此次commit涉及的修改内容。
|
||||
|
||||
- 使用祈使句(动词开头)、动宾短语。
|
||||
- 第一个字母不要大写。
|
||||
- 不要以`.`句号结尾。
|
||||
<a name="3190f7e5"></a>
|
||||
# 2. Git commit工具
|
||||
安装`commitizen`和`cz-conventional-changelog`。
|
||||
```
|
||||
npm install -g commitizen cz-conventional-changelog
|
||||
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
|
||||
```
|
||||
使用cz-cli
|
||||
```
|
||||
$ git cz
|
||||
cz-cli@4.0.3, cz-conventional-changelog@3.0.1
|
||||
? Select the type of change that you're committing: (Use arrow keys)
|
||||
❯ feat: A new feature
|
||||
fix: A bug fix
|
||||
docs: Documentation only changes
|
||||
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
refactor: A code change that neither fixes a bug nor adds a feature
|
||||
perf: A code change that improves performance
|
||||
test: Adding missing tests or correcting existing tests
|
||||
(Move up and down to reveal more choices)
|
||||
```
|
||||
[<br />](https://www.huweihuang.com/linux-notes/git/git-alias-zsh.html)
|
||||
Reference in New Issue
Block a user