Commit 033b5557 by 张卓

Merge branch 'nativehome_tst' of http://code.mayi888.com/chengmo/mayi-mp-shop into nativehome_tst

parents 9d2024a7 291b6430
......@@ -19,6 +19,10 @@
>{{this.$store.state.sceneModule.songCopyright.some(item=>item==shopInfo.shopCode)?'送颂科技提供技术支持':'小工蚁(上股交N板企业300258)提供平台服务'}}</p> -->
</div>
<div class="height7"></div>
<div class="hide-wrap" v-if="showHideWrap" @click="showActionSheet">
<i class="ant-fenlei-line" style="font-size:22px"></i>
</div>
</div>
</template>
......@@ -30,18 +34,82 @@ export default {
shopInfo: {
logoUrl:''
},
showVConsole : 0,
showHideWrap : false,
};
},
created(){
this.shopInfo = this.mpApp.globalData.shopInfo
this.shopInfo.logoUrl = DFSImg(this.shopInfo.logoUrl, 400, 400)
console.log(this.shopInfo,'mpapp123')
if(wx.getStorageSync('workBox')){
this.showHideWrap = true
}
},
onLoad() {
},
onShow(){
},
methods:{
showVConsoles(){
this.showVConsole++;
if (this.showVConsole >= 10) {
this.showVConsole=0;
wx.setStorageSync('workBox','1')
this.showHideWrap = true
}
},
showActionSheet(){
let vm = this
wx.showActionSheet({
itemList: ['复制页面路径', '隐藏工具箱'],
success (res) {
console.log(res.tapIndex)
if(res.tapIndex == 0){
vm.copyUrl()
}else if(res.tapIndex == 1){
vm.hideUtils()
}
},
fail (res) {
console.log(res.errMsg)
}
})
},
copyUrl(){
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
let route = currentPage.route
let options = currentPage.options
console.log(route,options,'currentPage')
let query = ''
for(let attr in options){
query = attr + '=' + options[attr] + '&'
}
let href = '/' + route
if(query){
href += '?' + query
}
console.log(query)
wx.setClipboardData({
data: href,
success (res) {
}
})
},
hideUtils(){
this.showHideWrap = false
wx.removeStorageSync('workBox','1')
}
}
}
</script>
......@@ -84,4 +152,19 @@ export default {
height: 50px;
}
}
.hide-wrap{
width: 40px !important;
height: 40px;
border-radius: 50%;
background-color: white;
position: fixed;
bottom: 100px;
right: 20px;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
font-size: 20px;
}
</style>
......@@ -339,15 +339,15 @@ export default {
if (val == 1) {
// 分类
query = {
categoryName: this.classifName,
classifyName: this.classifName,
pageNum : 1,
pageSize: 10,
pageSize: 6,
articleStatus: 1,
};
if (
query.categoryName == "" ||
query.categoryName == null ||
query.categoryName == "null"
query.classifyName == "" ||
query.classifyName == null ||
query.classifyName == "null"
) {
this.initQuery();
if (!this.render) {
......
......@@ -50,9 +50,14 @@ export default {
onLoad(options) {
let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : "";
if (!ss) {
this.params += this.params.includes("logOut") ? "" : "&logOut=true";
}
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
// tabbar 跳转
let homeIndex = checkTabbarPage("/");
homeIndex != 0 && homeIndex == this.index && (this.index = 0);
......
......@@ -105,7 +105,6 @@
<apply-sucess-entry></apply-sucess-entry>
</div>
<!-- 底部栏 -->
{{active}}
<custom-tab-bar class="custom-tab-bar" :selected="active"></custom-tab-bar>
</div>
</template>
......@@ -238,13 +237,16 @@ export default {
this.getSpokesmanInit(options)
}else {
let footerVal = {...app.globalData.footerVal};
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
res.show = false
}
})
app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init();
console.log('"分销员中心"',footerVal)
if (footerVal.componentData) {
footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
res.show = false
}
})
app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init();
}
}
// 来源
if (options.from == "logout") {
......
......@@ -77,8 +77,14 @@ export default {
},
onLoad(options) {
this.options = options;
Object.assign(this.$data, this.$options.data());
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
let op=wx.getStorageSync("openid")
if (op) {
this.params += '&open_id='+wx.getStorageSync("openid");
......@@ -309,17 +315,6 @@ export default {
this.init();
},
onShow(){
let ss=wx.getStorageSync("sessionid");
if (ss && !this.params.includes("sessionid")) {
this.params +=`&sessionid=${ss}`
}
console.log(this.getTabBar,'312')
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
this.getTabBar().setData({
selected: this.index
})
}
},
methods: {
init() {
......
......@@ -59,12 +59,10 @@ const componentOptions = {
},
showPopup() {
this.setData({ showPop: true });
this.getTabBar().setData({ show: false });
},
onClose() {
this.setData({ showPop: false });
this.getTabBar().setData({ show: true });
},
cancel() {
this.onClose();
......
......@@ -4,8 +4,8 @@
{{datas.singleItemActivityName}}
</view>
<view class="cover">
<image mode="center" src="{{datas.singleItemActivityCoverImage}}"></image>
</view>
<image mode="aspectFit" src="{{datas.singleItemActivityCoverImage}}"></image>
</view>
<view class="countDown flex" wx:if="{{countDownShow}}">
<van-count-down
use-slot
......
......@@ -232,7 +232,7 @@ const componentOptions = {
new Date(item.endTime.replace(/-/g, "/")).getTime() -
new Date().getTime();
item.singleItemActivityCoverImage = DFSImg(
item.singleItemActivityCoverImage,400,400
item.singleItemActivityCoverImage,400,400,1
);
item.isStart =
new Date(item.startTime.replace(/-/g, "/")).getTime() >
......
const app = getApp();
Component({
properties:{
selected:{
type:Number,
default:-1
properties: {
selected: {
type: Number,
default: -1
}
},
data: {
// selected: -1,
color: "#7A7E83",
selectedColor: "#3cc51f",
list: [
......@@ -32,10 +32,9 @@ Component({
});
};
}
this.setData({
mmm: Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1),
selected:this.data.active
});
// this.setData({
// mmm: Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1)
// });
},
attached() {
this.init()
......@@ -46,7 +45,7 @@ Component({
if (app.globalData.footerVal) {
let mm =
Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1) ==
that.data.selected &&
that.data.selected &&
app.globalData.footerVal.componentData["styleSelectionNum"] == 1;
that.setData({
......@@ -54,19 +53,17 @@ Component({
list: app.globalData.footerVal.componentData.list,
mm: mm
});
console.log(this.data.list,1111111132333)
} else {
app.footerCallBack = function(params) {
params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)':params.componentData.selectIconColor
app.footerCallBack = function (params) {
params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)' : params.componentData.selectIconColor
that.setData({
componentData: params.componentData,
list: params.componentData.list
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&&params.componentData['styleSelectionNum']==1)
});
let mm =
Math.ceil(params.componentData.list.length / 2 - 1) ==
that.data.selected &&
that.data.selected &&
params.componentData["styleSelectionNum"] == 1;
};
}
......@@ -78,19 +75,8 @@ Component({
},
switchTab(e) {
const { index } = e.currentTarget.dataset;
if (index==this.data.selected) return
app.$themeToLink(this.data.list[index]["link"], 1);
},
toPage(data, index) {
// 跳转
if (data.link == "/") {
wx.switchTab({
url: "/pages/home/main"
});
} else {
wx.switchTab({
url: `/pages/tabBar${index}/main`
});
}
}
}
});
{
"component": true
"component": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -13,7 +13,6 @@
data-index="{{index}}"
bindtap="switchTab"
>
<!-- {{index}}{{selected}}--{{Math.ceil(5/2-1)}}--{{mm}} -->
<!-- &&componentData['styleSelectionNum']==1 -->
<!-- 图标 -->
<view class="item {{index == selected ? 'current' : ''}}">
......
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