Selaa lähdekoodia

Merge branch 'CRM_12.9'

hbchen 2 vuotta sitten
vanhempi
commit
cdee757a85
6 muutettua tiedostoa jossa 28 lisäystä ja 3 poistoa
  1. 3 1
      .env.development
  2. 3 1
      .env.production
  3. 3 1
      .env.test
  4. BIN
      src/assets/icon-yben.png
  5. 16 0
      src/layout/component/Header.vue
  6. 3 0
      vite.config.js

+ 3 - 1
.env.development

@@ -7,4 +7,6 @@ VITE_APP_OUTDIR="dist"
 # 扫码登录appid
 VITE_APP_APPID="wxcba9a7ec590ee2d5"
 # 扫码登录回跳地址
-VITE_APP_REDIRECT_URI="https://ybpctest.hzinsights.com/report/index"
+VITE_APP_REDIRECT_URI="https://ybpctest.hzinsights.com/report/index"
+# 英文研报跳转地址
+VITE_EN_YB_PC="http://8.136.199.33:8301/report/index"

+ 3 - 1
.env.production

@@ -7,4 +7,6 @@ VITE_APP_OUTDIR="hongze_yb_pc"
 # 扫码登录appid
 VITE_APP_APPID="wx4da95782cfc8c5eb"
 # 扫码登录回跳地址
-VITE_APP_REDIRECT_URI="https://ybpc.hzinsights.com/report/index"
+VITE_APP_REDIRECT_URI="https://ybpc.hzinsights.com/report/index"
+# 英文研报跳转地址
+VITE_EN_YB_PC="https://ybpcen.hzinsights.com/report/index"

+ 3 - 1
.env.test

@@ -7,4 +7,6 @@ VITE_APP_OUTDIR="hongze_yb_pc"
 # 扫码登录appid
 VITE_APP_APPID="wxcba9a7ec590ee2d5"
 # 扫码登录回跳地址
-VITE_APP_REDIRECT_URI="https://ybpctest.hzinsights.com/report/index"
+VITE_APP_REDIRECT_URI="https://ybpctest.hzinsights.com/report/index"
+# 英文研报跳转地址
+VITE_EN_YB_PC="http://8.136.199.33:8301/report/index"

BIN
src/assets/icon-yben.png


+ 16 - 0
src/layout/component/Header.vue

@@ -179,7 +179,17 @@ const handleSetUserInfo=()=>{
 
 // 我的收藏
 let showCollect=ref(false)
+// 是否在小程序环境中 区分网页版和PC小程序
+const isInMini=ref(false)
 
+wx.miniProgram.getEnv(res=>{
+  isInMini.value=res.miniprogram
+})
+
+const goYBPCEN=()=>{
+    let href = import.meta.env.VITE_EN_YB_PC
+    window.open(href,'_blank');
+}
 
 </script>
 
@@ -190,6 +200,7 @@ let showCollect=ref(false)
       <span>弘则研报</span>
     </div>
     <div class="flex-col-center userinfo-wrap">
+      <img src="@/assets/icon-yben.png" class="yben-icon" @click="goYBPCEN" v-if="!isInMini"/>
       <!-- 我的收藏 -->
       <el-popover trigger="click" @show="showCollect=true" @hide="showCollect=false" :width="460" popper-style="box-shadow: rgb(14 18 22 / 35%) 0px 10px 38px -10px, rgb(14 18 22 / 20%) 0px 10px 20px -15px; padding: 20px;">
         <template #reference>
@@ -311,6 +322,11 @@ let showCollect=ref(false)
     float: right;
     // width: 120px;
     height: 100%;
+    .yben-icon{
+      height: 26px;
+      margin-right: 21px;
+      cursor: pointer;
+    }
     .icon-scan {
       width: 26px;
       height: 26px;

+ 3 - 0
vite.config.js

@@ -6,6 +6,9 @@ import path from "path";
 export default ({mode})=> defineConfig({
   base: loadEnv(mode,process.cwd()).VITE_APP_BASE_URL,// 若服务器不是将该项目放在根目录的则 需要此设置 和服务器上同名
   plugins: [vue()],
+  server:{
+    host:true
+  },
   resolve: {
     alias: {
       "@": path.resolve(__dirname, "./src"),