初始化

This commit is contained in:
itgaojian 2023-07-11 14:36:08 +08:00
parent 859d40a127
commit cb5d2ffe8d
10 changed files with 189 additions and 160 deletions

7
app.js
View File

@ -17,9 +17,10 @@ App({
liveUrl: restAjax.url + 'live',
liveRecordUrl: restAjax.baseUrl,
socialUrl: restAjax.baseUrl,
areaCode: '540200000000',
areaName: '日喀则市',
areaId: '640675',
areaCode: '540237000000',
areaName: '岗巴县',
areaId: '642536',
appKey:'wxf09039899a800865',
shopUrl: restAjax.url + "xzshop",
bigDataUrl: restAjax.url + "module",
restAjax: restAjax,

View File

@ -62,7 +62,7 @@
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#9F1512",
"navigationBarTitleText": "日喀则市数字文化云",
"navigationBarTitleText": "岗巴县公共文化数字云",
"navigationBarTextStyle": "white"
},
"tabBar": {

View File

@ -64,7 +64,7 @@ Page({
// 上传
uploadAvatar: function (avatarId) {
var self = this
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateuseravatar', [app.usercenterUrl]), {
app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/update-avatar', [app.usercenterUrl]), {
avatar: avatarId
}, {
headers: {
@ -246,6 +246,11 @@ Page({
})
self.getUserInfo()
app.dialog.msg('绑定成功');
},function(code,error){
self.setData({
isLoading: false
})
app.dialog.msg(error.msg)
})
} else {
self.setData({

View File

@ -3,7 +3,7 @@
</view>
<view class="page-container">
<view class="person">
<view class="user-avatar" bindtap="changeAvatar" wx:if="{{userInfo.avatar}}">
<view class="user-avatar" bindtap="changeAvatar" >
<image src="{{usercenterUrl}}{{sourcePath}}{{userInfo.avatar}}"></image>
</view>
<view class="user-name">{{userInfo.name}}</view>

View File

@ -41,9 +41,9 @@ Page({
wx.login({
success(res) {
if (res.code) {
wx.setStorageSync('token', 'REQ5NW5IZTZjS2ZyQU9QQmFKZ1FIRmVhbjNFZmV4dEx3emdob2g5UjVXaForWGdpOHFIRWgyTWRIelJFWkhNS28wN1hUV2Uwb0FKSUEra2wzYVhXdnI4aG9odkxLd3ZFUGkrTTQwQTkzdyt3cnN3NkY4OE9aaGw0aUJPTUNSaENKbGxTdm8xR3Z5WTJBV0NDcWRpbEd3OW0zUzA3US8xMmUyaTU2a0N4YmN5d1FjTXd6aTZIZkhhdmpsSDlqYSt0OUJVUHRSbTJqSVd6eHlYc1M5WTlkK015MVR2R083T3crU2wrdVFmVGk4N3NHWmZNY1A3SGNNbm8xMDFMTy9tcTN2K0NuQTZJbk9YZGJqK3drQkxlMXNUVjZZNkZyRE9LMGdYdUQzSE9lbDQ9');
app.restAjax.post(app.restAjax.path('{url}/wechat-miniapp/sign/default', [app.loginUrl]), {
jsCode: res.code
app.restAjax.post(app.restAjax.path('{url}/wechat-miniapp/sign/default-multi', [app.loginUrl]), {
jsCode: res.code,
appKey:app.appKey
}, null, function (code, data) {
console.log(data)
var tokenArray = data.data.split('_');
@ -354,7 +354,7 @@ Page({
})
self.doLogin();
self.doGetBanner();
self.doGetLiveList();
// self.doGetLiveList();
self.doGetVenueList();
self.doGetActivityList();
self.getMainFunc();

View File

@ -5,7 +5,7 @@
</swiper-item>
</swiper>
</view>
<scroll-view scroll-x="true">
<view class="tab">
<block wx:for="{{mainFuncList}}" wx:key="index">
<view class="tab-box" bindtap="openNewsDetail" data-item="{{item}}">
@ -29,11 +29,13 @@
<image src="../../images/tab4.png"></image>
<view class="tab-title">非遗文化</view>
</view>
<view class="tab-box" bindtap="goBroadcast">
<!-- <view class="tab-box" bindtap="goBroadcast">
<image src="../../images/tab5.png"></image>
<view class="tab-title">直播点播</view>
</view> -->
</view>
</view>
</scroll-view>
<view class="line-thick"></view>
<view class="recommend">
<view class="public-title">
<view class="title-text">
@ -42,7 +44,7 @@
<image src="../../images/selected-r.png" class="selected-r"></image>
</view>
</view>
<view class="line"></view>
<scroll-view scroll-x="true" style="margin-top: 10rpx;">
<view class="recommend-container">
<view class="recommend-box" wx:for="{{venue.venueList}}" bindtap="goVenueDetail" data-venues-info-Id="{{item.venuesInfoId}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
<view class="recommend-status">场馆导航</view>
@ -55,7 +57,9 @@
<image src="{{activity.activityUrl}}/route/file/download/true/{{item.activityImageArray[0]}}" data-index="{{index}}" binderror="loadImgErr"></image>
</view>
</view>
</scroll-view>
</view>
<view class="line-thick"></view>
<view class="news" wx:if="{{mainNewTab.length>0}}">
<block wx:for="{{mainNewTab}}" wx:key="i" wx:for-item="it" wx:for-index="i">
<view class="public-title">
@ -141,7 +145,7 @@
</block>
</block>
</view>
<view class="broadcast">
<!-- <view class="broadcast">
<view class="public-title">
<view class="title-text">
<image src="../../images/selected-l.png" class="selected-l"></image>
@ -160,7 +164,7 @@
<view class="broadcast-status" wx:else>错误</view>
</view>
</view>
</view>
</view> -->
<view wx:if="{{isHide}}" class="search-box" bindtap="openSearch">
<image src="/images/ic_search_gray.png" mode="scaleToFill"></image>
</view>

View File

@ -34,9 +34,18 @@ swiper {
.tab {
padding: 30rpx;
display: flex;
border-bottom: 5px solid #FBFBFB;
flex-wrap: nowrap;
overflow-x: scroll;
}
.tab-arrow {
font-size: 28rpx;
background: #242424;
text-align: center;
justify-content: center;
align-items: center;
position: absolute;
right: 0rpx;
padding: 20rpx;
}
.tab-box {
@ -56,14 +65,11 @@ swiper {
.recommend {
padding: 0rpx 30rpx 30rpx 30rpx;
border-bottom: 5px solid #FBFBFB;
}
.recommend-container {
width: 100%;
display: flex;
overflow-x: auto;
margin-top: 10rpx;
}
.line {
@ -72,6 +78,12 @@ swiper {
background: #f2f2f2;
}
.line-thick {
width: 100%;
height: 10rpx;
background: #f2f2f2;
}
.recommend-box {
flex-shrink: 0;
width: 220rpx;

View File

@ -73,7 +73,6 @@ Page({
currentPage: page,
'news.newsList': newsArray
})
console.log(self.data.news.newsList)
if (data.rows.length == 0) {
app.dialog.msg('暂无数据');
return;
@ -137,5 +136,11 @@ Page({
self.doGetNewsDictionariesList();
self.getAreaList();
},
onReachBottom() {
this.setData({
currentPage: this.data.currentPage + 1
})
this.doGetNewsList(this.data.currentPage)
}
})

View File

@ -85,7 +85,7 @@
border-bottom: 1px solid #ddd;
}
.venue-intro{
padding: 0 20rpx 20rpx;
padding: 0 20rpx 100rpx;
margin-bottom: 110rpx;
}
.intro-title{

View File

@ -2,6 +2,8 @@
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.30.0",
"setting": {
"urlCheck": false
}
"urlCheck": false,
"compileHotReLoad": true
},
"projectname": "xz_gangba"
}