diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..4bce94d --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "singleQuote": true +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index ca6ac32..ef9c152 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,13 @@ @@ -41,7 +46,7 @@ export default { handler(to){ const path = tabbar.map(tab => tab.path); document.title = to.meta.title || '自在福田'; - this.showTabbar = path.includes(path) + this.showTabbar = path.includes(to.path) } } }, @@ -57,7 +62,7 @@ export default { diff --git a/src/api/index.js b/src/api/index.js index 8977c4f..e998d9d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -68,6 +68,44 @@ const getCourseList = () => service.get(`/api/course/get-list`); // 获取功课详情 const getCourseDetail = course_id => service.get(`/api/course/get-details/${course_id}`); +// 寺院首页 +const getTempleIndex = temple_id => service.get(`/api/temple/index?temple_id=${temple_id}`); + +// 寺院详情 +const getTempleDetail = temple_id => service.get(`/api/temple/certify-show?temple_id=${temple_id}`); + +// 法师、监院人员信息详情 +const getMasterDetail = master_id => service.get(`/api/master/show?master_id=${master_id}`); + +// 添加关注 +const toggleCollect = dynamic_id => service.get(`/api/dynamic/collect?dynamic_id=${dynamic_id}`); + +// 根据订单ID获取支付参数 +const createPay = order_id => service.get(`/api/order/pay?order_id=${order_id}`); + +// 获取随喜金额列表 +const getRandMoney = () => service.get(`/api/order/get-rand-money`) + +// 功课详情计数 +const postCount = (course_id, data) => service.put(`/api/course/count/${course_id}`, data); + +// 功德箱 +const getMeritBox = (temple_id, type, page, size = 10) => service.get(`/api/temple/get-merit-box?temple_id=${temple_id}&type=${type}&page=${page}&size=${size}`,) + +// 添加功德箱订单 +const createMeritBoxOrder = data => service.post(`/api/order/create-merit-box`, data) + +// 获取动态列表 +const getDynamicData = (page = 1, size = 10) => service.get(`/api/dynamic/get-page?page=${page}&size=${size}`); + +// 通用商品列表(功德无量) +const getCommonGoods = (temple_id, page, size = 10) => service.get(`/api/common/get-list?temple_id=${temple_id}&page=${page}&size=${size}`); + +// 获取订单榜 +const getOrderCompare = (temple_id, type = '', goods_id = '', goods_type = '') => service.get(`/api/order/get-compare?temple_id=${temple_id}&type=${type}&goods_id=${goods_id}&goods_type=${goods_type}`); + +// 寺院列表 +const getTempleList = (keywords = '', lng = '', lat = '', page = 1, size = 10) => service.get(`/api/temple/get-List?keywords=${keywords}&lng=${lng}&lat=${lat}&page=${page}&size=${size}`) export { getMonkAppellation, @@ -83,5 +121,18 @@ export { postMeritName, getWechatSign, getCourseList, - getCourseDetail + getCourseDetail, + getTempleIndex, + getTempleList, + getTempleDetail, + toggleCollect, + getMasterDetail, + createPay, + getRandMoney, + postCount, + getMeritBox, + createMeritBoxOrder, + getDynamicData, + getCommonGoods, + getOrderCompare } \ No newline at end of file diff --git a/src/api/service.js b/src/api/service.js index c49f512..2ec91f5 100644 --- a/src/api/service.js +++ b/src/api/service.js @@ -18,7 +18,7 @@ instance.interceptors.request.use(request => { if(request.url.includes('upload')){ return request } - if(request.method === 'post' && !request.url.includes('post')){ + if((request.method === 'post' || request.method === 'put' )&& !request.url.includes('post')){ request.data = qs.stringify(request.data) return request; } diff --git a/src/assets/img/backward.jpg b/src/assets/img/backward.jpg new file mode 100644 index 0000000..b320593 Binary files /dev/null and b/src/assets/img/backward.jpg differ diff --git a/src/assets/img/backward2.jpg b/src/assets/img/backward2.jpg new file mode 100644 index 0000000..bb4c415 Binary files /dev/null and b/src/assets/img/backward2.jpg differ diff --git a/src/assets/img/cert.jpg b/src/assets/img/cert.jpg new file mode 100644 index 0000000..797439f Binary files /dev/null and b/src/assets/img/cert.jpg differ diff --git a/src/assets/img/down.jpg b/src/assets/img/down.jpg new file mode 100644 index 0000000..d2ec21a Binary files /dev/null and b/src/assets/img/down.jpg differ diff --git a/src/assets/img/red-packet.jpg b/src/assets/img/red-packet.jpg new file mode 100644 index 0000000..20f13d3 Binary files /dev/null and b/src/assets/img/red-packet.jpg differ diff --git a/src/assets/img/tabbar/tabbar_icon_01.png b/src/assets/img/tabbar/tabbar_icon_01.png new file mode 100644 index 0000000..7e42120 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_01.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_01_click.png b/src/assets/img/tabbar/tabbar_icon_01_click.png new file mode 100644 index 0000000..fa15eaf Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_01_click.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_02.png b/src/assets/img/tabbar/tabbar_icon_02.png new file mode 100644 index 0000000..6bed2cb Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_02.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_02_click.png b/src/assets/img/tabbar/tabbar_icon_02_click.png new file mode 100644 index 0000000..4e35764 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_02_click.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_03.png b/src/assets/img/tabbar/tabbar_icon_03.png new file mode 100644 index 0000000..6fe9f35 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_03.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_03_click.png b/src/assets/img/tabbar/tabbar_icon_03_click.png new file mode 100644 index 0000000..88cebe1 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_03_click.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_04.png b/src/assets/img/tabbar/tabbar_icon_04.png new file mode 100644 index 0000000..f603896 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_04.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_04_click.png b/src/assets/img/tabbar/tabbar_icon_04_click.png new file mode 100644 index 0000000..6f20507 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_04_click.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_05.png b/src/assets/img/tabbar/tabbar_icon_05.png new file mode 100644 index 0000000..c9ca036 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_05.png differ diff --git a/src/assets/img/tabbar/tabbar_icon_05_click.png b/src/assets/img/tabbar/tabbar_icon_05_click.png new file mode 100644 index 0000000..ec3f910 Binary files /dev/null and b/src/assets/img/tabbar/tabbar_icon_05_click.png differ diff --git a/src/assets/img/up.jpg b/src/assets/img/up.jpg new file mode 100644 index 0000000..b01ae1b Binary files /dev/null and b/src/assets/img/up.jpg differ diff --git a/src/assets/img/xiaoheshang.jpg b/src/assets/img/xiaoheshang.jpg new file mode 100644 index 0000000..97111a9 Binary files /dev/null and b/src/assets/img/xiaoheshang.jpg differ diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss index beb09cd..21e7b4b 100644 --- a/src/assets/scss/common.scss +++ b/src/assets/scss/common.scss @@ -28,8 +28,9 @@ .merit-group { display: flex; - width: 11.36rem; + flex-wrap: nowrap; margin-bottom: .91rem; + margin: 0 .4rem; } } } @@ -102,4 +103,11 @@ display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; +} +.no-more{ + height: 1rem; + line-height: 1rem; + font-size: .4rem; + color: #666; + text-align: center; } \ No newline at end of file diff --git a/src/assets/wav/muyu-voice.wav b/src/assets/wav/muyu-voice.wav new file mode 100644 index 0000000..58d2cc3 Binary files /dev/null and b/src/assets/wav/muyu-voice.wav differ diff --git a/src/assets/wav/muyu.mp3 b/src/assets/wav/muyu.mp3 new file mode 100644 index 0000000..62d7abd Binary files /dev/null and b/src/assets/wav/muyu.mp3 differ diff --git a/src/assets/wav/muyu2.mp3 b/src/assets/wav/muyu2.mp3 new file mode 100644 index 0000000..c0952cb Binary files /dev/null and b/src/assets/wav/muyu2.mp3 differ diff --git a/src/common/vant.js b/src/common/vant.js index 89c7952..8f82233 100644 --- a/src/common/vant.js +++ b/src/common/vant.js @@ -26,7 +26,8 @@ import { RadioGroup, Switch, Cascader, - ActionSheet + ActionSheet, + Dialog } from "vant"; Vue.use(Button); @@ -57,4 +58,5 @@ Vue.use(Radio) Vue.use(RadioGroup) Vue.use(Switch) Vue.use(ActionSheet) -Vue.use(Cascader) \ No newline at end of file +Vue.use(Cascader) +Vue.use(Dialog) \ No newline at end of file diff --git a/src/common/wechat-web.js b/src/common/wechat-web.js index c8e9376..342f0cf 100644 --- a/src/common/wechat-web.js +++ b/src/common/wechat-web.js @@ -46,4 +46,20 @@ function getLocation(){ }) } -export { signToWechat, getLocation }; \ No newline at end of file +function requestPayment(paymentConfig){ + return new Promise(resolve => { + wechatInstance.chooseWXPay({ + timestamp: paymentConfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + nonceStr: paymentConfig.nonceStr, // 支付签名随机串,不长于 32 位 + package: paymentConfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) + signType: paymentConfig.signType, // 微信支付V3的传入RSA,微信支付V2的传入格式与V2统一下单的签名格式保持一致 + paySign: paymentConfig.paySign, // 支付签名 + success: function (res) { + // 支付成功后的回调函数 + resolve(res) + } + }); + }) +} + +export { signToWechat, getLocation, requestPayment }; \ No newline at end of file diff --git a/src/components/Thanksgiving/index.vue b/src/components/Thanksgiving/index.vue new file mode 100644 index 0000000..7962c58 --- /dev/null +++ b/src/components/Thanksgiving/index.vue @@ -0,0 +1,122 @@ + + + + + \ No newline at end of file diff --git a/src/components/arrow-more/index.vue b/src/components/arrow-more/index.vue new file mode 100644 index 0000000..020f95f --- /dev/null +++ b/src/components/arrow-more/index.vue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/src/components/buddha-process/index.vue b/src/components/buddha-process/index.vue index 4558527..b579a73 100644 --- a/src/components/buddha-process/index.vue +++ b/src/components/buddha-process/index.vue @@ -1,19 +1,17 @@ @@ -79,7 +122,7 @@ export default { width: 2.16rem; height: 2.16rem; vertical-align: top; - border-radius: .16rem; + border-radius: .05rem; & ~ img{ margin-left: .27rem; } @@ -112,17 +155,30 @@ export default { .btn{ display: flex; margin-left: .5rem; - line-height: .40rem; + align-items: center; .iconfont{ color:$primary-color; vertical-align: middle; - font-size: .3rem; + font-size: .4rem; + margin-top: -3px; } b{ - font-size: .3rem; - padding-left: .07rem; + font-size: .35rem; + padding-left: .1rem; color: #888; + display: inline-block; + vertical-align: middle; + } + } + .collect{ + .iconfont{ + color: $primary-color; + } + } + .un-collect{ + .iconfont{ + color: #ddd; } } } diff --git a/src/components/index.js b/src/components/index.js index c3f2038..e1997d5 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -8,6 +8,10 @@ import Order from './order'; import ScrollView from './scroll-view' import Uploader from './uploader' import ContentExpand from './content-expand' +import UserDynamic from './user-dynamic'; +import RandomMoney from './random-money' +import ThankGiving from './Thanksgiving' +import ArrowMore from './arrow-more' Vue.component(UserMerit.name, UserMerit) Vue.component(Temple.name, Temple) @@ -17,3 +21,7 @@ Vue.component(Order.name, Order) Vue.component(ScrollView.name, ScrollView) Vue.component(Uploader.name, Uploader) Vue.component(ContentExpand.name, ContentExpand) +Vue.component(UserDynamic.name, UserDynamic) +Vue.component(RandomMoney.name, RandomMoney) +Vue.component(ThankGiving.name, ThankGiving) +Vue.component(ArrowMore.name, ArrowMore) diff --git a/src/components/merit-goods/index.vue b/src/components/merit-goods/index.vue index 647e98b..99d5fce 100644 --- a/src/components/merit-goods/index.vue +++ b/src/components/merit-goods/index.vue @@ -1,11 +1,11 @@ - + diff --git a/src/pages/monk/index.vue b/src/pages/monk/index.vue index f052e67..b08a3bd 100644 --- a/src/pages/monk/index.vue +++ b/src/pages/monk/index.vue @@ -1,23 +1,18 @@ diff --git a/src/pages/pay-result/index.vue b/src/pages/pay-result/index.vue new file mode 100644 index 0000000..d8b73af --- /dev/null +++ b/src/pages/pay-result/index.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/pages/pay/index.vue b/src/pages/pay/index.vue index 8bdba13..8f427c5 100644 --- a/src/pages/pay/index.vue +++ b/src/pages/pay/index.vue @@ -34,7 +34,8 @@ @@ -62,9 +73,15 @@ export default { width: 100%; } .authed{ - font-size: .4rem; + font-size: .35rem; line-height: 1.2rem; padding-left: .4rem; + color: #888; + img{ + width: .3rem; + vertical-align: middle; + margin-right: .1rem; + } } .auth{ margin: .4rem; @@ -100,14 +117,14 @@ export default { margin-right: .3rem; img{ width: 100%; + vertical-align: top; } } } .description{ font-size: .4rem; - color: #666; - text-indent: 2em; - line-height: 1.4; + color: #888; + line-height: 1.7; padding-top: .35rem; letter-spacing: 1px; text-align: justify; diff --git a/src/pages/temple-home/index.vue b/src/pages/temple-home/index.vue index f605e2c..40d3776 100644 --- a/src/pages/temple-home/index.vue +++ b/src/pages/temple-home/index.vue @@ -1,75 +1,45 @@ @@ -57,6 +128,9 @@ export default {