- 首页分类类型列表怎么跳到另一页面的分类列表并默认跳转过来的类型?
使用的是wx.switchTab跳转, 首页分类有index: 1、学校 2、医院 3、公园 需要跳到 list 页面 list 页面 目前代码 //顶部选择分类条目 tabSelect(e) { wx.showLoading({ title: '加载中...', }) this.setData({ tabCur: e.currentTarget.dataset.id, scrollLeft: (e.currentTarget.dataset.id - 2) * 200 }, success => { this.sushehao() //调用二级类型默认第一项 this.dtejlx() }) }, /////// 点击index首页的2、医院时跳到list页面的医院菜单默认选中,从index点击那个分类跳到list就那个相应的分类被选中 一级菜单 :学校 医院 公园 二级菜单:XXXX医院,CCCCC医院
2021-10-05 - 想做个下订单的系统,但不知道表怎么设置?
需求:三级分类,然后有加减号添加数量,选择数量好了下单,但不知道表的分类怎么设置,用的是CMS管理后台,下面网上找的代码,如何把下面代码放到CMS的表里,是不是也分别设置三个类型表?然后从表动态读取出来,如何写这代码呢?一级,二级,三级,怎么设置到表里,然后像下面一样的读取到cateltems 这集合里呢? Page({ /** * 页面的初始数据 */ data: { //一级 cateItems:[ { cate_id:1, cate_name:'女装', //二级 children: [ { child_id: 1, name: '猜你喜欢', //三级 son:[ { son_id:1, name:'牛仔裙', image:'../../images/jeanskirt.png' }, { son_id:2, name:'短外套', image:'../../images/overcoa.png' }, { son_id:3, name:'吊带裙', image:'../../images/dress.png' }, { son_id:4, name:'连衣裙', image:'../../images/dress(1).png' }, { son_id:5, name:'时尚套装', image:'../../images/suit.png' }, { son_id:6, name:'衬衫', image:'../../images/shirt.png' }, { son_id:7, name:'T恤', image:'../../images/Tshirt.png' }, { son_id:8, name:'卫衣', image:'../../images/sweater.png' }, { son_id:9, name:'休闲裤', image:'../../images/pants.png' } ] }, { child_id: 2, name: '流行趋势', son:[ { son_id:1, name:'方领连衣裙', image:'../../images/squarecollardress.png' }, { son_id:2, name:'泡泡袖', image:'../../images/puffdress.png' }, { son_id:3, name:'西装连衣裙', image:'../../images/westerndress.png' }, { son_id:4, name:'洛丽塔', image:'../../images/Lolita.png' }, { son_id:5, name:'JK制服', image:'../../images/jkdress.png' }, { son_id:6, name:'束脚裤', image:'../../images/anklepants.png' } ] }, { child_id: 3, name: '女裙', son:[ { son_id:1, name:'连衣裙', image:'../../images/dress(1).png' }, { son_id:2, name:'半身裙', image:'../../images//jkdress.png' }, { son_id:3, name:'旗袍', image:'../../images/chipao.png' }, ] }, { child_id: 4, name: '外套', son:[ { son_id:1, name:'短外套', image:'../../images/suit.png' }, { son_id:2, name:'风衣', image:'../../images/windbreaker.png' }, { son_id:3, name:'西装', image:'../../images/westerndress.png' }, { son_id:4, name:'毛呢大衣', image:'../../images/clothes.png' }, { son_id:5, name:'棉衣棉服', image:'../../images/clothes.png' }, { son_id:6, name:'羽绒服', image:'../../images/clothes.png' }, { son_id:7, name:'皮草', image:'../../images/clothes.png' }, { son_id:8, name:'皮衣', image:'../../images/clothes.png' }, { son_id:9, name:'皮衣', image:'../../images/clothes.png' } ] }, { child_id: 5, name: '上装', son:[ { son_id:1, name:'T恤', image:'../../images/clothes.png' }, { son_id:2, name:'衬衫', image:'../../images/clothes.png' }, { son_id:3, name:'雪纺衫', image:'../../images/clothes.png' }, { son_id:4, name:'卫衣', image:'../../images/clothes.png' }, { son_id:5, name:'毛衣', image:'../../images/clothes.png' }, { son_id:6, name:'马甲', image:'../../images/clothes.png' }, ], }, { child_id: 6, name: '特色女装', son:[ { son_id:1, name:'中老年女装', image:'../../images/clothes.png' }, { son_id:2, name:'大码女装', image:'../../images/clothes.png' }, { son_id:3, name:'皮衣', image:'../../images/clothes.png' } ] }, { child_id: 7, name: '女裤', son:[ { son_id:1, name:'休闲裤', image:'../../images/clothes.png' }, { son_id:2, name:'牛仔裤', image:'../../images/clothes.png' }, { son_id:3, name:'打底裤', image:'../../images/clothes.png' }, { son_id:4, name:'西装裤', image:'../../images/clothes.png' }, { son_id:5, name:'棉裤羽绒裤', image:'../../images/clothes.png' }, { son_id:6, name:'皮衣', image:'../../images/clothes.png' } ] }, { child_id: 8, name: '套装', son:[ { son_id:1, name:'时尚套装', image:'../../images/clothes.png' }, { son_id:2, name:'运动套装', image:'../../images/clothes.png' }, { son_id:3, name:'皮衣', image:'../../images/clothes.png' } ] }, { child_id: 9, name: '服饰服务', son:[ { son_id:1, name:'洗衣服务', image:'../../images/clothes.png' }, ] }, ] }, { cate_id:2, cate_name:'美妆', children: [ { child_id: 1, name: '猜你喜欢', son:[ { son_id:1, name:'彩妆套装', image:'../../images/makeup.png' }, { son_id:2, name:'粉饼', image:'../../images/makeup.png' }, { son_id:3, name:'甲片', image:'../../images/makeup.png' }, { son_id:4, name:'指甲贴', image:'../../images/makeup.png' }, { son_id:5, name:'粉底液', image:'../../images/makeup.png' }, { son_id:6, name:'美甲', image:'../../images/makeup.png' }, { son_id:7, name:'防晒霜', image:'../../images/makeup.png' }, { son_id:8, name:'口红', image:'../../images/makeup.png' }, { son_id:9, name:'面膜', image:'../../images/makeup.png' }, ] }, { child_id: 2, name: '美容美体', son:[ { son_id:1, name:'彩妆套装', image:'../../images/makeup2.png' }, { son_id:2, name:'粉饼', image:'../../images/makeup2.png' }, { son_id:3, name:'甲片', image:'../../images/makeup2.png' }, { son_id:4, name:'指甲贴', image:'../../images/makeup2.png' }, { son_id:5, name:'粉底液', image:'../../images/makeup2.png' }, { son_id:6, name:'美甲', image:'../../images/makeup2.png' }, { son_id:7, name:'防晒霜', image:'../../images/makeup2.png' }, { son_id:8, name:'口红', image:'../../images/makeup2.png' }, { son_id:9, name:'面膜', image:'../../images/makeup2.png' }, ] }, { child_id: 3, name: '彩妆', son:[ { son_id:1, name:'彩妆套装', image:'../../images/makeup3.png' }, { son_id:2, name:'粉饼', image:'../../images/makeup3.png' }, { son_id:3, name:'甲片', image:'../../images/makeup3.png' }, { son_id:4, name:'指甲贴', image:'../../images/makeup3.png' }, { son_id:5, name:'粉底液', image:'../../images/makeup3.png' }, { son_id:6, name:'美甲', image:'../../images/makeup3.png' }, { son_id:7, name:'防晒霜', image:'../../images/makeup3.png' }, { son_id:8, name:'口红', image:'../../images/makeup3.png' }, { son_id:9, name:'面膜', image:'../../images/makeup3.png' }, ] } ] }, { cate_id:3, cate_name:'饰品' }, { cate_id: 4, cate_name: '百货' }, { cate_id: 5, cate_name: '医药' }, { cate_id: 6, cate_name: '进口' }, { cate_id: 7, cate_name: '手机' }, { cate_id: 8, cate_name: '箱包' }, { cate_id: 9, cate_name: '鞋靴' }, { cate_id: 10, cate_name: '内衣' }, { cate_id: 11, cate_name: '母婴' }, { cate_id: 12, cate_name: '男装' }, { cate_id: 13, cate_name: '食品' } ], curNav:1, curIndex:0, }, switchRightTab:function(e){ let id = e.target.dataset.id,index=e.target.dataset.index; this.setData({ curNav:id, curIndex:index, }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })
2021-10-03 - 云数据库访问不了了,是不是当前配额出问题了?
刚注册了个小程序昨天注册 的开发了一天,选择配额时本来选择免费的,搞了选择了按量付费,今晚提示账号没有费用,是不是没有费用就不会开发了?如果这样是不是可以把它改回来免费版的开发先呢?
2021-09-28 - 云开发怎么取用户昵称之类的信息?
如标题
2021-09-19 - 注册个人小程序后使用云开发能获取手机号和在线支付吗?
注册个人小程序用云开发可以获取手机号和在线支付吗?还是需要注册成企业或者是个体户才能获取手机号和在线支付呢?在线支付是支付到企业还是个体户账号吗?
2021-09-18 - 小程序云开发和本地开发授权登录有区别吗?
云开发刚接触,不是很明白,请问云开发可以做到授权登录,然后再授权获取手机号登录,此时把OPENID和手机号写入到云数据库表中,第二次再进入小程序不需要再提示登录了,直接跳到主页面去了。请问各位大师有代码吗?贴贴,感谢!最后想问下,OPENID可以做为唯一的ID吗?就是登录后都是以这OPENID云识别这个用户。
2021-09-17 - 使用OPENID来限制弹框登录可以吗?
目前新版使用了getUserProfile,每次需要弹出授权,不知道如何获取到第一次允许后就不再弹框了,而我想到了点击允许授权后,获取到OPENID,写到表里面,第二次用户打开小程序直接就去检测表里是不是有OPENID存在,如果表中存在OPENID就跳过了提示授权页面,直接跳到主界面,而openid一直存在,这样会不会存在安全性问题,而把openid做为唯一标识去和后端交互数据,会存在安全问题吗?这样的登录方式可以吗?
2021-09-12 - 小程序收款问题?
请问小程序做好后,客户下了订单,支付时弹出收款二维码,此时没有识别收款,请问这个可以以这种方式来收款的吗?
2021-09-03 - 投票后,票数增加1,页面没办法渲染更新数据?
[图片] 当点击“投”时,表中已经更新了字段,但“0” 还是没有变成“1”,如果解决,用的是下拉分页。下面代码 <view wx:for="{{arrayProject}}" wx:key="index" style="width:50%" ></view> tpclickat: function (options) {//点击投票 ............ success: function (res){ var typeat = res.data[0].pasttypeatrr if(typeat=="1"){ wx.showToast({ title: '投票成功', duration: 2000, image: '../images/Ok.png' }) getproinfo(mythis.data.pagesize, mythis.data.p, mythis)//把这句加在这里是错误的 } }, onLoad: function (options) { //var that = this;//开始写本页面的执行代码了 var mythis = this; wx.getSetting({//检查登录 } else//已经授权登录 { mythis.setData({ isHide: true }) wx.showLoading({ title: '加载中...', }) getproinfo(mythis.data.pagesize, mythis.data.p, mythis)//调用数据列表 wx.hideLoading()//隐藏加载框 } } }) }, * 获取项目列表 */ function getproinfo(pagesize, p, mythis) { wx.request({ url: app.globalData.urlPath + 'list.aspx', method: 'get', data: { pagesize: pagesize, p: p }, header: { 'content-type': 'application/x-www-form-urlencoded' }, success: function (res) { //如果搜出来的结果<1 就说明后面已经没数据可加载了,所以将state设为0 if (res.data.length < 1) mythis.setData({ state: 0 }); else { var state1 = 1; //如果有数据,但小于每次期望加载的数据量(pagesize),将state设为0,表示后面已没有数据可加载 if (res.data.length < mythis.data.pagesize) var state1 = 0; //循环将结果集追加到数组后面 for (var i = 0; i < res.data.length; i++) { mythis.data.allProject.push(res.data[i]); } mythis.setData({ arrayProject: mythis.data.allProject, state: state1 }); } console.log(mythis.data.arrayProject) }, fail: function (res) { console.log(res); } }); }
2020-04-16 - 求小程序活体检测源码?
小弟想要套活体检测的源码,人脸识别的已经有了。但想要活体的就是比如眨眨眼,张张嘴的。希望能得到一份谢谢,41501817@qq.com
2020-04-11