Browse Source

前端gjy

gjy 3 years ago
parent
commit
359e71a795
3 changed files with 13 additions and 6 deletions
  1. 1 1
      config/index.js
  2. 9 2
      pages/grain_pulse/enter.vue
  3. 3 3
      pages/grain_pulse/home.vue

+ 1 - 1
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.110:8090/',
+	baseUrlNew: 'http://192.168.1.120:8090/',
 	// baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 9 - 2
pages/grain_pulse/enter.vue

@@ -83,6 +83,9 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	import upload from '@/components/upload.vue';
 	export default {
 		components: {
@@ -124,6 +127,9 @@
 
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
 		methods: {
 			getImgUrl(res){
 				console.log(res)
@@ -159,7 +165,7 @@
 			navBack() {
 				this.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',this.deptList).then(res => {
 					if(res.data.code==200){
-						uni.navigateBack(1)
+						uni.navigateBack(-1)
 					}
 				})
 			},
@@ -184,13 +190,14 @@
 				this.deptList.mainBusinessType=this.mainBusinessType.toString()
 				this.deptList.longitude='40.22077'
 				this.deptList.latitude='116.23128'
+				this.deptList.createPhone=this.userInfo.phone
 				uni.showModal({
 					content: "确定提交企业信息??",
 					showCancel: true,
 					confirmText: '确定',
 					success: function(res) {
 						if (res.confirm) {
-							this.show = true
+							that.show = true
 							// that.$api.doRequest('post','/settledCompanyInfo/api/addSettledCompanyInfo',that.deptList).then(res => {
 							// 	if(res.data.code==200){
 									

+ 3 - 3
pages/grain_pulse/home.vue

@@ -90,9 +90,9 @@
 				}
 			})
 		},
-		onLoad(){
-			
-		},
+		onLoad(val){
+		   this.position = val.position
+		  },
 		methods: {
 			mainBusinessTypecahnge(item){
 				if(item.name!='全部'){