首页 > 编程知识 正文

把小程序转为app,怎么把代码转化成软件

时间:2023-05-05 13:22:29 阅读:54189 作者:4815

调用第三方微信登录

appLogin: function (

var t=this;

uni.get提供程序({ (

服务: ' Oauth ',

success(RES )是

if (RES.provider.index of (' weixin ' ) ) }

uni.login({

提供商: ' weixin ',

success(RES )是

uni.getUserInfo({ (

提供商: ' weixin ',

success (信息) {

控制台. log (info ) )。

}

() )

}

}

() )

(,

注意:

1. Hbuilder调试选择基于自定义

2.[ endif ]微信开放平台的APP应用程序签名

3 .获取APP应用程序签名

uni.requestPayment({ (

提供商: ' wx pay ',

订单信息: {

appid: res.data.data.appId,

partner id : RES.data.data.mch _ id,

prepay id : RES.data.data.prepay _ id,

package: 'Sign=WXPay ',

nonce str : RES.data.data.nonce str,

timestamp 3360 RES.data.data.timestamp,

sign: res.data.data.sign,

(,

UC cess :功能(t ) },

完成(err ) {

控制台. log (err )

}

();

微信分享

分享朋友圈

shareFriendcricle (

uni.share({ (

提供商: ' weixin ',

scene: 'WXSenceTimeline ',

类型:0,

href: '/pages/course/detail? id=' this.id,

title: this.detail.title,

summary : this.detail.subject,

imageurl : this.detail.images [0],

success :功能(RES ) {

console.log(success: ) JSON.stringify(RES );

(,

故障:功能(err ) {

控制台. log (故障: ) JSON.stringify(err );

}

);

(,

分享朋友

sharefriend(}

uni.share({ (

提供商: ' weixin ',

scene: 'WXSceneSession ',

类型:0,

href: '/pages/course/detail? id=' this.id,

title: this.detail.title,

summary : this.detail.subject,

imageurl : this.detail.images [0],

success :功能(RES ) {

console.log(success: ) JSON.stringify(RES );

(,

故障:功能(err ) {

控制台. log (故障: ) JSON.stringify(err );

}

);

(,

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。