├── App.vue ├── README.md ├── index.html ├── main.js ├── manifest.json ├── pages.json ├── pages ├── bindCarnumber │ └── bindCarnumber.vue ├── codeList │ └── codeList.vue ├── experienceCode │ └── experienceCode.vue ├── index │ └── index.vue ├── me │ └── me.vue ├── noticeCarowner │ └── noticeCarowner.vue ├── orderConfirm │ └── orderConfirm.vue ├── orderList │ └── orderList.vue ├── problemList │ └── problemList.vue └── reciveWay │ └── reciveWay.vue ├── polyfill ├── README.md ├── base64Binary.js ├── mixins.js └── polyfill.js ├── sitemap.json ├── static └── pages │ └── images │ ├── 7bb5fad244cb931399549aec9faffeca.png │ ├── address.png │ ├── bg0.png │ ├── bg1.png │ ├── bg3.png │ ├── bg4.png │ ├── bg5.png │ ├── bg6.png │ ├── bg7.png │ ├── bg9.png │ ├── btn1.png │ ├── btn2.png │ ├── icon-arrow.png │ ├── icon-arrow1.png │ ├── icon-arrow2.png │ ├── icon-arrow3.png │ ├── icon-close.png │ ├── icon-delete.png │ ├── icon-gou.png │ ├── icon-kefu.png │ ├── icon-mony.png │ ├── icon-nuochema.png │ ├── icon-order.png │ ├── icon-weixin-pay.jpg │ ├── icon-wenti.png │ ├── icon-yaoqing.png │ ├── img0.png │ ├── img1.png │ ├── nav-index-active.png │ ├── nav-index.png │ ├── nav-me-active.png │ ├── nav-me.png │ ├── nav-shangjin-active.png │ ├── nav-shangjin.png │ └── qrcode.png ├── transform.log ├── uni.scss ├── uni_modules └── mp-html │ ├── README.md │ ├── changelog.md │ ├── components │ └── mp-html │ │ ├── mp-html.vue │ │ ├── node │ │ └── node.vue │ │ └── parser.js │ ├── package.json │ └── static │ └── app-plus │ └── mp-html │ ├── js │ ├── handler.js │ └── uni.webview.min.js │ └── local.html └── utils ├── common.js ├── md5.js └── util.js /App.vue: -------------------------------------------------------------------------------- 1 | 38 | 128 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 插件介绍 2 | 匿名通知用户挪车,保护用户和车主隐私,前端小程序采用uniapp开发,后端采用php+mysql 3 | # 功能特性 4 | 
1、用户可以通过扫描小程序码联系到车主 5 | 2、采用匿名通话的方式,用户只能在有效期内拨打车主电话,过期失效,从而保护车主和用户隐私。 6 | 3、后台可对用户订单,绑定用户,挪车码等进行管理 7 | 4、小程序ui采用简洁的设计理念,让主要信息本身作为核心被凸显出来。 8 | 5、提供多种隐私电话通知方式供用户选择。 9 | 6、支持微信公众号消息通知,将用户引流到微信公众号,增加公众号粉丝。 10 | 后台暂不开源,有需要后台的朋友可以联系微信:tunan6666666 11 | 体验小程序微信小程序搜索:挪帮帮 12 | ![image.png](https://github.com/zhangsanproject/uniappnc/raw/master/static/pages/images/qrcode.png) 13 | 如需接受微信通知,请先关注公众号:钰龙商贸 14 | ![image.png](https://github.com/zhangsanproject/uniappnc/raw/master/static/pages/images/7bb5fad244cb931399549aec9faffeca.png) 15 | [后台网址](https://tn.rdtxgj.com/MNQYRauFiC.php/index/login "体验网址") 16 | 账号:test 密码:testtest 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import App from './App'; 2 | 3 | // Api函数polyfill(目前为实验版本,如不需要,可删除!)'; 4 | import Polyfill from './polyfill/polyfill'; 5 | Polyfill.init(); 6 | 7 | // 全局mixins,用于实现setData等功能,请勿删除!'; 8 | import Mixin from './polyfill/mixins'; 9 | 10 | // #ifndef VUE3 11 | import Vue from 'vue'; 12 | 13 | Vue.mixin(Mixin); 14 | Vue.config.productionTip = false; 15 | App.mpType = 'app'; 16 | const app = new Vue({ 17 | ...App 18 | }); 19 | app.$mount(); 20 | // #endif 21 | 22 | // #ifdef VUE3 23 | import { createSSRApp } from 'vue'; 24 | export function createApp() { 25 | const app = createSSRApp(App); 26 | app.mixin(Mixin); 27 | return { 28 | app 29 | }; 30 | } 31 | // #endif 32 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "", 3 | "appid" : "", 4 | "description" : "", 5 | "versionName" : "1.0.0", 6 | "versionCode" : "100", 7 | "transformPx" : false, 8 | "app-plus" : { 9 | "usingComponents" : true, 10 | "nvueStyleCompiler" : "uni-app", 11 | "compilerVersion" : 3, 12 | "splashscreen" : { 13 | "alwaysShowBeforeRender" : true, 14 | "waiting" : true, 15 | "autoclose" : true, 16 | "delay" : 0 17 | }, 18 | "modules" : {}, 19 | "distribute" : { 20 | "android" : { 21 | "permissions" : [ 22 | "", 23 | "", 24 | "", 25 | "", 26 | "", 27 | "", 28 | "", 29 | "", 30 | "", 31 | "", 32 | "", 33 | "", 34 | "", 35 | "", 36 | "" 37 | ] 38 | }, 39 | "ios" : {}, 40 | "sdkConfigs" : {} 41 | } 42 | }, 43 | "quickapp" : {}, 44 | "mp-weixin" : { 45 | "appid" : "", 46 | "setting" : { 47 | "urlCheck" : false 48 | }, 49 | "usingComponents" : true, 50 | "permission" : { 51 | "scope.userLocation" : { 52 | "desc" : "你的位置信息将用于小程序位置接口的效果展示" 53 | } 54 | }, 55 | "plugins" : {} 56 | }, 57 | "mp-alipay" : { 58 | "usingComponents" : true 59 | }, 60 | "mp-baidu" : { 61 | "usingComponents" : true 62 | }, 63 | "mp-toutiao" : { 64 | "usingComponents" : true 65 | }, 66 | "uniStatistics" : { 67 | "enable" : false 68 | }, 69 | "vueVersion" : "2" 70 | } 71 | -------------------------------------------------------------------------------- /pages.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | { 4 | "path": "pages/index/index", 5 | "style": {} 6 | }, 7 | { 8 | "path": "pages/bindCarnumber/bindCarnumber", 9 | "style": { 10 | "navigationBarTitleText": "绑定车牌号" 11 | } 12 | }, 13 | { 14 | "path": "pages/experienceCode/experienceCode", 15 | "style": { 16 | "navigationBarTitleText": "挪车码" 17 | } 18 | }, 19 | { 20 | "path": "pages/noticeCarowner/noticeCarowner", 21 | "style": { 22 | "navigationBarTitleText": "通知车主" 23 | } 24 | }, 25 | { 26 | "path": "pages/codeList/codeList", 27 | "style": { 28 | "navigationBarTitleText": "我的挪车码" 29 | } 30 | }, 31 | { 32 | "path": "pages/reciveWay/reciveWay", 33 | "style": {} 34 | }, 35 | { 36 | "path": "pages/problemList/problemList", 37 | "style": { 38 | "navigationBarTitleText": "常见问题" 39 | } 40 | }, 41 | { 42 | "path": "pages/orderList/orderList", 43 | "style": { 44 | "navigationBarTitleText": "我的订单" 45 | } 46 | }, 47 | { 48 | "path": "pages/me/me", 49 | "style": { 50 | "navigationBarTitleText": "我的" 51 | } 52 | }, 53 | { 54 | "path": "pages/orderConfirm/orderConfirm", 55 | "style": {} 56 | } 57 | ], 58 | "tabBar": { 59 | "color": "#999", 60 | "selectedColor": "#3f270b", 61 | "backgroundColor": "#fff", 62 | "borderStyle": "white", 63 | "list": [ 64 | { 65 | "selectedIconPath": "static/pages/images/nav-index-active.png", 66 | "iconPath": "static/pages/images/nav-index.png", 67 | "pagePath": "pages/index/index", 68 | "text": "挪车码" 69 | }, 70 | { 71 | "selectedIconPath": "static/pages/images/nav-me-active.png", 72 | "iconPath": "static/pages/images/nav-me.png", 73 | "pagePath": "pages/me/me", 74 | "text": "我的" 75 | } 76 | ] 77 | }, 78 | "debug": true, 79 | "sitemapLocation": "sitemap.json", 80 | "requiredPrivateInfos": [ 81 | "chooseAddress" 82 | ], 83 | "globalStyle": { 84 | "backgroundTextStyle": "light", 85 | "navigationBarBackgroundColor": "#ffd700", 86 | "navigationBarTextStyle": "black" 87 | }, 88 | "subPackages": [] 89 | } -------------------------------------------------------------------------------- /pages/bindCarnumber/bindCarnumber.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 80 | 248 | -------------------------------------------------------------------------------- /pages/codeList/codeList.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 43 | 116 | -------------------------------------------------------------------------------- /pages/experienceCode/experienceCode.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 75 | 166 | -------------------------------------------------------------------------------- /pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 58 | 127 | -------------------------------------------------------------------------------- /pages/me/me.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 70 | 188 | -------------------------------------------------------------------------------- /pages/noticeCarowner/noticeCarowner.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 75 | 155 | -------------------------------------------------------------------------------- /pages/orderConfirm/orderConfirm.vue: -------------------------------------------------------------------------------- 1 | 58 | 59 | 120 | 278 | -------------------------------------------------------------------------------- /pages/orderList/orderList.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | 70 | 145 | -------------------------------------------------------------------------------- /pages/problemList/problemList.vue: -------------------------------------------------------------------------------- 1 | 39 | 40 | 50 | 74 | -------------------------------------------------------------------------------- /pages/reciveWay/reciveWay.vue: -------------------------------------------------------------------------------- 1 | 81 | 82 | 118 | 293 | -------------------------------------------------------------------------------- /polyfill/README.md: -------------------------------------------------------------------------------- 1 | # 关于polyfill目录 2 | 3 | 用于抹平各平台差异化,使小程序转换uniapp项目后,能尽可能的少报错,尽可能的先运行起来。 4 | 5 | ## 文件结构 6 | 7 | ### base64Binary.js 8 | 9 | 用于 base64ToArrayBuffer, arrayBufferToBase64 两个函数的polyfill,因为这两函数仅app与微信小程序支持,特意制作此polyfill。 10 | 11 | 主要用于polyfill.js文件。 12 | 13 | ### mixins.js 14 | 15 | 有两个用途: 16 | 一是在使用富文本时,可以将后台传入的富文本字符串里面的转义符转换为普通字符,与mp-html插件配合使用。 17 | 二是this.setData()函数的polyfill,使转换后的uniapp项目,可以直接使用setData函数。 18 | 19 | ### polyfill.js 20 | 21 | 此文件,对大量api进行判断,如果在当前平台,不支持此函数,将会创建一个空函数,并输出一条提示,提示开发者,这个api需针对性的进行兼容处理。 22 | 23 | 如果不处理的话,会直接进行报错,并影响流程的运行,对转换者的心理有一定的影响。 24 | 25 | 因此制作此polyfill,让项目能先运行起来~ 26 | 27 | 28 | ## 注意 29 | 30 | 如果觉得这些文件不需要想删除它,请一定要先阅读关于每个文件的说明,明白它的作用,再进行删除,以免项目运行报错,感谢合作~ 31 | 32 | 如有不明白的地方,请联系作者(375890534@qq.com)或qq群(780359397、361784059、603659851)进行交流~ 33 | 34 | zhangdaren 2021-07-21 35 | 36 | -------------------------------------------------------------------------------- /polyfill/base64Binary.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zhang peng 3 | * @Date: 2021-08-03 10:57:51 4 | * @LastEditTime: 2021-08-16 17:25:43 5 | * @LastEditors: zhang peng 6 | * @Description: 7 | * @FilePath: \miniprogram-to-uniapp2\src\project\template\polyfill\base64Binary.js 8 | * 9 | * 借鉴自:https://github.com/dankogai/js-base64/blob/main/base64.js 10 | * 因uniapp没有window,也无法使用Buffer,因此直接使用polyfill 11 | * 12 | */ 13 | const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' 14 | const b64chs = [...b64ch] 15 | const b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/ 16 | const b64tab = ((a) => { 17 | let tab = {} 18 | a.forEach((c, i) => tab[c] = i) 19 | return tab 20 | })(b64chs) 21 | const _fromCC = String.fromCharCode.bind(String) 22 | 23 | /** 24 | * polyfill version of `btoa` 25 | */ 26 | const btoaPolyfill = (bin) => { 27 | // console.log('polyfilled'); 28 | let u32, c0, c1, c2, asc = '' 29 | const pad = bin.length % 3 30 | for (let i = 0;i < bin.length;) { 31 | if ((c0 = bin.charCodeAt(i++)) > 255 || 32 | (c1 = bin.charCodeAt(i++)) > 255 || 33 | (c2 = bin.charCodeAt(i++)) > 255) 34 | throw new TypeError('invalid character found') 35 | u32 = (c0 << 16) | (c1 << 8) | c2 36 | asc += b64chs[u32 >> 18 & 63] 37 | + b64chs[u32 >> 12 & 63] 38 | + b64chs[u32 >> 6 & 63] 39 | + b64chs[u32 & 63] 40 | } 41 | return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc 42 | } 43 | 44 | /** 45 | * polyfill version of `atob` 46 | */ 47 | const atobPolyfill = (asc) => { 48 | // console.log('polyfilled'); 49 | asc = asc.replace(/\s+/g, '') 50 | if (!b64re.test(asc)) 51 | throw new TypeError('malformed base64.') 52 | asc += '=='.slice(2 - (asc.length & 3)) 53 | let u24, bin = '', r1, r2 54 | for (let i = 0;i < asc.length;) { 55 | u24 = b64tab[asc.charAt(i++)] << 18 56 | | b64tab[asc.charAt(i++)] << 12 57 | | (r1 = b64tab[asc.charAt(i++)]) << 6 58 | | (r2 = b64tab[asc.charAt(i++)]) 59 | bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) 60 | : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) 61 | : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255) 62 | } 63 | return bin 64 | } 65 | 66 | /** 67 | * base64转ArrayBuffer 68 | */ 69 | function base64ToArrayBuffer (base64) { 70 | const binaryStr = atobPolyfill(base64) 71 | const byteLength = binaryStr.length 72 | const bytes = new Uint8Array(byteLength) 73 | for (let i = 0;i < byteLength;i++) { 74 | bytes[i] = binary.charCodeAt(i) 75 | } 76 | return bytes.buffer 77 | } 78 | 79 | /** 80 | * ArrayBuffer转base64 81 | */ 82 | function arrayBufferToBase64 (buffer) { 83 | let binaryStr = "" 84 | const bytes = new Uint8Array(buffer) 85 | var len = bytes.byteLength 86 | for (let i = 0;i < len;i++) { 87 | binaryStr += String.fromCharCode(bytes[i]) 88 | } 89 | return btoaPolyfill(binaryStr) 90 | } 91 | 92 | module.exports = { 93 | base64ToArrayBuffer, 94 | arrayBufferToBase64, 95 | } 96 | -------------------------------------------------------------------------------- /polyfill/mixins.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zhang peng 3 | * @Date: 2021-08-03 10:57:51 4 | * @LastEditTime: 2022-05-04 21:24:16 5 | * @LastEditors: zhang peng 6 | * @Description: 7 | * @FilePath: /miniprogram-to-uniapp2/src/project/template/polyfill/mixins.js 8 | * 9 | * 如果你想删除本文件,请先确认它使用的范围,感谢合作~ 10 | * 如有疑问,请直接联系: 375890534@qq.com 11 | */ 12 | export default { 13 | methods: { 14 | /** 15 | * 转义符换成普通字符 16 | * @param {*} str 17 | * @returns 18 | */ 19 | escape2Html (str) { 20 | if (!str) return str 21 | var arrEntities = { 22 | 'lt': '<', 23 | 'gt': '>', 24 | 'nbsp': ' ', 25 | 'amp': '&', 26 | 'quot': '"' 27 | } 28 | return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) { 29 | return arrEntities[t] 30 | }) 31 | }, 32 | /** 33 | * 普通字符转换成转义符 34 | * @param {*} sHtml 35 | * @returns 36 | */ 37 | html2Escape (sHtml) { 38 | if (!sHtml) return sHtml 39 | return sHtml.replace(/[<>&"]/g, function (c) { 40 | return { 41 | '<': '<', 42 | '>': '>', 43 | '&': '&', 44 | '"': '"' 45 | }[c] 46 | }) 47 | }, 48 | /** 49 | * setData polyfill 勿删!!! 50 | * 用于转换后的uniapp的项目能直接使用this.setData()函数 51 | * @param {*} obj 52 | * @param {*} callback 53 | */ 54 | setData: function (obj, callback) { 55 | let that = this 56 | const handleData = (tepData, tepKey, afterKey) => { 57 | var tepData2 = tepData 58 | tepKey = tepKey.split('.') 59 | tepKey.forEach(item => { 60 | if (tepData[item] === null || tepData[item] === undefined) { 61 | let reg = /^[0-9]+$/ 62 | tepData[item] = reg.test(afterKey) ? [] : {} 63 | tepData2 = tepData[item] 64 | } else { 65 | tepData2 = tepData[item] 66 | } 67 | }) 68 | return tepData2 69 | } 70 | const isFn = function (value) { 71 | return typeof value == 'function' || false 72 | } 73 | Object.keys(obj).forEach(function (key) { 74 | let val = obj[key] 75 | key = key.replace(/\]/g, '').replace(/\[/g, '.') 76 | let front, after 77 | let index_after = key.lastIndexOf('.') 78 | if (index_after != -1) { 79 | after = key.slice(index_after + 1) 80 | front = handleData(that, key.slice(0, index_after), after) 81 | } else { 82 | after = key 83 | front = that 84 | } 85 | if (front.$data && front.$data[after] === undefined) { 86 | Object.defineProperty(front, after, { 87 | get () { 88 | return front.$data[after] 89 | }, 90 | set (newValue) { 91 | front.$data[after] = newValue 92 | that.hasOwnProperty("$forceUpdate") && that.$forceUpdate() 93 | }, 94 | enumerable: true, 95 | configurable: true 96 | }) 97 | front[after] = val 98 | } else { 99 | that.$set(front, after, val) 100 | } 101 | }) 102 | // this.$forceUpdate(); 103 | isFn(callback) && this.$nextTick(callback) 104 | }, 105 | /** 106 | * 解析事件里的动态函数名,这种没有()的函数名,在uniapp不被执行 107 | * 比如:立即 108 | * @param {*} exp 109 | */ 110 | parseEventDynamicCode (e, exp) { 111 | if (typeof (this[exp]) === 'function') { 112 | this[exp](e) 113 | } 114 | }, 115 | /** 116 | * 用于处理对props进行赋值的情况 117 | * //简单处理一下就行了 118 | * 119 | * @param {*} target 120 | * @returns 121 | */ 122 | deepClone (target) { 123 | return JSON.parse(JSON.stringify(target)) 124 | }, 125 | /** 126 | * 用于处理dataset 127 | * 自定义组件的事件里,是获取不到e.currentTarget.dataset的 128 | * 因此收集data-参数,手动传进去 129 | * 130 | * @param {*} event 131 | * @param {*} dataSet 132 | * @returns 133 | */ 134 | datasetHandle (event, dataSet = {}) { 135 | if (event && !event.currentTarget) { 136 | if (dataSet.tagId) { 137 | event.currentTarget = { 138 | id: dataSet.tagId 139 | } 140 | } else { 141 | event.currentTarget = { 142 | dataset: dataSet 143 | } 144 | } 145 | } 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /polyfill/polyfill.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author: zhang peng 3 | * @Date: 2021-08-03 10:57:51 4 | * @LastEditTime: 2022-05-13 19:02:23 5 | * @LastEditors: zhang peng 6 | * @Description: 7 | * @FilePath: \miniprogram-to-uniapp\src\project\template\polyfill\polyfill.js 8 | * 9 | * Api polyfill 10 | * 2021-03-06 11 | * 因小程序转换到uniapp,再运行到各平台时,总有这样那样的api,没法支持, 12 | * 现根据uniapp文档对各平台的支持度,或实现,或调用success来抹平各平台的差异, 13 | * 让代码能正常运行,下一步再解决这些api的兼容问题。 14 | * 15 | * Author: 375890534@qq.com 16 | */ 17 | const base64Binary = require("./base64Binary") 18 | 19 | /** 20 | * 获取guid 21 | */ 22 | function guid () { 23 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { 24 | var r = Math.random() * 16 | 0, 25 | v = c == 'x' ? r : (r & 0x3 | 0x8) 26 | return v.toString(16) 27 | }) 28 | } 29 | 30 | /** 31 | * 检查api是否未实现,没实现返回true 32 | * @param {Object} api 33 | */ 34 | function isApiNotImplemented (api) { 35 | return uni[api] === undefined || [api] && uni[api].toString().indexOf("is not yet implemented") > -1 36 | } 37 | 38 | /** 39 | * 条件编译 40 | */ 41 | function platformPolyfill () { 42 | // #ifdef APP-PLUS 43 | uni.showNavigationBarLoading = function () { 44 | console.warn("api: uni.showNavigationBarLoading 在App平台会在屏幕中间悬浮loading,不如直接去掉") 45 | } 46 | // #endif 47 | } 48 | 49 | 50 | /** 51 | * 登录相关api polyfill 52 | */ 53 | function loginPolyfill () { 54 | if (isApiNotImplemented("login")) { 55 | uni.login = function (options) { 56 | console.warn("api: uni.login 登录 在当前平台不支持,【关键流程函数】 回调成功") 57 | options.success && options.success({ 58 | code: guid(), 59 | errMsg: "login:ok" 60 | }) 61 | } 62 | } 63 | 64 | if (isApiNotImplemented("checkSession")) { 65 | uni.checkSession = function (options) { 66 | console.warn("api: uni.checkSession 检查登录状态是否过期 在当前平台不支持,【关键流程函数】 回调成功") 67 | options.success && options.success() 68 | } 69 | } 70 | 71 | if (isApiNotImplemented("getUserInfo")) { 72 | uni.getUserInfo = function (options) { 73 | console.warn("api: uni.getUserInfo 获取用户信息 在当前平台不支持,【关键流程函数】回调成功") 74 | options.success && options.success({ 75 | userInfo: "" 76 | }) 77 | } 78 | } 79 | if (isApiNotImplemented("getUserProfile")) { 80 | uni.getUserProfile = function (options) { 81 | console.warn("api: uni.getUserProfile 获取用户授权信息 在当前平台不支持,【关键流程函数】回调成功") 82 | options.success && options.success({ 83 | userInfo: "" 84 | }) 85 | } 86 | } 87 | } 88 | 89 | /** 90 | * 地图相关 91 | */ 92 | function mapPolyfill () { 93 | if (isApiNotImplemented("chooseLocation")) { 94 | uni.chooseLocation = function (options) { 95 | console.warn("api: uni.chooseLocation 打开地图选择位置 在当前平台不支持,回调失败") 96 | options.fail && options.fail() 97 | } 98 | } 99 | 100 | if (isApiNotImplemented("openLocation")) { 101 | uni.openLocation = function (object) { 102 | console.warn("api: uni.openLocation 使用应用内置地图查看位置 在当前平台不支持,回调失败") 103 | options.fail && options.fail() 104 | } 105 | } 106 | 107 | if (isApiNotImplemented("createMapContext")) { 108 | uni.createMapContext = function (mapId) { 109 | console.warn("api: uni.createMapContext 创建并返回 map 上下文 mapContext 对象 在当前平台不支持,返回空") 110 | return { 111 | $getAppMap: null, 112 | getCenterLocation: function (options) { 113 | options.fail && options.fail() 114 | }, 115 | moveToLocation: function (options) { 116 | options.fail && options.fail() 117 | }, 118 | translateMarker: function (options) { 119 | options.fail && options.fail() 120 | }, 121 | includePoints: function (options) { }, 122 | getRegion: function (options) { 123 | options.fail && options.fail() 124 | }, 125 | getScale: function (options) { 126 | options.fail && options.fail() 127 | }, 128 | } 129 | } 130 | } 131 | } 132 | 133 | /** 134 | * 字符编码 135 | */ 136 | function base64Polyfill () { 137 | //将 Base64 字符串转成 ArrayBuffer 对象 138 | if (isApiNotImplemented("base64ToArrayBuffer")) { 139 | uni.base64ToArrayBuffer = function (base64) { 140 | return base64Binary.base64ToArrayBuffer(base64) 141 | } 142 | } 143 | 144 | //将 ArrayBuffer 对象转成 Base64 字符串 145 | if (isApiNotImplemented("arrayBufferToBase64")) { 146 | uni.arrayBufferToBase64 = function (buffer) { 147 | return base64Binary.arrayBufferToBase64(buffer) 148 | } 149 | } 150 | } 151 | 152 | 153 | /** 154 | * 媒体相关 155 | */ 156 | function mediaPolyfill () { 157 | if (isApiNotImplemented("saveImageToPhotosAlbum")) { 158 | uni.saveImageToPhotosAlbum = function (options) { 159 | console.warn("api: uni.saveImageToPhotosAlbum 保存图片到系统相册 在当前平台不支持,回调失败") 160 | options.fail && options.fail() 161 | } 162 | } 163 | 164 | if (isApiNotImplemented("compressImage")) { 165 | uni.compressImage = function (object) { 166 | console.warn("api: uni.compressImage 压缩图片接口 在当前平台不支持,回调失败") 167 | options.fail && options.fail() 168 | } 169 | } 170 | 171 | if (isApiNotImplemented("chooseMessageFile")) { 172 | //从微信聊天会话中选择文件。 173 | uni.chooseMessageFile = function (object) { 174 | console.warn("api: uni.chooseMessageFile 从微信聊天会话中选择文件。 在当前平台不支持,回调失败") 175 | options.fail && options.fail() 176 | } 177 | } 178 | 179 | if (isApiNotImplemented("getRecorderManager")) { 180 | //获取全局唯一的录音管理器 recorderManager 181 | uni.getRecorderManager = function (object) { 182 | console.warn("api: uni.getRecorderManager 获取全局唯一的录音管理器 在当前平台不支持") 183 | } 184 | } 185 | 186 | if (isApiNotImplemented("getBackgroundAudioManager")) { 187 | //获取全局唯一的背景音频管理器 backgroundAudioManager 188 | uni.getBackgroundAudioManager = function (object) { 189 | console.warn("api: uni.getBackgroundAudioManager 获取全局唯一的背景音频管理器 在当前平台不支持") 190 | } 191 | } 192 | 193 | if (isApiNotImplemented("chooseMedia")) { 194 | // 拍摄或从手机相册中选择图片或视频 195 | uni.chooseMedia = function (object) { 196 | console.warn("api: uni.chooseMedia 拍摄或从手机相册中选择图片或视频 在当前平台不支持,回调失败") 197 | options.fail && options.fail() 198 | } 199 | } 200 | if (isApiNotImplemented("saveVideoToPhotosAlbum")) { 201 | // 保存视频到系统相册 202 | uni.saveVideoToPhotosAlbum = function (object) { 203 | console.warn("api: uni.saveVideoToPhotosAlbum 保存视频到系统相册 在当前平台不支持,回调失败") 204 | options.fail && options.fail() 205 | } 206 | } 207 | 208 | if (isApiNotImplemented("getVideoInfo")) { 209 | // 获取视频详细信息 210 | uni.getVideoInfo = function (object) { 211 | console.warn("api: uni.getVideoInfo 获取视频详细信息 在当前平台不支持,回调失败") 212 | options.fail && options.fail() 213 | } 214 | } 215 | 216 | if (isApiNotImplemented("compressVideo")) { 217 | // 压缩视频接口 218 | uni.compressVideo = function (object) { 219 | console.warn("api: uni.compressVideo 压缩视频接口 在当前平台不支持,回调失败") 220 | options.fail && options.fail() 221 | } 222 | } 223 | 224 | 225 | if (isApiNotImplemented("openVideoEditor")) { 226 | // 打开视频编辑器 227 | uni.openVideoEditor = function (object) { 228 | console.warn("api: uni.openVideoEditor 打开视频编辑器 在当前平台不支持,回调失败") 229 | options.fail && options.fail() 230 | } 231 | } 232 | } 233 | 234 | /** 235 | * 设备 236 | */ 237 | function devicePolyfill () { 238 | if (isApiNotImplemented("canIUse")) { 239 | // 判断应用的 API,回调,参数,组件等是否在当前版本可用。 240 | // h5时,恒返回true 241 | uni.canIUse = function (object) { 242 | console.warn("api: uni.canIUse 判断API在当前平台是否可用 返回true") 243 | return true 244 | } 245 | } 246 | 247 | //微信小程序 248 | if (isApiNotImplemented("startDeviceMotionListening")) { 249 | // 开始监听设备方向的变化 250 | uni.startDeviceMotionListening = function (options) { 251 | console.warn("api: uni.startDeviceMotionListening 开始监听设备方向的变化 在当前平台不支持") 252 | options.success && options.success() 253 | } 254 | } 255 | 256 | if (isApiNotImplemented("onMemoryWarning")) { 257 | // 监听内存不足告警事件。 258 | uni.onMemoryWarning = function (callback) { 259 | console.warn("监听内存不足告警事件,仅支持微信小程序、支付宝小程序、百度小程序、QQ小程序,当前平台不支持,已注释") 260 | } 261 | } 262 | 263 | if (isApiNotImplemented("offNetworkStatusChange")) { 264 | // 取消监听网络状态变化 265 | uni.offNetworkStatusChange = function (callback) { } 266 | } 267 | if (isApiNotImplemented("offAccelerometerChange")) { 268 | // 取消监听加速度数据。 269 | uni.offAccelerometerChange = function (callback) { } 270 | } 271 | if (isApiNotImplemented("startAccelerometer")) { 272 | // 开始监听加速度数据。 273 | uni.startAccelerometer = function (callback) { 274 | console.warn("api: uni.startAccelerometer 开始监听加速度数据 在当前平台不支持") 275 | } 276 | } 277 | 278 | if (isApiNotImplemented("offCompassChange")) { 279 | // 取消监听罗盘数据 280 | uni.offCompassChange = function (callback) { 281 | console.warn("api: uni.offCompassChange 取消监听罗盘数据 在当前平台不支持") 282 | } 283 | } 284 | 285 | if (isApiNotImplemented("startCompass")) { 286 | // 开始监听罗盘数据 287 | uni.startCompass = function (callback) { 288 | console.warn("api: uni.startCompass 开始监听罗盘数据 在当前平台不支持") 289 | } 290 | } 291 | 292 | 293 | if (isApiNotImplemented("onGyroscopeChange")) { 294 | // 监听陀螺仪数据变化事件 295 | uni.onGyroscopeChange = function (callback) { 296 | console.warn("api: uni.onGyroscopeChange 监听陀螺仪数据变化事件 在当前平台不支持") 297 | } 298 | } 299 | 300 | if (isApiNotImplemented("startGyroscope")) { 301 | // 开始监听陀螺仪数据 302 | uni.startGyroscope = function (callback) { 303 | console.warn("api: uni.startGyroscope 监听陀螺仪数据变化事件 在当前平台不支持") 304 | } 305 | } 306 | if (isApiNotImplemented("stopGyroscope")) { 307 | // 停止监听陀螺仪数据 308 | uni.stopGyroscope = function (callback) { 309 | console.warn("api: uni.stopGyroscope 停止监听陀螺仪数据 在当前平台不支持") 310 | } 311 | } 312 | if (isApiNotImplemented("scanCode")) { 313 | // 调起客户端扫码界面,扫码成功后返回对应的结果 314 | uni.scanCode = function (callback) { 315 | console.warn("api: uni.scanCode 扫描二维码 在当前平台不支持") 316 | } 317 | } 318 | 319 | if (isApiNotImplemented("setClipboardData")) { 320 | // 设置系统剪贴板的内容 321 | uni.setClipboardData = function (callback) { 322 | console.warn("api: uni.setClipboardData 设置系统剪贴板的内容 在当前平台不支持") 323 | } 324 | } 325 | if (isApiNotImplemented("getClipboardData")) { 326 | // 获取系统剪贴板内容 327 | uni.getClipboardData = function (callback) { 328 | console.warn("api: uni.getClipboardData 获取系统剪贴板内容 在当前平台不支持") 329 | } 330 | } 331 | if (isApiNotImplemented("setScreenBrightness")) { 332 | // 设置屏幕亮度 333 | uni.setScreenBrightness = function (callback) { 334 | console.warn("api: uni.setScreenBrightness 设置屏幕亮度 在当前平台不支持") 335 | } 336 | } 337 | if (isApiNotImplemented("getScreenBrightness")) { 338 | // 获取屏幕亮度 339 | uni.getScreenBrightness = function (callback) { 340 | console.warn("api: uni.getScreenBrightness 获取屏幕亮度 在当前平台不支持") 341 | } 342 | } 343 | 344 | if (isApiNotImplemented("setKeepScreenOn")) { 345 | // 设置是否保持常亮状态 346 | uni.setKeepScreenOn = function (callback) { 347 | console.warn("api: uni.setKeepScreenOn 设置是否保持常亮状态 在当前平台不支持") 348 | } 349 | } 350 | if (isApiNotImplemented("onUserCaptureScreen")) { 351 | // 监听用户主动截屏事件 352 | uni.onUserCaptureScreen = function (callback) { 353 | console.warn("api: uni.onUserCaptureScreen 监听用户主动截屏事件 在当前平台不支持") 354 | } 355 | } 356 | if (isApiNotImplemented("addPhoneContact")) { 357 | // 添加联系人 358 | uni.addPhoneContact = function (callback) { 359 | console.warn("api: uni.addPhoneContact 添加联系人 在当前平台不支持") 360 | } 361 | } 362 | } 363 | 364 | /** 365 | * 界面相关 366 | */ 367 | function uiPolyfill () { 368 | if (isApiNotImplemented("hideNavigationBarLoading")) { 369 | // 在当前页面隐藏导航条加载动画 370 | uni.hideNavigationBarLoading = function (options) { 371 | console.warn("api: uni.hideNavigationBarLoading 在当前页面隐藏导航条加载动画 在当前平台不支持,回调成功") 372 | options.success && options.success() 373 | } 374 | } 375 | if (isApiNotImplemented("hideHomeButton")) { 376 | // 隐藏返回首页按钮 377 | uni.hideHomeButton = function (options) { 378 | console.warn("api: uni.hideHomeButton 隐藏返回首页按钮 在当前平台不支持,回调成功") 379 | options.success && options.success() 380 | } 381 | } 382 | 383 | if (isApiNotImplemented("setTabBarItem")) { 384 | // 动态设置 tabBar 某一项的内容 385 | uni.setTabBarItem = function (options) { 386 | console.warn("api: uni.setTabBarItem 动态设置 tabBar 某一项的内容 在当前平台不支持,执行失败") 387 | options.fail && options.fail() 388 | } 389 | } 390 | 391 | if (isApiNotImplemented("setTabBarStyle")) { 392 | // 动态设置 tabBar 的整体样式 393 | uni.setTabBarStyle = function (options) { 394 | console.warn("api: uni.setTabBarStyle 动态设置 tabBar 的整体样式 在当前平台不支持,回调成功") 395 | options.success && options.success() 396 | } 397 | } 398 | 399 | if (isApiNotImplemented("hideTabBar")) { 400 | // 隐藏 tabBar 401 | uni.hideTabBar = function (options) { 402 | console.warn("api: uni.hideTabBar 隐藏 tabBar 在当前平台不支持,执行失败") 403 | options.fail && options.fail() 404 | } 405 | } 406 | 407 | 408 | if (isApiNotImplemented("showTabBar")) { 409 | // 显示 tabBar 410 | uni.showTabBar = function (options) { 411 | console.warn("api: uni.showTabBar 显示 tabBar 在当前平台不支持,执行失败") 412 | options.fail && options.fail() 413 | } 414 | } 415 | if (isApiNotImplemented("setTabBarBadge")) { 416 | // 为 tabBar 某一项的右上角添加文本 417 | uni.setTabBarBadge = function (options) { 418 | console.warn("api: uni.setTabBarBadge 为 tabBar 某一项的右上角添加文本 在当前平台不支持,执行失败") 419 | options.fail && options.fail() 420 | } 421 | } 422 | if (isApiNotImplemented("removeTabBarBadge")) { 423 | // 移除 tabBar 某一项右上角的文本 424 | uni.removeTabBarBadge = function (options) { 425 | console.warn("api: uni.removeTabBarBadge 移除 tabBar 某一项右上角的文本 在当前平台不支持,执行失败") 426 | options.fail && options.fail() 427 | } 428 | } 429 | if (isApiNotImplemented("showTabBarRedDot")) { 430 | // 显示 tabBar 某一项的右上角的红点 431 | uni.showTabBarRedDot = function (options) { 432 | console.warn("api: uni.showTabBarRedDot 显示 tabBar 某一项的右上角的红点 在当前平台不支持,执行失败") 433 | options.fail && options.fail() 434 | } 435 | } 436 | if (isApiNotImplemented("hideTabBarRedDot")) { 437 | // 隐藏 tabBar 某一项的右上角的红点 438 | uni.hideTabBarRedDot = function (options) { 439 | console.warn("api: uni.hideTabBarRedDot 隐藏 tabBar 某一项的右上角的红点 在当前平台不支持,执行失败") 440 | options.fail && options.fail() 441 | } 442 | } 443 | /////////////////////////////// 444 | if (isApiNotImplemented("setBackgroundColor")) { 445 | // 动态设置窗口的背景色 446 | uni.setBackgroundColor = function (options) { 447 | console.warn("api: uni.setBackgroundColor 动态设置窗口的背景色 在当前平台不支持,执行失败") 448 | options.fail && options.fail() 449 | } 450 | } 451 | if (isApiNotImplemented("setBackgroundTextStyle")) { 452 | // 动态设置下拉背景字体、loading 图的样式 453 | uni.setBackgroundTextStyle = function (options) { 454 | console.warn("api: uni.setBackgroundTextStyle 动态设置下拉背景字体、loading 图的样式 在当前平台不支持,执行失败") 455 | options.fail && options.fail() 456 | } 457 | } 458 | if (isApiNotImplemented("onWindowResize")) { 459 | // 监听窗口尺寸变化事件 460 | uni.onWindowResize = function (callback) { 461 | console.warn("api: uni.onWindowResize 监听窗口尺寸变化事件 在当前平台不支持,执行失败") 462 | callback && callback() 463 | } 464 | } 465 | if (isApiNotImplemented("offWindowResize")) { 466 | // 取消监听窗口尺寸变化事件 467 | uni.offWindowResize = function (callback) { 468 | console.warn("api: uni.offWindowResize 取消监听窗口尺寸变化事件 在当前平台不支持,执行失败") 469 | callback && callback() 470 | } 471 | } 472 | if (isApiNotImplemented("loadFontFace")) { 473 | // 动态加载网络字体 474 | uni.loadFontFace = function (options) { 475 | console.warn("api: uni.loadFontFace 动态加载网络字体 在当前平台不支持,执行失败") 476 | options.fail && options.fail() 477 | } 478 | } 479 | if (isApiNotImplemented("getMenuButtonBoundingClientRect")) { 480 | // 微信胶囊按钮布局信息 481 | uni.getMenuButtonBoundingClientRect = function () { 482 | console.warn("api: uni.getMenuButtonBoundingClientRect 微信胶囊按钮布局信息 在当前平台不支持,执行失败") 483 | } 484 | } 485 | } 486 | /** 487 | * file 488 | */ 489 | function filePolyfill () { 490 | if (isApiNotImplemented("saveFile")) { 491 | // 保存文件到本地 492 | uni.saveFile = function (options) { 493 | console.warn("api: uni.saveFile 保存文件到本地 在当前平台不支持,执行失败") 494 | options.fail && options.fail() 495 | } 496 | } 497 | if (isApiNotImplemented("getSavedFileList")) { 498 | // 获取本地已保存的文件列表 499 | uni.getSavedFileList = function (options) { 500 | console.warn("api: uni.getSavedFileList 获取本地已保存的文件列表 在当前平台不支持,执行失败") 501 | options.fail && options.fail() 502 | } 503 | } 504 | if (isApiNotImplemented("getSavedFileInfo")) { 505 | // 获取本地文件的文件信息 506 | uni.getSavedFileInfo = function (options) { 507 | console.warn("api: uni.getSavedFileInfo 获取本地文件的文件信息 在当前平台不支持,执行失败") 508 | options.fail && options.fail() 509 | } 510 | } 511 | if (isApiNotImplemented("removeSavedFile")) { 512 | // 删除本地存储的文件 513 | uni.removeSavedFile = function (options) { 514 | console.warn("api: uni.removeSavedFile 删除本地存储的文件 在当前平台不支持,执行失败") 515 | options.fail && options.fail() 516 | } 517 | } 518 | if (isApiNotImplemented("getFileInfo")) { 519 | // 获取文件信息 520 | uni.getFileInfo = function (options) { 521 | console.warn("api: uni.getFileInfo 获取文件信息 在当前平台不支持,执行失败") 522 | options.fail && options.fail() 523 | } 524 | } 525 | if (isApiNotImplemented("openDocument")) { 526 | // 新开页面打开文档 527 | uni.openDocument = function (options) { 528 | console.warn("api: uni.openDocument 新开页面打开文档 在当前平台不支持,执行失败") 529 | options.fail && options.fail() 530 | } 531 | } 532 | if (isApiNotImplemented("getFileSystemManager")) { 533 | // 获取全局唯一的文件管理器 534 | uni.getFileSystemManager = function () { 535 | console.warn("api: uni.getFileSystemManager 获取全局唯一的文件管理器 在当前平台不支持,执行失败") 536 | } 537 | } 538 | } 539 | 540 | /** 541 | * canvas 542 | */ 543 | function canvasPolyfill () { 544 | if (isApiNotImplemented("createOffscreenCanvas")) { 545 | // 创建离屏 canvas 实例 546 | uni.createOffscreenCanvas = function () { 547 | console.warn("api: uni.createOffscreenCanvas 创建离屏 canvas 实例 在当前平台不支持,执行失败") 548 | } 549 | } 550 | 551 | if (isApiNotImplemented("canvasToTempFilePath")) { 552 | // 把当前画布指定区域的内容导出生成指定大小的图片 553 | uni.canvasToTempFilePath = function () { 554 | console.warn("api: uni.canvasToTempFilePath 把当前画布指定区域的内容导出生成指定大小的图片 在当前平台不支持,执行失败") 555 | } 556 | } 557 | } 558 | 559 | /** 560 | * Ad广告 561 | */ 562 | function adPolyfill () { 563 | if (isApiNotImplemented("createRewardedVideoAd")) { 564 | // 激励视频广告 565 | uni.createRewardedVideoAd = function () { 566 | console.warn("api: uni.createRewardedVideoAd 激励视频广告 在当前平台不支持,执行失败") 567 | return { 568 | show () { }, 569 | onLoad () { }, 570 | offLoad () { }, 571 | load () { }, 572 | onError () { }, 573 | offError () { }, 574 | onClose () { }, 575 | offClose () { }, 576 | } 577 | } 578 | } 579 | if (isApiNotImplemented("createInterstitialAd")) { 580 | // 插屏广告组件 581 | uni.createInterstitialAd = function () { 582 | console.warn("api: uni.createInterstitialAd 插屏广告组件 在当前平台不支持,执行失败") 583 | } 584 | } 585 | } 586 | 587 | /** 588 | * 第三方 589 | */ 590 | function pluginsPolyfill () { 591 | if (isApiNotImplemented("getProvider")) { 592 | // 获取服务供应商 593 | uni.getProvider = function (options) { 594 | console.warn("api: uni.getProvider 获取服务供应商 在当前平台不支持,执行失败") 595 | options && options.fail && options.fail() 596 | } 597 | } 598 | 599 | if (isApiNotImplemented("showShareMenu")) { 600 | // 小程序的原生菜单中显示分享按钮 601 | uni.showShareMenu = function (options) { 602 | console.warn("api: uni.showShareMenu 小程序的原生菜单中显示分享按钮 在当前平台不支持,执行失败") 603 | options && options.fail && options.fail() 604 | } 605 | } 606 | if (isApiNotImplemented("hideShareMenu")) { 607 | // 小程序的原生菜单中显示分享按钮 608 | uni.hideShareMenu = function (options) { 609 | console.warn("api: uni.hideShareMenu 小程序的原生菜单中隐藏分享按钮 在当前平台不支持,执行失败") 610 | options && options.fail && options.fail() 611 | } 612 | } 613 | if (isApiNotImplemented("requestPayment")) { 614 | // 支付 615 | uni.requestPayment = function (options) { 616 | console.error("api: uni.requestPayment 支付 在当前平台不支持(需自行参考文档封装),执行失败") 617 | options && options.fail && options.fail() 618 | } 619 | } 620 | if (isApiNotImplemented("createWorker")) { 621 | // 创建一个 Worker 线程 622 | uni.createWorker = function () { 623 | console.error("api: uni.createWorker 创建一个 Worker 线程 在当前平台不支持,执行失败") 624 | } 625 | } 626 | } 627 | 628 | /** 629 | * 其他 630 | */ 631 | function otherPolyfill () { 632 | if (isApiNotImplemented("authorize")) { 633 | // 提前向用户发起授权请求 634 | uni.authorize = function (options) { 635 | console.warn("api: uni.authorize 提前向用户发起授权请求 在当前平台不支持,执行失败") 636 | options.fail && options.fail() 637 | } 638 | } 639 | 640 | if (isApiNotImplemented("openSetting")) { 641 | // 调起客户端小程序设置界面 642 | uni.openSetting = function (options) { 643 | console.warn("api: uni.openSetting 调起客户端小程序设置界面 在当前平台不支持,执行失败") 644 | options.fail && options.fail() 645 | } 646 | } 647 | 648 | if (isApiNotImplemented("getSetting")) { 649 | // 获取用户的当前设置 650 | uni.getSetting = function (options) { 651 | console.warn("api: uni.getSetting 获取用户的当前设置 在当前平台不支持,【关键流程函数】回调成功") 652 | options.success && options.success({ 653 | authSetting: { 654 | scope: { 655 | userInfo: false 656 | } 657 | } 658 | }) 659 | } 660 | } 661 | 662 | if (isApiNotImplemented("chooseAddress")) { 663 | // 获取用户收货地址 664 | uni.chooseAddress = function (options) { 665 | console.warn("api: uni.chooseAddress 获取用户收货地址 在当前平台不支持,执行失败") 666 | options.fail && options.fail() 667 | } 668 | } 669 | if (isApiNotImplemented("chooseInvoiceTitle")) { 670 | // 选择用户的发票抬头 671 | uni.chooseInvoiceTitle = function (options) { 672 | console.warn("api: uni.chooseInvoiceTitle 选择用户的发票抬头 在当前平台不支持,执行失败") 673 | options.fail && options.fail() 674 | } 675 | } 676 | if (isApiNotImplemented("navigateToMiniProgram")) { 677 | // 打开另一个小程序 678 | uni.navigateToMiniProgram = function (options) { 679 | console.warn("api: uni.navigateToMiniProgram 打开另一个小程序 在当前平台不支持,执行失败") 680 | options.fail && options.fail() 681 | } 682 | } 683 | if (isApiNotImplemented("navigateBackMiniProgram")) { 684 | // 跳转回上一个小程序 685 | uni.navigateBackMiniProgram = function (options) { 686 | console.warn("api: uni.navigateBackMiniProgram 跳转回上一个小程序 在当前平台不支持,执行失败") 687 | options.fail && options.fail() 688 | } 689 | } 690 | if (isApiNotImplemented("getAccountInfoSync")) { 691 | // 获取当前帐号信息 692 | uni.getAccountInfoSync = function (options) { 693 | console.warn("api: uni.getAccountInfoSync 获取当前帐号信息 在当前平台不支持,执行失败") 694 | options.fail && options.fail() 695 | } 696 | } 697 | 698 | if (isApiNotImplemented("requestSubscribeMessage")) { 699 | // 订阅消息 700 | uni.requestSubscribeMessage = function (options) { 701 | console.warn("api: uni.requestSubscribeMessage 订阅消息 在当前平台不支持,执行失败") 702 | options.fail && options.fail() 703 | } 704 | } 705 | if (isApiNotImplemented("getUpdateManager")) { 706 | // 管理小程序更新 707 | uni.getUpdateManager = function (options) { 708 | console.error("api: uni.getUpdateManager 管理小程序更新 在当前平台不支持,执行失败") 709 | } 710 | } 711 | if (isApiNotImplemented("setEnableDebug")) { 712 | // 设置是否打开调试开关 713 | uni.setEnableDebug = function (options) { 714 | console.error("api: uni.setEnableDebug 设置是否打开调试开关 在当前平台不支持,执行失败") 715 | } 716 | } 717 | if (isApiNotImplemented("getExtConfig")) { 718 | // 获取第三方平台自定义的数据字段 719 | uni.getExtConfig = function (options) { 720 | console.error("api: uni.getExtConfig 获取第三方平台自定义的数据字段 在当前平台不支持,执行失败") 721 | } 722 | } 723 | if (isApiNotImplemented("getExtConfigSync")) { 724 | // uni.getExtConfig 的同步版本 725 | uni.getExtConfigSync = function (options) { 726 | console.error("api: uni.getExtConfigSync uni.getExtConfig 的同步版本 在当前平台不支持,执行失败") 727 | } 728 | } 729 | } 730 | 731 | /** 732 | * 认证 733 | */ 734 | function soterAuthPolyfill () { 735 | if (isApiNotImplemented("startSoterAuthentication")) { 736 | // 开始 SOTER 生物认证 737 | uni.startSoterAuthentication = function (options) { 738 | console.warn("api: uni.startSoterAuthentication 开始 SOTER 生物认证 在当前平台不支持") 739 | options.success && options.success() 740 | } 741 | } 742 | if (isApiNotImplemented("checkIsSupportSoterAuthentication")) { 743 | // 获取本机支持的 SOTER 生物认证方式 744 | uni.checkIsSupportSoterAuthentication = function (options) { 745 | console.warn("api: uni.checkIsSupportSoterAuthentication 开获取本机支持的 SOTER 生物认证方式 在当前平台不支持") 746 | options.success && options.success() 747 | } 748 | } 749 | if (isApiNotImplemented("checkIsSoterEnrolledInDevice")) { 750 | // 获取设备内是否录入如指纹等生物信息的接口 751 | uni.checkIsSoterEnrolledInDevice = function (options) { 752 | console.warn("api: uni.checkIsSoterEnrolledInDevice 获取设备内是否录入如指纹等生物信息的接口 在当前平台不支持") 753 | options.success && options.success() 754 | } 755 | } 756 | } 757 | 758 | /** 759 | * nfc 760 | */ 761 | function nfcPolyfill () { 762 | //微信小程序 763 | if (isApiNotImplemented("startHCE")) { 764 | // 初始化 NFC 模块 765 | uni.startHCE = function (options) { 766 | console.warn("api: uni.startHCE 初始化 NFC 模块 在当前平台不支持") 767 | options.success && options.success() 768 | } 769 | } 770 | } 771 | 772 | /** 773 | * 电量 774 | */ 775 | function batteryPolyfill () { 776 | //微信小程序 777 | if (isApiNotImplemented("getBatteryInfo")) { 778 | // 获取设备电量 779 | uni.getBatteryInfo = function (options) { 780 | console.warn("api: uni.getBatteryInfo 获取设备电量 在当前平台不支持") 781 | options.success && options.success() 782 | } 783 | } 784 | //微信小程序 785 | if (isApiNotImplemented("getBatteryInfoSync")) { 786 | // 同步获取设备电量 787 | uni.getBatteryInfoSync = function (options) { 788 | console.warn("api: uni.getBatteryInfoSync 同步获取设备电量 在当前平台不支持") 789 | } 790 | } 791 | } 792 | 793 | /** 794 | * wifi 795 | */ 796 | function wifiPolyfill () { 797 | //微信小程序 798 | if (isApiNotImplemented("startWifi")) { 799 | // 初始化 Wi-Fi 模块 800 | uni.startWifi = function (options) { 801 | console.warn("api: uni.startWifi 初始化 Wi-Fi 模块 在当前平台不支持") 802 | options.success && options.success() 803 | } 804 | } 805 | //字节跳动 806 | if (isApiNotImplemented("getConnectedWifi")) { 807 | // 获取设备当前所连的 WiFi 信息 808 | uni.getConnectedWifi = function (options) { 809 | console.warn("api: uni.getConnectedWifi 初获取设备当前所连的 WiFi 信息 在当前平台不支持") 810 | options.success && options.success() 811 | } 812 | } 813 | } 814 | 815 | /** 816 | * 蓝牙 817 | */ 818 | function bluetoothPolyfill () { 819 | //蓝牙 820 | if (isApiNotImplemented("openBluetoothAdapter")) { 821 | // 初始化蓝牙模块 822 | uni.openBluetoothAdapter = function (object) { 823 | console.warn("api: uni.openBluetoothAdapter 初始化蓝牙模块 在当前平台不支持") 824 | } 825 | } 826 | if (isApiNotImplemented("startBluetoothDevicesDiscovery")) { 827 | // 开始搜寻附近的蓝牙外围设备 828 | uni.startBluetoothDevicesDiscovery = function (callback) { 829 | console.warn("api: uni.startBluetoothDevicesDiscovery 开始搜寻附近的蓝牙外围设备 在当前平台不支持") 830 | } 831 | } 832 | if (isApiNotImplemented("onBluetoothDeviceFound")) { 833 | // 监听寻找到新设备的事件 834 | uni.onBluetoothDeviceFound = function (callback) { 835 | console.warn("api: uni.onBluetoothDeviceFound 监听寻找到新设备的事件 在当前平台不支持") 836 | } 837 | } 838 | if (isApiNotImplemented("stopBluetoothDevicesDiscovery")) { 839 | // 停止搜寻附近的蓝牙外围设备 840 | uni.stopBluetoothDevicesDiscovery = function (callback) { 841 | console.warn("api: uni.stopBluetoothDevicesDiscovery 停止搜寻附近的蓝牙外围设备 在当前平台不支持") 842 | } 843 | } 844 | if (isApiNotImplemented("onBluetoothAdapterStateChange")) { 845 | // 监听蓝牙适配器状态变化事件 846 | uni.onBluetoothAdapterStateChange = function (callback) { 847 | console.warn("api: uni.onBluetoothAdapterStateChange 监听蓝牙适配器状态变化事件 在当前平台不支持") 848 | } 849 | } 850 | if (isApiNotImplemented("getConnectedBluetoothDevices")) { 851 | // 根据 uuid 获取处于已连接状态的设备 852 | uni.getConnectedBluetoothDevices = function (callback) { 853 | console.warn("api: uni.getConnectedBluetoothDevices 根据 uuid 获取处于已连接状态的设备 在当前平台不支持") 854 | } 855 | } 856 | if (isApiNotImplemented("getBluetoothDevices")) { 857 | // 获取在蓝牙模块生效期间所有已发现的蓝牙设备 858 | uni.getBluetoothDevices = function (callback) { 859 | console.warn("api: uni.getBluetoothDevices 获取在蓝牙模块生效期间所有已发现的蓝牙设备 在当前平台不支持") 860 | } 861 | } 862 | if (isApiNotImplemented("getBluetoothAdapterState")) { 863 | // 获取本机蓝牙适配器状态 864 | uni.getBluetoothAdapterState = function (callback) { 865 | console.warn("api: uni.getBluetoothAdapterState 获取本机蓝牙适配器状态 在当前平台不支持") 866 | } 867 | } 868 | if (isApiNotImplemented("closeBluetoothAdapter")) { 869 | // 关闭蓝牙模块 870 | uni.closeBluetoothAdapter = function (callback) { 871 | console.warn("api: uni.closeBluetoothAdapter 关闭蓝牙模块 在当前平台不支持") 872 | } 873 | } 874 | } 875 | 876 | /** 877 | * 低功耗蓝牙 878 | */ 879 | function blePolyfill () { 880 | if (isApiNotImplemented("setBLEMTU")) { 881 | // 设置蓝牙最大传输单元 882 | uni.setBLEMTU = function (callback) { 883 | console.warn("api: uni.setBLEMTU 设置蓝牙最大传输单元 在当前平台不支持") 884 | } 885 | } 886 | if (isApiNotImplemented("readBLECharacteristicValue")) { 887 | // 读取低功耗蓝牙设备的特征值的二进制数据值 888 | uni.readBLECharacteristicValue = function (callback) { 889 | console.warn("api: uni.readBLECharacteristicValue 读取低功耗蓝牙设备的特征值的二进制数据值 在当前平台不支持") 890 | } 891 | } 892 | if (isApiNotImplemented("onBLEConnectionStateChange")) { 893 | // 关闭蓝牙模块 894 | uni.onBLEConnectionStateChange = function (callback) { 895 | console.warn("api: uni.onBLEConnectionStateChange 监听低功耗蓝牙连接状态的改变事件 在当前平台不支持") 896 | } 897 | } 898 | if (isApiNotImplemented("notifyBLECharacteristicValueChange")) { 899 | // 启用低功耗蓝牙设备特征值变化时的 notify 功能 900 | uni.notifyBLECharacteristicValueChange = function (callback) { 901 | console.warn("api: uni.notifyBLECharacteristicValueChange 启用低功耗蓝牙设备特征值变化时的 notify 功能 在当前平台不支持") 902 | } 903 | } 904 | if (isApiNotImplemented("getBLEDeviceServices")) { 905 | // 获取蓝牙设备所有服务 906 | uni.getBLEDeviceServices = function (callback) { 907 | console.warn("api: uni.getBLEDeviceServices 获取蓝牙设备所有服务 在当前平台不支持") 908 | } 909 | } 910 | if (isApiNotImplemented("getBLEDeviceRSSI")) { 911 | // 获取蓝牙设备的信号强度 912 | uni.getBLEDeviceRSSI = function (callback) { 913 | console.warn("api: uni.getBLEDeviceRSSI 获取蓝牙设备的信号强度 在当前平台不支持") 914 | } 915 | } 916 | if (isApiNotImplemented("createBLEConnection")) { 917 | // 连接低功耗蓝牙设备 918 | uni.createBLEConnection = function (callback) { 919 | console.warn("api: uni.createBLEConnection 连接低功耗蓝牙设备 在当前平台不支持") 920 | } 921 | } 922 | if (isApiNotImplemented("closeBLEConnection")) { 923 | // 断开与低功耗蓝牙设备的连接 924 | uni.closeBLEConnection = function (callback) { 925 | console.warn("api: uni.closeBLEConnection 断开与低功耗蓝牙设备的连接 在当前平台不支持") 926 | } 927 | } 928 | } 929 | 930 | /** 931 | * iBeacon 932 | */ 933 | function iBeaconPolyfill () { 934 | if (isApiNotImplemented("onBeaconServiceChange")) { 935 | // 监听 iBeacon 服务状态变化事件 936 | uni.onBeaconServiceChange = function (callback) { 937 | console.warn("api: uni.onBeaconServiceChange 监听 iBeacon 服务状态变化事件 在当前平台不支持") 938 | } 939 | } 940 | if (isApiNotImplemented("onBeaconUpdate")) { 941 | // 监听 iBeacon 设备更新事件 942 | uni.onBeaconUpdate = function (callback) { 943 | console.warn("api: uni.onBeaconUpdate 监听 iBeacon 设备更新事件 在当前平台不支持") 944 | } 945 | } 946 | if (isApiNotImplemented("getBeacons")) { 947 | // 获取所有已搜索到的 iBeacon 设备 948 | uni.getBeacons = function (callback) { 949 | console.warn("api: uni.getBeacons 获取所有已搜索到的 iBeacon 设备 在当前平台不支持") 950 | } 951 | } 952 | if (isApiNotImplemented("startBeaconDiscovery")) { 953 | // 开始搜索附近的 iBeacon 设备 954 | uni.startBeaconDiscovery = function (callback) { 955 | console.warn("api: uni.startBeaconDiscovery 开始搜索附近的 iBeacon 设备 在当前平台不支持") 956 | } 957 | } 958 | if (isApiNotImplemented("stopBeaconDiscovery")) { 959 | // 停止搜索附近的 iBeacon 设备 960 | uni.stopBeaconDiscovery = function (callback) { 961 | console.warn("api: uni.stopBeaconDiscovery 停止搜索附近的 iBeacon 设备 在当前平台不支持") 962 | } 963 | } 964 | } 965 | 966 | /** 967 | * uni.navigateTo 和 uni.redirectTo 不能直接跳转tabbar里面的页面,拦截fail,并当它为tabbar页面时,直接调用uni.switchTab() 968 | */ 969 | function routerPolyfill () { 970 | var routerApiFailEventHandle = function (res, options) { 971 | if (res.errMsg.indexOf('tabbar page') > -1) { 972 | console.error('res.errMsg: ' + res.errMsg) 973 | var apiName = res.errMsg.match(/not\s(\w+)\sa/)[1] 974 | console.log(apiName) 975 | var url = options.url 976 | if (url) { 977 | var queryString = url.split('?')[1] 978 | if (queryString) { 979 | console.error(apiName + " 的参数将被忽略:" + queryString) 980 | } 981 | uni.switchTab({ 982 | url: url 983 | }) 984 | } 985 | } 986 | } 987 | 988 | var routerApiHandle = function (oriLogFunc) { 989 | return function (options) { 990 | try { 991 | if (options.fail) { 992 | options.fail = (function fail (failFun) { 993 | return function (res) { 994 | routerApiFailEventHandle(res, options) 995 | failFun(res) 996 | } 997 | })(options.fail) 998 | } else { 999 | options.fail = function (res) { 1000 | routerApiFailEventHandle(res, options) 1001 | } 1002 | } 1003 | oriLogFunc.call(oriLogFunc, options) 1004 | } catch (e) { 1005 | console.error('uni.navigateTo or uni.redirectTo error', e) 1006 | } 1007 | } 1008 | } 1009 | 1010 | uni.navigateTo = routerApiHandle(uni.navigateTo) 1011 | uni.redirectTo = routerApiHandle(uni.redirectTo) 1012 | } 1013 | 1014 | var isInit = false 1015 | /** 1016 | * polyfill 入口 1017 | */ 1018 | function init () { 1019 | if (isInit) return 1020 | isInit = true 1021 | 1022 | console.log("Api polyfill start") 1023 | //条件编译 1024 | platformPolyfill() 1025 | //登录 1026 | loginPolyfill() 1027 | //base64 1028 | base64Polyfill() 1029 | //地图 1030 | mapPolyfill() 1031 | //设备 1032 | devicePolyfill() 1033 | 1034 | //媒体相关 1035 | mediaPolyfill() 1036 | 1037 | //蓝牙 1038 | bluetoothPolyfill() 1039 | //低功耗蓝牙 1040 | blePolyfill() 1041 | //iBeacon 1042 | iBeaconPolyfill() 1043 | //wifi 1044 | wifiPolyfill() 1045 | //电量信息 1046 | batteryPolyfill() 1047 | //nfc 1048 | nfcPolyfill() 1049 | //auth 1050 | soterAuthPolyfill() 1051 | 1052 | //ui 1053 | uiPolyfill() 1054 | //file 1055 | filePolyfill() 1056 | //canvas 1057 | canvasPolyfill() 1058 | //ad 1059 | adPolyfill() 1060 | //plugins 1061 | pluginsPolyfill() 1062 | //other 1063 | otherPolyfill() 1064 | 1065 | //router 1066 | routerPolyfill() 1067 | } 1068 | 1069 | 1070 | module.exports = { 1071 | init, 1072 | guid 1073 | } 1074 | -------------------------------------------------------------------------------- /sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /static/pages/images/7bb5fad244cb931399549aec9faffeca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/7bb5fad244cb931399549aec9faffeca.png -------------------------------------------------------------------------------- /static/pages/images/address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/address.png -------------------------------------------------------------------------------- /static/pages/images/bg0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg0.png -------------------------------------------------------------------------------- /static/pages/images/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg1.png -------------------------------------------------------------------------------- /static/pages/images/bg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg3.png -------------------------------------------------------------------------------- /static/pages/images/bg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg4.png -------------------------------------------------------------------------------- /static/pages/images/bg5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg5.png -------------------------------------------------------------------------------- /static/pages/images/bg6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg6.png -------------------------------------------------------------------------------- /static/pages/images/bg7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg7.png -------------------------------------------------------------------------------- /static/pages/images/bg9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/bg9.png -------------------------------------------------------------------------------- /static/pages/images/btn1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/btn1.png -------------------------------------------------------------------------------- /static/pages/images/btn2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/btn2.png -------------------------------------------------------------------------------- /static/pages/images/icon-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-arrow.png -------------------------------------------------------------------------------- /static/pages/images/icon-arrow1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-arrow1.png -------------------------------------------------------------------------------- /static/pages/images/icon-arrow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-arrow2.png -------------------------------------------------------------------------------- /static/pages/images/icon-arrow3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-arrow3.png -------------------------------------------------------------------------------- /static/pages/images/icon-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-close.png -------------------------------------------------------------------------------- /static/pages/images/icon-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-delete.png -------------------------------------------------------------------------------- /static/pages/images/icon-gou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-gou.png -------------------------------------------------------------------------------- /static/pages/images/icon-kefu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-kefu.png -------------------------------------------------------------------------------- /static/pages/images/icon-mony.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-mony.png -------------------------------------------------------------------------------- /static/pages/images/icon-nuochema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-nuochema.png -------------------------------------------------------------------------------- /static/pages/images/icon-order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-order.png -------------------------------------------------------------------------------- /static/pages/images/icon-weixin-pay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-weixin-pay.jpg -------------------------------------------------------------------------------- /static/pages/images/icon-wenti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-wenti.png -------------------------------------------------------------------------------- /static/pages/images/icon-yaoqing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/icon-yaoqing.png -------------------------------------------------------------------------------- /static/pages/images/img0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/img0.png -------------------------------------------------------------------------------- /static/pages/images/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/img1.png -------------------------------------------------------------------------------- /static/pages/images/nav-index-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-index-active.png -------------------------------------------------------------------------------- /static/pages/images/nav-index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-index.png -------------------------------------------------------------------------------- /static/pages/images/nav-me-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-me-active.png -------------------------------------------------------------------------------- /static/pages/images/nav-me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-me.png -------------------------------------------------------------------------------- /static/pages/images/nav-shangjin-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-shangjin-active.png -------------------------------------------------------------------------------- /static/pages/images/nav-shangjin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/nav-shangjin.png -------------------------------------------------------------------------------- /static/pages/images/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/static/pages/images/qrcode.png -------------------------------------------------------------------------------- /transform.log: -------------------------------------------------------------------------------- 1 | !!! NULL docs activeTextEditor return null 2 | buffer sync supports: [] 3 | event: [{"range":{"end":{"character":19,"line":106},"start":{"character":27,"line":69}},"rangeLength":850,"rangeOffset":2768,"text":""}] 4 | buffer sync supports: [{"fileName":"e:/mywww/miniprograms_uni/pages/bindCarnumber/bindCarnumber.vue","textChanges":[{"newText":"","start":{"line":70,"offset":28},"end":{"line":107,"offset":20}}]}] 5 | cancel last request:0 6 | cancel last request:0 7 | sendEvent willSaveTextDocument 8 | buffer sync supports: [] 9 | diagnostics.$changeMany 10 | buffer sync supports: [] 11 | diagnostics.$changeMany 12 | buffer sync supports: [] 13 | diagnostics.$changeMany 14 | buffer sync supports: [] 15 | diagnostics.$changeMany 16 | buffer sync supports: [] 17 | diagnostics.$changeMany 18 | buffer sync supports: [] 19 | diagnostics.$changeMany 20 | buffer sync supports: [] 21 | diagnostics.$changeMany 22 | buffer sync supports: [] 23 | diagnostics.$changeMany 24 | buffer sync supports: [] 25 | cancel last request:0 26 | event: [{"range":{"end":{"character":10,"line":33},"start":{"character":15,"line":29}},"rangeLength":190,"rangeOffset":1531,"text":""}] 27 | buffer sync supports: [{"fileName":"e:/mywww/miniprograms_uni/pages/bindCarnumber/bindCarnumber.vue","textChanges":[{"newText":"","start":{"line":30,"offset":16},"end":{"line":34,"offset":11}}]}] 28 | sendEvent willSaveTextDocument 29 | cancel last request:0 30 | cancel last request:0 31 | cancel last request:0 32 | cancel last request:0 33 | -------------------------------------------------------------------------------- /uni.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 这里是uni-app内置的常用样式变量 3 | * 4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App 6 | * 7 | */ 8 | 9 | /** 10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 11 | * 12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 13 | */ 14 | 15 | /* 颜色变量 */ 16 | 17 | /* 行为相关颜色 */ 18 | $uni-color-primary: #007aff; 19 | $uni-color-success: #4cd964; 20 | $uni-color-warning: #f0ad4e; 21 | $uni-color-error: #dd524d; 22 | 23 | /* 文字基本颜色 */ 24 | $uni-text-color:#333;//基本色 25 | $uni-text-color-inverse:#fff;//反色 26 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 27 | $uni-text-color-placeholder: #808080; 28 | $uni-text-color-disable:#c0c0c0; 29 | 30 | /* 背景颜色 */ 31 | $uni-bg-color:#ffffff; 32 | $uni-bg-color-grey:#f8f8f8; 33 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色 34 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 35 | 36 | /* 边框颜色 */ 37 | $uni-border-color:#c8c7cc; 38 | 39 | /* 尺寸变量 */ 40 | 41 | /* 文字尺寸 */ 42 | $uni-font-size-sm:12px; 43 | $uni-font-size-base:14px; 44 | $uni-font-size-lg:16; 45 | 46 | /* 图片尺寸 */ 47 | $uni-img-size-sm:20px; 48 | $uni-img-size-base:26px; 49 | $uni-img-size-lg:40px; 50 | 51 | /* Border Radius */ 52 | $uni-border-radius-sm: 2px; 53 | $uni-border-radius-base: 3px; 54 | $uni-border-radius-lg: 6px; 55 | $uni-border-radius-circle: 50%; 56 | 57 | /* 水平间距 */ 58 | $uni-spacing-row-sm: 5px; 59 | $uni-spacing-row-base: 10px; 60 | $uni-spacing-row-lg: 15px; 61 | 62 | /* 垂直间距 */ 63 | $uni-spacing-col-sm: 4px; 64 | $uni-spacing-col-base: 8px; 65 | $uni-spacing-col-lg: 12px; 66 | 67 | /* 透明度 */ 68 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 69 | 70 | /* 文章场景相关 */ 71 | $uni-color-title: #2C405A; // 文章标题颜色 72 | $uni-font-size-title:20px; 73 | $uni-color-subtitle: #555555; // 二级标题颜色 74 | $uni-font-size-subtitle:26px; 75 | $uni-color-paragraph: #3F536E; // 文章段落颜色 76 | $uni-font-size-paragraph:15px; 77 | -------------------------------------------------------------------------------- /uni_modules/mp-html/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/uni_modules/mp-html/README.md -------------------------------------------------------------------------------- /uni_modules/mp-html/changelog.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangsanproject/uniappnc/ad6e03fc5b4c77a73d090580860c3075ad851550/uni_modules/mp-html/changelog.md -------------------------------------------------------------------------------- /uni_modules/mp-html/components/mp-html/mp-html.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 446 | 447 | 463 | -------------------------------------------------------------------------------- /uni_modules/mp-html/components/mp-html/node/node.vue: -------------------------------------------------------------------------------- 1 |