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 @@ ...@@ -19,6 +19,10 @@
>{{this.$store.state.sceneModule.songCopyright.some(item=>item==shopInfo.shopCode)?'送颂科技提供技术支持':'小工蚁(上股交N板企业300258)提供平台服务'}}</p> --> >{{this.$store.state.sceneModule.songCopyright.some(item=>item==shopInfo.shopCode)?'送颂科技提供技术支持':'小工蚁(上股交N板企业300258)提供平台服务'}}</p> -->
</div> </div>
<div class="height7"></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> </div>
</template> </template>
...@@ -30,18 +34,82 @@ export default { ...@@ -30,18 +34,82 @@ export default {
shopInfo: { shopInfo: {
logoUrl:'' logoUrl:''
}, },
showVConsole : 0,
showHideWrap : false,
}; };
}, },
created(){ created(){
this.shopInfo = this.mpApp.globalData.shopInfo this.shopInfo = this.mpApp.globalData.shopInfo
this.shopInfo.logoUrl = DFSImg(this.shopInfo.logoUrl, 400, 400) this.shopInfo.logoUrl = DFSImg(this.shopInfo.logoUrl, 400, 400)
console.log(this.shopInfo,'mpapp123') console.log(this.shopInfo,'mpapp123')
if(wx.getStorageSync('workBox')){
this.showHideWrap = true
}
}, },
onLoad() { onLoad() {
}, },
onShow(){ onShow(){
}, },
methods:{ 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> </script>
...@@ -84,4 +152,19 @@ export default { ...@@ -84,4 +152,19 @@ export default {
height: 50px; 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> </style>
...@@ -339,15 +339,15 @@ export default { ...@@ -339,15 +339,15 @@ export default {
if (val == 1) { if (val == 1) {
// 分类 // 分类
query = { query = {
categoryName: this.classifName, classifyName: this.classifName,
pageNum : 1, pageNum : 1,
pageSize: 10, pageSize: 6,
articleStatus: 1, articleStatus: 1,
}; };
if ( if (
query.categoryName == "" || query.classifyName == "" ||
query.categoryName == null || query.classifyName == null ||
query.categoryName == "null" query.classifyName == "null"
) { ) {
this.initQuery(); this.initQuery();
if (!this.render) { if (!this.render) {
......
...@@ -50,9 +50,14 @@ export default { ...@@ -50,9 +50,14 @@ export default {
onLoad(options) { onLoad(options) {
let ss = wx.getStorageSync("sessionid"); let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : ""; this.ss = ss ? `&sessionid=${ss}` : "";
if (!ss) { if (!ss) {
this.params += this.params.includes("logOut") ? "" : "&logOut=true"; this.params += this.params.includes("logOut") ? "" : "&logOut=true";
} }
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
// tabbar 跳转 // tabbar 跳转
let homeIndex = checkTabbarPage("/"); let homeIndex = checkTabbarPage("/");
homeIndex != 0 && homeIndex == this.index && (this.index = 0); homeIndex != 0 && homeIndex == this.index && (this.index = 0);
......
...@@ -105,7 +105,6 @@ ...@@ -105,7 +105,6 @@
<apply-sucess-entry></apply-sucess-entry> <apply-sucess-entry></apply-sucess-entry>
</div> </div>
<!-- 底部栏 --> <!-- 底部栏 -->
{{active}}
<custom-tab-bar class="custom-tab-bar" :selected="active"></custom-tab-bar> <custom-tab-bar class="custom-tab-bar" :selected="active"></custom-tab-bar>
</div> </div>
</template> </template>
...@@ -238,6 +237,8 @@ export default { ...@@ -238,6 +237,8 @@ export default {
this.getSpokesmanInit(options) this.getSpokesmanInit(options)
}else { }else {
let footerVal = {...app.globalData.footerVal}; let footerVal = {...app.globalData.footerVal};
console.log('"分销员中心"',footerVal)
if (footerVal.componentData) {
footerVal.componentData.list.forEach(res=>{ footerVal.componentData.list.forEach(res=>{
if(res.link.name=="分销员中心"||res.link.name=="分销商中心") { if(res.link.name=="分销员中心"||res.link.name=="分销商中心") {
res.show = false res.show = false
...@@ -246,6 +247,7 @@ export default { ...@@ -246,6 +247,7 @@ export default {
app.globalData.footerVal = footerVal; app.globalData.footerVal = footerVal;
this.$mp.page.selectComponent(".custom-tab-bar").init(); this.$mp.page.selectComponent(".custom-tab-bar").init();
} }
}
// 来源 // 来源
if (options.from == "logout") { if (options.from == "logout") {
//来自用户登出 //来自用户登出
......
...@@ -77,8 +77,14 @@ export default { ...@@ -77,8 +77,14 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.options = options; this.options = options;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
let op=wx.getStorageSync("openid") let op=wx.getStorageSync("openid")
if (op) { if (op) {
this.params += '&open_id='+wx.getStorageSync("openid"); this.params += '&open_id='+wx.getStorageSync("openid");
...@@ -309,17 +315,6 @@ export default { ...@@ -309,17 +315,6 @@ export default {
this.init(); this.init();
}, },
onShow(){ 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: { methods: {
init() { init() {
......
...@@ -59,12 +59,10 @@ const componentOptions = { ...@@ -59,12 +59,10 @@ const componentOptions = {
}, },
showPopup() { showPopup() {
this.setData({ showPop: true }); this.setData({ showPop: true });
this.getTabBar().setData({ show: false });
}, },
onClose() { onClose() {
this.setData({ showPop: false }); this.setData({ showPop: false });
this.getTabBar().setData({ show: true });
}, },
cancel() { cancel() {
this.onClose(); this.onClose();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{{datas.singleItemActivityName}} {{datas.singleItemActivityName}}
</view> </view>
<view class="cover"> <view class="cover">
<image mode="center" src="{{datas.singleItemActivityCoverImage}}"></image> <image mode="aspectFit" src="{{datas.singleItemActivityCoverImage}}"></image>
</view> </view>
<view class="countDown flex" wx:if="{{countDownShow}}"> <view class="countDown flex" wx:if="{{countDownShow}}">
<van-count-down <van-count-down
......
...@@ -232,7 +232,7 @@ const componentOptions = { ...@@ -232,7 +232,7 @@ const componentOptions = {
new Date(item.endTime.replace(/-/g, "/")).getTime() - new Date(item.endTime.replace(/-/g, "/")).getTime() -
new Date().getTime(); new Date().getTime();
item.singleItemActivityCoverImage = DFSImg( item.singleItemActivityCoverImage = DFSImg(
item.singleItemActivityCoverImage,400,400 item.singleItemActivityCoverImage,400,400,1
); );
item.isStart = item.isStart =
new Date(item.startTime.replace(/-/g, "/")).getTime() > new Date(item.startTime.replace(/-/g, "/")).getTime() >
......
const app = getApp(); const app = getApp();
Component({ Component({
properties:{ properties: {
selected:{ selected: {
type:Number, type: Number,
default:-1 default: -1
} }
}, },
data: { data: {
// selected: -1,
color: "#7A7E83", color: "#7A7E83",
selectedColor: "#3cc51f", selectedColor: "#3cc51f",
list: [ list: [
...@@ -32,10 +32,9 @@ Component({ ...@@ -32,10 +32,9 @@ Component({
}); });
}; };
} }
this.setData({ // this.setData({
mmm: Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1), // mmm: Math.ceil(app.globalData.footerVal.componentData.list.length / 2 - 1)
selected:this.data.active // });
});
}, },
attached() { attached() {
this.init() this.init()
...@@ -54,16 +53,14 @@ Component({ ...@@ -54,16 +53,14 @@ Component({
list: app.globalData.footerVal.componentData.list, list: app.globalData.footerVal.componentData.list,
mm: mm mm: mm
}); });
console.log(this.data.list,1111111132333)
} else { } else {
app.footerCallBack = function(params) { app.footerCallBack = function (params) {
params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)':params.componentData.selectIconColor params.componentData.selectIconColor = app.globalData.footerVal.componentData.selectIconBackground == 1 ? 'val(--main-color)' : params.componentData.selectIconColor
that.setData({ that.setData({
componentData: params.componentData, componentData: params.componentData,
list: params.componentData.list list: params.componentData.list
// mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&&params.componentData['styleSelectionNum']==1) // mm:(Math.ceil(params.componentData.list.length/2-1)==that.data.selected&&params.componentData['styleSelectionNum']==1)
}); });
let mm = let mm =
Math.ceil(params.componentData.list.length / 2 - 1) == Math.ceil(params.componentData.list.length / 2 - 1) ==
that.data.selected && that.data.selected &&
...@@ -78,19 +75,8 @@ Component({ ...@@ -78,19 +75,8 @@ Component({
}, },
switchTab(e) { switchTab(e) {
const { index } = e.currentTarget.dataset; const { index } = e.currentTarget.dataset;
if (index==this.data.selected) return
app.$themeToLink(this.data.list[index]["link"], 1); 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 @@ ...@@ -13,7 +13,6 @@
data-index="{{index}}" data-index="{{index}}"
bindtap="switchTab" bindtap="switchTab"
> >
<!-- {{index}}{{selected}}--{{Math.ceil(5/2-1)}}--{{mm}} -->
<!-- &&componentData['styleSelectionNum']==1 --> <!-- &&componentData['styleSelectionNum']==1 -->
<!-- 图标 --> <!-- 图标 -->
<view class="item {{index == selected ? 'current' : ''}}"> <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