|
@@ -73,6 +73,7 @@ import Report from "@/log-center/log";
|
|
|
import { getStorage } from "@/uilts/help";
|
|
|
|
|
|
import { getCurrencyInfoBySymbol } from "@/http/publishApi";
|
|
|
+import {setChromeStorage} from "@/uilts/chromeExtension"
|
|
|
|
|
|
import VHead from '@/view/popup/components/head.vue'
|
|
|
import currencySelect from "@/view/components/currency-select.vue";
|
|
@@ -97,6 +98,8 @@ const selectCurrency = (params) => {
|
|
|
withdrawHandle(params);
|
|
|
} else if(currencyOpertionType == 'DEPOSIT') {
|
|
|
depositHandle(params);
|
|
|
+ } else if(currencyOpertionType == 'SEND') {
|
|
|
+ showSendGiveawayDialog(params);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -188,13 +191,25 @@ const onRefresh = () => {
|
|
|
})
|
|
|
};
|
|
|
|
|
|
-const showSendGiveawayDialog = () => {
|
|
|
- chrome.runtime.sendMessage({
|
|
|
- actionType: "POPUP_SHOW_DENET_PUBLISH_DIALOG",
|
|
|
- data: { }
|
|
|
- }, () => { });
|
|
|
+const showSendGiveawayDialog = (params = null) => {
|
|
|
+ if(currenciesData.value.length > 1 && currencyOpertionType != 'SEND') {
|
|
|
+ showCurrencySelect.value = true;
|
|
|
+ currencyOpertionType = "SEND";
|
|
|
+ } else {
|
|
|
+ let currencyInfo = params ? params : currencyInfo.value;
|
|
|
+ setLocalSelectCurrencyInfo(currencyInfo)
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "POPUP_SHOW_DENET_PUBLISH_DIALOG",
|
|
|
+ data: { }
|
|
|
+ }, () => { });
|
|
|
+ currencyOpertionType = '';
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
+const setLocalSelectCurrencyInfo = (params = {}) => {
|
|
|
+ setChromeStorage({ selectCurrencyInfo : JSON.stringify(params)})
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
let {params = '{}'} = router.currentRoute.value.query;
|
|
|
|