Commit 23be374d authored by caimeng's avatar caimeng

1.0.5发布生产

parent 4c031cd0
...@@ -22,7 +22,7 @@ const BASE = { ...@@ -22,7 +22,7 @@ const BASE = {
prod: { prod: {
common: "https://api.yyhock.com", common: "https://api.yyhock.com",
event: 'https://event.jqtianxia.com', event: 'https://event.jqtianxia.com',
h5: 'https://ddang.rockstect.com/index.html#/' h5: 'https://ddang.rockstect.com/v1.0.5.html#/'
} }
} }
let env = process.env.VUE_APP_BASE_NODE_ENV let env = process.env.VUE_APP_BASE_NODE_ENV
...@@ -38,7 +38,7 @@ let env = process.env.VUE_APP_BASE_NODE_ENV ...@@ -38,7 +38,7 @@ let env = process.env.VUE_APP_BASE_NODE_ENV
*/ */
// #ifdef APP-PLUS // #ifdef APP-PLUS
env = "stest"; env = "prod";
// #endif // #endif
const api = { const api = {
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
</template> </template>
<script> <script>
import { ininIndex, initApp, initSettings } from '@/utils/index'
export default { export default {
name: "Agreement", name: "Agreement",
data() { data() {
...@@ -48,10 +47,7 @@ export default { ...@@ -48,10 +47,7 @@ export default {
} }
} }
}, },
async onLoad() { async onShow() {
await ininIndex()
await initApp()
await initSettings()``
await this.init() await this.init()
}, },
methods: { methods: {
...@@ -141,12 +137,7 @@ export default { ...@@ -141,12 +137,7 @@ export default {
}) })
} }
}, },
async onShow() {
await this.init()
await ininIndex()
await initApp()
await initSettings()
}
} }
</script> </script>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<scroll-view class='box-at-home' scroll-y="true" refresher-default-style="none" <scroll-view class='box-at-home' scroll-y="true" refresher-default-style="none"
@scrolltoupper="toupperTop" @scrolltolower="lowerMore"> @scrolltoupper="toupperTop" @scrolltolower="lowerMore">
<view class='main-box' v-show="IndexList && IndexList.length > 0"> <view class='main-box' v-show="IndexList && IndexList.length > 0">
<view class='box-item' v-for="item in IndexList" :key="item.id" @click="goDetail(item)"> <view class='box-item' v-for="(item,index) in IndexList" :key="index" @click="goDetail(item)">
<view class='item-top'> <view class='item-top'>
<image :src="item.goodsImage" class='top-img'></image> <image :src="item.goodsImage" class='top-img'></image>
<i class='top-icon'></i> <i class='top-icon'></i>
...@@ -91,13 +91,12 @@ ...@@ -91,13 +91,12 @@
<script> <script>
import { isLogin, switchShowTabbar, ininIndex } from '@/utils/index' import { isLogin, switchShowTabbar, ininIndex } from '@/utils/index'
const cacheIndexData = uni.getStorageSync('dataIndex') ? JSON.parse(uni.getStorageSync('dataIndex')) : null; const cacheIndexData = uni.getStorageSync('dataIndex') ? JSON.parse(uni.getStorageSync('dataIndex')) : null;
const indexGoods = uni.getStorageSync('indexGoods') ? JSON.parse(uni.getStorageSync('indexGoods')) : [];
export default { export default {
data() { data() {
return { return {
IndexList: indexGoods,
index: cacheIndexData, index: cacheIndexData,
hotList: [ hotList: [
{ title: '浏览量', id: 0 }, { title: '浏览量', id: 0 },
{ title: '价格', id: 1 }, { title: '价格', id: 1 },
...@@ -107,7 +106,7 @@ export default { ...@@ -107,7 +106,7 @@ export default {
showUP: false, showUP: false,
headerHeight: 0, headerHeight: 0,
scrollTop: 0, scrollTop: 0,
IndexList: [],
pageNum: 1, pageNum: 1,
...@@ -190,7 +189,8 @@ export default { ...@@ -190,7 +189,8 @@ export default {
const self = this const self = this
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
const appVersion = res.appVersion console.log(res, '系统信息')
const appVersion = res.appWgtVersion
let platform = res.platform; let platform = res.platform;
// 获取本机版本号 // 获取本机版本号
let type; let type;
...@@ -310,6 +310,9 @@ export default { ...@@ -310,6 +310,9 @@ export default {
} else { } else {
self.IndexList = records self.IndexList = records
} }
uni.setStorageSync('indexGoods', JSON.stringify(self.IndexList))
self.hasNextPage = hasNextPage self.hasNextPage = hasNextPage
self.loadFlag = false self.loadFlag = false
}).catch(err => { }).catch(err => {
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<script> <script>
export default { export default {
async onLoad() { async onLoad() {
const appStart = uni.getStorageSync('appStart') const appStart = uni.getStorageSync('appStart')
console.log(appStart,'ri ')
if (appStart) { if (appStart) {
uni.switchTab({ uni.switchTab({
url: "/pages/index/index" url: "/pages/index/index"
......
...@@ -34,6 +34,7 @@ export default { ...@@ -34,6 +34,7 @@ export default {
await ininIndex() await ininIndex()
await initSettings() await initSettings()
await initApp() await initApp()
if(uni.getStorageSync('APP-SETTING')) this.init()
}, },
methods: { methods: {
init() { init() {
......
...@@ -92,6 +92,10 @@ export default { ...@@ -92,6 +92,10 @@ export default {
}, },
onHide() { onHide() {
// uni.removeStorageSync('hasRefresh') // uni.removeStorageSync('hasRefresh')
const user_info_obj = uni.getStorageSync('user_info_obj')? JSON.parse(uni.getStorageSync('user_info_obj')):{}
user_info_obj.refreshIndex = false
uni.setStorageSync('user_info_obj', JSON.stringify(user_info_obj));
}, },
onShow() { onShow() {
...@@ -126,8 +130,15 @@ export default { ...@@ -126,8 +130,15 @@ export default {
}, 400) }, 400)
} }
}, },
onUnload() { onUnload() {
uni.$off('loadingSubnvue'); //移除监听配置的原生子窗体 uni.$off('loadingSubnvue'); //移除监听配置的原生子窗体
}, },
methods: { methods: {
......
...@@ -88,11 +88,15 @@ export default { ...@@ -88,11 +88,15 @@ export default {
} }
}, },
onUnload() { onUnload() {
console.log('onUnload=+++++++++++')
const wv = this.$scope.$getAppWebview(); const wv = this.$scope.$getAppWebview();
console.log(wv,'WebView ') if(wv){
wv.clear() wv.clear()
wv.close() wv.close()
}
const user_info_obj = uni.getStorageSync('user_info_obj')? JSON.parse(uni.getStorageSync('user_info_obj')):{}
user_info_obj.refreshIndex = true
uni.setStorageSync('user_info_obj', JSON.stringify(user_info_obj));
}, },
methods: { methods: {
handleMessage(e) { handleMessage(e) {
......
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