Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
baoss
5 years ago
Commit
683537d9f8ff7191e36e5b6ebeae949d97a864ae
2 parents
c856dd5b
3ca0b804
Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
450 additions
and
289 deletions
apps/components/layout/layout-app.vue
apps/components/layout/layout-link.vue
apps/components/order-pay-type/pay-type.vue
apps/index.html
apps/pages/category/category.vue
apps/pages/home/channel/channel.vue
apps/pages/home/channel/components/banner.vue
apps/pages/home/channel/components/hot.vue
apps/pages/home/channel/components/slider.vue
apps/pages/home/channel/components/swiper.vue
apps/pages/home/channel/components/twoBanner.vue
apps/pages/home/coupon/list.vue
apps/pages/home/favorite/favorite.vue
apps/pages/home/indexPage/index-page.vue
apps/pages/list/list.vue
apps/pages/order/buyer-ask-order.vue
apps/pages/order/buyer-confirm.vue
apps/pages/order/components/confirm/buyer-order-footer.vue
apps/pages/order/mixin/order-action.js
apps/pages/order/mixin/order-in-sale-action.js
apps/pages/order/price-change/entry-detail.vue
apps/pages/order/price-change/no-entry-detail.vue
apps/pages/order/seller-confirm.vue
apps/pages/product/product-detail.vue
apps/store/category/index.js
apps/store/home/channel.js
apps/store/home/favorite.js
apps/store/yoho/index.js
doraemon/models/passport.js
package.json
utils/check-params.js
apps/components/layout/layout-app.vue
View file @
683537d
<template>
<div ref="layout" class="layout"
@touchstart="webviewScrollStart" @touchmove="webviewScrollMove" @touchend="webviewScrollEnd"
>
<div ref="layout" class="layout">
<slot name="header">
<LayoutHeader
v-if="!hideHeader"
...
...
@@ -19,7 +19,7 @@
<script>
export default {
name:
"LayoutApp"
,
name:
'LayoutApp'
,
props: {
title: String,
opacity: {
...
...
@@ -65,7 +65,10 @@ export default {
this.touchMoveY = e.changedTouches[0].pageY;
if (scrollTop <= 0 && this.touchMoveY > this.touchStartY) {
e.stopPropagation();
e.preventDefault();
}
}
},
...
...
apps/components/layout/layout-link.vue
View file @
683537d
...
...
@@ -11,12 +11,13 @@ export default {
href: String,
report: {
type: Object,
}
},
reportEvent: String,
},
watch: {
'report': function(newVal) {
// console.log(newVal);
}
}
,
},
// activated() {
// console.log(this.report);
...
...
@@ -24,6 +25,13 @@ export default {
// },
methods: {
jumpTo() {
this.$store.dispatch('reportYas', {
params: {
appop: this.reportEvent,
param:this.report
}
});
if (!this.href) {
return;
}
...
...
apps/components/order-pay-type/pay-type.vue
View file @
683537d
...
...
@@ -73,10 +73,16 @@ export default {
payment_id: 1,
pay_name: '支付宝'
}]
}
},
page: null,
};
},
async mounted() {
this.pay();
if (this.extra) {
this.page = JSON.parse(this.extra);
}
},
methods: {
...mapOrderAction(['payAction']),
...
...
@@ -119,7 +125,7 @@ export default {
//数据埋点
this.$store.dispatch('reportYas', {
params: {
appop:
'XY_UFO_SC_PAY'
,
appop:
this.appOp().pay
,
param: {
ORD_NUM: this.orderCode,
PAY_TYPE: 1
...
...
@@ -138,7 +144,7 @@ export default {
//数据埋点
this.$store.dispatch('reportYas', {
params: {
appop:
'XY_UFO_SC_PAY_RES'
,
appop:
this.appOp().result
,
param: {
ORD_NUM: this.orderCode,
PAY_TYPE: 1, //1支付宝支付,2微信支付
...
...
@@ -156,7 +162,7 @@ export default {
//数据埋点
this.$store.dispatch('reportYas', {
params: {
appop:
'XY_UFO_SC_PAY'
,
appop:
this.appOp().result
,
param: {
ORD_NUM: this.orderCode,
PAY_TYPE: 1,
...
...
@@ -166,7 +172,6 @@ export default {
},
});
this.$router.replace({
name: 'OrderPay',
query: {
...
...
@@ -200,6 +205,36 @@ export default {
// }
// });
// }
},
appOp() {
switch (this.page.reportType) {
case 'sell': {
return {
pay: 'XY_UFO_SALE_PAY',
result: 'XY_UFO_SALE_PAY_RES'
};
}
case 'buy': {
return {
pay: 'XY_UFO_SC_PAY',
result: 'XY_UFO_SC_PAY_RES'
};
}
case 'qiugou_buy': {
return {
pay: 'XY_UFO_WTBUY_PAY',
result: 'XY_UFO_WTBUY_PAY_RES'
};
}
default: {
// PASS
return {
pay: 'XY_UFO_SALE_PAY',
result: 'XY_UFO_SALE_PAY_RES'
};
}
}
}
}
};
...
...
@@ -207,7 +242,7 @@ export default {
<style lang="scss" scoped>
.pay-type-wrapper {
height:
714px
;
height:
0
;
background: white;
position: relative;
border-top-left-radius: 32px 32px;
...
...
apps/index.html
View file @
683537d
...
...
@@ -169,6 +169,8 @@
});
}
})();
window
.
appBaseLogs
=
{
events
:
[{}]};
</script>
</body>
</html>
...
...
apps/pages/category/category.vue
View file @
683537d
...
...
@@ -18,15 +18,19 @@
</Scroll>
</div>
<div class="right-content">
<Scroll>
<Scroll ref="subScroll"
:scroll-events="scrollEvents"
@scroll-end="onScrollEndHandler"
>
<div v-for="(itemSub, index) in categorySubList" :key="index">
<CategoryTitle>{{itemSub.name}}</CategoryTitle>
<div class="category-sub-root" :class="'sub-type-' + itemSub.type">
<div class="item-div"
v-for="(item, index) in itemSub.sub"
:key="index"
:data-id="item.id">
<LayoutLink :href="item.url">
:data-id="item.id"
ref="index">
<LayoutLink :href="item.url" >
<div class="item-imge-div" @click="goProductList(item,index, itemSub)">
<ImgSize
class="item-imge"
...
...
@@ -65,28 +69,75 @@ export default {
},
data() {
return {
scrollEvents: ['scroll-end'],
sortItem:{
id:'-1',
name:'brand',
index: 0
}
};
},
mounted() {
this.fetchCategoryParentList();
let categorySubResult = this.fetchBrandList({});
// this.reportPaser(categorySubResult);
// console.log('categorySubList')
// console.log(...categorySubResult)
this.fetchBrandList({});
},
activated(){
this.reportYas(0);
},
methods: {
...mapActions(['fetchCategoryParentList', 'selectCategoryParent', 'fetchBrandList', 'fetchCategorySubList']),
onScrollEndHandler({y}) {
let scrollHeight = Math.abs(y)
this.reportYas(scrollHeight);
},
reportYas(scrollY) {
let scrollHeight = this.$refs.subScroll.$el.offsetHeight; // 滚动区高度
let reportParams = [];
this.categorySubList.forEach((item) => {
let subItemList = item.sub;
// console.log('item'+scrollY)
// console.log(item)
subItemList.forEach((val, index) => {
let eleTop = this.$refs.index[index].offsetTop;
let eleHeight = this.$refs.index[index].offsetHeight;
// console.log(eleHeight+'item'+scrollY)
let firstHeight = 0;
if(scrollY > eleHeight){
firstHeight = scrollY - eleHeight;
}
let lastViewHeight = scrollHeight + scrollY;
// console.log("firstHeight:"+firstHeight+'==scrollHeight='+scrollHeight+"==eleTop=="+eleTop+"==lastViewHeight="+lastViewHeight);
if(firstHeight < eleTop && scrollHeight + scrollY > eleTop){
let reportItem = {
CATE_ID: this.sortItem.id,
CATE_NM: this.sortItem.name,
CATE_INDEX: this.sortItem.index,
F_ID: item.id,
F_NAME: item.name,
F_INDEX: item.index,
I_INDEX: index,
TO_TYPE: val.linkType,
TO_ID: val.link,
};
// console.log(reportItem)
reportParams.push(reportItem)
}
});
});
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_SHOW_EVENT',
param: reportParams
}
});
},
onClick(item) {
if (!item.isSelect) {
this.sortItem = item;
let id = item.id;
let name = item.name;
// console.log('onClick==item')
// console.log(item)
this.$store.dispatch('reportYas', {
params: {
...
...
@@ -97,13 +148,13 @@ export default {
}
}
});
this.reportYas(scrollHeight);
let subList ;
if (id === '-1') {
subList = this.fetchBrandList({ id });
} else {
subList = this.fetchCategorySubList({ id, name });
}
// this.reportPaser(subList);
}
},
goProductList(item, index, itemSub) {
...
...
@@ -125,8 +176,8 @@ export default {
});
},
reportPaser(subList) {
console.log('reportPaser')
console.log(...subList);
// console.log('reportPaser')
// console.log(...subList);
if(subList && subList.length > 0){
let reportSub = [];
subList.forEach((val, index) => {
...
...
@@ -160,8 +211,11 @@ export default {
<style scoped>
.root-content {
width: 100%;
height: 100%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
flex-direction: row;
background-color: #FFFFFF;
...
...
apps/pages/home/channel/channel.vue
View file @
683537d
<template>
<LayoutApp class="yohoufo-channel-page" :show-back="true" :hide-header="hideHeader" :title="title">
<div class="fixed-nav scroll-nav-wrap
-fix
" v-if="isShow && navList.length">
<div class="fixed-nav scroll-nav-wrap" v-if="isShow && navList.length">
<ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav>
</div>
<Scroll
ref="scroll"
class="channel-scroll"
:scroll-events="scrollEvents"
@scroll="scrollHandler"
@scroll-end="scrollEndHandler"
...
...
@@ -307,7 +308,7 @@ export default {
page,
pageSize
});
let {data} = result;
if (result.code === 200) {
...
...
@@ -384,27 +385,18 @@ export default {
background-color: #fefefe;
overflow: hidden;
}
}
.scroll-nav-wrap-fix {
position: relative;
&:after {
content: "";
position: absolute;
width: 100%;
height: 100px;
box-shadow: 0 0 120px 100px white !important;
z-index: -1;
&.fixed-nav:after {
display: none;
}
}
&.fixed-nav {
width: 100%;
position: absolute;
z-index: 10;
background-color: white;
overflow: hidden;
}
.channel-scroll {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.channel-body {
...
...
apps/pages/home/channel/components/banner.vue
View file @
683537d
...
...
@@ -2,7 +2,7 @@
<div class="banner" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index">
<LayoutLink :href="item.url" :report="{PAGE_URL, ...item.reportParams}">
<LayoutLink :href="item.url" :report="{PAGE_URL, ...item.reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<ImageFormat :data-secc="item.src" :lazy="false" :src="item.src" :alt="item.alt" :width="item.width || 750" :height="item.height || 160" />
</LayoutLink>
</li>
...
...
apps/pages/home/channel/components/hot.vue
View file @
683537d
...
...
@@ -2,7 +2,7 @@
<div class="hot" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index">
<LayoutLink :href="item.url" class="img-link" :report="{PAGE_URL, ...item.reportParams}">
<LayoutLink :href="item.url" class="img-link" :report="{PAGE_URL, ...item.reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<div class="hot-image">
<ImageFormat :lazy="false" class="item-imge" :src="item.src" :alt="item.alt" :width="100" :height="100"></ImageFormat>
</div>
...
...
apps/pages/home/channel/components/slider.vue
View file @
683537d
...
...
@@ -38,7 +38,7 @@ export default {
},
methods: {
clickHandler(item) {
console.log(item);
//
console.log(item);
}
}
};
...
...
apps/pages/home/channel/components/swiper.vue
View file @
683537d
<template>
<div class="swiper" v-if="list && list.length > 0">
<div class="swiper-item swiper-item-left">
<LayoutLink :href="list[0].url" class="img-link" :report="{PAGE_URL, ...list[0].reportParams}">
<LayoutLink :href="list[0].url" class="img-link" :report="{PAGE_URL, ...list[0].reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<ImageFormat :lazy="false" class="item-imge" :src="list[0].src" :width="310" :height="402"></ImageFormat>
</LayoutLink>
</div>
<div class="swiper-item swiper-item-right">
<LayoutLink :href="list[1].url" class="img-link" :report="{PAGE_URL, ...list[1].reportParams}">
<LayoutLink :href="list[1].url" class="img-link" :report="{PAGE_URL, ...list[1].reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<ImageFormat :lazy="false" class="item-imge" :src="list[1].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
<LayoutLink :href="list[2].url" class="img-link" :report="{PAGE_URL, ...list[2].reportParams}">
<LayoutLink :href="list[2].url" class="img-link" :report="{PAGE_URL, ...list[2].reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<ImageFormat :lazy="false" class="item-imge" :src="list[2].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
</div>
...
...
@@ -33,7 +33,7 @@ export default {
}
},
mounted() {
console.log(this.list)
//
console.log(this.list)
},
methods: {
...
...
apps/pages/home/channel/components/twoBanner.vue
View file @
683537d
...
...
@@ -2,7 +2,7 @@
<div class="twoBanner" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index">
<LayoutLink :href="item.url" :report="{PAGE_URL, ...item.reportParams}">
<LayoutLink :href="item.url" :report="{PAGE_URL, ...item.reportParams}"
reportEvent="XY_UFO_MAIN_EVENT"
>
<ImageFormat :lazy="false" :src="item.src" :alt="item.alt" :width="344" :height="160" />
</LayoutLink>
</li>
...
...
apps/pages/home/coupon/list.vue
View file @
683537d
...
...
@@ -11,7 +11,8 @@
@click="onChangeList('overtime')">已失效{{overtime.total && '('+ overtime.total + ')' || null}}
</div>
</div>
<Scroll class="coupon-list"
<Scroll ref="couponlist"
class="coupon-list"
:options="scrollOptions"
:data="list"
@pulling-up="onPullingUp" v-show="!showEmpty">
...
...
@@ -102,6 +103,7 @@ export default {
// 切换list
this.list = this[type].list;
this.showEmpty = this[type].isEmpty;
this.$refs.couponlist.scrollTo(0, 0);
},
handleShowNotice(item, index) {
...
...
@@ -122,7 +124,8 @@ export default {
return this.$router.push({
name: 'List',
query: {
coupon_token
coupon_token,
type: 8
}
});
}
...
...
apps/pages/home/favorite/favorite.vue
View file @
683537d
...
...
@@ -63,7 +63,6 @@ export default {
// this.fetchFavoriteList();
// },
activated() {
console.log("favorite====activated");
let params = {
isReset: true
};
...
...
apps/pages/home/indexPage/index-page.vue
View file @
683537d
...
...
@@ -76,7 +76,11 @@ export default {
.body {
display: flex;
flex-direction: column;
height: 100%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.content {
...
...
apps/pages/list/list.vue
View file @
683537d
...
...
@@ -57,7 +57,8 @@ export default {
top: false
},
pullUpLoad: true,
pullDownRefresh: false
pullDownRefresh: false,
useTransition: false,
},
fixed: false,
selectedType: 2, // tab类型高亮
...
...
@@ -182,7 +183,8 @@ export default {
list.list && list.list.length ? list.isEmpty = false : list.isEmpty = true;
this.productList = list;
this.productList =Object.freeze(list);
}
},
...
...
apps/pages/order/buyer-ask-order.vue
View file @
683537d
...
...
@@ -213,11 +213,11 @@ export default {
]),
onTextChange: debounce(function() {
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
this.showBuyDialog();
} else {
// if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
// this.showBuyDialog();
// } else {
this.computePrice();
}
//
}
}, 500, {leading: false, trailing: true}),
showToast() {
...
...
@@ -258,7 +258,7 @@ export default {
});
},
onCancel: () => {
this.computePrice();
//
this.computePrice();
}
}).show();
},
...
...
@@ -301,6 +301,11 @@ export default {
},
submitClick: debounce(function() {
if (this.originProductData.least_price && this.originProductData.skup && this.originProductData.least_price <= this.inputPrice) {
this.showBuyDialog();
return;
}
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
.then((res) => {
if (res && res.code == 200) {
...
...
@@ -668,4 +673,7 @@ export default {
border-top-left-radius: 15px !important;
border-top-right-radius: 15px !important;
}
.cube-input_active::after {
border-color: transparent!important; ;
}
</style>
...
...
apps/pages/order/buyer-confirm.vue
View file @
683537d
...
...
@@ -228,6 +228,7 @@ export default {
desc: '金额',
extra: JSON.stringify({
type: UserType.buy,
reportType: 'buy',
back: {
name: 'ProductDetail',
params: {
...
...
@@ -248,18 +249,13 @@ export default {
}).show();
//数据埋点
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_SC_ORD',
param: {
ORD_NUM: result.data.orderCode,
PRD_ID: this.productId,
PRD_SKU: this.productDetail.skup,
PRD_SIZE: this.productDetail.sizeName,
ORD_AMOUNT: this.orderDetail.amount,
PRD_PRICE: this.productDetail.goodPrice,
},
},
this.reportYas('XY_UFO_SC_ORD', {
ORD_NUM: result.data.orderCode,
PRD_ID: this.productId,
PRD_SKU: this.productDetail.skup,
PRD_SIZE: this.productDetail.sizeName,
ORD_AMOUNT: this.orderDetail.amount,
PRD_PRICE: this.productDetail.goodPrice,
});
},
onClose(orderCode) {
...
...
@@ -305,6 +301,14 @@ export default {
}
}
},
reportYas(name, params) {
this.$store.dispatch('reportYas', {
params: {
appop: name,
param: params
}
});
}
}
};
</script>
...
...
apps/pages/order/components/confirm/buyer-order-footer.vue
View file @
683537d
...
...
@@ -28,7 +28,7 @@ export default {
data() {
return {
desc: '有货买家协议',
url: 'https://activity.yoho.cn/feature/
3189.html?share_id=5853&title=ufo-%E4%B9%B0%E5%AE%B6%E5%8D%8F%E8%AE%AE
'
url: 'https://activity.yoho.cn/feature/
6775.html?nodownload=1
'
};
},
computed: {
...
...
apps/pages/order/mixin/order-action.js
View file @
683537d
...
...
@@ -133,12 +133,16 @@ export default {
orderCode
,
},
},
reportType
:
'buy'
,
}),
}).
show
();
break
;
}
case
orderActionsMap
.
PAY_DEPOSIT
.
name
:
{
// 是否是求购
const
isAskForBuy
=
status
===
7
;
this
.
$createOrderPayType
({
orderCode
,
price
:
parseFloat
(
bidDepositInfo
.
depositAmount
).
toFixed
(
2
),
...
...
@@ -150,6 +154,7 @@ export default {
owner
:
'buy'
,
},
},
reportType
:
isAskForBuy
?
'qiugou_buy'
:
'buy'
,
}),
}).
show
();
break
;
...
...
@@ -209,7 +214,11 @@ export default {
orderCode
,
onCloseAction
()
{},
onConfirmAction
:
async
price
=>
{
const
{
isOk
,
errMsg
=
''
,
bidData
}
=
await
that
.
confirmChangePrice
({
const
{
isOk
,
errMsg
=
''
,
bidData
,
}
=
await
that
.
confirmChangePrice
({
price
:
price
,
orderCode
,
});
...
...
@@ -225,17 +234,20 @@ export default {
name
:
isDetail
?
'buyOrderDetail'
:
'OrderList'
,
params
:
this
.
$route
.
params
,
},
reportType
:
'buy'
,
}),
}).
show
();
}
else
{
if
(
errMsg
)
{
that
.
$createToast
({
type
:
'alert'
,
txt
:
errMsg
,
}).
show
();
that
.
$createToast
({
type
:
'alert'
,
txt
:
errMsg
,
})
.
show
();
}
}
}
}
,
}).
show
();
break
;
}
...
...
apps/pages/order/mixin/order-in-sale-action.js
View file @
683537d
...
...
@@ -84,6 +84,7 @@ export default {
forward
:
{
name
:
pageBackName
,
},
reportType
:
'sell'
,
}),
}).
show
();
break
;
...
...
apps/pages/order/price-change/entry-detail.vue
View file @
683537d
...
...
@@ -83,6 +83,12 @@ export default {
computed: {
...mapState(['productInfo', 'skcs']),
},
beforeRouteLeave(from, to, next) {
console.log('from', from);
console.log('to', to);
this.$refs.modalPrice.hide();
next();
},
methods: {
...mapMutations(['MERGE_CHANGEPRICE_DATA']),
...mapActions(['fetchProduct', 'postNoSale', 'postChangePrice']),
...
...
apps/pages/order/price-change/no-entry-detail.vue
View file @
683537d
...
...
@@ -119,20 +119,20 @@
</template>
<script>
import LayoutApp from "../../../components/layout/layout-app";
import ScrollView from "../../../components/layout/scroll-view";
import ImgSize from "../../../components/img-size";
import { createNamespacedHelpers } from "vuex";
import InputUfo from "./components/input-ufo";
import { Checkbox } from "cube-ui";
import { get } from "lodash";
import Modal from "./components/modal";
import OrderCheck from "../components/confirm/agree";
const { mapState, mapActions } = createNamespacedHelpers("order/priceChange");
import LayoutApp from '../../../components/layout/layout-app';
import ScrollView from '../../../components/layout/scroll-view';
import ImgSize from '../../../components/img-size';
import { createNamespacedHelpers } from 'vuex';
import InputUfo from './components/input-ufo';
import { Checkbox } from 'cube-ui';
import { get } from 'lodash';
import Modal from './components/modal';
import OrderCheck from '../components/confirm/agree';
const { mapState, mapActions } = createNamespacedHelpers('order/priceChange');
// orderCode = 1233499619151
export default {
name:
"noEntryDetail"
,
name:
'noEntryDetail'
,
components: {
OrderCheck,
Modal,
...
...
@@ -144,36 +144,36 @@ export default {
},
data() {
return {
title:
"调价"
,
title:
'调价'
,
agreementURL:
"https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE"
,
'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE'
,
platformFeeModalVisible: false,
platformFee: {
amount: "-¥0",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
},
bankTransferFee: "-¥0",
income: "¥0",
errorTip: "",
chgPrice: "",
bankTransferFee: '-¥0',
income: '¥0',
errorTip: '',
chgPrice: '',
calced: false,
earnestMoney:
"¥0"
,
earnestMoney:
'¥0'
,
// 保证金
earnestPrice: 0,
isAgree: false,
labelOption: {
label:
"我已阅读并同意"
label:
'我已阅读并同意'
},
time: 15000,
isStopScrollPrevent: false // 是否停止layout阻止滚动事件
};
},
asyncData({ store, router }) {
return store.dispatch(
"order/priceChange/fetchOrder"
, {
return store.dispatch(
'order/priceChange/fetchOrder'
, {
orderCode: router.params.orderCode
});
},
...
...
@@ -182,7 +182,7 @@ export default {
// this.inputChange = debounce(this.onChange.bind(this), 500);
},
computed: {
...mapState([
"noEntryOrderInfo"
]),
...mapState([
'noEntryOrderInfo'
]),
goodsInfo() {
return this.noEntryOrderInfo.goodsInfo || {};
},
...
...
@@ -194,37 +194,41 @@ export default {
chgPrice() {
this.calced = false;
this.platformFee = {
amount: "-¥0",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
};
this.bankTransferFee = "-¥0";
this.income = "¥0";
this.earnestMoney = "¥0";
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.earnestMoney = '¥0';
this.earnestPrice = 0;
}
},
beforeRouteLeave(from, to, next) {
this.clearData();
next();
},
methods: {
...mapActions([
"fetchOrder",
"postNoEntryCalcPrice",
"postNoEntryChangePrice"
'fetchOrder',
'postNoEntryCalcPrice',
'postNoEntryChangePrice'
]),
checkPrice(price) {
let valid = false;
if (!price) {
this.errorTip =
"没有价格"
;
this.errorTip =
'没有价格'
;
return false;
} else if (!/^\d+$/.test(price)) {
this.errorTip =
"价格只能为正整数"
;
this.errorTip =
'价格只能为正整数'
;
} else if (!/9$/.test(price)) {
this.errorTip =
"出售价格必须以9结尾"
;
this.errorTip =
'出售价格必须以9结尾'
;
} else {
this.errorTip =
""
;
this.errorTip =
''
;
valid = true;
}
console.log(this.errorTip, valid);
...
...
@@ -234,15 +238,15 @@ export default {
// 点击提交按钮
if (this.isAgree && this.calced) {
this.$createDialog({
type: "confirm",
content: "重新出售后本次出售保证金原路返回",
type: 'confirm',
content: '重新出售后本次出售保证金原路返回',
confirmBtn: {
text:
"我再想想"
,
text:
'我再想想'
,
active: true,
disabled: false
},
cancelBtn: {
text:
"重新出售"
,
text:
'重新出售'
,
active: false,
disabled: false
},
...
...
@@ -265,11 +269,11 @@ export default {
console.log(result);
if (result && result.code === 200) {
this.platformFee = get(result, "data.platformFee", "");
this.bankTransferFee = get(result, "data.bankTransferFee", "");
this.income = "¥" + get(result, "data.income", "");
this.earnestMoney = "¥" + get(result, "data.earnestMoney", "");
this.earnestPrice = get(result, "data.earnestMoney", 0);
this.platformFee = get(result, 'data.platformFee', '');
this.bankTransferFee = get(result, 'data.bankTransferFee', '');
this.income = '¥' + get(result, 'data.income', '');
this.earnestMoney = '¥' + get(result, 'data.earnestMoney', '');
this.earnestPrice = get(result, 'data.earnestMoney', 0);
this.calced = true;
} else {
if (result.message) {
...
...
@@ -279,7 +283,7 @@ export default {
this.$createToast({
txt: this.errorTip,
type:
"txt"
type:
'txt'
}).show();
}
},
...
...
@@ -290,7 +294,7 @@ export default {
} else {
this.$createToast({
txt: this.errorTip,
type:
"txt"
type:
'txt'
}).show();
}
},
...
...
@@ -301,7 +305,7 @@ export default {
showEarnestQuestion() {
// 跳转保证金说明页
console.log(
"showEarnest"
);
console.log(
'showEarnest'
);
this.$xianyu.goXianyuNewPage({ url: this.agreementURL });
},
...
...
@@ -323,14 +327,14 @@ export default {
this.$createOrderPayType({
orderCode: result.data.orderCode,
price: parseFloat(`${earnestPrice}`).toFixed(2),
desc:
"保证金"
,
desc:
'保证金'
,
extra: JSON.stringify({
type:
"sell"
,
type:
'sell'
,
back: {
name:
"InSaleOrderList"
name:
'InSaleOrderList'
},
forward: {
name:
"SellPayOk"
,
name:
'SellPayOk'
,
query: {
orderCode: result.data.orderCode
}
...
...
@@ -339,9 +343,9 @@ export default {
onCloseAction() {
that.clearData();
that.$router.replace({
name:
"sellOrderDetail"
,
name:
'sellOrderDetail'
,
params: {
owner:
"sell"
,
owner:
'sell'
,
code: result.data.orderCode
}
});
...
...
@@ -349,8 +353,8 @@ export default {
}).show();
} else {
this.$createToast({
txt: result.message || "调价失败",
type: "txt"
txt: result.message || '调价失败',
type: 'txt'
}).show();
}
...
...
@@ -361,25 +365,26 @@ export default {
// console.log(this.$router);
this.platformFeeModalVisible = false;
this.platformFee = {
amount: "-¥0",
appraiseFee: "¥0.00",
packageFee: "¥0.00",
serviceFee: "¥0.00",
goodsPaymentRatePercent: "0.00%",
payChannelPercentage: "0.00%"
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
};
this.bankTransferFee = "-¥0";
this.income = "¥0";
this.errorTip = "";
this.chgPrice = "";
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.errorTip = '';
this.chgPrice = '';
this.calced = false;
this.earnestMoney =
"¥0"
;
this.earnestMoney =
'¥0'
;
this.isAgree = false;
},
checkScroll(e) {
if (e.currentTarget.scrollTop > 0) {
this.isStopScrollPrevent = true;
} else {
e.stopPropagation();
this.isStopScrollPrevent = false;
}
}
...
...
apps/pages/order/seller-confirm.vue
View file @
683537d
...
...
@@ -12,7 +12,7 @@
<OrderMargin class="order-item order-margin" :data="fee" :super-sell="superSell" :url="tipUrl"></OrderMargin>
<OrderFee class="order-item" :data="fee"></OrderFee>
<AddressInfo :data="address" class="order-item"></AddressInfo>
<!-- </Scroll>-->
<!-- </Scroll>-->
</div>
<div class="footer">
<OrderAgree
...
...
@@ -35,28 +35,28 @@
</template>
<script>
import ProductInfo from "./components/confirm/product";
import InputPrice from "./components/confirm/input-price";
import AddressInfo from "./components/confirm/address";
import TitleComp from "./components/confirm/title";
import OrderMargin from "./components/confirm/order-margin";
import OrderFee from "./components/confirm/order-fee";
import OrderAgree from "./components/confirm/agree";
import { Types, UserType } from "store/order/order-confirm";
import { Scroll } from "cube-ui";
import { get } from "lodash";
import { createNamespacedHelpers, mapState } from "vuex";
import ProductInfo from './components/confirm/product';
import InputPrice from './components/confirm/input-price';
import AddressInfo from './components/confirm/address';
import TitleComp from './components/confirm/title';
import OrderMargin from './components/confirm/order-margin';
import OrderFee from './components/confirm/order-fee';
import OrderAgree from './components/confirm/agree';
import { Types, UserType } from 'store/order/order-confirm';
import { Scroll } from 'cube-ui';
import { get } from 'lodash';
import { createNamespacedHelpers, mapState } from 'vuex';
const {
mapState: mapOrderState,
mapActions: mapOrderAction,
mapMutations: mapOrderMutations
} = createNamespacedHelpers(
"order/orderConfirm"
);
} = createNamespacedHelpers(
'order/orderConfirm'
);
export default {
name: "SellOrderConfirm",
props: ["productId", "storageId"],
name: 'SellOrderConfirm',
props: ['productId', 'storageId'],
components: {
Scroll,
ProductInfo,
...
...
@@ -69,11 +69,11 @@ export default {
},
data() {
return {
txt:
"提交"
,
txt:
'提交'
,
error: false,
agreeDesc:
"有货卖家协议"
,
agreeDesc:
'有货卖家协议'
,
url:
"https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE"
,
'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE'
,
superSell: false,
addNumError: false,
scrollOption: {
...
...
@@ -81,66 +81,66 @@ export default {
click: true
},
tipUrl:
"https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE"
'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE'
};
},
activated() {
this.fetchUserStatus().then(result => {
this.superSell = get(result,
"data.entrySellerType"
, 0) !== 0;
this.superSell = get(result,
'data.entrySellerType'
, 0) !== 0;
});
this.fetchOrderAddress({ tabType: UserType.sell });
this.$store.dispatch(
"product/getSelectedTradeProduct"
, {
this.$store.dispatch(
'product/getSelectedTradeProduct'
, {
productId: this.productId,
storageId: this.storageId
});
},
beforeRouteLeave(to, from, next) {
if (to.name !==
"address"
) {
if (to.name !==
'address'
) {
this[Types.CLEAR_SELL_STATUS]();
}
next();
},
computed: {
...mapOrderState([
"address", "fee", "price", "agree", "num"
]),
...mapOrderState([
'address', 'fee', 'price', 'agree', 'num'
]),
...mapState({
productDetail: state => {
const leastPrice = get(
state.product.selectedProductInfo,
"size.least_price"
,
'size.least_price'
,
0
);
const storageNum = get(
state.product.selectedProductInfo,
"size.storage_num"
,
'size.storage_num'
,
0
);
const suggestHighPrice = get(
state.product.selectedProductInfo,
"size.suggest_high_price"
,
'size.suggest_high_price'
,
0
);
const suggestLowPrice = get(
state.product.selectedProductInfo,
"size.suggest_low_price"
,
'size.suggest_low_price'
,
0
);
const bidPrice = get(
state.product.selectedProductInfo,
"size.bid_moster_price"
,
'size.bid_moster_price'
,
0
);
let priceType = "最低现货价:";
let goodPrice = "";
let priceBidType = "最高求购价:";
let goodBidPrice = "¥-";
let priceType = '最低现货价:';
let goodPrice = '';
let priceBidType = '最高求购价:';
let goodBidPrice = '¥-';
if (!storageNum) {
if (suggestHighPrice && suggestLowPrice) {
priceType =
"建议售价:"
;
priceType =
'建议售价:'
;
goodPrice = `¥${suggestLowPrice}-¥${suggestHighPrice}`;
} else {
goodPrice =
"¥-"
;
goodPrice =
'¥-'
;
}
} else {
goodPrice = `¥${leastPrice}`;
...
...
@@ -155,31 +155,31 @@ export default {
return {
goodImg: get(
state.product.selectedProductInfo,
"product.goods_list[0].image_list[0].image_url",
""
'product.goods_list[0].image_list[0].image_url',
''
),
productName: get(
state.product.selectedProductInfo,
"product.product_name",
""
'product.product_name',
''
),
productId: get(
state.product.selectedProductInfo,
"product.product_id",
""
'product.product_id',
''
),
colorName: get(
state.product.selectedProductInfo,
"product.goods_list[0].color_name",
""
'product.goods_list[0].color_name',
''
),
sizeName: get(
state.product.selectedProductInfo,
"size.size_name",
""
'size.size_name',
''
),
skup: get(state.product.selectedProductInfo, "size.skup", ""),
bidSkup: get(state.product.selectedProductInfo, "size.bid_skup", ""),
skup: get(state.product.selectedProductInfo, 'size.skup', ''),
bidSkup: get(state.product.selectedProductInfo, 'size.bid_skup', ''),
goodPrice,
priceType,
goodBidPrice,
...
...
@@ -194,11 +194,11 @@ export default {
},
methods: {
...mapOrderAction([
"fetchOrderAddress",
"fetchUserStatus",
"fetchOrderPrice",
"submitOrder",
"fetchPayList"
'fetchOrderAddress',
'fetchUserStatus',
'fetchOrderPrice',
'submitOrder',
'fetchPayList'
]),
...mapOrderMutations([
Types.CHANGE_PRICE,
...
...
@@ -211,50 +211,6 @@ export default {
this.submit();
},
compute() {
if (
this.productDetail.bidPrice &&
Number(this.price) > 0 &&
Number(this.price) <= this.productDetail.bidPrice
) {
this.$createDialog({
type: "confirm",
title: `最高求购价${this.productDetail.bidPrice}`,
content: "已有求购高于您的出价,可直接变现",
confirmBtn: {
text: "我再想想",
active: true,
disabled: false
},
cancelBtn: {
text: "确定变现",
active: false,
disabled: false
},
onCancel: () => {
this.$store.commit(
"order/sellerAskOrder/SELLER_ASK_SET_PRODUCTINFO",
{
goodImg: this.productDetail.goodImg,
colorName: this.productDetail.colorName,
sizeName: this.productDetail.sizeName,
goodPrice: this.productDetail.bidPrice,
productId: this.productDetail.productId,
bid_moster_price: this.productDetail.bidPrice
}
);
// 跳转变现
this.$router.push({
name: "sellAskOrder",
query: {
skup: this.productDetail.bidSkup,
price: this.productDetail.bidPrice
}
});
}
}).show();
return;
}
return this.fetchOrderPrice({
address_id: this.address?.address_id,
...
...
@@ -268,7 +224,7 @@ export default {
this.$createToast({
time: 1500,
txt: result.error,
type:
"txt"
type:
'txt'
}).show();
if (result.code === 438) {
...
...
@@ -288,8 +244,8 @@ export default {
if (!this.address) {
this.$createToast({
time: 1500,
txt: "请选择地址",
type: "txt"
txt: '请选择地址',
type: 'txt'
}).show();
return false;
}
...
...
@@ -300,18 +256,68 @@ export default {
this[Types.CHANGE_AGREE](val);
},
submit() {
//低于变现价格强制出售
if (
this.productDetail.bidPrice &&
Number(this.price) > 0 &&
Number(this.price) <= this.productDetail.bidPrice
) {
this.$createDialog({
type: 'confirm',
title: `最高求购价${this.productDetail.bidPrice}`,
content: '已有求购高于您的出价,可直接变现',
confirmBtn: {
text: '我再想想',
active: true,
disabled: false
},
cancelBtn: {
text: '确定变现',
active: false,
disabled: false
},
onConfirm: () => {
},
onCancel: () => {
this.$store.commit(
'order/sellerAskOrder/SELLER_ASK_SET_PRODUCTINFO',
{
goodImg: this.productDetail.goodImg,
colorName: this.productDetail.colorName,
sizeName: this.productDetail.sizeName,
goodPrice: this.productDetail.bidPrice,
productId: this.productDetail.productId,
bid_moster_price: this.productDetail.bidPrice
}
);
// 跳转变现
this.$router.push({
name: 'sellAskOrder',
query: {
skup: this.productDetail.bidSkup,
price: this.productDetail.bidPrice
}
});
}
}).show();
return;
}
if (this.productDetail.isSuggest) {
if (Number(this.price) > this.productDetail.suggestHighPrice) {
this.$createDialog({
type: "confirm",
content: "超出建议售价将被限制展示,建议下调至合理价格区间",
type: 'confirm',
content: '超出建议售价将被限制展示,建议下调至合理价格区间',
confirmBtn: {
text:
"修改价格"
,
text:
'修改价格'
,
active: true,
disabled: false
},
cancelBtn: {
text:
"仍要上架"
,
text:
'仍要上架'
,
active: false,
disabled: false
},
...
...
@@ -350,24 +356,30 @@ export default {
this.$createToast({
time: 1500,
txt: orderResult.message,
type:
"txt"
type:
'txt'
}).show();
return;
}
this.reportYas('XY_UFO_SALE_ORD', {
ORD_NUM: orderResult.code.orderCode,
PRD_ID: this.productDetail.productId,
PRD_SKU: this.productDetail.skup
});
// 从定金中走了钱,不用支付宝
if (orderResult.data.orderCode === 0) {
this.$createToast({
time: 1500,
txt: orderResult.message,
mask: true,
type:
"txt"
type:
'txt'
}).show();
await this.delay(1500);
this.$router.replace({
name:
"ProductDetail"
,
name:
'ProductDetail'
,
params: {
productId: this.productId
}
...
...
@@ -377,18 +389,19 @@ export default {
this.$createOrderPayType({
price: parseFloat(`${this.fee.earnestMoney}`).toFixed(2),
desc:
"保证金"
,
desc:
'保证金'
,
orderCode: orderResult.data.orderCode,
extra: JSON.stringify({
type: UserType.sell,
reportType: 'sell',
back: {
name:
"ProductDetail"
,
name:
'ProductDetail'
,
params: {
productId: this.productId
}
},
forward: {
name:
"SellPayOk"
,
name:
'SellPayOk'
,
query: {
orderCode: orderResult.data.orderCode
}
...
...
@@ -401,7 +414,7 @@ export default {
},
onClose(orderCode) {
this.$router.replace({
name:
"sellOrderDetail"
,
name:
'sellOrderDetail'
,
params: {
owner: UserType.sell,
code: orderCode
...
...
@@ -409,8 +422,7 @@ export default {
});
},
onNumChange({ count, type }) {
console.log(count, type, this.addNumError);
if (type === "add" && this.addNumError) {
if (type === 'add' && this.addNumError) {
return;
}
...
...
@@ -424,11 +436,19 @@ export default {
},
backAction() {
this.$router.replace({
name:
"ProductDetail"
,
name:
'ProductDetail'
,
params: {
productId: this.productId
}
});
},
reportYas(name, params) {
this.$store.dispatch('reportYas', {
params: {
appop: name,
param: params
}
});
}
}
};
...
...
apps/pages/product/product-detail.vue
View file @
683537d
...
...
@@ -425,12 +425,16 @@ export default {
}
.dot {
width: 10px;
height: 10px;
margin: 0 5px;
width: 8px;
height: 8px;
margin: 0 10px 2px;
border-radius: 50%;
&.active {
margin: 2px 10px 0;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #08304b;
}
}
...
...
@@ -491,7 +495,7 @@ export default {
}
.info {
padding:
14px 4
0px;
padding:
46px 40px 1
0px;
&-price {
color: #d0021b;
...
...
@@ -509,6 +513,7 @@ export default {
}
&-name {
margin-top: 14px;
font-size: 28px;
color: #999;
text-align: center;
...
...
apps/store/category/index.js
View file @
683537d
...
...
@@ -34,7 +34,7 @@ export default function() {
data
.
category
.
forEach
((
val
,
index
)
=>
{
if
(
val
&&
val
.
sub
){
val
.
index
=
index
;
val
.
index
=
index
+
1
;
val
.
sub
.
forEach
(
item
=>
{
if
(
item
.
linkType
===
'h5'
){
item
.
isShow
=
true
;
...
...
@@ -97,7 +97,6 @@ export default function() {
}
sub
.
push
(
subItem
);
});
let
category
=
[{
id
:
'0'
,
...
...
@@ -105,6 +104,7 @@ export default function() {
type
:
'brand'
,
linkType
:
'brand'
,
name
:
'全部品牌'
,
index
:
0
,
sub
:
sub
,
}];
state
.
categorySubList
=
category
;
...
...
apps/store/home/channel.js
View file @
683537d
...
...
@@ -49,7 +49,7 @@ export default function() {
state
.
channelList
.
list
=
list
;
},
[
Types
.
FETCH_PRODUCT
](
state
,
{
productlist
})
{
console
.
log
(
state
.
channelList
.
productlist
);
//
console.log(state.channelList.productlist);
Vue
.
set
(
state
.
channelList
,
'productlist'
,
state
.
channelList
.
productlist
.
concat
(
productlist
.
product_list
));
Vue
.
set
(
state
.
channelList
,
'page'
,
productlist
.
page
);
},
...
...
apps/store/home/favorite.js
View file @
683537d
...
...
@@ -16,7 +16,7 @@ export default function() {
},
mutations
:
{
addList
(
state
,
{
data
,
isReset
})
{
console
.
log
(
data
)
//
console.log(data)
if
(
data
&&
data
.
product_list
){
// data.product_list.
let
{
page
,
product_list
=
[],
page_total
}
=
data
;
...
...
@@ -24,11 +24,11 @@ export default function() {
// console.log("isShowEmpty:"+isShowEmpty)
// state.isShowEmpty = isShowEmpty
if
(
page_total
>
page
){
console
.
log
(
'======'
+
page_total
+
"///"
+
page
)
//
console.log('======'+page_total+"///"+page)
state
.
isMore
=
true
;
state
.
pageTotal
=
page_total
;
state
.
page
=
page
+
1
;
console
.
log
(
state
)
//
console.log(state)
}
else
{
state
.
isMore
=
false
;
}
...
...
@@ -54,10 +54,10 @@ export default function() {
},
actions
:
{
async
fetchFavoriteList
({
commit
,
state
},
{
isReset
}
=
{}
)
{
console
.
log
(
'...params'
)
//
console.log('...params')
// console.log(...params)
// let { isReset } = params;
console
.
log
(
'===:'
+
isReset
)
//
console.log('===:'+isReset)
let
page
=
1
if
(
isReset
){
page
=
1
...
...
apps/store/yoho/index.js
View file @
683537d
...
...
@@ -196,6 +196,8 @@ export default function(mergeState = {}) {
},
)
{
try
{
// console.log(appop)
// console.log(param)
setTimeout
(()
=>
{
if
(
window
.
_yas
&&
window
.
_yas
.
sendAppLogs
)
{
param
=
param
||
{};
...
...
doraemon/models/passport.js
View file @
683537d
...
...
@@ -205,9 +205,7 @@ const login = {
req
,
res
}).
finally
(()
=>
{
res
.
cookie
(
'third_backurl'
,
''
,
{
domain
:
'yohobuy.com'
});
res
.
clearCookie
(
'ali_backurl'
);
return
res
.
redirect
(
handleReferUrl
(
referUrl
.
s
?
referUrl
.
s
:
homePage
));
});
}
...
...
package.json
View file @
683537d
{
"name"
:
"xianyu-ufo-app-web"
,
"version"
:
"0.0.
2-beta-38
"
,
"version"
:
"0.0.
1-beta-39
"
,
"private"
:
true
,
"description"
:
"Xianyu Project With Express"
,
"repository"
:
{
...
...
utils/check-params.js
View file @
683537d
...
...
@@ -49,9 +49,7 @@ const getParams = (params, apiInfo) => {
}
return
;
}
if
(
!
assetType
(
paramItem
,
v
.
type
))
{
throw
Error
(
`
$
{
k
}
params
is
not
$
{
getType
(
v
.
type
)}
`
);
}
//
props
[
k
]
=
paramItem
;
});
}
...
...
Please
register
or
login
to post a comment