Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_qmhh_web into yufei

pull/8/head
余菲 1 year ago
parent
commit
5b1e0f722d
4 changed files with 35 additions and 20 deletions
  1. +15
    -3
      package_first/pages/beautyList/index.js
  2. +1
    -1
      package_first/pages/beautyList/index.wxml
  3. +18
    -15
      pages/FirstPage/index.js
  4. +1
    -1
      pages/FirstPage/index.wxml

+ 15
- 3
package_first/pages/beautyList/index.js View File

@@ -1,4 +1,6 @@
// package_first/pages/upload/index.js
import {getUserInfo} from '../../../utils/getUserInfo.js'

Page({

/**
@@ -7,6 +9,7 @@ Page({
data: {
// 列表数据筛选条件
list: [],
params: {},
current: "/index/westreamScenery/page",
},

@@ -40,9 +43,18 @@ Page({
},
/* 跳转上报问题页面 */
uploadBeauty(e) {
wx.navigateTo({
url: '/package_first/pages/uploadBeauty/index',
})
const openId = wx.getStorageSync('openId')
if(openId) {
wx.navigateTo({
url: '/package_first/pages/uploadBeauty/index',
})
} else {
getUserInfo().then(res=> {
wx.navigateTo({
url: '/package_first/pages/uploadBeauty/index',
})
})
}
},
/* 跳转至详情页 */
showDetail(e) {

+ 1
- 1
package_first/pages/beautyList/index.wxml View File

@@ -1,7 +1,7 @@
<!--package_first/pages/upload/index.wxml-->
<view class="beauty_container">
<!-- 列表 -->
<list id="list" class="beauty_list" url="{{current}}" bind:update-list="updateList" list="{{list}}" bind:reset-list="resetList">
<list id="list" class="beauty_list" url="{{current}}" bind:update-list="updateList" list="{{list}}" bind:reset-list="resetList" params="{{params}}">
<view class="beauty_item" data-item="{{item}}" bindtap="showDetail" wx:for="{{list}}" wx:key="index">
<view class="item_head">
<image class="user_avatar" src="{{item.headimgurl}}"></image>

+ 18
- 15
pages/FirstPage/index.js View File

@@ -140,24 +140,27 @@ Page({

// 进入对应页面
goPage(e) {
// 判断是否有权限
let positionParams = wx.getStorageSync('positionParams')
let path = e.currentTarget.dataset.path
let type = e.currentTarget.dataset.type
if(Object.keys(positionParams).length) {
if(type === 'tabbar') {
wx.switchTab({
url: path,
})
let title = e.currentTarget.dataset.title
if(title !== '敬请期待') {
// 判断是否有权限
let positionParams = wx.getStorageSync('positionParams')
let path = e.currentTarget.dataset.path
let type = e.currentTarget.dataset.type
if(Object.keys(positionParams).length) {
if(type === 'tabbar') {
wx.switchTab({
url: path,
})
} else {
wx.navigateTo({
url: path,
})
}
} else {
wx.navigateTo({
url: path,
wx.redirectTo({
url: `/pages/login/login?path=${path}&fromType=${type}`,
})
}
} else {
wx.redirectTo({
url: `/pages/login/login?path=${path}&fromType=${type}`,
})
}
},


+ 1
- 1
pages/FirstPage/index.wxml View File

@@ -29,7 +29,7 @@

<!-- 快捷入口 -->
<view class="fast_enters">
<view class="enter_item" wx:for="{{entersList}}" data-path="{{item.path}}" data-type="{{item.type}}" wx:key="index" bindtap="goPage">
<view class="enter_item" wx:for="{{entersList}}" data-path="{{item.path}}" data-title="{{item.title}}" data-type="{{item.type}}" wx:key="index" bindtap="goPage">
<image class="enter_icon" src="{{item.iconPath}}"></image>
<text class="enter_title">{{item.title}}</text>
</view>

Loading…
Cancel
Save