Authored by Tao

add channel

... ... @@ -134,7 +134,7 @@ export default {
},
beforeRouteEnter (to, from, next) {
beforeRouteEnter(to, from, next) {
next(vm => {
// 通过 `vm` 访问组件实例
... ... @@ -161,12 +161,12 @@ export default {
this.showToast();
}
},
isShowDialog(val) {
if (val) {
this.showDialog();
}
},
// isShowDialog(val) {
// if (val) {
// this.showDialog();
// }
// },
addressInfo(val) {
... ... @@ -174,6 +174,10 @@ export default {
this.computePrice();
}
},
inputPrice(val) {
console.log(val);
}
},
... ... @@ -245,6 +249,7 @@ export default {
showDialog() {
this.BUYER_ASK_SET_SHOWDIALOG(false);
let that = this;
if (this.preTip) {
this.$createDialog({
... ... @@ -265,7 +270,7 @@ export default {
},
onConfirm: () => {
this.publishProduct();
that.publishProduct();
},
onCancel: () => {
... ... @@ -274,13 +279,16 @@ export default {
}).show();
} else {
this.publishProduct();
that.publishProduct();
}
},
submitClick() {
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id});
this.buyerPrePublish({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id})
.then(() => {
this.showDialog();
});
},
publishProduct() {
... ... @@ -291,7 +299,7 @@ export default {
computePrice() {
if (!this.inputPrice) {
console.log('inputPrice is null')
console.log('inputPrice is null');
return;
}
this.buyerCompute({price: this.inputPrice, storage_id: this.storageId, address_id: this.addressInfo.address_id || '' });
... ...
... ... @@ -27,7 +27,8 @@ export default {
},
data() {
return {
desc: '有货买家协议'
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'
};
},
computed: {
... ...
... ... @@ -31,6 +31,7 @@ export default {
<style lang="scss" scoped>
.product-wrapper {
height: 240px;
overflow: hidden;
}
.product-price {
... ...
... ... @@ -3,7 +3,7 @@
<i class="address-icon"></i>
<div>
<p class="consignee">{{ userAddress.consignee }}</p>
<p class="area">{{ userAddress.area }}</p>
<p class="area">{{ userAddress.area }}{{ userAddress.address || "" }}</p>
<p class="mobile">{{ userAddress.mobile }}</p>
</div>
</div>
... ...
... ... @@ -26,7 +26,9 @@
<p class="consignee">
{{ `回寄地址: ${userAddress.consignee || ""}` }}
</p>
<p class="area">{{ userAddress.area }}</p>
<p class="area">
{{ userAddress.area }}{{ userAddress.address || "" }}
</p>
<p class="mobile">{{ userAddress.mobile }}</p>
</div>
</div>
... ...
... ... @@ -56,10 +56,10 @@
<span>{{ orderDetail.orderCode }}</span>
<i ref="copy" class="copy"></i>
</p>
<p v-if="orderDetail.paymentStr">
<!-- <p v-if="orderDetail.paymentStr">
<span class="label">支付方式:</span>
<span>{{ orderDetail.paymentStr }}</span>
</p>
</p> -->
<p v-if="orderDetail.earnestMoneyStr">
<span class="label">保证金:</span>
<span class="earnest-price">{{ orderDetail.earnestMoneyStr }}</span>
... ... @@ -69,16 +69,6 @@
</p>
</div>
</div>
<!-- 操作 -->
<!-- <detail-footer>
<template #tip="{orderDetail, statusDetail}">
<div v-if="statusDetail.status === 0">
<p class="earnest-price">{{ orderDetail.earnestMoneyStr }}</p>
<p>{{ statusDetail.statuStr }}</p>
</div>
</template>
</detail-footer> -->
<div v-if="actionList.length > 0" class="footer-wrapper">
<div v-if="statusDetail.status === 0">
<p class="earnest-price">{{ orderDetail.earnestMoneyStr }}</p>
... ...
... ... @@ -11,10 +11,13 @@
</div>
<div class="item-info">
<div>
<div class="price-status">
<div v-if="$route.params.owner === 'buy'" class="price-status">
<span class="price">¥{{ order.realPrice }}</span>
<span class="delivery-fee-tip">(含运费)</span>
</div>
<div v-else class="price-status">
<span class="price">¥{{ goodsInfo.goodPrice }}</span>
</div>
<p class="item-name">
{{ goodsInfo.productName }}
</p>
... ...
<template>
<layout-app title="我的出售">
<layout-app title="出售中">
<div class="content-wrapper">
<scroll
@pulling-up="fetchData"
... ...
<template>
<layout-app title="我的订单">
<layout-app :title="$route.params.owner === 'sell' ? '我的出售' : '我的订单'">
<status-nav />
<div class="content-wrapper">
<scroll
... ...
... ... @@ -8,7 +8,7 @@
<AddressInfo :data="address" class="order-item"></AddressInfo>
</div>
<div class="footer">
<OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc"></OrderAgree>
<OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
<div class="btn-wrapper">
<YohoButton :txt="txt" class="submit-btn" @click="onClick" :disable="!agree"></YohoButton>
</div>
... ... @@ -49,7 +49,8 @@ export default {
txt: '提交',
error: false,
num: 1,
agreeDesc: '有货卖家协议'
agreeDesc: '有货卖家协议',
url: 'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE'
};
},
mounted() {
... ...
<template>
<div class="layout">
<LayoutHeader class="layout-header" :show-back="true" :title="title" ref="header">
<transition name="fade">
<img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
</transition>
</LayoutHeader>
<LayoutHeader class="layout-header" :show-back="true" :title="'\u200E'"></LayoutHeader>
<div class="layout-context fixscroll">
<cube-scroll :data="imageList"
:scroll-events="['scroll']"
@scroll="handleScroll">
<cube-scroll :data="imageList">
<div class="slide">
<cube-slide ref="slide" :data="imageList">
<cube-slide-item v-for="(item, index) in imageList" :key="index">
... ... @@ -139,7 +133,6 @@ export default {
return {
prdDetailTip,
prdDetailImage,
headThumbnailVisible: false,
showActivitySheet: false,
... ... @@ -184,16 +177,7 @@ export default {
return get(this.productDetail, 'product_name', '商品详情');
},
},
watch: {
title: {
handler() {
this.setTitle();
},
immediate: true,
},
},
mounted() {
this.imageHideThreadhold = -window.innerWidth * 0.693;
if (this.isQiugouEnabled === null) {
this.$store.dispatch('getSysConfigQiugou');
}
... ... @@ -205,21 +189,8 @@ export default {
},
methods: {
...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']),
setTitle() {
if (this.productId === this.productDetail.product_id) {
if (this.$refs.header && this.$refs.header.setTitle) {
this.$refs.header.setTitle(this.title);
} else if (document) {
document.title = this.title;
}
}
},
refresh() {
this.$refs.slide.refresh();
this.headThumbnailVisible = false;
},
handleScroll(e) {
this.headThumbnailVisible = e.y < this.imageHideThreadhold;
},
sizeImg(src, width = 360, height = 72) {
if (src) {
... ... @@ -579,10 +550,6 @@ export default {
}
}
.title-thumbnail {
height: 100%;
}
.footer {
display: flex;
text-align: center;
... ...
... ... @@ -117,7 +117,8 @@ export default function() {
name: 'buy',
title: '我的求购',
num: state.askBuyNum,
page: '',
page: 'OrderList',
params: { owner: ownType.BUY, status: 7 },
},
collect: {
name: 'collect',
... ...
... ... @@ -366,20 +366,24 @@ export default function() {
buyerPrePublish({commit, dispatch}, {price = 0, storage_id = 0, uid, address_id = ''} = {}) {
commit(BUYER_ASK_PREPUBLISH_REQUEST);
this.$api.get('/api/order/buyeraskprepublish', {
return this.$api.get('/api/order/buyeraskprepublish', {
price,
storage_id,
uid,
address_id,
}).then(result => {
if (result.code === 200) {
commit(BUYER_ASK_PREPUBLISH_SUCCESS, get(result, ['data', 'dialog'], null));
let payload = get(result, ['data', 'dialog'], null)
commit(BUYER_ASK_PREPUBLISH_SUCCESS, payload);
return payload;
} else {
commit(BUYER_ASK_PREPUBLISH_FAILURE, result.message);
return null;
}
}, error => {
console.log(error);
commit(BUYER_ASK_PREPUBLISH_FAILURE, TIP);
return null;
});
},
... ...
... ... @@ -55,6 +55,7 @@ export default function() {
computeTip: null,
addressInfo: null,
publishinfo: null,
toastMessage: '',
},
getter: {
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-18",
"version": "0.0.2-beta-19",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...