Browse Source

fixed webview query

tid1867
刘嘉炜 3 months ago
parent
commit
b57bc976f3
  1. 5
      src/pages/index/index.vue
  2. 4
      src/pages/login/login.vue
  3. 4
      src/pages/merchant_login/merchant_login.vue
  4. 4
      src/subpackage/wallet/pages/index/index.vue

5
src/pages/index/index.vue

@ -55,7 +55,7 @@
<authorization-login ref="authorizationLogin"></authorization-login> <authorization-login ref="authorizationLogin"></authorization-login>
<view class="fly_btn" @click="toPageInfo(tabList[4])" v-if="loginState&&isPermissionShowTab(tabList[4])">
<view class="fly_btn" @click="toPageInfo(getTabForID(4))" v-if="loginState&&isPermissionShowTab(getTabForID(4))">
<image class="f_bg" src="/static/images/icon/index/green_bg_circle.png" mode="scaleToFill"/> <image class="f_bg" src="/static/images/icon/index/green_bg_circle.png" mode="scaleToFill"/>
<image class="f_icon" src="/static/images/icon/index/scan_icon_white.png" mode="scaleToFill"/> <image class="f_icon" src="/static/images/icon/index/scan_icon_white.png" mode="scaleToFill"/>
<text>核销</text> <text>核销</text>
@ -201,6 +201,9 @@
if(JSON.stringify(indexData)!='{}'&&loginState)getIndexInfo(); if(JSON.stringify(indexData)!='{}'&&loginState)getIndexInfo();
}, },
methods: { methods: {
getTabForID(id){
return tabList.find(e=>e.id === id) || {}
},
// ID1000840 // ID1000840
isPermissionShowTab(e){ isPermissionShowTab(e){
let { indexData } = this; let { indexData } = this;

4
src/pages/login/login.vue

@ -43,7 +43,7 @@
<script> <script>
import { API } from '../../js/api'; import { API } from '../../js/api';
import { servers } from '../../js/server'; import { servers } from '../../js/server';
import util from '../../utils/util';
import util, { jsonStr } from '../../utils/util';
// import wxplugin from '../../utils/wx_plugin'; // import wxplugin from '../../utils/wx_plugin';
const uniGetSetting = util.promisify(uni.getSetting); const uniGetSetting = util.promisify(uni.getSetting);
const uniLogin = util.promisify(uni.login); const uniLogin = util.promisify(uni.login);
@ -189,7 +189,7 @@ export default {
} }
}, },
toWebView(){ toWebView(){
util.routeTo(`/pages/web_view/web_view?src=${encodeURIComponent("https://www.ouxuanzhineng.cn")}`,'rL');
util.routeTo(`/pages/web_view/web_view?src=${jsonStr("https://www.ouxuanzhineng.cn")}`,'rL');
} }
}, },
} }

4
src/pages/merchant_login/merchant_login.vue

@ -8,11 +8,11 @@
</view> </view>
</template> </template>
<script> <script>
import util from '../../utils/util'
import util, { jsonStr } from '../../utils/util'
export default { export default {
methods: { methods: {
toWebView(){ toWebView(){
util.routeTo(`/pages/web_view/web_view?src=${encodeURIComponent("https://www.ouxuanzhineng.cn")}`,'rL');
util.routeTo(`/pages/web_view/web_view?src=${jsonStr("https://www.ouxuanzhineng.cn/")}`,'rL');
} }
} }
} }

4
src/subpackage/wallet/pages/index/index.vue

@ -34,7 +34,7 @@ import walletModalSuccess from '../../components/wallet_modal_success.vue';
import rechargeModal from "./modules/recharge_modal.vue"; import rechargeModal from "./modules/recharge_modal.vue";
import { WALLET_API } from '../../js/api'; import { WALLET_API } from '../../js/api';
import servers from '../../js/server'; import servers from '../../js/server';
import { routeTo, showLoad, hideLoad, debounce, showModal } from '@/utils/util';
import { routeTo, showLoad, hideLoad, debounce, showModal, jsonStr } from '@/utils/util';
export default { export default {
components: { components: {
'wallet-info': walletInfo, 'wallet-info': walletInfo,
@ -80,7 +80,7 @@ export default {
}) })
}, 300, true), }, 300, true),
toWebView(){ toWebView(){
routeTo(`/pages/web_view/web_view?src=${encodeURIComponent(this.getAdminAddress())}`,'nT');
routeTo(`/pages/web_view/web_view?src=${jsonStr(this.getAdminAddress())}`,'nT');
}, },
getAdminAddress(){ getAdminAddress(){
let _appid = uni.getAccountInfoSync()?.miniProgram?.appId || ''; let _appid = uni.getAccountInfoSync()?.miniProgram?.appId || '';

Loading…
Cancel
Save