Merge remote-tracking branch 'origin/master'
commit
5981432ff7
|
@ -2,5 +2,5 @@ import request from "@/utils/request.js";
|
||||||
|
|
||||||
// 根据字典类型查询字典数据信息
|
// 根据字典类型查询字典数据信息
|
||||||
export function getDicts(dictType) {
|
export function getDicts(dictType) {
|
||||||
return request.get('app-api/system/dict-data/type/' + dictType);
|
return request.get('app-api/system/dict-data/type?type=' + dictType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class='sharing-packets' :class='!sharePacket.enabled ? "on":""'>
|
<view class='sharing-packets' :class='!enabled ? "on":""'>
|
||||||
<view class='iconfont icon-guanbi' @click="closeShare"></view>
|
<view class='iconfont icon-guanbi' @click="closeShare"></view>
|
||||||
<view class='line'></view>
|
<view class='line'></view>
|
||||||
<view class='sharing-con' @click='goShare'>
|
<view class='sharing-con' @click='goShare'>
|
||||||
|
@ -41,7 +41,11 @@
|
||||||
return {
|
return {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
enabled() {
|
||||||
|
return this.sharePacket.enabled && (this.sharePacket.brokerageMinPrice || this.sharePacket.brokerageMaxPrice)
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeShare:function(){
|
closeShare:function(){
|
||||||
this.$emit('closeChange');
|
this.$emit('closeChange');
|
||||||
|
@ -64,7 +68,7 @@
|
||||||
.sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
|
.sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
|
||||||
.sharing-packets .sharing-con image{width:100%;height:100%;}
|
.sharing-packets .sharing-con image{width:100%;height:100%;}
|
||||||
.sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
|
.sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
|
||||||
.sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;}
|
.sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;white-space: nowrap}
|
||||||
.sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
|
.sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
|
||||||
.sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
|
.sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
|
||||||
.sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}
|
.sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}
|
||||||
|
|
|
@ -572,7 +572,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getBrokeragePrice: function() {
|
getBrokeragePrice: function() {
|
||||||
BrokerageAPI.getProductBrokeragePrice(this.id).then(res => {
|
BrokerageAPI.getProductBrokeragePrice(this.activity.spuId).then(res => {
|
||||||
this.sharePacket = res.data
|
this.sharePacket = res.data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -640,7 +640,7 @@
|
||||||
getProductReplyCount: function() {
|
getProductReplyCount: function() {
|
||||||
ProductCommentApi.getCommentStatistics(this.activity.spuId).then(res => {
|
ProductCommentApi.getCommentStatistics(this.activity.spuId).then(res => {
|
||||||
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
||||||
this.$set(this, 'replyChance', 100.0 * res.data.goodCount / count);
|
this.$set(this, 'replyChance', (100.0 * res.data.goodCount / count).toFixed(0));
|
||||||
this.$set(this, 'replyCount', count);
|
this.$set(this, 'replyCount', count);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -278,7 +278,6 @@
|
||||||
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
import uQRCode from '@/js_sdk/Sansnn-uQRCode/uqrcode.js'
|
||||||
import { toLogin } from '@/libs/login.js';
|
import { toLogin } from '@/libs/login.js';
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
import productConSwiper from '@/components/productConSwiper';
|
import productConSwiper from '@/components/productConSwiper';
|
||||||
import couponListWindow from '@/components/couponListWindow';
|
import couponListWindow from '@/components/couponListWindow';
|
||||||
import productWindow from '@/components/productWindow';
|
import productWindow from '@/components/productWindow';
|
||||||
|
@ -530,7 +529,7 @@
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.make();
|
this.make();
|
||||||
this.ShareInfo();
|
this.ShareInfo();
|
||||||
this.getImageBase64();
|
this.imgTop = this.spu.picUrl;
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
this.getQrcode();
|
this.getQrcode();
|
||||||
|
@ -779,7 +778,7 @@
|
||||||
getProductReplyCount: function() {
|
getProductReplyCount: function() {
|
||||||
ProductCommentApi.getCommentStatistics(this.id).then(res => {
|
ProductCommentApi.getCommentStatistics(this.id).then(res => {
|
||||||
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
const count = res.data.goodCount + res.data.mediocreCount + res.data.negativeCount;
|
||||||
this.$set(this, 'replyChance', 100.0 * res.data.goodCount / count);
|
this.$set(this, 'replyChance', (100.0 * res.data.goodCount / count).toFixed(0));
|
||||||
this.$set(this, 'replyCount', count);
|
this.$set(this, 'replyCount', count);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1003,16 +1002,6 @@
|
||||||
"onMenuShareTimeline"
|
"onMenuShareTimeline"
|
||||||
], configAppMessage);
|
], configAppMessage);
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* 获得商品的封面 base64
|
|
||||||
*/
|
|
||||||
getImageBase64: function() {
|
|
||||||
imageBase64({
|
|
||||||
url: this.spu.picUrl
|
|
||||||
}).then(res => {
|
|
||||||
this.imgTop = res.data.code;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 获得小程序的二维码
|
* 获得小程序的二维码
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -182,7 +182,7 @@
|
||||||
TradeConfigApi.getTradeConfig().then(res => {
|
TradeConfigApi.getTradeConfig().then(res => {
|
||||||
this.minPrice = Util.fen2yuan(res.data.brokerageWithdrawMinPrice || 0);
|
this.minPrice = Util.fen2yuan(res.data.brokerageWithdrawMinPrice || 0);
|
||||||
this.frozenDays = res.data.brokerageFrozenDays || 0;
|
this.frozenDays = res.data.brokerageFrozenDays || 0;
|
||||||
this.withdrawTypes = res.data.brokerageWithdrawType || [];
|
this.withdrawTypes = res.data.brokerageWithdrawTypes || [];
|
||||||
this.withdrawType = this.withdrawTypes[0]; // 默认选中第一个提现方式
|
this.withdrawType = this.withdrawTypes[0]; // 默认选中第一个提现方式
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
import { getQrcode } from '@/api/api.js';
|
import { getQrcode } from '@/api/api.js';
|
||||||
// #endif
|
// #endif
|
||||||
import home from '@/components/home';
|
import home from '@/components/home';
|
||||||
import { imageBase64 } from "@/api/public";
|
|
||||||
import * as TradeConfigApi from '@/api/trade/config.js';
|
import * as TradeConfigApi from '@/api/trade/config.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -131,13 +130,7 @@
|
||||||
let posterUrls = []
|
let posterUrls = []
|
||||||
// 生成一个Promise对象的数组
|
// 生成一个Promise对象的数组
|
||||||
images.forEach(item => {
|
images.forEach(item => {
|
||||||
// TODO @芋艿:imageBase64 这里是为了下载图片的 base64;后续看看可以前端直接操作不;
|
posterUrls.push(item.pic)
|
||||||
const oneApi = imageBase64({
|
|
||||||
url: item.pic
|
|
||||||
}).then(res => {
|
|
||||||
return res.data.code;
|
|
||||||
})
|
|
||||||
posterUrls.push(oneApi)
|
|
||||||
})
|
})
|
||||||
Promise.all(posterUrls).then(result => {
|
Promise.all(posterUrls).then(result => {
|
||||||
that.$set(that, 'base64List', result);
|
that.$set(that, 'base64List', result);
|
||||||
|
|
Loading…
Reference in New Issue