解决方法: 在子控件里添加value属性,并且该属性为当前item的对应属性值。 (PS:我也遇到了楼主一样的bug,现在已解决)
关于页面splice删除一条数据 setData 后,页面同步刷新问题?[图片] 页面删除操作,用splice删除data.codelist的一条数据操作,执行后数据库也删除了,页面的data也删除了。setData后页面还有被删除的数据,未同步刷新,请问是什么问题?代码是否有错误呢?
2022-12-01(我的问题也一样,添加value属性后,bug解决) 解决方法: 在控件里添加value属性
小程序splice方法删除后,数据正常,界面不正常?在做一个增加删除list操作时 数据是正常的 [图片] 界面并没有获取到值 [图片] 这是后端代码 [图片]
2022-12-01找到bug了!!! 给每个控件添加value属性: <view> <text>员工姓名:</text> <input maxlength="15" data-index="{{index}}" bindinput="getPersonName" value="{{person.name}}" placeholder="请输入..." /> </view>
微信小程序 list.splice移除一个值后,赋值成功, 但是页面无刷新?1、js删除函数:可以成功删除 deletePerson: function (e) { var arr = this.data.PersonArray; var index = e.currentTarget.dataset.index; arr.splice(index, 1) this.setData({ PersonArray: arr, }); console.log("删除一个员工后,所有员工信息:", this.data.PersonArray)// 打印显示,成功删除了index下标的数据 }, 2、但是页面无法刷新 <!-- 员工管理 --> <view class="item"> <view class="title"> <view>员工管理 :</view> </view> <view wx:for="{{PersonArray}}" wx:for-item="person" wx:for-index="index" wx:key="this"> <view class="health-card"> <!-- 删除一个员工 --> <view class="delete_person"> <view class="delete_person num">序号 {{index+1}}</view> <view class="delete_person txt" hover-class='highSelectColor' data-index="{{index}}" bindtap="deletePerson"> <image class="delete_person icon" src="../../resource/删除.png"> </image> <text>删除</text> </view> </view> <!-- 员工姓名 --> <view class="person"> <text class="title">员工姓名:</text> <input class="con" maxlength="15" data-index="{{index}}" bindinput="getPersonName" placeholder="请输入..." /> </view> <!-- 岗位名称 --> <view class="person"> <text class="title">岗位名称:</text> <input type="text" class="con" data-index="{{index}}" bindinput="getPersonPost" placeholder="请输入..." /> </view> <!-- 联系电话 --> <view class="person"> <text class="title">联系电话:</text> <input type="number" class="con" data-index="{{index}}" bindinput="getPersonPhone" placeholder="请输入..." /> </view> </view> </view> <!-- 添加一个员工 --> <view class="add" hover-class='highSelectColor' bindtap="addOnePerson"> <image class="add-person" src="../../resource/添加.png"></image> <text>添加员工</text> </view> </view>
2022-12-01代码片段:https://developers.weixin.qq.com/s/NclT4Dms73Dk
微信小程序自动定义tabbar,登录页跳转至用户首页,首页tabbar无法显示?代码片段: https://developers.weixin.qq.com/s/a9koVDmq7sDH 开发工具正常显示,但真机调试无法显示tabbar 1、开发者工具正常显示tabbar。 [图片][图片][图片] 2、真机调试,无法显示自定义tabbar,底部为空白 3、system.js userCheckRegister: function (openId, nickName, avatarUrl) { wx.setStorageSync('roleId', '2'); // system页面 跳转至 用户主页home wx.reLaunch({ url: '/pages/home/home?nickName=' + nickName + '&avatarUrl=' + avatarUrl + '&roleId=2', }); }, 4、home.js data: { roleId: "", //角色ID } onLoad: function (options) { console.log(options.nickName); console.log(options.avatarUrl); console.log(options.roleId); if(roleid){ this.setData({ roleId:options.roleId }) } }, onShow: function () { if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ selected: 0 }) } }, 3、app.json "pages": [ "pages/system/system", "pages/home/home", "pages/me/me", "pages/selectEvaluateType/selectEvaluateType", "pages/selectNewFileType/selectNewFileType", ............. ], "window": { "navigationStyle": "custom", "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "Weixin", "navigationBarTextStyle": "black", "backgroundColor": "#FFF" }, "tabBar": { "custom": true, "color": "#999", "selectedColor": "#3974F6", "backgroundColor": "#fff", "borderStyle": "white", "list": [ { "selectedIconPath": "resource/首页2.png", "iconPath": "resource/首页.png", "pagePath": "pages/home/home", "text": "首页" }, { "selectedIconPath": "resource/新建档案2.png", "iconPath": "resource/新建档案.png", "pagePath": "pages/selectNewFileType/selectNewFileType", "text": "新建档案" }, { "selectedIconPath": "resource/现场评价2.png", "iconPath": "resource/现场评价.png", "pagePath": "pages/selectEvaluateType/selectEvaluateType", "text": "现场评价" }, { "selectedIconPath": "resource/我的2.png", "iconPath": "resource/我的.png", "pagePath": "pages/me/me", "text": "我的" } ] }, 4、custom-tab-bar ->index.js Component({ data: { selected: 0, roleId: "", color: "#999", selectedColor: "#3974F6", backgroundColor: "#fff", borderStyle: "white", allList: [{ list0: [ { "selectedIconPath": "../resource/首页2.png", "iconPath": "../resource/首页.png", "pagePath": "../../pages/home/home", "text": "首页" }, { "selectedIconPath": "../resource/新建档案2.png", "iconPath": "../resource/新建档案.png", "pagePath": "../../pages/selectNewFileType/selectNewFileType", "text": "新建档案" }, { "selectedIconPath": "../resource/现场评价2.png", "iconPath": "../resource/现场评价.png", "pagePath": "../../pages/selectEvaluateType/selectEvaluateType", "text": "现场评价" }, { "selectedIconPath": "../resource/我的2.png", "iconPath": "../resource/我的.png", "pagePath": "../../pages/me/me", "text": "我的" } ], list1: [ { "selectedIconPath": "../resource/首页2.png", "iconPath": "../resource/首页.png", "pagePath": "../../pages/home/home", "text": "首页" }, { "selectedIconPath": "../resource/我的2.png", "iconPath": "../resource/我的.png", "pagePath": "../../pages/me/me", "text": "我的" } ], }], list: [] }, attached() { console.log("custom tabbar roleId:", wx.getStorageSync('roleId')) //根据用户角色,显示不同的底部导航栏 var roleId = wx.getStorageSync('roleId'); //管理员 if (roleId == "2") { this.setData({ list: this.data.allList[0].list0 }) } //商家 else if(roleId == "3"){ this.setData({ list: this.data.allList[0].list1 }) } }, methods: { switchTab(e) { var index = e.currentTarget.dataset.index; var url = e.currentTarget.dataset.path; wx.switchTab({ url }) this.setData({ selected: index }) } }, })
2022-11-09个人政务:机构或事业单位金融:银行、保险、信托、基金、证券/期货、持牌消费金融医疗:公立医疗机构、互联网医院、私立医疗机构运营商:基础电信运营商、增值电信运营商教育:学历教育(初等/中等/高等)、公立教育机构、私立/民办教育机构出行与交通:网约车(快车/出租车/专车/其他网约车)、航空、地铁、水运、城市交通卡、城市共享交通、火车、公交、长途客运、租车生活服务:生活缴费旅游:酒店商业服务:公证社交:直播快递与邮政:快递、邮政、寄件/收件具体可参考: https://cloud.tencent.com/document/product/1007/42684
微信小程序调用腾讯云的E证通接口做人脸识别是否需要满足什么资质?我们正在开发一个小程序,小程序将调用E证通、审核营业执照的接口,这个小程序上线的话,是否需要什么资质?我们是电信增值业务的民营企业。之前采用人脸核身接口是有一定的资质要求,不知道采用E证通接口,是否需要资质?
2022-05-05