Преглед на файлове

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

wangchao преди 2 години
родител
ревизия
dbb15c67be

+ 19 - 2
App.vue

@@ -6,10 +6,20 @@
 		mapMutations
 	} from 'vuex';
 	import * as config from '@/config'
-	import appUpdate from 'common/appUpdate.js'
+	// import appUpdate from 'common/appUpdate.js'
+	// #ifdef APP-PLUS
+	import APPUpdate, {
+		getCurrentNo
+	} from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+	// #endif
 	import app_push from './components/APPPush/app_push.js'
 	const pushLive = uni.requireNativePlugin('service-keep-live');
 	export default {
+		data(){
+			return{
+				version:"",
+			}
+		},
 		methods: {
 			...mapMutations(['login']),
 			nvueRequst: function(method, url, data, header) {
@@ -276,10 +286,17 @@
 
 		},
 		onShow: function() {
+			// #ifdef APP-PLUS
+			getCurrentNo(res => {
+				// 进页面获取当前APP版本号(用于页面显示)
+				this.version = res.versionName;
+			});
+			// #endif
 			let type = uni.getSystemInfoSync().platform
 			console.log(type)
 			if (type == "android") {
-				// appUpdate()
+				// AppUpdate()
+				APPUpdate()
 			}
 			console.log('App Show')
 		},

+ 1 - 1
common/appUpdate.js

@@ -5,7 +5,7 @@ import * as config from '../config'
 export default function appUpdate() {
 		
 	uni.request({
-	    url: 'http://api1.eliangeyun.com/appVersion/selectInfo',
+	    url: 'https://api2.eliangeyun.com/appVersion/selectInfo',
 	    data: {
 	    	appid: plus.runtime.appid,
 	    	version: plus.runtime.version,

+ 103 - 0
config/componentConfig.js

@@ -0,0 +1,103 @@
+/**** 此文件说明请看注释 *****/
+// 可以用自己项目的请求方法
+// 请求配置说明:https://ext.dcloud.net.cn/plugin?id=822
+// import $http from '@/config/requestConfig';
+/**** 结束 *****/
+const platform = uni.getSystemInfoSync().platform;
+import * as config from '../config'
+
+export default {
+	// 发起ajax请求获取服务端版本号
+	getServerNo: (version, isPrompt = false, callback) => {
+		let httpData = {
+			version: version.versionCode,
+			// 版本名称
+			versionName: version.versionName,
+			// setupPage参数说明(判断用户是不是从设置页面点击的更新,如果是设置页面点击的更新,有不要用静默更新了,不然用户点击没反应很奇怪的)
+			setupPage: isPrompt
+		};
+		if (platform == "android") {
+			httpData.type = 1101;
+		} else {
+			httpData.type = 1102;
+		}
+		/* 接口入参说明
+		 * version: 应用当前版本号(已自动获取)
+		 * versionName: 应用当前版本名称(已自动获取)
+		 * type:平台(1101是安卓,1102是IOS)
+		 */
+		/****************以下是示例*******************/
+		// 可以用自己项目的请求方法(接口自己找后台要,插件不提供
+		const baseUrlNew = config.def().baseUrlNew
+		uni.request({
+			url: baseUrlNew + '/appVersion/selectInfo',
+			data: {
+				appid: plus.runtime.appid,
+				version: plus.runtime.version,
+				imei: "1",
+			},
+			method: 'GET',
+			success: (res) => {
+				console.log(res.data)
+				if (res.data.data && res.data.data.wgtUrl) {
+					res.data.data.versionName = res.data.data.version
+					res.data.data.versionInfo = res.data.data.note
+					res.data.data.downloadUrl = res.data.data.wgtUrl
+					// 兼容之前的版本(updateType是新版才有的参数)
+					if (res.data.data.updateType) {
+						callback && callback(res.data.data);
+					} else {
+						if (res.forceUpdate) {
+							res.updateType = "forcibly";
+						} else {
+							res.updateType = "solicit";
+						}
+						callback && callback(res.data.data);
+					}
+				} else if (isPrompt) {
+					uni.showToast({
+						title: "暂无新版本",
+						icon: "none"
+					});
+				}
+			}
+		})
+		//      $http.get("api/common/v1/app_version", httpData,{
+		//          isPrompt: isPrompt
+		//      }).then(res => {
+		// console.log("新更新res",res)
+		//          /* res的数据说明
+		//           * | 参数名称        | 一定返回     | 类型        | 描述
+		//           * | -------------|--------- | --------- | ------------- |
+		//           * | versionCode     | y        | int       | 版本号        |
+		//           * | versionName     | y        | String    | 版本名称      |
+		//           * | versionInfo     | y        | String    | 版本信息      |
+		//           * | updateType      | y        | String    | forcibly = 强制更新, solicit = 弹窗确认更新, silent = 静默更新 |
+		//           * | downloadUrl     | y        | String    | 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接)  |
+		//           */
+		//          if (res && res.downloadUrl) {
+		//              // 兼容之前的版本(updateType是新版才有的参数)
+		//              if(res.updateType){
+		//                  callback && callback(res);
+		//              } else {
+		//                  if(res.forceUpdate){
+		//                      res.updateType = "forcibly";
+		//                  } else {
+		//                      res.updateType = "solicit";
+		//                  }
+		//                  callback && callback(res);
+		//              }
+		//          } else if (isPrompt) {
+		//              uni.showToast({
+		//                  title: "暂无新版本",
+		//                  icon: "none"
+		//              });
+		//          }
+		//      });
+		/****************以上是示例*******************/
+	},
+	// 弹窗主颜色(不填默认粉色)
+	appUpdateColor: "f00",
+	// 弹窗图标(不填显示默认图标,链接配置示例如: '/static/demo/ic_attention.png')
+	appUpdateIcon: ''
+}

+ 2 - 4
config/index.js

@@ -7,11 +7,9 @@ const dev = {
 	// baseUrlNew: 'http://192.168.1.122:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	// baseUrlNew1: 'http://192.168.110.82:9527/',
-	baseUrlNew1: 'https://api2.eliangeyun.com/',
-	// baseUrlNew: 'http://api1.eliangeyun.com/',
+	baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 3 - 1
manifest.json

@@ -124,7 +124,9 @@
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>"
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+					"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  ",
+					"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
                 ]
             },
             "icons" : {

+ 1 - 1
pages/reimbursement/request_funds.vue

@@ -168,7 +168,7 @@
 				console.log(e)
 			},
 			uploadClick() {
-				let baseUrlNew = config.def().baseUrlNew1
+				let baseUrlNew = config.def().baseUrlNew
 				uni.chooseImage({
 					success: (chooseImageRes) => {
 						let a = chooseImageRes.tempFiles

+ 93 - 288
pages/shortDistance/short_distance_record.vue

@@ -1,69 +1,58 @@
 <template>
-	<view class="content">
-		<view class="content1-top">
-			<view class="top2">
-				<!-- <view class="left top-content"> -->
-				<view @click='tabcarchange(0)' class='line' :class='searchType==0?"active":""'>全部</view>
-				<view @click='tabcarchange(1)' class='line' :class='searchType==1?"active":""'>未完成</view>
-				<view @click='tabcarchange(3)' class='line' :class='searchType==3?"active":""'>已完成</view>
-				<!-- </view> -->
-
+	<view>
+		<view class="content">
+			<view class="content1-top">
+				<view class="top2">
+					<view class="left">
+						<view @click='tabcarchange(1)' class='line' :class='searchType==1?"active":""'>未完成</view>
+						<view @click='tabcarchange(3)' class='line' :class='searchType==3?"active":""'>已完成</view>
+					</view>
+					<view class="right uni-button">
+						<button v-if="searchType==3" style="line-height: 28px;margin-right: 5px;"
+							class="right-contrent1" @click="requestFunds">请款</button>
+						<button style="line-height: 28px;" class="right-contrent1" @click="trackAddition">添加</button>
+					</view>
+				</view>
 			</view>
 		</view>
-		<mescroll-body ref="mescrollRef" :down="downOption" @down="downCallback" @up="upCallback">
-			<checkbox-group>
-				<view v-for="(item,index) in shortDetail.shortFillingList" :key="index" @click="getInfo(item)"
-					class="list-content">
-					<view class="fuxuankuang" @click.stop="checkedChange(item)" v-if="isShowCheck">
-						<checkbox value="cb" style="transform:scale(0.7)" :disabled="item.travelStatus == '已报销'"
-							:checked="item.check" />
-					</view>
-					<view class="good-list">
-						<view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
-							<view class="flex top">
-								<view class="flex left">
-									<view class="item1">
-										<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}
-										</view>
-										<view class="level2-title" style="font-size: 14px;">
-											{{$helper.filterUrban(item.originCity)}}
-											{{$helper.filterArea(item.originArea)}}
-										</view>
-									</view>
-									<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
-									</image>
-									<view class="item3">
-										<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}
-										</view>
-										<view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
-											{{$helper.filterArea(item.destinationArea)}}
-										</view>
-									</view>
-								</view>
-								<view class="flex">
-									<view class="audit1" v-if="item.travelStatus == '已开始'">已开始</view>
-									<view class="audit2" v-if="item.travelStatus == '已结束'">已结束</view>
-									<view class="audit3" v-if="item.travelStatus == '已报销'">已报销</view>
-								</view>
-							</view>
-							<view class="car-info">
-								<view style="display: flex;">
-									<view class="car-num">车牌号 : {{item.carNo}}</view>
-									<view style="margin-left: 20rpx;" v-if="item.travelStatus != '已开始'">
-										{{item.mileage}}km
-									</view>
-								</view>
+		<view v-for="(item,index) in shortDetail.shortFillingList" :key="index" @click="getInfo(item)">
+			<view class="good-list flex">
+				<view style="margin-top: 20px;width: 30px;">
+					<label v-model="show2" class="fuxuankuang" @click.stop="checkedChange(item)" v-if="searchType==3">
+						<checkbox value="cb" style="transform:scale(0.7)" :disabled="item.travelStatus == '已申请'" />
+					</label>
+				</view>
 
-								<view class="car-date">{{item.createDate.split(" ")[0]}}</view>
+				<view style="padding: 0 35rpx 20rpx 0rpx;">
+					<view class="flex align-center" style="width: 103%;margin-left: 12px;">
+						<view class="item1">
+							<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}</view>
+							<view class="level2-title" style="font-size: 14px;">{{$helper.filterUrban(item.originCity)}}
+										{{$helper.filterArea(item.originArea)}}
+							</view>
+						</view>
+						<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
+						</image>
+						<view class="item3">
+							<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}</view>
+							<view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
+										{{$helper.filterArea(item.destinationArea)}}
 							</view>
-							<view class="qk" v-if="item.travelStatus == '已结束'">
-								<view class="qkbtn" @click="qkClick(item)">请款</view>
+						</view>
+						<view class="wenzi audit1" v-if="item.travelStatus">{{item.travelStatus}}</view>
+					</view>
+					<view class="yf-style">
+						<view class="left">
+							<view style='justify-content:space-between;' class="flex">
+								<view style="min-width: 130px;margin-top: 10px;">车牌号 : {{item.carNo}}</view>
+								<view style="width: 90px;margin-top: 12px;">{{item.createDate.split(" ")[0]}}
+								</view>
 							</view>
 						</view>
 					</view>
 				</view>
-			</checkbox-group>
-		</mescroll-body>
+			</view>
+		</view>
 		<view v-if='show1' class="shade">
 			<view class="wrap1">
 				<view class="alert-top">
@@ -75,14 +64,15 @@
 				<view class="c-row">
 					<view class="title2">请款金额</view>
 					<view class="con-list">
-						<input type="digit" v-model='shortDetail.amountRequested' placeholder="请输入请款金额(元)">
-						<view style="width: 0px;margin-left: 162px;margin-top: -20px;"></view></input>
+						<input type="digit" style="width: 100px;margin-left: 60px;"
+							v-model='shortDetail.amountRequested' placeholder="请输入请款金额">
+						<view style="width: 0px;margin-left: 162px;margin-top: -20px;">元</view></input>
 					</view>
 				</view>
 				<view class="c-row">
 					<view class="title2">仓库名称</view>
 					<view class="con-list">
-						<view @click='show=true'>{{shortDetail.warehouseName?shortDetail.warehouseName:"请选择仓库"}}</view>
+						<view @click='show=true'>{{shortDetail.warehouseName}}</view>
 						<u-picker :range="warehouseBaseInfoList" range-key="warehouseName"
 							@confirm='targetLPicker($event)' v-model="show" mode="selector">
 						</u-picker>
@@ -94,149 +84,72 @@
 				<view class="con-list">
 					<u-input class='textarea' v-model="shortDetail.remark" :type="type" :border="border"
 						:height="height" :auto-height="autoHeight" />
-					<!-- <view style='right:10px;bottom:20px;color:#AFB3BF;'>
+					<view style='right:10px;bottom:20px;color:#AFB3BF;'>
 						{{shortDetail.remark.length}}/150个字
-					</view> -->
+					</view>
 				</view>
 				<view @click="close()" class="cancel">取消</view>
 				<view @click='requestFundsSubmit()' class="confirm">确定</view>
 			</view>
 		</view>
-		<view class="bottom-view">
-			<!-- 	<button v-if="searchType==3" style="line-height: 28px;margin-right: 5px;"
-				class="right-contrent1" @click="requestFunds">请款</button> -->
-			<view class="bottom-btn" @click="trackAddition" v-if="!isShowCheck">添加</view>
-			<view class="row2" v-if="isShowCheck">
-				<view class="left" v-if="!isSelectChecked">
-					请选择要请款的记录
-				</view>
-				<view class="left" v-if="isSelectChecked">
-					已选择{{selectTotal}}个
-				</view>
-				<view class="right" v-if="!isSelectChecked">
-					一键请款
-				</view>
-				<view class="right green" @click="yjqkClick" v-if="isSelectChecked">
-					一键请款
-				</view>
-			</view>
-		</view>
 	</view>
 </template>
 
 <script>
-	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
 	export default {
-		mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
 		data() {
 			return {
-				downOption: {
-					auto: false //是否在初始化后,自动执行downCallback; 默认true
-				},
-				selectTotal: 0,
-				isSelectChecked: false,
-				isShowCheck: false,
 				show2: false,
-				searchType: 0,
+				searchType: 1,
 				pageSize: 10,
 				show1: false,
 				show: false,
 				currentPage: 1,
 				shortDetail: {
-					shortFillingList: []
+					shortFillingList: [{
+						destinationProvince: "",
+						carNo: "",
+						originProvince: "",
+						createDate: "",
+						travelStatus: "",
+						mileage: "",
+						sendWarehouse: "",
+						receiveWarehouse: "",
+					}],
+					amountRequested: '',
+					warehouseName: '请选择仓库名称',
+					remark: '',
 				},
-				// shortDetail: {
-				// 	shortFillingList: [{
-				// 		destinationProvince: "辽宁省",
-				// 		destinationCity: "营口市",
-				// 		destinationArea: "鲅鱼圈区",
-				// 		destinationAddress: '鲅鱼圈5号门',
-				// 		carNo: "辽H11111",
-				// 		originProvince: "辽宁省",
-				// 		originCity: "营口",
-				// 		originArea: "鲅鱼圈区",
-				// 		originAddress: '中天昊元',
-				// 		createDate: "2022-01-01 15:30:20",
-				// 		travelStatus: "已开始",
-				// 		totalCost: "233.20",
-				// 		tfc: "60L",
-				// 		check: false
-				// 	}],
-				// 	amountRequested: '',
-				// 	warehouseName: '请选择仓库名称',
-				// 	remark: '',
-				// },
 				warehouseType: '1',
 				warehouseBaseInfoList: [],
 				type: 'textarea',
 				border: true,
 				height: 150,
 				autoHeight: true,
-
-				// infoList:[],
+				
+				infoList:[],
 
 			}
 		},
-
-		onLoad() {},
-		onShow() {
-			// this.getList()
+		onLoad() {
+			this.getWarehouse()
 		},
-		onNavigationBarButtonTap(e) {
-			console.log(e)
-			this.isShowCheck = !this.isShowCheck
-			// this.isSelectChecked = false
-			// 	const index = e.index;
-			// 	if (index == 1) {
-			// 		uni.navigateBack()
-			// 	} else {
-
-			// 		this.naviageToPage("/pages/user/depotAcquisition/grainDeliveryRecord")
-			// 	}
+		onShow() {
+			this.getList()
 		},
 		methods: {
-			// 单条请款
-			qkClick(item) {
-				this.infoList = []
-				this.infoList.push(item)
-				this.show1 = true
-
-			},
-			// 一键请款
-			yjqkClick() {
-				// this.requestFundsSubmit()
-				this.show1 = true
-			},
-			/*下拉刷新的回调 */
-			downCallback() {
-				this.getList(10, 1, 'down')
-			},
-			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
-			upCallback(page) {
-				//联网加载数据
-				this.getList(page.size, page.num, 'up')
-			},
 			checkedChange(item) {
-				item.check = !item.check
-				this.isSelectChecked = false
-				this.selectTotal = 0
-				for (let i = 0; i < this.shortDetail.shortFillingList.length; i++) {
-					if (this.shortDetail.shortFillingList[i].check) {
-						this.isSelectChecked = true
-						this.selectTotal++
-					}
-				}
 				if (item.travelStatus == '已报销') {
 					this.show2 = false
 					this.$api.msg('已报销的不可再选')
 					return
-				} else {
-
+				}else{
 					this.infoList.push(item)
 				}
 			},
 			tabcarchange(searchType) {
 				this.searchType = searchType
+				this.pageSize = 10
 				this.getList()
 			},
 			trackAddition() {
@@ -244,35 +157,17 @@
 					url: '/pages/shortDistance/short_track_addition'
 				})
 			},
-			getList(size, page, type) {
+			getList() {
 				this.$api.doRequest('get', '/shortFillingInfo/selectShortFilling', {
-					pageSize: size,
-					currentPage: page,
+					pageSize: this.pageSize,
+					currentPage: this.currentPage,
 					// pcFlag: 0,
 					searchType: this.searchType,
 					compId: uni.getStorageSync('pcUserInfo').compId,
 					commonId: uni.getStorageSync('pcUserInfo').userId,
 				}).then(res => {
 					if (res.data.code == 200) {
-						uni.showLoading({
-							mask: true,
-							title: '加载中'
-						})
-						this.getWarehouse()
-						if (type == 'down') {
-							this.mescroll.endSuccess();
-							this.shortDetail.shortFillingList = []
-						} else {
-							console.log(res.data)
-							this.mescroll.endBySize(res.data.data.records.length, res.data.data.total
-								.length); //必传参数(当前页的数据个数, 总数据量)
-						}
-
-						this.shortDetail.shortFillingList = this.shortDetail.shortFillingList.concat(res.data.data
-							.records)
-						for (let i = 0; i < this.shortDetail.shortFillingList.length; i++) {
-							this.shortDetail.shortFillingList[i].check = false
-						}
+						this.shortDetail.shortFillingList = res.data.data.records
 
 					}
 				})
@@ -283,7 +178,6 @@
 					warehouseType: '1'
 				}).then(res => {
 					if (res.data.data.length != 0) {
-						uni.hideLoading()
 						this.warehouseBaseInfoList = res.data.data
 					}
 				})
@@ -292,6 +186,10 @@
 				this.shortDetail.warehouseName = this.warehouseBaseInfoList[e[0]].warehouseName
 			},
 			requestFunds() {
+				if(this.infoList.length==0){
+					this.$api.msg('请选择一条要请款的条目')
+					return
+				}
 				this.show1 = true
 
 			},
@@ -308,6 +206,7 @@
 				}
 			},
 			requestFundsSubmit() {
+				
 				var that = this
 				uni.showModal({
 					content: "确定提交请款信息?",
@@ -318,8 +217,8 @@
 							// that.shortDetail.remark = that.remark
 							// that.shortDetail.amountRequested = that.amountRequested
 							// that.shortDetail.warehouseName = that.warehouseName
-							let dataInfo = {}
-							dataInfo.amountRequested = that.shortDetail.amountRequested
+							let dataInfo={}
+							dataInfo.amountRequested = that.shortDetail.amountRequested 
 							dataInfo.warehouseName = that.shortDetail.warehouseName
 							dataInfo.remark = that.shortDetail.remark
 							// dataInfo.compId = uni.getStorageSync('pcUserInfo').compId
@@ -347,7 +246,7 @@
 
 <style lang="scss" scoped>
 	.content {
-		padding-bottom: 180rpx;
+		padding-bottom: 50rpx;
 	}
 
 	.tag {
@@ -422,7 +321,6 @@
 		padding: 10px 16px 0 10px;
 		border-radius: 0 0 15px 15px;
 		padding-bottom: 10px;
-		margin-bottom: 20rpx;
 	}
 
 	.top2 {
@@ -447,13 +345,13 @@
 	}
 
 	.good-list {
+		width: 95%;
+		margin: 0 auto;
 		background-color: white;
-		// margin: -10px 10px 20px 10px;
-		padding: 20px 0px;
-		width: 100%;
-		margin: 10rpx 20rpx;
+		padding: 33px 0px 25px 0px;
 		border-radius: 30rpx;
 		box-shadow: 0px 5rpx 20rpx #E3E3E3;
+		margin-bottom: 10px;
 
 		.item1,
 		.item3 {
@@ -476,49 +374,6 @@
 			text-align: right;
 		}
 
-		.top {
-			align-items: center;
-			justify-content: space-between;
-
-			.left {
-				align-items: center;
-			}
-		}
-
-		.car-info {
-			background: #F9F9FA;
-			padding: 20rpx;
-			display: flex;
-			border-radius: 20rpx;
-			flex-direction: column;
-
-			.car-num {
-				font-size: 26rpx;
-				// font-weight: 700;
-			}
-
-			.car-date {
-				margin-top: 10rpx;
-				color: #878C9C;
-			}
-		}
-
-		.qk {
-			display: flex;
-			justify-content: flex-end;
-		}
-
-		.qkbtn {
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			background: #FFFFFF;
-			border-radius: 33px;
-			border: 1px solid #CDCDCD;
-			padding: 15rpx 40rpx;
-			box-sizing: border-box;
-			margin-top: 20rpx;
-		}
 	}
 
 	.fuxuankuang {
@@ -578,7 +433,7 @@
 	}
 
 	.audit2 {
-		color: #ff0000;
+		color: #22C572;
 	}
 
 	.audit3 {
@@ -611,7 +466,7 @@
 			margin: auto;
 			background: #fff;
 			width: calc(100% - 198rpx);
-			height: 340px;
+			height: 320px;
 			border-radius: 20rpx;
 
 			input {
@@ -715,56 +570,6 @@
 	.textarea {
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
-		margin: 20rpx;
-
-	}
-
-	// .top-content{
-	// 	display: flex;
-	// 	// justify-content: ;
-	// }
-	.list-content {
-		display: flex;
-		align-items: center;
-	}
-
-	.bottom-view {
-		position: fixed;
-		bottom: 0;
-		width: 100%;
-		padding: 40rpx;
-		background-color: #fff;
-
-		.bottom-btn {
-			background-color: #22C572;
-			width: 100%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			color: #fff;
-			font-size: 32rpx;
-			padding: 20rpx;
-			border-radius: 50rpx;
-
-		}
-
-		.row2 {
-			display: flex;
-			justify-content: space-around;
-			align-items: center;
-			color: #ACAFB6;
-
-			.right {
-				background-color: #F7F8FA;
-				padding: 20rpx 60rpx;
-				border-radius: 50rpx;
-			}
-
-			.green {
-				background: #22C572;
-				color: #fff;
-			}
-
-		}
+		margin-left: 10px;
 	}
 </style>

+ 262 - 1
pages/task/audit/acquisitioncontract.vue

@@ -103,12 +103,105 @@
 						@on-remove="onRemove" @on-uploaded="isAdd = true" :before-upload="filterFileType"
 						@on-progress="onProgress" :deletable="false" :showProgress = "false"></upload>
 				</view> -->
-				<view v-for='item in imglist'>
+				<view v-if='imglist.length'>
+					<view v-for='item in imglist'>
 					<view @click='shadeshow(item)'>
 						<image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image>
 					</view>
 				</view>
+				</view>
+				
 			</u-form-item>
+			<view class="content2">
+				<view class="title row">
+					流程
+				</view>
+				<view v-for="(item,index) in auditList" :key='index' class="audit">
+					<view class="row">
+						<view class="left">
+							<view class="item1">
+								<view class="item-content">{{item.operatorTitle}}</view> 
+								<view v-if="item.status='success'" class='status success'>
+									<u-icon name="checkmark" color="#2979ff" size="28"></u-icon>
+								</view>
+								<view v-if="item.status='error'" class='status error'>
+									<u-icon name="close" color="rgb(245, 108, 108)" size="28"></u-icon>
+								</view>
+								<view  v-if="item.status='question'" class='status question'>
+									<u-icon name="question" color="#f9ae3d" size="28"></u-icon>
+								</view>
+							</view>
+							<view class="item2">
+								<view class="name">{{item.desc}}
+								</view>
+								<view class='time'>{{item.updateDate}}</view>
+								<view :class="{'color':item.approved ? 'green':'red'}" class="status">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已审核":'未审核'}}</text></view>
+								<!-- <view  class="status success">吕波(已审核)</view> -->
+							</view>
+						</view>
+						<view v-if='item.commonStaffs1' class="right">
+							<u-icon @click='showcontent(item)' :name="showflow?'arrow-up':'arrow-down'"  size="28"></u-icon>
+						</view>
+					</view>
+					<view v-if='item.showflow' style='padding:10px 0 0 50px;'>
+						<view class='row2'>
+							<view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
+								<view class="item-content">{{item1.staffTitle}}</view> 
+								<view class="name">{{item1.staffName}}</view> 
+							</view>
+						</view>
+					</view>
+					<view class="row-line" v-if="index!= auditList.length - 1"></view>
+				</view>
+			
+	<!-- 		<view  class="audit">
+				<view>
+					<view class="row">
+						<view class="left">
+							<view class="item1">
+								<view class="item-content">长江</view> 
+								<view class='status question'>
+									<u-icon name="question" color="#f9ae3d" size="28"></u-icon>
+								</view>
+								
+							</view>
+							<view class="item2">
+								<view class="name">单证中心审核
+								</view>
+								<view class='time'>2022-10-14 15:17:15</view>
+								<view  class="status">共3人</view>
+							</view>
+						</view>
+						<view class="right">
+							<u-icon @click='showcontent' :name="showflow?'arrow-up':'arrow-down'"  size="28"></u-icon>
+						</view>
+					</view>
+					
+					
+				</view>
+			 	
+			 	<view class="row-line"></view>
+				<view class="row">
+					<view class="left">
+						<view class="item1">
+							<view class="item-content">大光</view> 
+							<view class='status error'>
+								<u-icon name="close" color="rgb(245, 108, 108)" size="28"></u-icon>
+							</view>
+							
+						</view>
+						<view class="item2">
+							<view class="name">决策人审核
+
+							</view>
+							<view class='time'>2022-10-14 15:17:15</view>
+							<view  class="status error">杜大光(已驳回)</view>
+							
+						</view>
+					</view>
+				</view>
+			 </view> -->
+			</view>
 		</u-form>
 		<view style='padding:10px;' class='flex bottom-btn'>
 			<u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
@@ -135,6 +228,7 @@
 				<view @click='passSubmit()' class="confirm">确定</view>
 			</view>
 		</view>
+		
 		<view @click='imgShow=false' v-if="imgShow" class="shade">
 			<image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
 		</view>
@@ -153,6 +247,8 @@
 				id: "",
 				currentPage: 1,
 				pageSize: 10,
+				auditList:[],
+				showflow:false,
 				list: {
 					status: "",
 					contractGoodsInfo: {},
@@ -160,6 +256,7 @@
 				},
 				imglist: [],
 				auditMind: '',
+				src: '../../../static/img/myimg/LiangShang@2x.png',
 				show: false,
 				title: '',
 				contractNo: "",
@@ -191,6 +288,9 @@
 				this.imgShow = true
 				this.url = url
 			},
+			showcontent(item){
+				item.showflow=!item.showflow
+			},
 			getList(id) {
 				var that = this
 				this.$api.doRequest('get', '/contractManagementInfo/getInfo', {
@@ -214,6 +314,65 @@
 						})
 					}
 				})
+				this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
+					businessCode: 'SHOU-CONTRACT-APPROVE',
+					tmpCompId: uni.getStorageSync('pcUserInfo').compId
+				}).then(res1 => {
+					this.$api.doRequest('get', '/commonUser/getHis', {
+						workflowId: res1.data.data[0].id,
+						businessKey: this.id
+					}).then(response => {
+						// uni.hideLoading()
+						for (let i = 0; i < response.data.data.length; i++) {
+							console.log(response.data.data[i].workflowHistoricTasks,i)
+							if(response.data.data[i].commonStaffs){
+								response.data.data[i].operatorTitle=response.data.data[i].desc[0]
+								response.data.data[i].operatorName=response.data.data[i].desc
+								response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
+								if(response.data.data[i].workflowHistoricTasks){
+									if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
+										// response.data.data[i].status='question'
+										this.$set(response.data.data[i],'status','question')
+									}else{
+										this.$set(response.data.data[i],'status','success')
+										// response.data.data[i].status='success'
+									}
+									response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
+									var workflowdata=response.data.data[i].workflowHistoricTasks
+									var staffsdata=response.data.data[i].commonStaffs
+									for (let q = 0; q < staffsdata.length; q++) {
+										staffsdata[q].status=false
+										staffsdata[q].showflow=!staffsdata[q].showflow
+										staffsdata[q].staffTitle=staffsdata[q].staffName
+										for (let k = 0; k < workflowdata.length; k++) {
+											if(staffsdata[q].staffId==workflowdata[k].operatorId){
+												staffsdata[q].status=true
+											}
+										}
+									}
+								}
+								response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
+							}else{
+								console.log(111111111)
+								if(response.data.data[i].workflowHistoricTasks){
+									console.log(222222)
+									debugger
+									this.$set(response.data.data[i],'status','success')
+									response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[0].operatorName[0]
+									response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[0].operatorName
+								}else{
+									this.$set(response.data.data[i],'status','question')
+									// response.data.data[i].status='question'
+									response.data.data[i].operatorTitle=response.data.data[i].desc[0]
+									response.data.data[i].operatorName=response.data.data[i].desc
+								}
+							}
+							
+						}
+						console.log(response.data.data)
+						this.auditList = response.data.data
+					})
+				})
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -548,4 +707,106 @@
 			color: #AFB3BF;
 		}
 	}
+	.content2 {
+		background: white;
+		margin: 20rpx 0;
+		border-radius: 20rpx;
+		padding: 20rpx;
+	
+		.row {
+			display: flex;
+			justify-content: space-between;
+	
+			.left {
+				display: flex;
+				align-items: center;
+				.item1{
+					position:relative;
+					.item-content{
+						background:#22C572;
+					    width: 50px;
+					    height: 50px;
+					    border-radius: 50%;
+					    line-height: 50px;
+					    text-align: center;
+					    font-size: 20px;
+					    color: #fff;
+					}
+					.status{
+						position:absolute;
+						border-radius: 50%;
+						padding: 1px 2px;
+						right: 0;
+						bottom: 0;
+						background:#fff;
+					}
+					.status.success{
+						border:1px solid rgb(60, 156, 255);
+					}
+					.status.error{
+						border:1px solid rgb(245, 108, 108);
+					}
+					.status.question{
+						border:1px solid #f9ae3d;
+					}
+				}
+				.item2 {
+					margin-left: 20rpx;
+	
+					.name {
+						font-size: 32rpx;
+						font-weight: 800;
+					}
+	
+					.status.success {
+						color: #6CC48C;
+					}
+					.status.error {
+						color: rgb(245, 108, 108);
+					}
+					.status.question {
+						color: #f9ae3d;
+					}
+					.time{
+						color:#999;
+					}
+				}
+			}
+	
+			.right {
+				color: #B0B1B5;
+				margin-top: 10px;
+			}
+		}
+		.row2{
+			display:flex;
+			.item-content{
+				background:#22C572;
+			    width: 30px;
+			    height: 30px;
+			    border-radius: 50%;
+			    line-height: 30px;
+			    text-align: center;
+			    font-size: 12px;
+			    color: #fff;
+				padding:0 2px;
+				margin:0 auto;
+			}
+			.status{
+				position:absolute;
+				top:0;right:0;
+			}
+		}
+		.row-line {
+			width: 1px;
+			height: 30px;
+			background: #F2F2F2;
+			margin: 10rpx 50rpx;
+	
+		}
+	
+		.audit {
+			margin-top: 20rpx;
+		}
+	}
 </style>

+ 59 - 3
pages/user/setUp.vue

@@ -41,18 +41,27 @@
 				</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow"></image>
 			</view>
-			<view class='cu-item' style='margin-bottom:10px;' @click='updataEdition'>
+			<!-- <view class='cu-item' style='margin-bottom:10px;' @click='updataEdition'>
 				<view>
 					<text>检查新版本</text>
 				</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow"></image>
-			</view>
+			</view> -->
 			<view class='cu-item' style='margin-bottom:10px;' @click='unsubscribe'>
 				<view>
 					<text>注销账户</text>
 				</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow"></image>
 			</view>
+			<view class='cu-item' style='margin-bottom:10px;'>
+				<view>
+					<text>检查更新</text>
+				</view>
+				<view class="version_css" @click="onAPPUpdate">
+					{{version}}
+					<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow"></image>
+				</view>
+			</view>
 		</view>
 		<view class='exitloginwrap'>
 			<button @click='logout()' class='exitlogin'>退出登录</button>
@@ -68,6 +77,12 @@
 	import {
 		mapState
 	} from 'vuex';
+	// #ifdef APP-PLUS
+	import APPUpdate, {
+		getCurrentNo
+	} from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+	import * as config from '@/config/index.js'
+	// #endif
 	export default {
 		data() {
 			return {
@@ -84,6 +99,7 @@
 					url: '',
 					show: true
 				}, ],
+				version:"1.1.0"
 			}
 		},
 		computed: {
@@ -91,15 +107,49 @@
 		},
 		onShow() {
 			this.getList()
+			// #ifdef APP-PLUS
+			this.version = plus.runtime.version
+			console.log("当前版本为:",plus.runtime.version)
+			this.checkVersion()
+			// #endif
 		},
 		onLoad() {},
 		methods: {
+			// 检查APP是否有新版本
+			onAPPUpdate() {
+				// true 没有新版本的时候有提示,默认:false
+				if (this.version == "发现新版本,立即更新") {
+					// #ifdef APP-PLUS
+					APPUpdate(true);
+					// #endif
+				}
+			},
+			checkVersion() {
+				const baseUrlNew = config.def().baseUrlNew
+				uni.request({
+					url: baseUrlNew + '/appVersion/selectInfo',
+					data: {
+						appid: plus.runtime.appid,
+						version: plus.runtime.version,
+						imei: "1",
+					},
+					method: 'GET',
+					success: (res) => {
+						var versionNo = plus.runtime.version
+						if (versionNo == res.data.data.version) {
+							this.version = "当前为最新版" + res.data.data.version
+						} else {
+							this.version = "发现新版本,立即更新"
+						}
+					}
+				})
+			},
 			updataEdition() {
 				// #ifdef APP-PLUS
 				let type = uni.getSystemInfoSync().platform
 				if (type == "android") {
 					uni.request({
-						url: 'http://api1.eliangeyun.com/appVersion/selectInfo',
+						url: 'https://api2.eliangeyun.com/appVersion/selectInfo',
 						data: {
 							appid: plus.runtime.appid,
 							version: plus.runtime.version,
@@ -418,4 +468,10 @@
 	.exitlogin:after {
 		border: none;
 	}
+	.version_css {
+		// margin-right: 10rpx;
+		color: #9D9D9D;
+		font-size: 32rpx;
+		text-align: center;
+	}
 </style>

+ 1 - 1
static/map_0110.html

@@ -78,7 +78,7 @@
 			$.ajax({
 				type: "GET",
 				contentType: "application/json;charset=UTF-8",
-				url: "http://api1.eliangeyun.com/biInfoController/selectBiInfo?compId=" + compId+ '&seachMoth=' + seachMoth,
+				url: "https://api2.eliangeyun.com/biInfoController/selectBiInfo?compId=" + compId+ '&seachMoth=' + seachMoth,
 				success: function(result) {
 					console.log("result", result);
 					$("#progressBar").hide();

+ 5 - 0
uni_modules/zhouWei-APPUpdate/changelog.md

@@ -0,0 +1,5 @@
+## 3.0.1(2021-05-13)
+1. 跳转颜色和图标配置
+2. 新增静默更新
+## 3.0.0(2021-05-12)
+1. 支持uni_modules

+ 830 - 0
uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate.js

@@ -0,0 +1,830 @@
+// #ifdef APP-PLUS 
+import componentConfig from "@/config/componentConfig"
+const platform = uni.getSystemInfoSync().platform;
+// 主颜色
+const $mainColor = componentConfig.appUpdateColor ? componentConfig.appUpdateColor : "FF5B78";
+// 弹窗图标url
+const $iconUrl = componentConfig.appUpdateIcon ? componentConfig.appUpdateIcon : "/uni_modules/zhouWei-APPUpdate/static/ic_ar.png";
+
+// 获取当前应用的版本号
+export const getCurrentNo = function(callback) {
+	// 获取本地应用资源版本号
+	plus.runtime.getProperty(plus.runtime.appid, function(inf) {
+		callback && callback({
+			versionCode: inf.versionCode,
+			versionName: inf.version
+		});
+	});
+}
+// 从服务器下载应用资源包(wgt文件)
+const getDownload = function(data) {
+	let dtask;
+	if(data.updateType == 'forcibly' || data.updateType == 'solicit'){
+		let popupData = {
+			progress: true,
+			buttonNum: 2
+		};
+		if(data.updateType == 'forcibly'){
+			popupData.buttonNum = 0;
+		}
+		let lastProgressValue = 0;
+		let popupObj = downloadPopup(popupData);
+		dtask = plus.downloader.createDownload(data.downloadUrl, {
+			filename: "_doc/update/"
+		}, function(download, status) {
+			if (status == 200) {
+				popupObj.change({
+					progressValue: 100,
+					progressTip:"正在安装文件...",
+					progress: true,
+					buttonNum: 0
+				});
+				plus.runtime.install(download.filename, {}, function() {
+					popupObj.change({
+						contentText: "应用资源更新完成!",
+						buttonNum: 1,
+						progress: false
+					});
+				}, function(e) {
+					popupObj.cancel();
+					plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
+				});
+			} else {
+				popupObj.change({
+					contentText: "文件下载失败...",
+					buttonNum: 1,
+					progress: false
+				});
+			}
+		});
+		dtask.start();
+		dtask.addEventListener("statechanged", function(task, status) {
+			switch (task.state) {
+				case 1: // 开始
+					popupObj.change({
+						progressValue:0,
+						progressTip:"准备下载...",
+						progress: true
+					});
+					break;
+				case 2: // 已连接到服务器  
+					popupObj.change({
+						progressValue:0,
+						progressTip:"开始下载...",
+						progress: true
+					});
+					break;
+				case 3:
+					const progress = parseInt(task.downloadedSize / task.totalSize * 100);
+					if(progress - lastProgressValue >= 2){
+						lastProgressValue = progress;
+						popupObj.change({
+							progressValue:progress,
+							progressTip: "已下载" + progress + "%",
+							progress: true
+						});
+					}
+					break;
+			}
+		});
+		// 取消下载
+		popupObj.cancelDownload = function(){
+			dtask && dtask.abort();
+			uni.showToast({
+				title: "已取消下载",
+				icon:"none"
+			});
+		}
+		// 重启APP
+		popupObj.reboot = function(){
+			plus.runtime.restart();
+		}
+	} else if(data.updateType == "silent"){
+		dtask = plus.downloader.createDownload(data.downloadUrl, {
+			filename: "_doc/update/"
+		}, function(download, status) {
+			if (status == 200) {
+				plus.runtime.install(download.filename, {}, function() {
+					console.log("应用资源更新完成");
+				}, function(e) {
+					plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
+				});
+			} else {
+				plus.nativeUI.alert("文件下载失败...");
+			}
+		});
+		dtask.start();
+	}
+}
+// 文字换行
+function drawtext(text, maxWidth) {
+	let textArr = text.split("");
+	let len = textArr.length;
+	// 上个节点
+	let previousNode = 0;
+	// 记录节点宽度
+	let nodeWidth = 0;
+	// 文本换行数组
+	let rowText = [];
+	// 如果是字母,侧保存长度
+	let letterWidth = 0;
+	// 汉字宽度
+	let chineseWidth = 14;
+	// otherFont宽度
+	let otherWidth = 7;
+	for (let i = 0; i < len; i++) {
+		if (/[\u4e00-\u9fa5]|[\uFE30-\uFFA0]/g.test(textArr[i])) {
+			if(letterWidth > 0){
+				if(nodeWidth + chineseWidth + letterWidth * otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = chineseWidth;
+					letterWidth = 0;
+				} else {
+					nodeWidth += chineseWidth + letterWidth * otherWidth;
+					letterWidth = 0;
+				}
+			} else {
+				if(nodeWidth + chineseWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = chineseWidth;
+				}else{
+					nodeWidth += chineseWidth;
+				}
+			}
+		} else {
+			if(/\n/g.test(textArr[i])){
+				rowText.push({
+					type: "break",
+					content: text.substring(previousNode, i)
+				});
+				previousNode = i + 1;
+				nodeWidth = 0;
+				letterWidth = 0;
+			}else if(textArr[i] == "\\" && textArr[i + 1] == "n"){
+				rowText.push({
+					type: "break",
+					content: text.substring(previousNode, i)
+				});
+				previousNode = i + 2;
+				nodeWidth = 0;
+				letterWidth = 0;
+			}else if(/[a-zA-Z0-9]/g.test(textArr[i])){
+				letterWidth += 1;
+				if(nodeWidth + letterWidth * otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i + 1 - letterWidth)
+					});
+					previousNode = i + 1 - letterWidth;
+					nodeWidth = letterWidth * otherWidth;
+					letterWidth = 0;
+				}
+			} else{
+				if(nodeWidth + otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = otherWidth;
+				}else{
+					nodeWidth += otherWidth;
+				}
+			}
+		}
+	}
+	if (previousNode < len) {
+		rowText.push({
+			type: "text",
+			content: text.substring(previousNode, len)
+		});
+	}
+	return rowText;
+}
+// 是否更新弹窗
+function updatePopup(data, callback) {
+	// 弹窗遮罩层
+	let maskLayer = new plus.nativeObj.View("maskLayer", { //先创建遮罩层
+		top: '0px',
+		left: '0px',
+		height: '100%',
+		width: '100%',
+		backgroundColor: 'rgba(0,0,0,0.5)'
+	});
+
+	// 以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
+	const screenWidth = plus.screen.resolutionWidth;
+	const screenHeight = plus.screen.resolutionHeight;
+	//弹窗容器宽度
+	const popupViewWidth = screenWidth * 0.7;
+	// 弹窗容器的Padding
+	const viewContentPadding = 20;
+	// 弹窗容器的宽度
+	const viewContentWidth = parseInt(popupViewWidth - (viewContentPadding * 2));
+	// 描述的列表
+	const descriptionList = drawtext(data.versionInfo, viewContentWidth);
+	// 弹窗容器高度
+	let popupViewHeight = 80 + 20 + 20 + 90 + 10;
+	
+	let popupViewContentList = [{
+			src: $iconUrl,
+			id: "logo", 
+			tag: "img",
+			position: {
+				top: "0px",
+				left: (popupViewWidth - 124) / 2 + "px",
+				width: "124px",
+				height: "80px",
+			}
+		},
+		{
+			tag: 'font',
+			id: 'title',
+			text: "发现新版本" + data.versionName,
+			textStyles: {
+				size: '18px',
+				color: "#333",
+				weight: "bold",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: '90px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px",
+			}
+		}];
+	const textHeight = 18;
+	let contentTop = 130;
+	descriptionList.forEach((item,index) => {
+		if(index > 0){
+			popupViewHeight += textHeight;
+			contentTop += textHeight;
+		}
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'content' + index + 1,
+			text: item.content,
+			textStyles: {
+				size: '14px',
+				color: "#666",
+				lineSpacing: "50%",
+				align: "left"
+			},
+			position: {
+				top: contentTop + "px",
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: textHeight + "px",
+			}
+		});
+		if(item.type == "break"){
+			contentTop += 10;
+			popupViewHeight += 10;
+		}
+	});
+	
+	if(data.updateType == "forcibly"){
+		popupViewContentList.push({
+			tag: 'rect', //绘制底边按钮
+			rectStyles:{
+				radius: "6px",
+				color: $mainColor
+			},
+			position:{
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px"
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'confirmText',
+			text: "立即升级",
+			textStyles: {
+				size: '14px',
+				color: "#FFF",
+				lineSpacing: "0%",
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px"
+			}
+		});
+	} else {
+		// 绘制底边按钮
+		popupViewContentList.push({
+			tag: 'rect',
+			id: 'cancelBox',
+			rectStyles: {
+				radius: "3px",
+				borderColor: "#f1f1f1",
+				borderWidth: "1px",
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'rect',
+			id: 'confirmBox',
+			rectStyles: {
+				radius: "3px",
+				color: $mainColor,
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'cancelText',
+			text: "暂不升级",
+			textStyles: {
+				size: '14px',
+				color: "#666",
+				lineSpacing: "0%",
+				whiteSpace: "normal"
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'confirmText',
+			text: "立即升级",
+			textStyles: {
+				size: '14px',
+				color: "#FFF",
+				lineSpacing: "0%",
+				whiteSpace: "normal"
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+	}
+	// 弹窗内容
+	let popupView = new plus.nativeObj.View("popupView", { //创建底部图标菜单
+		tag: "rect",
+		top: (screenHeight - popupViewHeight) / 2 + "px",
+		left: '15%',
+		height: popupViewHeight + "px",
+		width: "70%"
+	});
+	// 绘制白色背景
+	popupView.drawRect({
+		color: "#FFFFFF",
+		radius: "8px"
+	}, {
+		top: "40px",
+		height: popupViewHeight - 40 + "px",
+	});
+	
+	popupView.draw(popupViewContentList);
+	popupView.addEventListener("click", function(e) {
+		let maxTop = popupViewHeight - viewContentPadding;
+		let maxLeft = popupViewWidth - viewContentPadding;
+		let buttonWidth = (viewContentWidth - viewContentPadding) / 2;
+		if (e.clientY > maxTop - 30 && e.clientY < maxTop) {
+			if(data.updateType == "forcibly"){
+				if(e.clientX > viewContentPadding && e.clientX < maxLeft){
+					// 立即升级
+					maskLayer.hide();
+					popupView.hide();
+					callback && callback();
+				}
+			} else {
+				// 暂不升级
+				if (e.clientX > viewContentPadding && e.clientX < maxLeft - buttonWidth - viewContentPadding) {
+					maskLayer.hide();
+					popupView.hide();
+				} else if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) {
+					// 立即升级
+					maskLayer.hide();
+					popupView.hide();
+					callback && callback();
+				}
+			}
+			
+		}
+	});
+	if(data.updateType == "solicit"){
+		// 点击遮罩层
+		maskLayer.addEventListener("click", function() { //处理遮罩层点击
+			maskLayer.hide();
+			popupView.hide();
+		});
+	}
+	// 显示弹窗
+	maskLayer.show();
+	popupView.show();
+}
+// 文件下载的弹窗绘图
+function downloadPopupDrawing(data){
+	// 以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
+	const screenWidth = plus.screen.resolutionWidth;
+	const screenHeight = plus.screen.resolutionHeight;
+	//弹窗容器宽度
+	const popupViewWidth = screenWidth * 0.7;
+	// 弹窗容器的Padding
+	const viewContentPadding = 20;
+	// 弹窗容器的宽度
+	const viewContentWidth = popupViewWidth - (viewContentPadding * 2);
+	// 弹窗容器高度
+	let popupViewHeight = viewContentPadding * 3 + 60;
+	let progressTip = data.progressTip || "准备下载...";
+	let contentText = data.contentText || "正在为您更新,请耐心等待";
+	let elementList = [
+		{
+			tag: 'rect', //背景色
+			color: '#FFFFFF',
+			rectStyles:{
+				radius: "8px"
+			}
+		},
+		{
+			tag: 'font',
+			id: 'title',
+			text: "升级APP",
+			textStyles: {
+				size: '16px',
+				color: "#333",
+				weight: "bold",
+				verticalAlign: "middle",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: viewContentPadding + 'px',
+				height: "30px",
+			}
+		},
+		{
+			tag: 'font',
+			id: 'content',
+			text: contentText,
+			textStyles: {
+				size: '14px',
+				color: "#333",
+				verticalAlign: "middle",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: viewContentPadding * 2 + 30 + 'px',
+				height: "20px",
+			}
+		}
+	];
+	// 是否有进度条
+	if(data.progress){
+		popupViewHeight += viewContentPadding + 40;
+		elementList = elementList.concat([
+			{
+				tag: 'font',
+				id: 'progressValue',
+				text: progressTip,
+				textStyles: {
+					size: '14px',
+					color: $mainColor,
+					whiteSpace: "normal"
+				},
+				position: {
+					top: viewContentPadding * 4 + 20 + 'px',
+					height: "30px"
+				}
+			},
+			{
+				tag: 'rect', //绘制进度条背景
+				id: 'progressBg',
+				rectStyles:{
+					radius: "4px",
+					borderColor: "#f1f1f1",
+					borderWidth: "1px",
+				},
+				position:{
+					top: viewContentPadding * 4 + 60 + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "8px"
+				}
+			},
+		]);
+	}
+	if (data.buttonNum == 2) {
+		popupViewHeight += viewContentPadding + 30;
+		elementList = elementList.concat([
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "3px",
+					borderColor: "#f1f1f1",
+					borderWidth: "1px",
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px"
+				}
+			},
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "3px",
+					color: $mainColor
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px"
+				}
+			},
+			{
+				tag: 'font',
+				id: 'cancelText',
+				text: "取消下载",
+				textStyles: {
+					size: '14px',
+					color: "#666",
+					lineSpacing: "0%",
+					whiteSpace: "normal"
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px",
+				}
+			},
+			{
+				tag: 'font',
+				id: 'confirmText',
+				text: "后台下载",
+				textStyles: {
+					size: '14px',
+					color: "#FFF",
+					lineSpacing: "0%",
+					whiteSpace: "normal"
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px",
+				}
+			}
+		]);
+	}
+	if (data.buttonNum == 1) {
+		popupViewHeight += viewContentPadding + 40;
+		elementList = elementList.concat([
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "6px",
+					color: $mainColor
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "40px"
+				}
+			},
+			{
+				tag: 'font',
+				id: 'confirmText',
+				text: "关闭",
+				textStyles: {
+					size: '14px',
+					color: "#FFF",
+					lineSpacing: "0%",
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "40px"
+				}
+			}
+		]);
+	}
+	return {
+		popupViewHeight:popupViewHeight,
+		popupViewWidth:popupViewWidth,
+		screenHeight:screenHeight,
+		viewContentWidth:viewContentWidth,
+		viewContentPadding:viewContentPadding,
+		elementList: elementList
+	};
+}
+// 文件下载的弹窗
+function downloadPopup(data) {
+	// 弹窗遮罩层
+	let maskLayer = new plus.nativeObj.View("maskLayer", { //先创建遮罩层
+		top: '0px',
+		left: '0px',
+		height: '100%',
+		width: '100%',
+		backgroundColor: 'rgba(0,0,0,0.5)'
+	});
+	let popupViewData = downloadPopupDrawing(data);
+	// 弹窗内容
+	let popupView = new plus.nativeObj.View("popupView", { //创建底部图标菜单
+		tag: "rect",
+		top: (popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + "px",
+		left: '15%',
+		height: popupViewData.popupViewHeight + "px",
+		width: "70%",
+	});
+	let progressValue = 0;
+	let progressTip = 0;
+	let contentText = 0;
+	let buttonNum = 2;
+	if(data.buttonNum >= 0){
+		buttonNum = data.buttonNum;
+	}
+	popupView.draw(popupViewData.elementList);
+    let callbackData = {
+		change: function(res) {
+			let progressElement = [];
+			if(res.progressValue){
+				progressValue = res.progressValue;
+				// 绘制进度条
+				progressElement.push({
+					tag: 'rect', //绘制进度条背景
+					id: 'progressValueBg',
+					rectStyles:{
+						radius: "4px",
+						color: $mainColor
+					},
+					position:{
+						top: popupViewData.viewContentPadding * 4 + 60 + 'px',
+						left: popupViewData.viewContentPadding + "px",
+						width: popupViewData.viewContentWidth * (res.progressValue / 100) + "px",
+						height: "8px"
+					}
+				});
+			}
+			if(res.progressTip){
+				progressTip = res.progressTip;
+				progressElement.push({
+					tag: 'font',
+					id: 'progressValue',
+					text: res.progressTip,
+					textStyles: {
+						size: '14px',
+						color: $mainColor,
+						whiteSpace: "normal"
+					},
+					position: {
+						top: popupViewData.viewContentPadding * 4 + 20 + 'px',
+						height: "30px"
+					}
+				});
+			}
+			if(res.contentText){
+				contentText = res.contentText;
+				progressElement.push({
+					tag: 'font',
+					id: 'content',
+					text: res.contentText,
+					textStyles: {
+						size: '16px',
+						color: "#333",
+						whiteSpace: "normal"
+					},
+					position: {
+						top: popupViewData.viewContentPadding * 2 + 30 + 'px',
+						height: "30px",
+					}
+				});
+			}
+			if(res.buttonNum >= 0 && buttonNum != res.buttonNum){
+				buttonNum = res.buttonNum;
+				popupView.reset();
+				popupViewData = downloadPopupDrawing(Object.assign({
+					progressValue:progressValue,
+					progressTip:progressTip,
+					contentText:contentText,
+				},res));
+				let newElement = [];
+				popupViewData.elementList.map((item,index) => {
+					let have = false;
+					progressElement.forEach((childItem,childIndex) => {
+						if(item.id == childItem.id){
+							have = true;
+						}
+					});
+					if(!have){
+						newElement.push(item);
+					}
+				});
+				progressElement = newElement.concat(progressElement);
+				popupView.setStyle({
+					tag: "rect",
+					top: (popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + "px",
+					left: '15%',
+					height: popupViewData.popupViewHeight + "px",
+					width: "70%",
+				});
+				popupView.draw(progressElement); 
+			}else{
+				popupView.draw(progressElement);
+			}
+		},
+		cancel: function() { 
+			maskLayer.hide();
+			popupView.hide();
+		}
+	}
+	popupView.addEventListener("click", function(e) {
+		let maxTop = popupViewData.popupViewHeight - popupViewData.viewContentPadding;
+		let maxLeft = popupViewData.popupViewWidth - popupViewData.viewContentPadding;
+		if (e.clientY > maxTop - 40 && e.clientY < maxTop) {
+			if(buttonNum == 1){
+				// 单按钮
+				if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft) {
+					maskLayer.hide();
+					popupView.hide();
+                    callbackData.reboot();
+				}
+			}else if(buttonNum == 2){
+				// 双按钮
+				let buttonWidth = (popupViewData.viewContentWidth - popupViewData.viewContentPadding) / 2;
+				if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft - buttonWidth - popupViewData.viewContentPadding) {
+					maskLayer.hide();
+					popupView.hide();
+                    callbackData.cancelDownload();
+				} else if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) {
+					maskLayer.hide();
+					popupView.hide();
+				}
+			}
+		}
+	});
+	// 显示弹窗
+	maskLayer.show();
+	popupView.show();
+	// 改变进度条
+	return callbackData;
+}
+export default function(isPrompt = false) {
+	getCurrentNo(versionInfo => {
+		componentConfig.getServerNo(versionInfo, isPrompt, res => {
+			if (res.updateType == "forcibly" || res.updateType == "silent") {
+				if (/\.wgt$/i.test(res.downloadUrl)) {
+					getDownload(res);
+				} else if(/\.html$/i.test(res.downloadUrl)){
+					plus.runtime.openURL(res.downloadUrl);
+				} else {
+					if (platform == "android") {
+						getDownload(res);
+					} else {
+						plus.runtime.openURL(res.downloadUrl);
+					}
+				}
+			} else if(res.updateType == "solicit"){
+				updatePopup(res, function() {
+					if (/\.wgt$/i.test(res.downloadUrl)) {
+						getDownload(res);
+					} else if(/\.html$/i.test(res.downloadUrl)){
+						plus.runtime.openURL(res.downloadUrl);
+					} else {
+						if (platform == "android") {
+							getDownload(res);
+						} else {
+							plus.runtime.openURL(res.downloadUrl);
+						}
+					}
+				});
+			}
+		});
+	});
+}
+// #endif

+ 79 - 0
uni_modules/zhouWei-APPUpdate/package.json

@@ -0,0 +1,79 @@
+{
+  "id": "zhouWei-APPUpdate",
+  "displayName": "APP版本更新、强制更新、静默更新、下载进度(wgt更新)",
+  "version": "3.0.1",
+  "description": "APP版本更新、强制更新、静默更新、漂亮弹窗、下载进度(wgt更新)",
+  "keywords": [
+    "APP版本更新",
+    "强制更新",
+    "版本更新",
+    "静默更新"
+],
+  "repository": "https://github.com/zhouwei1994/uni-app-demo",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": "465081029"
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "<uses-permission android:name=\\\"android.permission.INSTALL_PACKAGES\\\"/>  \n<uses-permission android:name=\\\"android.permission.REQUEST_INSTALL_PACKAGES\\\"/>"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "n",
+          "Android Browser": "n",
+          "微信浏览器(Android)": "n",
+          "QQ浏览器(Android)": "n"
+        },
+        "H5-pc": {
+          "Chrome": "n",
+          "IE": "n",
+          "Edge": "n",
+          "Firefox": "n",
+          "Safari": "n"
+        },
+        "小程序": {
+          "微信": "n",
+          "阿里": "n",
+          "百度": "n",
+          "字节跳动": "n",
+          "QQ": "n"
+        },
+        "快应用": {
+          "华为": "n",
+          "联盟": "n"
+        }
+      }
+    }
+  }
+}

+ 162 - 0
uni_modules/zhouWei-APPUpdate/readme.md

@@ -0,0 +1,162 @@
+# APP版本更新、强制更新、漂亮的更新界面、IOS更新(跳转IOS store)、wgt更新
+
+| `QQ交流群(607391225)`         | `微信交流群(加我好友备注"进群")`                  |
+| ----------------------------|--------------------------- |
+|![QQ交流群](http://qn.kemean.cn//upload/202004/14/15868301778472k7oubi6.png)|![微信交流群](https://qn.kemean.cn/upload/202010/13/weiXin_group_code.jpg)|
+| QQ群号:607391225 |微信号:zhou0612wei|
+
+### [点击跳转-插件示例](https://ext.dcloud.net.cn/plugin?id=2009)
+### [点击跳转-5年的web前端开源的uni-app快速开发模板-下载看文档](https://ext.dcloud.net.cn/plugin?id=2009)
+ 
+### 常见问题
+1.安卓apk下载完成后没有更新APP?
+
+答:问题是因为没有添加APP安装应用的权限,解决方法在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
+```
+<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  
+<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
+```
+若还有问题请看[安装apk无法执行的解决方案](https://ask.dcloud.net.cn/article/35703 "安装apk无法执行的解决方案")
+
+2.APP更新后版本号没变,还是之前的版本号?
+
+答:可能是更新的安装包没有升级版本号,`manifest.json`文件里面基本设置`应用版本号`和`应用版本名称`需要升高(保持一直减少问题)
+
+3.APP更新后没有覆盖之前的APP?
+
+答:可能是更新的安装包`包名`和APP的`包名`不一样
+
+4.弹窗的图标不显示?
+
+答:检查图片是不是放项目资源文件`static`,然后重新运行项目
+
+5.版本号是在前端对比还是在后端接口对比?
+
+答:当前案例是本地的版本号通过接口传递给后台,是后台对比的,若需要前端对比,请在接口返回数据的地方修改,不更新就不要调用`callback`方法
+
+6.本地的版本号比接口的版本号高还弹窗升级窗口?
+
+答:当前案例是本地的版本号通过接口传递给后台,后台对比是否需要升级,不需要升级就不要返回数据(特别是需要wgt更新的,建议这种方式)
+
+### 第一步`关键`配置APP更新接口(可以参考上面的示例)
+在项目目录下`config/componentConfig.js`里面如下配置
+```
+// 此方法是接口请求方法
+import $http from '@/config/requestConfig'
+export default {
+	// 发起ajax请求获取服务端版本号
+	getServerNo: (version, isPrompt = false, callback) => {
+		let httpData = {
+			version: version.versionCode,
+			// 版本名称
+		    versionName: version.versionName,
+			// setupPage参数说明(判断用户是不是从设置页面点击的更新,如果是设置页面点击的更新,有不要用静默更新了,不然用户点击没反应很奇怪的)
+			setupPage: isPrompt   
+		};
+		if (platform == "android") {
+			httpData.type = 1101;
+		} else {
+			httpData.type = 1102;
+		}
+		/* 接口入参说明
+		 * version: 应用当前版本号(已自动获取)
+		 * versionName: 应用当前版本名称(已自动获取)
+		 * type:平台(1101是安卓,1102是IOS)
+		 */
+		/****************以下是示例*******************/
+		// 可以用自己项目的请求方法(接口自己找后台要,插件不提供)
+		$http.get("api/common/v1/app_version", httpData,{
+			isPrompt: isPrompt
+		}).then(res => {
+			/* res的数据说明
+			 * | 参数名称	     | 一定返回 	| 类型	    | 描述
+			 * | -------------|--------- | --------- | ------------- |
+			 * | versionCode	 | y	    | int	    | 版本号        |
+			 * | versionName	 | y	    | String	| 版本名称      |
+			 * | versionInfo	 | y	    | String	| 版本信息      |
+			 * | updateType	     | y	    | String	| forcibly = 强制更新, solicit = 弹窗确认更新, silent = 静默更新 |
+			 * | downloadUrl	 | y	    | String	| 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接)  |
+			 */
+			if (res && res.downloadUrl) {
+				// 兼容之前的版本(updateType是新版才有的参数)
+				if(res.updateType){
+					callback && callback(res);
+				} else {
+					if(res.forceUpdate){
+						res.updateType = "forcibly";
+					} else {
+						res.updateType = "solicit";
+					}
+					callback && callback(res);
+				}
+			} else if (isPrompt) {
+				uni.showToast({
+					title: "暂无新版本",
+					icon: "none"
+				});
+			}
+		});
+		/****************以上是示例*******************/
+	},
+	// 弹窗主颜色(不填默认粉色)
+	appUpdateColor: "f00",
+	// 弹窗图标(不填显示默认图标,链接配置示例如: '/static/demo/ic_attention.png')
+	appUpdateIcon: ''
+}
+```
+
+### 第二步 使用方法
+``` 
+// App.vue页面
+
+// #ifdef APP-PLUS
+import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+// #endif
+
+onLaunch: function(e) {
+	// #ifdef APP-PLUS
+	APPUpdate();
+	// #endif
+}
+```
+
+### 第三步 添加APP安装应用的权限
+在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
+```
+<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  
+<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
+```
+
+### 修改弹窗的主题色或弹窗图标
+在`APPUpdate/index.js`里面上面`$mainColor`常量中定义主题颜色,`$iconUrl`常量中定义图标地址
+
+### 检查APP是否有新版本(一般在设置页面使用)
+```
+// #ifdef APP-PLUS
+import APPUpdate, { getCurrentNo } from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+// #endif
+export default {
+	data() {
+		return {
+			version: "" // 版本号
+		};
+	},
+	//第一次加载
+	onLoad(e) {
+		// #ifdef APP-PLUS
+		getCurrentNo(res => {
+			// 进页面获取当前APP版本号(用于页面显示)
+			this.version = res.version;
+		});
+		// #endif
+	},
+	//方法
+	methods: {
+		// 检查APP是否有新版本
+		onAPPUpdate() {
+			// true 没有新版本的时候有提示,默认:false
+			APPUpdate(true);
+		}
+	}
+}
+```

BIN
uni_modules/zhouWei-APPUpdate/static/ic_ar.png