Commit dfe60022 authored by 李俊赕's avatar 李俊赕

Merge branch 'dev-photo-tools' of...

Merge branch 'dev-photo-tools' of https://git.banshouhui.com/heyinchen/take_order into dev-photo-tools
parents 6781b973 4faa8381
......@@ -6,7 +6,8 @@ let codeUrl = {
/* --------------------------- prod begin --------------------------- */
let askUrl = {
apiUrl: 'https://fa.banshouhui.com',
//apiUrl: 'https://fa.banshouhui.com',
apiUrl: 'http://rest-u.yunya.com',
fileUrl: 'https://s-fa.banshouhui.com',
}
let ucenterUrl = {
......
......@@ -15,6 +15,16 @@
},
{
"path": "pages/video/index",
"style": {
"navigationBarTitleText": "培训&考试"
}
},
{
"path": "pages/settle/base",
"style": {
......@@ -88,13 +98,7 @@
},
{
"path": "pages/video/index",
"style": {
"navigationBarTitleText": "培训&考试"
}
},
......@@ -233,7 +237,7 @@
{
"path": "pages/take/web",
"style": {
"navigationBarTitleText": "网页"
"navigationBarTitleText": ""
}
},
......
......@@ -40,6 +40,7 @@
export default {
data() {
return {
/*
areaList: [{
id: 1,
name: '北京市',
......@@ -151,6 +152,8 @@
name: '县',
}]
}],
*/
areaList:[],
workingAgeList: [],
selected: {
areaIds: [],
......@@ -185,7 +188,7 @@
this.setPrevPageData()
}
uni.navigateBack({
delta: 2
delta: 1
});
},
initPage(option) {
......@@ -245,7 +248,7 @@
});
this.workingAgeList = list;
},
getareaList(code, level, provinceIndex) {
async getareaList(code, level, provinceIndex) {
provinceIndex = provinceIndex || 0
this.currentIndex = provinceIndex
let areaList = this.areaList
......@@ -257,17 +260,32 @@
uni.showLoading({
title: '加载中'
});
// if(!level){
// level = 0
// }
let params = {
type: '充电桩安装',
level: level || 0,
//level: level,
code: code
}
const res = this.$u.api.getSettleArea(params)
const res = await this.$u.api.getSettleArea(params)
console.log('res:')
console.log(res)
console.log('res.status:')
console.log(res.status)
console.log('level:')
console.log(level)
uni.hideLoading()
if (res.status != 200) {
return;
}
if (!level) {
console.log('res.data:')
console.log(res.data)
this.areaList = res.data
const parmas = [res.data[0].id, 1]
this.getareaList(...parmas)
......@@ -275,6 +293,89 @@
this.$set(areaList[provinceIndex], 'children', res.data)
}
},
/*
getNewAreaList:function (code, level, provinceIndex) {
provinceIndex = provinceIndex || 0
this.currentIndex = provinceIndex
let areaList = this.areaList
if (level) {
if (areaList[provinceIndex].children) {
return
}
}
uni.showLoading({
title: '加载中'
});
let params = {
type: '',
level: level || 0,
code: code
}
let that = this
uni.request({
url: 'http://rest-u.yunya.com/v1/h5/settled/area',
+ '?type=充电桩安装'
+ '&level=' + level|| 0
+ "&code=" + code,
method: 'GET',
data: {
},
success: (res) => {
uni.hideLoading()
console.log('获取 章节 成功')
console.log(res)
if(res.statusCode==401){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
return
}
if(res.statusCode==200){
this.dataList = res.data
//this.getFirstSectionId()
console.log('statusCode=200')
console.log('获取 章节 成功 this.dataList')
console.log(this.dataList)
}else{
uni.showToast({
icon:'none',
title:res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'获取章节失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
*/
selectAge(item) {
this.selected.working_age = item.value
this.selected.workingAgeTxt = item.name
......
......@@ -8,13 +8,19 @@
export default {
data() {
return {
webUrl:''
webUrl:'',
from:'',
}
},
onLoad(e) {
getApp().trackPage('内置网页')
if(e && e.from){
this.from = e.from
}
if(e && e.url){
this.webUrl = e.url
return
......
<template>
<view class="backView">
<view class="itemView" v-for="(item,ikey) in dataList":key="ikey"
@click="itemClick(item,ikey)">
<view class="titleView">
<text class="title">{{item.title}}</text>
<image class="arrow" :src="icon_arrow_right" mode=""></image>
</view>
<text class="notice">时长:5分钟,已完成学习</text>
<view
class="itemView"
v-for="(item,ikey) in dataList":key="ikey">
<view class="titleView" @click="itemClick(item,ikey)">
<text class="title">{{item.name}}</text>
<image class="arrow" :src="icon_arrow_right" mode=""></image>
</view>
<text class="notice" v-if="item.isLearn">已学习</text>
<text class="notice" v-if="!item.isLearn">未学习</text>
</view>
......@@ -25,6 +32,9 @@
return {
icon_arrow_right:'',
dataList:[],
course_id:172,
section_id:0,
jumpUrl:'https://m.banshouhui.com/xue/course/section/',
}
},
onLoad(e) {
......@@ -37,6 +47,9 @@
//获取数据
getData: function () {
this.getSections()
/*
this.dataList = [
{
'title':'第一章 希望的终结',
......@@ -48,21 +61,174 @@
'title':'第三章 诸神的黄昏',
},
];
*/
},
//获取章节
getSections: function () {
//getApp().globalData.domain_Name
let that = this
uni.request({
url: 'http://rest-xue.yunya.com/v1/chapter-sections'
+'?course_id=' + this.course_id,
method: 'GET',
data: {
//type:this.activeTop,
},
success: (res) => {
uni.hideLoading()
console.log('获取 章节 成功')
console.log(res)
if(res.statusCode==401){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
return
}
if(res.statusCode==200){
this.dataList = res.data
//this.getFirstSectionId()
console.log('statusCode=200')
console.log('获取 章节 成功 this.dataList')
console.log(this.dataList)
}else{
uni.showToast({
icon:'none',
title:res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'获取章节失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
/*
//获取 第一章 章节Id
getFirstSectionId: function () {
var item = this.dataList[0]
var sectionList = item.section
var firstSection = sectionList[0]
this.section_id = firstSection.id
//this.goToWeb()
//this.getSectionDetail()
console.log('获取 第一章 章节Id:')
console.log(this.section_id)
},
//跳转到 视频网页
goToWeb: function () {
uni.navigateTo({
url:'/pages/take/web'
+'?url=' + 'https://m.banshouhui.com/xue/course/section/4227',
})
},
*/
itemClick: function (item , ikey) {
var sectionList = item.section
var firstSection = sectionList[0]
this.section_id = firstSection.id
item.isLearn = true
uni.navigateTo({
url:'/pages/take/web'
+'?url=' + 'https://www.baidu.com',
+'?url='
+ this.jumpUrl + this.section_id,
})
},
//参加考试
examClick: function () {
uni.navigateTo({
url:'/pages/exam/index'
})
}
},
//获取 章节详情
getSectionDetail: function () {
//getApp().globalData.domain_Name
let that = this
uni.request({
url: 'http://rest-xue.yunya.com/v1/section-details'
+ '?section_id=' + this.section_id,
method: 'GET',
data: {
//type:this.activeTop,
},
success: (res) => {
uni.hideLoading()
console.log('获取 章节详情 成功')
console.log(res)
if(res.statusCode==401){
uni.navigateTo({
url:'/pages/login/wxlogin'
})
return
}
if(res.statusCode==200){
}else{
uni.showToast({
icon:'none',
title:res.data.message
})
}
},
fail: (e) => {
console.log('获取 章节详情 失败')
console.log(e)
uni.hideLoading()
uni.showToast({
icon:'none',
title:'获取章节详情失败'
})
// console.log('获取下单列表 失败')
// console.log(e)
}
})
},
......@@ -90,6 +256,16 @@
border-bottom: 2rpx solid #999999;
}
.sectionView{
background-color: #FFFFFF;
width: 100%;
height: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 2rpx solid #999999;
}
.titleView{
background-color: #FFFFFF;
width: 100%;
......
<template>
<view class="backView">
<view class="itemView" v-for="(item,ikey) in dataList":key="ikey"
@click="itemClick(item,ikey)">
<view class="titleView">
<text class="title">{{item.name}}</text>
<image class="arrow" :src="icon_arrow_right" mode=""></image>
</view>
<text class="notice">时长:5分钟,已完成学习</text>
</view>
<view class="bottomView">
<view class="bottomBtn" @click="examClick()">
<text class="bottomTitle">完成学习后,可参加考试</text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
protocolContent:''
}
},
onLoad(e) {
if(e && e.activeService && e.activeService.length>0){
//console.log(e.activeService)
this.activeService = e.activeService
}
},
methods: {
//拨打客服 点击
phoneCallClick: function (phone) {
uni.makePhoneCall({
phoneNumber: phone
});
},
}
}
</script>
<style>
.backView{
background-color: #FFFFFF;
position: absolute;
top: 0;
left: 0;
width: 100%;
display: flex;
flex-direction: column;
}
.itemView{
background-color: #FAFAFA;
width: 100%;
display: flex;
flex-direction: column;
border-bottom: 2rpx solid #999999;
}
.titleView{
background-color: #FFFFFF;
width: 100%;
height: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx solid #999999;
}
.title{
font-size: 28rpx;
margin-left: 40rpx;
}
.arrow{
width: 16rpx;
height: 28rpx;
margin-right: 40rpx;
}
.notice{
padding-left: 40rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
font-size: 28rpx;
color: #999999;
}
.bottomView{
background-color: #FFFFFF;
width: 100%;
height: 140rpx;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
}
.bottomBtn{
background-color: #007AFF;
width: 60%;
height: 80rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
}
.bottomTitle{
font-size: 32rpx;
color: #FFFFFF;
}
</style>
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