| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" |
| | | content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
| | | <title>RBHC</title> |
| | | <title>Fluent Global</title> |
| | | <link rel="shortcut icon" href=./favicon.ico type=image/x-icon> |
| | | <link href="static/css/public1.css" rel="stylesheet"> |
| | | <link href="//at.alicdn.com/t/c/font_4480663_5e9rjcl352x.css" rel="stylesheet"> |
| | |
| | | } |
| | | |
| | | // 获取大盘指数 |
| | | export function getExchange(options) { |
| | | return get("/api/stock/getExchange.do", options); |
| | | } |
| | | // 获取大盘指数 |
| | | export function getMarket(options) { |
| | | return get("/api/stock/getMarket.do", options); |
| | | } |
| | |
| | | export function buyFutures(options) { |
| | | return post("/user/buyFutures.do", options); |
| | | } |
| | | //撤单 |
| | | |
| | | export function revocationOrder(options) { |
| | | return post("/user/revocationOrder.do", options); |
| | | } |
| | | // 挂单 |
| | | export function guadan(options) { |
| | | return post("/user/addOrder.do", options); |
| | |
| | | |
| | | export default { |
| | | // DOMAIN: "https://api.amcfcxn.org/", |
| | | DOMAIN: "https://usapi.yanshiz.com/", |
| | | DOMAIN: "https://api.jinmanxuan.com/", |
| | | // DOMAIN: "https://api.coinbtcs.com/", |
| | | // baseURL: ENV == 'development'?'https://api.guosen.org/':'https://api.guosen.org/', |
| | | // baseURL: 'http://localhost:8070', |
| | |
| | | // 本地 |
| | | baseURL: |
| | | // process.env.NODE_ENV == "development" ? "https://192.168.10.12:8091/" : "https://api.kuspitai.com/", |
| | | process.env.NODE_ENV == "development" ? "https://usapi.yanshiz.com/" : "https://usapi.yanshiz.com/", |
| | | process.env.NODE_ENV == "development" ? "https://api.jinmanxuan.com/" : "https://api.jinmanxuan.com/", |
| | | util: { |
| | | image: "/util/image.html" // 图片上传 |
| | | } |
| | |
| | | watch: {}, |
| | | mounted() { |
| | | this.init(); |
| | | this.initWebSocket(); |
| | | this.getExchange() |
| | | }, |
| | | methods: { |
| | | async getExchange(){ |
| | | let data = await api.getExchange(); |
| | | if (data.status === 0) { |
| | | // Toast.success(data.msg); |
| | | if(data.data==false){ |
| | | |
| | | }else{ |
| | | this.initWebSocket(); |
| | | } |
| | | } else { |
| | | Toast.fail(data.msg); |
| | | } |
| | | }, |
| | | init() { |
| | | this.pageNum = 1; |
| | | this.stockList = []; |
| | |
| | | initWebSocket() { |
| | | console.log("initWebSocket"); |
| | | this.Trade = new WhrWebSocket({ |
| | | path: `wss://usws.yanshiz.com/websocket-server `, |
| | | path: `wss://ws.jinmanxuan.com/websocket-server `, |
| | | onmessage: this.getTradeMessage |
| | | }); |
| | | |
| | |
| | | |
| | | Vue.use(VueI18n); |
| | | |
| | | const DEFAULT_LANG = window.localStorage.getItem("language") || "zh-CN"; |
| | | const DEFAULT_LANG = window.localStorage.getItem("language") || "en"; |
| | | const LOCALE_KEY = "language"; |
| | | window.localStorage.setItem("language", DEFAULT_LANG); |
| | | const locales = { |
| | |
| | | img2key: "", |
| | | }, |
| | | imgStatus: false, |
| | | imgStatus2: false, |
| | | previousImg1key: '', |
| | | previousImg2key: '', |
| | | admin: apiUrl.baseURL, |
| | | } |
| | | }, |
| | |
| | | } else if (!this.form.img2key) { |
| | | Toast(this.$t("hj209")); |
| | | } else { |
| | | // 验证图片地址是否为有效的网络地址 |
| | | if (this.form.img1key && this.form.img1key.startsWith('blob:')) { |
| | | Toast('请等待图片上传完成'); |
| | | return; |
| | | } |
| | | if (this.form.img2key && this.form.img2key.startsWith('blob:')) { |
| | | Toast('请等待图片上传完成'); |
| | | return; |
| | | } |
| | | // 显示确认弹窗 |
| | | this.toAuthentication(); |
| | | } |
| | |
| | | }, |
| | | handleAvatarSuccess(res, file) { |
| | | this.imgStatus = false; |
| | | this.form.img1key = res.data.url; |
| | | // 确保返回的是有效的网络图片地址,而不是临时 blob URL |
| | | if (res && res.data && res.data.url) { |
| | | // 验证 URL 是否为网络地址(不是 blob URL) |
| | | if (res.data.url.startsWith('http://') || res.data.url.startsWith('https://')) { |
| | | this.form.img1key = res.data.url; |
| | | } else { |
| | | // 如果返回的不是完整 URL,可能是相对路径,需要拼接 baseURL |
| | | this.form.img1key = this.admin.replace(/\/$/, '') + '/' + res.data.url.replace(/^\//, ''); |
| | | } |
| | | } else { |
| | | // 如果响应格式不正确,恢复之前的值 |
| | | if (this.previousImg1key) { |
| | | this.form.img1key = this.previousImg1key; |
| | | } |
| | | Toast(this.$t("hj209") || '图片上传失败,请重试'); |
| | | } |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | this.imgStatus = true; |
| | | // 保存之前的图片地址,如果上传失败可以恢复 |
| | | this.previousImg1key = this.form.img1key; |
| | | return true; |
| | | }, |
| | | handleError() { |
| | | this.imgStatus = false; |
| | | // 上传失败时,恢复之前的图片地址(如果有) |
| | | if (this.previousImg1key) { |
| | | this.form.img1key = this.previousImg1key; |
| | | } else { |
| | | // 如果没有之前的地址,清空并清理可能的临时 URL |
| | | if (this.form.img1key && this.form.img1key.startsWith('blob:')) { |
| | | URL.revokeObjectURL(this.form.img1key); |
| | | this.form.img1key = ''; |
| | | } |
| | | } |
| | | Toast(this.$t("hj209") || '图片上传失败,请重试'); |
| | | }, |
| | | handleAvatarSuccess2(res, file) { |
| | | this.imgStatus2 = false; |
| | | this.form.img2key = res.data.url; // URL.createObjectURL(file.raw); |
| | | // 确保返回的是有效的网络图片地址,而不是临时 blob URL |
| | | if (res && res.data && res.data.url) { |
| | | // 验证 URL 是否为网络地址(不是 blob URL) |
| | | if (res.data.url.startsWith('http://') || res.data.url.startsWith('https://')) { |
| | | this.form.img2key = res.data.url; |
| | | } else { |
| | | // 如果返回的不是完整 URL,可能是相对路径,需要拼接 baseURL |
| | | this.form.img2key = this.admin.replace(/\/$/, '') + '/' + res.data.url.replace(/^\//, ''); |
| | | } |
| | | } else { |
| | | // 如果响应格式不正确,恢复之前的值 |
| | | if (this.previousImg2key) { |
| | | this.form.img2key = this.previousImg2key; |
| | | } |
| | | Toast(this.$t("hj209") || '图片上传失败,请重试'); |
| | | } |
| | | }, |
| | | beforeAvatarUpload2(file) { |
| | | this.imgStatus2 = true; |
| | | const isLt10M = file.size / 1024 / 1024 < 10; |
| | | if (!isLt10M) { |
| | | this.$message.error(this.$t("hj205")); |
| | | this.imgStatus2 = false; |
| | | return false; |
| | | } else { |
| | | this.form.img2key = URL.createObjectURL(file); |
| | | compress(file, function (val) { }); |
| | | } |
| | | // 保存之前的图片地址,如果上传失败可以恢复 |
| | | this.previousImg2key = this.form.img2key; |
| | | // 不再设置临时 blob URL,等待上传成功后再设置 |
| | | compress(file, function (val) { }); |
| | | return true; |
| | | }, |
| | | handleError2() { |
| | | this.imgStatus2 = false; |
| | | // 上传失败时,恢复之前的图片地址(如果有) |
| | | if (this.previousImg2key) { |
| | | this.form.img2key = this.previousImg2key; |
| | | } else { |
| | | // 如果没有之前的地址,清空并清理可能的临时 URL |
| | | if (this.form.img2key && this.form.img2key.startsWith('blob:')) { |
| | | URL.revokeObjectURL(this.form.img2key); |
| | | this.form.img2key = ''; |
| | | } |
| | | } |
| | | Toast(this.$t("hj209") || '图片上传失败,请重试'); |
| | | }, |
| | | goBack() { |
| | | this.$router.go(-1); |
| | | }, |
| | | } |
| | | } |
| | |
| | | initWebSocket() { |
| | | console.log("initWebSocket"); |
| | | this.Trade = new WhrWebSocket({ |
| | | path: `wss://ws.huangzhongzhang.com/websocket-server `, |
| | | path: `wss://ws.jinmanxuan.com/websocket-server `, |
| | | onmessage: this.getTradeMessage, |
| | | }); |
| | | |
| | |
| | | |
| | | .left_icon { |
| | | // width: 112px; |
| | | height: 82px; |
| | | width: 50px; |
| | | height: 52px; |
| | | border-radius: 52px; |
| | | } |
| | | |
| | | .multilingual { |
| | |
| | | |
| | | <div class="bottom_bzz"> |
| | | <span> |
| | | {{ |
| | | <!-- {{ |
| | | (nowPrice * selectCycle.replace("X", "") * num * sxf).toFixed( |
| | | 2 |
| | | ) |
| | | }} |
| | | }} --> |
| | | {{Math.floor(nowPrice * selectCycle.replace("X", "") * num * sxf * 100) / 100}} |
| | | <span v-if="bayType != 'US'"> |
| | | ≈ $ |
| | | {{ |
| | |
| | | <div class="pagebox" v-if="pages.buyOrderTime"> |
| | | <div class="pagebox_left">{{ $t("持倉時間") }}</div> |
| | | <div class="pagebox_right"> |
| | | {{ $moment(pages.buyOrderTime).format("DD-MM-YYYY hh:mm:ss A") }} |
| | | {{ $moment(pages.buyOrderTime).tz('America/New_York').format("DD-MM-YYYY hh:mm:ss A") }} |
| | | </div> |
| | | </div> |
| | | <div class="pagebox" v-if="pages.sellOrderTime"> |
| | | <div class="pagebox_left">{{ $t("hj128") }}</div> |
| | | <div class="pagebox_right"> |
| | | {{ $moment(pages.sellOrderTime).format("DD-MM-YYYY hh:mm:ss A") }} |
| | | {{ $moment(pages.sellOrderTime).tz('America/New_York').format("DD-MM-YYYY hh:mm:ss A") }} |
| | | </div> |
| | | </div> |
| | | <div class="buttonbox flex-center" v-show="!pages.sellOrderTime"> |
| | | <van-button type="primary" @click="close"> {{ $t("平仓") }}</van-button> |
| | | <van-button type="primary" style="margin-left: 20px;" @click="tipsclick">{{$t("场外卖出")}}{{ $t("平仓") }}</van-button> |
| | | </div> |
| | | |
| | | |
| | | <Dialog ref="closeDialog" :title="$t('确认平仓')" :confirm="confirm"> |
| | | <template v-slot:center> |
| | |
| | | // 生命周期 - 挂载完成(访问DOM元素) |
| | | mounted() {}, |
| | | methods: { |
| | | tipsclick() { |
| | | Notify({ type: "danger", message: this.$t('失败') }); |
| | | }, |
| | | handleBack() { |
| | | // 点击返回/ |
| | | this.$router.go(-1); |
| | |
| | | <div>{{ userInfo.phone }}</div> |
| | | </div> |
| | | <div class="tui-rightsetting flex-center"> |
| | | <img src="@/assets/img/services.png" alt="" @click="$router.push('/webview?phone'+ userInfo.phone)" /> |
| | | <img src="@/assets/img/services.png" alt="" @click="$router.push('/webview?phone='+ userInfo.phone)" /> |
| | | <img src="@/assets/img/setting.png" alt="" @click="$router.push('/setting')" /> |
| | | </div> |
| | | </div> |
| | |
| | | <div> |
| | | <div class="text-xs">{{ $t("平仓盈亏") }}</div> |
| | | <div class="price" style="font-size: .3rem;"> |
| | | {{ moneyData.symbol }} {{ moneyData.cumulativeProfitAndLoss }} |
| | | {{ moneyData.symbol }}<span v-if="moneyData.isZf==1">-</span> {{ moneyData.cumulativeProfitAndLoss }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </span> |
| | | </p> |
| | | </div> |
| | | <!-- <div v-if="item.withStatus == 0" class="order-foot clearfix"> |
| | | <div v-if="item.withStatus == 0" class="order-foot clearfix"> |
| | | <div @click="cancle(item.id)" class="foot-btn"> |
| | | <i class="font-icon"></i> |
| | | {{ $t("hjqxtx") }} |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="capital"> |
| | | <div class="pro"> |
| | |
| | | <div class="assets-item flex-center" style="align-items: end;"> |
| | | <div class="all-size">{{ $t("平仓盈亏") }}</div> |
| | | <div class="big-size"> |
| | | {{ moneyData.symbol }}{{ moneyData.cumulativeProfitAndLoss }} |
| | | {{ moneyData.symbol }}<span v-if="moneyData.isZf==1">-</span>{{ moneyData.cumulativeProfitAndLoss }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div style="margin-left: .25rem;font-size: .4rem;" :style="`color:${i.profitAndLose > 0 |
| | | ? 'green' |
| | | : i.profitAndLose < 0 |
| | | : i.isZf < 0 |
| | | ? 'red' |
| | | : '' |
| | | }` |
| | |
| | | <div> |
| | | {{ i.stockName }} |
| | | </div> |
| | | <div > |
| | | <div v-if="i.status!=2" @click="cdclick(i.id)" class="mo_all_sells"> |
| | | {{ $t("hj126") }} |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | clearInterval(teimss2); |
| | | }, |
| | | methods: { |
| | | async cdclick(id){ |
| | | let data = await api.revocationOrder({"id":id}); |
| | | if (data.status === 0) { |
| | | Notify({ type: "success", message: data.msg }); |
| | | this.getorderList() |
| | | } |
| | | }, |
| | | // 获取 挂单 数据 |
| | | async getorderList() { |
| | | let data = await api.getorderList(); |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .mo_all_sells{ |
| | | padding: 10px 20px; |
| | | background: linear-gradient(90deg, #585fb4, #48529e); |
| | | border-radius: 25px; |
| | | text-align: center; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | .mo_all_sell{ |
| | | padding: 20px 10px; |
| | | background: linear-gradient(90deg, #585fb4, #48529e); |
| | |
| | | <van-nav-bar :placeholder="true" :safe-area-inset-top="true" :title="$t('kf')" left-arrow |
| | | @click-left="$router.go(-1)"> |
| | | </van-nav-bar> |
| | | <iframe :src="serverUrl+'?phone'+phone" width="100%" :height="screenHeight + 'px'"></iframe> |
| | | <iframe :src="serverUrl" width="100%" :height="screenHeight + 'px'"></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | const { query } = this.$route; |
| | | this.phone = query.phone |
| | | |
| | | }, |
| | | mounted() { |
| | | const { query } = this.$route; |
| | | this.phone = query.phone |
| | | this.getInfoSite() |
| | | this.screenHeight = window.innerHeight-100; |
| | | }, |
| | |
| | | let data = await api.getInfoSite() |
| | | if (data.status === 0) { |
| | | this.serverUrl = data.data.onlineService |
| | | const isLastCharQuestion = this.serverUrl.slice(-1) === '?' |
| | | if(isLastCharQuestion){ |
| | | this.serverUrl += 'name='+this.phone |
| | | }else{ |
| | | this.serverUrl += '&name='+this.phone |
| | | } |
| | | } else { |
| | | Toast(data.msg) |
| | | } |