invalid csrf token
如果是开发模式的话,可以暂时关闭,关闭方法
找到config/config.default.js
添加csrf配置,关闭csrf
// csrf
config.security = {
csrf: {
enabl...
yekong
3年前 (2022-01-21)
喜欢
严格传参模式
除了严格模式还有普通的传参模式
控制器
async strictGet() {
const { ctx } = this;
ctx.body = {
code: 200,
data: ctx.params.name,
...
yekong
3年前 (2022-01-21)
喜欢
普通传参模式
除了常规模式还有严格的传参模式
控制器
async test() {
const { ctx } = this;
ctx.body = {
code: 200,
data: ctx.query,
};
...
yekong
3年前 (2022-01-21)
喜欢
uniapp开发,需要一个页面效果是,选择城市区域,将对应区域的街道渲染出来,然后可以实现复选,在网上并没有找到符合心意的效果,只能自己写了。
效果源码
结合城市选择组件进行使用
<template>
<view class="changepwd...
yekong
3年前 (2022-01-20)
喜欢
uniapp开发实现城市选择组件
返回结果
{
"data": ["北京市", "北京市", "东城区"],
"code": "110101",
&qu...
yekong
3年前 (2022-01-20)
喜欢
uniapp开发app 页面的逻辑,选择城市后,通过code换取街道信息
页面源码
结合城市选择组件进行使用
<template>
<view class="citylist">
<scroll-view :style=&...
yekong
3年前 (2022-01-20)
喜欢
初始化项目
mkdir egg-example && cd egg-example
npm init egg --type=simple
npm i
启动项目
npm run dev
open http://localhost:7001
...
yekong
3年前 (2022-01-19)
喜欢
方法 isNaN进行判断
var datas = 0
if (!isNaN(dataList[i].value)) {
datas = dataList[i].value
}
...
yekong
3年前 (2022-01-19)
喜欢
uniapp使用uview开发项目时 upload 上传组件很方便,但是如果同一个页面上传组件多了容易混乱,每次使用都需要重复很多代码,有没有办法复用一下呢
使用
<uploadimg :maxCount="3" :widht="220&quo...
yekong
3年前 (2022-01-18)
喜欢
dateTimePicker
使用实例
<template>
<u--form labelPosition="left" labelWidth="100" ref="form1">
<...
yekong
3年前 (2022-01-17)
喜欢