个人案例
- 请问如何筛选数组,组成新的数组?
这是原始数据,我想把国家、省份、城市分别筛选出来组成新的数组。 请问该如何实现,能否给个参考代码片段。 [图片] 我用的查询方法 [图片] 查询到的数据 [图片]
2020-02-02 - 一个页面如何根据传过来的值,显示不同内容?
在这个页面传了2个值到下一个页面。下一个页面如何根据传过来的值显示不同内容? [图片] 现在页面接收到的值 [图片]
2020-01-31 - 云开发,配额没到期,为什么不能访问数据库?
[图片]
2020-01-30 - scroll-view 高度错位?
scroll-view 里面想用不同样式。但是前后两个错位 white-space: nowrap; display: flex; [图片]
2020-01-27 - 传参(e.currentTarget.dataset.name)报错?
[图片]传过去的是一个字符串“北京”,接收报错。 kindToggle: function (e) { let names = JSON.stringify(e.currentTarget.dataset.name); wx.navigateTo({ url: '/pages/ruminate/filter/filter?names=' + 'names' , }) console.log(names) }, 接收页面 onLoad: function (options) { var aaa = JSON.parse(options.name) console.log(this.data.aaa) }, [图片]
2020-01-26 - 请问底部工具栏上滑显示,停止滑动隐藏,如何实现?
请问底部工具栏上滑显示,停止滑动隐藏,如何实现? 下面视频是pinterest的样式,请问有什么方法可以实现。 [视频]
2020-01-15 - 为什么mac 清理系统缓存和一些没有必要开机启动项目后,开发中工具提示Git not found?
Git not found. Install it or configure it using the 'git.path' setting. [图片]
2020-01-13 - 报错 is not defined,如何解决?
console.log(serviceList) 打印serviceList时报错 data: { serviceList: [] }, getNearServices: function () { let that = this; const { latitude, longitude } = this.data; console.log(this.data) wx.cloud.callFunction({ name: 'getService', data: { latitude, longitude }, success: function (res) { console.log('getNearServices-->',res); that.setData({ serviceList: res.result.list }) console.log(serviceList) }, fail: console.error }) },
2019-12-28 - 如何以db.geo.point形式存储用户位置数据到云数据库中?
如何以db.geo.point形式存储用户位置数据到云数据库中? //选择地址 chooseLocation: function () { let that = this; wx.chooseLocation({ success: function (res) { console.log(res); if (res.address) { that.setData({ address: res.name, latitude: res.latitude, longitude: res.longitude, }) app.globalData.latitude = res.latitude; app.globalData.longitude = res.longitude; app.globalData.address = res.address; console.log(app.globalData) } } }) }, //添加地址 addLocation: function () { if (!this.data.address) { wx.showToast({ title: '请选择地点!', icon: 'none' }); return; } const location = { // type: this.data.locationType, time: this.data.time, address: this.data.address, latitude: this.data.latitude, longitude: this.data.longitude }; this.data.loctaions.push(location); this.setData({ loctaions: this.data.loctaions }); },
2019-12-25 - 开发工具显示的样式和手机显示的样式不一样?
开发工具显示的样式。 [图片] 这是手机端显示的样式(Android没问题)。 [图片] <scroll-view scroll-x="true" class="scroll-class"> <view class="Question_box" bindtap="goQuestion"> <view class="Question"> <view class="flex-Center question-On"> <text class="flex-Center Question_icon Question_icon_Q">Q</text> <view class="ellipsis Question_title">牛奶过敏是什么样的体验?如何检测过敏原?</view> </view> <view class="question-Under"> <view class="flex-Center replyer"> <view class="flex-Center"> <text class="flex-Center Question_icon Question_icon_A">A</text> <open-data type="userNickName"></open-data> </view> <image src="/images/Avatar.jpeg" class="avator"></image> </view> <view class="ellipsis question_a">先搞清楚是牛奶不耐受还是牛奶过敏。检测过敏原的话,皮肤点刺和特异性血清检查都可以参考,但金标准是双盲食物激发试验。当然了,如果你皮肤点刺和特异性血清检查结果牛奶都是阴性的话,基本就可以排除牛奶过敏了。</view> </view> </view> <!-- --> <view class="Question"> <view class="flex-Center question-On"> <text class="flex-Center Question_icon Question_icon_Q">Q</text> <view class="ellipsis Question_title">牛奶过敏是什么样的体验?如何检测过敏原?</view> </view> <view class="question-Under"> <view class="flex-Center replyer"> <view class="flex-Center"> <text class="flex-Center Question_icon Question_icon_A">A</text> <open-data type="userNickName"></open-data> </view> <image src="/images/Avatar.jpeg" class="avator"></image> </view> <view class="ellipsis question_a">先搞清楚是牛奶不耐受还是牛奶过敏。检测过敏原的话,皮肤点刺和特异性血清检查都可以参考,但金标准是双盲食物激发试验。当然了,如果你皮肤点刺和特异性血清检查结果牛奶都是阴性的话,基本就可以排除牛奶过敏了。</view> </view> </view> <view class="Question"> <view class="flex-Center question-On"> <text class="flex-Center Question_icon Question_icon_Q">Q</text> <view class="ellipsis Question_title">牛奶过敏是什么样的体验?如何检测过敏原?</view> </view> <view class="question-Under"> <view class="flex-Center replyer"> <view class="flex-Center"> <text class="flex-Center Question_icon Question_icon_A">A</text> <open-data type="userNickName"></open-data> </view> <image src="/images/Avatar.jpeg" class="avator"></image> </view> <view class="ellipsis question_a">先搞清楚是牛奶不耐受还是牛奶过敏。检测过敏原的话,皮肤点刺和特异性血清检查都可以参考,但金标准是双盲食物激发试验。当然了,如果你皮肤点刺和特异性血清检查结果牛奶都是阴性的话,基本就可以排除牛奶过敏了。</view> </view> </view> </view> </scroll-view> wxss .channel-Q { padding: 0; } .scroll-class { display: flex; white-space: nowrap; } .Question_box { margin-left: 40rpx; padding: 50rpx 0; } .Question { background: var(--white); box-shadow: 0px 8px 35px rgba(0, 0, 0, 0.12); border-radius: 30rpx; display: inline-block; margin-right: 40rpx; width: 600rpx; } .question-On { height: 60px; padding: 0 40px 0 15px; } .question-Under { background: var(--cream); padding: 30rpx; border-radius: 0 0 30rpx 30rpx; } .replyer { position: relative; } .avator { width: 80rpx; height: 80rpx; border-radius: 100rpx; overflow: hidden; position: absolute; flex-shrink: 0; right: 0; top: -70rpx; box-shadow: 0px 8px 15px rgba(48, 57, 67, 0.12); } .question_a { font-size: 28rpx; opacity: 0.6; margin-top: 20rpx; }
2019-12-19