1
jhzh
2025-11-12 1bd03f5c2e7b9fa9cc80c4e673e18132da411333
1
15 files modified
180 ■■■■ changed files
index.html 2 ●●● patch | view | raw | blame | history
src/assets/img/logo_1.png patch | view | raw | blame | history
src/axios/api.js 8 ●●●●● patch | view | raw | blame | history
src/axios/api.url.js 4 ●●●● patch | view | raw | blame | history
src/components/stock-list.vue 17 ●●●● patch | view | raw | blame | history
src/locales/index.js 2 ●●● patch | view | raw | blame | history
src/page/authentication/index.vue 83 ●●●●● patch | view | raw | blame | history
src/page/list/tradingList/data.list.vue 2 ●●● patch | view | raw | blame | history
src/page/login/login.vue 4 ●●● patch | view | raw | blame | history
src/page/trading/buy.vue 5 ●●●●● patch | view | raw | blame | history
src/page/user/Warehouse/Stockdetail.vue 9 ●●●● patch | view | raw | blame | history
src/page/user/account.vue 4 ●●●● patch | view | raw | blame | history
src/page/user/compontents/cash-list.vue 4 ●●●● patch | view | raw | blame | history
src/page/user/myOrder.vue 23 ●●●● patch | view | raw | blame | history
src/page/user/webview.vue 13 ●●●● patch | view | raw | blame | history
index.html
@@ -5,7 +5,7 @@
    <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">
src/assets/img/logo_1.png

src/axios/api.js
@@ -131,6 +131,10 @@
}
// 获取大盘指数
export function getExchange(options) {
  return get("/api/stock/getExchange.do", options);
}
// 获取大盘指数
export function getMarket(options) {
  return get("/api/stock/getMarket.do", options);
}
@@ -218,7 +222,11 @@
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);
src/axios/api.url.js
@@ -2,7 +2,7 @@
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',
@@ -14,7 +14,7 @@
  // 本地
  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" // 图片上传
  }
src/components/stock-list.vue
@@ -74,9 +74,22 @@
  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 = [];
@@ -140,7 +153,7 @@
    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
      });
src/locales/index.js
@@ -13,7 +13,7 @@
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 = {
src/page/authentication/index.vue
@@ -89,6 +89,9 @@
        img2key: "",
      },
      imgStatus: false,
      imgStatus2: false,
      previousImg1key: '',
      previousImg2key: '',
      admin: apiUrl.baseURL,
    }
  },
@@ -120,6 +123,15 @@
      } 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();
      }
@@ -167,31 +179,92 @@
    },
    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);
    },
  }
}
src/page/list/tradingList/data.list.vue
@@ -334,7 +334,7 @@
    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,
      });
src/page/login/login.vue
@@ -286,7 +286,9 @@
  .left_icon {
    // width: 112px;
    height: 82px;
    width: 50px;
    height: 52px;
    border-radius: 52px;
  }
  .multilingual {
src/page/trading/buy.vue
@@ -150,11 +150,12 @@
            <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'">
                  ≈ $
                  {{
src/page/user/Warehouse/Stockdetail.vue
@@ -92,18 +92,20 @@
      <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>
@@ -156,6 +158,9 @@
  // 生命周期 - 挂载完成(访问DOM元素)
  mounted() {},
  methods: {
    tipsclick() {
        Notify({ type: "danger", message: this.$t('失败') });
    },
    handleBack() {
      // 点击返回/
      this.$router.go(-1);
src/page/user/account.vue
@@ -6,7 +6,7 @@
        <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>
@@ -40,7 +40,7 @@
        <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>
src/page/user/compontents/cash-list.vue
@@ -119,12 +119,12 @@
                </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">
src/page/user/myOrder.vue
@@ -39,7 +39,7 @@
          <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>
@@ -192,7 +192,7 @@
            </div>
            <div style="margin-left: .25rem;font-size: .4rem;" :style="`color:${i.profitAndLose > 0
              ? 'green'
              : i.profitAndLose < 0
              : i.isZf < 0
                ? 'red'
                : ''
              }`
@@ -250,7 +250,8 @@
          <div>
            {{ i.stockName }}
          </div>
         <div >
         <div v-if="i.status!=2" @click="cdclick(i.id)" class="mo_all_sells">
           {{ $t("hj126") }}
          </div>
        </div>
@@ -384,6 +385,13 @@
    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();
@@ -457,6 +465,15 @@
</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);
src/page/user/webview.vue
@@ -3,7 +3,7 @@
    <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>
@@ -21,10 +21,11 @@
    };
  },
  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;
  },
@@ -34,6 +35,12 @@
      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)
      }