下载app接口替换
This commit is contained in:
@@ -159,3 +159,12 @@ export function getConfigByCode(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//获取最新版本
|
||||
export function getNewVersion(key){
|
||||
return request({
|
||||
url: '/driverApp/app/updateVersion',
|
||||
method:'GET',
|
||||
params: key
|
||||
})
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ service.interceptors.request.use(
|
||||
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
console.log('response', response.data)
|
||||
const res = response.data
|
||||
if ( res.code === 401 || res.code === 400 || res.code == 500) {
|
||||
Toast(res.msg || 'Error')
|
||||
|
||||
@@ -11,14 +11,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNewVersion } from "@/api/order"
|
||||
export default {
|
||||
name: "goToApp",
|
||||
methods: {
|
||||
goAppHandler() {
|
||||
window.location.href = "rvdriver://page/pagesLogin/phoneLogin?source=h5Link";
|
||||
},
|
||||
downLoadHandler() {
|
||||
window.location.href = 'https://cos.sinoassist.com/2025/12/29/395f660b041e47198b6e681ede9a9266.apk'
|
||||
async downLoadHandler() {
|
||||
getNewVersion({
|
||||
appType: 5
|
||||
}).then((res) => {
|
||||
window.location.href = res?.result?.path
|
||||
}).catch(() => {
|
||||
this.$message.error('请求版本失败,请重试');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user