因为uview http组件没有返回二次请求所需要的数据config,所以在使用前需要修改一下uview文件让其将config返回。
uview ui框架封装的Http请求获取不到config
Vue.prototype.$u.http.interceptor.response ...
4年前 (2021-08-06)
喜欢
这里获取config需要修改uview ui文件 添加一段代码用来获取config
response.config = options
这样就可以获取config了
{
"data": {
"code": 100...
4年前 (2021-08-06)
喜欢
<script>
import {
get_lists
} from '@/config/api.js'
export default {
data() {
retur...
4年前 (2021-08-05)
喜欢
查询方式1
products.findAll({
attributes: ['prdName', 'price'],
include: [{
model: user,
...
4年前 (2021-08-05)
喜欢
api
// 收藏列表
collectionApi.linPost(
'collection',
'/list',
user.permission('收藏'),
loginRequired,
...
4年前 (2021-08-05)
喜欢
安装依赖
npm i draggable --save
使用
js
import draggable from 'vuedraggable'
html
<draggable class="Homebody pc" v-mod...
4年前 (2021-08-05)
喜欢
var arr = ['one','two'];
var item = arr[0];
arr[0] = arr[1];
arr[1] = item;
...
4年前 (2021-08-05)
喜欢
css
.imgStyle{
filter: grayscale(100%);
filter: gray;
opacity:1;//通过改变透明度来调节灰色的程度
}
控制前
控制后
...
4年前 (2021-08-05)
喜欢
在使用pm2运行的项目发现一直报502错误,排查过后发现是因为pm2开启了watch后,pm2一直在重启项目造成的,把watch关闭后就搞定了
...
4年前 (2021-08-04)
喜欢
使用前需要先购买阿里云短信以及相关配置
安装依赖
cnpm i @alicloud/pop-core --save
api
// 发送验证码
smsApi.post('/captcha', async ctx => {
const tel = ct...
4年前 (2021-08-04)
喜欢