Bladeren bron

权限 数据分离上线

wenjie 3 maanden geleden
bovenliggende
commit
b0559f67b7

+ 1 - 1
api/common.js

@@ -241,7 +241,7 @@ export function homeSearch(data) {
 // 城市列表
 export function getCityList(data) {
   return request({
-	  url:`/productcenterserver/region/childRegionsList?parentId=${data.parentId}&page=${data.page}&size=${data.size}`,
+	  url:`/productcenterserver/region/childRegionsList?name=${data.name}&parentId=${data.parentId}&page=${data.page}&size=${data.size}`,
     // url: `/productcenterserver/region/list?name=${data.name}&type=City&page=${data.page}&size=${data.size}`,
     method: 'post',
   })

+ 1 - 1
components/zs-banner/index.vue

@@ -109,7 +109,7 @@
 				})
 			},
 			getBanner(){
-				getBanner({currentPage:1,pageSize:10,belongType:2}).then(res=>{
+				getBanner({currentPage:1,pageSize:10,platformType:1}).then(res=>{
 					if(res.state == 'Success'){
 						this.bannerList = res.content.records
 						this.theme = this.bannerList[0].colour

+ 2 - 1
detail/discountsDetail/index.vue

@@ -79,7 +79,8 @@
 				banner: '',
 				menuId:'',
 				query: {
-					platform:'520100',//慧研学520100 中数5201000 贵大 p-0001
+					platform:'p-0002',//慧研学p-0002 中数p-0003 贵大 p-0001
+					platformType:1,
 					district:'',
 					menuId: '',
 					queryName: '',

+ 1 - 1
detail/goodsDetail/index.vue

@@ -304,7 +304,7 @@
 			},
 			detail(goodsId){
 				this.pageLoading = true
-				detail({goodsId,resource:2,platform:'520100'}).then(res=>{
+				detail({goodsId,resource:2,platform:'p-0002'}).then(res=>{
 					this.pageLoading = false
 					if(res.state == 'Success'){
 						this.info = res.content

+ 1 - 1
detail/shopDetail/shopDetail.vue

@@ -294,7 +294,7 @@
 			getGoods(){
 				if(this.status == 'noMore') return
 				this.status = 'loading'
-				getGoods({currentPage:this.currentPage,status:3,shopId:this.info.shopId,platform:'520100'}).then(res=>{
+				getGoods({currentPage:this.currentPage,status:3,shopId:this.info.shopId,platform:'p-0002',platformType:1}).then(res=>{
 					if(res.state == 'Success'){
 						this.buyList = this.buyList.concat(res.content.records)
 						console.log(res.content.total,this.buyList.length);

+ 1 - 1
hotel/cityList.vue

@@ -27,7 +27,7 @@
 		data() {
 			return {
 				query:{
-					parentId:'520100',//慧研学520100 中数5201000 贵大 p-0001
+					parentId:'p-0002',//慧研学p-0002 中数p-0003 贵大 p-0001
 					name:'',
 					page:0,
 					size:30,

+ 74 - 11
invite/invite.vue

@@ -24,18 +24,67 @@
 			</view>
 
 			<view class="rules-content">
-				<text>
+				<view class="sub-title">
 					一、返利激励机制
-					1. 订购奖励:当被推荐的新用户首次订购慧研学惠生活任意档会员,推荐者将从新用户订购期内的月会员费中获得10%的返利激励;
-					2. 持续激励:被推荐的新用户持续订购会员,推荐者每月都能享受返利;
-					3. 推荐人数无上限:每个慧研学惠生活用户可以推荐的新用户人数没有上限;
-					4. 新用户在取消会员订购后,推荐者停止获得返利;
-					5. 新用户在取消会员订购后再次订购会员,原推荐者无法继续获得返利;
+				</view>
+				<view class="label">
+					1. 订购奖励:
+				</view>
+				<view class="value">
+					当被推荐的新用户首次订购慧研学惠生活任意档会员,推荐者将从新用户订购期内的月会员费中获得10%的返利激励;
+				</view>
+				<view class="label">
+					2. 持续激励:
+				</view>
+				<view class="value">
+					被推荐的新用户持续订购会员,推荐者每月都能享受返利;
+				</view>
+				<view class="label">
+					3. 推荐人数无上限:
+				</view>
+				<view class="value">
+					每个慧研学惠生活用户可以推荐的新用户人数没有上限;
+				</view>
+				<view class="label">
+					4. 停止激励:
+				</view>
+				<view class="value">
+					新用户在取消会员订购后,推荐者停止获得返利;
+				</view>
+				<view class="label">
+					5. 取消后再订购:
+				</view>
+				<view class="value">
+					新用户在取消会员订购后再次订购会员,原推荐者无法继续获得返利;
+				</view>
+				<view class="sub-title">
 					二、返利发放条件与时间
-					1. 新用户定义:被邀请者须是邀请前未注册、登录过慧研学惠生活平台的用户。
-					2. 确认订购:新用户被邀请后的48小时内订购成功,且在5天内无退订行为,系统将自动确认发放返利资格。
-					3. 发放时间:当月返利将在次月发放至慧研学惠生活个人账号。
-					5. 提现时间:每月25日,推荐者可进行上月返利的提现操作。
+				</view>
+				<view class="label">
+					1. 新用户定义:
+				</view>
+				<view class="value">
+					被邀请者须是邀请前未注册、登录过慧研学惠生活平台的用户。
+				</view>
+				<view class="label">
+					2. 确认订购:
+				</view>
+				<view class="value">
+					新用户被邀请后的48小时内订购成功,且在5天内无退订行为,系统将自动确认发放返利资格。
+				</view>
+				<view class="label">
+					3. 发放时间:
+				</view>
+				<view class="value">
+					当月返利将在次月发放至慧研学惠生活个人账号。
+				</view>
+				<view class="label">
+					4. 提现时间:
+				</view>
+				<view class="value">
+					每月25日,推荐者可进行上月返利的提现操作。
+				</view>
+				<text>
 					*最终解释权归本平台所有。
 				</text>
 			</view>
@@ -261,7 +310,21 @@ export default {
 		font-size: 36rpx;
 		font-weight: Bold;
 		margin-top: 30rpx;
-
+		background: #FFFFFF;
+		border-radius: 16rpx;
+		padding: 30rpx 24rpx;
+		.sub-title{
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+			margin-bottom: 20rpx;
+			margin-top: 20rpx;
+		}
+		.label{
+			color: #222222!important;
+			margin: 20rpx 0 10rpx 0;
+			font-size: 28rpx;
+		}
 		.rules-content {
 			color: #CCCCCC;
 			font-size: 28rpx;

+ 3 - 1
luckyDraw/index.vue

@@ -323,7 +323,9 @@
 			},
 			// 抽奖结束触发回调
 			endCallBack(prize) {
-				this.isPrize = false
+				setTimeout(()=>{
+					this.isPrize = false
+				},200)
 				console.log(prize)
 				if(JSON.stringify(prize) == '{}') return
 				this.initLogs()

+ 20 - 1
my/memberCenter/index.vue

@@ -44,7 +44,7 @@
 			</view>
 
 			<u-grid :border="false" col="3">
-				<u-grid-item v-for="(item,d) in list1" :key="d">
+				<u-grid-item v-for="(item,d) in list1" :key="d" @click="handleJump(item)">
 					<image class="icon" :src="item.equityImg" mode=""></image>
 					<text class="title">{{item.equityName}}</text>
 					<text class="desc">{{item.equityDetail}}</text>
@@ -318,6 +318,25 @@
 				});
 				
 			},
+			handleJump(item){
+				if(this.userInfo.setMealCode != item.setMealCode) return uni.showToast({
+					title:'不是当前会员',
+					icon:'none'
+				})
+				if(item.equityName === '会员专属活动'){
+					uni.switchTab({
+						url:'/pages/activity/index'
+					})
+				}else if(item.equityName === '专属客服'){
+					uni.navigateTo({
+						url:'/my/service/index'
+					})
+				}else if(item.equityName === '专享折扣价'){
+					uni.switchTab({
+						url:'/pages/index/index'
+					})
+				}
+			},
 			openPop(item){
 				console.log(item);
 				if(this.userInfo.setMealCode != item.setMealCode) return uni.showToast({

+ 2 - 2
pages/index/index.vue

@@ -613,8 +613,8 @@
 			},
 			getCityList() {
 				return new Promise((resolve,reject)=>{
-					// parentId:'520100',//慧研学520100 中数5201000 贵大 p-0001
-					getCityList({parentId:'520100',name:'',page:0,size:999}).then(res=>{
+					// parentId:'p-0002',//慧研学p-0002 中数p-0003 贵大 p-0001
+					getCityList({parentId:'p-0002',name:'',page:0,size:999}).then(res=>{
 						if(res.state == 'Success'){
 							let city = this.city.replace('市','')
 							res.content.content.forEach(item=>{

+ 1 - 1
pay/pay.vue

@@ -159,7 +159,7 @@
 						couponId: this.info.couponId,
 						"goodsId": goodsId,
 						"shopId": shopId,
-						platform:'520100',
+						platform:'p-0002',
 						"userId": JSON.parse(uni.getStorageSync('userInfo')).userId
 					}).then(res => {
 						uni.hideLoading()

+ 1 - 1
signUp/makeOut.vue

@@ -487,7 +487,7 @@
 					let that = this
 					if (!this.payData.timeStamp) {
 						createOrder({
-							code:520100,
+							code:'p-0002',
 							activityId: this.activity.id,
 							serviceId,
 							channel:'ZhongShu',

+ 15 - 3
study/index.vue

@@ -58,7 +58,7 @@
 							</view>
 							<view class="price">
-							{{item.realPrice}}
+							{{item | filterPrice}}
 							</view>
 							<view class="old-price">
 							¥{{item.marketPrice}}
@@ -93,7 +93,7 @@
 							</view>
 							<view class="price">
-							{{item.realPrice}}
+							{{item | filterPrice}}
 							</view>
 							<view class="old-price">
 							¥{{item.marketPrice}}
@@ -135,10 +135,21 @@
 				tab:0,
 				tabList:[],
 				userId:'',
-				query:{userId:this.userId,currentPage:1,pageSize:10,belongType:2},
+				query:{userId:'',currentPage:1,pageSize:10,belongType:2},
 				background:false
 			}
 		},
+		filters: {
+			filterPrice: function(val) {
+				if(val.prices){
+					let arr = JSON.parse(val.prices).filter(item=>item.platformType==1)
+					
+					return arr[0].price
+				}else{
+					return val.realPrice
+				}
+			}
+		},
 		methods: {
 			gotoPage(url){
 				uni.navigateTo({
@@ -282,6 +293,7 @@
 			if(uni.getStorageSync('userInfo')){
 				this.getResult()
 				this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
+				this.query.userId = this.userId
 			}
 		},
 		onPageScroll(e) {

+ 6 - 2
study/pay/order.vue

@@ -13,7 +13,7 @@
 					</view>
 					<view class="priceColumn">
 						<view class="price">
-							<text class="unit">¥</text>{{ info.realPrice }}
+							<text class="unit">¥</text>{{ info.platformPrice?info.platformPrice.price:info.realPrice }}
 						</view>
 						<view class="goodsNum">
 							x{{ realPay.reservePersons.length }}
@@ -110,6 +110,9 @@ import {
 	payDetails
 } from '@/api/payment.js'
 import { studyOrderCreat } from '@/api/study.js'
+import {
+		calculate
+	} from '@/api/order.js';
 import guid from '@/utils/guid.js'
 export default {
 	data() {
@@ -197,11 +200,12 @@ export default {
 				title: '计算中'
 			})
 			return new Promise((resolve, reject) => {
-				studyCalculate({
+				calculate({
 					couponId: this.info.couponId,
 					"goodsId": goodsId,
 					"shopId": shopId,
 					"userId": JSON.parse(uni.getStorageSync('userInfo')).userId,
+					platform:'p-0002',
 					"number": this.realPay.reservePersons.length
 				}).then(res => {
 					uni.hideLoading()

+ 2 - 2
study/studyGoodsDetail.vue

@@ -9,7 +9,7 @@
 				<view class="price">
 					<view class="unit">¥</view>
 					<view class="price">
-						{{ info.realPrice }}
+						{{ info.platformPrice?info.platformPrice.price:info.realPrice }}
 					</view>
 				</view>
 				<view class="old-price">
@@ -243,7 +243,7 @@ export default {
 		detail(goodsId) {
 			this.pageLoading = true
 			this.goodsId = goodsId
-			detail({ goodsId, resource: 2 }).then(res => {
+			detail({ goodsId, resource: 2,platform:'p-0002' }).then(res => {
 				this.pageLoading = false
 				if (res.state == 'Success') {
 					this.info = res.content

+ 2 - 1
trip/index/index.vue

@@ -759,7 +759,8 @@ export default {
 			if (JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0 && JSON.parse(uni.getStorageSync('userInfo')).setMealCode) {
 			} else {
 				uni.showModal({
-					title: '此商品需要开通会员才能使用',
+					// title: '此商品需要开通会员才能使用',
+					title: '此功能享受下单后返利,需开通会员权益后使用',
 					cancelText: '下次再说',
 					confirmText: '立即开通',
 					success(res) {

+ 1 - 1
utils/request.js

@@ -20,7 +20,7 @@ export let request = (options) => {
 			data: options.data || {},
 			header: {
 				accessToken: uni.getStorageSync('token'),
-				code: '520100', //慧研学520100 中数5201000 贵大 p-0001
+				code: 'p-0002', //慧研学p-0002 中数p-0003 贵大 p-0001
 			},
 			success: (res) => {
 				if (res.statusCode !== 200) {