Explorar o código

wesmiler 报恩寺项目web

wesmiler %!s(int64=3) %!d(string=hai) anos
pai
achega
415049a90f
Modificáronse 36 ficheiros con 397 adicións e 113 borrados
  1. 2 2
      App.vue
  2. 2 2
      config/common.js
  3. 14 2
      config/request.js
  4. 6 4
      pages.json
  5. 52 15
      pages/index/gongdeng/fodengInfo.vue
  6. 85 43
      pages/index/gongdeng/index.vue
  7. 115 31
      pages/index/gongdeng/myGongdeng.vue
  8. 1 1
      pages/my/index.vue
  9. 1 0
      pages/pay/dd.txt
  10. 104 0
      pages/pay/success.vue
  11. 1 0
      pages/temple/activity.vue
  12. 1 0
      pages/temple/books.vue
  13. 2 1
      pages/temple/detail.vue
  14. BIN=BIN
      static/index/icon/pay.png
  15. 1 1
      store/index.js
  16. 1 1
      unpackage/dist/build/h5/index.html
  17. BIN=BIN
      unpackage/dist/build/h5/static/index/icon/pay.png
  18. 0 1
      unpackage/dist/build/h5/static/js/index.5724d272.js
  19. 1 0
      unpackage/dist/build/h5/static/js/index.74317cf4.js
  20. 0 1
      unpackage/dist/build/h5/static/js/pages-dynamic-index.18366ba8.js
  21. 0 1
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-fodengInfo.74cab4b4.js
  22. 1 0
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-fodengInfo.edf37cf0.js
  23. 1 0
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-index.a3d20a06.js
  24. 0 1
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-index.feff17f4.js
  25. 1 0
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-myGongdeng.0b4fe2a5.js
  26. 0 1
      unpackage/dist/build/h5/static/js/pages-index-gongdeng-myGongdeng.7bbbb1c4.js
  27. 1 0
      unpackage/dist/build/h5/static/js/pages-my-index.09ddae73.js
  28. 0 1
      unpackage/dist/build/h5/static/js/pages-my-index.2d0ddaa3.js
  29. 0 1
      unpackage/dist/build/h5/static/js/pages-order-pay.7535fbe7.js
  30. 1 0
      unpackage/dist/build/h5/static/js/pages-pay-success.72e74b20.js
  31. 0 1
      unpackage/dist/build/h5/static/js/pages-temple-activity.4bb8093c.js
  32. 1 0
      unpackage/dist/build/h5/static/js/pages-temple-activity.bd21d569.js
  33. 1 0
      unpackage/dist/build/h5/static/js/pages-temple-books.29f43d7c.js
  34. 0 1
      unpackage/dist/build/h5/static/js/pages-temple-books.d5c49680.js
  35. 1 0
      unpackage/dist/build/h5/static/js/pages-temple-detail.6926117e.js
  36. 0 1
      unpackage/dist/build/h5/static/js/pages-temple-detail.e965e33d.js

+ 2 - 2
App.vue

@@ -5,8 +5,8 @@
 			console.log('App Launch')
 			let token = sessionStorage.getItem('token');
 			token = typeof(token) != 'undefined' && token != null? token : ''
-			//this.$store.commit('setToken',{access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJqd3RfeWgiLCJleHAiOjE2MjY2Njg5MjMsInN1YiI6IllIIiwiYXVkIjoiZXZlcnkiLCJuYmYiOjE2MjY0MDk3MjMsImlhdCI6MTYyNjQwOTcyMywianRpIjoxMDAwMSwidWlkIjo1OH0.sRCmdNxwIchMmVA2fY1Epag8S3s1YE3Ws7ACWq6_YV8'})
-			if((token=='') && this.$router.history.current.path != '/pages/entry/auth'){
+			// this.$store.commit('setToken',{access_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJqd3RfeWgiLCJleHAiOjE2MjY5NDg2NjgsInN1YiI6IllIIiwiYXVkIjoiZXZlcnkiLCJuYmYiOjE2MjY2ODk0NjgsImlhdCI6MTYyNjY4OTQ2OCwianRpIjoxMDAwMSwidWlkIjo1OH0.oVZQvUKD5I1KT0V7TZ5t9gJyw5DQeyndQuf0p7H2dmw'})
+			if((token=='') && this.$router.history.current.path != '/pages/entry/auth' && this.$router.history.current.path != '/pages/pay/success'){
 				uni.navigateTo({
 					url: '/pages/entry/auth?reback_url='+location.href
 				})

+ 2 - 2
config/common.js

@@ -4,7 +4,7 @@
  */
 export function getSessionData(key){
 	let data = sessionStorage.getItem(key);
-	data = typeof(data) != 'undefined'? JSON.parse(data) : {};
+	data = typeof(data) != 'undefined' && data? JSON.parse(data) : {};
 	return data
 }
 
@@ -14,5 +14,5 @@ export function getSessionData(key){
  * @param {Object} value
  */
 export function setSessionData(key, value){
-	return sessionStorage.setItem(key, JSON.stringify(value));
+	return sessionStorage.setItem(key, value? JSON.stringify(value) : '');
 }

+ 14 - 2
config/request.js

@@ -32,8 +32,20 @@ request.api = (url, data, method='post', type=2) => {
 	
         if (res[1].data && res[1].statusCode == 200) {
 			if (res[1].data.code == 10001){
-				//sessionStorage.setItem('token','');
-				//location.reload()
+				sessionStorage.setItem('token','');
+				let reAuth = sessionStorage.getItem('reAuth');
+				reAuth = typeof(reAuth) != 'undefined'? reAuth : false;
+				if(!reAuth){
+					uni.showToast({
+						title: '授权失效',
+						icon: 'none'
+					})
+					setTimeout(function(){
+						sessionStorage.setItem('reAuth', true);
+						location.reload()
+					}, 1200)
+				}
+				
 			    return res[1].data;
 			}
             return res[1].data

+ 6 - 4
pages.json

@@ -90,7 +90,8 @@
 			"path": "pages/index/gongdeng/index",//供灯首页
 			"style": {
 				"navigationBarTitleText":"供灯",
-			    "navigationStyle":"custom"//添加自定义配置
+			    "navigationStyle":"custom",//添加自定义配置
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -111,7 +112,8 @@
 			"path": "pages/index/gongdeng/myGongdeng",//我的供灯
 			"style": {
 				"navigationBarTitleText":"我的供灯",
-			    "navigationStyle":"custom"//添加自定义配置
+			    "navigationStyle":"custom",//添加自定义配置
+				"enablePullDownRefresh": true
 			}
 		},
 		{
@@ -340,9 +342,9 @@
 			}
 		},
 		{
-			"path":"pages/order/pay",// 订单支付
+			"path":"pages/pay/success",// 订单支付
 			"style":{
-				"navigationBarTitleText":"订单支付",
+				"navigationBarTitleText":"支付成功",
 				"navigationStyle":"custom"
 			}
 		},

+ 52 - 15
pages/index/gongdeng/fodengInfo.vue

@@ -108,7 +108,8 @@
 				showPayMask: false, //是否显示支付遮罩层
 				inputName: '',
 				info: {},
-				formData: {},
+				formData: {},
+				jssdkData: {},
 				tempFormData: {
 					fid: 0,
 					mid: 0,
@@ -128,15 +129,16 @@
 			}
 		},
 		onLoad(option) {
-			let id = option.id
+			let id = option.id
+			id = typeof(id) != 'undefined'? id : 0;
 			if (id <= 0) {
 				uni.showToast({
 					title: '佛像参数错误',
 					icon: 'none'
 				})
-				setTimeout(function() {
-					uni.navigateBack({
-						data: id,
+				setTimeout(function() {
+					uni.navigateTo({
+						url : '/pages/index/gongdeng/index'
 					})
 				}, 1200)
 
@@ -146,13 +148,12 @@
 			this.formData = Object.assign({}, this.tempFormData)
 			console.log(this.formData)
 			this.getInfo(id)
-			this.getMealList()
+			this.getMealList()
+			this.getJssdkInfo();
 		},
 		methods: {
 			backHome() {
-				uni.navigateBack({
-					delta: 1
-				});
+				location.href = '/pages/index/gongdeng/index'
 			},
 			switchMeal(data) {
 				this.mealInfo = data
@@ -170,7 +171,7 @@
 			},
 			clickWishContent(item) {
 				this.showMask = false;
-				this.content = item;
+				this.formData.qf_content = item;
 			},
 			// 表单提交
 			formSubmit() {
@@ -250,15 +251,30 @@
 				})
 
 			},
-			pay(type, params) {
+			pay(type, params) {
+				let _uni = this
 				switch (type) {
 					case 1: // 微信支付
+						// 获取jssdk授权 
+						if(!_uni.jssdkData){
+							uni.showToast({
+								icon: 'none',
+								title: '调取参数错误请刷新重试',
+							});
+							return false;
+						}
 						let jweixin = require('jweixin-module')
 						jweixin.config({
-							debug: true,
-							appId: params.appId, //必填
+							debug: false,
+							appId: _uni.jssdkData.appId, //必填
+							timestamp: _uni.jssdkData.timeStamp, // 必填,生成签名的时间戳
+						    nonceStr: _uni.jssdkData.nonceStr, // 必填,生成签名的随机串
+						    signature: _uni.jssdkData.paySign,// 必填,签名
 							jsApiList: ['chooseWXPay']
-						});
+						});
+						//alert(JSON.stringify(_uni.jssdkData))
+						//alert(JSON.stringify(params))
+						console.log(params)
 						jweixin.ready(function() {
 							jweixin.chooseWXPay({
 								appId: params.appId,
@@ -288,7 +304,11 @@
 						});
 						break;
 					case 2: // 支付宝支付
-						uni.hideLoading()
+						uni.hideLoading()
+						uni.showToast({
+							title: '支付类型暂不支持',
+							icon: 'none'
+						})
 						break;
 					default:
 						uni.hideLoading()
@@ -299,6 +319,23 @@
 						break;
 				}
 			},
+			// jssdk
+		    async getJssdkInfo() {
+				let _uni = this
+				await this.$request.api('/api/index/jssdk', {
+					url: location.href
+				}).then(res => {
+					if (res.success == true) {
+						_uni.jssdkData = res.data
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
+						icon: 'none'
+					})
+				})
+			},
+			
 			// 详情
 			getInfo(id) {
 				let _uni = this

+ 85 - 43
pages/index/gongdeng/index.vue

@@ -25,20 +25,21 @@
 			</view>
 		</view>
 		<view class="gongde_noitce_box">
-			<view class="gongde_notice">功德榜</view>
+			<view class="gongde_notice" v-if="gongdeList.length">功德榜</view>
 			<view v-for="(item,index) in gongdeList" :key="index">
 				<view class="gongde_notice_list_box">
 					<view class="personal_info_box">
-						<image :src="item.avatar" class="avatar"></image>
+						<image :src="item.avatar? item.avatar : ''" class="avatar"></image>
 						<view class="personal_info">
 							<view class="nickname">{{item.nickname}}</view>
-							<view class="time">{{item.time}}</view>
+							<view class="time">{{item.time_text}}</view>
 						</view>
 					</view>
-					<view class="gongdeInfo">{{item.gongdeInfo}}</view>
-					<view class="gongdeContent">{{item.content}}</view>
+					<view class="gongdeInfo">{{item.fx_name}}</view>
+					<view class="gongdeContent">@{{item.sf_name}}祈福:{{item.qf_content}}</view>
 				</view>
-			</view>
+			</view>
+			<uni-load-more :status="loadStatus"></uni-load-more>
 		</view>
 		<image src="../../../static/index/gongdeng/daily_welfare_1.png" class="getWelfareImg"></image>
 		<u-mask :show="showMask" @click="showMask = false">
@@ -59,23 +60,17 @@
 <script>
 	export default {
 		data() {
-			return {
+			return {
+				loaded: false,
+				loadStatus: 'false',
+				loadMore: false,
 				foxiangList: [],
-				gongdeList: [{
-						avatar: '../../../static/index/gongdeng/default_face_image.png', //头像路径
-						nickname: "Jack",
-						time: "1小时前",
-						gongdeInfo: "供奉文殊菩萨佛灯",
-						content: "开发智慧,提高悟性,学业有成"
-					},
-					{
-						avatar: '../../../static/index/gongdeng/default_face_image.png', //头像路径
-						nickname: "Tom",
-						time: "11小时前",
-						gongdeInfo: "供奉文殊菩萨佛灯",
-						content: "健康快乐"
-					}
-				],
+				gongdeList: [],
+				params: {
+					page: 1,
+					pageSize: 10,
+					total: 0,
+				},
 				showMask: false, //是否显示遮罩层
 				operateList: [{
 					icon: '../../../static/index/gongdeng/snackbar_warn.png',
@@ -91,15 +86,33 @@
 					content: '每日福利'
 				}]
 			}
-		},
-		onLoad(option) {
+		},
+		onLoad(option) {
 			this.getFoxiangList();
+			this.getGdList()
+
+			// 下拉加载
+			uni.startPullDownRefresh();
+		},
+		// 下拉加载更多
+		onReachBottom(){
+			console.log('loadmore')
+			if(!this.loaded){
+				this.loadMore = true
+				this.params.page++;
+				this.getGdList()
+			}
+		},
+		// 上拉刷新
+		onPullDownRefresh() {
+			console.log('refresh');
+				this.params.page = 1
+				this.getGdList()
+				uni.stopPullDownRefresh();
 		},
 		methods: {
 			backHome() {
-				uni.navigateBack({
-					delta: 1
-				});
+				location.href = '/pages/index/index'
 			},
 			showGongdengMask() {
 				this.showMask = true;
@@ -126,24 +139,53 @@
 			},
 			gongdeng(id) {
 				uni.navigateTo({
-					url: '../gongdeng/fodengInfo?id='+id
+					url: '../gongdeng/fodengInfo?id=' + id
 				});
-			},
-			// 列表
-			getFoxiangList() {
-				let _uni = this
-				uni.showLoading()
-				this.$request.api('/api/gongdeng/fxList', {}).then(res => {
-					uni.hideLoading()
+			},
+			// 列表
+			getFoxiangList() {
+				let _uni = this
+				uni.showLoading()
+				this.$request.api('/api/gongdeng/fxList', {}).then(res => {
+					uni.hideLoading()
+					if (res.success == true) {
+						_uni.foxiangList = res.data
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
+						icon: 'none'
+					})
+				})
+			},
+			// 功德列表
+			getGdList() {
+				let _uni = this
+				this.$request.api('/api/gongdeng/gdList', _uni.params).then(res => {
 					if (res.success == true) {
-						_uni.foxiangList = res.data
-					}
-				}).catch(err => {
-					uni.showToast({
-						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
-						icon: 'none'
-					})
-				})
+						if(_uni.loadMore==true && res.data.length>0){
+							let len = res.data.length
+							for(let i=0; i<=len; i++){
+								if(typeof(res.data[i]) != 'undefined'){
+									_uni.gongdeList.push(res.data[i])
+								}
+							}
+							_uni.loadMore = false
+						}else if (res.data.length>0){
+							_uni.gongdeList = res.data? res.data : [];
+						}
+						
+						if(this.params.page !=1 && res.data.length<=0){
+							_uni.loaded = true
+						}
+						console.log(this.gongdeList)
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
+						icon: 'none'
+					})
+				})
 			},
 		}
 	}

+ 115 - 31
pages/index/gongdeng/myGongdeng.vue

@@ -7,41 +7,48 @@
 				<text class="gongdeng-text">我的供灯</text>
 			</view>
 		</view>
-		<view v-if="list.length==0" class="empty_data_box">
+		<view v-if="gongdeList.length==0" class="empty_data_box">
 			<view>
 				<image src="../../../static/index/gongdeng/empty_data_icon.png" class="empty_data_img"></image>
 				<view class="empty_data_tip">暂无内容</view>
 			</view>
 		</view>
 		<view v-else class="gongdeng_info_box">
-			<view v-for="(item,index) in list" :key="index" class="gongdeng_list">
+			<view v-for="(item,index) in gongdeList" :key="index" class="gongdeng_list">
 					<view class="gongdeng_img_box">
-						<image :src="item.foxiang" class="gongdeng_img"></image>
+						<image :src="item.fx_thumb" class="gongdeng_img"></image>
 					</view>
 					<view class="gongdeng_item_info">
-						<view class="gongdeng_left_item">
+						<view class="gongdeng_left_item">
+							<view class="gongdeng_item_content">
+								<text class="gongdeng_item_title">状态</text>
+								<text class="gongdeng_item_text" v-if="item.status==1">未支付</text>
+								<text class="gongdeng_item_text" v-else-if="item.status==2">{{item.lamp_status==2? item.device_num+'号灯已点亮':(item.buy_type==2?'续费成功':'已支付')}}</text>
+								<text class="gongdeng_item_text" v-else-if="item.status==3">已取消</text>
+							</view>
 							<view class="gongdeng_item_content">
 								<text class="gongdeng_item_title">功德主</text>
-								<text class="gongdeng_item_text">{{item.person}}</text>
+								<text class="gongdeng_item_text">{{item.sf_name}}</text>
 							</view>
 							<view class="gongdeng_item_content">
 								<text class="gongdeng_item_title">实付金额</text>
-								<text class="gongdeng_item_text">{{item.money}}</text>
+								<text class="gongdeng_item_text">{{item.pay_money}}</text>
 							</view>
 							<view class="gongdeng_item_content">
 								<text class="gongdeng_item_title">开始时间</text>
-								<text class="gongdeng_item_text">{{item.startTime}}</text>
+								<text class="gongdeng_item_text">{{item.pay_at?item.pay_at:item.create_time}}</text>
 							</view>
 							<view class="gongdeng_item_content">
 								<text class="gongdeng_item_title">结束时间</text>
-								<text class="gongdeng_item_text">{{item.endTime}}</text>
+								<text class="gongdeng_item_text" v-if="item.status==2">{{item.expire_at}}</text>
 							</view>
 						</view>
 						<image v-if="item.ifFinish" src="../../../static/index/gongdeng/gongdeng_finish.png" class="deng_img"></image>
 						<image v-else src="../../../static/index/gongdeng/gongdeng_unfinish.png" class="deng_img"></image>
 					</view>
-				    <view class="show_certificate">供灯证书</view>
+				    <view class="show_certificate" @click="lookLamp(item)">查看供灯</view>
 			</view>
+			<uni-load-more :status="loadStatus"></uni-load-more>
 		</view>
 	</view>
 </template>
@@ -49,31 +56,106 @@
 <script>
 	export default {
 		data() {
-			return {
-				list: [{
-					foxiang: '../../../static/index/gongdeng/wen_shu.jpg',
-					person: '222',
-					money: '0元',
-					startTime: '2021-4-25',
-					endTime: '2021-4-26',
-					ifFinish: true
-				}, {
-					foxiang: '../../../static/index/gongdeng/wen_shu.jpg',
-					person: '222',
-					money: '0元',
-					startTime: '2021-4-25',
-					endTime: '2021-4-26',
-					ifFinish: false
-				}
-				]
+			return {
+				type: 1,
+				loaded: false,
+				loadStatus: 'false',
+				loadMore: false,
+				params: {
+					page: 1,
+					pageSize: 12,
+					total: 0,
+				},
+				gongdeList: [],
+				// 供灯图片
+				picList: [],
 			}
+		},
+		onLoad(option) {
+			this.getList()
+			this.type = typeof(option.type)!='undefined'? option.type : 1;
+			
+			// 上拉刷新
+			uni.startPullDownRefresh({
+				success: function(){
+					
+				}
+			});	
+		},
+		// 下拉加载更多
+		onReachBottom(){
+			console.log('loadmore')
+			if(!this.loaded){
+				this.loadMore = true
+				this.params.page++;
+				this.getList()
+			}
+		},
+		// 上拉刷新
+		onPullDownRefresh() {
+			console.log('refresh');
+			this.params.page = 1
+			this.getList()
+			uni.stopPullDownRefresh();
 		},
 		methods: {
 			backHome() {
-				uni.navigateBack({
-					delta: 1
-				});
-			},
+				if(this.type==1){
+					uni.navigateTo({
+						url: '/pages/index/gongdeng/index'
+					})
+				}else{
+					location.href = '/pages/my/index'
+				}
+			},
+			// 查看供灯图片
+			lookLamp(data){
+				if(data.status != 2){
+					uni.showToast({
+						title: '抱歉,您的订单未支付,稍后会自动取消!',
+						icon: 'none'
+					})
+					return false;
+				}
+				
+				if(data.lamp_status != 2){
+					uni.showToast({
+						title: '抱歉,您要供奉的灯未开启成功,请联系佛祖!',
+						icon: 'none'
+					})
+					return false;
+				}
+				
+				// 获取图片
+			},
+			getList(){
+				let _uni = this
+				this.$request.api('/api/gongdeng/list', _uni.params).then(res => {
+					if (res.success == true) {
+						if(_uni.loadMore==true && res.data.length>0){
+							let len = res.data.length
+							for(let i=0; i<=len; i++){
+								if(typeof(res.data[i]) != 'undefined'){
+									_uni.gongdeList.push(res.data[i])
+								}
+							}
+							_uni.loadMore = false
+						}else if (res.data.length>0){
+							_uni.gongdeList = res.data? res.data : [];
+						}
+						
+						if(this.params.page !=1 && res.data.length<=0){
+							_uni.loaded = true
+						}
+						console.log(this.gongdeList)
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
+						icon: 'none'
+					})
+				})
+			}
 		}
 	}
 </script>
@@ -163,7 +245,9 @@
 					width:160rpx;
 					height:160rpx;
 					margin-top: 65rpx;
-					margin-left: 220rpx;
+					// margin-left: 220rpx;
+					position: absolute;
+					right: 5px;
 				}
 			}
 			.show_certificate{

+ 1 - 1
pages/my/index.vue

@@ -85,7 +85,7 @@
 					</navigator>
 				</view>
 				<view class="uni-menu-list-item">
-					<navigator url="/pages/index/gongdeng/myGongdeng">
+					<navigator url="/pages/index/gongdeng/myGongdeng?type=2">
 						<img class="uni-list-icon" src="../../static/my/light_user_icon_theme.png" width="30">
 						<text class="uni-list-text">我的供灯</text>
 						<img class="uni-list-icon_right" src="../../static/my/gx_input.png" alt="">

+ 1 - 0
pages/pay/dd.txt

@@ -0,0 +1 @@
+asfsf

+ 104 - 0
pages/pay/success.vue

@@ -0,0 +1,104 @@
+<template>
+	<view class="uni-main">
+		<view class="uni-icon">
+			<img src="../../static/index/icon/pay.png" alt="">
+		</view>
+		<view class="uni-info">
+			<view class="uni-text uni-msg">
+				支付成功!
+			</view>
+			<view class="uni-text">
+				支付金额:{{orderInfo.pay_money}}
+			</view>
+			<view class="uni-text">
+				订单编号:{{orderInfo.out_trade_no}}
+			</view>
+			<view class="uni-btn" @click="payBack()">
+				完成
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderInfo: {
+					out_trade_no: 'G20210715122544',
+					pay_money: 0.02,
+					status: 1,
+					type: 1,
+					source_id: 0,
+				}
+			}
+		},
+		onLoad(option) {
+			let _uni = this
+			console.log(option)
+		},
+		methods: {
+			payBack() {
+				switch (this.orderInfo.type) {
+					case 1:
+						location.href = '/pages/index/gongdeng/fodengInfo?id=' + this.orderInfo.source_id
+						break;
+					case 2:
+						location.href = '/pages/pay/recharge'
+						break;
+					default:
+						location.href = '/pages/index/index'
+						break;
+				}
+			},
+			getInfo(order_sn) {
+				let _uni = this
+				uni.showLoading()
+				this.$request.api('/api/order/info', {
+					order_sn: order_sn
+				}).then(res => {
+					uni.hideLoading()
+					if (res.success == true) {
+						_uni.orderInfo = res.data
+					}else{
+						uni.showToast({
+							title: '获取订单信息错误,将返回主页',
+							icon: 'none'
+						})
+						setTimeout(function(){
+							location.href = '/pages/index/index'
+						}, 1200)
+					}
+				}).catch(err => {
+					uni.showToast({
+						title: typeof(err.msg) != 'undefined' ? err.msg : '服务器错误',
+						icon: 'none'
+					})
+				})
+			},
+		},
+	}
+</script>
+<style>
+	.uni-main {
+		text-align: center;
+	}
+	.uni-info {
+		margin: 0 auto;
+	}
+	.uni-icon {
+		margin-top: 100rpx;
+	}
+	.uni-text {
+		margin-bottom: 10rpx;
+		
+	}
+	.uni-btn {
+		width: 30%;
+		margin: 30rpx auto;
+		background-color: #18B566;
+		color: #fff;
+		padding: 8rpx 10rpx;
+		border-radius: 8rpx;
+	}
+</style>

+ 1 - 0
pages/temple/activity.vue

@@ -90,6 +90,7 @@
 		onLoad(option){
 			let _uni = this
 			let id = option.id
+			id = typeof(id) != 'undefined'? id : 0;
 			if(id<=0){
 				uni.showToast({
 					title: '活动参数错误',

+ 1 - 0
pages/temple/books.vue

@@ -71,6 +71,7 @@
 		onLoad(option) {
 			let _uni = this
 			_uni.info.id = option.id
+			_uni.info.id  = typeof(_uni.info.id) != 'undefined'? _uni.info.id : 0;
 			if(_uni.info.id<=0){
 				uni.showToast({
 					title: '活动参数错误',

+ 2 - 1
pages/temple/detail.vue

@@ -33,7 +33,8 @@
 		},
 		onLoad(option) {
 			let _uni = this
-			let id = option.id
+			let id = option.id
+			id = typeof(id) != 'undefined'? id : 0;
 			if (id <= 0) {
 				uni.showToast({
 					title: '寺院参数错误',

BIN=BIN
static/index/icon/pay.png


+ 1 - 1
store/index.js

@@ -4,7 +4,7 @@ import {getSessionData,setSessionData} from '../config/common.js'
 Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
-		userInfo: uni.getStorageSync('auth')? JSON.parse(uni.getStorageSync('auth')) : {},
+		userInfo: getSessionData('auth')? getSessionData('auth') : {},
 		token: getSessionData('token')? getSessionData('token') : '',
 	},
 	mutations: {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/build/h5/index.html


BIN=BIN
unpackage/dist/build/h5/static/index/icon/pay.png


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/index.5724d272.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/index.74317cf4.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-dynamic-index.18366ba8.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-index-gongdeng-fodengInfo.74cab4b4.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-index-gongdeng-fodengInfo.edf37cf0.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-index-gongdeng-index.a3d20a06.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-index-gongdeng-index.feff17f4.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-index-gongdeng-myGongdeng.0b4fe2a5.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-index-gongdeng-myGongdeng.7bbbb1c4.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-my-index.09ddae73.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-my-index.2d0ddaa3.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-order-pay.7535fbe7.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-pay-success.72e74b20.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-temple-activity.4bb8093c.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-temple-activity.bd21d569.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-temple-books.29f43d7c.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-temple-books.d5c49680.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-temple-detail.6926117e.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-temple-detail.e965e33d.js