- 博客(19)
- 收藏
- 关注
原创 el-tabel表头有搜索和排序的时候(点击表头,同时触发了排序事件)
【代码】el-tabel表头有搜索和排序的时候(点击表头,同时触发了排序事件)
2023-03-27 15:03:08
514
原创 图片base64格式转本地路径
var fsm = wx.getFileSystemManager();var filePath = wx.env.USER_DATA_PATH + '/share_img' + this.couponId + '.png';var buffer = wx.base64ToArrayBuffer(that.photoImg);fsm.writeFile({ filePath: filePath, data: buffer, encoding: 'base64', success(res) {
2020-10-12 09:49:04
1474
原创 时间切割
//2020-09-02 17:53:45 this.messageList.forEach(item => { if (item.lastMessageCreationTime) { let creationTime = item.lastMessageCreationTime; var myDate = new Date(creationTime); let year = myDate.getFullYear() + '/'; let month = myDate.g
2020-08-28 11:32:03
437
原创 微信小程序调用微信支付
// 确定支付 Consumer(item) { console.log(item, 'item'); let data = { orderId: item.id }; tools .myPro({ url: tools.baseUrl + `****`, method: 'post', data }) .then( res => { if (res && re...
2020-07-30 11:11:50
508
原创 判断微信小程序是否更新
写在app.vue的方法里面,在微信小程序的onLaunch里调用即可// 判断小程序是否更新 updatingNew() { // 检测是否可以调用getUpdateManager检查更新 if (!wx.canIUse("getUpdateManager")) return; let updateManager = wx.getUpdateManager(); // 获取全局唯一的版本更新管理器,用于管理小程序更新
2020-07-10 10:19:29
602
原创 vue签名板
<template> <div class="hello"> <!-- 小茄子 --> <canvas id="canvas">Canvas画板</canvas> <div> <button @click="clear">清除</button> <button @click="save">确定&
2020-07-09 13:59:33
311
原创 原生js画板(PC&移动端)
body{ padding: 0px; margin: 0px; } #draw{ height:600px; width:600px; margin: auto; margin-top: 10px; } #save{ margin-top: 5px; } canvas{ cursor: url("pen.ico"),auto.
2020-07-09 11:16:48
336
原创 微信小程序登录
微信小程序登录// html 用于授权用户手机号<button class="login_btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"></button>// js// 授权手机号方法 getPhoneNumber(e) { console.log("授权用户号码:", e); if (e.mp && e.mp.detail.encrypte
2020-06-22 14:34:14
153
1
原创 微信小程序封装请求方法
// 无需多言,上才艺function myPro(options){ const csrfToken=wx.getStorageSync('authToken'); let head = ''; if(csrfToken){ const csrfTokenFormat=csrfToken; if(csrfTokenFormat.accessToken){ head=`Bearer ${csrfTokenFo
2020-05-12 13:48:41
414
原创 cs3点击加动画
<div class="el" :class="rotate" @click="chickMe">2121</div>methods:{ chickMe(){ this.rotate="rotate" }}<style>.rotate{ animation: myfirstBor 20s; -webkit-animation: myfirstBor 20s; animation-fill-mode: forwards;}@keyfr
2020-05-12 12:03:44
117
原创 微信小程序拒绝相册授权后再调用授权
//HTML//做两个按钮,一个是判断是否授权,另一个是去设置里面打开授权<div class="Small_imgBor" style="top:260px" v-if="saveAlbumImgOne" @click="saveAlbum">保存至相册</div><div class="Small_imgBor" style="top:260px" v-if...
2020-03-23 18:15:37
919
2
原创 微信小程序div生成图片,保存到手机相册
//HTML<canvas canvas-id="canvas" style="width:328px;height:232px"></canvas>//js //保存图片 saveAlbum() { var path = "http://fileservice.chetanlian.com:8600/static/mini_pr...
2020-03-23 09:25:44
1887
原创 封装http请求
let dom="http://192.168.28.206:8027";function thenCallBack(res, then, cat) { console.log(res); if (res.data.code == 200) { then.call(this, res); } else { this.$message({...
2019-12-11 18:18:08
137
原创 多选
//多选 ```javascript<el-checkbox-group v-model="form.checkbox"> <el-checkbox v-for="(option,num) in item.options" :label="option.id"...
2019-11-27 10:06:22
710
原创 数组冒泡排序
var temp;var arr = [5,2,1,3,4];for(var i=arr.length;i>0;i--){ for(var j = 0; j < i - 1; j++){ if(arr[j] > arr[j + 1]){ temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1]=temp } }...
2019-11-25 14:30:07
72
原创 下载接口里面的表格
//下载模板 exportExcel() { let url = "/api/Management/Product/Worth/Template?productId=" + this.queryId; window.open(url, "_blank"); },``
2019-11-13 10:40:25
103
原创 js生成一段随机数字
function guid() { return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); return v.toString(16); ...
2019-10-17 13:50:47
633
原创 vue制作印章
vue制作印章下面展示 全部代码。// 上代码<template> <div> <div class="main" id="main"> <div id="seal">印章111</div> <div @click="seal">确 定</div> </di...
2019-10-16 17:33:36
3587
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人