From b53f69b71e6e85e1e5c3c7e6b5e3ffc11f1bbe7e Mon Sep 17 00:00:00 2001 From: RainSun Date: Fri, 14 Feb 2020 23:10:24 +0800 Subject: [PATCH] init --- .gitignore | 14 + .vscode/settings.json | 13 + app.js | 16 + app.json | 38 +++ app.wxss | 10 + images/tabbar/home.png | Bin 0 -> 4146 bytes images/tabbar/homeSelect.png | Bin 0 -> 3284 bytes images/tabbar/mine.png | Bin 0 -> 6611 bytes images/tabbar/mineSelect.png | Bin 0 -> 4926 bytes import/config/config.js | 1 + import/config/theme/sc-theme.js | 1 + .../sc-ripple-behaviors.js | 1 + import/scButton/sc-button.js | 1 + import/scButton/sc-button.json | 1 + import/scButton/sc-button.wxml | 1 + import/scButton/sc-button.wxss | 1 + index Session.sql | 18 ++ pages/create/create.js | 277 ++++++++++++++++++ pages/create/create.json | 5 + pages/create/create.wxml | 37 +++ pages/create/create.wxss | 107 +++++++ pages/index/index.js | 100 +++++++ pages/index/index.json | 5 + pages/index/index.wxml | 12 + pages/index/index.wxss | 56 ++++ pages/login/login.js | 141 +++++++++ pages/login/login.json | 3 + pages/login/login.wxml | 9 + pages/login/login.wxss | 45 +++ pages/mine/mine.js | 159 ++++++++++ pages/mine/mine.json | 3 + pages/mine/mine.wxml | 25 ++ pages/mine/mine.wxss | 104 +++++++ pages/show/show.js | 116 ++++++++ pages/show/show.json | 3 + pages/show/show.wxml | 12 + pages/show/show.wxss | 69 +++++ project.config.json | 42 +++ sitemap.json | 7 + 39 files changed, 1453 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 app.js create mode 100644 app.json create mode 100644 app.wxss create mode 100644 images/tabbar/home.png create mode 100644 images/tabbar/homeSelect.png create mode 100644 images/tabbar/mine.png create mode 100644 images/tabbar/mineSelect.png create mode 100644 import/config/config.js create mode 100644 import/config/theme/sc-theme.js create mode 100644 import/sc-ripple-behaviors/sc-ripple-behaviors.js create mode 100644 import/scButton/sc-button.js create mode 100644 import/scButton/sc-button.json create mode 100644 import/scButton/sc-button.wxml create mode 100644 import/scButton/sc-button.wxss create mode 100644 index Session.sql create mode 100644 pages/create/create.js create mode 100644 pages/create/create.json create mode 100644 pages/create/create.wxml create mode 100644 pages/create/create.wxss create mode 100644 pages/index/index.js create mode 100644 pages/index/index.json create mode 100644 pages/index/index.wxml create mode 100644 pages/index/index.wxss create mode 100644 pages/login/login.js create mode 100644 pages/login/login.json create mode 100644 pages/login/login.wxml create mode 100644 pages/login/login.wxss create mode 100644 pages/mine/mine.js create mode 100644 pages/mine/mine.json create mode 100644 pages/mine/mine.wxml create mode 100644 pages/mine/mine.wxss create mode 100644 pages/show/show.js create mode 100644 pages/show/show.json create mode 100644 pages/show/show.wxml create mode 100644 pages/show/show.wxss create mode 100644 project.config.json create mode 100644 sitemap.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14ea590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..284e361 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "sqltools.connections": [ + { + "database": "yingbo", + "dialect": "MySQL", + "name": "index", + "password": "custzgh123+", + "port": 10177, + "server": "cdb-a95zltgq.bj.tencentcdb.com", + "username": "root" + } + ] +} \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..210961b --- /dev/null +++ b/app.js @@ -0,0 +1,16 @@ +//app.js +App({ + onLaunch: function () { + wx.getSystemInfo({ + success: res => { + //导航高度 + this.globalData.navHeight = res.statusBarHeight + 46; + }, fail(err) { + console.log(err); + } + }) + }, + globalData: { + navHeight: 0 + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..58e283d --- /dev/null +++ b/app.json @@ -0,0 +1,38 @@ +{ + "pages": [ + "pages/login/login", + "pages/mine/mine", + "pages/show/show", + "pages/create/create", + "pages/index/index" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "WeChat", + "navigationBarTextStyle": "white", + "navigationStyle": "custom" + }, + "tabBar": { + "borderStyle": "white", + "selectedColor": "#fff", + "color": "#fff", + "backgroundColor": "#0b1315", + "position": "bottom", + "list": [ + { + "pagePath": "pages/index/index", + "text": "主页", + "iconPath": "./images/tabbar/home.png", + "selectedIconPath": "./images/tabbar/homeSelect.png" + }, + { + "pagePath": "pages/mine/mine", + "text": "个人中心", + "iconPath": "./images/tabbar/mine.png", + "selectedIconPath": "./images/tabbar/mineSelect.png" + } + ] + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/app.wxss @@ -0,0 +1,10 @@ +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} diff --git a/images/tabbar/home.png b/images/tabbar/home.png new file mode 100644 index 0000000000000000000000000000000000000000..996bc62a683301d3026cb947dfe73133abcbe2e6 GIT binary patch literal 4146 zcmeHL`8!no`#)zEH1;fskx?UAdW6VUhAcB#%ATx+k+q3R+c1+vDF&e#Swdtik490% zj3;GjhR|X{CJmk>B3WwiIbGj>;QQm}htCh^eP7r6KIh!axnB4C^*Yy&xH?LsR8ar` zNE7gO?vU;Jb4iFnYwgjxA^?zGCD_?`o)7$17*P{rFQ4LLzQf4e(Ua400kF3}f`eJX zPjJ#edz{-&jh!lc+BHhVPV7BFOT(0GS3z%glT$*v$&(M^5aOi|oMD^NoUgnD^QwmW z&<4vR9<7H9BbKMFX(Q9q(_TMYKZehJY?Y35$DyRWIOVq#X|U%?au}wJPW=@a%x*#x ziAamYq0V^V^zi#e-&D&Z5%?X~-|cPD!Qh&|R0Q7Ig~6#39#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wV5~XI#Ek;-mNIPTu%dtskJ&+@65eV0lMAY z6E9X#fG=UkOse!DBAS=IFz5tXgFz-C3?ihg+qa7YA(nNK?(L%M1cKT3%SDUs5HWrA zDAL^*VjTKf6P5Xp4Xp6W>2b$VLUnYkTRm}Sj`Z`Dac_$D!pWk6nBwCFwQk6(ds7&gF+=N47;Oc!LSjA?L*f8mUEn<^S6b_ z4zyE&FBnF%P!BiYbK`ip`)Dw6J!9of0YGmSs*~Xn2KTl5fhL z-G1KwFs!BVt<_h$9npN&_+|{B9>ERr)+D~lQ_2Urd!0kpStvul#+oMx{5hiPk9@B* zJ}c~n7LN75Q2&Ju#DA0yPSzZ3>*tylreI;A%FHNk>Mq=ZKhPqZHECr$9HPwHMDu-6 zXP6J~@JXxA^R=G^>r?2XdnEaYE`87UcV6k@1~gZ%!ri3Mcbk&BqZZ{ z4x%LF-cl6*t)O_*Vws4X4V;IOwjl1U11R*1FMhc zQCPV!4{yO`K%2pT5%BVx6h6QGjU!5*0ZGt)ql)vDOi05rM^vNxp&q5@8NRUeg7lN; z#Jk{hs9C;`Zt8rjf+kaiZj+ebUdU4#<~;A}1&Lv=rzS(C(Ckv)9daXqi4uu_k<>K` UJz~8C{R;pH_O5nyw!v5a14Y?}!vFvP literal 0 HcmV?d00001 diff --git a/images/tabbar/homeSelect.png b/images/tabbar/homeSelect.png new file mode 100644 index 0000000000000000000000000000000000000000..e1e4e9e05978352b8469eaa07717c1fcf9368a6a GIT binary patch literal 3284 zcmdT``!`f=8{T`&Fot1d6g3#rVM5MC4jGJ$H#v+U$C8Nh(oiUe>`)QoSV=-T8zEUCdAn0Hc8^$$;1yPV3+bixai;f`SP~!0pkzVY*%PiK z;dYPuyCSW^&keS&_vaXepL!X(nd6*%wtONxa`08SKWNN=Fv|{<60Foc#4jl#@spU6 z`c(un_Ol5JjShz}tBM@SE*o9GW*z`)(0z;MivjT43s!UDUJ4}L3*7>Cx4`&^K<804O`+a!>TJ<1 zv*L@J>2CwX8O+9s138l8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2^%KV<%ghWNk5sPliR zV?v}J_G`b&Ydn(82G%EX$(PDI%LDB{xcRX!LaM5J{|@xO(T1}+^LDN`VmsJLQ#=kN zLzvNS9&E$Y1bfvlcdGpqvomXlmi9=$l7xoT%M{Rz(1e)N4{q^&=u&Hn3+HOdWm22o zjei`#ntGPmv^s&c!1?;+RWT6HE_P(#I!^P+X$6iuPEQXV-QI>F-#_BE-Cyb#%(OKr zLTSe18FL}?y&O#X)ggg*2eM<;5&o z%!TzfJLR?;5glTHi{*0Bvb$Kcd8uW^`M?_a8-HusI_hL_OL{D=2{hilck8HPY z{Ox>eMskduwYvu?FX57mww%xd<*Q7UW+M)(IZd5@-%*(}aFFS|;xBOH3M?^?+zg_P z@`@kv$9;J(fR3?TE;vRSAKZ~ciDj1C;3I3UWZr^(;Fh&G@vS}}5wRDLu3&DQ{6o2$ zVrF?_{(Qhy87l(P-x4xdqhmckvT6TOnb5uS-2gC_DbWZ&?PUzz%!om%oS<1!{~Ekd z=D|O4bZRSZM8tsS(-0GLW4D2FaQ=KO`?yef@`BH)I&ZcOF(Ugm1=Z!Lb)8wdocj7XN)bsm?f:m,C=t.detail.x-(p+c)-A/2,D=t.detail.y-(o+h)-A/2;i.data.rippleList.push({rippleId:"ripple-"+i.data.rippleId++,width:A,height:A,left:C,top:D,backgroundColor:i._rgbIsLight_(g,y,v,I)?"rgb(0,0,0)":"rgb(255,255,255)",startAnimate:!0,holdAnimate:e||!1}),i.setData({rippleList:i.data.rippleList})})},_queryMultipleNodes_:function(t){var e=this;return new Promise(function(i,r){e.createSelectorQuery().select(t).fields({size:!0,rect:!0,computedStyle:["backgroundColor"]}).selectViewport().scrollOffset().exec(function(t){i(t)})})},_rippleAnimationEnd_:function(){function t(){this.data.rippleList.splice(0,this.data.rippleDeleteCount),this.setData({rippleList:this.data.rippleList}),clearTimeout(this.data.timer),this.data.timer=null,this.data.rippleDeleteCount=0}this.data.rippleDeleteCount++,this.data.timer&&clearTimeout(this.data.timer),this.data.timer=setTimeout(t.bind(this),300)},_longPress_:function(t){this._addRipple_(t,!0)},_touchEnd_:function(){var t=this.data.rippleList.slice(-1)[0];t&&t.holdAnimate&&(this.data.rippleList.pop(),this.setData({rippleList:this.data.rippleList}))},_rgbIsLight_:function(t,e,i,r){return.299*parseInt(t)+.578*parseInt(e)+.114*parseInt(i)>=192*r}}}); \ No newline at end of file diff --git a/import/scButton/sc-button.js b/import/scButton/sc-button.js new file mode 100644 index 0000000..46e12b3 --- /dev/null +++ b/import/scButton/sc-button.js @@ -0,0 +1 @@ +"use strict";var scRippleBehaviors=require("../sc-ripple-behaviors/sc-ripple-behaviors");Component({behaviors:[scRippleBehaviors],properties:{openType:{type:String},size:{type:String,value:"default"},plain:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},hoverClass:{type:String,value:""},hoverStopPropagation:{type:Boolean,value:!1},hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},formType:{type:String},appParameter:{type:String},sessionFrom:{type:String},sendMessageTitle:{type:String},sendMessagePath:{type:String},sendMessageImg:{type:String},sendMessageCard:{type:Boolean,value:!1},flat:{type:Boolean,value:!1},raised:{type:Boolean,value:!1},fab:{type:Boolean,value:!1}},data:{openTypeToBindEvent:{getUserInfo:"getuserinfo",getphonenumber:"getphonenumber",launchApp:"error",contact:"contact"},tap:!1},relations:{"../scForm/sc-form":{type:"parent"}},externalClasses:["sc-class","sc-ripple-class"],methods:{_returnEventData:function(e){this.properties.disabled||this.triggerEvent(""+this.data.openTypeToBindEvent[this.properties.openType],e.detail,{})},_tap:function(e){this._addRipple_(e),this.setData({tap:!0})},_longPress:function(e){this._longPress_(e),this.setData({tap:!0})},_rippleAnimationEnd:function(){this._rippleAnimationEnd_()},_touchEnd:function(){var e=this;this._touchEnd_(),setTimeout(function(){e.setData({tap:!1})},150)}}}); \ No newline at end of file diff --git a/import/scButton/sc-button.json b/import/scButton/sc-button.json new file mode 100644 index 0000000..a8456c1 --- /dev/null +++ b/import/scButton/sc-button.json @@ -0,0 +1 @@ +{"component":true} \ No newline at end of file diff --git a/import/scButton/sc-button.wxml b/import/scButton/sc-button.wxml new file mode 100644 index 0000000..6a90f9c --- /dev/null +++ b/import/scButton/sc-button.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/import/scButton/sc-button.wxss b/import/scButton/sc-button.wxss new file mode 100644 index 0000000..a6bae1d --- /dev/null +++ b/import/scButton/sc-button.wxss @@ -0,0 +1 @@ +.box-shadow-1{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.box-shadow-2{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.box-shadow-3{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 3px 3px 0 rgba(0,0,0,.14),0 1px 7px 0 rgba(0,0,0,.12)}.box-shadow-4{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.box-shadow-5{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.box-shadow-6{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.box-shadow-7{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.box-shadow-8{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.box-shadow-9{box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.box-shadow-10{box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.box-shadow-11{box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.box-shadow-12{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.box-shadow-13{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.box-shadow-14{box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.mdui-shadow-15{box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.box-shadow-16{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.box-shadow-17{box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.box-shadow-18{box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.box-shadow-19{box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.box-shadow-20{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.box-shadow-21{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.box-shadow-22{box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.box-shadow-23{box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.box-shadow-24{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.sc-button{position:relative;box-sizing:border-box;overflow:hidden;color:inherit;text-decoration:none;text-transform:uppercase;white-space:nowrap;touch-action:manipulation;zoom:1;-webkit-user-select:none;user-select:none;outline:0;-webkit-transition:all .2s cubic-bezier(.4,0,.2,1);transition:all .2s cubic-bezier(.4,0,.2,1);will-change:box-shadow}.sc-button::after{border:none}.sc-ripple{border-radius:100%;background-color:#fff;left:20px;top:20px;opacity:.3;-webkit-transform:scale(.3);transform:scale(.3);width:10px;height:10px;position:absolute}.sc-ripple-animation-slow{-webkit-animation:sc-ripple .6s ease-out;animation:sc-ripple .6s ease-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.sc-ripple-animation-slow-hold{-webkit-animation:sc-ripple-hold 1s ease-out;animation:sc-ripple-hold 1s ease-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes sc-ripple{from{-webkit-transform:scale(.1);transform:scale(.1);opacity:.3}to{-webkit-transform:scale(2.5);transform:scale(2.5);opacity:0}}@keyframes sc-ripple{from{-webkit-transform:scale(.1);transform:scale(.1);opacity:.3}to{-webkit-transform:scale(2.5);transform:scale(2.5);opacity:0}}@-webkit-keyframes sc-ripple-hold{from{-webkit-transform:scale(.1);transform:scale(.1);opacity:.3}to{-webkit-transform:scale(2.5);transform:scale(2.5);opacity:.3}}.sc-button-flat{background-color:transparent}.sc-btn-fab{width:112rpx;min-width:112rpx;height:112rpx;padding:0;overflow:hidden;line-height:normal;border-radius:50%!important;border-style:none;background-color:#fff}.sc-btn-fab i{position:absolute;top:50%;left:50%;width:56rpx;line-height:56rpx;font-size:56rpx;-webkit-transform:translate(-28rpx,-28rpx);transform:translate(-28rpx,-28rpx)}.sc-btn-fab i,i::before{font-style:normal;font-weight:400;line-height:1;color:inherit;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;vertical-align:middle;direction:ltr}.sc-btn-fab.sc-btn-small{width:80rpx;min-width:80rpx;height:80rpx}.sc-btn-fab.sc-btn-small i{width:40rpx;line-height:40rpx;font-size:36rpx;-webkit-transform:translate(-20rpx,-20rpx);transform:translate(-20rpx,-20rpx)}.sc-btn-fab.sc-btn-large{width:144rpx;min-width:144rpx;height:144rpx}.sc-btn-fab.sc-btn-large i{width:72rpx;line-height:72rpx;font-size:60rpx;-webkit-transform:translate(-36rpx,-36rpx);transform:translate(-36rpx,-36rpx)} \ No newline at end of file diff --git a/index Session.sql b/index Session.sql new file mode 100644 index 0000000..3d679f8 --- /dev/null +++ b/index Session.sql @@ -0,0 +1,18 @@ +create table qrcode +( + id int AUTO_INCREMENT primary key, + username varchar(50) not null, + openid varchar(100) not null, + alpay varchar(100), + wxpay varchar(100), + qqpay varchar(300), + node varchar(100) +); + +alter table qrcode auto_increment=1000 + +desc qrcode + +drop table qrcode + +select * from qrcode \ No newline at end of file diff --git a/pages/create/create.js b/pages/create/create.js new file mode 100644 index 0000000..3f5c274 --- /dev/null +++ b/pages/create/create.js @@ -0,0 +1,277 @@ +// pages/create/create.js +const App = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + aState:false, + wState:false, + qState:false, + naState:false, + noState:false, + alcode:"", + wxcode:"", + qqcode:"", + name:"", + node:"", + openid:"" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + navH: App.globalData.navHeight + }) + this.data.openid=wx.getStorageSync("openId"); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + getAlCode: function() { + let that = this; + wx.scanCode({ + success:function(res){ + that.data.alcode=res.result; + that.setData({ + aState:true + }) + wx.showToast({ + title: "扫描成功", + duration: 1000, + mask: true, + icon: "success" + }) + }, + fail:function(err){ + console.error(err); + wx.showModal({ + title: "警告", + content: "扫描失败", + showCancel: false, + confirmText: "继续" + }) + } + }); + }, + getWxCode: function() { + let that = this; + wx.scanCode({ + success: function (res) { + that.data.wxcode = res.result; + that.setData({ + wState: true + }) + wx.showToast({ + title: "扫描成功", + duration: 100, + mask: true, + icon: "success" + }) + }, + fail: function (err) { + console.error(err); + wx.showModal({ + title: "警告", + content: "扫描失败", + showCancel: false, + confirmText: "继续" + }) + } + }); + + }, + getQqCode: function() { + let that = this; + wx.scanCode({ + success: function (res) { + that.data.qqcode = res.result; + that.setData({ + qState: true + }) + wx.showToast({ + title: "扫描成功", + duration: 100, + mask: true, + icon: "success" + }) + }, + fail: function (err) { + console.error(err); + wx.showModal({ + title: "警告", + content: "扫描失败", + showCancel: false, + confirmText: "继续" + }) + } + }); + }, + + + inputName: function (e) { + this.setData({ + name:e.detail.value + }) + if(e.detail.value){ + this.setData({ + naState: true + }) + }else{ + this.setData({ + naState: false + }) + } + console.log('填写姓名为', this.data.name); + }, + + inputNode: function (e) { + this.data.node = e.detail.value; + if (e.detail.value) { + this.setData({ + noState: true + }) + } else { + this.setData({ + noState: false + }) + } + console.log('填写备注为', this.data.node); + }, + + confirm:function(){ + var that =this; + wx.showModal({ + title: '提示', + content: '提交后不可更改,要不要再看看?', + cancelText:'再看看', + confirmText:'确认提交', + success(res) { + if (res.confirm) { + that.create(); + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + }, + create: function() { + let ast=this.data.aState; + let ws=this.data.wState; + let qs=this.data.qState; + let as=this.data.naState; + var that=this; + if(((ast&&ws)||(ast&&qs)||(ws&&qs))&&as){//至少有两个二维码且填写了姓名 + wx.request({ + url: 'https://powerrain.cn/qrcode/api/add.php', + data: { + alpay:that.data.alcode, + wxpay:that.data.wxcode, + qqpay:encodeURIComponent(that.data.qqcode), + name:that.data.name, + node:that.data.node, + open:that.data.openid + }, + success: function (res) { //如果成功就会返回id + if (res.data["LAST_INSERT_ID()"]) { + let createInfo = { //将id和名字存起来下一个界面生成二维码用。 + 'id': res.data["LAST_INSERT_ID()"], + 'name':that.data.name, + 'aState':that.data.aState, + 'wState':that.data.wState, + 'qState':that.data.qState, + } + console.log(createInfo); + wx.setStorageSync('createInfo', createInfo); + //更新已经制作完成的二维码 + wx.request({ + url: 'https://powerrain.cn/qrcode/api/wxselect.php', + data: { + openId: that.data.openid + }, + success: function (infoRes) { //如果该id未合并过二维码,此处为[](空数组) + console.log(infoRes); + if (infoRes.data.length != 0) { + wx.setStorageSync('qrinfo', infoRes.data); //将已经存在的二维码存放起来,然后下一个界面做成卡片。 + wx.redirectTo({ + url: '../show/show' + }) + } else { + wx.showModal({ + title: "警告", + content: "获取最新列表失败", + showCancel: false, + confirmText: "重试" + }) + } + } + }) + } else { + wx.showModal({ + title: "警告", + content: "生成失败", + showCancel: false, + confirmText: "重试" + }) + } + } + }) + }else{ + wx.showToast({ + title: '请检查输入内容', + icon: 'none', + duration: 2000, + mask:true + }) + } + }, +}) \ No newline at end of file diff --git a/pages/create/create.json b/pages/create/create.json new file mode 100644 index 0000000..a494881 --- /dev/null +++ b/pages/create/create.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "sc-button": "/import/scButton/sc-button" + } +} \ No newline at end of file diff --git a/pages/create/create.wxml b/pages/create/create.wxml new file mode 100644 index 0000000..07f5206 --- /dev/null +++ b/pages/create/create.wxml @@ -0,0 +1,37 @@ + + + +录入二维码 + Tip : 至少要上传两个收款码才能合并呦~ + + + {{wState?"微信收款码录入成功":"上传微信收款码"}} + + + + {{aState?"支付宝收款码录入成功":"上传支付宝收款码"}} + + + + {{qState?"QQ收款码录入成功":"上传QQ收款码"}} + + + + + + 填写收款信息 + {{naState?"向"+name+"付款":"在此输入收款人(必填)"}} + + 在此输入备注(非必填,写给自己的) + + + + + 开始合成 + \ No newline at end of file diff --git a/pages/create/create.wxss b/pages/create/create.wxss new file mode 100644 index 0000000..585c0c3 --- /dev/null +++ b/pages/create/create.wxss @@ -0,0 +1,107 @@ +/* pages/create/create.wxss */ + +page { + /* background-image: url(http://www.powerrain.cn/qrcode/images/home.png); */ + background-image: url(https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/2934349b033b5bb5092b9c0d3bd3d539b700bc41.jpg); + background-size: 100% 100%; +} + +.head { + width:100%; +} + +.main { + height:auto; + width:95%; + margin: 0 auto; + display: flex; + flex-direction: column; +} + +.title { + color: #fff; + font-size: 50rpx; +} + +.main .tip { + color: #fff; + margin-top:30rpx; + font-size: 30rpx; +} + +.main .sccode { + height:300rpx; + display: flex; + flex-direction: column; + margin-top:50rpx; + justify-content: space-between; +} + +.main .sccode>view { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} + +.main .sccode .guide { + font-size: 30rpx; + color: #fff; +} + +.main .sccode button { + margin:0; +} + +.main .sccode .alcode button { + background-color: #108ee9; +} + +.info { + display: flex; + flex-direction: column; + margin-top:50rpx; +} + +.info .guide { + color: #fff; + font-size: 30rpx; + margin-bottom:30rpx; +} + +.info .name_input { + margin-bottom: 30rpx; + color:#fff; + font-size: 30rpx; +} + +.info .node_input { + color: #fff; + font-size: 30rpx; +} + + + + + + + + + + + + + + +.button { + position: fixed; + bottom: 120rpx; + display: flex; + align-items: center; + justify-content: center; + width:100%; +} + +.btn { + width:70%; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..6d99871 --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,100 @@ +// pages/index/index.js +const App = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + yiyan:"", + hitokotoLength:"", + timer:"" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.setData({ + navH: App.globalData.navHeight + }) + this.data.timer = setInterval(this.refresh,100) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + }, + + start: function() { + setTimeout(function(){ + wx.navigateTo({ + url: '../create/create' + }) + }, 200) + }, + + //防止出现一言加载过慢的情况,采用定时器监视缓存中的一言,主要还是防止第一次加载不粗来。 + refresh:function(){ + let yiyancache = wx.getStorageSync('yiyan'); + if(yiyancache){ + this.setData({ + yiyan: yiyancache + }) + if(this.data.yiyan.hitokoto.length > 15) { + this.setData({ + hitokotoLength: "text-indent:2em;" + }) + } + this.stop(); + } + }, + + stop:function(){ //停止定时器 + clearInterval(this.data.timer) + } +}) \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..a494881 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "sc-button": "/import/scButton/sc-button" + } +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..2610fb7 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,12 @@ + + + + 「一言」 + {{yiyan.hitokoto}} + -「{{yiyan.creator}}」 + + + + + 开始合成 + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..d714bbf --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,56 @@ +/* pages/index/index.wxss */ +.title { + width:100%; + /* background-color: red; */ +} + +page { + /* background-image: url(http://www.powerrain.cn/qrcode/images/home.png); */ + background-image: url(https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/2934349b033b5bb5092b9c0d3bd3d539b700bc41.jpg); + background-size: 100% 100%; +} + +.yiyan { + display: flex; + flex-direction: column; + align-items: center; + margin:0 auto; + width:90%; + margin-top:30rpx; +} + +.yiyan .title { + font-size: 50rpx; + color: #fff; + text-align: center; +} + +.yiyan .item { + /* text-indent:2em; */ + margin-top:50rpx; + font-size: 40rpx; + color: #fff; + text-align: left; +} + +.yiyan .creator { + margin-top:50rpx; + font-size: 30rpx; + color:#fff; + text-align: right; + width:100%; +} + + +.button { + position: fixed; + bottom: 150rpx; + display: flex; + align-items: center; + justify-content: center; + width:100%; +} + +.btn { + width:70%; +} \ No newline at end of file diff --git a/pages/login/login.js b/pages/login/login.js new file mode 100644 index 0000000..5f82dff --- /dev/null +++ b/pages/login/login.js @@ -0,0 +1,141 @@ +// pages/login/login.js +const App = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + loginState:0, + openId:0, + title:"", + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.setStorageSync('yiyan', ""); + this.setData({ + navH: App.globalData.navHeight + }) + this.getyiyian(); + this.login(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + getyiyian:function(){ //获取一言 + var that=this; + wx.request({ + url: 'https://v1.hitokoto.cn/', + success: function (res) { + if(res.data.hitokoto.length>30){ //如果长度大于30就重新获取 + that.getyiyian(); + }else{ + console.log(res.data); + wx.setStorageSync('yiyan', res.data); + } + } + }) + }, + login: function(){ + wx.showLoading({ + title: '登录中', + }) + var that = this; + wx.login({ + success: function (res) { + if (res.code) { + wx.request({ + url: 'https://powerrain.cn/qrcode/api/login.php', + data: { + code: res.code + }, + success: function (oiRes) { //openId + that.data.loginState = 1; + that.data.openId = oiRes.data; + wx.setStorageSync('openId', oiRes.data); + wx.hideLoading(); + wx.request({ + url: 'https://powerrain.cn/qrcode/api/wxselect.php', + data: { + openId: oiRes.data + }, + success: function (infoRes) { //如果该id未合并过二维码,此处为[](空数组) + console.log(infoRes); + if (infoRes.data.length != 0) { + wx.setStorageSync('qrinfo', infoRes.data); //将已经存在的二维码存放起来,然后下一个界面做成卡片。 + wx.switchTab({ + url: '../index/index' + }) + } else { + wx.setStorageSync('qrinfo', ""); + wx.switchTab({ + url: '../index/index' + }) + } + } + }) + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: "登录失败", + icon: "none" + }) + } + }) + } else { + console.log('获取失败' + res.errMsg) + } + } + }); + } +}) \ No newline at end of file diff --git a/pages/login/login.json b/pages/login/login.json new file mode 100644 index 0000000..4774d6f --- /dev/null +++ b/pages/login/login.json @@ -0,0 +1,3 @@ +{ + "navigationBarTextStyle": "white" +} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml new file mode 100644 index 0000000..1673599 --- /dev/null +++ b/pages/login/login.wxml @@ -0,0 +1,9 @@ + + + + + + + + 欢迎 + \ No newline at end of file diff --git a/pages/login/login.wxss b/pages/login/login.wxss new file mode 100644 index 0000000..98f6a76 --- /dev/null +++ b/pages/login/login.wxss @@ -0,0 +1,45 @@ +/* pages/login/login.wxss */ + +page { + /* background-image: url(http://www.powerrain.cn/qrcode/images/home.png); */ + background-image: url(https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/2934349b033b5bb5092b9c0d3bd3d539b700bc41.jpg); + background-size: 100% 100%; +} + +.top { + margin:0 auto; + display: flex; + flex-direction: column; + align-items: center; +} +.top .background { + height:200rpx; + width:200rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 50%; + box-shadow: 0 0 30rpx #888888; +} + +.top .background .userAvatar{ + height: 200rpx; + width: 200rpx; + border-radius: 50%; + overflow: hidden; +} + +.top .userNickName { + font-size: 40rpx; + color: #fff; + margin-top:30rpx; + letter-spacing:3px; +} + +.top .welcome { + color:#fff; + font-size: 80rpx; + margin-top:250rpx; + letter-spacing: 3rpx; +} \ No newline at end of file diff --git a/pages/mine/mine.js b/pages/mine/mine.js new file mode 100644 index 0000000..69e7693 --- /dev/null +++ b/pages/mine/mine.js @@ -0,0 +1,159 @@ +// pages/mine/mine.js +const App = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + qrinfo:"" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.qrinfoManage(); + this.setData({ + navH: App.globalData.navHeight, + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.qrinfoManage(); + console.log("show"); + console.log(this.data.qrinfo); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + qrinfoManage: function() { + var qrinfoCache = wx.getStorageSync("qrinfo"); + var array =[]; + for (let i = 0; i < qrinfoCache.length;i++){ + array.push(qrinfoCache[i]); + } + this.setData({ + qrinfo: array, + }) + console.log(this.data.qrinfo); + }, + + show: function(e){ + var id = e.currentTarget.id; + let createInfo = { //将id和名字存起来下一个界面生成二维码用。 + 'id': this.data.qrinfo[id]['id'], + 'username': this.data.qrinfo[id]['username'], + 'aState': this.data.qrinfo[id]['alpay']!="", + 'wState': this.data.qrinfo[id]['wxpay']!="", + 'qState': this.data.qrinfo[id]['qqpay']!="", + } + wx.setStorageSync('createInfo', createInfo); + wx.redirectTo({ + url: '../show/show' + }) + }, + + + confirm: function (e) { + let id = e.currentTarget.id; + var that = this; + wx.showModal({ + title: '提示', + content: '删除后不可恢复,是否删除?', + cancelText: '再看看', + confirmText: '确认删除', + success(res) { + if (res.confirm) { + id=that.data.qrinfo[id]['id'] + that.del(id); + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + }, + + + del: function(id) { + var that=this; + var openId=wx.getStorageSync("openId"); + wx.request({ + url: 'https://powerrain.cn/qrcode/api/del.php', + data: { + id:id + }, + success: function (res) { + console.log(res.data); + if(res.data==1){ + wx.request({ + url: 'https://powerrain.cn/qrcode/api/wxselect.php', + data: { + openId: openId + }, + success: function (infoRes) { //如果该id未合并过二维码,此处为[](空数组) + console.log(infoRes); + if (infoRes.data.length != 0) { + wx.setStorageSync('qrinfo', infoRes.data); + that.qrinfoManage(); + //将已经存在的二维码存放起来,然后下一个界面做成卡片。 + } else { + wx.setStorageSync('qrinfo', ""); + that.qrinfoManage(); + } + } + }) + }else{ + wx.showModal({ + showCancel: false, + title: '警告', + content: '删除失败', + confirmText: "知道了", + }) + } + } + }) + } +}) \ No newline at end of file diff --git a/pages/mine/mine.json b/pages/mine/mine.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/mine/mine.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml new file mode 100644 index 0000000..459f879 --- /dev/null +++ b/pages/mine/mine.wxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + 您还未合成过二维码呦~ + + + {{index+1}} + + + {{item.name}} + {{item.node?item.node:"并没有填写备注欸~"}} + + + + \ No newline at end of file diff --git a/pages/mine/mine.wxss b/pages/mine/mine.wxss new file mode 100644 index 0000000..51170e6 --- /dev/null +++ b/pages/mine/mine.wxss @@ -0,0 +1,104 @@ +/* pages/mine/mine.wxss */ +page { + background: #f8f9fd; +} +.header { + width:100%; + background-color: #181f27; + position: fixed; + top:0; + /* box-shadow: 0 0 50px #000; */ +} +.top { + margin:0 auto; + display: flex; + flex-direction:column; + align-items: center; + width:80%; +} +.top .background { + height:150rpx; + width:150rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 50%; + box-shadow: 0 0 30rpx #888888; +} + +.top .background .userAvatar{ + height: 150rpx; + width: 150rpx; + border-radius: 50%; + overflow: hidden; +} + +.top .userNickName { + font-size: 130%; + font-weight: lighter; + color: #fff; + margin-top:30rpx; + margin-bottom:30rpx; + /* letter-spacing:3px; */ +} + +.main { + width:90%; + margin: 0 auto; + padding-top:330rpx; +} + +.main .warn { + text-align: center; + width:100%; + margin:0 auto; +} + +.main .card { + width:100%; + background:#fff; + margin-bottom: 50rpx; + border-radius: 20rpx; + box-shadow: 0 10rpx 50rpx #edf1f4; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} + +.main .card .left { + width:20%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin:15rpx 0 15rpx 0; +} + +.main .card .left .num { + font-size: 50rpx; + font-weight: 100; +} + +.main .card .right { + margin:15rpx 0 15rpx 0; + width:80%; + display: flex; + flex-direction: column; + padding-left:30rpx; + padding-right:-30rpx; + border-left: 1px #eee solid; +} + +.main .card .right .up { + width:100%; + font-weight: bold; + margin-bottom: 10rpx; +} + +.main .card .right .down { + width:100%; + font-weight: lighter; + font-size: 25rpx; +} \ No newline at end of file diff --git a/pages/show/show.js b/pages/show/show.js new file mode 100644 index 0000000..afe9437 --- /dev/null +++ b/pages/show/show.js @@ -0,0 +1,116 @@ +// pages/show/show.js +const App = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + imagePath: '', + username:'', + wxDisplay:true, + alDisplay:true, + qqDisplay:true + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + navH: App.globalData.navHeight + }) + this.imgUrl(); + wx.showModal({ + showCancel: false, + title: '提示', + content: '请在此界面进行截图,之后会自动返回主界面', + confirmText: "知道了", + }) + wx.onUserCaptureScreen(function (res) { + wx.removeStorageSync('createInfo'); + wx.switchTab({ + url: '../index/index' + }) + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + imgUrl :function(){ + let webUrl = "http://www.powerrain.cn/qrcode/html/index.html?id=" + let createInfo = wx.getStorageSync('createInfo'); + let pageId = createInfo['id']; + this.setData({ + username: createInfo['username'], + qqDisplay:createInfo['qState'], + wxDisplay:createInfo['wState'], + alDisplay: createInfo['aState'] + }) + if(pageId){ + let item = webUrl + pageId; + item = "http://qr.liantu.com/api.php?text=" + item; + this.setData({ + imagePath: item //数字转字符串 + }); + }else { + wx.showModal({ + title: "警告", + content: "生成失败", + showCancel: false, + confirmText: "重试", + success(res) { + wx.navigateTo({ + url: '../create/create' + }) + } + }) + } + } +}) \ No newline at end of file diff --git a/pages/show/show.json b/pages/show/show.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/show/show.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/show/show.wxml b/pages/show/show.wxml new file mode 100644 index 0000000..3b244a0 --- /dev/null +++ b/pages/show/show.wxml @@ -0,0 +1,12 @@ + + + + + {{username}} + 本二维码支持以下APP向我付款 + + + + + + \ No newline at end of file diff --git a/pages/show/show.wxss b/pages/show/show.wxss new file mode 100644 index 0000000..b2b3be3 --- /dev/null +++ b/pages/show/show.wxss @@ -0,0 +1,69 @@ +/* pages/show/show.wxss */ +page { + /* background-image: url(http://www.powerrain.cn/qrcode/images/home.png); */ + background-image: url(https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/2934349b033b5bb5092b9c0d3bd3d539b700bc41.jpg); + background-size: 100% 100%; +} + + +.main { + display: flex; + flex-direction: column; + align-items: center; + width:80%; + margin: 0 auto; +} + +.money { + width:80%; + margin-bottom: 20rpx; +} + + +.qrcode { + width:90%; + margin-top:50rpx; +} + +.user { + margin-top: 50rpx; + font-size: 50rpx; + color: #fff; +} + +.title { + font-size: 40rpx; + color: #fff; + margin-top: 50rpx; +} + +.imageBox { + margin-top: 50rpx; + height:100rpx; + width:90%; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} + +.imageBox>view { + height:100rpx; + width:120rpx; + /* background-image: url(http://www.powerrain.cn/qrcode/images/money.png); */ + background-image: url(https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/b64543a98226cffc74a50341b4014a90f703eab2.jpg); + background-size: cover; + /* background: red; */ +} + +.imageBox .wx { + background-position-x:-14rpx; +} + +.imageBox .al { + background-position-x:-141rpx; +} + +.imageBox .qq { + background-position-x:-270rpx; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..27fe60d --- /dev/null +++ b/project.config.json @@ -0,0 +1,42 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": true, + "es6": true, + "postcss": true, + "minified": true, + "newFeature": true, + "autoAudits": false + }, + "compileType": "miniprogram", + "libVersion": "2.4.3", + "appid": "wx0df150c438e4c8f0", + "projectname": "qrcode", + "debugOptions": { + "hidedInDevtools": [] + }, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "search": { + "current": -1, + "list": [] + }, + "conversation": { + "current": -1, + "list": [] + }, + "game": { + "currentL": -1, + "list": [] + }, + "miniprogram": { + "current": -1, + "list": [] + } + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file