|
@@ -38,7 +38,7 @@
|
|
v-model="baseFormData.amountValue"
|
|
v-model="baseFormData.amountValue"
|
|
placeholder="Amount entered"
|
|
placeholder="Amount entered"
|
|
@input = "onUsdInput"
|
|
@input = "onUsdInput"
|
|
- :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px' }"/>
|
|
|
|
|
|
+ :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px', 'text-align': 'right', 'font-size' : '15px', 'color': '#000' }"/>
|
|
</div>
|
|
</div>
|
|
<div class="item">
|
|
<div class="item">
|
|
<div class="label">
|
|
<div class="label">
|
|
@@ -50,7 +50,8 @@
|
|
v-model="baseFormData.totalCount"
|
|
v-model="baseFormData.totalCount"
|
|
placeholder="Quantity entered"
|
|
placeholder="Quantity entered"
|
|
@input = "onCountInput"
|
|
@input = "onCountInput"
|
|
- :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px'}"/>
|
|
|
|
|
|
+ :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '120px',
|
|
|
|
+ 'text-align': 'right', 'font-size' : '15px', 'color': '#000'}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-label">
|
|
<div class="form-label">
|
|
@@ -138,8 +139,8 @@ let publishRes = reactive({})
|
|
let visible = ref(false);
|
|
let visible = ref(false);
|
|
let showPreview = ref(false);
|
|
let showPreview = ref(false);
|
|
let openAntiBot = ref(false);
|
|
let openAntiBot = ref(false);
|
|
-let dialogHeight = ref(620);
|
|
|
|
-let previewDialogHeight = ref(880);
|
|
|
|
|
|
+let dialogHeight = ref(680);
|
|
|
|
+let previewDialogHeight = ref(860);
|
|
let submitIng = ref(false);
|
|
let submitIng = ref(false);
|
|
let atUserList = ref([]);
|
|
let atUserList = ref([]);
|
|
let finalAmountData = ref({
|
|
let finalAmountData = ref({
|
|
@@ -208,14 +209,14 @@ const close = () => {
|
|
|
|
|
|
const setPreviewDialogHeight = () => {
|
|
const setPreviewDialogHeight = () => {
|
|
let clientHeight = document.documentElement.clientHeight;
|
|
let clientHeight = document.documentElement.clientHeight;
|
|
- let gapSafe = 80;
|
|
|
|
|
|
+ let gapSafe = 40;
|
|
|
|
|
|
if(previewDialogHeight.value > clientHeight - gapSafe) {
|
|
if(previewDialogHeight.value > clientHeight - gapSafe) {
|
|
previewDialogHeight.value = clientHeight - gapSafe;
|
|
previewDialogHeight.value = clientHeight - gapSafe;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-const getPayAmount = (amountValue) => {
|
|
|
|
|
|
+const getPayAmount = (amountValue, cb) => {
|
|
payCalcFee({
|
|
payCalcFee({
|
|
params : {
|
|
params : {
|
|
amountValue,
|
|
amountValue,
|
|
@@ -224,6 +225,7 @@ const getPayAmount = (amountValue) => {
|
|
}
|
|
}
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if(res.code == 0) {
|
|
if(res.code == 0) {
|
|
|
|
+ cb && cb(res.data);
|
|
let {finalAmountValue} = res.data;
|
|
let {finalAmountValue} = res.data;
|
|
if(finalAmountValue >= 100) {
|
|
if(finalAmountValue >= 100) {
|
|
res.data.finalAmountValue = finalAmountValue / 100;
|
|
res.data.finalAmountValue = finalAmountValue / 100;
|
|
@@ -242,7 +244,8 @@ const confirm = () => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
amountValue = amountValue * 100; // 元转分
|
|
amountValue = amountValue * 100; // 元转分
|
|
- formList[0]['text'] = atUserList.value
|
|
|
|
|
|
+ formList[0]['text'] = atUserList.value;
|
|
|
|
+
|
|
let finishConditions = [];
|
|
let finishConditions = [];
|
|
for(let i = 0; i < formList.length; i++) {
|
|
for(let i = 0; i < formList.length; i++) {
|
|
let item = {};
|
|
let item = {};
|
|
@@ -269,27 +272,30 @@ const confirm = () => {
|
|
if(amountValue / totalCount < 1) {
|
|
if(amountValue / totalCount < 1) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- let data = {
|
|
|
|
- params: {
|
|
|
|
- postBizData: JSON.stringify(formData),
|
|
|
|
- postSrc: 1, //1 twitter
|
|
|
|
- postType: 1, //1 红包
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
submitIng.value = true;
|
|
submitIng.value = true;
|
|
- getPayAmount(amountValue);
|
|
|
|
- postPublish(data).then((res) => {
|
|
|
|
- submitIng.value = false;
|
|
|
|
- if(res.code == 0) {
|
|
|
|
- publishRes = res.data;
|
|
|
|
- // setPreviewDialogHeight();
|
|
|
|
- showPreview.value = true;
|
|
|
|
- } else {
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ getPayAmount(amountValue, (res) => {
|
|
|
|
+ formData['payAmountValue'] = res.finalAmountValue;
|
|
|
|
+ let data = {
|
|
|
|
+ params: {
|
|
|
|
+ postBizData: JSON.stringify(formData),
|
|
|
|
+ postSrc: 1, //1 twitter
|
|
|
|
+ postType: 1, //1 红包
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }).catch(err => {
|
|
|
|
- console.log(err);
|
|
|
|
- })
|
|
|
|
|
|
+ postPublish(data).then((res) => {
|
|
|
|
+ submitIng.value = false;
|
|
|
|
+ if(res.code == 0) {
|
|
|
|
+ publishRes = res.data;
|
|
|
|
+ setPreviewDialogHeight();
|
|
|
|
+ showPreview.value = true;
|
|
|
|
+ } else {
|
|
|
|
+ console.log(res);
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log(err);
|
|
|
|
+ })
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
const initParams = () => {
|
|
const initParams = () => {
|
|
@@ -394,6 +400,11 @@ onMounted(() => {
|
|
.left {
|
|
.left {
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
|
|
|
+ .title {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ }
|
|
|
|
+
|
|
.close-btn {
|
|
.close-btn {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -460,7 +471,7 @@ onMounted(() => {
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
|
.item {
|
|
.item {
|
|
- width: 260px;
|
|
|
|
|
|
+ width: 270px;
|
|
height: 60px;
|
|
height: 60px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
@@ -511,6 +522,8 @@ onMounted(() => {
|
|
min-width: 88px;
|
|
min-width: 88px;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ font-weight: 500;
|
|
.icon {
|
|
.icon {
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
@@ -535,13 +548,15 @@ onMounted(() => {
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
border-radius: 15px;
|
|
border-radius: 15px;
|
|
- padding: 0 15px;
|
|
|
|
|
|
+ padding: 0 18px;
|
|
margin-top: 14px;
|
|
margin-top: 14px;
|
|
box-shadow: 0px 3px 27px 0px #0000001A;
|
|
box-shadow: 0px 3px 27px 0px #0000001A;
|
|
|
|
|
|
.label {
|
|
.label {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center ;
|
|
align-items: center ;
|
|
|
|
+ font-size: 15px;
|
|
|
|
+ font-weight: 500;
|
|
.icon-bot {
|
|
.icon-bot {
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
}
|
|
}
|
|
@@ -596,6 +611,8 @@ onMounted(() => {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 500;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
|
.icon-loading {
|
|
.icon-loading {
|