小程序开发记录

一.本项目服务对象体量较小,初期200-300人,后期2000人左右。html

二.主要设计的功能点:登陆/注册/忘记密码/修改资料/视频/答题(单选/多选/填空)/分享(不建议使用,微信小程序现版本不对用户开放回调)/免密登陆前端

三.开发时间-前端:因为体量小没有使用拦截器(47个接口),静态页面(18-28号共6个工做日),总体开发完成包含测试与修复BUG(次月30号共22个工做日),总体开发耗时28个工做日json

四.开发总结:小程序

  1.开发前期准备:申请小程序,得到小程序appid AppSecret->同步提供给后端开发;配置小程序的https协议(协议未经过时开发时开启不校验协议,扫码查看时开启调试模式)后端

  2.project.config.json:项目配置文件(配置appid);app.json:配置tabBar+页面路由+全局配置(title等)https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html微信小程序

  3.app.js:全局惟一实例,每次启动都会调用,我用来放公共方法及变量(token/用户信息等)/接口信息;此处调用微信API(wx.getSetting获取用户信息/wx.login:获取code传给后台拿token等信息);使用微信组件open-data获取用户头像,https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html服务器

  4.建立目录,分为三部分:1)静态资源(尽可能放服务器,不推荐放在小程序中,小程序超过2M会致使打包失败);2)公共样式,经过@import ""引入到对应页面;3)页面(js/json/wxml/wxss)微信

  5.页面部分根据需求分为4个模块,1)个人;2)资料;3)答题;4)视频;app

   个人:此处使用组件scroll-view展现积分详情,https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html;使用组件radio-group展现性别,https://developers.weixin.qq.com/miniprogram/dev/component/radio.html;组件picker展现组织与生日,https://developers.weixin.qq.com/miniprogram/dev/component/picker.htmlxss

   视频:此处使用swiper展现轮播图,https://developers.weixin.qq.com/miniprogram/dev/component/swiper-item.html ;此处使用组件scroll-view展现政策,https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html

相关文章
相关标签/搜索