Przeglądaj źródła

前端小程序 sdy

zhongtianhaoyuan 3 lat temu
rodzic
commit
57aba48054

+ 5 - 1
App.vue

@@ -13,7 +13,11 @@
 		},
 		onLaunch: function() {
 			// #ifdef APP-PLUS
-			appUpdate()
+			let type = uni.getSystemInfoSync().platform
+			console.log(type)
+			if(type == "android"){
+				appUpdate()
+			}
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';

+ 69 - 82
common/appUpdate.js

@@ -3,91 +3,78 @@
 
 import * as config from '../config'
 export default function appUpdate() {
-	var data ={
-			appid: plus.runtime.appid,
-			version: plus.runtime.version,
-			imei: "1"
-		}
 		
-	let baseUrl = config.def().baseUrl
-	let _gp = 'user'
-	let _mt = 'updateAppVersion'
+	let baseUrlNew = config.def().baseUrlNew
 	uni.request({
-		url: baseUrl + '/m.api',
-		data: {
-			...data,
-			_gp,
-			_mt
-		},
-		method: 'POST',
-		header: {
-			'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
-			'ACCESSTOKEN': 'accessToken'
-		},
-		success: (res) => {
-			
-			console.log("uni.request update success",res)
-			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
-				let client_version = wgtinfo.version
-				var flag_update = client_version.split(".").splice(0, 2).join(".") != res.data.data.version.split(".").splice(0, 2)
-					.join(".")
-				var flag_hot = (Number(client_version.split(".")[2]) < Number(res.data.data.version.split(".")[2])) & !flag_update
-				console.log("client_version",client_version) 
-				console.log("flag_update",flag_update)
-				console.log("flag_hot",flag_hot)
-
-				if (flag_update) {
-					console.log("更新弹窗")
-					// 提醒用户更新
-					uni.showModal({
-						title: '更新提示',
-						content: res.data.data.note,
-						success: (showResult) => {
-							if (showResult.confirm) {
-								plus.nativeUI.toast("正在准备环境,请稍后!");
-								console.log(res.data.data.url, )
-								var dtask = plus.downloader.createDownload(res.data.data.url, {
-									method: 'GET',
-									filename: '_doc/update/'
-								}, function(d, status) {
-									if (status == 200) {
-										var path = d.filename; //下载apk
-										plus.runtime.install(path); // 自动安装apk文件
-									} else {
-										plus.nativeUI.alert('版本更新失败:' + status);
-									}
-								});
-								dtask.start();
+	    url: baseUrlNew + '/appVersion/selectInfo',
+	    data: {
+	    	appid: plus.runtime.appid,
+	    	version: plus.runtime.version,
+	    	imei: "1"
+	    },
+	    method: 'GET',
+	    success: (res) => {			
+	    	if (res.statusCode === 200) {
+				console.log("uni.request update success",res)
+				plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
+					let client_version = wgtinfo.version
+					var flag_update = client_version.split(".").splice(0, 2).join(".") != res.data.data.version.split(".").splice(0, 2)
+						.join(".")
+					var flag_hot = (Number(client_version.split(".")[2]) < Number(res.data.data.version.split(".")[2])) & !flag_update
+					console.log("client_version",client_version) 
+					console.log("flag_update",flag_update)
+					console.log("flag_hot",flag_hot)
+				
+					if (flag_update) {
+						console.log("更新弹窗")
+						// 提醒用户更新
+						uni.showModal({
+							title: '更新提示',
+							content: res.data.data.note,
+							success: (showResult) => {
+								if (showResult.confirm) {
+									plus.nativeUI.toast("正在准备环境,请稍后!");
+									console.log(res.data.data.url, )
+									var dtask = plus.downloader.createDownload(res.data.data.url, {
+										method: 'GET',
+										filename: '_doc/update/'
+									}, function(d, status) {
+										if (status == 200) {
+											var path = d.filename; //下载apk
+											plus.runtime.install(path); // 自动安装apk文件
+										} else {
+											plus.nativeUI.alert('版本更新失败:' + status);
+										}
+									});
+									dtask.start();
+								}
 							}
-						}
-					})
-				} else if (flag_hot) {
-					console.log("热更新") 
-					uni.downloadFile({
-						url: res.data.data.wgtUrl,
-						success: (downloadResult) => {
-							console.log(downloadResult.tempFilePath)
-							if (downloadResult.statusCode === 200) {
-								plus.nativeUI.toast(`正在热更新!${res.data.data.versionCode}`);
-								plus.runtime.install(downloadResult.tempFilePath, {
-									force: false
-								}, function() {
-									plus.nativeUI.toast("热更新成功");
-									plus.runtime.restart();
-								}, function(e) {
-									console.log(e)
-									plus.nativeUI.toast(`热更新失败:${e.message}`);
-								});
+						})
+					} else if (flag_hot) {
+						console.log("热更新") 
+						uni.downloadFile({
+							url: res.data.data.wgtUrl,
+							success: (downloadResult) => {
+								console.log(downloadResult.tempFilePath)
+								if (downloadResult.statusCode === 200) {
+									plus.nativeUI.toast(`正在热更新!${res.data.data.versionCode}`);
+									plus.runtime.install(downloadResult.tempFilePath, {
+										force: false
+									}, function() {
+										plus.nativeUI.toast("热更新成功");
+										plus.runtime.restart();
+									}, function(e) {
+										console.log(e)
+										plus.nativeUI.toast(`热更新失败:${e.message}`);
+									});
+								}
 							}
-						}
-					});
-				}
-
-			});
-
-
-
-
-		}
+						});
+					}
+				
+				});
+	    	}
+	    }
 	})
+
 }

Plik diff jest za duży
+ 0 - 0
components/uview-ui/libs/util/city.js


+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "1.0.9",
-    "versionCode" : 109,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

+ 7 - 7
pageD/warehousings/ex_warehouse.vue

@@ -305,7 +305,7 @@
 		},
 		onShow() {	
 			this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
-				compId: '2710b21efc1e4393930c5dc800010dc4',
+				compId: 'cb271576afa8418fb7a2f328adc1ecc2',
 				warehouseType: 1,
 			}).then(res => {
 				if (res.data.code == 200) {
@@ -430,11 +430,11 @@
 				this.warehouseIndex1 = e.detail.value
 				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
 				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
-				// for (var i = 0; i < this.binNumber.length; i++) {
-				// 	if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
-				// 		this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
-				// 	}
-				// }
+				for (var i = 0; i < this.binNumber.length; i++) {
+					if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
+						this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
+					}
+				}
 			},
 
 			DateChange(e) {
@@ -722,7 +722,7 @@
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
-				// this.WarehouseInOutInfo.warehouseType=0
+				// this.WarehouseInOutInfo.baseId=0
 				this.WarehouseInOutInfo.taskType = "出库任务"
 				uni.showLoading({
 					title: "正在提交"

+ 9 - 3
pageD/warehousings/warehousings.vue

@@ -215,7 +215,7 @@ import upload from '@/components/upload.vue';
 					contractNo: {},
 					carNo: {},
 				},
-				//pinIndex: '不限(默认)',
+				pinIndex: 0,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
 				ruIndex: '采购入库',
@@ -264,7 +264,7 @@ import upload from '@/components/upload.vue';
 				}
 			},
 			onShow(){
-				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:'2710b21efc1e4393930c5dc800010dc4',warehouseType:1,}).then(res => {
+				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {compId:'cb271576afa8418fb7a2f328adc1ecc2',warehouseType:1,}).then(res => {
 				 if(res.data.code==200){
 					 var arr=[]
 					 for(var i=0;i<res.data.data.length;i++){
@@ -340,7 +340,13 @@ import upload from '@/components/upload.vue';
 			warehouseChange1(e){
 				var id=''
 				this.warehouseIndex1=e.detail.value
-				this.WarehouseInOutInfo.binNumber=this.warehouse1[this.warehouseIndex1]
+				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
+				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
+				for (var i = 0; i < this.binNumber.length; i++) {
+					if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
+						this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
+					}
+				}
 			},
 			DateChange(e) {
 				this.WarehouseInOutInfo.inOutDate=e.year+'-'+e.month+'-'+e.day

+ 9 - 1
pages.json

@@ -469,7 +469,15 @@
 				"enablePullDownRefresh": false
 			}
 
-		}
+		},{
+            "path" : "pages/user/fankui",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
 
 	],
 	"subpackages": [{

+ 2 - 2
pages/public/code.vue

@@ -171,9 +171,9 @@
 					})
 					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
 					    if(res.data.code==200){
-							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "佳屹农",
+							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",
-username: "jyn"}).then(res1 => {
+username: "13333333333"}).then(res1 => {
 								uni.setStorageSync('pcUserInfo', res1.data.data)
 							})
 							uni.setStorageSync('userInfo', res.data.data)

+ 2 - 2
pages/public/login_account_number.vue

@@ -99,9 +99,9 @@
 				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
 					if(res.data.code==200){
 						uni.setStorageSync('userInfo', res.data.data)
-						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "佳屹农",
+						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",
-username: "jyn"}).then(res1 => {
+username: "13333333333"}).then(res1 => {
 							uni.setStorageSync('pcUserInfo', res1.data.data)
 						})
 						that.$store.commit('login', res.data.data)

+ 2 - 2
pages/public/register.vue

@@ -222,9 +222,9 @@
 							
 							if(res.data.code==200){
 								// pc登录
-								this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "佳屹农",
+								this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",
-username: "jyn"}).then(res1 => {
+username: "13333333333"}).then(res1 => {
 									uni.setStorageSync('pcUserInfo', res1.data.data)
 								})
 								uni.setStorageSync('userInfo', res.data)

+ 2 - 2
pages/public/reset.vue

@@ -144,9 +144,9 @@
 						})
 						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(req => {
 						if(res.data.code==200){
-							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "佳屹农",
+							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",
-username: "jyn"}).then(res1 => {
+username: "13333333333"}).then(res1 => {
 								uni.setStorageSync('pcUserInfo', res1.data.data)
 							})
 							uni.setStorageSync('userInfo', req.data.data)

+ 30 - 0
pages/user/fankui.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		<suggest @submit="submit"></suggest>
+	</view>
+</template>
+
+<script>
+	import suggest from "@/components/bert-suggest/suggest.vue"
+	export default {
+	    components: { suggest },
+	    methods: {
+	        submit(v) {
+				uni.showModal({
+					title: '提示',
+					content: "感谢您提供反馈意见,我们将立即联系您",
+					showCancel: false,
+					confirmText: '确定',
+					success: () => {
+						uni.navigateBack()
+					}
+				})
+	            console.log(v)
+	        }
+	    }
+	}
+</script>
+
+<style>
+
+</style>

+ 12 - 0
pages/user/user.vue

@@ -41,6 +41,13 @@
 					</view>
 					<!-- <image src="../../static/img/sign/authentication@3x.png" mode=""></image> -->
 				</view>
+				<view class='cu-item' @click='fankui'>
+					<view>
+						<image src="../../static/img/sign/authentication@2x.png" class="sign"></image>
+						<text class="text-grey">意见反馈</text>
+					</view>
+					<view class = 'tip_text cuIcon-right' ></view>
+				</view>
 				<!-- <view class='cu-item' @click='scanCode'>
 							<view>
 								<text class="cuIcon-scan icon text-grey"></text>
@@ -272,6 +279,11 @@
 			}
 		},
 		methods: {
+			fankui(){
+				uni.navigateTo({
+					url: `/pages/user/fankui`
+				})
+			},
 			zhibo() {
 				uni.navigateTo({
 					url: `/pageB/video/broadcast`

+ 5 - 2
websocket_sdk.js

@@ -262,9 +262,12 @@ export default class Websocket {
 				uni.request({
 					url: baseUrlNew + '/auth/api/loginEnhanced',
 					data: {
-						companyName: "佳屹农",
+						// companyName: "佳屹农",
+						// password: "y123456",
+						// username: "jyn"
+						companyName: "易粮易运",
 						password: "y123456",
-						username: "jyn"
+						username: "13333333333"
 					},
 					method: 'POST',
 					success: (res) => {						

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików