This commit is contained in:
魏啾
2024-05-22 14:31:07 +08:00
parent 7cd5649764
commit f832e312bf
7 changed files with 178 additions and 42 deletions

View File

@@ -29,6 +29,10 @@
<image src="@/static/item8.png" mode="aspectFill"></image>
<text>审核开票</text>
</view>
<view class="content flex-colum" @click="jumpToMiniProgram" v-if="improveinformation">
<image src="@/static/item8.png" mode="aspectFill"></image>
<text>跳转小程序</text>
</view>
</view>
<view class="setClipboardDataclass" @click="setClipboardData" v-if="infos.deviceType != 'pc'">
网页版地址:https://h5-invoice.sxczgkj.cn
@@ -44,13 +48,13 @@
improveinformationlist: {},
onLoaduserId: '',
onLoadtype: '',
infos:uni.getSystemInfoSync()
infos: uni.getSystemInfoSync()
};
},
async onLoad(e) {
if (e.userId) {
// this.onLoaduserId = e.userId
// this.onLoadtype = e.type
// this.onLoadtype = e.type//295
uni.cache.set('userId', e.userId);
}
let res = await this.api.storestorestatus({
@@ -93,16 +97,51 @@
},
onShow() {},
methods: {
jumpToMiniProgram() {
plus.share.getServices(function (res) {
var sweixin = null;
for (var i = 0; i < res.length; i++) {
var t = res[i];
if (t.id == 'weixin') {
sweixin = t;
}
}
if (sweixin) {
sweixin.launchMiniProgram({
id:'gh_fa9286427a5b', //这里写你的小程序原始id以gh开头
type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
});
}
});
// // #ifdef H5
// // 在H5环境中调用此函数来跳转到小程序
// wx.navigateToMiniProgram({
// appId: 'wxd88fffa983758a30', // 小程序的appid
// path: 'pages/index/index', // 打开的页面路径,若为空则打开首页
// extraData: {}, // 需要传递给小程序的数据
// success(res) {
// // 打开成功的回调
// console.log('跳转成功');
// },
// fail(err) {
// // 打开失败的回调
// console.error('跳转失败', err);
// }
// });
// // jumpToMiniProgram('小程序的appid', '小程序页面路径');
// // #endif
},
setClipboardData() {
uni.setClipboardData({
data: 'https://h5-invoice.sxczgkj.cn/?userId=' + uni.cache.get('userId'),
success: function() {}
});
},
auditbilling(){
auditbilling() {
uni.pro.navigateTo('index/auditbilling');
},
billingcode(){
billingcode() {
uni.pro.navigateTo('index/billingcode');
},
drawer() {
@@ -160,7 +199,7 @@
}
.content {
.setClipboardDataclass{
.setClipboardDataclass {
width: 100%;
text-align: center;
margin-top: 90rpx;
@@ -168,8 +207,9 @@
font-weight: bold;
font-size: 28rpx;
}
.Box {
padding: 0rpx 28rpx;
.content {