
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
qj-mini-pages-new
Advanced tools
适用于千匠星云uni-app项目,easycom模式,打包时自动剔除没有使用的组件,无需担心全局引入体积大的问题。
npm i qj-mini-pages
第一步 main.js
import qjMini from 'qj-mini-pages';
Vue.use(qjMini);
第二步 pages.json
{
"easycom": {
"^qj-mini-(.*)": "qj-mini-pages/components/qj-mini-$1/qj-mini-$1.vue"
}
}
第三步 App.vue
onLaunch(){
// 接口请求域名
this.$qj.domain = this.$domain;
// 图片域名
this.$qj.imgDomain = this.$imgDomain;
// 业务域名
this.$qj.businessDomain = this.$businessDomain;
// 自定义Date方法(具体API见下方)
this.$qj.addDatePrototypes();
// Object方法
this.$qj.addObjectPrototype();
// String方法
this.$qj.addStringPrototype();
}
至此可以使用公共页面以及公共JS方法。
打开一个新页面
this.$qj.router.push(url, query, { success, fail, complete, stay } = {})
关闭当前页面,打开一个新页面
this.$qj.router.replace(url, query, { success, fail, complete, stay } = {})
关闭所有页面,打开一个新页面
this.$qj.router.reOpen(url, query, { success, fail, complete, stay } = {})
返回上一个页面
this.$qj.router.back(delta = 1, query, { success, fail, complete, stay = 0 } = {})
| 参数 | 类型 | 是否必传 | 解释 |
|---|---|---|---|
| url | String | 是 | 页面路径 |
| query | Object | 否 | 页面传参 |
| success | Function | 否 | 接口调用成功的回调函数 |
| fail | Function | 否 | 接口调用失败的回调函数 |
| complete | Function | 否 | 接口调用结束的回调函数 |
| stay | Number | 否 | 跳转延迟时间 |
| delta | Number | 否 | 返回的页面数 |
注意,传入的url应该是去掉最前面的 ‘pages’ 和最后面的 ‘main’
从本地缓存中同步获取指定key对应的内容
this.$qj.storage.get(key)
将value存入本地缓存指定的key中,会覆盖掉原来key对应的内容,同步方法
this.$qj.storage.set(key, value)
移除本地缓存中key,同步方法
this.$qj.storage.remove(key)
| 参数 | 类型 | 是否必传 | 解释 |
|---|---|---|---|
| key | String | 是 | 指定的key |
| value | String | 是 | key对应的内容 |
弹窗(uni.showToast)
this.$qj.message.alert(title, )
FAQs
We found that qj-mini-pages-new demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.