Component({ properties: { num: { // 球体数量 type: Number, value: 20 } }, data: { topArr: {}, // 顶部定位数值数组 leftArr: {}, // 左侧定位数值数组 numArr: [], // 数组循环所需要的值 animationArr: {}, // 动画名称数组 borderArr: {}, // 球体直径数组 num: 20, // 球体数量 intTimeArr: [] // 定时器名称数组 }, ===== <view class="bg_view" ></view> <view wx:for="{{numArr}}" wx:key="unique"> <view class="border_view" style="width:{{borderArr['border' + index]}}rpx;height:{{borderArr['border' + index]}}rpx;border-radius:150rpx;background: radial-gradient(#2de6e6, #9511ec, pink);opacity:0.3969;position: absolute; position: absolute;top: {{topArr['top' + item]}}rpx;left: {{leftArr['left' + item]}}rpx; " animation="{{animationArr['animationData' + item]}}" ></view> </view> <view class="container"> <view class="loginButtonBox"> <button bindgetphonenumber="getPhoneNumber" bindtap="changeBtn" class="loginButton" disabled="{{btnDisabled}}" openType="getPhoneNumber">授权登录</button> <view bindtap="unloginLook" class="loginSeeButton">随便看看</view> </view> </view> <tools id="tools"></tools>
要不组件动画有效,要不按键有效,怎么都有效呢?Page({ // Component({ 如果用Page({,就是按键有效,动画无效,如果改成Component({,就是动画有效,按键无效,怎么使都有效呢?
2022-04-13 setTimeout( function(){ //注意function这里不能缺少 wx.switchTab({ url: '/pages/square/squareMain/squareMain', }) },1500); 搞定了。
想延迟一下,然后执行下一步,可是没延迟,直接跳转页面了,为什么?wx.showToast({ title: '注册成功', icon: 'success', duration: 2000 }); setTimeout(()=> { console.log("hello World"); }, 2000); wx.switchTab({ url: '/pages/square/squareMain/squareMain', });
2022-04-13反编译的代码,好多字符变量啥的。
这是r语言写的代码吗?730: function(e, t, r) { "use strict"; r.r(t); var n, a = r(16), o = r(13), c = r.n(o), s = r(15), i = r(6), u = r(7), d = r(4), p = r(8), g = r(9), l = r(3), h = r(1), m = r(34), b = r(12), O = r(18), v = r.n(O), f = r(14), j = r(120), x = r(22), k = r(11), y = r(52), I = r(84), L = r(62), _ = r(26), C = r(30), w = r(25), A = r(20), E = r(57), S = r(31), P = r(49), T = (r(457), r(0)), R = Object(P.traceGroup)("launch redirect process"), D = (n = function(e) { Object(p.a)(o, e);
2022-04-11报错问题解决:右上角点击“详情”=>“本地设置”=>“将JS编译成ES5”=>取消勾选
_typeof3 is not a function,调试基础库从最新一直改成2.19.2,不行?TypeError: _typeof3 is not a function,从最新的调试基础库一直改到2.19.2还是不行,是不是因为其他原因呢?
2022-04-08报错问题解决:右上角点击“详情”=>“本地设置”=>“将JS编译成ES5”=>取消勾选
TypeError: _typeof3 is not a function 请问这个算什么问题啊?[图片][图片][图片]
2022-04-08onshow和onload都没有页面更新操作。
页面向下滑动,有时自动向上滑动归位,感觉是页面自动刷新了,这咋解决呢?onshow和onload都没有页面更新操作。
2022-04-07tv_id!=".mp4"&&tv_id!=".rmvb"&&tv_id!=".avi"&&tv_id!=".ts"
怎么判断是视频呢,根据文件后缀.mp4?我看大部分视频都是.mp4,有没有方法可以判断是否是视频呢?
2022-03-29不报错了 程序里面有个地方多了逗号 wx.navigateTo({ url: '/pages/my/searchUserinfo', }) 这根本单引号改成双引号。
/my/searchUserinfo.js" is not defined?调试时,发现sources里面没有这个js脚本,请教大侠帮忙看看 VM5570 WAService.js:2 Error: module "pages/my/searchUserinfo.js" is not defined at p (VM5570 WAService.js:2) at <anonymous>:5106:7 at doWhenAllScriptLoaded (<anonymous>:5505:21) at Object.scriptLoaded (<anonymous>:5533:5) at Object.<anonymous> (<anonymous>:5558:22)(env: Windows,mp,1.05.2201240; lib: 2.22.0) [图片]
2022-03-27 e.setData({ loaded: 1, // act: 0, // sharetit: res.data.subject words: res.result.data, hasMoreData:!1, 增加了这个就可以了。 onReachBottom: function () { this.data.hasMoreData ? (this.setData({ reachBottom: !0 }), this.ShowBbs1("")) : this.setData({ morestr: "没有更多了" }); },
请教onReachBottom页面向下滑动到底部,然后页面卡住了,请教,谢谢,为什么呢?功能是发帖后,然后展示帖,展示帖可以向下滑动,然后滑到下面就卡住了。 js部分代码 Page({ data: {}, e(t, "hasMoreData", !0), 。。。 onReachBottom: function () { this.data.hasMoreData ? (this.setData({ reachBottom: !0 }), this.ShowBbs1("")) : this.setData({ morestr: "没有更多了" }); }, wxml代码 <template name="txt"> <view class="content"> <text space="nbsp" userSelect="true">{{item.data}}</text> </view> <view style="height:5px;"></view> </template> <template name="img"> <view> <image bindload="imageLoad" bindtap="previewImage" data-index="{{item.orders}}" data-src="{{item.data}}" lazyLoad="{{true}}" src="{{item.datas}}" style="width:{{images[item.orders].width}}rpx; height:{{images[item.orders].height}}rpx;"></image> </view> </template> <scroll-view> <view class="body" wx:if="{{loaded}}"> <view hidden="true"> <input name="current" value="{{current}}"></input> <input name="maxorder" value="{{maxorder}}"></input> <input name="followk" value="{{followk}}"></input> <input name="tid" value="{{tid}}"></input> <input name="tel" value="{{tel}}"></input> </view> <view class="card"> <view class="topic"> <text space="nbsp" userSelect="true">{{words[0].subject}}</text> </view> <view class="flex" style="width:98%;margin-top:10rpx;" wx:for="{{words[0].img_arr}}" wx:for-item="item" wx:key="key"> <image src="{{item}}"></image> </view> <view class="userinfo"> <view class="userpic"> <image src="{{words[0].avatar}}" style="width:60rpx;height:60rpx;border-radius:50rpx;"></image> </view> <view class="username"> <view class="author">{{words[0].author}} <text class="level" style="background-color:{{words[0].namecolor}};">{{words[0].userlevel}}</text> </view> <view class="userlevel"> <view class="date">{{words[0].dateline}}</view> <view wx:if="{{adminrole || words[0].isauthor}}"> <button bindtap="delMybbs" class="reply" hoverClass="none" id="{{words[0].tid}}">删除</button> </view> <view class="views">跟帖:{{words[0].replies}}条</view> <view class="views">浏览:{{words[0].views}}次</view> </view> </view> </view> <view class="line"></view> <view style="height:5px;"></view> <view bindlongtap="bingLongTap" bindtouchend="bindTouchEnd" bindtouchstart="bindTouchStart" class="flex" data-title="{{words.subject}}" id="{{words.tid}}" style="width:100%"> <view class="content"> <view class="content">报名时间:{{words[0].signtime}}</view> <view class="content">活动时间:{{words[0].acttime}}</view> <view class="content">活动地点:{{words[0].actplace}}</view> <view class="content">活动人数:{{words[0].signnum}}</view> <view class="content">联系电话:{{words[0].contactphone}}</view> <view class="content">活动费用:{{words[0].cost}}</view> <view class="content">{{words[0].message}}</view> </view> </view> </view> <view class="h_line"></view> <view data-num="{{index}}" style="display:flex;width:96%;background-color:#fff;flex-direction:column;padding:10rpx;margin-left:10rpx;margin-top:10rpx;" wx:for="{{contentlist}}" wx:key="key"> <view class="userinfo" style="margin-left:10rpx;"> <view class="userpic"> <image mode="widthFix" src="{{item.avatar}}" style="padding:0rpx;width:60rpx;height:60rpx;border-radius:50rpx;"></image> </view> <view class="username" style="margin-top:16rpx;"> <view class="author" style="color:#4a6495">{{item.author}} <text class="level" style="background-color:{{item.namecolor}};">{{item.userlevel}}</text> </view> </view> </view> <view bindlongtap="DelBbs" bindtouchend="bindTouchEnd" bindtouchstart="bindTouchStart" data-title="{{item.subject}}" id="{{item.id}}" style="padding-left:70rpx;"> <view class="pid_str" wx:if="{{item.parent_id != item.ancestor_id}}"> <view style="width:100%">{{item.subject}}</view> <view style="width:100%">{{item.subject2}}</view> </view> <view class="content"> <view style="width:100%">{{item.message}}</view> </view> <view class="flex" style="width:94%;margin-top:10rpx;" wx:for="{{item.img_arr}}" wx:for-item="item2" wx:key="key"> <image src="{{item2}}"></image> </view> <view class="flex" style="width:95%"> <view wx:for="{{item.title}}" wx:for-index="idx" wx:for-item="item1" wx:key="key"> <view wx:if="{{item1.type=='img'}}"> <image bindload="imageLoad1" bindtap="previewImage" class="content-img" data-index="{{item1.orders}}" data-src="{{item1.data}}" src="{{item1.datas}}" style="width:{{images[item1.orders].width}}rpx; height:{{images[item1.orders].height}}rpx;"></image> </view> <view style="margin-left:5rpx;margin-right:5rpx;" wx:elif="{{item1.type=='mote'}}"> <image bindload="imageLoad1" class="content-img" data-index="{{item1.orders}}" data-src="{{item1.data}}" src="{{item1.datas}}" style="width:{{images[item1.orders].width}}rpx; height:{{images[item1.orders].height}}rpx;"></image> </view> <view wx:else> <view class="content_r"> <text space="nbsp" userSelect="true">{{item1.data}}</text> </view> <view style="height:5px;"></view> </view> </view> </view> <view class="flex" style="width:95%"> <view wx:for="{{item.content}}" wx:for-index="idx" wx:for-item="item1" wx:key="key"> <view wx:if="{{item1.type=='img'}}"> <image bindload="imageLoad1" bindtap="previewImage" class="content-img" data-index="{{item1.orders}}" data-src="{{item1.data}}" src="{{item1.datas}}" style="width:{{images[item1.orders].width}}rpx; height:{{images[item1.orders].height}}rpx;"></image> </view> <view style="margin-left:5rpx;margin-right:5rpx;" wx:elif="{{item1.type=='mote'}}"> <image bindload="imageLoad1" class="content-img" data-index="{{item1.orders}}" data-src="{{item1.data}}" src="{{item1.datas}}" style="width:{{images[item1.orders].width}}rpx; height:{{images[item1.orders].height}}rpx;"></image> </view> <view wx:else> <view class="content_r"> <text space="nbsp" userSelect="true">{{item1.data}}</text> </view> <view style="height:5px;"></view> </view> </view> </view> <view class="r_date"> <view class="lou">#{{index+2}}</view> <view>{{item.dateline}}</view> <button bindtap="reply" class="reply" hoverClass="none" id="{{item.tid}}">回复</button> <view wx:if="{{adminrole || item.isauthor}}"> <button bindtap="delMybbs" class="reply" hoverClass="none" id="{{item.tid}}">删除</button> </view> </view> </view> <view class="line"></view> </view> <view wx:if="{{reachBottom}}"> <view style="padding:10rpx;height:50rpx;text-align:center;">{{morestr}}</view> </view> <view id="bottom" style="height:200rpx;"></view> </view> </scroll-view> <view bindtap="hide_bg" class="page_bg" wx:if="{{block}}"> <view class="btn_bg" wx:if="{{block}}"> <view wx:for="{{infos.tels}}" wx:key="key"> <button bindtap="tel" class="sp_tit" id="{{item.number}}">拨打 {{item.number}} </button> </view> </view> </view> <view id="recordWrapper"></view> <view class="bottom" wx:if="{{loaded}}"> <view > <view class="input"> <button bindtap="reply" class="input_txt_left" hoverClass="none" id="{{words[0].tid}}"> <image src="image/input.png" style="vertical-align:middle;width:36rpx;height:42rpx;"></image> <text> 回复楼主 已有{{words.replies}}条回复</text> </button> <button class="share" id="{{words[0].tid}}" openType="share"> <image src="image/share.png" style="vertical-align:middle;width:45rpx;height:40rpx;"></image> </button> </view> </view> </view>
2022-03-22请大侠帮忙看看,谢谢!
remove删除不成功,执行删除操作成功了,就是数据库数据没被删除?wx.cloud.callFunction({ name:'update_bbs_list', data:{ a: 4, tid: a, }, success:res=>{ console.log("success update_bbs_list delete bbs",res); wx.showToast({ title: '删除成功', icon: 'success', duration: 1000 }) }, fail: function() { console.log("fail update_bbs_list delete bbs "); }, 下面云函数部分逻辑 else if (event.a == 4) { try { return await db.collection('bbs_list').where({ tid: event.tid }).remove() } catch (e) { console.error(e) } }
2022-03-20