Commit b824705a by 李伟康

commit 提交

1 parent 0f3a6738
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
url: "/pages/common/login", url: "/pages/common/login",
}); });
} }
let version = '1.0.0' // let version = '1.0.0'
let version = plus.runtime.version
uni.$api.commonApi.getAPPVersion().then(res =>{ uni.$api.commonApi.getAPPVersion().then(res =>{
if(res != version) this.$store.dispatch('openUpdateModal') if(res != version) this.$store.dispatch('openUpdateModal')
}) })
......
...@@ -6,7 +6,7 @@ const serverConfig = { ...@@ -6,7 +6,7 @@ const serverConfig = {
mockTimer: {}, mockTimer: {},
mockCache: null, mockCache: null,
}; };
const configModule = 'mini-wuye' const configModule = 'app-tape'
const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`; const configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`;
/**获取mock数据 */ /**获取mock数据 */
...@@ -19,7 +19,8 @@ const getMockData = async () => { ...@@ -19,7 +19,8 @@ const getMockData = async () => {
if (!serverConfig.mockRequestCount) { if (!serverConfig.mockRequestCount) {
serverConfig.mockCache = null; serverConfig.mockCache = null;
serverConfig.mockRequestCount = Date.now(); serverConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url:configUrl });; const data = await http.uni_request({ url:configUrl });
console.log(data,'===')
data.createTime = Date.now(); data.createTime = Date.now();
serverConfig.mockCache = data; serverConfig.mockCache = data;
uni.$storage.set("mock_data", data); uni.$storage.set("mock_data", data);
......
...@@ -11,8 +11,8 @@ module.exports = { ...@@ -11,8 +11,8 @@ module.exports = {
data.projectName = 'boutique' data.projectName = 'boutique'
data.source = 'MINIAPP' data.source = 'MINIAPP'
data.productCode = 'PC00c2' data.productCode = 'PC00c2'
return http.fetch('dj.api.smartcarlife.sms.login', data) // return http.fetch('dj.api.smartcarlife.sms.login', data)
// return http.fetch('dj.api.smartcarlife.sms.applogin', data) return http.fetch('dj.api.smartcarlife.sms.applogin', data)
}, },
/**免登 */ /**免登 */
autoLogin (data = {}) { autoLogin (data = {}) {
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
<template>
<view
class="noviceGuide-box"
v-if="showNoviceGuide"
>
<!-- <template v-if="step == 1">
<img
:src="step_1[1]"
class="step-1-1"
>
<img
:src="step_1[2]"
class="step-1-2"
@click="step = 2"
>
</template>
<template v-else-if="step = 2">
<img
:src="step_1[1]"
class="step-2-1"
>
<img
:src="step_1[2]"
class="step-2-2"
@click="step = 2"
>
</template> -->
<template v-for="(i,index) in stepList">
<view
:key="index"
v-if="index == step"
>
<image
:src="i[1]"
:class="['step',`step-${index + 1}-1`]"
/>
<image
:src="i[2]"
:class="['step',`step-${index + 1}-2`]"
@click="jump"
/>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'NoviceGuide',
computed: {
watchUpdateStatus () {
return this.$store.state.update.status
},
},
watch: {
watchUpdateStatus: {
immediate: true,
handler (newval) {
this.showNoviceGuide = !newval && !uni.$storage.get('noviceGuideStatus')
}
},
},
data () {
return {
showNoviceGuide: false,
step: 0,
stepList: [
{
'1': require('@/assets/images/noviceGuide/step1-1.webp'),
'2': require('@/assets/images/noviceGuide/step1-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step2-1.webp'),
'2': require('@/assets/images/noviceGuide/step2-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step3-1.webp'),
'2': require('@/assets/images/noviceGuide/step3-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step4-1.webp'),
'2': require('@/assets/images/noviceGuide/step4-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step5-1.webp'),
'2': require('@/assets/images/noviceGuide/step5-2.webp')
}
],
}
},
mounted () {
},
methods: {
jump () {
this.step += 1
if (this.step == 2) this.$emit('nextStep')
if(this.step == 5) {
this.showNoviceGuide = false
uni.$storage.set('noviceGuideStatus', Date.now())
}
}
}
}
</script>
<style scoped lang='scss'>
.noviceGuide-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10086;
background-color: #000000bf;
.step {
position: absolute;
}
.step-1-1 {
width: 2060rpx;
height: 244rpx;
top: 70rpx;
left: 256rpx;
}
.step-1-2 {
width: 662rpx;
height: 462rpx;
top: 424rpx;
left: 50%;
transform: translateX(-50%);
}
.step-2-1 {
left: 8rpx;
bottom: 152rpx;
width: 294rpx;
height: 120rpx;
}
.step-2-2 {
left: 326rpx;
bottom: 150rpx;
width: 1066rpx;
height: 350rpx;
}
.step-3-1 {
width: 2168rpx;
height: 340rpx;
top: 262rpx;
left: 50%;
transform: translateX(-50%);
}
.step-3-2 {
width: 662rpx;
height: 510rpx;
top: 602rpx;
left: 50%;
transform: translateX(-50%);
}
.step-4-1 {
width: 190rpx;
height: 1248rpx;
top: 96rpx;
right: 20rpx;
}
.step-4-2 {
width: 1074rpx;
height: 312rpx;
top: 50%;
right: 226rpx;
transform: translateY(-50%);
}
.step-5-1 {
width: 190rpx;
height: 192rpx;
bottom: 96rpx;
right: 20rpx;
}
.step-5-2 {
width: 1074rpx;
height: 312rpx;
right: 226rpx;
bottom: 144rpx;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view>
<view <view
class="update-modal" class="update-modal"
v-if="show" v-if="show"
...@@ -6,18 +7,25 @@ ...@@ -6,18 +7,25 @@
<view class="update-box"> <view class="update-box">
<image <image
class="bg" class="bg"
src="@/assets/images/common/update-bg.png" :src="bg"
/> />
<view class="content"> <view class="content">
<view class="title">新版本升级 V.1.1.0</view> <view class="title">新版本升级 V.{{versionData.version}}</view>
<view class="content-item"> <template v-for="(i,index) in versionData.textList">
1、提升使用体验 <view
class="content-item"
:key="index"
>
{{i}}
</view> </view>
<view class="content-item"> </template>
2、修复部分问题
</view> </view>
<view
class="btn"
@click="toMarket"
>立即更新</view>
</view> </view>
<view class="btn" @click="toMarket">立即更新</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -27,7 +35,9 @@ export default { ...@@ -27,7 +35,9 @@ export default {
name: 'updateBox', name: 'updateBox',
data () { data () {
return { return {
show: false show: false,
versionData: {},
bg: require('@/assets/images/common/update-bg.png')
} }
}, },
computed: { computed: {
...@@ -39,6 +49,7 @@ export default { ...@@ -39,6 +49,7 @@ export default {
watchUpdateStatus: { watchUpdateStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.versionData = uni.$storage.get("mock_data")
if (newval) this.show = true if (newval) this.show = true
} }
}, },
...@@ -46,8 +57,10 @@ export default { ...@@ -46,8 +57,10 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
toMarket(){ toMarket () {
plus.runtime.openURL('market://details?id=io.dcloud.hellouniapp') let { appUrl } = this.versionData
if (!appUrl) appUrl = 'market://details?id=io.dcloud.hellouniapp'
plus.runtime.openURL(appUrl)
} }
} }
} }
...@@ -93,8 +106,8 @@ export default { ...@@ -93,8 +106,8 @@ export default {
font-size: 32rpx; font-size: 32rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
&-item{ &-item {
color: #5A5E66; color: #5a5e66;
font-size: 28rpx; font-size: 28rpx;
} }
} }
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
30天内免登录 30天内免登录
</view> </view>
</view> </view>
<update-box />
</view> </view>
</template> </template>
...@@ -77,8 +78,8 @@ export default { ...@@ -77,8 +78,8 @@ export default {
mixins: [loginMixin], mixins: [loginMixin],
data () { data () {
return { return {
mobile: '15626599738', mobile: '',
code: '1', code: '',
count: '', count: '',
noSignIn: false noSignIn: false
}; };
......
...@@ -53,7 +53,6 @@ export default { ...@@ -53,7 +53,6 @@ export default {
}, },
methods: { methods: {
changeView (index) { changeView (index) {
console.log()
this.viewIndex = index this.viewIndex = index
}, },
} }
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<view class="qr-box flex"> <view class="qr-box flex">
<image <image
class="qr" class="qr"
src="@/assets/images/common/qr.png" :src="qr"
/> />
使用企业微信扫码 使用企业微信扫码
</view> </view>
...@@ -56,7 +56,8 @@ export default { ...@@ -56,7 +56,8 @@ export default {
name: '', name: '',
data () { data () {
return { return {
tool: ['使用反馈', '功能建议', '心得分享', '吐槽拍砖'] tool: ['使用反馈', '功能建议', '心得分享', '吐槽拍砖'],
qr: require('@/assets/images/common/qr.png')
} }
}, },
mounted () { mounted () {
......
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
></MessageBox> ></MessageBox>
<update-box /> <update-box />
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<novice-guide @nextStep="nextStep" />
</view> </view>
</template> </template>
<script> <script>
...@@ -139,9 +140,10 @@ import myClick from "@/mixin/click"; ...@@ -139,9 +140,10 @@ import myClick from "@/mixin/click";
import detail from '../detail/detail' import detail from '../detail/detail'
import KfBox from './components/KfBox' import KfBox from './components/KfBox'
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import NoviceGuide from '@/components/NoviceGuide.vue'
export default { export default {
mixins: [myClick], mixins: [myClick],
components: { detail, KfBox }, components: { detail, KfBox, NoviceGuide },
data () { data () {
return { return {
moduleList: [], moduleList: [],
...@@ -252,6 +254,11 @@ export default { ...@@ -252,6 +254,11 @@ export default {
}, },
openKf () { openKf () {
this.$refs.kfRef.open() this.$refs.kfRef.open()
},
nextStep(){
let {id} = this.moduleList[0]
this.type = 'preview'
this.id = id
} }
}, },
...@@ -378,16 +385,15 @@ export default { ...@@ -378,16 +385,15 @@ export default {
background-image: linear-gradient(90deg, #48d7ff, #445dff, #48d7ff); background-image: linear-gradient(90deg, #48d7ff, #445dff, #48d7ff);
background-size: 200% 100%; background-size: 200% 100%;
animation: shine 2s linear infinite; animation: shine 2s linear infinite;
.icon-start{ .icon-start {
animation: rotate-icon 1.2s linear; animation: rotate-icon 1.2s linear;
} }
} }
@keyframes rotate-icon { @keyframes rotate-icon {
0%{ 0% {
transform: rotate(0); transform: rotate(0);
} }
100%{ 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
...@@ -448,10 +454,10 @@ export default { ...@@ -448,10 +454,10 @@ export default {
margin: 0 40rpx; margin: 0 40rpx;
} }
&::before{ &::before {
background-image: linear-gradient(270deg, #EEEEEE 0%, #d8d8d800 100%); background-image: linear-gradient(270deg, #eeeeee 0%, #d8d8d800 100%);
} }
&::after{ &::after {
background-image: linear-gradient(90deg, #eeeeee 0%, #d8d8d800 100%); background-image: linear-gradient(90deg, #eeeeee 0%, #d8d8d800 100%);
} }
} }
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
:duration="1500" :duration="1500"
></uni-popup-message> ></uni-popup-message>
</uni-popup> </uni-popup>
<update-box />
</view> </view>
</template> </template>
<script> <script>
......
...@@ -12,7 +12,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -12,7 +12,8 @@ export const STORAGE_OBJECTkEY = {
mock_data: "mock_data", mock_data: "mock_data",
storageFile: "storageFile", storageFile: "storageFile",
userInfo: 'userInfo', userInfo: 'userInfo',
noSignInUuid: 'noSignInUuid' noSignInUuid: 'noSignInUuid',
noviceGuideStatus:'noviceGuideStatus'
}; };
// export const IMG_VERSION = async () => { // export const IMG_VERSION = async () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!