- 政府部门小程序审核驳回原因不允许使用地域名称?
我们的小程序类别是政务民生 > 环保,也经过政府部门的授权,小程序名称也是政府部门客户拟定的。原来已经上线过,前几天更新版本的时候审核时提示名称包含地域,然后审核驳回了,这个问题怎么解决?
2019-10-12 - tap 事件导致 页面data数据被清空
代码如下, 触发 tapFirstClass 事件时,定义的 sourceData、firstClassOpts、secondClassOpts 对象会变为空数组,为什么? <template> <view class="page"> <view class="class-wrap"> <view class="{{secondClassOpts.length>0?'class-first-wrap':'class-first-wrap-full'}} weui-cells weui-cells_after-title"> <view bindtap="tapFirstClass" data-firstClass="{{item}}" data-sourceData="{{sourceData}}" class="weui-cell" wx:for="{{firstClassOpts}}" wx:key="idx" wx:for-item="item"> <view class="weui-cell__bd">{{item.name}}</view> </view> </view> <view wx:if="{{secondClassOpts.length > 0}}" class="class-second-wrap weui-cells weui-cells_after-title"> <view class="weui-cell" wx:for="{{firstClassOpts}}" wx:key="idx" wx:for-item="item"> <view class="weui-cell__bd">{{item.name}}</view> </view> </view> </view> </view> </template> <script> import wepy from 'wepy'; export default class reportFirstStep extends wepy.page { config = { navigationBarTitleText: '第一步 选择大小类' }; data = { sourceData: [], firstClassOpts: [], secondClassOpts: [] }; onLoad() { let that = this; wx.request({ url: 'http://127.0.0.1:8080/class/findAll?typeId=1', method: 'GET', success: function(res) { if (res.statusCode == 200 && res.data.code == 200) { let opts = []; // 获取大类 for (let i = 0; i < res.data.data.length; i++) { if (res.data.data[i].parentClassId == 0) { opts.push(res.data.data[i]); } } that.setData({ sourceData: res.data.data }); that.setData({ firstClassOpts: opts }); } } }); } tapFirstClass(event) { let that = this; debugger; let firstClass = event.currentTarget.dataset.firstclass; let sourceData = event.currentTarget.dataset.sourcedata; let opts = []; // 获取小类 for (let i = 0; i < sourceData.length; i++) { if (sourceData[i].parentClassId == firstClass.id) { opts.push(sourceData[i]); } } this.setData({ secondClassOpts: opts }); } } </script>
2018-01-25