可以使用定时器延迟解决
scroll-view 快速多次改变scroll-into-view属性值出问题scroll-view 快速多次改变scroll-into-view属性值后,滑动到的位置就不准确了 [图片] [代码]<[代码][代码]scroll-view[代码] [代码]class[代码][代码]=[代码][代码]"content"[代码] [代码]scroll-into-view[代码][代码]=[代码][代码]"{{toView}}"[代码] [代码]scroll-y[代码][代码]=[代码][代码]"true"[代码] [代码]scroll-with-animation[代码][代码]=[代码][代码]"true"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{act_addList}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"address_top"[代码] [代码]id[代码][代码]=[代码][代码]"{{ 'inToView'+item.id}}"[代码][代码]>{{item.region}}</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{item.city}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"address_bottom"[代码][代码]>{{item.name}}</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]scroll-view[代码][代码]>[代码] [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"orientation_region"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"orientation"[代码][代码]>自动定位</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]block[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{orientationList}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"orientation_city"[代码] [代码]bindtap[代码][代码]=[代码][代码]"scrollToViewFn"[代码] [代码]data-id[代码][代码]=[代码][代码]"{{item.id}}"[代码][代码]>{{item.region}}</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]block[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]page{ [代码][代码]height[代码][代码]: [代码][代码]100%[代码][代码];} [代码][代码].content{[代码][代码]padding-bottom[代码][代码]: [代码][代码]20[代码][代码]rpx; box-sizing: border-box; [代码][代码]height[代码][代码]: [代码][代码]100%[代码][代码];} [代码][代码].location{[代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];} [代码][代码].location_top{[代码][代码]height[代码][代码]: [代码][代码]76[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]76[代码][代码]rpx; [代码][代码]background[代码][代码]: [代码][代码]#f4f4f4[代码][代码];[代码][代码]color[代码][代码]: [代码][代码]#606660[代码][代码];[代码][代码]font-size[代码][代码]: [代码][代码]28[代码][代码]rpx;[代码][代码]padding[代码][代码]: [代码][代码]0[代码] [代码]20[代码][代码]rpx;} [代码][代码].location_bottom{[代码][代码]height[代码][代码]: [代码][代码]140[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]140[代码][代码]rpx;[代码][代码]color[代码][代码]: [代码][代码]#d91f16[代码][代码];[代码][代码]font-size[代码][代码]: [代码][代码]28[代码][代码]rpx;[代码][代码]border-top[代码][代码]: [代码][代码]2[代码][代码]rpx [代码][代码]#ebebeb[代码] [代码]solid[代码][代码]; [代码][代码]border-bottom[代码][代码]: [代码][代码]2[代码][代码]rpx [代码][代码]#ebebeb[代码] [代码]solid[代码][代码];[代码][代码]padding[代码][代码]: [代码][代码]0[代码] [代码]20[代码][代码]rpx; align-items: [代码][代码]center[代码][代码];[代码][代码]display[代码][代码]: -webkit-flex;} [代码][代码].address_top{[代码][代码]height[代码][代码]: [代码][代码]76[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]76[代码][代码]rpx; [代码][代码]background[代码][代码]: [代码][代码]#f4f4f4[代码][代码];[代码][代码]color[代码][代码]: [代码][代码]#999999[代码][代码];[代码][代码]font-size[代码][代码]: [代码][代码]28[代码][代码]rpx;[代码][代码]padding[代码][代码]: [代码][代码]0[代码] [代码]20[代码][代码]rpx;} [代码][代码].address_bottom{[代码][代码]height[代码][代码]: [代码][代码]88[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]88[代码][代码]rpx; [代码][代码]background[代码][代码]: [代码][代码]#fff[代码][代码];[代码][代码]color[代码][代码]: [代码][代码]#000000[代码][代码];[代码][代码]font-size[代码][代码]: [代码][代码]32[代码][代码]rpx;[代码][代码]padding[代码][代码]: [代码][代码]0[代码] [代码]20[代码][代码]rpx; [代码][代码]border-bottom[代码][代码]: [代码][代码]2[代码][代码]rpx [代码][代码]#ebebeb[代码] [代码]solid[代码][代码];[代码][代码]margin-left[代码][代码]: [代码][代码]20[代码][代码]rpx;[代码][代码]margin-right[代码][代码]: [代码][代码]50[代码][代码]rpx; } [代码][代码].location_img{[代码][代码]width[代码][代码]: [代码][代码]48[代码][代码]rpx;[代码][代码]height[代码][代码]: [代码][代码]48[代码][代码]rpx;[代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码]right[代码][代码]: [代码][代码]20[代码][代码]rpx;[代码][代码]top[代码][代码]: [代码][代码]125[代码][代码]rpx;} [代码][代码].add_city{[代码][代码]width[代码][代码]: [代码][代码]228[代码][代码]rpx;[代码][代码]height[代码][代码]: [代码][代码]60[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]60[代码][代码]rpx; [代码][代码]text-align[代码][代码]: [代码][代码]center[代码][代码]; [代码][代码]border[代码][代码]: [代码][代码]2[代码][代码]rpx [代码][代码]solid[代码] [代码]#ebebeb[代码][代码]; [代码][代码]color[代码][代码]: [代码][代码]#000000[代码][代码];[代码][代码]margin-right[代码][代码]: [代码][代码]20[代码][代码]rpx; } [代码][代码].add_citying{[代码][代码]width[代码][代码]: [代码][代码]228[代码][代码]rpx;[代码][代码]height[代码][代码]: [代码][代码]60[代码][代码]rpx;[代码][代码]line-height[代码][代码]: [代码][代码]60[代码][代码]rpx; [代码][代码]text-align[代码][代码]: [代码][代码]center[代码][代码]; [代码][代码]border[代码][代码]: [代码][代码]2[代码][代码]rpx [代码][代码]solid[代码] [代码]#09bb07[代码][代码]; [代码][代码]color[代码][代码]: [代码][代码]#09bb07[代码][代码];[代码][代码]margin-right[代码][代码]: [代码][代码]20[代码][代码]rpx;} [代码][代码].orientation{[代码][代码]white-space[代码][代码]:[代码][代码]normal[代码][代码];[代码][代码]display[代码][代码]: inline-[代码][代码]block[代码][代码]; [代码][代码]width[代码][代码]: [代码][代码]55[代码][代码]rpx;[代码][代码]height[代码][代码]:[代码][代码]58[代码][代码]rpx; [代码][代码]color[代码][代码]: [代码][代码]#999[代码][代码]; [代码][代码]text-align[代码][代码]: [代码][代码]center[代码][代码];} [代码][代码].orientation_region{ [代码][代码]width[代码][代码]: [代码][代码]55[代码][代码]rpx;[代码][代码]font-size[代码][代码]: [代码][代码]20[代码][代码]rpx;[代码][代码]position[代码][代码]: [代码][代码]fixed[代码][代码];[代码][代码]top[代码][代码]: [代码][代码]220[代码][代码]rpx; [代码][代码]right[代码][代码]: [代码][代码]0[代码][代码]rpx;} [代码][代码].orientation_city{[代码][代码]height[代码][代码]: [代码][代码]50[代码][代码]rpx; [代码][代码]line-height[代码][代码]: [代码][代码]50[代码][代码]rpx;[代码][代码]color[代码][代码]: [代码][代码]#000[代码][代码];[代码][代码]text-align[代码][代码]: [代码][代码]center[代码][代码];}[代码][代码]Page({[代码] [代码] [代码][代码]/** [代码][代码] [代码][代码]* 页面的初始数据 [代码][代码] [代码][代码]*/[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]orientationList: [[代码][代码] [代码][代码]{ id: [代码][代码]"01"[代码][代码], region: [代码][代码]"东北"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"02"[代码][代码], region: [代码][代码]"华北"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"03"[代码][代码], region: [代码][代码]"华东"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"04"[代码][代码], region: [代码][代码]"华南"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"05"[代码][代码], region: [代码][代码]"华中"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"06"[代码][代码], region: [代码][代码]"西北"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"07"[代码][代码], region: [代码][代码]"西南"[代码] [代码]}[代码][代码] [代码][代码]],[代码][代码] [代码][代码]act_addList: [[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"01"[代码][代码], region: [代码][代码]"东北地区"[代码][代码],[代码][代码] [代码][代码]city: [{ id: [代码][代码]"0101"[代码][代码], name: [代码][代码]"白山江源"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0102"[代码][代码], name: [代码][代码]"白山市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0103"[代码][代码], name: [代码][代码]"宾县"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0104"[代码][代码], name: [代码][代码]"大庆"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0105"[代码][代码], name: [代码][代码]"测试1"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0106"[代码][代码], name: [代码][代码]"测试2"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0107"[代码][代码], name: [代码][代码]"测试3"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0108"[代码][代码], name: [代码][代码]"测试4"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0109"[代码][代码], name: [代码][代码]"测试5"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0110"[代码][代码], name: [代码][代码]"测试6"[代码] [代码]},[代码][代码] [代码][代码]][代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"02"[代码][代码], region: [代码][代码]"华北地区"[代码][代码],[代码][代码] [代码][代码]city: [{ id: [代码][代码]"0201"[代码][代码], name: [代码][代码]"包头"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0202"[代码][代码], name: [代码][代码]"保定"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0206"[代码][代码], name: [代码][代码]"测试2"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0207"[代码][代码], name: [代码][代码]"测试3"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0208"[代码][代码], name: [代码][代码]"测试4"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0209"[代码][代码], name: [代码][代码]"测试5"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0210"[代码][代码], name: [代码][代码]"测试6"[代码] [代码]},[代码] [代码] [代码][代码]][代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"03"[代码][代码], region: [代码][代码]"华东地区"[代码][代码],[代码][代码] [代码][代码]city: [{ id: [代码][代码]"0303"[代码][代码], name: [代码][代码]"开封市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"3104"[代码][代码], name: [代码][代码]"安阳市"[代码] [代码]},][代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"04"[代码][代码], region: [代码][代码]"华南地区"[代码][代码],[代码][代码] [代码][代码]city: [[代码][代码] [代码][代码]{ id: [代码][代码]"0401"[代码][代码], name: [代码][代码]"黑龙江市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0407"[代码][代码], name: [代码][代码]"测试3"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0508"[代码][代码], name: [代码][代码]"测试4"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0609"[代码][代码], name: [代码][代码]"测试5"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0710"[代码][代码], name: [代码][代码]"测试6"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0711"[代码][代码], name: [代码][代码]"测试8"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0712"[代码][代码], name: [代码][代码]"测试9"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0713"[代码][代码], name: [代码][代码]"测试10"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0714"[代码][代码], name: [代码][代码]"测试11"[代码] [代码]},[代码][代码] [代码][代码]][代码][代码] [代码][代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"05"[代码][代码], region: [代码][代码]"华中地区"[代码][代码], city: [{ id: [代码][代码]"0501"[代码][代码], name: [代码][代码]"黑龙江市"[代码] [代码]}] },[代码] [代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"06"[代码][代码], region: [代码][代码]"西北地区"[代码][代码],[代码][代码] [代码][代码]city: [{ id: [代码][代码]"0603"[代码][代码], name: [代码][代码]"开封市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0604"[代码][代码], name: [代码][代码]"安阳市"[代码] [代码]},][代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: [代码][代码]"07"[代码][代码], region: [代码][代码]"西南地区"[代码][代码],[代码][代码] [代码][代码]city: [{ id: [代码][代码]"0703"[代码][代码], name: [代码][代码]"开封市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0704"[代码][代码], name: [代码][代码]"安阳市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0401"[代码][代码], name: [代码][代码]"黑龙江市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0407"[代码][代码], name: [代码][代码]"测试3"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0508"[代码][代码], name: [代码][代码]"测试4"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0609"[代码][代码], name: [代码][代码]"测试5"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0710"[代码][代码], name: [代码][代码]"测试6"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0711"[代码][代码], name: [代码][代码]"测试8"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0712"[代码][代码], name: [代码][代码]"测试9"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0713"[代码][代码], name: [代码][代码]"测试10"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0714"[代码][代码], name: [代码][代码]"测试11"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0401"[代码][代码], name: [代码][代码]"黑龙江市"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0407"[代码][代码], name: [代码][代码]"测试3"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0508"[代码][代码], name: [代码][代码]"测试4"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0609"[代码][代码], name: [代码][代码]"测试5"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0710"[代码][代码], name: [代码][代码]"测试6"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0711"[代码][代码], name: [代码][代码]"测试8"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0712"[代码][代码], name: [代码][代码]"测试9"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0713"[代码][代码], name: [代码][代码]"测试10"[代码] [代码]},[代码][代码] [代码][代码]{ id: [代码][代码]"0714"[代码][代码], name: [代码][代码]"测试11"[代码] [代码]},[代码][代码] [代码][代码]][代码][代码] [代码][代码]},[代码][代码] [代码][代码]],[代码][代码] [代码][代码]toView: [代码][代码]'inToView01'[代码][代码],[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]scrollToViewFn: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]var[代码] [代码]_id = e.target.dataset.id;[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]toView: [代码][代码]'inToView'[代码] [代码]+ _id[代码][代码] [代码][代码]})[代码][代码] [代码][代码]console.log([代码][代码]this[代码][代码].data.toView)[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]onLoad: [代码][代码]function[代码] [代码](options) {[代码] [代码] [代码][代码]}[代码][代码]})[代码]
星期四 17:30意思是我们调用获取手机号接口,手机号组件已经有一个弹窗询问用户是否同意授权了,在调用前还需要加一个隐私弹窗吗?
关于小程序隐私保护指引设置的相关问题?1,以前开发中涉及手机号获取时,官方要求我们自行添加用户手机号授权协议方可获取用户手机号(否则审核不通过),现状是我方已经在获取用户手机号授权权限前添加了相关协议。此时9月15将实行的《关于小程序隐私保护指引设置》如果在首页等优先展示了隐私授权协议。则上文提到的(我方自主添加的手机号获取隐私协议)是否可以去掉?去掉后会不会审核不通过?。 2,如果在小程序首页进行《关于小程序隐私保护指引设置》提示用户后,如果用户选择【不同意并退出】(官方demo按钮名称)按钮后,我方是否可以添加退出小程序逻辑。即,在首页用户选择拒绝同意《小程序相关的隐私协议》后,直接退出小程序。是否会造成审核不通过?
2023-09-04有人回答吗
IOS 微信公众号支付后被h5页面被嵌在iframe里面,h5的LocalStorage会被清除?IOS设备 微信公众号支付后被h5页面被嵌在iframe里面,h5的LocalStorage会被清除,安卓不会被清理,请问有人知道吗
2023-07-27canvas 属性添加type="2d" 解决了,然后配合z-index解决了
小程序canvas层级过高的问题1[图片]
2021-09-03