diff --git a/.env.production b/.env.production index 7364e0f..28fd8c3 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ VUE_APP_HOST=https://prod-temple.wdx-tc.com/ VUE_APP_TMAP_KEY=ZFGBZ-76ICF-BG5JY-NH4HX-MQOOJ-VJB4E -NODE_ENV = production \ No newline at end of file +NODE_ENV=production diff --git a/.env.test b/.env.test index 08a7caa..4d003d3 100644 --- a/.env.test +++ b/.env.test @@ -1,3 +1,3 @@ VUE_APP_HOST=https://test-temple.wdx-tc.com/ VUE_APP_TMAP_KEY=ZFGBZ-76ICF-BG5JY-NH4HX-MQOOJ-VJB4E -NODE_ENV = test \ No newline at end of file +NODE_ENV=production diff --git a/package.json b/package.json index 91105fb..09c5f75 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "serve": "vue-cli-service serve --mode development", - "build:test": "vue-cli-service build --mode production", + "build:test": "vue-cli-service build --mode test", "build": "vue-cli-service build --mode production", "lint": "vue-cli-service lint" }, @@ -22,7 +22,8 @@ "vant": "^2.12.30", "vue": "^2.6.11", "vue-awesome-swiper": "3.1.3", - "vue-router": "^3.5.3" + "vue-router": "^3.5.3", + "vuex": "^3.6.2" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", diff --git a/public/index.html b/public/index.html index ef73768..f81bf87 100644 --- a/public/index.html +++ b/public/index.html @@ -1,11 +1,14 @@ - + - - + + + + + diff --git a/src/App.vue b/src/App.vue index 1915f21..4ab19b4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,7 +50,6 @@ export default { handler() { this.$nextTick(() => { const { tabbar } = this.$refs; - console.log(tabbar) this.tabHeight = tabbar ? tabbar.$el.offsetHeight - safeAreaInsets.bottom: 0; console.log(this.tabHeight, ) }) diff --git a/src/api/index.js b/src/api/index.js index f3c11f1..542d0f3 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -146,6 +146,9 @@ const getCertList = () => service.get(`/api/user/get-cert-list`); // 热门搜索 const getHotWords = () => service.get(`/api/keywords/get-list`); +// 获取入驻模板 +const getStationTemplate = template_id => service.get(`/api/temple-template-share?id=${template_id}`); + export { getHotWords, getMonkAppellation, @@ -186,5 +189,6 @@ export { getOrderList, getOrder, getCustomerList, - getCertList + getCertList, + getStationTemplate } diff --git a/src/api/service.js b/src/api/service.js index 0d0316e..0f4977f 100644 --- a/src/api/service.js +++ b/src/api/service.js @@ -9,6 +9,7 @@ const instance = axios.create({ baseURL, timeout: 15000, headers: { + "env": process.env.NODE_ENV, "Accept": "*", "Content-Type": "application/x-www-form-urlencoded" }, diff --git a/src/common/vant.js b/src/common/vant.js index be6a4d5..e921808 100644 --- a/src/common/vant.js +++ b/src/common/vant.js @@ -28,12 +28,14 @@ import { Cascader, ActionSheet, ShareSheet, + Loading, Dialog, Icon } from "vant"; -Vue.use(Button); Vue.use(NavBar); +Vue.use(Button); +Vue.use(Loading); Vue.use(Icon); Vue.use(Search); Vue.use(Swipe); diff --git a/src/components/random-money/index.vue b/src/components/random-money/index.vue index 2959ef0..53e33f3 100644 --- a/src/components/random-money/index.vue +++ b/src/components/random-money/index.vue @@ -128,7 +128,7 @@ export default { } .username-container{ padding-top: .3rem; - height: 2rem; + height: 1rem; .username{ color: white; font-size: .4rem; diff --git a/src/components/sms-code-input/index.vue b/src/components/sms-code-input/index.vue new file mode 100644 index 0000000..12f22cd --- /dev/null +++ b/src/components/sms-code-input/index.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/src/components/vue-number-scroll/index.vue b/src/components/vue-number-scroll/index.vue index c5a4298..8aad126 100644 --- a/src/components/vue-number-scroll/index.vue +++ b/src/components/vue-number-scroll/index.vue @@ -69,12 +69,15 @@ export default { diff --git a/src/pages/home.vue b/src/pages/home.vue index 55b8f23..8a2ba46 100644 --- a/src/pages/home.vue +++ b/src/pages/home.vue @@ -96,7 +96,48 @@ export default { }) }, locationTo(nav) { - window.location.href = nav.url; + // nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态 + if(nav.type === 0){ + window.location.href = nav.url; + return + } + + if(nav.type === 5){ + this.$router.push({ + name: 'buddha-detail', + query: { id: nav.dynamic_id } + }) + return + } + + if(nav.type === 4){ + this.$router.push({ + name: 'merit-box' + }) + return + } + + if(nav.type === 3){ + this.$router.push({ + name: 'goods-detail', + query: { + goods_type: nav.type, + goods_id: nav.goods_id , + temple_id: nav.temple_id, + } + }) + } + + if(nav.type === 1 || nav.type === 2){ + this.$router.push({ + name: 'everyday-donation', + query: { + goods_type: nav.type, + goods_id: nav.goods_id , + temple_id: nav.temple_id, + }, + }); + } }, async getTempleIndex() { const res = await getTempleIndex(this.query.temple_id); diff --git a/src/pages/pay/index.vue b/src/pages/pay/index.vue index b4a0e17..3f1d6ec 100644 --- a/src/pages/pay/index.vue +++ b/src/pages/pay/index.vue @@ -58,26 +58,20 @@ export default { }) }, methods: { - onContinuePayOrder(){ this.onPayment({ id: this.query.order_id }) }, async onCreatePayOrder(){ // 创建日行一善支付订单 if(this.query.goods_type == '1'){ - const request = { - ...this.query, - } + const request = { ...this.query } const order = await createFriendlyDayOrder(request) this.onPayment(order) return } // 创建填砖加瓦订单 if(this.query.goods_type == '2'){ - const request = { - ...this.query, - - } + const request = { ...this.query } const order = await createBrickDayOrder(request) await this.onPayment(order) return diff --git a/src/pages/temple-home/index.vue b/src/pages/temple-home/index.vue index 58cb378..4ec4d57 100644 --- a/src/pages/temple-home/index.vue +++ b/src/pages/temple-home/index.vue @@ -9,11 +9,11 @@
- 佛教协会认证寺院 可放心访问 + 认证寺院可放心访问 查看
-
+
@@ -23,7 +23,7 @@ - + @@ -143,6 +143,50 @@ export default { this.getUserData(); }, methods: { + locationTo(nav) { + // nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态 + if(nav.type === 0){ + window.location.href = nav.url; + return + } + + if(nav.type === 5){ + this.$router.push({ + name: 'buddha-detail', + query: { id: nav.dynamic_id } + }) + return + } + + if(nav.type === 4){ + this.$router.push({ + name: 'merit-box' + }) + return + } + + if(nav.type === 3){ + this.$router.push({ + name: 'goods-detail', + query: { + goods_type: nav.type, + goods_id: nav.goods_id , + temple_id: nav.temple_id, + } + }) + } + + if(nav.type === 1 || nav.type === 2){ + this.$router.push({ + name: 'everyday-donation', + query: { + goods_type: nav.type, + goods_id: nav.goods_id , + temple_id: nav.temple_id, + }, + }); + } + }, onPushForRouteName(routeName){ this.$router.push({ name: routeName }) }, @@ -217,7 +261,7 @@ export default { display: block; } .user-dynamic-container { - margin-top: 0.5rem; + margin-top: 0.3rem; height: 1.26rem; overflow: hidden; .van-swipe { @@ -360,7 +404,7 @@ export default { word-break: break-all; -webkit-line-clamp: 3; text-align: justify; - height: 4.3em; + max-height: 4.3em; -webkit-box-orient: vertical; color: #999; } @@ -402,8 +446,6 @@ export default { } .grid-nav { - margin-bottom: .8rem; - .nav-icon { width: 1.07rem; height: 1.07rem; diff --git a/src/pages/user/temple-station/index.vue b/src/pages/user/temple-station/index.vue index 939466a..07dc7ea 100644 --- a/src/pages/user/temple-station/index.vue +++ b/src/pages/user/temple-station/index.vue @@ -32,16 +32,16 @@ 同意自在福田服务协议
- 下一步 + 下一步
- + - + @@ -56,7 +56,7 @@ 您是寺院法人?
- + @@ -73,9 +73,14 @@

平台入驻管理员微信

审核通过后将微信通知入驻上架具体事宜

+ 上一步 提交
+
+
+ +
自在福田
\ No newline at end of file +自在福田
\ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9686330..3772266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8667,6 +8667,11 @@ vue@^2.6.11: resolved "https://registry.npmmirror.com/vue/download/vue-2.6.14.tgz?cache=0&sync_timestamp=1633712790340&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fvue%2Fdownload%2Fvue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235" integrity sha1-5RqlJQJQ1Wmj+606ilpofWA24jU= +vuex@^3.6.2: + version "3.6.2" + resolved "https://registry.nlark.com/vuex/download/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71" + integrity sha1-I2vAhqhww655lG8QfxbeWdWJXnE= + watchpack-chokidar2@^2.0.1: version "2.0.1" resolved "https://registry.nlark.com/watchpack-chokidar2/download/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957"