Browse Source

Signed-off-by: zhaoxw <287208713@qq.com>
hahaha

zhaoxw 4 years ago
parent
commit
6e36fbd03a

+ 5 - 2
config/api.js

@@ -1,6 +1,8 @@
-const WX_API_BASE = 'https://www.qianjiadi.com/'
+// const WX_API_BASE = 'https://www.qianjiadi.com/'
 // const WX_API_BASE = 'https://hubw.jihengcc.cn/'
 // const WX_API_BASE = 'http://hubw.jihengcc.cn:17080/'
+// const WX_API_BASE = 'http://ch.jihengcc.cn:17080/'
+const WX_API_BASE = 'https://www.jihengcc.cn/'
 // const WX_API_BASE = 'http://172.18.1.227:8765/'
 
 module.exports = {
@@ -18,7 +20,8 @@ module.exports = {
 	getShopRegisterInfo: WX_API_BASE + 'app/auth/merchant/findMerchantInfo',
 	//  获取商铺注册状态
 	getShopRegisterStatu: WX_API_BASE + 'app/auth/merchant/findMerchantAuditStatus',
-
+    // 获取后台管理账号密码
+	getManageInfo: WX_API_BASE + 'app/auth/merchant/backgroundUserInfo',
 
 	//  获取本月销售额
 	getShopSellInfo: WX_API_BASE + 'app/merchants/productOrderSumMouth',

+ 1 - 1
pages/index/authorize.vue

@@ -34,7 +34,7 @@
 			},
 			//  登录
 			goToSignIn() {
-				NET.request(API.authorizeSignIn, {}, 'POST').then(res => {
+				NET.request(API.authorizeSignIn, {authCode: this.authorizeCode}, 'GET').then(res => {
 					this.$refs.uTips.show({
 						title: '授权码登录成功,请重新登录',
 						type: 'success',

+ 1 - 1
pages/index/home.vue

@@ -70,7 +70,7 @@
 			}
 		},
 		onLoad() {
-			// _self = this;
+			_self = this; // 浏览器调试时需要打开,微信调试时需关闭
 			if (!uni.getStorageSync('token')) {
 				uni.navigateTo({
 					url: '/pages/index/index'

+ 1 - 0
pages/index/index.vue

@@ -100,6 +100,7 @@
 						})
 					}
 				}).catch(error => {
+					console.log('error登录异常', error)
 					this.$refs.uTips.show({
 						title: '微信登录授权失败',
 						type: 'warning',

+ 2 - 1
pages/index/register.vue

@@ -114,7 +114,8 @@
 					}
 					this.fileList = res.data.storeImgUrl.split(',')
 					this.defaultList1 = [{
-						url: res.data.logo
+						url: res.data.logo,
+						// url: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1603877862802&di=e1d4201e637fcd3e21a9b52fbfc1b771&imgtype=0&src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202005%2F25%2F20200525131219_ntnpg.thumb.400_0.jpeg"
 					}]
 					this.defaultList2 = res.data.storeImgUrl.split(',').map(site => {
 						return {

+ 20 - 0
pages/user/index.vue

@@ -56,8 +56,14 @@
 				<view class="item-btn-text">关于我们</view>
 				<view class="iconfont iconfangxiang"></view>
 			</view>
+			<view class="item-btn" @click="modalShow=true">
+				<view class="iconfont iconguanyu item-btn-icon"></view>
+				<view class="item-btn-text">后台管理信息</view>
+				<view class="iconfont iconfangxiang"></view>
+			</view>
 		</view>
 		<u-top-tips ref="uTips"></u-top-tips>
+		<u-modal v-model="modalShow" title="后台管理信息" :content="'账号:'+manageInfo.account+',密码'+ manageInfo.password"></u-modal>
 	</view>
 </template>
 
@@ -73,10 +79,20 @@
 					userName: '',
 					headImage: '',
 				},
+				manageInfo: {},
+				modalShow: false
 			}
 		},
 		onLoad() {
 			this.userData = uni.getStorageSync("userData")
+			NET.request(API.getManageInfo, {}, 'POST').then(res => {
+				this.manageInfo = res.data
+			}).catch(error => {
+				this.$refs.uTips.show({
+					title: error.data.msg,
+					type: 'warning',
+				})
+			})
 		},
 		methods: {
 			//  我的订单
@@ -115,6 +131,10 @@
 					url: '/pagesMain/aboutUs'
 				});
 			},
+			// 获取后台管理账号密码
+			manageInfoClick(){
+				this.modalShow = true
+			}
 		}
 	}
 </script>

+ 7 - 6
pagesMain/authorizeForm.vue

@@ -14,8 +14,8 @@
 			</u-checkbox-group>
 		</view>
 		<view class="form-handle">
-			<u-button type="success" shape="circle" :ripple="true" @click="creatAuthorize" class="handle-custom">确认授权</u-button>
-			<u-button type="error" shape="circle" :ripple="true" @click="modalShow1 = true" class="handle-custom2">删除该授权用户</u-button>
+			<u-button type="success" shape="circle" :ripple="true" @click="setAuthorize" class="handle-custom">确认授权</u-button>
+			<u-button type="error" shape="circle" :ripple="true" @click="modalShow2 = true" class="handle-custom2">删除该授权用户</u-button>
 		</view>
 		<u-modal v-model="modalShow1" content="是否确认授予该授权用户对应权限" @confirm="setAuthorize" :async-close="true"
 		 :show-cancel-button="true"></u-modal>
@@ -49,8 +49,8 @@
 					merchantNickname: res.data.merchantNickname,
 					merchantPhone: res.data.merchantPhone,
 				}
-				let role = res.data.allRoleInfos.map(stie => {
-					return site.roleId
+				let role = res.data.roleInfos.map(stie => {
+					return stie.roleId
 				}).join(',')
 				this.checkList = res.data.allRoleInfos.map(stie => {
 					return {
@@ -61,8 +61,9 @@
 					}
 				})
 			}).catch(error => {
+				console.log(error)
 				this.$refs.uTips.show({
-					title: error.data.msg,
+					title: error.msg,
 					type: 'warning',
 				})
 			})
@@ -71,7 +72,7 @@
 			//  设置授权用户权限
 			setAuthorize() {
 				NET.request(API.setAuthorize + this.userInfo.userId, {
-					roleInfos: this.checkList.filter(site => site.check).map(site => {
+					roleInfos: this.checkList.filter(site => site.checked).map(site => {
 						return {
 							roleName: site.roleName,
 							roleId: site.roleId,

+ 1 - 1
pagesMain/authorizeList.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="authorize-head">授权用户</view>
 		<view class="authorize-box">
-			<view class="authorize-card" v-for="(item, index) in authorizeList" :key="index">
+			<view class="authorize-card" v-for="(item, index) in authorizeList" :key="index" @click="handleAuthorize(item)">
 				<cover-image class="authorize-image" :src="item.merchantImg"></cover-image>
 				<view class="authorize-info">
 					<view class="authorize-name">{{item.merchantNickname}}</view>

+ 2 - 1
pagesMain/logisticsDeatil.vue

@@ -29,13 +29,14 @@
 					company: '顺丰',
 					logisticCode: res.data.logisticCode,
 				}
-				this.expressList = res.data.traces.map(site => {
+				this.expressList = res.data.traces && res.data.traces.map(site => {
 					return {
 						title: site.acceptStation,
 						desc: site.acceptTime
 					}
 				})
 			}).catch(error => {
+				console.log('物流追踪',error)
 				this.$refs.uTips.show({
 					title: error.data.msg,
 					type: 'warning',