Commit 723301ff by 谢中龙

优化功能

parent ce6d52b6
......@@ -16,6 +16,7 @@ App({
// 默认 false
wx.setStorageSync('reLoginErr', false)
try {
this.checkForUpdate();
let res = wx.getSystemInfoSync(); // 获取当前运行环境
config.pixelRate = res.windowWidth / 750;
config.platform = res.platform;
......@@ -37,12 +38,40 @@ App({
} catch (e) {
console.log(err);
}
},
//检查新版本
checkForUpdate(){
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate)
});
updateManager.onUpdateReady(function () {
wx.showModal({
title: '更新提示',
content: '已有小程序新版本,是否重启应用?',
success: function (res) {
if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate()
}
}
})
})
updateManager.onUpdateFailed(function () {
// 新版本下载失败
})
},
onShow: function (options = {}) {
console.log('场景值 ========', options.scene)
console.log('场景值1 ========', options.scene)
let scene = wx.getLaunchOptionsSync().scene;
console.log('场景值2 ========',scene)
//判断是不是在企业微信中通过工作台打开的
if(options.scene == 1119){
if (options.scene == 1119 || scene == 1119){
wx.redirectTo({
url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
});
......
......@@ -5,7 +5,7 @@
// 组件plus 中数据请求 token 修改
// app.js 中brandId 修改为对应
const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const needMock = '' //
// 舞象联系我 :766c50920993bf9c41c6c3d2761a2df5
//泰华 联系我 :6e4314d558e55fbc64fe2e757e24d61f
......@@ -54,7 +54,7 @@ const needMock = '' //
* appId = wx40fec8944623c8b3
* tunnel-token = 8724303981a00b56869f3d26f7a6c643
* brandId= 2006
* contactUspluginId = 6e4314d558e55fbc64fe2e757e24d61f 联系我插件id
* contactUspluginId = a6ea55b56eb09ced8f9aeeaa14383b52 联系我插件id
*/
......@@ -119,7 +119,7 @@ const envInfo = (() => {
imgCtx: imgConfig[PROJECT_ENV],
tunnelToken: token[PROJECT_ENV],
appId: appId[PROJECT_ENV],
brandId: 1002,// 1001 1002 3001 3002 //2711 711生产brandId,
brandId: 3001,// 1001 1002 3001 3002 //2711 711生产brandId,
plusIsOpen : true, //是否开启plus
}
})()
......
......@@ -200,6 +200,7 @@ wxService.page({
})
}
},
// 查询积分信息
getMemberPointInfo() {
wx.showLoading({
......
......@@ -59,7 +59,7 @@
bind:completemessage="completemessage"
plugid='766c50920993bf9c41c6c3d2761a2df5' />
<!-- 766c50920993bf9c41c6c3d2761a2df5 -->
<!-- 泰华 6e4314d558e55fbc64fe2e757e24d61f -->
<!-- 泰华 a6ea55b56eb09ced8f9aeeaa14383b52 -->
</view>
<!-- 联系我点击成功之后的回调 -->
<contact-us-modal contactShow="{{contactUsModal}}"/>
\ No newline at end of file
......@@ -13,7 +13,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wxac09792264c49b5c",
"appid": "wx313ec36b710125d4",
"projectname": "%E5%BE%AE%E5%95%86%E5%9F%8E",
"debugOptions": {
"hidedInDevtools": []
......
......@@ -26,7 +26,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{guidCollege.noData}}">暂无数据~</view>
<view class='empty' wx:if="{{guidCollege.list.length == 0}}">暂无数据~</view>
</view>
<!-- 品牌营销 -->
<view class='guid' wx:if="{{current == 2}}">
......@@ -42,7 +42,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{brandPromotions.noData}}">暂无数据~</view>
<view class='empty' wx:if="{{brandPromotions.list.length == 0}}">暂无数据~</view>
</view>
<!-- 产品素材 -->
<view class='guid' wx:if="{{current == 3}}">
......@@ -58,7 +58,7 @@
<view class='guid-item-title'>{{item.title}}</view>
</view>
<!-- 空时 -->
<view class='empty' wx:if="{{productFiles.noData}}">暂无数据~</view>
<view class='empty' wx:if="{{productFiles.list.length == 0}}">暂无数据~</view>
</view>
</view>
<!-- tabbar -->
......
......@@ -123,13 +123,13 @@ wxService.page({
//改变二位方式
onTapChangeType(e){
let index = e.currentTarget.dataset.index;
if(index == 0){
wx.showToast({
title: '对不起,暂不支持此功能',
icon : 'none'
});
return ;
}
// if(index == 0){
// wx.showToast({
// title: '对不起,暂不支持此功能',
// icon : 'none'
// });
// return ;
// }
this.data.bottomTypeArr.map(item => {
item.active = false;
......@@ -148,7 +148,6 @@ wxService.page({
//根据类型切换qrcode
changeQrcode(){
console.log(this.data.currentBottomType)
if(this.data.currentBottomType == 2){ //企业二维码
this.getEnterpriseQrcode();
}
......@@ -164,19 +163,19 @@ wxService.page({
getOpenCardPageQrcode(){
//先生成触点对象信息
let currentUserInfo = wx.getStorageSync('guidBaseInfo');
// if (!currentUserInfo) { //未登录成功
// wx.redirectTo({
// url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
// });
// return;
// }
currentUserInfo = {
member : {
id: '588024219670024192'
}
if (!currentUserInfo) { //未登录成功
wx.redirectTo({
url: '/shoppingGuid/page/pages/welcomGuider/welcomGuider',
});
return;
}
// currentUserInfo = {
// member : {
// id: '588024219670024192'
// }
// }
wx.showLoading({
title: '触点生成中..',
});
......
......@@ -604,17 +604,21 @@ class WXService extends Http {
pageIsFromShare = true;
let idParam = decodeURIComponent(item['scene']).split('&')[0];
let shareId = idParam && idParam.split('=')[1] || 0;
console.log(shareId)
console.log(idParam)
//处理pageId的
if (idParam.indexOf('pageId') > -1){
item['pageId'] = shareId;
}
//
item['id'] = Integer.digit(shareId, 64, 10)
id = item['id'];
if (shareId && shareId !=0){
item['id'] = Integer.digit(shareId, 64, 10)
id = item['id'];
}
}
});
//如果打开的是分享界面则进行触点对象信息请求并存储到本地 放到后续的header中
if (pageIsFromShare) {
if (pageIsFromShare && id) {
//调用接口
_self.getTentacleContentByTentacleId(id);
}
......
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