随笔 - 77
文章 - 0
评论 - 0
阅读 -
21309
05 2022 档案
封装方法(post,get等)
摘要:import { mergeConfig, dispatchRequest, jsonpRequest} from "./utils" export default class request { constructor(options) { // 请求公共地址 this.baseUrl = opt
阅读全文
微信小程序一键授权登录(授权手机号 和获取用户信息)
摘要:// 微信小程序一键授权登录(获取用户基本信息) LoginMpWx({ commit }, data) { return new Promise((resolve, reject) => { LoginApi.loginMpWx({ form: data }, { isPrompt: false
阅读全文
uniapp获取当前运行的客户端
摘要:/** * 获取当前运行的客户端(APP H5 小程序) * https://uniapp.dcloud.io/platform */const getPlatform = () => { // #ifdef APP-PLUS const platform = 'APP' // #endif //
阅读全文
支付(huazhuliren)
摘要:export const wxPayment = (option) => { const options = { timeStamp: '', nonceStr: '', prepay_id: '', paySign: '', ...option } return new Promise((reso
阅读全文
关于时间的那些事
摘要:export default{ // 计算当前日期星座 getHoroscope(date) { let c = ['摩羯','水瓶','双鱼','白羊','金牛','双子','巨蟹','狮子','处女','天秤','天蝎','射手','摩羯'] date=new Date(date); let m
阅读全文
手机号绑定微信(shuntian)
摘要:gotoSetwechat:function(){ if(this.personalData.set_wechat == 0){ var auth = this.auths[this.authId]; var waiting = plus.nativeUI.showWaiting(); auth.a
阅读全文
获取当前设备位置(shuntian)
摘要:getUserLocation:function(){ //获取当前设备位置 plus.geolocation.getCurrentPosition(function(position) { // console.log(JSON.stringify(position)) if(position.c
阅读全文
plus+mui封装的post 与 get 方法
摘要:post: function(params){ var _this = this; if (plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) { mui.confirm('网络异常,请检查网络设置!','提示
阅读全文
微信登录二(shuntian)
摘要:getServer:function(){ // console.log(Http.HOST + Http.API_URL.GETSMSCODE) this.showMaskView = false //第三方登录 if(this.authId == ''){ plus.oauth.getServi
阅读全文
微信登录app
摘要:// 微信登录 APP wxLogin() { this.auths.authorize((e) => { console.log(e); this.auths.login(e1 => { console.log(e1, 2); // this.auths.getUserInfo(info=>{ /
阅读全文
定时器
摘要:timer() { const app = this app.smsState = true const inter = setInterval(() => { app.times = app.times - 1 if (app.times <= 0) { app.smsState = false
阅读全文
各种验证封装(手机,验证码,图片验证)
摘要:/** * 用户输入内容验证类 */ // 是否为空export const isEmpty = (str) => { return str.trim() == ''} 使用例子: // 验证手机号 validteMobile(str) { if (Verify.isEmpty(str)) { th
阅读全文