Authored by lea guo

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

@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 </div> 35 </div>
36 </template> 36 </template>
37 <script> 37 <script>
38 -import {createNamespacedHelpers} from 'vuex'; 38 +import {mapState, createNamespacedHelpers} from 'vuex';
39 39
40 const {mapActions} = createNamespacedHelpers('list'); 40 const {mapActions} = createNamespacedHelpers('list');
41 41
@@ -67,6 +67,9 @@ export default { @@ -67,6 +67,9 @@ export default {
67 activated() { 67 activated() {
68 let params = this.$route.query; 68 let params = this.$route.query;
69 69
  70 + if (this.yoho.direction === 'forword') {
  71 + Object.assign(this.$data, this.$options.data());
  72 + }
70 if (Object.keys(params).length && params.listType) { 73 if (Object.keys(params).length && params.listType) {
71 this.listType = params.listType; 74 this.listType = params.listType;
72 delete params.listType; 75 delete params.listType;
@@ -79,6 +82,11 @@ export default { @@ -79,6 +82,11 @@ export default {
79 !params.order && (params.order = 'sale_desc'); 82 !params.order && (params.order = 'sale_desc');
80 this.fetchData(params); 83 this.fetchData(params);
81 }, 84 },
  85 +
  86 + computed: {
  87 + ...mapState(['yoho'])
  88 + },
  89 +
82 methods: { 90 methods: {
83 ...mapActions(['fetchFilterData']), 91 ...mapActions(['fetchFilterData']),
84 clear() { 92 clear() {
@@ -215,7 +223,7 @@ export default { @@ -215,7 +223,7 @@ export default {
215 justify-content: space-between; 223 justify-content: space-between;
216 224
217 .cancel { 225 .cancel {
218 - font-size: 38px; 226 + font-size: 36px;
219 color: #888; 227 color: #888;
220 } 228 }
221 } 229 }
1 <template> 1 <template>
2 <div> 2 <div>
3 - <div class="tip" v-if="superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon" 3 + <div class="tip" v-if="!superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon"
4 class="iconfont iconquestion icon-class" 4 class="iconfont iconquestion icon-class"
5 @click="onClick"></i></div> 5 @click="onClick"></i></div>
6 <div class="tip2">所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</div> 6 <div class="tip2">所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</div>
@@ -241,7 +241,10 @@ export default { @@ -241,7 +241,10 @@ export default {
241 activated() { 241 activated() {
242 this.$nextTick(() => { 242 this.$nextTick(() => {
243 const { stage } = this.logisticInfo; 243 const { stage } = this.logisticInfo;
  244 + if (stage) {
244 this.stageImgUrl = require(`../../statics/image/order/logistics_progress_${stage}@3x.png`); 245 this.stageImgUrl = require(`../../statics/image/order/logistics_progress_${stage}@3x.png`);
  246 + }
  247 +
245 }); 248 });
246 if (this.$refs.copy) { 249 if (this.$refs.copy) {
247 this.copyBtn = new Clipboard(this.$refs.copy, { 250 this.copyBtn = new Clipboard(this.$refs.copy, {
@@ -20,6 +20,9 @@ @@ -20,6 +20,9 @@
20 下架商品保证金会被释放 20 下架商品保证金会被释放
21 </p> 21 </p>
22 </div> 22 </div>
  23 + <div class="change-price-modal" v-else>
  24 + <p class="modal-title">您确定不卖此商品吗?</p>
  25 + </div>
23 </Modal> 26 </Modal>
24 </template> 27 </template>
25 28
@@ -46,6 +49,7 @@ export default { @@ -46,6 +49,7 @@ export default {
46 }, 49 },
47 methods: { 50 methods: {
48 show({skc}) { 51 show({skc}) {
  52 + console.log(skc);
49 this.skc = skc; 53 this.skc = skc;
50 this.unStockNum = 1; 54 this.unStockNum = 1;
51 this.storageNum = skc.storageNum; 55 this.storageNum = skc.storageNum;
@@ -136,7 +136,6 @@ export default { @@ -136,7 +136,6 @@ export default {
136 } 136 }
137 }, 137 },
138 onClickProduct() { 138 onClickProduct() {
139 - console.log(this.productInfo);  
140 this.$router.push({ 139 this.$router.push({
141 name: 'ProductDetail', 140 name: 'ProductDetail',
142 params: { 141 params: {
@@ -150,7 +149,7 @@ export default { @@ -150,7 +149,7 @@ export default {
150 onNoSale(skc) { 149 onNoSale(skc) {
151 this.$refs.modalUnstock.show({skc}); 150 this.$refs.modalUnstock.show({skc});
152 }, 151 },
153 - async onNoSaleSure({skc, num}) { 152 + async onNoSaleSure({skc, num}) { // 商品下架确认
154 console.log(skc, num); 153 console.log(skc, num);
155 const result = await this.postNoSale({ 154 const result = await this.postNoSale({
156 product_id: this.productInfo.productId, 155 product_id: this.productInfo.productId,
@@ -177,6 +177,8 @@ export default { @@ -177,6 +177,8 @@ export default {
177 type: 'txt' 177 type: 'txt'
178 }).show(); 178 }).show();
179 179
  180 + await this.delay(1500);
  181 +
180 this.$router.replace({ 182 this.$router.replace({
181 name: 'ProductDetail', 183 name: 'ProductDetail',
182 params: { 184 params: {
@@ -221,7 +223,12 @@ export default { @@ -221,7 +223,12 @@ export default {
221 }, 223 },
222 onNumChange(count) { 224 onNumChange(count) {
223 this[Types.CHANGE_SELL_NUM](count); 225 this[Types.CHANGE_SELL_NUM](count);
224 - } 226 + },
  227 + delay(ns) {
  228 + return new Promise(resolve => {
  229 + setTimeout(resolve, ns);
  230 + });
  231 + },
225 } 232 }
226 }; 233 };
227 </script> 234 </script>
@@ -47,7 +47,7 @@ module.exports = (req, res, next) => { @@ -47,7 +47,7 @@ module.exports = (req, res, next) => {
47 // Todo 删除 600032996 调价: 500031170 购买: 600043484 47 // Todo 删除 600032996 调价: 500031170 购买: 600043484
48 // 入住商家 50000638 48 // 入住商家 50000638
49 // 梅 500031928 49 // 梅 500031928
50 - // req.user.uid = 500031928; 50 + req.user.uid = 500031928;
51 51
52 res.locals.isLogin = Boolean(req.user.uid); // 用户是否登录 52 res.locals.isLogin = Boolean(req.user.uid); // 用户是否登录
53 if (_.get(req, 'user.appSessionType') === 'miniapp') { 53 if (_.get(req, 'user.appSessionType') === 'miniapp') {