Authored by lea guo

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

... ... @@ -35,7 +35,7 @@
</div>
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
import {mapState, createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('list');
... ... @@ -67,6 +67,9 @@ export default {
activated() {
let params = this.$route.query;
if (this.yoho.direction === 'forword') {
Object.assign(this.$data, this.$options.data());
}
if (Object.keys(params).length && params.listType) {
this.listType = params.listType;
delete params.listType;
... ... @@ -79,6 +82,11 @@ export default {
!params.order && (params.order = 'sale_desc');
this.fetchData(params);
},
computed: {
...mapState(['yoho'])
},
methods: {
...mapActions(['fetchFilterData']),
clear() {
... ... @@ -215,7 +223,7 @@ export default {
justify-content: space-between;
.cancel {
font-size: 38px;
font-size: 36px;
color: #888;
}
}
... ...
<template>
<div>
<div class="tip" v-if="superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon"
<div class="tip" v-if="!superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon"
class="iconfont iconquestion icon-class"
@click="onClick"></i></div>
<div class="tip2">所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</div>
... ...
... ... @@ -241,7 +241,10 @@ export default {
activated() {
this.$nextTick(() => {
const { stage } = this.logisticInfo;
if (stage) {
this.stageImgUrl = require(`../../statics/image/order/logistics_progress_${stage}@3x.png`);
}
});
if (this.$refs.copy) {
this.copyBtn = new Clipboard(this.$refs.copy, {
... ...
... ... @@ -20,6 +20,9 @@
下架商品保证金会被释放
</p>
</div>
<div class="change-price-modal" v-else>
<p class="modal-title">您确定不卖此商品吗?</p>
</div>
</Modal>
</template>
... ... @@ -46,6 +49,7 @@ export default {
},
methods: {
show({skc}) {
console.log(skc);
this.skc = skc;
this.unStockNum = 1;
this.storageNum = skc.storageNum;
... ...
... ... @@ -136,7 +136,6 @@ export default {
}
},
onClickProduct() {
console.log(this.productInfo);
this.$router.push({
name: 'ProductDetail',
params: {
... ... @@ -150,7 +149,7 @@ export default {
onNoSale(skc) {
this.$refs.modalUnstock.show({skc});
},
async onNoSaleSure({skc, num}) {
async onNoSaleSure({skc, num}) { // 商品下架确认
console.log(skc, num);
const result = await this.postNoSale({
product_id: this.productInfo.productId,
... ...
... ... @@ -177,6 +177,8 @@ export default {
type: 'txt'
}).show();
await this.delay(1500);
this.$router.replace({
name: 'ProductDetail',
params: {
... ... @@ -221,7 +223,12 @@ export default {
},
onNumChange(count) {
this[Types.CHANGE_SELL_NUM](count);
}
},
delay(ns) {
return new Promise(resolve => {
setTimeout(resolve, ns);
});
},
}
};
</script>
... ...
... ... @@ -47,7 +47,7 @@ module.exports = (req, res, next) => {
// Todo 删除 600032996 调价: 500031170 购买: 600043484
// 入住商家 50000638
// 梅 500031928
// req.user.uid = 500031928;
req.user.uid = 500031928;
res.locals.isLogin = Boolean(req.user.uid); // 用户是否登录
if (_.get(req, 'user.appSessionType') === 'miniapp') {
... ...