增加h5跳转app

This commit is contained in:
YeMingfei666 2024-12-09 16:40:22 +08:00
parent 78c8acf09b
commit 5458022b20
3 changed files with 12 additions and 3 deletions

View File

@ -58,7 +58,8 @@
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 26, "minSdkVersion" : 26,
"targetSdkVersion" : 30 "targetSdkVersion" : 30,
"schemes" : "hnsiyao"
}, },
/* ios */ /* ios */
"ios" : { "ios" : {

View File

@ -6,13 +6,14 @@
<view class="u-m-t-32 u-text-center">支付成功</view> <view class="u-m-t-32 u-text-center">支付成功</view>
<view class="u-flex u-row-center u-m-t-32"> <view class="u-flex u-row-center u-m-t-32">
<view style="width: 600rpx;"> <view style="width: 600rpx;">
<u-button type="success">确定</u-button> <u-button type="success" @click="confirm">确定</u-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {openApp} from '@/utils/app.js'
export default { export default {
data() { data() {
return { return {
@ -20,7 +21,9 @@
} }
}, },
methods: { methods: {
confirm(){
openApp()
}
} }
} }
</script> </script>

5
utils/app.js Normal file
View File

@ -0,0 +1,5 @@
export function openApp(url){
// #ifdef H5
window.location.href='hnsiyao://'
// #endif
}