Commit 06ad052a authored by lvtz's avatar lvtz

fix

parent 3ad5f6bd
var app = getApp();
import { pointsGoodsGet } from "../../../service/business/points.js";
import { getSubjectTemplates } from "../../../service/business/common.js";
Page({
data: {
localImageRoot: "../../../images/",
......@@ -21,7 +21,6 @@ Page({
});
this.getTemplateList("init");
},
onShow: function() {},
onReachBottom: function() {
this.getTemplateList("up");
},
......@@ -35,10 +34,8 @@ Page({
this.setData({
listLoading: true
});
pointsGoodsGet({
page: this.data.page,
perPage: this.data.perPage,
school_id: 449
getSubjectTemplates({
subject_type: 1
})
.then(res => {
const { code, data } = res;
......@@ -71,46 +68,36 @@ Page({
}
break;
case "down": // 页面下拉刷新
this.setData(
{
templateList: [data.list]
},
() => {
if (
this.data.total >
this.caculateArrLength(this.data.templateList)
) {
this.data.page = this.data.page + 1;
} else {
// 没有更多了
this.setData({
hasmore: false
});
}
}
);
this.setData({
templateList: [data.list]
});
if (
this.data.total > this.caculateArrLength(this.data.templateList)
) {
this.data.page = this.data.page + 1;
} else {
// 没有更多了
this.setData({
hasmore: false
});
}
wx.stopPullDownRefresh();
break;
case "up": // 页面上拉刷新
let list = this.data.templateList;
this.setData(
{
[`templateList[${this.data.page - 1}]`]: data.list
},
() => {
if (
this.data.total >
this.caculateArrLength(this.data.templateList)
) {
this.data.page = this.data.page + 1;
} else {
// 没有更多了
this.setData({
hasmore: false
});
}
}
);
this.setData({
[`templateList[${this.data.page - 1}]`]: data.list
});
if (
this.data.total > this.caculateArrLength(this.data.templateList)
) {
this.data.page = this.data.page + 1;
} else {
// 没有更多了
this.setData({
hasmore: false
});
}
break;
default:
break;
......@@ -141,20 +128,14 @@ Page({
},
bindTemplateSelected(e) {
const { id } = e.currentTarget.dataset;
console.log(id);
wx.showModal({
title: "提示一下",
content: `选择的id是${id},然后没有然后`,
showCancel: false,
confirmColor: "#64B8F5"
wx.showToast({
title: `模板id是${id}`,
icon: 'none'
});
},
createCustom() {
wx.showModal({
title: "提示",
content: `不知道跳哪去`,
showCancel: false,
confirmColor: "#64B8F5"
});
wx.navigateTo({
url: `/business/pages/themeeditor/index?id=0&tid=0&sid=3`
})
}
});
......@@ -3,7 +3,8 @@
<view class="list clearfix" wx:if="{{!emptyPage}}">
<block wx:for="{{templateList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="item" wx:for="{{bigitem}}" wx:for-item="item" data-id="{{item.id}}" wx:key="index" bindtap="bindTemplateSelected">
<image class="item-cover" src="{{filter.imagify(item.cover)}}" mode="aspectFill"></image>
<image class="item-cover" src="{{filter.imagify(item.cover)}}" mode="aspectFill" wx:if="{{item.cover}}"></image>
<image class="item-cover" src="https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png" mode="aspectFill" wx:else></image>
<view class="item-title">{{item.title}}</view>
</view>
</block>
......
......@@ -157,7 +157,7 @@ Page({
}else{
this.setData({
nickname: visitor && visitor.userInfo && visitor.userInfo.nickName || '',
avatarUrl: visitor && visitor.userInfo && visitor.userInfo.avatarUrl || 'source/images/daka2b/default/logo.png',
avatarUrl: visitor && visitor.userInfo && visitor.userInfo.avatarUrl || 'qingxiao/daka/images/common/empty/avatar_user',
})
}
})
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
"navigationBarTitleText": "添加学校信息",
"usingComponents": {
"expiredTip": "../../components/expiredTip",
"permission-box":"../../components/permissionbox"
"permission-box":"../../components/permissionbox",
"imagecropper": "../../../components/imagecropper"
}
}
\ No newline at end of file
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="page_topline"></view>
<view class="container {{showCropper? 'containerDisabledScroll':''}}">
<view class="box" style="border-bottom: 16rpx solid #f7f7f9;" wx:if="{{sid!=0}}">
<view class="line-item">
<view class="item-label" style="flex: 1;">个人头像</view>
<view class="right" bindtap="updateAvatar" style="flex: none;">
<image class="logo" src="{{filter.imagify(avatarUrl, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
<view class="line-item">
<view class="item-label">个人昵称</view>
<view class="right">
<view class="iteminput" value="" bindtap="updateNickname">{{nickname?nickname:'输入昵称'}}</view>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
</view>
<permission-box cinfigid="{{sid==0 || dakarole==1? 0: 700}}">
<view slot="menubtn">
<view class="box">
<view class="line-item" wx:if="{{sid!=0}}">
<view class="item-label" style="flex: 1;">学校LOGO <text>(建议尺寸:120*120)</text></view>
<view class="right" bindtap="proMainImgUpload" data-type="schoollogo" style="flex: none;">
<image class="logo" src="{{filter.imagify(params.logo, 'image/resize,w_640/format,jpg/quality,q_50')}}"></image>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
<view class="line-item">
<view class="item-label">学校名称</view>
<view class="right">
......@@ -14,7 +38,7 @@
<view class="line-item">
<view class="item-label">联系电话</view>
<view class="right">
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="11" value="" bindinput="" placeholder="请输入学校联系电话"></input>
<input type="text" placeholder-class="placeholderclass" class="iteminput" maxlength="11" value="{{params.tel_phone}}" bindinput="phoneInput" placeholder="请输入学校联系电话"></input>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
......@@ -22,14 +46,14 @@
<view class="item-label">地址</view>
<view class="right" bindtap="addressSelect">
<image class="icon-address" src="{{localImageRoot}}2b/organizationalmgt/icon_address.png?{{imageVersion}}"></image>
<view class="iteminput">{{params.location_address ? params.location_address : '请选择地址'}}</view>
<view class="iteminput">{{params.province ? params.province+params.city+params.area : '请选择地址'}}</view>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
<view class="line-item">
<view class="item-label">详细地址</view>
<view class="right">
<textarea class="iteminput" placeholder-class="placeholderclass" bindinput="addressInput" autoHeight="true" value="{{params.addressname}}" placeholder="所在街道,楼牌号等"></textarea>
<textarea class="iteminput" placeholder-class="placeholderclass" bindinput="addressInput" autoHeight="true" value="{{params.address}}" placeholder="所在街道,楼牌号等"></textarea>
<!-- <image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image> -->
</view>
</view>
......@@ -51,4 +75,21 @@
</view>
</permission-box>
</view>
<expiredTip/>
\ No newline at end of file
<expiredTip/>
<view class="cropperdialog" wx:if="{{showCropper}}">
<imagecropper
id="image-cropper"
limit_move="{{cropperOpt.limit_move}}"
disable_rotate="{{cropperOpt.disable_rotate}}"
width="{{cropperOpt.width}}"
height="{{cropperOpt.height}}"
imgSrc="{{cropperSrc}}"
bindload="cropperload"
bindimageload="loadimage"
bindtapcut="clickcut"
></imagecropper>
<view class="cropperoperate">
<view class="" bindtap="cancelcropper">取消</view>
<view class="" bindtap="surecropper">确认</view>
</view>
</view>
\ No newline at end of file
......@@ -3,14 +3,12 @@ page {
height: 100%;
}
.container {
padding-bottom: 100rpx;
border-top: 1px solid #eee;
padding-bottom: 150rpx;
}
.placeholderclass {
color: #939393;
font-size: 26rpx;
}
.box {
background: #fff;
padding: 0 24rpx;
......@@ -50,7 +48,7 @@ page {
align-items: center;
flex: 1;
}
.icon-address{
.icon-address {
width: 24rpx;
height: 28rpx;
margin-right: 10rpx;
......@@ -59,7 +57,13 @@ page {
width: 100%;
color: #939393;
font-size: 26rpx;
word-break: break-all
word-break: break-all;
}
.line-item .right .logo {
width: 100rpx;
height: 100rpx;
z-index: 1;
border-radius: 50%;
}
.line-item .right .arrowsmall {
width: 12rpx;
......@@ -95,8 +99,8 @@ page {
position: relative;
}
.selectd-item-box-inner {
border: 1px solid #16B0FD !important;
color: #16B0FD !important;
border: 1px solid #16b0fd !important;
color: #16b0fd !important;
}
.item-box-inner .icon-select {
position: absolute;
......@@ -119,12 +123,12 @@ page {
.submitbtn {
width: 100%;
height: 90rpx;
background: #16B0FD;
background: #16b0fd;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
border-radius: 49rpx;
box-shadow: 0 0 20rpx rgba(22,176,253,.8);
box-shadow: 0 0 20rpx rgba(22, 176, 253, 0.8);
}
import {
LocalStorage
} from "../../../utilities/index.js";
var app = getApp();
Page({
data: {
imgList: [
......@@ -7,10 +11,16 @@ Page({
"https://cdn.img.shangjiadao.cn/qingxiao/bargain/images/case/gif2.gif",
"https://cdn.img.shangjiadao.cn/qingxiao/bargain/images/case/gif3.gif",
"https://cdn.img.shangjiadao.cn/qingxiao/bargain/images/case/pic_03.png"
]
],
sid: 3
},
onLoad: function(options) {},
onLoad: function(options) {
const { sid } = options;
this.setData({
sid: sid || 3
});
},
onShow: function() {},
// 去创建
......@@ -21,11 +31,9 @@ Page({
},
// 跳过
bindJumpEvent () {
wx.showModal({
title: '提示',
content: '跳过',
showCancel: false,
confirmColor: '#16B0FD'
LocalStorage.setItem('dakarole', 1);
wx.reLaunch({
url: `/business/pages/deskcenter/index?sid=${this.data.sid}`,
})
},
});
......@@ -376,7 +376,7 @@ const apis = {
accountList: `${api}member/erp/account/index`,//账号下的所有身份
memberMe: `${api}member/me`,//获取当前身份
getschooluuid: `${api}member/school_uuid`,// 简单报名(加入学校)获取uuid
subjectTemplates: `${api}member/subject_templates`,//主题模板列表
},
shopeditor: {
infoGet: `${api}member/clock/address/get`,
......
This diff is collapsed.
......@@ -430,6 +430,19 @@ function getUuid(data){
errorresolve: 1,
})
}
// 主题模板列表
function getSubjectTemplates(data){
return wxRequest({
role: '2b',
url: `${apis.business.common.subjectTemplates}`,
method: 'GET',
data,
errorresolve: 1,
// needToken: true
})
}
export {
nicknameGet,
bOssAccess,
......@@ -472,5 +485,6 @@ export {
analyzeclasshourGet,
analyzeclasscourseGet,
analyzeDashboardGet,
getUuid
getUuid,
getSubjectTemplates
}
\ No newline at end of file
......@@ -26,7 +26,6 @@ import {
bTokenExchange
} from '../service/common.js'
import {
formIdCreate,
getActivities,
activityLog,
getMember
......@@ -303,13 +302,6 @@ Page({
}
})
},
formIdCreate(e) {
const { formId } = e.detail;
formIdCreate({
formId
})
},
// goMyLikes() {
// wx.navigateTo({
......
......@@ -41,9 +41,6 @@
<!-- <view class="right-item" bindtap="toSetting" wx:if="{{sid != 0}}">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="icon" src="{{imageRoot}}2c/optimize/icon_setting.png?{{imageVersion}}"></image>
</view> -->
</view>
......@@ -71,9 +68,6 @@
<view class="menu-box">
<view class="menu-item" bindtap="goMytask">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_zuoye.png?{{imageVersion}}"></image>
<text class="title">我的作业</text>
<text class="desc">待提交的作业</text>
......@@ -81,45 +75,30 @@
</view>
<view class="menu-item" bindtap="goMyCourses">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_mycourse.png?{{imageVersion}}"></image>
<text class="title">我的课程</text>
<text class="desc">购买的课程</text>
</view>
<view class="menu-item" bindtap="goMySchedule">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_myschedule.png?{{imageVersion}}"></image>
<text class="title">我的课表</text>
<text class="desc">上课时间在这里</text>
</view>
<view class="menu-item" bindtap="goGrowthRecord">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_growthrecord.png?{{imageVersion}}"></image>
<text class="title">我的成长</text>
<text class="desc">往期作品在这里</text>
</view>
<view class="menu-item" bindtap="goClassRecord">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_courserecord.png?{{imageVersion}}"></image>
<text class="title">上课记录</text>
<text class="desc">课消记录</text>
</view>
<view class="menu-item" bindtap="goMyAchievement">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_glory.png?{{imageVersion}}"></image>
<text class="title">我的荣誉</text>
<text class="desc">证书勋章在这里</text>
......@@ -136,9 +115,6 @@
</navigator>
<view class="menu-item" wx:if="{{cSchoolTotal > 0}}" bindtap="exchangeSchool">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_exchangeschool.png?{{imageVersion}}"></image>
<text class="title">切换校区</text>
<text class="desc"></text>
......@@ -146,9 +122,6 @@
<view class="menu-item" bindtap="loginToManager">
<loginbtn loginCode="{{loginCode}}"/>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton">生成form</button>
</form>
<image class="menuicon" src="{{imageRoot}}2c/ucenter2/icon_tologin.png?{{imageVersion}}"></image>
<text class="title">机构登录</text>
<text class="desc">老师/校长在这里登录</text>
......
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