Authored by htoooth

Merge branch 'feature/ufo' of http://git.yoho.cn/fe/yoho-app-web into feature/ufo

... ... @@ -6,26 +6,23 @@
# nginx version: 1.12.0
############################################################
#base image : ccr.ccs.tencentyun.com/yoho-base/nodejs:8.9.1
FROM ccr.ccs.tencentyun.com/yoho-base/nodejs:8.9.1
#base image : ccr.ccs.tencentyun.com/yoho-base/node
FROM ccr.ccs.tencentyun.com/yoho-base/node:10.4.1-alpine
MAINTAINER feng.chen <feng.chen@yoho.cn>
ENV NODE_ENV=production \
NODE_HOME=/home
COPY yoho-blk-wap.tar.gz /home
NODE_HOME=/home
RUN cd /home && \
mkdir -p /home/yoho-blk-wap && \
mkdir -p /Data/log/yoho-blk-wap && \
mkdir -p /Data/log/yohoblk-wap && \
tar -xzvf yoho-blk-wap.tar.gz -C /home/yoho-blk-wap && \
rm -rf yoho-blk-wap.tar.gz
mkdir -p /home/yoho-app
COPY . /home/yoho-app
WORKDIR /home/yoho-blk-wap
WORKDIR /home/yoho-app
#expose port
EXPOSE 6004
EXPOSE 6001
CMD ["node","/home/yoho-blk-wap/app.js"]
CMD ["node","/home/yoho-app/app.js"]
... ...
... ... @@ -23,11 +23,10 @@
</template>
<script>
import {debounce} from 'lodash';
import {debounce, get} from 'lodash';
import InputUfo from '../../components/input-ufo';
import Modal from '../../components/modal.vue';
import {createNamespacedHelpers} from 'vuex';
import {get} from 'lodash';
const {mapActions} = createNamespacedHelpers('ufo/order');
... ... @@ -108,14 +107,14 @@ export default {
this.errorTip = '价格只能为正整数';
} else if (!/9$/.test(price)) {
this.errorTip = '出售价格必须以9结尾';
} else if (price < this.skc.minPrice) {
} else if (this.skc.minPrice && price < this.skc.minPrice) {
this.errorTip = '您的出价过低';
} else if (price > this.skc.maxPrice) {
} else if (this.skc.maxPrice && price > this.skc.maxPrice) {
this.errorTip = '您的出价格过高';
} else if (price === this.skc.price) {
this.errorTip = '前后价格没有变化';
} else if (price === this.skc.price) {
this.errorTip = '前后价格没有变化'; //TODO
} else if (this.skc.suggestMaxPrice && price > this.skc.suggestMaxPrice) {
this.errorTip = '超出建议价将被限制展示,建议下调至合理价格区间';
} else {
this.errorTip = '';
valid = true;
... ...
<template>
<div class="product-group">
<ProductItem
v-for="skc in skcs"
:key="skc.goodsInfo.storageId"
v-for="(skc, i) in skcs"
:key="i"
:value="skc"
:slideValue="slideSkc"
@on-change-price="onChangePrice"
... ... @@ -39,7 +39,6 @@ export default {
this.slideSkc = val;
},
reset() {
console.log('this.slideSkc')
this.slideSkc = {};
}
},
... ...
export default [{
path: '/order/ufo/:orderId(\\d+)',
path: '/mapp/order/ufo/:orderId(\\d+).html',
name: 'order',
component: () => import(/* webpackChunkName: "order" */ './order')
}];
... ...
... ... @@ -5,9 +5,6 @@ const path = require('path');
const webpack = require('webpack');
const clientConfig = require('./webpack.client.conf');
const serverConfig = require('./webpack.server.conf');
const pkg = require('../package.json');
const distDir = path.join(__dirname, `../dist/${pkg.name}`);
rm(path.join(clientConfig.output.path), err => {
if (err) {
... ...
... ... @@ -14,7 +14,7 @@ const webpackConfig = {
filename: 'static/js/[name].[chunkhash].js',
path: distDir,
chunkFilename: 'static/js/[name].[chunkhash].js',
publicPath: '/'
publicPath: isProd ? '//cdn.yoho.cn/yoho-app/' : '/'
},
resolve: {
extensions: ['.js', '.vue', '.json'],
... ...
module.exports = [
{
route: /channel/,
cache: true
},
{
route: /order\/ufo/,
cache: true,
cackeKey: '$url$params',
cacheTime: 10
route: /mapp\/order\/ufo\/\d+\.html/,
},
{
route: /mapp\/coupon\/ufo/,
... ...
#!/bin/bash
wordir=$2
wordir=$1
cd $wordir
rm -rf yoho-blk-wap.tar.gz
yarn
if [[ $1 == "TEST1" ]] || [[ $1 == "TEST2" ]] || [[ $1 == "TEST3" ]]
then
yarn --production=false
yarn build
fi
tar -czvf yoho-blk-wap.tar.gz *
yarn build:node
/usr/local/bin/node-prune ./dist/node/node_modules
... ...
{
"name": "yoho-app",
"version": "2.0.50",
"version": "1.0.1",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -24,6 +24,10 @@
"cube-ui": {
"transform": "cube-ui/src/modules/${member}",
"kebabCase": true
},
"lodash": {
"transform": "lodash/${member}",
"kebabCase": true
}
},
"dependencies": {
... ...