Commit 6303967c by 柳士祥

小程序日志添加

parent 0db371a5
......@@ -569,8 +569,11 @@ export default {
.tabStyle1 {
.van-tabs__line {
height: 30px;
bottom: 6px;
height: auto;
bottom: 4px;
top:4px;
left: 8px;
right: 8px;
border-radius: 38px;
}
}
......@@ -611,8 +614,8 @@ export default {
content: "";
position:absolute;
bottom: 4px;
left: 0;
right: 0;
left: 8px;
right: 8px;
top: 4px;
border-radius: 34px;
background: var(--default-tab-background-bolor);
......@@ -632,8 +635,8 @@ export default {
content: "";
position:absolute;
bottom: 4px;
left: 0;
right: 0;
left: 8px;
right: 8px;
height: 4px;
background: var(--default-tab-underline-color);
z-index: -1;
......
......@@ -11,6 +11,7 @@ import cartApi from './api/cart'
import classificationApi from "./api/classification";
import spokesmanApi from './api/spokesman'
import { DFSImg, concatUrl } from "@/utils/index";
var log = require('./utils/log')
import fenxiaoModel from "@/utils/fenxiaoModel";
import {
$themeAddToCard,
......@@ -133,7 +134,7 @@ mpApp.spokesmanApi = spokesmanApi
mpApp.getThemePage = getThemePage
mpApp.themeColor = {}
mpApp.log = log
function getThemePage({mixid,shopid}) {
shop
......
......@@ -46,6 +46,7 @@ import shop from "@/api/shop";
import indexApi from "@/api/index.js";
import { createdUserJWTApi } from "@/api/daoke";
const app = getApp();
const { log } = app;
export default {
data() {
return {
......@@ -116,7 +117,7 @@ export default {
})
},
onLoad(options) {
console.log(options,'----------------------login-options')
log.info(options,'----------------------login-options')
login.getShopUserProtocol().then(res => {
if(res.data.code == '200') {
this.content = res.data.data;
......@@ -196,9 +197,9 @@ export default {
});
},
addRecord(flag) {
console.log(wx.getStorageSync('attractingCustomerChannelId'))
console.log(this.openid)
console.log(99999)
log.info(wx.getStorageSync('attractingCustomerChannelId'))
log.info(this.openid)
log.info(99999)
//埋点引客渠道
if(wx.getStorageSync('attractingCustomerChannelId')) {
indexApi.addRecord(
......@@ -241,9 +242,9 @@ export default {
try {
wx.setStorageSync('openid', res.data.data.openid)
} catch (e) {
console.log('存入openid失败',e)
log.info('存入openid失败',e)
}
console.log(this.$store.state.mixid,'mixid------230')
log.info(this.$store.state.mixid,'mixid------230')
//冬奥会测试赛(mixid=CL)定制一键登录直接返回不用手机号
let isCertified = false;
// this.mpApp.globalData.shopInfo.outCode正式环境提审测试赛项目 这个值后台改为1 审核通过改为空
......@@ -295,7 +296,7 @@ export default {
this.checkLogin(e);
})
.catch(err => {
console.log("err", err);
log.info("err", err);
wx.hideLoading();
wx.showToast({ title: err, icon: "none" });
});
......@@ -361,7 +362,7 @@ export default {
// 是否跳转h5或小程序
pushPageType(){
//绑定上下级关系
console.log(this.scene,'this.scene====',this.backPath)
log.info(this.scene,'this.scene====',this.backPath)
app.fenxiaoModel.becomeRelation(wx.getStorageSync("becomeInfo")?JSON.parse(wx.getStorageSync("becomeInfo")):'').then(res=>{
if(res) {
wx.removeStorage({
......@@ -371,7 +372,7 @@ export default {
})
let parseLink=decodeURIComponent(this.backPath);
console.log(this.backPath,parseLink,'---------------------------325')
log.info(this.backPath,parseLink,'---------------------------325')
if(parseLink.includes('/pages/')){
wx.reLaunch({
url: parseLink
......@@ -384,14 +385,14 @@ export default {
// 动态表单
createdUserJWTApi().then(res => {
this.backParams += `&token=${res}`;
console.log(this.backParams,`${this.backPath}${this.backParams}`,"-------------------------355")
log.info(this.backParams,`${this.backPath}${this.backParams}`,"-------------------------355")
wx.reLaunch({
url: `../wxArticle/main?link=${this.backPath+this.backParams}`
});
})
}else if (this.scene=='sso' || this.backPath.includes('scene=sso') || this.ossLink.indexOf('scene=sso')>-1) {
let backPath = this.backPath;
console.log(decodeURIComponent(backPath),600000)
log.info(decodeURIComponent(backPath),600000)
if(this.ossLink) {
backPath += '?'+this.ossLink
}
......@@ -434,7 +435,7 @@ export default {
e.mp.detail.encryptedData,
e.mp.detail.iv + ""
).phoneNumber;
console.log("生命周期一直", this.phoneNumber);
log.info("生命周期一直", this.phoneNumber);
this.bindUser();
}
},
......@@ -468,7 +469,7 @@ export default {
query.spokesmanShopId = this.$store.state.spokesmanShopId;
}
console.log(query, "query");
log.info(query, "query");
login
.bindUser(query)
.then(res => {
......@@ -493,7 +494,7 @@ export default {
}
})
.catch(err => {
console.log(err, "bindusererr");
log.info(err, "bindusererr");
});
},
backMainHandle() {
......@@ -512,7 +513,7 @@ export default {
});
},
handbindHandle() {
console.log(this.queryOptions,'---------------options')
log.info(this.queryOptions,'---------------options')
const query = {
openId: this.openid,
unionId: this.unionId,
......@@ -525,8 +526,8 @@ export default {
param: this.queryOptions.param,
back: this.queryOptions.back,
};
console.log(query,'-------------------519')
console.log( serialize(query),'------------------- serialize(query)')
log.info(query,'-------------------519')
log.info( serialize(query),'------------------- serialize(query)')
if(wx.getStorageSync(this.$store.state.mixid+'storeId')) {
query.storeId = wx.getStorageSync(this.$store.state.mixid+'storeId')
}
......
var log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null
module.exports = {
debug() {
if (!log) return
log.debug.apply(log, arguments)
},
info() {
console.log('日志log级别');
if (!log) return
log.info.apply(log, arguments)
},
warn() {
if (!log) return
log.warn.apply(log, arguments)
},
error() {
if (!log) return
log.error.apply(log, arguments)
},
setFilterMsg(msg) { // 从基础库2.7.3开始支持
if (!log || !log.setFilterMsg) return
if (typeof msg !== 'string') return
log.setFilterMsg(msg)
},
addFilterMsg(msg) { // 从基础库2.8.1开始支持
if (!log || !log.addFilterMsg) return
if (typeof msg !== 'string') return
log.addFilterMsg(msg)
}
}
\ No newline at end of file
const app = getApp();
const { goodsApi, DFSImg, $themeToLink, $themeAddToCard } = app;
const { goodsApi, DFSImg, $themeToLink, $themeAddToCard,log } = app;
const componentOptions = {
// 组件选项
options: {
......@@ -26,7 +27,17 @@ const componentOptions = {
observers: {},
// 组件方法
methods: {
init() {},
init() {
let datas = this.data.datas
if(datas.componentData.angleSignImg && datas.componentData.angleSignImg.lenght != 0){
datas.componentData.angleSignImg = DFSImg(datas.componentData.angleSignImg,150,150,1)
}
this.setData({
datas
})
log.info('datas');
},
getSaleTime(val) {
return new Date(val.replace(/-/g, "/")).getTime() - new Date().getTime();
},
......
......@@ -68,7 +68,7 @@ const componentOptions = {
angleSignImg,
titleIcon
} = this.data.datas.componentData;
angleSignImg = DFSImg(angleSignImg);
angleSignImg = DFSImg(angleSignImg,150,150,1);
if (titleIcon) {
titleIcon = DFSImg(titleIcon);
}
......
......@@ -59,7 +59,7 @@ function trackStyle(data) {
function lineStyle(data) {
return style({
width: utils.addUnit(data.lineWidth),
width: utils.addUnit(data.lineWidth - 16),
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
'background-color': data.color,
......@@ -80,3 +80,5 @@ module.exports = {
lineStyle: lineStyle,
navStyle: navStyle,
};
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