Authored by baoss

fix conflict

@@ -7,8 +7,7 @@ @@ -7,8 +7,7 @@
7 ############################################################ 7 ############################################################
8 8
9 9
10 -#base image : ccr.ccs.tencentyun.com/yoho-base/node  
11 -FROM ccr.ccs.tencentyun.com/yoho-base/node:10.4.1-alpine 10 +FROM ccr.ccs.tencentyun.com/yoho-base/node:10.4.1-alpine-fix
12 11
13 MAINTAINER feng.chen <feng.chen@yoho.cn> 12 MAINTAINER feng.chen <feng.chen@yoho.cn>
14 13
@@ -27,7 +27,7 @@ const report = function(data) { @@ -27,7 +27,7 @@ const report = function(data) {
27 } 27 }
28 const imgElem = new Image(); 28 const imgElem = new Image();
29 29
30 - imgElem.src = config.reportUrl + '?s=ufo-app-web&l=' + str + '&t=' + (new Date()).getTime(); 30 + imgElem.src = config.reportUrl + '?s=xianyu-ufo-app-web&l=' + str + '&t=' + (new Date()).getTime();
31 }; 31 };
32 32
33 export default context => { 33 export default context => {
  1 +<template>
  2 + <div>address</div>
  3 +</template>
  4 +
  5 +<script>
  6 +export default {
  7 + name: 'OrderAddress'
  8 +}
  9 +</script>
  10 +
  11 +<style lang="scss" scoped>
  12 +
  13 +</style>
  1 +<template>
  2 + <div class='btn' @click="onClick">
  3 + </div>
  4 +</template>
  5 +
  6 +<script>
  7 +export default {
  8 + name: "OrderButton",
  9 + props: {
  10 + txt: {
  11 + type: String,
  12 + }
  13 + },
  14 + methods: {
  15 + onClick() {
  16 + this.$emit('on-click');
  17 + }
  18 + }
  19 +};
  20 +</script>
  21 +
  22 +<style lang="scss" scoped>
  23 +.btn {
  24 + width: 100%;
  25 + height: 120px;
  26 + font-size: 28px;
  27 + background: #ccc;
  28 +
  29 + .active {
  30 + background: #002b47;
  31 + }
  32 +}
  33 +</style>
  1 +<template>
  2 + <div>product info</div>
  3 +</template>
  4 +
  5 +<script>
  6 +export default {
  7 + name: 'OrderProductInfo'
  8 +}
  9 +</script>
  10 +
  11 +<style lang="scss" scoped>
  12 +
  13 +</style>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <script> 8 <script>
9 import {createNamespacedHelpers} from 'vuex'; 9 import {createNamespacedHelpers} from 'vuex';
10 10
11 -const {mapState} = createNamespacedHelpers('gain'); 11 +const {mapState} = createNamespacedHelpers('order');
12 12
13 export default { 13 export default {
14 computed: { 14 computed: {
@@ -11,7 +11,7 @@ import {createNamespacedHelpers} from 'vuex'; @@ -11,7 +11,7 @@ import {createNamespacedHelpers} from 'vuex';
11 import { get } from 'lodash'; 11 import { get } from 'lodash';
12 import Clipboard from 'clipboard'; 12 import Clipboard from 'clipboard';
13 13
14 -const {mapActions} = createNamespacedHelpers('gain'); 14 +const {mapActions} = createNamespacedHelpers('order');
15 15
16 export default { 16 export default {
17 name: 'GainFooter', 17 name: 'GainFooter',
@@ -50,7 +50,7 @@ import { Scroll } from 'cube-ui'; @@ -50,7 +50,7 @@ import { Scroll } from 'cube-ui';
50 import Banner from './banner'; 50 import Banner from './banner';
51 import { createNamespacedHelpers } from 'vuex'; 51 import { createNamespacedHelpers } from 'vuex';
52 52
53 -const { mapState, mapActions } = createNamespacedHelpers('gain'); 53 +const { mapState, mapActions } = createNamespacedHelpers('order');
54 54
55 export default { 55 export default {
56 data() { 56 data() {
  1 +<template>
  2 + <LayoutApp :show-back="true">
  3 + <div class="title">出售</div>
  4 + <ProductInfo></ProductInfo>
  5 +
  6 + <div>
  7 + <div>需支付保证金:¥0</div>
  8 + <div>所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</div>
  9 + </div>
  10 +
  11 + <div class="fee-detail">
  12 + <div></div>
  13 + <div></div>
  14 + <div></div>
  15 + </div>
  16 +
  17 + <AddressInfo></AddressInfo>
  18 +
  19 + </LayoutApp>
  20 +</template>
  21 +
  22 +<script>
  23 +
  24 +import ProductInfo from './components/confirm/product';
  25 +import AddressInfo from './components/confirm/address';
  26 +
  27 +export default {
  28 + name: 'OrderConfirm',
  29 + components: {
  30 + ProductInfo,
  31 + AddressInfo
  32 + },
  33 + data() {
  34 + return {};
  35 + }
  36 +};
  37 +</script>
  38 +
  39 +<style lang="scss" scoped>
  40 +.footer {
  41 + position: absolute;
  42 + bottom: 0;
  43 + width: 100%;
  44 + z-index: 100;
  45 +}
  46 +
  47 +.body {
  48 + height: 100%;
  49 + overflow-y: auto;
  50 +}
  51 +</style>
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 </template> 8 </template>
9 9
10 <script> 10 <script>
11 -import Footer from './components/footer';  
12 -import List from './components/list'; 11 +import Footer from './components/detail/footer';
  12 +import List from './components/detail/list';
13 13
14 export default { 14 export default {
15 components: { 15 components: {
1 export default [{ 1 export default [{
2 - name: 'GainShow',  
3 - path: '/xianyu/order/show.html',  
4 - component: () => import(/* webpackChunkName: "gain" */ './order') 2 + name: 'OrderDetail',
  3 + path: '/xianyu/order/detail.html',
  4 + component: () => import(/* webpackChunkName: "order" */ './detail')
  5 +}, {
  6 + name: 'OrderConfirm',
  7 + path: '/xianyu/order/confirm.html',
  8 + component: () => import(/* webpackChunkName: "order" */ './confirm')
5 }]; 9 }];
  1 +const routers = [
  2 + // 买家订单
  3 + {
  4 + name: 'BuyerOrderList',
  5 + path: '/xianyu/buyer/order/list',
  6 + component: () => import('./order-list.vue'),
  7 + },
  8 +];
  9 +
  10 +export default routers;
  1 +<template> </template>
  2 +
  3 +<script>
  4 +import { Button } from "cube-ui";
  5 +
  6 +export default {
  7 + components: {
  8 + Button
  9 + }
  10 +};
  11 +</script>
  12 +<style lang="sass" scoped>
  13 +
  14 +</style>
1 import Vue from 'vue'; 1 import Vue from 'vue';
2 import Vuex from 'vuex'; 2 import Vuex from 'vuex';
3 -import {createApi} from 'create-api'; 3 +import { createApi } from 'create-api';
4 import storeYoho from './yoho'; 4 import storeYoho from './yoho';
5 -import storeOrder from './order'; 5 +import storeOrder, { buyerOderList } from './order';
6 import storeList from './list'; 6 import storeList from './list';
7 import storeProduct from './product'; 7 import storeProduct from './product';
8 import storeHome from './home'; 8 import storeHome from './home';
@@ -17,9 +17,12 @@ export function createStore(context) { @@ -17,9 +17,12 @@ export function createStore(context) {
17 order: storeOrder(), 17 order: storeOrder(),
18 list: storeList(), 18 list: storeList(),
19 produt: storeProduct(), 19 produt: storeProduct(),
20 - home: storeHome() 20 + home: storeHome(),
  21 +
  22 + // 买家订单列表
  23 + buyerOderList: buyerOderList(),
21 }, 24 },
22 - strict: process.env.NODE_ENV !== 'production' 25 + strict: process.env.NODE_ENV !== 'production',
23 }); 26 });
24 27
25 const api = createApi(context, store); 28 const api = createApi(context, store);
1 import { get } from 'lodash'; 1 import { get } from 'lodash';
2 import { getImgUrl } from '../../common/utils'; 2 import { getImgUrl } from '../../common/utils';
  3 +export { default as buyerOderList } from './order-list';
3 4
4 export default function() { 5 export default function() {
5 return { 6 return {
@@ -8,7 +9,7 @@ export default function() { @@ -8,7 +9,7 @@ export default function() {
8 list: [], 9 list: [],
9 resource: '', 10 resource: '',
10 page: 1, 11 page: 1,
11 - size: 10 12 + size: 10,
12 }, 13 },
13 mutations: { 14 mutations: {
14 addList(state, { list }) { 15 addList(state, { list }) {
@@ -19,7 +20,7 @@ export default function() { @@ -19,7 +20,7 @@ export default function() {
19 }, 20 },
20 changePage(state, { page }) { 21 changePage(state, { page }) {
21 state.page = page; 22 state.page = page;
22 - } 23 + },
23 }, 24 },
24 actions: { 25 actions: {
25 async fetchList({ commit, state }) { 26 async fetchList({ commit, state }) {
@@ -27,7 +28,7 @@ export default function() { @@ -27,7 +28,7 @@ export default function() {
27 28
28 const result = await this.$api.get('/api/union/inviteList', { 29 const result = await this.$api.get('/api/union/inviteList', {
29 page: page, 30 page: page,
30 - size: state.size 31 + size: state.size,
31 }); 32 });
32 33
33 if (result.code === 200) { 34 if (result.code === 200) {
@@ -38,16 +39,20 @@ export default function() { @@ -38,16 +39,20 @@ export default function() {
38 return result.data ? result.data.length : 0; 39 return result.data ? result.data.length : 0;
39 }, 40 },
40 async fetchResource({ commit }) { 41 async fetchResource({ commit }) {
41 - const result = await this.$api.get('/api/yoho/resource', { content_code: 'a51c8222d21b3d88faa4a49c01c9c93e' }); 42 + const result = await this.$api.get('/api/yoho/resource', {
  43 + content_code: 'a51c8222d21b3d88faa4a49c01c9c93e',
  44 + });
42 45
43 - commit('addResource', { url: getImgUrl(get(result, 'data[0].data.src') || '', 1000, 1000) }); 46 + commit('addResource', {
  47 + url: getImgUrl(get(result, 'data[0].data.src') || '', 1000, 1000),
  48 + });
44 }, 49 },
45 50
46 async fetchUnionStatus() { 51 async fetchUnionStatus() {
47 const result = await this.$api.get('/api/union/queryUnion'); 52 const result = await this.$api.get('/api/union/queryUnion');
48 53
49 return result; 54 return result;
50 - } 55 + },
51 }, 56 },
52 }; 57 };
53 } 58 }
  1 +// 订单来源, 接口对应查询参数: tabType
  2 +export const ownType = {
  3 + BUY: 'buy', // 买家
  4 + SELL: 'sell', // 卖家
  5 +};
  6 +
  7 +// 卖家订单状态, 接口对应查询参数: type
  8 +export const sellerOrderStatus = {
  9 + IN_SALE: 1, // 出售中
  10 + TO_BE_DELIVERED: 2, // 待发货
  11 + SHIPPED: 3, // 已发货
  12 + DONE: 5, // 交易完成
  13 + FAILED: 6, // 交易失败
  14 +};
  15 +
  16 +// 买家订单状态,接口对应查询参数: type
  17 +export const buyerOrderStatus = {
  18 + UNPAID: 2, // 未付款
  19 + TO_BE_DELIVERED: 3, // 待发货
  20 + PENDING_RECEIPT: 4, // 待收货
  21 + DONE: 5, // 交易成功
  22 + FAILED: 6, // 交易失败
  23 +};
  1 +export default function() {
  2 + return {
  3 + namespaced: true,
  4 + state: {},
  5 + mutations: {},
  6 + actions: {},
  7 + getters: {},
  8 + };
  9 +}
@@ -19,7 +19,7 @@ const webpackConfig = { @@ -19,7 +19,7 @@ const webpackConfig = {
19 filename: 'static/js/[name].[chunkhash].js', 19 filename: 'static/js/[name].[chunkhash].js',
20 path: distDir, 20 path: distDir,
21 chunkFilename: 'static/js/[name].[chunkhash].js', 21 chunkFilename: 'static/js/[name].[chunkhash].js',
22 - publicPath: isProd ? '//cdn.yoho.cn/ufo-app-web/' : '/' 22 + publicPath: isProd ? '//cdn.yoho.cn/xianyu-ufo-app-web/' : '/'
23 }, 23 },
24 resolve: { 24 resolve: {
25 extensions: ['.js', '.vue', '.json'], 25 extensions: ['.js', '.vue', '.json'],
@@ -194,7 +194,7 @@ if (isProduction) { @@ -194,7 +194,7 @@ if (isProduction) {
194 infoFile: { 194 infoFile: {
195 name: 'info', 195 name: 'info',
196 level: 'info', 196 level: 'info',
197 - filename: '/Data/logs/ufo-app-web/info/info.log', 197 + filename: '/Data/logs/xianyu-ufo-app-web/info/info.log',
198 maxFiles: 1, 198 maxFiles: 1,
199 tailable: true, 199 tailable: true,
200 maxsize: Math.pow(1024, 3), 200 maxsize: Math.pow(1024, 3),
@@ -206,7 +206,7 @@ if (isProduction) { @@ -206,7 +206,7 @@ if (isProduction) {
206 errorFile: { 206 errorFile: {
207 name: 'error', 207 name: 'error',
208 level: 'error', 208 level: 'error',
209 - filename: '/Data/logs/ufo-app-web/error/error.log', 209 + filename: '/Data/logs/xianyu-ufo-app-web/error/error.log',
210 maxFiles: 1, 210 maxFiles: 1,
211 tailable: true, 211 tailable: true,
212 maxsize: Math.pow(1024, 3), 212 maxsize: Math.pow(1024, 3),
@@ -251,7 +251,7 @@ if (isProduction) { @@ -251,7 +251,7 @@ if (isProduction) {
251 infoFile: { 251 infoFile: {
252 name: 'info', 252 name: 'info',
253 level: 'debug', 253 level: 'debug',
254 - filename: '/Data/logs/ufo-app-web/info/info.log', 254 + filename: '/Data/logs/xianyu-ufo-app-web/info/info.log',
255 maxFiles: 1, 255 maxFiles: 1,
256 tailable: true, 256 tailable: true,
257 maxsize: Math.pow(1024, 3), 257 maxsize: Math.pow(1024, 3),
@@ -262,7 +262,7 @@ if (isProduction) { @@ -262,7 +262,7 @@ if (isProduction) {
262 errorFile: { 262 errorFile: {
263 name: 'error', 263 name: 'error',
264 level: 'error', 264 level: 'error',
265 - filename: '/Data/logs/ufo-app-web/error/error.log', 265 + filename: '/Data/logs/xianyu-ufo-app-web/error/error.log',
266 maxFiles: 1, 266 maxFiles: 1,
267 tailable: true, 267 tailable: true,
268 maxsize: Math.pow(1024, 3), 268 maxsize: Math.pow(1024, 3),
@@ -2,31 +2,44 @@ module.exports = { @@ -2,31 +2,44 @@ module.exports = {
2 '/api/ufo/invite/friendList': { 2 '/api/ufo/invite/friendList': {
3 ufo: true, 3 ufo: true,
4 api: 'ufo.invite.code', 4 api: 'ufo.invite.code',
5 - params: {  
6 - } 5 + params: {},
7 }, 6 },
8 '/api/ufo/invite/recordDetailList': { 7 '/api/ufo/invite/recordDetailList': {
9 ufo: true, 8 ufo: true,
10 api: 'ufo.invite.getInviteSettlementItemList', 9 api: 'ufo.invite.getInviteSettlementItemList',
11 - params: {  
12 - } 10 + params: {},
13 }, 11 },
14 '/api/yoho/resource': { 12 '/api/yoho/resource': {
15 service: true, 13 service: true,
16 api: 'operations/api/v5/resource/get', 14 api: 'operations/api/v5/resource/get',
17 params: { 15 params: {
18 - content_code: {type: String}  
19 - } 16 + content_code: { type: String },
  17 + },
20 }, 18 },
21 '/api/union/inviteList': { 19 '/api/union/inviteList': {
22 api: 'app.union.shareOrder.queryInviteYohoList', 20 api: 'app.union.shareOrder.queryInviteYohoList',
23 params: { 21 params: {
24 - page: {type: Number},  
25 - size: {type: Number}  
26 - } 22 + page: { type: Number },
  23 + size: { type: Number },
  24 + },
27 }, 25 },
28 '/api/union/queryUnion': { 26 '/api/union/queryUnion': {
29 api: 'app.union.shareOrder.queryUnionTypeByUid', 27 api: 'app.union.shareOrder.queryUnionTypeByUid',
30 - params: {}  
31 - } 28 + params: {},
  29 + },
  30 +
  31 + // 订单列表查询
  32 + '/order/list': {
  33 + ufo: true,
  34 + api: 'ufo.order.list',
  35 +
  36 + // 类型定义
  37 + params: {
  38 + limit: { type: Number, require: true }, // page size
  39 + page: { type: Number, require: true }, // page number
  40 + uid: { type: String, require: true },
  41 + type: { type: Number, require: true }, // 订单类型
  42 + tabType: { type: Number, require: true }, // 订单来源
  43 + },
  44 + },
32 }; 45 };
@@ -36,7 +36,7 @@ exports.createApp = async(app) => { @@ -36,7 +36,7 @@ exports.createApp = async(app) => {
36 }); 36 });
37 } 37 }
38 38
39 - app.use('/mapp/node/status.html', (req, res) => { 39 + app.use('/xianyu/node/status.html', (req, res) => {
40 res.status(200).end(); 40 res.status(200).end();
41 }); 41 });
42 42
1 { 1 {
2 "name": "xianyu-ufo-app-web", 2 "name": "xianyu-ufo-app-web",
3 - "version": "0.0.1", 3 + "version": "0.0.2beta1",
4 "private": true, 4 "private": true,
5 "description": "Xianyu Project With Express", 5 "description": "Xianyu Project With Express",
6 "repository": { 6 "repository": {
1 { 1 {
2 "apps": [ 2 "apps": [
3 { 3 {
4 - "name": "ufo-app-web", 4 + "name": "xianyu-ufo-app-web",
5 "script": "app.js", 5 "script": "app.js",
6 "instances": "1", 6 "instances": "1",
7 "exec_mode": "cluster", 7 "exec_mode": "cluster",