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

怎么登陆自己建的网站360推广联盟

怎么登陆自己建的网站,360推广联盟,开发网站需要租服务器,海创网站建设接uni-app写的微信小程序如何实现账号密码登录后获取token,并且每天的第一次登录后都会直接获取参数而不是耀重新登录(1), 在main.js中 import App from ./App// #ifndef VUE3 import Vue from vue import ./uni.promisify.adap…

接uni-app写的微信小程序如何实现账号密码登录后获取token,并且每天的第一次登录后都会直接获取参数而不是耀重新登录(1),

在main.js中

import App from './App'// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'const app = new Vue({...App
})
app.$mount()
// #endif// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {const app = createSSRApp(App)return {app}
}
// #endifasync function checkAndLogin() {const token = uni.getStorageSync('token');const username = uni.getStorageSync('userName');const password = uni.getStorageSync('userPassword');if (!token) {try {const response = await request({url: '/login',method: 'POST',data: { username, password }});if (response.token) {uni.setStorageSync('token', response.token);} else {throw new Error('用户名或密码不正确');}} catch (error) {uni.showModal({title: '登录失败',content: error.message || '用户名或密码不正确',showCancel: false,});}}
}// 在 App.vue 或 main.js 中调用 checkAndLogin
async function onLaunch() {await checkAndLogin();
}

在pages.json

创建一个空的{
            "path": "pages/login/login",
            "style": {
                "navigationBarTitleText": "登录"
            }
        },

让路径为pages/login/login里面什么内容都没有,这样保证每次进入的第一个页面都是空白页面

"pages": [{"path": "pages/login/login","style": {"navigationBarTitleText": "登录"}},{"path": "pages/mine/mine","style": {"navigationBarTitleText": "我的"}},{"path": "pages/home/home","style": {"navigationBarTitleText": "首页"}},{"path": "pages/Operation/Operation","style": {"navigationBarTitleText": "运维"}},{"path": "pages/index/index","style": {"navigationBarTitleText": "服务"}},{"path" : "pages/shebe/shebe","style" : {"navigationBarTitleText" : "设备"}}],"globalStyle": {"navigationBarTextStyle":"black","navigationBarBackgroundColor": "#fff","navigationBarTitleText": "uni-app","backgroundColor": "#F8F8F8","enablePullDownRefresh": true,"navigationStyle": "custom"},"uniIdRouter": {},"tabBar": {"custom": true,"color": "#7A7E83","selectedColor": "#1296db","borderStyle": "black","backgroundColor": "#F8F8F8","list": [{"pagePath": "pages/home/home","text": "首页","iconPath": "static/imgs/imgs55.png","selectedIconPath": "static/imgs/imgs5.png"},{"pagePath": "pages/Operation/Operation","text": "运维","iconPath": "static/imgs/imgs66.png","selectedIconPath": "static/imgs/imgs6.png"},{"pagePath": "pages/shebe/shebe","text": "设备","iconPath": "static/imgs/imgs66.png","selectedIconPath": "static/imgs/imgs6.png"},{"pagePath": "pages/index/index","text": "服务","iconPath": "static/imgs/imgs11.png","selectedIconPath": "static/imgs/imgs1.png"},{"pagePath": "pages/mine/mine","text": "我的","iconPath": "static/imgs/imgs44.png","selectedIconPath": "static/imgs/imgs4.png"}]},"subPackages": true,"noParse": [],"subPackages": [{"root": "pagesA/","pages":[{"path": "login/login","style": {"navigationBarTitleText": "登录",// 启⽤⾃定义导航栏"navigationStyle": "custom",// 将导航栏⽂字的颜⾊设置为⽩⾊"navigationBarTextStyle": "white"}}]}]

http://www.yidumall.com/news/54483.html

相关文章:

  • 360提交网站入口seo整站优化什么价格
  • 郑州管家网站托管廊坊网站
  • 比较好的logo设计网站专业做网站官网
  • 360建筑网 官方网站网络营销论文3000字
  • 免费网站维护2023广东最新疫情
  • 事业单位网站建设爱站网关键词挖掘工具站长工具
  • Wordpress报表主题seo需要什么技术
  • 自媒体网站建设论文google chrome浏览器
  • 微网站门户世界杯排名
  • 做网站的线上运营推广方案
  • 梅州建站塔山双喜网络营销策划的具体流程是
  • 做柜子好的设计网站北京百度推广投诉电话
  • 长春建站公司模板网站模板之家免费下载
  • wordpress突然打不开seo应用领域有哪些
  • wordpress网站无法打开网络营销方案ppt
  • 厂家网站怎么做自己可以创建网站吗
  • 怎样做网站运营新手怎么入行seo
  • 日本做a的短视频网站推广赚钱一个2元
  • 网站项目分析怎么做 方法有哪些谷歌seo网站运营
  • 网站建设基本流程详细说明整站优化排名
  • 平台网站很难做2023年第三波新冠9月
  • 山西餐饮加盟网站建设突发大事震惊全国
  • 南京 网站设计seo是什么服
  • 多个网站如何做301网络营销实施方案
  • 网站加盟代理临沂色度广告有限公司
  • 安徽企业平台网站建设优化大师手机版
  • 建筑人才网官方网站查询我是站长网
  • 濮阳中强网站建设广东seo网络培训
  • 拓吧网站西安seo网站关键词优化
  • 播放视频网站怎么做2022最新版百度