lyb 4 lat temu
rodzic
commit
f6761dc0ac

+ 1 - 1
assets/http/service.js

@@ -6,7 +6,7 @@ let baseURL = config.baseURL
 
 
 let tokenUrl = baseURL +
-	"/blade-auth/oauth/token?tenantId=000000&password=21232f297a57a5a743894a0e4a801fc3&username=admin"
+	"/blade-auth/oauth/token?tenantId=000000&password=929d394935cbe446b171e34db023456d&username=admin"
 
 //获取token
 const getTokenStorage = () => {

+ 3 - 2
components/alert/webAuthAlert.vue

@@ -15,11 +15,12 @@
 
 <script>
 	export default {
-		name:"voteSuccess",
+		props: {
+			tipsContent: ''
+		},
 		data() {
 			return {
 				show: false,
-				tipsContent: '首次现金投票助力需用户授权',
 				confirmStyle: {
 					color: 'white',
 				},

+ 3 - 2
pages/activity/activityDetail.vue

@@ -72,7 +72,7 @@
 		<sms-alert ref="smsAlert" @exchange="cmccVote"></sms-alert>
 		<vote-success ref="voteSuccess" @support="skipShop"></vote-success>
 		<home-btn></home-btn>
-		<webAuthAlert ref="webAuthAlert" @confirm="webAuthConfirm"></webAuthAlert>
+		<webAuthAlert ref="webAuthAlert" tipsContent="首次现金投票助力需用户授权" @confirm="webAuthConfirm"></webAuthAlert>
 	</view>
 </template>
 
@@ -453,7 +453,8 @@
 			},
 			//网页授权
 			webAuthConfirm(){
-				this.$webAuth.getUserOpenid();
+				let url = encodeURIComponent(window.location.href)
+				this.$webAuth.getUserOpenid(url);
 			},
 			async cmccVote(item) {
 				this.$refs.smsAlert.hideSms()

+ 1 - 1
pages/index/home.vue

@@ -61,7 +61,7 @@
 									<text class="title text-cut-1">{{item.title}}</text>
 								</view>
 							</view>
-							<rich-text class="desc text-cut-2" :nodes="decodeURIComponent(item.content).replace(/<[^>]*>/g, '')">
+							<rich-text class="desc text-cut-2" style="max-height: 80rpx;" :nodes="decodeURIComponent(item.content)">
 							</rich-text>
 						</view>
 						<view class="bottom" style="width: 100%;">

+ 1 - 7
pages/payResult/payResult.vue

@@ -1,9 +1,8 @@
 <template>
 	<view class="payResult">
 		<u-icon name="checkmark-circle-fill" :color="vuex_theme.bgColor" style="margin-top: 50rpx;" size="100"></u-icon>
-		<view>订单支付成功</view>
+		<view>支付成功</view>
 		<u-button  shape="circle" :custom-style="customStyle" style="margin-top: 50rpx;" @click="goback">返回</u-button>
-		<u-button  shape="circle" :custom-style="customStyle" style="margin-top: 50rpx;" @click="goback1">返回</u-button>
 	</view>
 </template>
 
@@ -43,11 +42,6 @@
 				}				
 				var postData = JSON.stringify(mchData);
 				parent.postMessage(postData, 'https://payapp.weixin.qq.com')
-			},
-			goback1() {
-				uni.redirectTo({
-				    url: decodeURIComponent(this.vuex_redirect_url)
-				});
 			}
 		}
 	}

+ 2 - 2
pages/rank/rank.vue

@@ -47,7 +47,7 @@
 										<!-- <u-avatar :src="item.userImg?item.userImg:'/static/icon/unlogin.png'" size="56">
 										</u-avatar>
 										<text class="margin-left-10">{{item.username || '暂无信息'}}</text> -->
-										<rich-text class="desc text-cut-2" :nodes="decodeURIComponent(item.content).replace(/<[^>]*>/g, '')">
+										<rich-text  class="desc text-cut-2" style="max-height: 80rpx;" :nodes="decodeURIComponent(item.content)">
 										</rich-text>
 									</view>
 
@@ -100,7 +100,7 @@
 										<!-- <u-avatar :src="item.userImg?item.userImg:'/static/icon/unlogin.png'" size="56">
 										</u-avatar>
 										<text class="margin-left-10">{{item.username || '暂无信息'}}</text> -->
-										<rich-text class="desc text-cut-2" :nodes="decodeURIComponent(item.content).replace(/<[^>]*>/g, '')">
+										<rich-text class="desc text-cut-2" style="max-height: 80rpx;" :nodes="decodeURIComponent(item.content)">
 										</rich-text>
 									</view>
 									<view class="flex justify-between">

+ 3 - 2
pages/shop/detail.vue

@@ -113,7 +113,7 @@
 		>
 		</u-modal>
 		
-		<webAuthAlert ref="webAuthAlert" @confirm="webAuthConfirm"></webAuthAlert>
+		<webAuthAlert ref="webAuthAlert" tipsContent="首次现金兑换商品需用户授权" @confirm="webAuthConfirm"></webAuthAlert>
 		
 		<login ref="login" @signIn="signIn" @phoneSuccess="phoneSuccess"></login>
 		<toast ref="toast"></toast>
@@ -359,7 +359,8 @@
 			},
 			//网页授权
 			webAuthConfirm(){
-				this.$webAuth.getUserOpenid();
+				let url = encodeURIComponent(window.location.href)
+				this.$webAuth.getUserOpenid(url);
 			},
 			cancel(){
 				this.exchangeShow = false;

+ 1 - 3
utils/webAuth.js

@@ -1,11 +1,9 @@
 let webAuth = {}
-let url = encodeURIComponent(window.location.href);
-// let url = 'https://vote.guosen-fumao.cn';
 let appId = 'wxdad9b7d8e7750457';
 // let appId = 'wx8c652a58fa587178'; //测试号
 let scope = 'snsapi_userinfo'
 
-webAuth.getUserOpenid = () => {
+webAuth.getUserOpenid = (url) => {
 	console.log("url",decodeURIComponent(url))
 	window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${url}&response_type=code&scope=${scope}&state=STATE#wechat_redirect`
 }