Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -52,7 +52,7 @@ module.exports = {
}).catch(next);
},
/* 收藏店铺 */
/* 收藏品牌或者店铺 */
collectShop: (req, res, next) => {
if (!req.user.uid) {
return res.json({
... ... @@ -62,10 +62,10 @@ module.exports = {
}
shopModel.collectShopData({
shopId: req.body.shopId,
favId: req.body.favId,
id: req.body.isBlkShop ? req.body.shopId : req.body.brandId,
favId: req.body.isBlkShop ? req.body.shopId : req.body.brandId,
uid: req.user.uid,
type: 'shop',
type: req.body.isBlkShop ? 'shop' : 'brand',
isFav: req.body.isFav
}).then(result => {
res.json(result);
... ...
... ... @@ -103,8 +103,8 @@ module.exports = {
*/
collectShopOriginData(params) {
let finalParams = {
id: params.shopId,
fav_id: params.shopId,
id: params.id,
fav_id: params.favId,
uid: params.uid,
type: params.type
};
... ...
... ... @@ -28,7 +28,8 @@ const getShopData = params => {
/* 品牌名称 */
Object.assign(finalResult, {
brandName: result.data.brand_name
brandName: result.data.brand_name,
brandId: result.data.id
});
/* 品牌是否有店铺 */
... ...
... ... @@ -9,7 +9,6 @@ $white: #fff;
.order-wrapper {
background: #f6f6f6;
padding-top: 20px;
.order-item {
background: $white;
... ...
<template>
<template v-if="show">
<div class="order-status">
<p>{{order.statusStr}}</p>
<p v-if="order.isCancel !== 'Y' && order.status == 0 && order.payLefttime != 0">剩余: <span v-count-down v-bind:left-time="order.payLefttime"></span>,订单将被取消</p>
... ... @@ -55,6 +56,7 @@
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
</select>
</template>
</template>
<script>
'use strict';
... ... @@ -69,12 +71,13 @@
module.exports = {
data() {
return {
show: false,
order: {},
options: [],
selected: {}
};
},
ready() {
created() {
this.getOrderData();
yohoAPI.addNativeMethod('goToService', () => {
... ... @@ -91,6 +94,7 @@
}
}).then(result => {
if (result.code === 200) {
this.show = true;
this.$set('order', result.data);
genderSel = genderSel([{
key: this.order.isSupportRefund,
... ...
... ... @@ -89,6 +89,7 @@
isBlkShop: result.isBlkShop,
domain: locationQuery.domain,
brandName: result.brandName,
brandId: result.brandId, // 不是分享的参数,收藏店铺使用
shopId: result.shopId, // 不是分享的参数,收藏店铺使用
isFav: result.isFav // 不是分享的参数,收藏店铺使用
};
... ...
... ... @@ -84,8 +84,10 @@
/* 收藏或者取消收藏店铺 */
collectShop() {
let data = {
brandId: this.shareData.brandId,
shopId: this.shareData.shopId,
isFav: this.shareData.isFav
isFav: this.shareData.isFav,
isBlkShop: this.shareData.isBlkShop
};
$.post({
... ...