- swiftUI微信登录,onResp不调用?
swifitUI实现微信登录,同意授权后,onResp不调用,其他配置文件都正确,在UIKit中是起作用的,appdelegate或者scenedelegate中都尝试过,在没有安装微信的时候,拒绝登录时候调用onRep的,但是安装了微信就是不行[图片]
2022-03-18 - onshow显示数组个数length?
[图片] 和data的数据长度不一样在怎么办,在生命周期函数--监听页面显示
2020-12-12 - 小程序会员卡开发组件?
一键激活,非跳转型会员卡 创建会员卡是不是需要审核通过啊, 还是 因为是测试的公众平台号 所以在跳转到领卡小程序的时候会激活失败
2020-11-06 - 会员卡激活失败?求大佬帮看看
我用的是测试的access_token,是非跳转型一键激活,领取会员卡显示激活失败 真机测试结果错误现象: [图片] 用的这个组件: <navigator target="miniProgram" app-id="wxeb490c6f9b154ef9" extra-data="{{data}}">会员卡开卡</navigator> 这是我的创建会员接口的代码: card_id:function(){ var that=this; wx.request({ url: 'https://api.weixin.qq.com/card/create?access_token=38_hnCvyoWGd06d6We61X5aR7auLwuvZ6HYWKqjh2YBq32kGZ0yEmhwJxRhdcBU0kMWlbGU-vh2vKq1fKRfak-1u5obN2J_sJ3SpQWfy7vsZZcRueKMA4VI4rPx3JwI1FZU39DgKf7lp12HgWKLTINfAEAJYD', method:"POST", data:{ "card": { "card_type": "MEMBER_CARD", "member_card": { "background_pic_url": "https://mmbiz.qlogo.cn/mmbiz/",//背景图 "base_info": { "logo_url": "http://mmbiz.qpic.cn/mmbiz_jpg/oRMZVStIHknlh4ibB4HiaGwZObDEGB35Kw3OZoJWcKuvMibF0Z4pM6mxciaLibbzGWZSZEeJiauOudnK9iaOghWF04aEQ/0",//头像图片 "brand_name": "欣容理发", "code_type": "CODE_TYPE_QRCODE",//二维码 "title": "会员卡", "color": "Color010", "notice": "使用时向服务员出示此券", "service_phone": "020-88888888", "description": "不可与其他优惠同享", "date_info": { "type": "DATE_TYPE_PERMANENT",//永久有效 }, "sku": { "quantity": 50000000//卡券库存 }, "get_limit": 1, "use_custom_code": false,//不自定义code "can_give_friend": false,//不可转赠 }, "advanced_info": { "abstract": { "abstract": "微信餐厅推出多种新季菜品,期待您的光临", "icon_url_list": [ "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sjpiby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0" ] }, "text_image_list": [ { "image_url": "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sjpiby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0", "text": "此菜品精选食材,以独特的烹饪方法,最大程度地刺激食 客的味蕾" }, { "image_url": "http://mmbiz.qpic.cn/mmbiz/p98FjXy8LacgHxp3sJ3vn97bGLz0ib0Sfz1bjiaoOYA027iasqSG0sj piby4vce3AtaPu6cIhBHkt6IjlkY9YnDsfw/0", "text": "此菜品迎合大众口味,老少皆宜,营养均衡" } ], "business_service": [ "BIZ_SERVICE_FREE_WIFI", "BIZ_SERVICE_WITH_PET", "BIZ_SERVICE_FREE_PARK", "BIZ_SERVICE_DELIVER" ] }, "supply_bonus": true, "supply_balance": false, "prerogative": "test_prerogative", //"auto_activate":true,//自动激活 "wx_activate":true,//一键激活 //"wx_activate_after_submit":true, //"wx_activate_after_submit_url" : "http://qq.com", "bonus_rule": { "cost_money_unit": 100, "increase_bonus": 1, "max_increase_bonus": 200, "init_increase_bonus": 10, "cost_bonus_unit": 5, "reduce_money": 100, "least_money_to_use_bonus": 1000, "max_reduce_bonus": 50 }, "discount": 10 } } }, success:(res)=>{ console.log('获取cardID成功',res) that.setData({ cardID:res.data.card_id, }) let cardid = this.data.cardID; wx.request({ url: 'https://api.weixin.qq.com/card/membercard/activateuserform/set?access_token=38_hnCvyoWGd06d6We61X5aR7auLwuvZ6HYWKqjh2YBq32kGZ0yEmhwJxRhdcBU0kMWlbGU-vh2vKq1fKRfak-1u5obN2J_sJ3SpQWfy7vsZZcRueKMA4VI4rPx3JwI1FZU39DgKf7lp12HgWKLTINfAEAJYD', method:"POST", data:{ "card_id": cardid, "service_statement": { "name": "会员守则", "url": "https://www.qq.com" }, "bind_old_card": { "name": "老会员绑定", "url": "https://www.qq.com" }, "required_form": { "can_modify":false, "common_field_id_list": [ "USER_FORM_INFO_FLAG_MOBILE" ] }, "optional_form": { "can_modify":false, "common_field_id_list": [ "USER_FORM_INFO_FLAG_LOCATION", "USER_FORM_INFO_FLAG_BIRTHDAY" ], } }, success(res){ console.log('设置会员卡开卡字段成功',res) //获取开卡组件链接 wx.request({ url: 'https://api.weixin.qq.com/card/membercard/activate/geturl?access_token= 38_hnCvyoWGd06d6We61X5aR7auLwuvZ6HYWKqjh2YBq32kGZ0yEmhwJxRhdcBU0kMWlbGU-vh2vKq1fKRfak-1u5obN2J_sJ3SpQWfy7vsZZcRueKMA4VI4rPx3JwI1FZU39DgKf7lp12HgWKLTINfAEAJYD', method:'POST', data:{ "card_id" :cardid, "outer_str" : "123" }, success(res){ console.log('获取开卡组件链接成功',res) }, fail(err){ console.log('获取开卡组件链接失败',err) } }) }, fail(err){ console.log('设置会员卡开卡字段失败',err) } }) }, fail(err){ console.log('获取cardID失败',err) } }) },
2020-11-05 - 新手不会啊,获取会员开卡插件参数?
card:function(){ wx.request({ url: 'https://api.weixin.qq.com/card/membercard/activate/geturl?access_token= ACCESS_TOKEN', method:"POST", access_token:"38_ZrEhrg8d0jciiol_XeIKx1Qp2uuAL9EVUOsWFTAtdAQquo0vaBh2tR0AQIPT56l4BbefIlC8qNwx1W4_wU9IHrY4jY9XQhI9f-_A-eCjtpj0odDmOM-jCGyC1JmMu84LsoGSSlIHXemhnozPJGJcAAAMJM", card_id:"pxn4S6MWtwgxIihmLdpY_6TZimsE", success(res){ console.log(res) }, fail(err){ console.log(err) } }) } 这样写对不对啊
2020-11-04 - 勾选了不校验,为啥还不行?
[图片]
2020-11-04 - 开发工具模拟器和真机调试不一样?
[图片][图片] 一个是宫格图没加载出来,还有一个是tabBar颜色的问题 手机是小米8SE,muiu12 宫格代码: <view class='grid-item-container'> <block wx:for="{{grids2}}" wx:key="index"> <view class='grid-item-child'> <view class="grid_v"> <image src="{{item.image}}" class="grid_image" ></image> <text class='grid-item-label'>{{item.text}}</text> </view> </view> </block> </view> tabBar代码如下: "tabBar": { "borderStyle":"white", "color": "#000000", "selectedColor": "#D3D3D3", "backgroundColor": "000000", "list": [{ "pagePath": "pages/index/index", "text": "首页", "iconPath": "images/index.png", "selectedIconPath": "images/index1.png" }, { "pagePath": "pages/user/user", "text": "我的", "iconPath": "images/user.png", "selectedIconPath": "images/user1.png" } ] },
2020-10-25 - 云开发,发送邮件,附件?
关于附件得问题,会报错,应该怎么写,可以获得附件 错误内容: [图片] 部分代码如下 let info = await transporter.sendMail({ from: "1755143168@qq.com",//必须和auth.user相同,否则会报553错误 subject: '佩奇晚上好', //主题 to: '1649783672@qq.com',// 收件人邮箱 text:JSON.stringify(arr,null," \n "), //发送给邮箱的内容 attachments:[ { filename:'测试3', path:'/user_file/0.9279870790533147.doc' }, { filename:'测试3', content:'https://6361-campusprinting-4guaey7l34880aa5-1303184703.tcb.qcloud.la/icon/3.png?sign=160dd87f0724d886b142b8b747654c00&t=1602768635' } ] });
2020-10-15 - wx.chooseMessageFile真机不能用问题?
模拟器测试没问题,真机调试的时候只能选图片。 代码如下: chooseImage: function () { var that = this; wx.chooseMessageFile({ count: 10, type:'all', success: function (res) { //console.log(res.tempFiles[0].name); //上传文件 var imgArrNow = that.data.imgArr; imgArrNow = imgArrNow.concat(res.tempFiles); console.log(imgArrNow); that.setData({ imgArr: imgArrNow }) } }) },
2020-10-14 - 关于数组变量赋值传参的问题?
我的downloundPath是一个页面数据的数组,然后结果是,我只能获得该数组的第一个,咋办?求大佬 代码如下: senEmail(){ var that = this; let downloudPath = this.data.downloudPath; var remarks = this.data.remarks; var picker_input1 = this.data.picker_input1; var color = this.data.color; var pages = this.data.pages; wx.cloud.callFunction({ name:"sendEmail", data:{ "code":JSON.stringify(downloudPath),//下载地址
2020-10-13