diff --git a/App.vue b/App.vue index c03cf91bad16f073b0dcba224d2ad417397b50b9..8ae266c1fe43c675cafc3bda70bbcfcc99b1e2e4 100644 --- a/App.vue +++ b/App.vue @@ -93,7 +93,7 @@ /* #endif */ } - /* #ifndef APP-NVUE */ + /* #ifndef APP-NVUE */ view, scroll-view, text, @@ -105,10 +105,8 @@ box-sizing: border-box; flex-direction: column; } - scroll-view { -webkit-overflow-scrolling: touch; } - - /* #endif */ + /* #endif */ diff --git a/baseapp.config.js b/baseapp.config.js index 43d68646865f3b2e156a618956c6c1c7eb452042..c7ec7023bcd295c224974d0e75095697ea97178a 100644 --- a/baseapp.config.js +++ b/baseapp.config.js @@ -18,7 +18,14 @@ module.exports = { "/uni_modules/uni-news-favorite/pages/uni-news-favorite/list", "/pages/ucenter/edit/uploadCutImageToUnicloud" ], - "login": [ "smsCode","univerify", "username", "weixin", "apple"] //默认就是短信验证码登陆 + "login": [ "smsCode","uniVerify", "username", "weixin", "apple"], + /* + 根据数组的第0项,决定登陆方式的第一优先级。 + 为完全列举到的或设备环境不支持的选项,将被隐藏。 + 快捷登陆按钮,在任意一页面都存在。 + 所以只有三种情况: + 一键登录(uniVerify)、账号(username)、验证码登陆(其他值为第一项都为验证码登陆) + */ }, "about": { "appName": "base-app", diff --git a/common/appInit.js b/common/appInit.js index 8da69676e94c6e5c8c5f569485c0320a99494579..0a807143d87870ed4664b6e710c122b9131239d2 100644 --- a/common/appInit.js +++ b/common/appInit.js @@ -8,8 +8,7 @@ export default function() { initAppVersion(); // baseappConfig挂载到getApp(). - getApp({allowDefault: true}).config = baseappConfig; - + getApp({allowDefault: true}).config = baseappConfig; //自定义路由拦截 const { @@ -41,8 +40,8 @@ export default function() { } //控制登陆优先级 if (url == '/pages/ucenter/login-page/index/index') { - //一键登录(univerify)、密码登陆(username)、快捷登录&验证码登陆(!univerify&password) - if (login[0] == 'univerify') { + //一键登录(uniVerify)、账号(username)、验证码登陆(短信smsCode) + if (login[0] == 'uniVerify') { // console.log(e.url,url); if (e.url == url) { e.url += '?' @@ -67,7 +66,7 @@ export default function() { fail(e) { // 失败回调拦截 console.log(e); if ( - e.errCode === 11 && uni.getSystemInfoSync().platform == "android" || + e.errCode === 11 && uni.getSystemInfoSync().platform == "android" || e.errCode === 2 && uni.getSystemInfoSync().platform == "ios" ){ uni.showModal({ diff --git a/common/extiLogin.js b/common/extiLogin.js deleted file mode 100644 index 17ab4c3d59ffe239d921c96f9b306b6f292c3ebe..0000000000000000000000000000000000000000 --- a/common/extiLogin.js +++ /dev/null @@ -1,25 +0,0 @@ -export default function(result){ - uni.showToast({ - title: '登陆成功', - icon: 'none' - }); - console.log('登陆成功',result); - uni.setStorageSync('uni_id_uid', result.uid) - uni.setStorageSync('uni_id_token', result.token) - uni.setStorageSync('uni_id_token_expired', result.tokenExpired) - //delete result.userInfo.token - // this.setUserInfo(result.userInfo) - - var delta = 0//判断需要返回几层 - let pages = getCurrentPages(); - // console.log(pages); - pages.forEach((page,index)=>{ - // console.log(pages[pages.length-index-1].route.split('/')[2]); - pages[pages.length-index-1].route.split('/') - if(pages[pages.length-index-1].route.split('/')[2] == 'login-page'){ - delta ++ - } - }) - // console.log('判断需要返回几层',delta); - uni.navigateBack({delta}) -} \ No newline at end of file diff --git a/components/auth-btn/auth-btn.vue b/components/auth-btn/auth-btn.vue deleted file mode 100644 index 2047000e7eb74d46c4b94846b40bf0ab52521908..0000000000000000000000000000000000000000 --- a/components/auth-btn/auth-btn.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/components/login-action-sheet/login-action-sheet.vue b/components/login-action-sheet/login-action-sheet.vue deleted file mode 100644 index f73419734a3343f20af1ad8c3344ddecf3fa6062..0000000000000000000000000000000000000000 --- a/components/login-action-sheet/login-action-sheet.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/components/null/null.vue b/components/null/null.vue new file mode 100644 index 0000000000000000000000000000000000000000..7bf8b74da2fce9508d3476b82d7267650586f019 --- /dev/null +++ b/components/null/null.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/components/refreshBox/refreshBox.nvue b/components/refreshBox/refreshBox.nvue new file mode 100644 index 0000000000000000000000000000000000000000..54ce6cce48d98e2ed8e81958b2c1846b1e482ee9 --- /dev/null +++ b/components/refreshBox/refreshBox.nvue @@ -0,0 +1,71 @@ + + + + diff --git a/components/u-parse/components/wxParseAudio.vue b/components/u-parse/components/wxParseAudio.vue deleted file mode 100644 index b277717f10b99d3f569da411b04528a40c22d222..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseAudio.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseImg.vue b/components/u-parse/components/wxParseImg.vue deleted file mode 100644 index de9978b1db7ad66b051a3cc506486ff9c28c9ce9..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseImg.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTable.vue b/components/u-parse/components/wxParseTable.vue deleted file mode 100644 index e1e25bf5ebeeb03d4de0c30eaac30eade2a7011e..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTable.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - \ No newline at end of file diff --git a/components/u-parse/components/wxParseTemplate0.vue b/components/u-parse/components/wxParseTemplate0.vue deleted file mode 100644 index 01bf8e167bd04c35944a1aa215bf21872db0566f..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate0.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate1.vue b/components/u-parse/components/wxParseTemplate1.vue deleted file mode 100644 index 7054e35fa54630114d83705331c35d8041ef1306..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate1.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate10.vue b/components/u-parse/components/wxParseTemplate10.vue deleted file mode 100644 index 11c252ce6a46fb73063dc69f5742a0e5112d3792..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate10.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate11.vue b/components/u-parse/components/wxParseTemplate11.vue deleted file mode 100644 index 0d04e53c4fca34129d60c608e73f10a994cf2b24..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate11.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate2.vue b/components/u-parse/components/wxParseTemplate2.vue deleted file mode 100644 index f06782a14c142d95f5536a9603b0bc28de88bfb7..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate2.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate3.vue b/components/u-parse/components/wxParseTemplate3.vue deleted file mode 100644 index b0943f8498307ce0375e700935ce6cbf4d2a3991..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate3.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate4.vue b/components/u-parse/components/wxParseTemplate4.vue deleted file mode 100644 index 8a437564ccf7d7b5f33936b7a8a8281012d8247d..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate4.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate5.vue b/components/u-parse/components/wxParseTemplate5.vue deleted file mode 100644 index 0c0993e39cd367438d2899cc53398ede4c089fe0..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate5.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate6.vue b/components/u-parse/components/wxParseTemplate6.vue deleted file mode 100644 index 0dca28ae3de8c8d103e62dd4bc527f7a9de500ae..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate6.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate7.vue b/components/u-parse/components/wxParseTemplate7.vue deleted file mode 100644 index b62acafe60976999276dcafc01ed5e07d7943221..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate7.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate8.vue b/components/u-parse/components/wxParseTemplate8.vue deleted file mode 100644 index f6fa037d7cdc02c5b26264a8fd4253a3a56276bb..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate8.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseTemplate9.vue b/components/u-parse/components/wxParseTemplate9.vue deleted file mode 100644 index 47ac81a2bf68433a4e87b53ad6541716c65b42a7..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseTemplate9.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/components/u-parse/components/wxParseVideo.vue b/components/u-parse/components/wxParseVideo.vue deleted file mode 100644 index 7d05285ea5cb5d97bef8cc36a763b498fff4593d..0000000000000000000000000000000000000000 --- a/components/u-parse/components/wxParseVideo.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/components/u-parse/libs/html2json.js b/components/u-parse/libs/html2json.js deleted file mode 100644 index 09273820f381c410931de744a511a962d75985f1..0000000000000000000000000000000000000000 --- a/components/u-parse/libs/html2json.js +++ /dev/null @@ -1,261 +0,0 @@ -/** - * html2Json 改造来自: https://github.com/Jxck/html2json - * - * - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ - -import wxDiscode from './wxDiscode'; -import HTMLParser from './htmlparser'; - -function makeMap(str) { - const obj = {}; - const items = str.split(','); - for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; - return obj; -} - -// Block Elements - HTML 5 -const block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); - -// Inline Elements - HTML 5 -const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); - -// Elements that you can, intentionally, leave open -// (and which close themselves) -const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); - -function removeDOCTYPE(html) { - const isDocument = /([^]*)<\/body>/.test(html); - return isDocument ? RegExp.$1 : html; -} - -function trimHtml(html) { - return html - .replace(//gi, '') - .replace(/\/\*.*?\*\//gi, '') - .replace(/[ ]+/gi, '') - .replace(//gi, ''); -} - -function getScreenInfo() { - const screen = {}; - wx.getSystemInfo({ - success: (res) => { - screen.width = res.windowWidth; - screen.height = res.windowHeight; - }, - }); - return screen; -} - -function html2json(html, customHandler, imageProp, host) { - // 处理字符串 - html = removeDOCTYPE(html); - html = trimHtml(html); - html = wxDiscode.strDiscode(html); - // 生成node节点 - const bufArray = []; - const results = { - nodes: [], - imageUrls: [], - }; - - const screen = getScreenInfo(); - function Node(tag) { - this.node = 'element'; - this.tag = tag; - - this.$screen = screen; - } - - HTMLParser(html, { - start(tag, attrs, unary) { - // node for this element - const node = new Node(tag); - - if (bufArray.length !== 0) { - const parent = bufArray[0]; - if (parent.nodes === undefined) { - parent.nodes = []; - } - } - - if (block[tag]) { - node.tagType = 'block'; - } else if (inline[tag]) { - node.tagType = 'inline'; - } else if (closeSelf[tag]) { - node.tagType = 'closeSelf'; - } - - node.attr = attrs.reduce((pre, attr) => { - const { name } = attr; - let { value } = attr; - if (name === 'class') { - node.classStr = value; - } - // has multi attibutes - // make it array of attribute - if (name === 'style') { - node.styleStr = value; - } - if (value.match(/ /)) { - value = value.split(' '); - } - - // if attr already exists - // merge it - if (pre[name]) { - if (Array.isArray(pre[name])) { - // already array, push to last - pre[name].push(value); - } else { - // single value, make it array - pre[name] = [pre[name], value]; - } - } else { - // not exist, put it - pre[name] = value; - } - - return pre; - }, {}); - - // 优化样式相关属性 - if (node.classStr) { - node.classStr += ` ${node.tag}`; - } else { - node.classStr = node.tag; - } - if (node.tagType === 'inline') { - node.classStr += ' inline'; - } - - // 对img添加额外数据 - if (node.tag === 'img') { - let imgUrl = node.attr.src; - imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain); - Object.assign(node.attr, imageProp, { - src: imgUrl || '', - }); - if (imgUrl) { - results.imageUrls.push(imgUrl); - } - } - - // 处理a标签属性 - if (node.tag === 'a') { - node.attr.href = node.attr.href || ''; - } - - // 处理font标签样式属性 - if (node.tag === 'font') { - const fontSize = [ - 'x-small', - 'small', - 'medium', - 'large', - 'x-large', - 'xx-large', - '-webkit-xxx-large', - ]; - const styleAttrs = { - color: 'color', - face: 'font-family', - size: 'font-size', - }; - if (!node.styleStr) node.styleStr = ''; - Object.keys(styleAttrs).forEach((key) => { - if (node.attr[key]) { - const value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key]; - node.styleStr += `${styleAttrs[key]}: ${value};`; - } - }); - } - - // 临时记录source资源 - if (node.tag === 'source') { - results.source = node.attr.src; - } - - if (customHandler.start) { - customHandler.start(node, results); - } - - if (unary) { - // if this tag doesn't have end tag - // like - // add to parents - const parent = bufArray[0] || results; - if (parent.nodes === undefined) { - parent.nodes = []; - } - parent.nodes.push(node); - } else { - bufArray.unshift(node); - } - }, - end(tag) { - // merge into parent tag - const node = bufArray.shift(); - if (node.tag !== tag) { - console.error('invalid state: mismatch end tag'); - } - - // 当有缓存source资源时于于video补上src资源 - if (node.tag === 'video' && results.source) { - node.attr.src = results.source; - delete results.source; - } - - if (customHandler.end) { - customHandler.end(node, results); - } - - if (bufArray.length === 0) { - results.nodes.push(node); - } else { - const parent = bufArray[0]; - if (!parent.nodes) { - parent.nodes = []; - } - parent.nodes.push(node); - } - }, - chars(text) { - if (!text.trim()) return; - - const node = { - node: 'text', - text, - }; - - if (customHandler.chars) { - customHandler.chars(node, results); - } - - if (bufArray.length === 0) { - results.nodes.push(node); - } else { - const parent = bufArray[0]; - if (parent.nodes === undefined) { - parent.nodes = []; - } - parent.nodes.push(node); - } - }, - }); - - return results; -} - -export default html2json; diff --git a/components/u-parse/libs/htmlparser.js b/components/u-parse/libs/htmlparser.js deleted file mode 100644 index 2939da3de89cd5c745f92545367a820dc3a2d3f6..0000000000000000000000000000000000000000 --- a/components/u-parse/libs/htmlparser.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * - * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser - * - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ -// Regular Expressions for parsing tags and attributes - -const startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; -const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; -const attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; - -function makeMap(str) { - const obj = {}; - const items = str.split(','); - for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; - return obj; -} - -// Empty Elements - HTML 5 -const empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); - -// Block Elements - HTML 5 -const block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); - -// Inline Elements - HTML 5 -const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); - -// Elements that you can, intentionally, leave open -// (and which close themselves) -const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); - -// Attributes that have their values filled in disabled="disabled" -const fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); - -function HTMLParser(html, handler) { - let index; - let chars; - let match; - let last = html; - const stack = []; - - stack.last = () => stack[stack.length - 1]; - - function parseEndTag(tag, tagName) { - // If no tag name is provided, clean shop - let pos; - if (!tagName) { - pos = 0; - } else { - // Find the closest opened tag of the same type - tagName = tagName.toLowerCase(); - for (pos = stack.length - 1; pos >= 0; pos -= 1) { - if (stack[pos] === tagName) break; - } - } - if (pos >= 0) { - // Close all the open elements, up the stack - for (let i = stack.length - 1; i >= pos; i -= 1) { - if (handler.end) handler.end(stack[i]); - } - - // Remove the open elements from the stack - stack.length = pos; - } - } - - function parseStartTag(tag, tagName, rest, unary) { - tagName = tagName.toLowerCase(); - - if (block[tagName]) { - while (stack.last() && inline[stack.last()]) { - parseEndTag('', stack.last()); - } - } - - if (closeSelf[tagName] && stack.last() === tagName) { - parseEndTag('', tagName); - } - - unary = empty[tagName] || !!unary; - - if (!unary) stack.push(tagName); - - if (handler.start) { - const attrs = []; - - rest.replace(attr, function genAttr(matches, name) { - const value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : ''); - - attrs.push({ - name, - value, - escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // " - }); - }); - - if (handler.start) { - handler.start(tagName, attrs, unary); - } - } - } - - while (html) { - chars = true; - - if (html.indexOf(' '); -// str = str.replace(/ | | /g, ' '); -// str = str.replace(/"|"|"/g, "\""); -// str = str.replace(/'|'|'/g, "'"); -// str = str.replace(/´|´|´/g, "´"); -// str = str.replace(/×|×|×/g, "×"); -// str = str.replace(/÷|÷|÷/g, "÷"); -// str = str.replace(/&|&|&/g, '&'); -// str = str.replace(/<|<|</g, '<'); -// str = str.replace(/>|>|>/g, '>'); - - - - -str = str.replace(/ | | /g, " "); -str = str.replace(/ | | /g, ''); -str = str.replace(/ | /g, ' '); -str = str.replace(/ | | /g, ''); -str = str.replace(/"|"|"/g, "\""); -str = str.replace(/"|'|'/g, "'"); -str = str.replace(/´|´|´/g, "´"); -str = str.replace(/×|×|×/g, "×"); -str = str.replace(/÷|÷|÷/g, "÷"); -str = str.replace(/&|&|&/g, '&'); -str = str.replace(/<|<|</g, '<'); -str = str.replace(/>|>|>/g, '>'); -return str; -} - -// HTML 支持的其他实体 -function strOtherDiscode(str) { -str = str.replace(/Œ|Œ|Œ/g, 'Œ'); -str = str.replace(/œ|œ|œ/g, 'œ'); -str = str.replace(/Š|Š|Š/g, 'Š'); -str = str.replace(/š|š|š/g, 'š'); -str = str.replace(/Ÿ|Ÿ|Ÿ/g, 'Ÿ'); -str = str.replace(/ƒ|ƒ|ƒ/g, 'ƒ'); -str = str.replace(/ˆ|ˆ|ˆ/g, 'ˆ'); -str = str.replace(/˜|˜|˜/g, '˜'); -str = str.replace(/ |$#8201;| /g, ''); -str = str.replace(/‌|‌|‌/g, ''); -str = str.replace(/‍|$#8205;|‍/g, ''); -str = str.replace(/‎|$#8206;|‎/g, ''); -str = str.replace(/‏|‏|‏/g, ''); -str = str.replace(/–|–|–/g, '–'); -str = str.replace(/—|—|—/g, '—'); -str = str.replace(/‘|‘|‘/g, '‘'); -str = str.replace(/’|’|’/g, '’'); -str = str.replace(/‚|‚|‚/g, '‚'); -str = str.replace(/“|“|“/g, '“'); -str = str.replace(/”|”|”/g, '”'); -str = str.replace(/„|„|„/g, '„'); -str = str.replace(/†|†|†/g, '†'); -str = str.replace(/‡|‡|‡/g, '‡'); -str = str.replace(/•|•|•/g, '•'); -str = str.replace(/…|…|…/g, '…'); -str = str.replace(/‰|‰|‰/g, '‰'); -str = str.replace(/′|′|′/g, '′'); -str = str.replace(/″|″|″/g, '″'); -str = str.replace(/‹|‹|‹/g, '‹'); -str = str.replace(/›|›|›/g, '›'); -str = str.replace(/‾|‾|‾/g, '‾'); -str = str.replace(/€|€|€/g, '€'); -str = str.replace(/™|™|™/g, '™'); -str = str.replace(/←|←|←/g, '←'); -str = str.replace(/↑|↑|↑/g, '↑'); -str = str.replace(/→|→|→/g, '→'); -str = str.replace(/↓|↓|↓/g, '↓'); -str = str.replace(/↔|↔|↔/g, '↔'); -str = str.replace(/↵|↵|↵/g, '↵'); -str = str.replace(/⌈|⌈|⌈/g, '⌈'); -str = str.replace(/⌉|⌉|⌉/g, '⌉'); -str = str.replace(/⌊|⌊|⌊/g, '⌊'); -str = str.replace(/⌋|⌋|⌋/g, '⌋'); -str = str.replace(/◊|◊|◊/g, '◊'); -str = str.replace(/♠|♠|♠/g, '♠'); -str = str.replace(/♣|♣|♣/g, '♣'); -str = str.replace(/♥|♥|♥/g, '♥'); -str = str.replace(/♦|♦|♦/g, '♦'); -return str; -} - -function strDiscode(str) { - str = strNumDiscode(str); - str = strGreeceDiscode(str); - str = strcharacterDiscode(str); - str = strOtherDiscode(str); - return str; -} - -function urlToHttpUrl(url, domain) { - if (/^\/\//.test(url)) { - return `https:${url}`; - } else if (/^\//.test(url)) { - return `https://${domain}${url}`; - } - return url; -} - -export default { - strDiscode, - urlToHttpUrl, -}; diff --git a/components/u-parse/parse.css b/components/u-parse/parse.css deleted file mode 100644 index 49c789c2c4bac3f26ccc7d20ed9dfc0be8ac86c9..0000000000000000000000000000000000000000 --- a/components/u-parse/parse.css +++ /dev/null @@ -1,258 +0,0 @@ -/** - * author: Di (微信小程序开发工程师) - * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) - * 垂直微信小程序开发交流社区 - * - * github地址: https://github.com/icindy/wxParse - * - * for: 微信小程序富文本解析 - * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 - */ -/** - * 请在全局下引入该文件,@import '/static/wxParse.css'; - */ -.wxParse { - user-select:none; - width: 100%; - font-family: Helvetica, "PingFangSC", 'Microsoft Yahei', '微软雅黑', Arial, sans-serif; - color: #333; - line-height: 1.5; - font-size: 14px; - text-align:justify;/* //左右两端对齐 */ -} -.wxParse view ,.wxParse uni-view{ - word-break: break-word; -} -.wxParse .p { - padding-bottom: 0.5em; - clear: both; - /* letter-spacing: 0;//字间距 */ -} -.wxParse .inline { - display: inline; - margin: 0; - padding: 0; -} - -.wxParse .div { - margin: 0; - padding: 0; - display: block; -} - -.wxParse .h1{ - font-size: 2em; - line-height: 1.2em; - margin: 0.67em 0; -} -.wxParse .h2{ - font-size: 1.5em; - margin: 0.83em 0; -} -.wxParse .h3{ - font-size: 1.17em; - margin: 1em 0; -} -.wxParse .h4{ - margin: 1.33em 0; -} -.wxParse .h5{ - font-size: 0.83em; - margin: 1.67em 0; -} -.wxParse .h6{ - font-size: 0.83em; - margin: 1.67em 0; -} - -.wxParse .h1, -.wxParse .h2, -.wxParse .h3, -.wxParse .h4, -.wxParse .h5, -.wxParse .h6, -.wxParse .b, -.wxParse .strong{ - font-weight: bolder; -} - -.wxParse .i, -.wxParse .cite, -.wxParse .em, -.wxParse .var, -.wxParse .address { - font-style: italic; -} -.wxParse .spaceshow{ - white-space: pre; -} -.wxParse .pre, -.wxParse .tt, -.wxParse .code, -.wxParse .kbd, -.wxParse .samp { - font-family: monospace; -} -.wxParse .pre { - overflow: auto; - background: #f5f5f5; - padding: 16upx; - white-space: pre; - margin: 1em 0upx; - font-size: 24upx; -} -.wxParse .code { - overflow: auto; - padding: 16upx; - white-space: pre; - margin: 1em 0upx; - background: #f5f5f5; - font-size: 24upx; -} - -.wxParse .big { - font-size: 1.17em; -} - -.wxParse .small, -.wxParse .sub, -.wxParse .sup { - font-size: 0.83em; -} - -.wxParse .sub { - vertical-align: sub; -} -.wxParse .sup { - vertical-align: super; -} - -.wxParse .s, -.wxParse .strike, -.wxParse .del { - text-decoration: line-through; -} - -.wxParse .strong, -.wxParse .text, -.wxParse .span, -.wxParse .s { - display: inline; -} - -.wxParse .a { - color: deepskyblue; -} - -.wxParse .video { - text-align: center; - margin: 22upx 0; -} - -.wxParse .video-video { - width: 100%; -} -.wxParse .uni-image{ - max-width: 100%; -} -.wxParse .img { - display: block; - max-width: 100%; - margin-bottom: 0em;/* //与p标签底部padding同时修改 */ - overflow: hidden; -} - -.wxParse .blockquote { - margin: 10upx 0; - padding: 22upx 0 22upx 22upx; - font-family: Courier, Calibri, "宋体"; - background: #f5f5f5; - border-left: 6upx solid #dbdbdb; -} -.wxParse .blockquote .p { - margin: 0; -} -.wxParse .ul, .wxParse .ol { - display: block; - margin: 1em 0; - padding-left: 2em; -} -.wxParse .ol { - list-style-type: disc; -} -.wxParse .ol { - list-style-type: decimal; -} -.wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template { - display: list-item; - align-items: baseline; - text-align: match-parent; -} - -.wxParse .ol>.li,.wxParse .ul>.li { - display: list-item; - align-items: baseline; - text-align: match-parent; -} -.wxParse .ul .ul, .wxParse .ol .ul { - list-style-type: circle; -} -.wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul { - list-style-type: square; -} - -.wxParse .u { - text-decoration: underline; -} -.wxParse .hide { - display: none; -} -.wxParse .del { - display: inline; -} -.wxParse .figure { - overflow: hidden; -} -.wxParse .tablebox{ - overflow: auto; - background-color: #f5f5f5; - background: #f5f5f5; - font-size: 13px; - padding: 8px; -} -.wxParse .table .table,.wxParse .table{ - border-collapse:collapse; - box-sizing: border-box; - /* 内边框 */ - /* width: 100%; */ - overflow: auto; - white-space: pre; -} -.wxParse .tbody{ - border-collapse:collapse; - box-sizing: border-box; - /* 内边框 */ - border: 1px solid #dadada; -} -.wxParse .table .thead, .wxParse .table .tfoot, .wxParse .table .th{ - border-collapse:collapse; - box-sizing: border-box; - background: #ececec; - font-weight: 40; -} -.wxParse .table .tr { - border-collapse:collapse; - box-sizing: border-box; - /* border: 2px solid #F0AD4E; */ - overflow:auto; -} -.wxParse .table .th, -.wxParse .table .td{ - border-collapse:collapse; - box-sizing: border-box; - border: 2upx solid #dadada; - overflow:auto; -} -.wxParse .audio, .wxParse .uni-audio-default{ - display: block; -} \ No newline at end of file diff --git a/components/u-parse/parse.vue b/components/u-parse/parse.vue deleted file mode 100644 index f25516685a9cec30e7faed18ec17bf5680ed082e..0000000000000000000000000000000000000000 --- a/components/u-parse/parse.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - - diff --git a/main.js b/main.js index 7c03a732fb3fe720ab7982fcae998008ea577fa4..013f8b206e56c2efac255eb969d8f177c31dc3c0 100644 --- a/main.js +++ b/main.js @@ -6,9 +6,15 @@ import request from './js_sdk/request.js'; Vue.config.productionTip = false Vue.prototype.request = request -openApp(); +//openApp(); App.mpType = 'app' +import nullComponents from '@/components/null/null.vue' +Vue.component('cell',nullComponents); +Vue.component('refresh',nullComponents); +Vue.component('refreshBox',nullComponents); + + const app = new Vue({ ...App, store diff --git a/manifest.json b/manifest.json index cab672e01a3c8136f65acc03b202aefc28eb4b8e..f0b4b4801034684f9fce14f45caa8cbc82648413 100644 --- a/manifest.json +++ b/manifest.json @@ -107,11 +107,13 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "", + "appid" : "wx07597007230e3702", "setting" : { - "urlCheck" : false + "urlCheck" : false, + "es6" : false }, "usingComponents" : true + // "betterScopedSlots" : true }, "mp-alipay" : { "usingComponents" : true diff --git a/pages.json b/pages.json index 6a046475e4c86a1dea38a87d1bc08c8984d65c68..82b2fcd3f6dcc900f9b293067c0329724c66a678 100644 --- a/pages.json +++ b/pages.json @@ -1,11 +1,33 @@ { - "pages": [{ + "pages": [ + { "path": "pages/list/list", - "style": { - //#ifndef MP - "navigationStyle": "custom", - //#endif - "enablePullDownRefresh": true + "style": { + // #ifdef APP-NVUE + "enablePullDownRefresh": false, + // #endif + // #ifdef H5 + "navigationStyle":"custom", + // #endif + "app-plus":{ + // #ifdef APP-PLUS + "titleNView":{ /*排除了H5*/ + "searchInput":{ + "placeholder":"请输入搜索的内容", + "backgroundColor":"#efefef", + "disabled":true, + "borderRadius":"30px" + } + } + // #endif + } + } + }, + { + "path": "pages/test/test", + "style": { + "navigationBarTitleText": "测试页面", + "enablePullDownRefresh": false } }, { @@ -165,14 +187,7 @@ "navigationBarTitleText": "" } - }, { - "path": "pages/test/test", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - - }, { + },{ "path": "pages/common/webview/webview", "style": { "navigationBarTitleText": "", @@ -199,7 +214,8 @@ "navigationBarTextStyle": "black", "navigationBarTitleText": "base-app", "navigationBarBackgroundColor": "#FFFFFF", - "backgroundColor": "#F8F8F8" + "backgroundColor": "#F8F8F8", + "enablePullDownRefresh": false }, "condition": { "list": [{ diff --git a/pages/grid/grid.vue b/pages/grid/grid.vue index 8e59303b8306076134a728938c5fedb7bd266432..1a671a12a4718cfd6b34f4e27077b17f02d01550 100644 --- a/pages/grid/grid.vue +++ b/pages/grid/grid.vue @@ -201,17 +201,6 @@ diff --git a/pages/list/detail.vue b/pages/list/detail.vue index f0b12e48451efa4f29b44c981d3db6bea1f64039..b622c241347b07518307c36639a6ed2e7eaa8a0c 100644 --- a/pages/list/detail.vue +++ b/pages/list/detail.vue @@ -6,25 +6,25 @@ unicloud-db 组件文档:https://uniapp.dcloud.net.cn/uniCloud/unicloud-db-component DB Schema 规范:https://uniapp.dcloud.net.cn/uniCloud/schema --> - - - - + + + + {{ title }} + foreignKey="opendb-news-articles.user_id" @load="loadData"> @@ -50,24 +49,22 @@ - diff --git a/pages/list/search/search.nvue b/pages/list/search/search.nvue index 1f59a0cdb097171af8fb33dfd5e805a3fab0d150..f150313062c5ce5cca4feddc304f49f1b021fc1f 100644 --- a/pages/list/search/search.nvue +++ b/pages/list/search/search.nvue @@ -296,8 +296,8 @@ }, loadList(text = '') { getApp().globalData.searchText = text; - uni.navigateTo({ - url:'/pages/list/news-list' + uni.switchTab({ + url:'/pages/list/list' }) }, backPage(){ diff --git a/pages/test/test.vue b/pages/test/test copy.vue similarity index 100% rename from pages/test/test.vue rename to pages/test/test copy.vue diff --git a/pages/test/test.nvue b/pages/test/test.nvue new file mode 100644 index 0000000000000000000000000000000000000000..8e80ba0ebb3f0c237bee5c15cb4f61b2277dbfdb --- /dev/null +++ b/pages/test/test.nvue @@ -0,0 +1,32 @@ + + + + + diff --git a/pages/ucenter/settings/settings.vue b/pages/ucenter/settings/settings.vue index 553b37e11f19049871b471f3eb0128a1a3e85127..01591bf36828946e4cbe13cc4396b467faec7a2f 100644 --- a/pages/ucenter/settings/settings.vue +++ b/pages/ucenter/settings/settings.vue @@ -1,14 +1,21 @@