TypechoJoeTheme

至尊技术网

统计
登录
用户名
密码
搜索到 610 篇与 的结果
2022-03-02

微信小程序接入微信支付

微信小程序接入微信支付
获取openid参考微信授权登录微信小程序MD5加密(支持中文):https://zhizun.lanzouy.com/inF7G00vonmbpay.jsimport util from '../../utils/util.js' const md5 = require('../../utils/md5.js'); Page({ /** * 页面的初始数据 */ data: { id: '' }, /** * 生命周期函数--监听页面加载 */ onLoad: function () { }, submit(){ this.setData({id: 1}) this.unitedPayRequest('openid') }, /*统一支付接口*/ unitedPayRequest: function(openid){ var that = this; //统一支付签名 var accountInfo = wx.getAccountInfoSync(); ...
2022年03月02日
1,414 阅读
0 评论
2022-03-02

PHP xml和数组互转

PHP xml和数组互转
// xml转数组 function xml_array($xml){ //禁止引用外部xml实体 libxml_disable_entity_loader(true); $xmlstring = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $val = json_decode(json_encode($xmlstring),true); return $val; } // 数组转xml function array_xml($arr){ $xml = "<xml>"; foreach ($arr as $key=>$val){ if(is_array($val)){ $xml.="<".$key.">".array_xml($val)."</".$k...
2022年03月02日
1,139 阅读
0 评论
2022-02-28

微信小程序开发用户授权登录、获取手机号、昵称、头像

微信小程序开发用户授权登录、获取手机号、昵称、头像
login.wxml<button open-type="getUserProfile" bindtap="getUserProfile"> 获取头像昵称 </button> <button bindtap='onLogin'>授权登录</button> <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">获取手机号</button> server.js// 服务接口地址 const base = 'http://localhost/'; // 开放接口配置 export default{ apiUrl:base + 'api.php' } login.js//加载公共api文件server.js import API from '../../config/server.js' Page({ /** * 页面的初始数据 *...
2022年02月28日
1,590 阅读
0 评论
2022-02-08

微信小程序获取json数据

微信小程序获取json数据
注意:需要先在微信公众平台后台里添加request合法域名,还有必须用httpsindex.wxml<view> <text>{{name}}</text> </view> index.jsonLoad:function(options){ //页面加载完成之后,发送请求获取json数据,options为页面跳转所带来的参数 var that = this; wx.request({ url: '接口地址', method: 'get', dataType: 'json', data: {id: 1}, success:function(res){ console.log(res.data); that.setData({ name: res.data.name }) }, fail:function(){ console.log('请求失败'); } }) }
2022年02月08日
1,138 阅读
0 评论
2021-12-28

Laravel apache和nginx伪静态

Laravel apache和nginx伪静态
nginxlocation / { try_files $uri $uri/ /index.php?$query_string; } apache<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^\index\/show$ laravel/public/show [R=301] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_F...
2021年12月28日
1,498 阅读
0 评论
2021-12-24

Linux全栈开发精通视频教程

Linux全栈开发精通视频教程
Linux全栈开发精通视频教程,由好几期的课程共同组成。课程内容包括了第一期的Linux零基础入门视频教程,主要包括了Linux基础和Shell脚本编程。第二部分上Linux内核编程全解部分,第三部分上Linux的裸机开发实战课程,以及最终的Linux驱动开发篇教程。这几部部分课程可以让同学们很详细的学习到Linux各种开发技能。 下载地址:https://www.aliyundrive.com/s/mRpdK3WhFj9
2021年12月24日
1,375 阅读
0 评论