初始化
This commit is contained in:
@@ -53,4 +53,8 @@ export default {
|
|||||||
szzpyissuedby(data) { //开票人列表
|
szzpyissuedby(data) { //开票人列表
|
||||||
return uni.api.post("szzpy/issuedby", data);
|
return uni.api.post("szzpy/issuedby", data);
|
||||||
},
|
},
|
||||||
|
userttwechat(data) { //开票人列表
|
||||||
|
return uni.api.post("user/ttwechat", data);
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -7,7 +7,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"uview-ui": "^2.0.36"
|
"uview-ui": "^2.0.36",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/base64-arraybuffer": {
|
"node_modules/base64-arraybuffer": {
|
||||||
@@ -66,6 +67,11 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"HBuilderX": "^3.1.0"
|
"HBuilderX": "^3.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/weixin-js-sdk": {
|
||||||
|
"version": "1.6.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
|
||||||
|
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import wx from 'weixin-js-sdk';
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
@@ -97,22 +98,46 @@
|
|||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
jumpToMiniProgram() {
|
async jumpToMiniProgram() {
|
||||||
plus.share.getServices(function (res) {
|
let res = await this.api.userttwechat()
|
||||||
var sweixin = null;
|
console.log(res)
|
||||||
for (var i = 0; i < res.length; i++) {
|
// plus.share.getServices(function (res) {
|
||||||
var t = res[i];
|
// var sweixin = null;
|
||||||
if (t.id == 'weixin') {
|
// for (var i = 0; i < res.length; i++) {
|
||||||
sweixin = t;
|
// var t = res[i];
|
||||||
}
|
// if (t.id == 'weixin') {
|
||||||
}
|
// sweixin = t;
|
||||||
if (sweixin) {
|
// }
|
||||||
sweixin.launchMiniProgram({
|
// }
|
||||||
id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
// if (sweixin) {
|
||||||
type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
// sweixin.launchMiniProgram({
|
||||||
path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
// id:'gh_fa9286427a5b', //这里写你的小程序原始id(以gh开头)
|
||||||
});
|
// type: 0, // //小程序版本 0-正式版; 1-测试版; 2-体验版
|
||||||
}
|
// path: 'pages/index/index' //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
wx.config({
|
||||||
|
"debug": true,
|
||||||
|
"beta": false,
|
||||||
|
"jsApiList": ['wx-open-launch-weapp'],
|
||||||
|
openTagList: ['wx-open-launch-weapp'], // 跳转小程序时必填
|
||||||
|
"appId": res.data.wechat_mini.appId,
|
||||||
|
"nonceStr": res.data.wechat_mini.nonceStr,
|
||||||
|
"timestamp": res.data.wechat_mini.timestamp,
|
||||||
|
"url": res.data.wechat_mini.url,
|
||||||
|
"signature": res.data.wechat_mini.signature,
|
||||||
|
});
|
||||||
|
// res.data.wechat_mini
|
||||||
|
// 在wx.ready内调用
|
||||||
|
wx.ready(function() {
|
||||||
|
// 在这里调用 API
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/index' // 跳转到的页面路径
|
||||||
|
});
|
||||||
|
});
|
||||||
|
wx.error(function(res) {
|
||||||
|
console.log('err', res)
|
||||||
});
|
});
|
||||||
// // #ifdef H5
|
// // #ifdef H5
|
||||||
// // 在H5环境中,调用此函数来跳转到小程序
|
// // 在H5环境中,调用此函数来跳转到小程序
|
||||||
|
|||||||
2
unpackage/dist/build/web/index.html
vendored
2
unpackage/dist/build/web/index.html
vendored
@@ -3,4 +3,4 @@
|
|||||||
document.write(
|
document.write(
|
||||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||||
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1716373696937"></script><script src="/index.js?v=1716373696937"></script></body></html>
|
'" />')</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src="/chunk-vendors.js?v=1716445785217"></script><script src="/index.js?v=1716445785217"></script></body></html>
|
||||||
Reference in New Issue
Block a user