各位大佬,帮忙下,谢谢
想做个下订单的系统,但不知道表怎么设置?需求:三级分类,然后有加减号添加数量,选择数量好了下单,但不知道表的分类怎么设置,用的是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-19那注册企业的,收款账户可以放个人的吗
注册个人小程序后使用云开发能获取手机号和在线支付吗?注册个人小程序用云开发可以获取手机号和在线支付吗?还是需要注册成企业或者是个体户才能获取手机号和在线支付呢?在线支付是支付到企业还是个体户账号吗?
2021-09-18这个有吗?
求小程序活体检测源码?小弟想要套活体检测的源码,人脸识别的已经有了。但想要活体的就是比如眨眨眼,张张嘴的。希望能得到一份谢谢,41501817@qq.com
2020-04-11Page({ data: { options: [{ city_id: '001', city_name: '北京' }, { city_id: '003', city_name: '深圳' }], selected: {}, }, change (e) { this.setData({ selected: { ...e.detail } }) wx.showToast({ title: `${this.data.selected.id} - ${this.data.selected.name}`, icon: 'success', duration: 1000 }) }, close () { // 关闭select this.selectComponent('#select').close() } , onLoad:function(){ } }) -------------这样是正常的,但这样的下拉值是静态的,我是想从表中把数据拿出来动态的。
下拉select 显示是不是错了?1、显示界面 [图片] 2、去掉data 的options 注释那代码,下拉显示不正常 [图片] [图片] 3、把data 的options 注释那代码取消掉,加入这句,下拉显示是正常的。(我是想从表中把数据丢到下拉列表里,如何解决?谢谢) [图片]
2020-03-11请问谁有.net 后端获取手机号码的,请给我一份,谢谢 41501817@qq.coom
请问小程序开发获取手机号?我的公众号是个人的订阅号,新建个小程序,小程序获取账号信息已经成功,但获取客户手机号返回的错误信息是:fail data no response 是不是个人开发的小程序不能获取手机号?需要注册服务号的公众号才可以开发小程序获取客户的手机号?
2020-03-08