Commit 01d2009c authored by Damon's avatar Damon

merge version

parents 5e061739 97650d33
...@@ -10,6 +10,7 @@ const UNI_APP = { ...@@ -10,6 +10,7 @@ const UNI_APP = {
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/', qn_asset_url: 'http://deudn.c.pp.cc/',
argoDebugMode: 1 argoDebugMode: 1,
version: 'v1.3.6'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -7,9 +7,10 @@ const UNI_APP = { ...@@ -7,9 +7,10 @@ const UNI_APP = {
systemUrl: { systemUrl: {
apiUrl:'https://system.banshouhui.com', //java端域名请求头 apiUrl:'https://system.banshouhui.com', //java端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'https://qn-static.banshouhui.com', qn_asset_url: 'https://qn-static.banshouhui.com',
argoDebugMode: 0 argoDebugMode: 0,
version: 'v1.3.6'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -7,8 +7,9 @@ const UNI_APP = { ...@@ -7,8 +7,9 @@ const UNI_APP = {
systemUrl: { systemUrl: {
apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头 apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
}, },
qn_base_url: 'https://qn-static.banshouhui.com/self-support/', qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'https://qn-static.banshouhui.com', qn_asset_url: 'https://qn-static.banshouhui.com',
argoDebugMode: 1 argoDebugMode: 1,
version: 'v1.3.6'
} }
module.exports = UNI_APP; module.exports = UNI_APP;
...@@ -69,16 +69,15 @@ export default { ...@@ -69,16 +69,15 @@ export default {
onLaunch: async function () { onLaunch: async function () {
// 应用初始化(全局只触发一次) // 应用初始化(全局只触发一次)
AnalysysAgent.registerSuperProperty("platform", "self-support"); AnalysysAgent.registerSuperProperty("platform", "self-support");
// 版本更新
await this.updateApp();
this.getSystemInfo(); this.getSystemInfo();
// 系统自动登录::每次运行小程序重新获取用户信息 // 系统自动登录::每次运行小程序重新获取用户信息
await this.autoLogin(); await this.autoLogin();
//this.deleteTempImg() //this.deleteTempImg()
}, },
onShow: async function () { onShow: function () {
// 版本更新
await this.updateApp();
// 应用启动,或从后台进入前台显示 // 应用启动,或从后台进入前台显示
if (this.uploadTask.length > 0) { if (this.uploadTask.length > 0) {
upload.uploadImageTask(this) upload.uploadImageTask(this)
...@@ -167,14 +166,20 @@ export default { ...@@ -167,14 +166,20 @@ export default {
}, },
/* 版本更新 */ /* 版本更新 */
async updateApp() { async updateApp(type) {
if (uni.canIUse('getUpdateManager')) { if (uni.canIUse('getUpdateManager')) {
// 版本更新 // 版本更新
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function (res) { updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调 // 请求完新版本信息的回调
console.log("update", res) if (!res.hasUpdate && type === 1) {
uni.showModal({
title: '提示',
content: '当前版本已经是最新版本',
showCancel: false
})
}
}); });
updateManager.onUpdateReady(function (res) { updateManager.onUpdateReady(function (res) {
...@@ -190,8 +195,9 @@ export default { ...@@ -190,8 +195,9 @@ export default {
uni.showModal({ uni.showModal({
title: '温馨提示~', title: '温馨提示~',
content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~', content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
success: function (res) { showCancel: false,
updateManager.applyUpdate() success: function (result) {
if (result.confirm) updateManager.applyUpdate()
} }
}) })
} }
...@@ -204,12 +210,14 @@ export default { ...@@ -204,12 +210,14 @@ export default {
uni.showModal({ uni.showModal({
title: '已经有新版本了哟~', title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
showCancel: false
}) })
}); });
} else { } else {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。' content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。',
showCancel: false
}) })
} }
}, },
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
</view> </view>
</view> </view>
<u-modal v-model="show" :content="content" show-cancel-button @confirm="logout"></u-modal> <u-modal v-model="show" :content="content" show-cancel-button @confirm="logout"></u-modal>
</view> </view>
</template> </template>
...@@ -114,6 +115,13 @@ ...@@ -114,6 +115,13 @@
value: this.serviceTel, value: this.serviceTel,
icon: 'lxkefu.png', icon: 'lxkefu.png',
imageStyle: 'width:32rpx;height:32rpx' imageStyle: 'width:32rpx;height:32rpx'
},
{
pathName: 'about',
title: '版本更新',
value: process.uniEnv.version,
icon: 'version.png',
imageStyle: 'width:32rpx;height:32rpx'
} }
] ]
}, },
...@@ -154,6 +162,10 @@ ...@@ -154,6 +162,10 @@
}, },
handleClick(path) { handleClick(path) {
if(this.vuex_token) { if(this.vuex_token) {
if (path === 'about') {
app.updateApp(1)
return
}
this.$u.route({ this.$u.route({
url: 'pages/mine/' + path + '/index' url: 'pages/mine/' + path + '/index'
}) })
......
...@@ -245,24 +245,24 @@ ...@@ -245,24 +245,24 @@
this.takeStatus = true this.takeStatus = true
}, },
async closeTake(img) { async closeTake(img) {
if(img !==undefined){ if(img !== undefined){
// 复制一份 用于保存 // 复制一份 用于保存
if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = [] if (!this.currentItemDate.orderImages) this.currentItemDate.orderImages = []
let saveList = JSON.parse(JSON.stringify(this.currentItemDate.orderImages)) let saveList = this.currentItemDate.orderImages.slice(0)
const files = img.map(v => v.path) const files = img.map(v => v.path)
const value = await this.saveToTask(files) const value = await this.saveToTask(files)
value.map(item =>{ value.forEach(item =>{
// 文件key添加保存数组中 // 文件key添加保存数组中
saveList.push(item.key) saveList.push(item.key)
// step1 添加缓存图片 到显示 // step1 添加缓存图片 到显示
this.currentItemDate.orderImages.push(item.path) this.currentItemDate.orderImages.push(item.path)
}) })
// step2 保存图片 // step2 保存图片
var data={ var data = {
type : this.currentItemDate.type, type: this.currentItemDate.type,
images : Array.from(saveList), images: saveList,
fieldsName:this.currentItemDate.fieldName fieldsName: this.currentItemDate.fieldName
} }
console.log("data", data) console.log("data", data)
this.$u.api.saveImage(data,this.orderId).then((res) => { this.$u.api.saveImage(data,this.orderId).then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment