MONSTER-ygh 1 år sedan
förälder
incheckning
7ab6078ea0

+ 4 - 0
common/apiurl.js

@@ -65,6 +65,10 @@ const apiurl = {
 		url: '/order/orderWithdraw/selectById',
 		type: 'get'
 	},
+	marketPersonsUpdatePwd: {
+		url: '/member/marketPersons/updatePwd',
+		type: 'post'
+	},
 	/**
 	 * @author ygh
 	 * @date 2023-12-14

+ 11 - 6
common/config.js

@@ -6,17 +6,19 @@ const node_dev = process.env.H_NODE_ENV;
 let baseUrl = null // 后端服务接口
 let upFileUrl= null // 后端上传接口
 let staticUrl= null // 静态文件地址
-
+let redirectUri = null
 // 本地
 // #ifdef MP
-	baseUrl='https://greatadmin.dev.gztjy.top/serviceapi';
-	upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
-	staticUrl='https://miniores.hw.hongweisoft.com/greattransition/staticfile';
+	baseUrl='https://greath5.dev.gztjy.top/serviceapi';
+	upFileUrl='';
+	staticUrl='';
+	redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
 // #endif
 // #ifdef H5
 	baseUrl='/api';
-	upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
+	upFileUrl='';
 	staticUrl='https://greath5.dev.gztjy.top/distribution/static/';
+	redirectUri= 'https://greath5.dev.gztjy.top/distribution/pages/login/index'
 // #endif
 
 // 打包用的
@@ -30,6 +32,7 @@ if (node_dev =='development') { // 分销测试
  	baseUrl='https://greath5.dev.gztjy.top/serviceapi';
  	upFileUrl='h';
  	staticUrl='https://greath5.dev.gztjy.top/distribution/static/';
+	redirectUri= 'https://greath5.dev.gztjy.top/distribution/pages/login/index'
  // #endif
 }
 if (node_dev =='production') { // 分销正式
@@ -37,11 +40,13 @@ if (node_dev =='production') { // 分销正式
  	baseUrl='';
  	upFileUrl='';
  	staticUrl='';
+	redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
  // #endif
  // #ifdef H5
  	baseUrl='https://h5.wdzzgs.com/serviceapi';
  	upFileUrl='';
  	staticUrl='https://h5.wdzzgs.com/distribution/static/';
+	redirectUri= 'https://h5.wdzzgs.com/distribution/pages/login/index'
  // #endif
 }
 
@@ -49,7 +54,7 @@ if (node_dev =='production') { // 分销正式
 const commonConfig = {
 	wxAppid: '', // 测试wxAppid
 	appid: 'wx6490eaa0d20d2be2', // 公众号
-	redirectUri: encodeURIComponent('https://h5.wdzzgs.com/distribution/pages/login/index'), //
+	redirectUri: encodeURIComponent(redirectUri), //
 	baseUrl: baseUrl, // 服务器地址
 	uploadFileUrl: upFileUrl, // 上传文件路径
 	staticUrl:staticUrl,

+ 5 - 5
common/request.js

@@ -18,8 +18,8 @@ module.exports = (vm) => {
 		// 根据custom参数中配置的是否需要token,添加对应的请求头
 		if(!config?.custom?.auth) {
 			// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
-			// config.header.token = vm.vuex_user_info.token;
-			config.header.Authorization = `Bearer ${vm.vuex_user_info.accessToken}`;
+			// config.header.token = vm.distribution_user_info.token;
+			config.header.Authorization = `Bearer ${vm.distribution_user_info.accessToken}`;
 		}
 		if(!config?.custom?.noload){
 			showFullScreenLoading()
@@ -34,10 +34,10 @@ module.exports = (vm) => {
 		let backUrl = pages[pages.length - 1].route;
 		let options =uni.$u.queryParams( pages[pages.length - 1].options);
 		let fullBackUrl = backUrl+options;
-		uni.setStorageSync('backUrl',fullBackUrl);
+		uni.setStorageSync('backUrlDistribution',fullBackUrl);
 		tryHideFullScreenLoading()
-		uni.setStorageSync('lifeData',{}); // 清除缓存
-		uni.$u.vuex('vuex_user_info', {});
+		uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+		uni.$u.vuex('distribution_user_info', {});
 		console.log("dfsfsdf")
 		uni.reLaunch({
 			url: "/pages/login/index"

+ 3 - 1
components/customNavbar/customNavbar.vue

@@ -143,7 +143,9 @@
 			// 返回上一页面
 			back() {
 				console.log("返回上一页!")
-				uni.navigateBack()
+				uni.navigateBack({
+					delta: 1
+				})
 			},
 			// 微信小程序返回首页
 			homePage() {

+ 20 - 5
components/customPromotionCode/customPromotionCode.vue

@@ -15,12 +15,15 @@
 			<!-- #ifdef H5 -->
 			<view class="promotion-code-info">
 				<canvas v-if="!posterSrc" canvas-id="canvas" class="canvas promotion-canvas"></canvas>
-				<image class="promotion-code-info-img" v-else :src="posterSrc"></image>
+				<image class="promotion-code-info-img" mode="scaleToFill" v-else :src="posterSrc"></image>
 			</view>
 			<!-- #endif -->
 			<view class="promotion-code-but" @click="saveImage()">
 				保存至相册
 			</view>
+			<view v-if="!posterShow" class="promotion-code-clear" @click="show=false">
+				<u-icon name="close-circle-fill" color="var(--gd-bgm-color)" size="28"></u-icon>
+			</view>
 		</view>
 	</u-popup>
 </template>
@@ -101,31 +104,36 @@ import { nextTick } from "vue"
 								ctx.drawImage(img1, 0, 0, w, h);
 
 								// 绘制海报二维码
-								ctx.drawImage(img2, w-80, h-80, 80, 80);
+								ctx.drawImage(img2, w-80, h-80, 70, 70);
 
 								// 绘制完成后导出图片并显示
 								ctx.draw(false, () => {
 									uni.canvasToTempFilePath({
 										canvasId: 'canvas',
 										success: res3 => {
+											this.posterShow = false
 											this.posterSrc = res3.tempFilePath;
 											this.posterSrcType = 'local';
 										},
 										fail: err => {
+											this.posterShow = false
 											console.error(err);
 										},
 									}, this);
 								});
 							},
 							fail: err2 => {
+								this.posterShow = false
 								console.error(err2);
 							},
 						});
 					},
 					fail: err1 => {
+						this.posterShow = false
 						console.error("err1===",err1);
 					},
 					complete: () => {
+						this.posterShow = false
 						uni.hideLoading()
 					}
 				});
@@ -151,7 +159,7 @@ import { nextTick } from "vue"
 							console.log(systemInfo); // 打印输出系统信息对象
 							if (systemInfo.ua.indexOf('MicroMessenger') != -1 ) {
 							    uni.showToast({
-							    	title: "微信浏览器不可下载,可长图片保存",
+							    	title: "微信浏览器不可下载,可长图片保存",
 							    	icon: 'none',
 									duration: 4000
 							    })
@@ -244,10 +252,12 @@ import { nextTick } from "vue"
 		display: flex;
 		flex-direction: column;
 		align-items: center;
+		position: relative;
 		.promotion-code-info {
-			width: 574rpx;
-			height: 1042rpx;
+			width: 650rpx;
+			height: 1142rpx;
 			flex-shrink: 0;
+			box-sizing: border-box;
 			.canvas {
 				width: 100%;
 				height: 100%;
@@ -271,5 +281,10 @@ import { nextTick } from "vue"
 			font-family: SourceHanSansCN, SourceHanSansCN;
 			font-weight: 500;
 		}
+		.promotion-code-clear {
+			position: absolute;
+			top: -10rpx;
+			right: -10rpx;
+		}
 	}
 </style>

+ 9 - 2
pages.json

@@ -13,7 +13,7 @@
 		{
 			"path": "pages/main/index",
 			"style": {
-				"navigationBarTitleText": "全分享",
+				"navigationBarTitleText": "全分享",
 				"navigationStyle": "custom"
 			}
 		},
@@ -69,7 +69,7 @@
 		{
 			"path": "pages/publicSharingDetails/index",
 			"style": {
-				"navigationBarTitleText": "全分享详情",
+				"navigationBarTitleText": "全分享详情",
 				"navigationStyle": "custom"
 			}
 		},
@@ -79,6 +79,13 @@
 				"navigationBarTitleText": "设置密码",
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/resetpass/index",
+			"style": {
+				"navigationBarTitleText": "修改密码",
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"globalStyle": {

+ 1 - 1
pages/balance/index.vue

@@ -117,7 +117,7 @@
 				try{
 					let res = await this.$u.api.withdrawInfo({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {

+ 8 - 8
pages/cash/index.vue

@@ -125,16 +125,16 @@
 		},
 		onLoad() {
 			// #ifdef H5
-			window.addEventListener('popstate', this.browserBack)
+			//window.addEventListener('popstate', this.browserBack)
 			// #endif
 		},
 		onUnload() {
 			// #ifdef H5
-			window.removeEventListener("popstate", this.browserBack);
+			//window.removeEventListener("popstate", this.browserBack);
 			// #endif
 		},
 		onShow() {
-			this.statusBarHeight = getApp().globalData.statusBarHeight
+			//this.statusBarHeight = getApp().globalData.statusBarHeight
 			this.getWithdrawInfo()
 
 		},
@@ -183,7 +183,7 @@
 				try {
 					let res = await this.$u.api.withdrawInfo({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 
 					if (res && res.code === 200) {
@@ -238,7 +238,7 @@
 				try {
 					let res = await this.$u.api.marketPersons({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						oldPassword: this.password
 					})
 
@@ -260,7 +260,7 @@
 				try {
 					let res = await this.$u.api.orderWithdraw({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						"withdrawType": "wechat",
 						"withdrawTotal": this.moneyValue,
 						"serviceAmount": 1,
@@ -328,11 +328,11 @@
 						if (res.confirm) {
 							// 用户选择留在此页,不进行任何操作
 						} else if (res.cancel) {
-							window.history.back(); // 使用window.history.back()返回上一页
+							//window.history.back(); // 使用window.history.back()返回上一页
 						}
 					}
 				});
-				window.history.replaceState(null, null, document.URL); // 保留此行代码
+				//window.history.replaceState(null, null, document.URL); // 保留此行代码
 			},
 		}
 	}

+ 1 - 1
pages/cashList/index.vue

@@ -136,7 +136,7 @@
 					this.$refs.customScrollList.showPullUp = true
 					let res = await this.$u.api.orderWithdrawList({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						pageNum: 1,
 						pageSize: 10,
 						serialType: this.serialType

+ 1 - 1
pages/cashPrompt/index.vue

@@ -80,7 +80,7 @@
 				try{
 					let res = await this.$u.api.orderWithdrawSelectById({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						id: this.params.id
 					})
 					

+ 1 - 1
pages/consume/index.vue

@@ -118,7 +118,7 @@
 					this.$refs.customScrollList.showPullUp = true
 					let res = await this.$u.api.marketPersonsSerial({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						pageNum: 1,
 						pageSize: 10,
 						serialType: this.serialType

+ 4 - 4
pages/index/index.vue

@@ -4,7 +4,7 @@
 			<!-- 头部主要内容 开始 -->
 			<view class="index-content-header">	
 				<customNavbar 
-				title="全分享" 
+				title="全分享" 
 				bgColor="rgba(0,0,0,0)"
 				:is-left="false"
 				:customNavbarInfo='{}'>
@@ -70,7 +70,7 @@
 	export default {
 		data() {
 			return {
-				title: '全分享',
+				title: '全分享',
 				loading: false,
 				statusBarHeight: 0, // 状态栏安全距离
 				retailIndex: [], // 剧目列表
@@ -173,13 +173,13 @@
 				try{
 					let res = await this.$u.api.getRetailQrcode({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {
 						this.$refs.customPromotionCode.initData(res.data)
 						// #ifdef H5
-						window.history.pushState(null, null, document.URL)
+						//window.history.pushState(null, null, document.URL)
 						// #endif
 					} 
 				}catch(e){

+ 2 - 2
pages/index/search.vue

@@ -64,7 +64,7 @@
 	export default {
 		data() {
 			return {
-				title: '全分享',
+				title: '全分享',
 				loading: false,
 				statusBarHeight: 0, // 状态栏安全距离
 				retailIndex: [], // 剧目列表
@@ -174,7 +174,7 @@
 			 * @data 2023-12-20
 			 */
 			navigateToFun(url,data) {
-				navigateTo(url)
+				navigateTo(url,{performId:data.id})
 			},
 		}
 	}

+ 3 - 3
pages/invitationStatistics/index.vue

@@ -45,8 +45,8 @@
 				statusBarHeight: 0, // 状态栏安全距离
 				tool: [ // 我的工具
 					{ title: "邀请总人数",num: 0,decimals:0 },
-					{ title: "待核销",num: 0,decimals:2 },
-					{ title: "已核销",num: 0,decimals:2 },
+					{ title: "待核销票数",num: 0,decimals:0 },
+					{ title: "已核销票数",num: 0,decimals:0 },
 				],
 				retailStatistics: {}, // 统计信息
 			}
@@ -82,7 +82,7 @@
 				try{
 					let res = await this.$u.api.getRetailStatistics({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {

+ 34 - 25
pages/login/index.vue

@@ -7,7 +7,7 @@
 			</view>
 			<view class="login-info">
 				<view class="login-info-box">
-					<text class="login-info-title">账号密码登</text>
+					<text class="login-info-title">账号密码登</text>
 					<view class="login-info-form">
 						<u--form 
 						labelWidth="0" 
@@ -63,6 +63,7 @@
 				logoUrl: this.$commonConfig.staticUrl + "login/logo.png",
 				loading: false,
 				code: null,
+				h5OpenId: null,
 				form: {
 					name: '',
 					password: '',
@@ -89,7 +90,7 @@
 		},
 		onLoad(e) {
 			// #ifdef H5
-			if(this.vuex_user_info && this.vuex_user_info.accessToken){
+			if(this.distribution_user_info && this.distribution_user_info.accessToken){
 				this.personsLoginCheck()
 			}else {
 				if(!e.code) { // 微信第三方登录失败
@@ -123,24 +124,23 @@
 			 */
 			async login(){
 				try{
-					let openid = ''
 					// #ifdef H5
 					const node_dev = process.env.H_NODE_ENV;
-					if(node_dev){
+					if(node_dev && !this.h5OpenId){
 						let wxinfo = await this.$u.api.wxinfoH5({code:this.code});
-						openid = wxinfo.data.openid;
+						this.h5OpenId = wxinfo.data.openid;
 					}
 					// #endif
 					let res = await this.$u.api.login({
 						"mobile": this.form.name,
 						"password": this.form.password,
-						"h5OpenId": openid
+						"h5OpenId": this.h5OpenId
 					})
 					if(res && res.code ===200) {
 						this.loading = false
 						if(res.data && res.data.accessToken){
-							this.$u.vuex('vuex_user_info', res.data);
-							let backUrl = uni.getStorageSync('backUrl')
+							this.$u.vuex('distribution_user_info', res.data);
+							let backUrl = uni.getStorageSync('backUrlDistribution')
 							console.log("backUrl===",backUrl)
 							if(backUrl && backUrl != '/pages/login/index') {
 								uni.reLaunch({
@@ -153,24 +153,33 @@
 							}
 						} else {
 							// 清空用户数据缓存
-							uni.setStorageSync('lifeData',{}); // 清除缓存
-							this.$u.vuex('vuex_user_info', {});
-							this.redirectToAuth()
+							uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+							this.$u.vuex('distribution_user_info', {});
+							this.$set(this.form,'password','')
+							if(!this.h5OpenId) {
+								this.redirectToAuth()
+							}
 						}
 					} else {
 						// 清空用户数据缓存
-						uni.setStorageSync('lifeData',{}); // 清除缓存
-						this.$u.vuex('vuex_user_info', {});
-						this.redirectToAuth()
+						uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+						this.$u.vuex('distribution_user_info', {});
+						this.$set(this.form,'password','')
+						if(!this.h5OpenId) {
+							this.redirectToAuth()
+						}
 					}
 					
 				}catch(e){
 					//TODO handle the exception
 					console.error("e===",e)
 					this.loading = false
-					uni.setStorageSync('lifeData',{}); // 清除缓存
-					this.$u.vuex('vuex_user_info', {});
-					this.redirectToAuth()
+					uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+					this.$u.vuex('distribution_user_info', {});
+					this.$set(this.form,'password','')
+					if(!this.h5OpenId) {
+						this.redirectToAuth()
+					}
 				}
 			},
 			/**  公众号 微信授权登录  */
@@ -190,8 +199,8 @@
 					})
 					if(res && res.code ===200) {
 						if(res.data && res.data.accessToken){
-							this.$u.vuex('vuex_user_info', res.data);
-							let backUrl = uni.getStorageSync('backUrl')
+							this.$u.vuex('distribution_user_info', res.data);
+							let backUrl = uni.getStorageSync('backUrlDistribution')
 							if(backUrl) {
 								uni.reLaunch({
 									url: backUrl
@@ -203,20 +212,20 @@
 							}
 						} else {
 							// 清空用户数据缓存
-							uni.setStorageSync('lifeData',{}); // 清除缓存
-							this.$u.vuex('vuex_user_info', {});
+							uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+							this.$u.vuex('distribution_user_info', {});
 							this.redirectToAuth()
 						}
 					} else {
 						// 清空用户数据缓存
-						uni.setStorageSync('lifeData',{}); // 清除缓存
-						this.$u.vuex('vuex_user_info', {});
+						uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+						this.$u.vuex('distribution_user_info', {});
 						this.redirectToAuth()
 					}
 				}catch(e){
 					//TODO handle the exception
-					uni.setStorageSync('lifeData',{}); // 清除缓存
-					this.$u.vuex('vuex_user_info', {});
+					uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+					this.$u.vuex('distribution_user_info', {});
 					this.redirectToAuth()
 				}
 				

+ 22 - 12
pages/me/index.vue

@@ -18,6 +18,9 @@
 				<view class="me-userinfo-info">
 					<view><text>分销商名称:</text><text>{{ userInfo && userInfo.name }}</text></view>
 					<view><text>负责人:</text><text>{{ userInfo && userInfo.contact }}</text></view>
+					<view class="me-userinfo-info-set" @click="navigateToFun({url: '/pages/resetpass/index'})">
+						<u-icon size="22" name="setting" color="#ffffff" ></u-icon>
+					</view>
 				</view>
 			</view>
 			<!-- userInfo内容 结束 -->
@@ -104,7 +107,7 @@
 				try{
 					let res = await this.$u.api.getInfo({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {
@@ -122,7 +125,7 @@
 				try{
 					let res = await this.$u.api.getRetailQrcode({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {
@@ -157,10 +160,10 @@
 				});
 			},
 			async loginOut() {
-				// console.log("vuex_user_info===",this.vuex_user_info)
+				// console.log("distribution_user_info===",this.distribution_user_info)
 				// return
-				// if(!this.vuex_user_info.accessToken) {
-				// 	this.$u.vuex('vuex_user_info', {});
+				// if(!this.distribution_user_info.accessToken) {
+				// 	this.$u.vuex('distribution_user_info', {});
 				// 	uni.reLaunch({
 				// 		url: "/pages/login/index"
 				// 	})
@@ -171,8 +174,8 @@
 					let res = await this.$u.api.loginOut({})
 					this.loading = false
 					if(res && res.code ===200) {
-						uni.setStorageSync('lifeData',{}); // 清除缓存
-						this.$u.vuex('vuex_user_info', {});
+						uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+						this.$u.vuex('distribution_user_info', {});
 						uni.reLaunch({
 							url: "/pages/login/index"
 						})
@@ -181,8 +184,8 @@
 						// 	icon: "none",
 						// 	title: res.msg
 						// })
-						uni.setStorageSync('lifeData',{}); // 清除缓存
-						this.$u.vuex('vuex_user_info', {});
+						uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+						this.$u.vuex('distribution_user_info', {});
 						uni.reLaunch({
 							url: "/pages/login/index"
 						})
@@ -195,8 +198,8 @@
 					// 	icon: "none",
 					// 	title: "退出失败"
 					// })
-					uni.setStorageSync('lifeData',{}); // 清除缓存
-					this.$u.vuex('vuex_user_info', {});
+					uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+					this.$u.vuex('distribution_user_info', {});
 					uni.reLaunch({
 						url: "/pages/login/index"
 					})
@@ -214,7 +217,7 @@
 						if (res.confirm) {
 							// 用户选择留在此页,不进行任何操作
 						} else if (res.cancel) {
-							window.history.back(); // 使用window.history.back()返回上一页
+							//window.history.back(); // 使用window.history.back()返回上一页
 						}
 					}
 				});
@@ -270,6 +273,7 @@
 			font-size: 28rpx;
 			font-family: SourceHanSansCN, SourceHanSansCN;
 			padding: 0 50rpx;
+			position: relative;
 			>view:nth-child(1) {
 				display: flex;
 				font-weight: 600;
@@ -299,6 +303,12 @@
 					width: calc( 100% - 112rpx );
 				}
 			}
+			.me-userinfo-info-set {
+				position: absolute;
+				top: 10px;
+				right: 10px;
+				z-index: 99;
+			}
 		}
 	}
 	/** userInfo内容 结束  **/

+ 3 - 3
pages/passwordSet/index.vue

@@ -90,7 +90,7 @@
 					this.value = ''
 					let res = await this.$u.api.withdrawInfo({
 						noSign: 1,
-						userid: this.vuex_user_info.userId
+						userid: this.distribution_user_info.userId
 					})
 					
 					if(res && res.code ===200) {
@@ -116,7 +116,7 @@
 					})
 					let res = await this.$u.api.marketPersons({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						oldPassword: this.value
 					})
 					
@@ -153,7 +153,7 @@
 				try{
 					let res = await this.$u.api.payset({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						newPassword: this.value
 					})
 					

+ 11 - 2
pages/publicSharingDetails/index.vue

@@ -20,7 +20,8 @@
 						<text>票务信息</text>
 						<view>
 							<view>
-								<text>票务类型</text>
+								<text>票务名称</text>
+								<text>座位类型</text>
 								<text>销售价</text>
 								<text>分销价</text>
 								<text>佣金</text>
@@ -30,6 +31,7 @@
 							v-for="(item,index) in perform.brokerageList" 
 							:key="index">
 								<text>{{item.goodsName}}</text>
+								<text>{{item.seatTypeName}}</text>
 								<text>{{item.originalSalePrice}}</text>
 								<text>{{item.salePrice}}</text>
 								<text>{{item.brokeragePrice}}</text>
@@ -66,7 +68,7 @@
 					this.perform = {}
 					let res = await this.$u.api.getRetailInfo({
 						noSign: 1,
-						userid: this.vuex_user_info.userId,
+						userid: this.distribution_user_info.userId,
 						performId: this.performId,
 					})
 					if(res && res.code ===200) {
@@ -187,6 +189,13 @@
 							justify-content: center;
 							align-items: center;
 						}
+						
+						>text:nth-child(1) {
+							flex: 1.5;
+						}
+						>text:nth-child(2) {
+							flex: 1.5;
+						}
 					}
 					view:nth-child(2n+1) {
 						background: rgba(255, 255, 255, 1);

+ 184 - 0
pages/resetpass/index.vue

@@ -0,0 +1,184 @@
+<template>
+	<view class="pages">
+		<u-navbar
+			title="修改密码"
+			:placeholder="true"
+			:autoBack="true"
+			 :safeAreaInsetTop="true"
+			 bgColor="#ED0000"
+			 :titleStyle="{color:'#fff'}"
+			 leftIconColor="#fff"
+		>
+		</u-navbar>
+		<view class="form-wrap">
+			<u--form labelPosition="left" labelWidth="70px" :model="form"  :rules="rules" ref="uForm" >
+				<u-form-item label="旧密码" prop="oldPassword" borderBottom ref="oldPassword" >
+					<u--input
+						v-model="form.oldPassword"
+						border="none"
+						placeholder="请输入旧密码"
+						:customStyle="inputCustomStyle"
+					></u--input>
+				</u-form-item>
+				<u-form-item label="新密码" prop="password" borderBottom ref="password" >
+					<u--input
+						v-model="form.password"
+						border="none"
+						:password="true"
+						placeholder="请输入新密码"
+						:customStyle="inputCustomStyle"
+					></u--input>
+				</u-form-item>
+				<u-form-item label="确认密码" prop="comfpassword" :borderBottom="false" ref="comfpassword" >
+					<u--input
+						v-model="form.comfpassword"
+						border="none"
+						:password="true"
+						placeholder="请确认新密码"
+						:customStyle="inputCustomStyle"
+					></u--input>
+				</u-form-item>
+			</u--form>
+		</view>
+		<u-button
+			@click="submit"
+			text="确定" 
+			type="primary" 
+			shape="circle" 
+			:customStyle="{'margin':'60rpx 32rpx',height:'80rpx','box-sizing':'border-box',width:'auto'}"
+			color="linear-gradient(90deg, #FF7979 0%, #ED0000 100%)">
+		</u-button>
+	</view>
+</template>
+
+<script>
+	export default {
+		
+		data() {
+			return {
+				form:{
+					oldPassword:'',
+					password:'',
+					comfpassword:'',
+				},
+				
+				rules: {
+					oldPassword: {
+						type: 'string',
+						required: true,
+						message: '请输入旧密码',
+						trigger: ['blur', 'change']
+					},
+					password: [
+						{
+							type: 'string',
+							required: true,
+							message: '请输入新密码',
+							trigger: ['blur', 'change']
+						},
+						{
+							min: 6,
+							max: 10,
+							message: '长度在6-10个字符之间',
+							trigger: 'blur',
+						},
+					],
+					comfpassword: [
+						{
+							type: 'string',
+							required: true,
+							message: '请确认密码',
+							trigger: ['blur', 'change']
+						},
+						{
+							validator: (rule, value, callback) => {
+								if (value === '') {
+									callback(new Error('请再次输入密码'));
+								} else if (value !== this.form.password) {
+									callback(new Error('两次输入密码不一致!'));
+								} else {
+									callback();
+								}
+							},
+							trigger: 'blur',
+						}
+					],
+				},
+				inputCustomStyle:{
+					height:'98rpx',
+					'border-color':'#eee',
+					'padding-left':'30rpx',
+					'box-sizing':'border-box',
+				}
+			}
+		},
+		onShow() {
+		},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules)
+		},
+		onLoad() {
+
+		},
+		methods: {
+			chekPass(){
+				console.log('chekPass---',this.form);
+				return new Promise((resolve, reject)=>{
+					if(!password){
+						 reject('needAuth');
+					}
+				})
+			},
+			async submit(){
+				let that = this;
+				// console.log('form',this.form);
+				this.$refs.uForm.validate().then(res => {
+					// let chekPassResult = await this.chekPass();
+					// return
+					// uni.$u.toast('校验通过')
+					const param = {
+						oldPassword:this.form.oldPassword,
+						newPassword:this.form.password
+					}
+					this.$u.api.marketPersonsUpdatePwd(param).then(res=>{
+						// console.log('res',res.data);
+						this.$u.vuex('distribution_user_info', {});
+						uni.showToast({
+							title:res.msg,
+							icon:'success',
+							duration: 3000
+						})
+						setTimeout(()=>{
+							that.redirectToAuth();
+						},500)
+					}).catch(err=>{
+						console.log('login',err);
+					})
+				}).catch(errors => {
+					uni.$u.toast('请正确填写表单')
+				})
+			},
+			redirectToAuth() {
+				uni.setStorageSync('lifeDataDistribution',{}); // 清除缓存
+				uni.setStorageSync('backUrlDistribution','')
+				uni.reLaunch({
+					url: "/pages/login/index"
+				})
+			},
+		}
+	}
+</script>
+<style>
+page{
+	background-color: #F4F5F7;
+}
+</style>
+<style lang="scss" scoped>
+.form-wrap{
+	margin: 40rpx 32rpx;
+	padding: 20rpx 40rpx;
+	background-color: #fff;
+	box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(226,226,226,0.5);
+	border-radius: 24rpx;
+}
+</style>

+ 9 - 15
store/index.js

@@ -2,43 +2,37 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 Vue.use(Vuex)
 
-let lifeData = {};
+let lifeDataDistribution = {};
 
 try{
-	// 尝试获取本地是否存在lifeData变量,第一次启动APP时是不存在的
-	lifeData = uni.getStorageSync('lifeData');
+	// 尝试获取本地是否存在lifeDataDistribution变量,第一次启动APP时是不存在的
+	lifeDataDistribution = uni.getStorageSync('lifeDataDistribution');
 }catch(e){
 	
 }
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
 
-let saveStateKeys = ['vuex_member_info', 'vuex_user_info','vuex_wechatOpenid'];
+let saveStateKeys = ['distribution_user_info'];
 
 // 保存变量到本地存储中
 const saveLifeData = function(key, value){
 	// 判断变量名是否在需要存储的数组中
 	if(saveStateKeys.indexOf(key) != -1) {
-		// 获取本地存储的lifeData对象,将变量添加到对象中
-		let tmp = uni.getStorageSync('lifeData');
-		// 第一次打开APP,不存在lifeData变量,故放一个{}空对象
+		// 获取本地存储的lifeDataDistribution对象,将变量添加到对象中
+		let tmp = uni.getStorageSync('lifeDataDistribution');
+		// 第一次打开APP,不存在lifeDataDistribution变量,故放一个{}空对象
 		tmp = tmp ? tmp : {};
 		tmp[key] = value;
 		// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
-		uni.setStorageSync('lifeData', tmp);
+		uni.setStorageSync('lifeDataDistribution', tmp);
 	}
 }
 const store = new Vuex.Store({
 	state: {
 		// 如果上面从本地获取的lifeData对象下有对应的属性,就赋值给state中对应的变量
 		// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
-		vuex_member_info: lifeData.vuex_member_info ? lifeData.vuex_member_info : {mobile:''},
-		vuex_user_info: lifeData.vuex_user_info ? lifeData.vuex_user_info : {},
-		vuex_wechatOpenid:lifeData.vuex_wechatOpenid ? lifeData.vuex_wechatOpenid : '',
-		cartGoods:[],//购物车商品
-		creditGoods:[],//积分商品
-		buyNowGoods:[],//立即购买商品
-		// vuex_version: '1.0.1',
+		distribution_user_info: lifeDataDistribution.distribution_user_info ? lifeDataDistribution.distribution_user_info : {},
 	},
 	mutations: {
 		$uStore(state, payload) {

+ 3 - 3
utils/againToken.js

@@ -3,10 +3,10 @@ export function againToken($u, openid,userId) {
 	$u.api.reLogin({wechatOpenid: openid}).then((userData) => {
 		if(userData && userData.code ===200) {
 			if(userData.data && userData.data.accessToken){
-				$u.vuex('vuex_user_info', userData.data);
+				$u.vuex('distribution_user_info', userData.data);
 			} else {
 				// 清空用户数据缓存
-				$u.vuex('vuex_user_info', {});
+				$u.vuex('distribution_user_info', {});
 				$u.vuex('vuex_member_info', {});
 			}
 			$u.api.memberInfo({id:userId}).then(({code, data, msg}) => {
@@ -21,7 +21,7 @@ export function againToken($u, openid,userId) {
 			})
 		} else {
 			// 清空用户数据缓存
-			$u.vuex('vuex_user_info', {});
+			$u.vuex('distribution_user_info', {});
 			$u.vuex('vuex_member_info', {});
 		}
 	})