Commit 65babb96 authored by Facius's avatar Facius
parents 46e9c300 9baa17ed
...@@ -21,3 +21,4 @@ yarn-error.log* ...@@ -21,3 +21,4 @@ yarn-error.log*
*.njsproj *.njsproj
*.sln *.sln
*.sw* *.sw*
.history/
<script> <script>
import './../.env.js' import './../.env.js'
import {
AnalysysAgent
} from '@/utils/analysys_paas.js'
import util from '@/utils/util.js' import util from '@/utils/util.js'
export default { export default {
globalData:{ globalData:{
// 开发环境
uniEnv:process.uniEnv, uniEnv:process.uniEnv,
token: '', // 登录凭证
//lyf的token:RTOKENf7d46ea33a7923515abfa779e04eccba77f98604 token: '',
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
// 授权用户信息 //授权提示 图标
icon_auth_notice: 'https://qn-static.banshouhui.com/auth_notice.png',
//授权提示新 图标
icon_auth_notice_new: 'https://qn-static.banshouhui.com/auth_notice_new.png',
// 服务规范教程视频
service_standard: {
"Course1": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第一节 接单服务标准",
desc: "1.不同车企品牌结算价格不一,675元-1890元不等;",
},
"Course2": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第二节 完工服务标准",
desc: "2.结算价格为包工包料价,安装材料根据车企品牌规格自行采购(电缆、空开、漏保);",
},
"Course3": {
url: "https://xy-hybrid.kakalili.com/web/vivaVideo/home/static/img/videoen.mp4",
title: "第二节 结算服务标准",
desc: "3.需具备一定的作业工具:如液压压线钳、冲击钻、电锤、登高安全带、电锤、绝缘电阻仪(摇表)、交流充电模拟器等;",
},
},
// 授权用户信息
authUserInfo: '', authUserInfo: '',
}, },
onLaunch: function() { onLaunch: function() {
// 应用初始化(全局只触发一次) // 应用初始化(全局只触发一次)
let that = this let that = this
that.globalData.token = util.getToken() that.globalData.token = util.getToken()
AnalysysAgent.registerSuperProperty("platform", "self-support");
}, },
onShow: function() { onShow: function() {
// 应用启动,或从后台进入前台显示 // 应用启动,或从后台进入前台显示
...@@ -96,6 +125,76 @@ ...@@ -96,6 +125,76 @@
util.setToken('') util.setToken('')
} }
}, },
/* ------------------------- 数据埋点begin ------------------------------ */
track(event, properties) {
if (AnalysysAgent) {
// 易观添加事件
let AnalysysAgent = wx.AnalysysAgent;
AnalysysAgent.track("take_order_" + event, properties);
}
},
identify(userInfo, openid, unionid = null) {
// 设备身份表示
if (AnalysysAgent) {
let setProfile = {
'openid': openid,
'unionid': unionid,
}
setProfile = Object.assign(setProfile, userInfo)
AnalysysAgent.profileSet(setProfile);
}
},
setUserId(userId) {
// 用户id设置
if (AnalysysAgent) {
AnalysysAgent.alias(userId + '')
}
},
setUser(user) {
// 用户附加属性
if (AnalysysAgent) {
let userInfo = {
'mobile': user.mobile,
'userfrom_id': user.uid,
'userfrom': '家维广场',
'avatar': user.avatar,
'nickname': user.nickname,
'username': user.username,
'wxhuid': user.wxhuid,
'id': user.id,
'money': user.money,
'score': user.score
};
Object.keys(userInfo).map(key => {
if (key && userInfo[key]) {
AnalysysAgent.profileAppend(key, userInfo[key])
}
})
}
},
share(toShareProperties, trackProperties) {
if (AnalysysAgent) {
AnalysysAgent.share(toShareProperties, trackProperties);
}
},
trackPage(pageName, properties) {
if (AnalysysAgent) {
AnalysysAgent.pageView(pageName, properties);
}
},
initShare(option) {
console.log(option, 'option-initShare')
option = option || {}
if (AnalysysAgent && option.user_id) {
let shareUserInfo = {
'share_from_id': option.user_id || '',
'share_from_nickname': option.user_name || '',
}
AnalysysAgent.registerSuperProperties(shareUserInfo);
}
},
/* ------------------------- 数据埋点end ------------------------------ */
} }
} }
</script> </script>
...@@ -106,4 +205,5 @@ ...@@ -106,4 +205,5 @@
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss"; @import "uview-ui/index.scss";
@import '@/common/index.scss';
</style> </style>
\ No newline at end of file
...@@ -32,6 +32,12 @@ let settledApiFun = function(vm){ ...@@ -32,6 +32,12 @@ let settledApiFun = function(vm){
/* 提交认证资料 */ /* 提交认证资料 */
let checkSettleSignInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'}); let checkSettleSignInfo = async (params = {}) => await vm.$u.post(ucenterApiUrl+'/v1/settled/check-sign-info', params,{'content-type': 'application/x-www-form-urlencoded'});
/* 获取接单教程列表 */
let listOrderingTutorials = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-course-rate', params);
/* 更新接单教程状态 */
let saveCourseRate = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/save-course-rate', params);
const settledApi = { const settledApi = {
getSettleBaseInfo, getSettleBaseInfo,
getSettleArea, getSettleArea,
...@@ -43,7 +49,9 @@ let settledApiFun = function(vm){ ...@@ -43,7 +49,9 @@ let settledApiFun = function(vm){
getSettleDepositResult, getSettleDepositResult,
// checkSettleBank, // checkSettleBank,
// checkSettleAlipay, // checkSettleAlipay,
checkSettleSignInfo checkSettleSignInfo,
listOrderingTutorials,
saveCourseRate,
} }
return settledApi return settledApi
} }
......
page{ page {
background-color: #FAFAFA; background-color: #fafafa;
} }
.btn-share { .btn-share {
background-color: transparent; background-color: transparent;
...@@ -13,4 +13,17 @@ page{ ...@@ -13,4 +13,17 @@ page{
width: 48rpx; width: 48rpx;
height: 39rpx; height: 39rpx;
} }
} }
\ No newline at end of file .bottom-fix-btn {
position: fixed;
z-index: 2;
bottom: 0rpx;
padding-bottom: 40rpx;
width: 100%;
display: flex;
justify-content: center;
.btn-block {
width: 460rpx;
}
}
<template> <template>
<view> <view>
input-shuru <u-input v-model="item.fieldsValue" />
</view> </view>
<!-- <u-form-item label="姓名"><u-input v-model="value" /></u-form-item> -->
</template> </template>
<script> <script>
export default { export default {
name:'xhInput', name: 'xhInput',
props: {
item: {
type: Object,
default () {
return null
}
},
},
data() { data() {
return { return {
value: '', value: '',
type: 'text', type: 'text',
border: true border: true,
} }
} }
} }
......
<template>
<view>
<u-input v-model="item.fieldsValue" />
</view>
</template>
<script>
export default {
name: 'xhInput',
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() {
return {
value: '',
type: 'text',
border: true,
}
}
}
</script>
<style>
</style>
//易观方舟
let argo ={
appkey: "5f2ac5996f36c714",
open: true,
/*
0 关闭调试模式(默认)。类型:Number。
1 开启调试模式,数据不入库。类型:Number。
2 开启调试模式,数据入库。类型:Number。
*/
debugMode:0,
autoTrack:true,
uploadURL: 'https://argo.banshouhui.com/'
}
export {
argo,
}
\ No newline at end of file
...@@ -14,16 +14,11 @@ ...@@ -14,16 +14,11 @@
"style": { "style": {
"navigationBarTitleText": "订单" "navigationBarTitleText": "订单"
} }
},{
"path": "pages/order/complete",
"style": {
"navigationBarTitleText": "订单-完工配置"
}
}, },
{ {
"path": "pages/study/index", "path": "pages/order/complete",
"style": { "style": {
"navigationBarTitleText": "学习" "navigationBarTitleText": "订单-完工配置"
} }
}, },
{ {
...@@ -35,7 +30,7 @@ ...@@ -35,7 +30,7 @@
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
"navigationBarTitleText": "我的" "navigationBarTitleText": "授权登录"
} }
}, },
{ {
...@@ -57,60 +52,57 @@ ...@@ -57,60 +52,57 @@
{ {
"path": "pages/learn/index", "path": "pages/learn/index",
"style": { "style": {
"navigationBarTitleText": "uni-xue" "navigationBarTitleText": "学习"
} }
}, },
{ {
"path":"pages/learn/assessment", "path": "pages/learn/assessment",
"style": { "style": {
"navigationBarTitleText":"认证介绍" "navigationBarTitleText": "认证介绍"
} }
}, },
{ {
"path":"pages/learn/answer", "path": "pages/learn/answer",
"style": { "style": {
"navigationBarTitleText":"考试答题" "navigationBarTitleText": "考试答题"
} }
}, },
{ {
"path":"pages/learn/result", "path": "pages/learn/result",
"style":{ "style": {
"navigationBarTitleText":"考试结果页" "navigationBarTitleText": "考试结果页"
} }
}, },
{ {
"path":"pages/learn/news-details", "path": "pages/learn/news-details",
"style":{ "style": {
"navigationBarTitleText":"" "navigationBarTitleText": ""
} }
}, },
{ {
"path":"pages/learn/curriculum", "path": "pages/learn/curriculum",
"style":{ "style": {
"navigationBarTitleText":"" "navigationBarTitleText": ""
} }
}, },
{ {
"path": "pages/settle/select", "path": "pages/settle/select",
"style": { "style": {
"navigationBarTitleText": "选择可服务的城市", "navigationBarTitleText": "选择可服务的城市",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, },
{ {
"path": "pages/settle/file-upload", "path": "pages/settle/file-upload",
"style": { "style": {
"navigationBarTitleText": "图片上传" "navigationBarTitleText": "图片上传"
} }
}, },
{ {
"path": "pages/settle/pay-ensure", "path": "pages/settle/pay-ensure",
"style": { "style": {
"navigationBarTitleText": "缴纳设备押金" "navigationBarTitleText": "缴纳设备押金"
} }
}, },
{ {
"path": "pages/settle/prompt", "path": "pages/settle/prompt",
...@@ -119,20 +111,18 @@ ...@@ -119,20 +111,18 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
},
}, { {
"path": "pages/settle/web", "path": "pages/settle/web",
"style": { "style": {
"navigationBarTitleText": "签约页面" "navigationBarTitleText": "签约页面"
} }
}, },
{ {
"path": "pages/settle/sign-contract", "path": "pages/settle/sign-contract",
"style": { "style": {
"navigationBarTitleText": "签约页面" "navigationBarTitleText": "签约页面"
} }
}, },
{ {
"path": "pages/settle/file", "path": "pages/settle/file",
...@@ -141,20 +131,36 @@ ...@@ -141,20 +131,36 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
},{ },
{
"path": "pages/exam/start", "path": "pages/exam/start",
"style": { "style": {
"navigationBarTitleText": "考试" "navigationBarTitleText": "考试"
} }
},
},{ {
"path": "pages/exam/index", "path": "pages/exam/index",
"style": { "style": {
"navigationBarTitleText": "入驻考试" "navigationBarTitleText": "入驻考试"
} }
},
{
"path": "pages/learn/exam",
"style": {
"navigationBarTitleText": "在线考试",
"enablePullDownRefresh": false,
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true
}
},
{
"path": "pages/learn/course-detail",
"style": {
"navigationBarTitleText": "培训视频",
"enablePullDownRefresh": false
}
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "uni-app",
...@@ -166,7 +172,8 @@ ...@@ -166,7 +172,8 @@
"selectedColor": "#007AFF", "selectedColor": "#007AFF",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"list": [{ "list": [
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/logo.png", "iconPath": "static/logo.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/logo.png",
...@@ -177,12 +184,14 @@ ...@@ -177,12 +184,14 @@
"iconPath": "static/logo.png", "iconPath": "static/logo.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/logo.png",
"text": "订单" "text": "订单"
}, { },
{
"pagePath": "pages/learn/index", "pagePath": "pages/learn/index",
"iconPath": "static/logo.png", "iconPath": "static/logo.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/logo.png",
"text": "学习" "text": "学习"
}, { },
{
"pagePath": "pages/mine/index", "pagePath": "pages/mine/index",
"iconPath": "static/logo.png", "iconPath": "static/logo.png",
"selectedIconPath": "static/logo.png", "selectedIconPath": "static/logo.png",
...@@ -192,35 +201,42 @@ ...@@ -192,35 +201,42 @@
}, },
"condition": { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项) "current": 0, //当前激活的模式(list 的索引项)
"list": [{ "list": [
"name": "自营平台", //模式名称 {
"path": "pages/index/index", //启动页面,必选 "name": "自营平台", //模式名称
"query": "" //启动参数,在页面的onLoad函数里面得到 "path": "pages/index/index", //启动页面,必选
},{ "query": "" //启动参数,在页面的onLoad函数里面得到
"name": "入驻首页", },
"path": "pages/settle/index", {
"query": "" "name": "入驻首页",
},{ "path": "pages/settle/index",
"name": "基本信息", //模式名称 "query": ""
"path": "pages/settle/base", //启动页面,必选 },
"query": "" //启动参数,在页面的onLoad函数里面得到 {
},{ "name": "基本信息", //模式名称
"name": "入驻提示", //模式名称 "path": "pages/settle/base", //启动页面,必选
"path": "pages/settle/prompt", //启动页面,必选 "query": "" //启动参数,在页面的onLoad函数里面得到
"query": "" //启动参数,在页面的onLoad函数里面得到 },
},{ {
"name": "资料信息", //模式名称 "name": "入驻提示", //模式名称
"path": "pages/settle/file", //启动页面,必选 "path": "pages/settle/prompt", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
},{ },
"name": "缴纳保证金", //模式名称 {
"path": "pages/settle/pay-ensure", //启动页面,必选 "name": "资料信息", //模式名称
"query": "" //启动参数,在页面的onLoad函数里面得到 "path": "pages/settle/file", //启动页面,必选
},{ "query": "" //启动参数,在页面的onLoad函数里面得到
"name": "订单 - 完工配置", //模式名称 },
"path": "pages/order/complete", //启动页面,必选 {
"query": "" //启动参数,在页面的onLoad函数里面得到 "name": "缴纳保证金", //模式名称
}] "path": "pages/settle/pay-ensure", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "订单 - 完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
}
]
} }
}
} \ No newline at end of file
This diff is collapsed.
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<view><video object-fit="cover" class="course-video" id="courseVideo" :src="courseSrc" @error="videoErrorCallback" controls></video></view>
<uni-group>
<view class="course-title">{{ courseTitle }}</view>
<view class="course-desc">{{ courseDesc }}</view>
</uni-group>
</view>
</view>
</template>
<script>
let app = getApp();
export default {
data() {
return {
courseId: '',
courseStatus: 0,
courseSrc: '',
courseTitle: '',
courseDesc: '',
};
},
onLoad(e) {
if (e) {
if(e.courseId) {
this.courseId = e.courseId;
}
if(e.id) {
this.courseId = e.courseId;
this.courseSrc = app.globalData.service_standard[e.id].url;
this.courseTitle = app.globalData.service_standard[e.id].title;
this.courseDesc = app.globalData.service_standard[e.id].desc;
this.changeCourseStatus();
}
if(e.status) {
this.courseStatus = e.status;
}
}
},
onReady: function(res) {
// #ifndef MP-ALIPAY
this.videoContext = uni.createVideoContext('courseVideo');
// #endif
},
methods: {
videoErrorCallback: function(e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false
});
},
getRandomColor: function() {
const rgb = [];
for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16);
color = color.length == 1 ? '0' + color : color;
rgb.push(color);
}
return '#' + rgb.join('');
},
changeCourseStatus() {
let that = this
if(that.courseId) {
that.$u.api.saveCourseRate({courseId: that.courseId}).then(res => {
debugger
if(res.code == 200) {
// uni.navigateBack({delta: 1})
uni.navigateTo({
url: "/pages/learn/exam"
})
} else {
uni.showToast({
icon: "none",
title: "更新课程状态失败"
})
}
}).catch(e=> {
})
} else {
uni.showToast({
title: "课程ID为空,请重新选择课程"
})
}
},
}
};
</script>
<style lang="scss">
.course-video {
width: 750rpx;
}
.course-title {
font-size: 36rpx;
font-weight: 700;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.course-desc {
margin-left: 60rpx;
}
</style>
<template>
<view class="exam-wrap">
<Settle :index="3">
<view class="exam-tips"><u-alert-tips :show-icon="true" class="exam-tips" type="warning" :title="tipsTitle" :description="tipsDescription"></u-alert-tips></view>
<view class="exam-course">
<u-card margin="20rpx 0rpx 30rpx 0rpx" :border="false" :border-radius="cardRadius">
<view class="exam-head" slot="head">师傅接单教程</view>
<view class="exam-body" slot="body">
<u-cell-group :border="false">
<u-cell-item
v-for="(item, key) in tutorials"
:key="key"
icon="play-circle"
:border-bottom="false"
:title="item.title"
:value="item.value"
:value-style="item.courseActive"
@click="viewCourse(item)"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
</view>
<view class="exam-course">
<u-card margin="0rpx" :border="false" :border-radius="cardRadius">
<view class="exam-head" slot="head">师傅接单考试</view>
<uni-group slot="body">
<view>总共20题,每题5分,答题时间不超过40分钟</view>
<view>请认真对待,预祝顺利通过考试!</view>
</uni-group>
</u-card>
</view>
<view class="content-gap"></view>
</Settle>
<view class="bottom-fix-btn">
<view class="btn-block"><u-button type="primary" shape="circle">去考试</u-button></view>
</view>
</view>
</template>
<script>
import Settle from '@/components/settle/index.vue';
let app = getApp()
export default {
components: {
Settle
},
data() {
return {
cardRadius: 12,
tipsTitle: '提示:',
// 简单使用固定培训视频
tutorials: [
{ id: 'Course1', courseId: 1, title: '', value: '已查看', courseActive: {}, status: 1, url: ''},
{ id: 'Course2', courseId: 2, title: '', value: '未查看', courseActive: {}, status: 0, url: ''},
{ id: 'Course3', courseId: 3, title: '', value: '未查看', courseActive: {}, status: 0, url: ''}
],
tipsDescription: '接单考核可让您快速了解如何使用小程序,建议先查看学习教程'
};
},
computed: {
},
onLoad() {
this.tutorials.map((item, key) => {
item['url'] = app.globalData.service_standard[item.id].url
item['title'] = app.globalData.service_standard[item.id].title
item['value'] = item['status'] ? '已查看' : '未查看';
item['courseActive'] = item['status'] ? {"color": "#2979ff"} : {"color": "#ff0000"}
})
this.loadLearnData();
},
methods: {
loadLearnData() {
let that = this;
that.$u.api
.listOrderingTutorials()
.then(res => {
const results = res.data;
if (res.status == 200 && results && results.length > 0) {
that.tutorials.forEach((data, i) => {
if (results.hasOwnProperty(data.id)) {
data.status = results[data.id];
data.value = data.status ? '已查看' : '未查看';
data.courseActive = data.status ? {"color": "#2979ff"} : {"color": "red"}
that.tutorials[i] = data;
}
});
}
})
.catch(e => {
debugger;
console.log(e, 'loadLearnData');
});
},
viewCourse(e) {
let that = this;
let params = `id=${e.id}&courseId=${e.courseId}&status=${e.status}`
uni.navigateTo({
url: `/pages/learn/course-detail?${params}`
})
},
}
};
</script>
<style lang="scss">
.exam-tips .u-alert-tips {
border-radius: 12rpx !important;
border: none !important;
.u-alert-title {
font-size: 28rpx !important;
font-weight: bold;
}
}
.exam-wrap {
background: #f4f5f7;
}
.exam-head {
font-size: 36rpx;
font-weight: bold;
}
.content-gap {
height: 1rpx;
margin-bottom: 200rpx;
}
</style>
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<image class="noticeImage" :src="icon_auth_notice_new" mode=""></image> <image class="noticeImage" :src="icon_auth_notice_new" mode=""></image>
</view> </view>
<view class="noticeTitleView"> <view class="noticeTitleView">
<text class="noticeTitle">{{ noticeTitle }}</text> <text class="noticeTitle" v-if="needAuth">{{ authNoticeTitle }}</text>
<text class="noticeTitle" v-else>{{ suginNoticeTitle }}</text>
</view> </view>
<button class="loginBtn" v-if="needAuth" lang="zh_CN" @tap="getUserProfile"> <button class="loginBtn" v-if="needAuth" lang="zh_CN" @tap="getUserProfile">
<text class="u-font-32 white">立即登录</text> <text class="u-font-32 white">立即登录</text>
...@@ -35,13 +36,14 @@ export default { ...@@ -35,13 +36,14 @@ export default {
icon_notice: '', icon_notice: '',
TimeID: -1, TimeID: -1,
icon_auth_notice_new: '', icon_auth_notice_new: '',
noticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务', authNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务',
suginNoticeTitle: '申请获得您的公开信息(昵称,头像等)以便于为您提供更好的服务',
} }
}, },
onLoad() { onLoad() {
// getApp().trackPage('授权登录页') app.trackPage('授权登录页')
// this.icon_notice = getApp().globalData.icon_auth_notice this.icon_notice = app.globalData.icon_auth_notice
// this.icon_auth_notice_new = getApp().globalData.icon_auth_notice_new this.icon_auth_notice_new = app.globalData.icon_auth_notice_new
}, },
onShow() { onShow() {
app.globalData.jumpLoginStatus = true app.globalData.jumpLoginStatus = true
...@@ -101,6 +103,10 @@ export default { ...@@ -101,6 +103,10 @@ export default {
signupLogin(e) { signupLogin(e) {
var that = this var that = this
debugger
console.log(e.detail.errMsg)
console.log(e.detail.iv)
console.log(e.detail.encryptedData)
if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) { if (!e || !e.detail || e.detail.errMsg.indexOf('user deny') > -1) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
...@@ -143,13 +149,20 @@ export default { ...@@ -143,13 +149,20 @@ export default {
goBackPage() { goBackPage() {
let pages = getCurrentPages(); let pages = getCurrentPages();
if(pages.length) { if(pages.length) {
let prevPage = pages[pages.length - 1]; //上一个页面 let index = pages.length - 1;
if (prevPage && prevPage.$vm) { if(index) {
prevPage.$vm.isRefresh = true; let prevPage = pages[pages.length - 1]; //上一个页面
if (prevPage && prevPage.$vm) {
prevPage.$vm.isRefresh = true;
}
uni.navigateBack({
delta: 1
})
} else {
uni.navigateTo({
url:'pages/index/index'
})
} }
uni.navigateBack({
delta: 1
})
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: "pages/mine/index" url: "pages/mine/index"
......
...@@ -15,9 +15,26 @@ ...@@ -15,9 +15,26 @@
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<form-com></form-com> <!-- <form-com :item="tabbar"></form-com> -->
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in tabbar">
<view class="class-item" :key="index">
<view class="title" >{{groupItem.name}}</view>
<view class="class-bd">
<u-form-item :label-width="0" :required="groupItem.required"
v-for="(item,itemIndex) in groupItem.foods" :key="itemIndex">
<!-- <view :key="index"> -->
<view>{{item.name}}</view>
<xh-input></xh-input>
<!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
</template>
</u-form>
<!-- <xh-input></xh-input> --> <!-- <xh-input></xh-input> -->
<view class="page-view"> <!-- <view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index"> <view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title"> <view class="item-title">
<text>{{item.name}}</text> <text>{{item.name}}</text>
...@@ -29,7 +46,7 @@ ...@@ -29,7 +46,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
...@@ -38,7 +55,8 @@ ...@@ -38,7 +55,8 @@
import classifyData from '@/common/classify.data.js'; import classifyData from '@/common/classify.data.js';
// import allComponents from '@/components/createCom/index.js' // import allComponents from '@/components/createCom/index.js'
// import XhInput from '@/components/createCom/XhInput.vue' // import XhInput from '@/components/createCom/XhInput.vue'
import formCom from './components/formCom.vue' // import formCom from './components/formCom.vue'
import XhInput from '@/components/createCom/XhInput.vue'
export default { export default {
data() { data() {
return { return {
...@@ -56,9 +74,8 @@ ...@@ -56,9 +74,8 @@
} }
}, },
components:{ components: {
// 'xh-input': allComponentsXhInput, 'xh-input': XhInput,
formCom,
}, },
created(){ created(){
// console.log(allComponents,'allComponents') // console.log(allComponents,'allComponents')
...@@ -149,6 +166,7 @@ ...@@ -149,6 +166,7 @@
}).exec() }).exec()
}) })
}, },
// 右边菜单滚动 // 右边菜单滚动
async rightScroll(e) { async rightScroll(e) {
this.oldScrollTop = e.detail.scrollTop; this.oldScrollTop = e.detail.scrollTop;
......
<!-- 实现动态组件的绑定 --> <!-- 实现动态组件的绑定 -->
<template> <template>
<view> <view class="group-list">
书籍及 书籍及
<template v-for="(item,index) in list"> <u-form :model="form" ref="uForm">
<view :key="index"> <template v-for="(groupItem,index) in group">
<view class="group-item">
<!-- <xh-input></xh-input> --> <view class="group-title" :key="index">{{groupItem.name}}</view>
<!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> --> <view class="group-items" :key="index">
</view> <u-form-item :label-width="0" :required="item.required"
v-for="(item,itemIndex) in groupItem.foods" :key="index">
<!-- <component :key="contentIndex" :item="contentItem" :orderId="orderId" <!-- <view :key="index"> -->
:is="contentItem.inputType | typeToComponentName" /> --> <view>{{item.name}}</view>
</template> <xh-input></xh-input>
<!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
</template>
</u-form>
</view> </view>
</template> </template>
...@@ -29,7 +36,21 @@ ...@@ -29,7 +36,21 @@
import XhInput from '@/components/createCom/XhInput.vue' import XhInput from '@/components/createCom/XhInput.vue'
export default { export default {
components: { components: {
// 'xh-input': XhInput, 'xh-input': XhInput,
},
props: {
item: {
type: Array,
default () {
return []
}
},
},
watch:{
"item":function(newVal){
this.group = newVal
console.log(this.group,'this.group')
}
}, },
data() { data() {
return { return {
...@@ -43,12 +64,27 @@ ...@@ -43,12 +64,27 @@
key: '', key: '',
label: '' label: ''
}] }]
},],
// 完工信息的不同项
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
},]
}], }],
configList: [{ configList: [{
panelName: '', panelName: '',
panelType: '', panelType: '',
group: [{ group: [{
groupName: '', groupName: '接入点信息',
item: [{ item: [{
fieldsId: '基础信息', fieldsId: '基础信息',
fieldsType: 'input', fieldsType: 'input',
...@@ -62,13 +98,53 @@ ...@@ -62,13 +98,53 @@
}] }]
}] }]
}], }],
form: {
name: '',
intro: '',
sex: ''
},
checkboxList: [{
name: '苹果',
checked: false,
disabled: false
},
{
name: '雪梨',
checked: false,
disabled: false
},
{
name: '柠檬',
checked: false,
disabled: false
}
],
radioList: [{
name: '鲜甜',
disabled: false
},
{
name: '麻辣',
disabled: false
}
],
radio: '',
switchVal: false
} }
}, },
created() { created() {
this.group = this.item
console.log(this.group,'this.group')
console.log(XhInput, 'XhInput') console.log(XhInput, 'XhInput')
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
.group-list{
.group-item{
}
}
</style> </style>
...@@ -11,7 +11,7 @@ if (AnalysysAgent) { ...@@ -11,7 +11,7 @@ if (AnalysysAgent) {
// AnalysysAgent.autoShare = true // AnalysysAgent.autoShare = true
AnalysysAgent.allowTimeCheck = true AnalysysAgent.allowTimeCheck = true
AnalysysAgent.autoTrack = true AnalysysAgent.autoTrack = true
AnalysysAgent.registerSuperProperty("platform","take-order"); AnalysysAgent.registerSuperProperty("platform","self-support");
} }
// #endif // #endif
export { export {
......
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