- 微信小程序被 搜索降权,不太明白问题的原因及如何解决? 求解答!
小程序被搜索降权,问题自己这面无法复现,不知道具体原因是什么,要怎么解决?求大神解答! [图片] [图片] source map 文件 源码如下: "// pages/bills/bills.js const app = getApp() import { zouweiApi } from '../../api/api' import util from '../../utils/util' Page({ /** * 页面的初始数据 */ data: { tabList: ['可开票订单', '开票记录'], key: 0, pageNo: 1, pageSize: 10, bottom:0, hasData: true, orderList: [], selectedIds: [], billActualAmount:0, selectedPrice:[], qxBJ:false, yuModal: false, yuModal2: false, yuModal3: false, //开票信息 userType:'2', invoiceType:'1', userInfo: { receiveName: '', receivePhone: '', province: '', city: '', region: '', receiveAddress: '', agentName: '', taxIdentificationNumber: '', companyAddress: '', phone: '', bank: '', bankNo: '', }, region: ['选择省', '选择市', '选择区'], //开票记录 invoiceList:[], invoiceOrderList: [], expressCode: '', expressDeliveryNumber: '', phone: '', logisticsInfoShow:false }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { let userName = wx.getStorageSync('user').name let billInfo = wx.getStorageSync('billInfo') this.setData({ userName, userInfo: billInfo }) // iphone ten if (app.globalData.isIpx) { this.setData({ pd: '64rpx', bottom: 60, }) } let agentId = options.agentId let userId = options.userId this.getBillingOrder() this.getBillingOrderCount() }, // 获取可开票订单 getBillingOrder() { let orderList = this.data.orderList let pageNo = this.data.pageNo let pageSize = this.data.pageSize zouweiApi.getBillingOrder({ pageNo, pageSize}).then(res => { if (res.code == 0) { if (res.data && res.data.rows && res.data.rows != null) { res.data.rows.forEach(item => { item.createTime = util.timestampToTime(item.createTime) item.selected = false }) if (pageNo == 1) { orderList = [] } this.setData({ orderList: orderList.concat(res.data.rows) }) this.pagemount(res.data.rows) }else { if (pageNo == 1) { this.setData({ orderList: [] }) } } } wx.stopPullDownRefresh() }) }, // 获取可开票统计数据 getBillingOrderCount() { zouweiApi.getBillingOrderCount({}).then(res => { if (res.code == 0) { this.setData({ billingOrderCount: res.data }) } }) }, // 获取开票记录 getInvoiceList() { let invoiceList = this.data.invoiceList let pageNo = this.data.pageNo let pageSize = this.data.pageSize zouweiApi.getInvoiceList({ pageNo, pageSize}).then(res => { if (res.code == 0) { if (res.data && res.data.rows && res.data.rows != null) { res.data.rows.forEach(item => { item.createTime = util.timestampToTime(item.createTime) item.orderIds = JSON.parse(item.orderIds) }) if (pageNo == 1) { invoiceList = [] } this.setData({ invoiceList: invoiceList.concat(res.data.rows) }) this.pagemount(res.data.rows) } } wx.stopPullDownRefresh() }) }, // 获取开票记录内订单 getInvoiceOrder(e) { let id = e.currentTarget.dataset.id let invoiceList = this.data.invoiceList zouweiApi.getInvoiceOrder(id).then(res => { if (res.code == 0) { if (res.data && res.data != null) { res.data.forEach(item => { item.createTime = util.timestampToTime(item.createTime) }) this.setData({ invoiceOrderList: res.data }) this.showModal3() } } }) }, // 选择订单 selectOrder: function (e) { let qxBJ = this.data.qxBJ let orderList = this.data.orderList let index = e.currentTarget.dataset.index let selectedIds = this.data.selectedIds let selectedPrice = this.data.selectedPrice orderList[index].selected = !orderList[index].selected if (orderList[index].selected) { selectedIds.push(orderList[index].id) selectedPrice.push(orderList[index].actualAmount) }else{ qxBJ = false selectedIds.splice(selectedIds.indexOf(orderList[index].id), 1) selectedPrice.splice(selectedPrice.indexOf(orderList[index].actualAmount),1) } this.setData({ qxBJ, orderList, selectedIds, selectedPrice }) this.countPrice() }, // 全选 quanxuan: function(){ let qxBJ = !this.data.qxBJ let orderList = this.data.orderList let selectedPrice = [] let selectedIds = [] orderList.forEach(item => { if (qxBJ){ item.selected = true selectedIds.push(item.id) selectedPrice.push(item.actualAmount) }else{ item.selected = false } }) this.setData({ qxBJ, orderList, selectedIds, selectedPrice }) this.countPrice() }, countPrice:function(){ let selectedPrice = this.data.selectedPrice let billActualAmount = 0 selectedPrice.forEach(item=>{ billActualAmount += Number(item) }) this.setData({ billActualAmount }) }, // 开票类型切换 userTypeChange(e){ let type = e.currentTarget.dataset.type let invoiceType = this.data.invoiceType this.setData({ userType: type, invoiceType: type == '1' ? invoiceType:'1' }) this.hideModal() this.showModal2() }, invoiceTypeChange(e) { let type = e.currentTarget.dataset.type this.setData({ invoiceType: type }) this.hideModal() this.showModal2() }, // 输入框 userInfoChange(e) { let key = e.currentTarget.dataset.key let value = e.detail.value switch (key) { case 'receiveName': this.setData({ 'userInfo.receiveName': value }) break case 'receivePhone': this.setData({ 'userInfo.receivePhone': value }) break case 'receiveAddress': this.setData({ 'userInfo.receiveAddress': value }) break case 'agentName': this.setData({ 'userInfo.agentName': value }) break case 'taxIdentificationNumber': this.setData({ 'userInfo.taxIdentificationNumber': value }) break case 'companyAddress': this.setData({ 'userInfo.companyAddress': value }) break case 'phone': this.setData({ 'userInfo.phone': value }) break case 'bank': this.setData({ 'userInfo.bank': value }) break case 'bankNo': this.setData({ 'userInfo.bankNo': value }) break } }, // 地址切换 bindRegionChange(e) { this.setData({ region: e.detail.value, 'userInfo.province': e.detail.value[0], 'userInfo.city': e.detail.value[1], 'userInfo.region': e.detail.value[2], }) }, // 选择微信地址 chooseAddress() { app.globalData.isUpload = true wx.getSetting({ success: res => { if (res.authSetting["scope.address"] == true) { wx.chooseAddress({ success: res => { let region = [] region.push(res.provinceName, res.cityName, res.countyName) this.setData({ region, 'userInfo.province': res.provinceName, 'userInfo.city': res.cityName, 'userInfo.region': res.countyName, 'userInfo.receiveAddress': res.detailInfo, 'userInfo.receivePhone': res.telNumber, 'userInfo.receiveName': res.userName }) } }) } else { let status = res.authSetting["scope.address"] if (typeof (status) == "undefined") { wx.chooseAddress({ success: res => { let region = [] region.push(res.provinceName, res.cityName, res.countyName) this.setData({ region, 'userInfo.province': res.provinceName, 'userInfo.city': res.cityName, 'userInfo.region': res.countyName, 'userInfo.receiveAddress': res.detailInfo, 'userInfo.receivePhone': res.telNumber, 'userInfo.receiveName': res.userName }) } }) } else { wx.showModal({ title: '地址访问授权', content: '地址访问授权未开启,无法完成操作', confirmText: '开启授权', confirmColor: '#345391', cancelText: '仍然拒绝', cancelColor: '#999999', success: res => { if (res.confirm) { wx.openSetting({ }) } if (res.cancel) { wx.showModal({ title: '操作失败', content: '地址访问授权未开启,操作失败', confirmText: '太遗憾了', confirmColor: '#345391', showCancel: false }) } } }) } } } }) }, // 提交 submit: function () { let userType = this.data.userType let invoiceType = this.data.invoiceType let userInfo = this.data.userInfo let selectedIds = this.data.selectedIds userInfo.userType = userType userInfo.invoiceType = invoiceType userInfo.orderIdList = selectedIds console.log(userInfo) let message = this.checkUnity(userInfo) if (message) { wx.showToast({ title: message, icon: 'none' }) } else { zouweiApi.getInvoiceApply(userInfo).then(res => { if (res.code == 0) { if(res.data){ wx.showToast({ title: '提交成功!', icon: 'success', mask: true }) wx.setStorageSync('billInfo', userInfo) // 发票开具成功提醒 app.dingyue('cJNZdZKkokdXQyAII9yAWr3mSWA2scgoqka8YRRBTUo') setTimeout(() => { this.hideModal() this.setData({ key:1, selectedIds:[] }) this.getInvoiceList() wx.pageScrollTo({ scrollTop: 0 }) }, 1500); }else{ wx.showToast({ title: '提交失败!', icon: 'none', mask: true }) } }else{ wx.showToast({ title: res.msg, icon: 'none', mask: true }) } }) } }, // 确认开票信息 submit2: function () { let userInfo = this.data.userInfo let userType = this.data.userType userInfo.userType = userType console.log(userInfo) let message = this.checkUnity1(userInfo) if (message) { wx.showToast({ title: message, icon: 'none' }) return; } this.hideModal2(1) }, // 判断 checkUnity(submitData) { let phoneReg = /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5,6,7]|17[0-8]|18[0-9]|19[1,3,5,8,9])\d{8}$/ let idCardReg = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/ let receiveName = (submitData.receiveName).trim() if (!receiveName) { return '收货姓名不能为空' } if (!phoneReg.test(submitData.receivePhone)) { return '请输入正确收货手机号码' } if (!submitData.province) { return '请选择收货地址' } if (!submitData.receiveAddress) { return '请填写收货详细地址' } if (submitData.userType == '1'){ if (!submitData.agentName) { return '请填写开票名称' } if (!submitData.taxIdentificationNumber) { return '请填写纳税识别号' } if (submitData.invoiceType == '2') { if (!submitData.companyAddress) { return '请填写公司地址' } if (!submitData.phone) { return '请填写公司电话' } if (!submitData.bank) { return '请填写开户银行' } if (!submitData.bankNo) { return '请填写开户账号' } } } if (submitData.userType == '2') { if (!submitData.agentName) { return '请填写开票姓名' } if (!phoneReg.test(submitData.phone)) { return '开票信息请填写正确手机号码' } } }, // 判断 checkUnity1(submitData) { let phoneReg = /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5,6,7]|17[0-8]|18[0-9]|19[1,3,5,8,9])\d{8}$/ let idCardReg = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/ if (submitData.userType == '1') { if (!submitData.agentName) { return '请填写开票名称' } if (!submitData.taxIdentificationNumber) { return '请填写纳税识别号' } if (submitData.invoiceType == '2') { if (!submitData.companyAddress) { return '请填写公司地址' } if (!submitData.phone) { return '请填写公司电话' } if (!submitData.bank) { return '请填写开户银行' } if (!submitData.bankNo) { return '请填写开户账号' } } } if (submitData.userType == '2') { if (!submitData.agentName) { return '请填写开票姓名' } if (!phoneReg.test(submitData.phone)) { return '请填写正确手机号码' } } }, tabChange: function (e) { let key = e.currentTarget.dataset.key this.setData({ pageNo: 1, key: key }) if (key == 1) { this.getInvoiceList() } if (key == 0) { this.getBillingOrder() this.getBillingOrderCount() } wx.pageScrollTo({ scrollTop: 0 }) }, // 查看物流 toLogistics(e) { let expressCode = e.currentTarget.dataset.expresscode let expressDeliveryNumber = e.currentTarget.dataset.expressdeliverynumber let phone = e.currentTarget.dataset.phone console.log(expressCode) console.log(expressDeliveryNumber) console.log(phone) this.setData({ expressCode, expressDeliveryNumber, phone, logisticsInfoShow: true }) }, logisticsChange: function (e) { console.log(e) this.setData({ logisticsInfo: e.detail }) }, hideLogistics: function () { this.setData({ logisticsInfoShow: false }) }, //分页计算 ,是否有下一页 pagemount: function (list) { let pageNo = this.data.pageNo let pageSize = this.data.pageSize if (list == null) { this.setData({ hasData: false }) return; } if (list.length < pageSize) { this.setData({ hasData: false }) } else { this.setData({ pageNo: pageNo + 1, hasData: true }) } }, onPullDownRefresh() { this.setData({ pageNo: 1 }) let key = this.data.key if (key == 1) { this.getInvoiceList() } if (key == 0) { this.getBillingOrder() } }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { let hasData = this.data.hasData let key = this.data.key if (key == 1) { if (hasData) { this.getInvoiceList() } } if (key == 0) { if (hasData) { this.getBillingOrder() } } }, // 显示遮罩层 showModal: function (e) { var that = this; let modalInfo = {} that.setData({ yuModal: true, modalInfo: modalInfo }) // 创建动画实例 var animation = wx.createAnimation({ duration: 400,//动画的持续时间 timingFunction: 'ease',//动画的效果 默认值是linear->匀速,ease->动画以低速开始,然后加快,在结束前变慢 }) that.animation = animation; //将animation变量赋值给当前动画 var time1 = setTimeout(function () { that.slideIn();//调用动画--滑入 clearTimeout(time1); time1 = null; }, 100) }, // 隐藏遮罩层 hideModal: function () { var that = this; var animation = wx.createAnimation({ duration: 400,//动画的持续时间 默认400ms timingFunction: 'ease',//动画的效果 默认值是linear }) this.animation = animation that.slideDown();//调用动画--滑出 var time1 = setTimeout(function () { that.setData({ yuModal: false }) clearTimeout(time1); time1 = null; }, 220)//先执行下滑动画,再隐藏模块 }, //动画 -- 滑入 slideIn: function () { this.animation.translateY(0).step() this.setData({ animationData: this.animation.export() }) }, //动画 -- 滑出 slideDown: function () { this.animation.translateY(500).step() this.setData({ animationData: this.animation.export(), }) }, // 显示遮罩层 showModal2: function (e) { var that = this; let modalInfo2 = {} that.setData({ yuModal2: true, modalInfo2: modalInfo2 }) // 创建动画实例 var animation = wx.createAnimation({ duration: 400,//动画的持续时间 timingFunction: 'ease',//动画的效果 默认值是linear->匀速,ease->动画以低速开始,然后加快,在结束前变慢 }) that.animation = animation; //将animation变量赋值给当前动画 var time1 = setTimeout(function () { that.slideIn2();//调用动画--滑入 clearTimeout(time1); time1 = null; }, 100) }, // 隐藏遮罩层 hideModal2: function (close) { if (close == '1') this.showModal() var that = this; var animation = wx.createAnimation({ duration: 400,//动画的持续时间 默认400ms timingFunction: 'ease',//动画的效果 默认值是linear }) this.animation = animation that.slideDown2();//调用动画--滑出 var time1 = setTimeout(function () { that.setData({ yuModal2: false }) clearTimeout(time1); time1 = null; }, 220)//先执行下滑动画,再隐藏模块 }, //动画 -- 滑入 slideIn2: function () { this.animation.translateY(0).step() this.setData({ animationData2: this.animation.export() }) }, //动画 -- 滑出 slideDown2: function () { this.animation.translateY(500).step() this.setData({ animationData2: this.animation.export(), }) }, modalBack:function(){ this.hideModal2(1) }, // 显示遮罩层 showModal3: function (e) { var that = this; let modalInfo3 = {} that.setData({ yuModal3: true, modalInfo3: modalInfo3 }) // 创建动画实例 var animation = wx.createAnimation({ duration: 400,//动画的持续时间 timingFunction: 'ease',//动画的效果 默认值是linear->匀速,ease->动画以低速开始,然后加快,在结束前变慢 }) that.animation = animation; //将animation变量赋值给当前动画 var time1 = setTimeout(function () { that.slideIn3();//调用动画--滑入 clearTimeout(time1); time1 = null; }, 100) }, // 隐藏遮罩层 hideModal3: function () { var that = this; var animation = wx.createAnimation({ duration: 400,//动画的持续时间 默认400ms timingFunction: 'ease',//动画的效果 默认值是linear }) this.animation = animation that.slideDown3();//调用动画--滑出 var time1 = setTimeout(function () { that.setData({ yuModal3: false }) clearTimeout(time1); time1 = null; }, 220)//先执行下滑动画,再隐藏模块 }, //动画 -- 滑入 slideIn3: function () { this.animation.translateY(0).step() this.setData({ animationData3: this.animation.export() }) }, //动画 -- 滑出 slideDown3: function () { this.animation.translateY(500).step() this.setData({ animationData3: this.animation.export(), }) }, })"
2020-10-19 - 小程序消息延迟,而且有时候消息都看不到,这个问题提过很多次了,一直没又解决
[图片][图片] 如图,第一个人列表显示了发了一张图片,但是聊天页面不显示这张图片,不知道客户发了什么,用户很不满意,问题一直没解决,之前就反馈过客服小程序消息延迟接收不到的问题,然后说查看就没有了后续,一直没有解决,我看社区很多人提相关的问题,很费解为什么一直没解决。请问这到底要怎么处理?
2020-10-19 - 客服小助手接收消息延迟很严重啊,请问官方有发现这个问题吗?什么时候可以解决?
问题1: 使用微信小助手和客户聊天,停留在聊天页面,不能及时收到客户发送的消息,需要返回列表,刷新几次才能显示有未读消息。 问题2: 微信服务通知不是每次都能及时推送有新客户和新消息,又是可以推送,有时没有推送,手动进去才会看到有消息,而且推送也不是很及时。无法及时回复客户。体验很不好 我看社区很多人提到这个问题, 请问这些问题是否有在处理,什么时候可以优化 解决?
2020-09-27 - 请问为什么我无法申请消息模板?
页面上没有申请模板按钮,是什么原因,申请模板还有什么要求吗?[图片]
2020-08-04 - 关于订阅消息设置 回调里没有 itemSettings 参数,请问这是正确的吗?
小程序调用wx.getSetting 回调里没有itemSettings 直接就是tmplId, 请问这样对吗 [图片] [图片]
2020-07-30 - 请问video.js可以播放m3u8的音频吗,怎么播放?
最近再弄m3u8格式的音视频 ,现在视频用video.js可以播放了 但是不知道怎么播放m3u8的音频 video.js可以吗 还是有其他的插件,求助大佬
2020-06-02 - 目前一款小程序只有申请代理商后台审核通过了才能进去主页,这样的 提交审核要提供什么呢?
描述:目前这款小程序是这样的场景,普通用户自己打开只能看到一个介绍页,只有被邀请的人 通过转发链接打开才能进入到申请代理商页面,申请之后只能等待审核通过了 才可以进入小程序 浏览更多内容 才能进行进货 出货 查看订单等操作,这个如果上线的时候提交审核要怎么弄得,好像没有办法提供测试账号哦,希望能得到一些建议。谢谢!
2020-04-28 - 请问微信小程序在海外可以正常使用吗?
请问已发布的微信小程序在海外可以正常使用吗?是否有什么冲突的地方需要注意?
2020-04-16 - 安卓调用redirectTo方法之后就会特别卡,在ios上不会,有大佬知道原因吗?
安卓调用redirectTo方法之后就会特别卡,在ios上不会,有大佬知道原因吗?
2020-04-07 - 请问小程序中音频和视频可以自动播放吗?
请问小程序中音频和视频可以设置自动播放吗
2020-03-30