帖子
帖子
用户
博客
课程
显示全部楼层
2
帖子
0
勋章
6
Y币

[其他] 开发工具使用 新新手

[复制链接]
发表于 2021-4-18 21:14:15
大神,新手请指教!
1 创建项目 使用的是企业展示模板 ,连上真机调试,然后 看到Config.js 里面有调接口的地址,
class Config{
    constructor(){}
}

Config.restUrl = 'http://我的域名地址.cc/api';


然后举办 banner的接口改了,改成自己的地址,postman  请求都能请求到数据json 格式的。
然后,接收的数据字段也改了
            //获取轮播图
            getbannersList() {
                var that = this;
                const params = {}
                Model.getbannersList(params, (res) => {
                    if (res && res.code == 200) {
                        that.data.bannersList = res.adverList;
                    }
                    api.hideProgress();
                });
            },


抵用的地方也改了 字段名
<view style={'height:'+swiperHeight+'px;'} class="swiper-box">
            <swiper class="swiper" autoplay indicator-dots indicator-color="rgba(255,255,255,0.2)" indicator-active-color="rgba(51,51,51,1)">
                <swiper-item v-for="(item_,index_) in bannersList" data-index={index_} onclick="bindBanner">
                    <image src={item_.coverimage} class="banner-image" mode="aspectFill"></image>
                </swiper-item>
            </swiper>
        </view>




然后Ctrl+S 保存,
然后重新加载刷新 都没有出现我调接口的图片

1  我想问问,这个真机调试  怎么刷新,代码保存后怎么看效果,重新编译吗?commit吗?安装吗?

2 真机调试 断点咋不断呢?

哪位大神指点一下~










希望全量同步,或者增量同步
76
帖子
0
勋章
2613
Y币
需要全量同步
2
帖子
0
勋章
6
Y币
要沉了~~~~
380
帖子
4
勋章
6
Y币
1. wifi 真机同步看效果,不需要重新编译,加入模块后需要重新编译。
https://docs.apicloud.com/Dev-Tools/studio3-wifi-debug

2. 不支持断点,可以console.log

USB或Wife同步
您需要登录后才可以回帖 登录

本版积分规则