const api = require("../../api/api") const app = getApp() Page({ data: { }, onLoad() { }, pay(event) { my.getAuthCode({ scopes: ['auth_base', 'auth_user', 'auth_zhima'], success: (res) => { api.request({ url: "zhima/auth", header: { "Authorization": app.globalData.token }, method: "POST", data: { code: res.authCode, } }).then(res => { console.log(res); }) }, }); my.navigateToMiniService({ serviceId: "2019072365974237", // 插件id,固定值勿改 servicePage: "pages/hz-enjoy/main/index", // 插件页面地址,固定值勿改 extraData: { "alipay.huabei.hz-enjoy.templateId": "2021031700020903000008948043", "alipay.huabei.hz-enjoy.partnerId": "2088731192435005", }, success: (res) => { console.log(res); }, fail: (error) => { console.log(error); }, complete: (res) => { console.log(res); }, }); }, });