Authored by baoss

fix conflict

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