- 需求:下部导航栏一个tabBar不够用问题?
小程序制作过程中,需要用到,多种身份对应多个tabBar,一个tabBar已经不能满足应用需求,如:客户端、管理端、服务端;
2020-06-06 - 云数据库的极限是多少记录?每个数据大小有极限吗?
云数据库的极限是多少记录?每个数据大小有极限吗?
2020-05-22 - 运行提示:调用支付JSAPI缺少参数:totalfee ,为什么?
1、云函数 const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) exports.main = async (event, context) => { const res = await cloud.cloudPay.unifiedOrder({ "body" : "小秋TIT店-超市", "outTradeNo" : "1217752501201407033233368018", "spbillCreateIp" : "127.0.0.1", "subMchId" : "1900009231", "totalFee" : 1, "envId": "test-f0b102", "functionName": "pay_cb" }) return res } 2、 小程序代码 wx.cloud.callFunction({ name: '函数名', data: { // ... }, success: res => { const payment = res.result.payment wx.requestPayment({ ...payment, success (res) { console.log('pay success', res) }, fail (res) { console.error('pay fail', err) } }) }, fail: console.error, }) 运行提示:调用支付JSAPI缺少参数:totalfee ,为什么?
2020-05-22 - 支付JSAPI缺少参数:totalFee ,为什么?
1、云函数 const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) exports.main = async (event, context) => { const res = await cloud.cloudPay.unifiedOrder({ "body" : "小秋TIT店-超市", "outTradeNo" : "1217752501201407033233368018", "spbillCreateIp" : "127.0.0.1", "subMchId" : "1900009231", "totalFee" : 1, "envId": "test-f0b102", "functionName": "pay_cb" }) return res } 2、 小程序代码 wx.cloud.callFunction({ name: '函数名', data: { // ... }, success: res => { const payment = res.result.payment wx.requestPayment({ ...payment, success (res) { console.log('pay success', res) }, fail (res) { console.error('pay fail', err) } }) }, fail: console.error, }) 运行提示:调用支付JSAPI缺少参数:totalfee ,为什么?
2020-05-22 - 做云函数,解析project.config.json 文件失败,请检查其内容或删除此文件?
我的第一个云函数我们以定义一个将两个数字相加的函数作为我们第一个云函数的示例。 在项目根目录找到 [代码]project.config.json[代码] 文件,新增 [代码]cloudfunctionRoot[代码] 字段,指定本地已存在的目录作为云函数的本地根目录 示例: { "cloudfunctionRoot": "./functions/" } 操作后提示:解析[代码]project.config.json[代码] 文件失败,请检查其内容或删除此文件 这是为什么? 我换了台电脑操作成功,为什么?????? 出错的电脑是win7,用了 Fidder;成功的电脑是win8,为什么???
2020-05-18 - 最新云支付相关代码注释正确吗?
//云函数代码 名称?pay.js const cloud = require('wx-server-sdk') cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) exports.main = async (event, context) => { const res = await cloud.cloudPay.unifiedOrder({ "body" : "小秋TIT店-超市", "outTradeNo" : "1217752501201407033233368018", //订单号 可以写成动态 "spbillCreateIp" : "123.207.180.217", //我的云函数ip 这个注释正确吗?云函数有ip吗? "subMchId" : "1900009231", // 商户ID "totalFee" : 1, //1分钱 "envId": "test-f0b102", //小程序云开发号 "functionName": "pay_cb" //回调云函数 这个函数能写一个空函数吗?? }) return res } // 小程序代码 wx.cloud.callFunction({ name: 'pay.js', //这个名称写的正确码? data: { // ... }, success: res => { const payment = res.result.payment wx.requestPayment({ ...payment, success (res) { console.log('pay success', res) }, fail (res) { console.error('pay fail', err) } }) }, fail: console.error, })
2020-05-16 - 已实现小程序MM跳转到小程序qq,但数据通过extraData传递,接收没有成功?
已实现小程序MM跳转到小程序qq,但数据通过extraData传递,接收没有成功? 一、小程序MM 1、index.js Page({ onchick:function(){ wx.navigateToMiniProgram({ appId: 'qqqqqqqqqqqqqqqq', path: 'pages/index/index',//可以传参 extraData: { //需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据 mm:9 }, envVersion: 'develop', //重点**要打开的小程序版本,有效值 develop(开发版),trial(体验版),release(正式版) success(res) { console.log('打开成功')// 打开成功 } }) }, }) 2、index.wxml <button bindtap='onchick'>跳转</button> 3、app.json "navigateToMiniProgramAppIdList":[ "qqqqqqqqqqqqqqqq", "wwwwwwwwwwwwwwww" ] 二、小程序qq 1、app.js App({ onLaunch: function () { // 展示本地存储能力 }, onShow: function (res) { console.log('test0',res.query.mm) this.globalData.tt= res.query.mm //能给globalData中的tt赋值吗? }, globalData: { userInfo: null, tt:'', } }) 2、index.js Page({ data: { }, onLoad: function () { var app=getApp(); console.log("test---",app.globalData.tt) //提示 undefined??? var ddd=app.globalData.tt //从app.js中获取globalData中的tt this.setData:{ ddd:ddd //提示ddd无法定义?为什么? } }, }) 2、index.wxml <view > 测试{{ddd}} </view>
2020-05-15 - 在app.js中其他函数能给globalData中的tt赋值吗?
//app.js App({ onLaunch: function () { // 展示本地存储能力 }, onShow: function (res) { console.log('test0',res.query.mm) this.globalData.tt= res.query.mm //能给globalData中的tt赋值吗? }, globalData: { userInfo: null, tt:'', } })
2020-05-15 - navigateToMiniProgram跳转成功,获取数据提示错误?
wx.navigateToMiniProgram({ appId: 'xxxxxxxxxxxxxxxxxxx', path: 'page/index/index?id=123',//---------------path为空,能跳转,但写上路径,跳转 提示:“页面不存在”????????? extraData: { //需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据 test:9 }, envVersion: 'develop', //重点**要打开的小程序版本,有效值 develop(开发版),trial(体验版),release(正式版) success(res) { console.log('打开成功')// 打开成功 } 跳转成功后的页面 onShow: function (res) { console.log('test0',res.query.mm) //用query获取数据,提示出现错误:VM109:1 thirdScriptError Cannot read property 'query' of undefined;at "pages/mt/index" page lifeCycleMethod onShow function TypeError: Cannot read property 'query' of undefined at Se.onShow (http://127.0.0.1:22518/appservice/pages/mt/index.js:27:30) at Se.<anonymous> (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1747424) at Se.p.__callPageLifeTime__ (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1747169) at xt (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1762938) at http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1766232 at Mt (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1766725) at Function.<anonymous> (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1774830) at i.<anonymous> (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:1738454) at i.emit (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:615430) at Object.emit (http://127.0.0.1:22518/appservice/__dev__/WAService.js:2:582139) },
2020-05-15 - 问题已经解决?
问题已经解决
2020-05-15