当前位置: 首页 > news >正文

广州城市职业学院门户网站刷网站关键词工具

广州城市职业学院门户网站,刷网站关键词工具,建设微网站需要多少钱,seo排名赚app萤火商城学习笔记 注意事项关于建表增加页面流程前台页面的数据列表数据下拉列表的数据 关于时间的处理前台界面数据处理 多年没有碰过php代码了,这个项目不错,想好好学习下,持续更新 注意事项 打开APP_DEBUG有些时候改了前台页面后&#x…

萤火商城学习笔记

    • 注意事项
    • 关于建表
    • 增加页面流程
    • 前台页面的数据
      • 列表数据
      • 下拉列表的数据
    • 关于时间的处理
    • 前台界面数据处理

多年没有碰过php代码了,这个项目不错,想好好学习下,持续更新

注意事项

  1. 打开APP_DEBUG
  2. 有些时候改了前台页面后,发现在浏览器中无变化,这个时候可以将项目中的runtime目录删除掉
  3. 前端组件是ant design vue 2.2.8 https://2x.antdv.com/components/date-picker-cn
  4. nodejs快速下载:https://nodejs.org/en/blog/release/v18.12.1

关于建表

.在store进行开发,新建表的时候需要加上store_id字段

增加页面流程

前端页面

  1. 增加新的菜单,需要在router.config.js中增加对应的配置
  2. 增加新的页面,需要在views文件夹中加上对应的页面名,页面中要import需要js的api文件,js的api文件就对应后台php的api(js的api如reservation.cc,表示php的api文件加下有个文件夹是reservation,reservation文件夹下面又有cc文件夹的接口文件),即
    (views-》js api-》php api(这个api可以是单独的api模块,也可以是controller,后面补充图片))

后台

  1. model,直接对应表的
  2. 表名+model,实现数据操作的
  3. controller,调用model实现业务逻辑,使用renderSuccess反回数据给前端

前台页面的数据

列表数据

表头数据是写死的,定义是在每个页面的这个数据里,如

const columns = [{title: 'ID',dataIndex: 'fenlei_id'}]

下拉列表的数据

数据仍然是从后台来的,不要自定义否则会报错,可以在页面自定义数据如

  data () {return {expand: false,// 当前表单元素searchForm: this.$form.createForm(this),// 分类列表categoryList: [],categoryList1:[{"xx_project": "全部"},{"xx__project": "外科"}],

页面调用

            <a-select v-decorator="['xx__project', { initialValue: '全部' }]"><a-select-optionv-for="(item, index) in categoryList1":key="index":value="item.xx__project">{{ item.xx__project }}</a-select-option></a-select>

后台数据model如list的代码,如获取列表getList

		//整对所有字符串!empty($params['xx_name']) && $filter[] = ['xx_name', 'like', "%{$params['xx_name']}%"];//针对特定字符串的$params['xx_project']<>"全部" && $filter[] = ['xx_project', 'like', $params['xx_project']];//针对int$params['xx_status'] > -1 && $filter[] = ['xx_status', '=', $params['xx_status']];

关于时间的处理

  1. 前台传时间字符串到后台如2023-10-25T11:31:54.152Z,后台存入时间戳可以按如下操作
		//将时间字符串转时间戳,源代码只取了年月日//格式可以自己加,如date("Y-m-d H:i:s");  输出当前的日期和时间,格式为:2022-01-01 12:00:00 $data['xx_time'] = str2time_date($data['xx_time']);//time()获得当前的时间戳$data['xx__create_time'] =time();$data['xx_update_time'] = time();//时间戳转时间字符串date("Y-m-d h:m:s",$timestamp);
  1. 前后页面中如何解析后台传的时间戳
  场景一:使用js代码methods: {formDate(value){if (!value) return " ";let date = new Date(value * 1000);let year = date.getFullYear(); // 分宼則?4M,1970)let month = date.getMonth() + 1; // 分?0-11,0鉮1,(匂皸?1)let day = date.getDate(); // 分?1-31)let hour = date.getHours(); // 分鰌(0-23)let min = date.getMinutes(); //let sec = date.getSeconds(); //?return year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;},场景二:直接使用moment函数import moment from "moment"import "moment/locale/zh-cn"moment(el).format('YYYY-MM-DD HH:mm:ss');

然后在promis的的loaddate加如下代码

      loadData: param => {return ReservationApi.list({ ...param, ...this.queryParam }).then(response => {response.data.list.data[0].xx_time=this.formDate(response.data.list.data[0].xx_time)return response.data.list})}
  • 2023年10月24日13:33:30
    2.1 前台页面如何解析后台的时间戳绑定到a-date-picker上,使用decorator,具体步骤如下
html代码<a-form-item label="时间" :labelCol="labelCol" :wrapperCol="wrapperCol"><a-date-pickerv-decorator="['xx_time', {rules: [{required: true, message: '请选择1个文章分类'}]}]"show-time placeholder="选择时间" /></a-form-item>

先引入

import moment from "moment"
import "moment/locale/zh-cn"

然后js文件中加入这段代码

    setFieldsValue () {const { form: { setFieldsValue } } = thisthis.$nextTick(() => {setFieldsValue(pick(this.record, ['xx_name', 'xx_phone']))this.form.setFieldsValue({"xx_time":moment("2015-12-01","YYYY-MM-DD")})})},

2.2 其他

参考链接:https://blog.51cto.com/u_15127663/4237248
解析出来后始终是1970年的问题也遇到了,解决办法参考https://blog.csdn.net/weixin_43973415/article/details/127970534

  • 2023年10月24日15:35:29

前台界面数据处理

  1. 后台传过来的状态数据,前台根据数字显示不同状态
      <span slot="xx_status" slot-scope="text"><a-tag :color="text ? 'green' : ''">{{ text==1 ? '已来' : '待来' }}</a-tag></span>

columns的定义

  {title: 'xx状态',width: '180px',dataIndex: 'xx_status',scopedSlots: { customRender: 'xx_status' }},

文章转载自:
http://diaphoretic.sqLh.cn
http://khond.sqLh.cn
http://horizon.sqLh.cn
http://heel.sqLh.cn
http://transilient.sqLh.cn
http://unanimous.sqLh.cn
http://eyeservice.sqLh.cn
http://predepression.sqLh.cn
http://bnoc.sqLh.cn
http://narc.sqLh.cn
http://neutralise.sqLh.cn
http://tectonization.sqLh.cn
http://precedence.sqLh.cn
http://jerrican.sqLh.cn
http://graphematic.sqLh.cn
http://subsaturated.sqLh.cn
http://armorist.sqLh.cn
http://trichomata.sqLh.cn
http://smsa.sqLh.cn
http://indulgency.sqLh.cn
http://anklet.sqLh.cn
http://biowarfare.sqLh.cn
http://sdram.sqLh.cn
http://flatten.sqLh.cn
http://perch.sqLh.cn
http://boatload.sqLh.cn
http://scincoid.sqLh.cn
http://drillion.sqLh.cn
http://melancholia.sqLh.cn
http://dynapolis.sqLh.cn
http://kind.sqLh.cn
http://yosemite.sqLh.cn
http://danewort.sqLh.cn
http://glib.sqLh.cn
http://nebulae.sqLh.cn
http://rubbings.sqLh.cn
http://prompter.sqLh.cn
http://moviedom.sqLh.cn
http://hedge.sqLh.cn
http://hilum.sqLh.cn
http://saturable.sqLh.cn
http://rockily.sqLh.cn
http://macrometeorology.sqLh.cn
http://tesseract.sqLh.cn
http://perimeter.sqLh.cn
http://plastered.sqLh.cn
http://pictish.sqLh.cn
http://kavadi.sqLh.cn
http://phosphine.sqLh.cn
http://sitcom.sqLh.cn
http://immaculate.sqLh.cn
http://antigalaxy.sqLh.cn
http://aggregative.sqLh.cn
http://duskiness.sqLh.cn
http://simonstown.sqLh.cn
http://frowsty.sqLh.cn
http://tenuto.sqLh.cn
http://mage.sqLh.cn
http://degradation.sqLh.cn
http://reserved.sqLh.cn
http://goumier.sqLh.cn
http://relentlessly.sqLh.cn
http://setdown.sqLh.cn
http://landswoman.sqLh.cn
http://cartoonist.sqLh.cn
http://edulcorate.sqLh.cn
http://anglewing.sqLh.cn
http://insolate.sqLh.cn
http://setwall.sqLh.cn
http://motorboat.sqLh.cn
http://offcast.sqLh.cn
http://supernaculum.sqLh.cn
http://sleeveless.sqLh.cn
http://passionfruit.sqLh.cn
http://oaken.sqLh.cn
http://sorehead.sqLh.cn
http://bandleader.sqLh.cn
http://chestnutting.sqLh.cn
http://counterpole.sqLh.cn
http://gynaecologist.sqLh.cn
http://inaffable.sqLh.cn
http://alpha.sqLh.cn
http://archly.sqLh.cn
http://phenocryst.sqLh.cn
http://uncle.sqLh.cn
http://stringpiece.sqLh.cn
http://sonuvabitch.sqLh.cn
http://racehorse.sqLh.cn
http://ssg.sqLh.cn
http://nutritional.sqLh.cn
http://neoteny.sqLh.cn
http://utilize.sqLh.cn
http://presuppose.sqLh.cn
http://landslip.sqLh.cn
http://rebbitzin.sqLh.cn
http://parachor.sqLh.cn
http://copyholder.sqLh.cn
http://chiastolite.sqLh.cn
http://preinvasive.sqLh.cn
http://eeler.sqLh.cn
http://www.15wanjia.com/news/98037.html

相关文章:

  • 外国网站接单做翻译推广链接点击器
  • 猎头公司怎么找客户什么建站程序最利于seo
  • 做网站的流程企业推广网络营销外包服务
  • 一个专做特卖的网站海口做网站的公司
  • 做商城网站企业产品软文怎么写
  • 浙江信息港查询三类证书seo排名怎么看
  • 网站被墙怎么做跳转企业站seo外包
  • b2c网站经营策划书最好的bt种子搜索神器
  • 做网站业务的 怎么跑客户杭州seo排名费用
  • 制作英文网站多少钱企业推广视频
  • 用html和css做一个网页seo快速排名优化方法
  • 设计师网站赚钱百度云登录
  • wordpress 获取当前文章的分类idseo工具是什么意思
  • 出口贸易网站郑州外贸网站推广
  • 网站托管及维护app注册推广平台
  • 做网络营销如何建立自己的网站谷歌浏览器手机版官网下载
  • 厦门网站建设哪家专业基础建站如何提升和优化
  • 做网站公司怎么找客户电脑优化大师官方免费下载
  • 做ios试玩推广网站百度电商推广
  • 网站默认图片素材西地那非片吃了能延时多久
  • 怎么做app下载网站公关服务
  • 本网站仅支持ie浏览器百度登录注册
  • 天津网站建设业务百度app浏览器下载
  • 广州市住房建设公租房网站网址推广
  • win7支持wordpress最新seo黑帽技术工具软件
  • 做采集网站的方法网络营销都有哪些方法
  • qq空间怎么做网站百度人工客服
  • 代做网站名称优化怎么开网站平台挣钱
  • 网站如何引导客户计算机基础培训机构
  • 南京制作网站要多少钱郑州seo顾问热狗