10 changed files with 1479 additions and 185 deletions
@ -0,0 +1,56 @@ |
|||
<template> |
|||
<view> |
|||
<text>{{ result }}</text> |
|||
<qrcode-stream @decode="onDecode" @init="initQR" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
//引入 |
|||
import { QrcodeStream } from "vue-qrcode-reader"; |
|||
export default { |
|||
name: "scanCodeVue", |
|||
data() { |
|||
return { |
|||
result: '', //扫码结果信息 |
|||
error: '', |
|||
} |
|||
}, |
|||
components: {QrcodeStream}, |
|||
methods: { |
|||
onDecode(result) { |
|||
this.result = result; |
|||
_this.$emit("success", result) |
|||
}, |
|||
async initQR(promise) { |
|||
let _this = this |
|||
const { capabilities } = await promise; |
|||
|
|||
const TORCH_IS_SUPPORTED = !!capabilities.torch; |
|||
try { |
|||
let res = await promise; |
|||
console.log(res) |
|||
} catch (error) { |
|||
if (error.name === "NotAllowedError") { |
|||
this.error = "ERROR: 您需要授予相机访问权限"; |
|||
} else if (error.name === "NotFoundError") { |
|||
this.error = "ERROR: 这个设备上没有摄像头"; |
|||
} else if (error.name === "NotSupportedError") { |
|||
this.error = "ERROR: 所需的安全上下文(HTTPS、本地主机)"; |
|||
} else if (error.name === "NotReadableError") { |
|||
this.error = "ERROR: 相机被占用"; |
|||
} else if (error.name === "OverconstrainedError") { |
|||
this.error = "ERROR: 安装摄像头不合适"; |
|||
} else if (error.name === "StreamApiNotSupportedError") { |
|||
this.error = "ERROR: 此浏览器不支持流API"; |
|||
} else { |
|||
this.error = '获取摄像头权限失败' |
|||
} |
|||
_this.$emit("fail", this.error) |
|||
} |
|||
}, |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
@ -1,11 +1,174 @@ |
|||
{ |
|||
"requires": true, |
|||
"name": "tourGuide", |
|||
"version": "1.0.0", |
|||
"lockfileVersion": 1, |
|||
"requires": true, |
|||
"dependencies": { |
|||
"weixin-js-sdk": { |
|||
"version": "1.6.5", |
|||
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz", |
|||
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ==" |
|||
"@babel/helper-string-parser": { |
|||
"version": "7.25.9", |
|||
"resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", |
|||
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==" |
|||
}, |
|||
"@babel/helper-validator-identifier": { |
|||
"version": "7.25.9", |
|||
"resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", |
|||
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==" |
|||
}, |
|||
"@babel/parser": { |
|||
"version": "7.26.2", |
|||
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.26.2.tgz", |
|||
"integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", |
|||
"requires": { |
|||
"@babel/types": "^7.26.0" |
|||
} |
|||
}, |
|||
"@babel/types": { |
|||
"version": "7.26.0", |
|||
"resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.26.0.tgz", |
|||
"integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", |
|||
"requires": { |
|||
"@babel/helper-string-parser": "^7.25.9", |
|||
"@babel/helper-validator-identifier": "^7.25.9" |
|||
} |
|||
}, |
|||
"@vue/compiler-sfc": { |
|||
"version": "2.7.16", |
|||
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", |
|||
"integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", |
|||
"requires": { |
|||
"@babel/parser": "^7.23.5", |
|||
"postcss": "^8.4.14", |
|||
"prettier": "^1.18.2 || ^2.0.0", |
|||
"source-map": "^0.6.1" |
|||
} |
|||
}, |
|||
"@zxing/library": { |
|||
"version": "0.18.6", |
|||
"resolved": "https://registry.npmmirror.com/@zxing/library/-/library-0.18.6.tgz", |
|||
"integrity": "sha512-bulZ9JHoLFd9W36pi+7e7DnEYNJhljYjZ1UTsKPOoLMU3qtC+REHITeCRNx40zTRJZx18W5TBRXt5pq2Uopjsw==", |
|||
"requires": { |
|||
"@zxing/text-encoding": "~0.9.0", |
|||
"ts-custom-error": "^3.0.0" |
|||
} |
|||
}, |
|||
"@zxing/text-encoding": { |
|||
"version": "0.9.0", |
|||
"resolved": "https://registry.npmmirror.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", |
|||
"integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", |
|||
"optional": true |
|||
}, |
|||
"barcode-detector": { |
|||
"version": "0.5.0", |
|||
"resolved": "https://registry.npmmirror.com/barcode-detector/-/barcode-detector-0.5.0.tgz", |
|||
"integrity": "sha512-CL0ETCnLjaklGbFJeU1f5SU3CHVK1Tm+SjPbLKlt8iJ6Fqgc9yseNmWEpXSPmcGW3ET3rUwkWk2fXG+kcSbwBw==", |
|||
"requires": { |
|||
"@zxing/library": "^0.18.4", |
|||
"jsqr": "^1.3.1" |
|||
} |
|||
}, |
|||
"callforth": { |
|||
"version": "0.3.1", |
|||
"resolved": "https://registry.npmmirror.com/callforth/-/callforth-0.3.1.tgz", |
|||
"integrity": "sha512-Q2zPfqnwoKsb1DTVCr4lmhe49wKNBsMmNlbudjleu3/co+Nw1pOqFHYJHrW3VZ253ou9AAr+xauQR0C55NPdzA==" |
|||
}, |
|||
"core-js": { |
|||
"version": "3.39.0", |
|||
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.39.0.tgz", |
|||
"integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==" |
|||
}, |
|||
"csstype": { |
|||
"version": "3.1.3", |
|||
"resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", |
|||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" |
|||
}, |
|||
"jsqr": { |
|||
"version": "1.4.0", |
|||
"resolved": "https://registry.npmmirror.com/jsqr/-/jsqr-1.4.0.tgz", |
|||
"integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" |
|||
}, |
|||
"nanoid": { |
|||
"version": "3.3.8", |
|||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz", |
|||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==" |
|||
}, |
|||
"picocolors": { |
|||
"version": "1.1.1", |
|||
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", |
|||
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" |
|||
}, |
|||
"postcss": { |
|||
"version": "8.4.49", |
|||
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.49.tgz", |
|||
"integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", |
|||
"requires": { |
|||
"nanoid": "^3.3.7", |
|||
"picocolors": "^1.1.1", |
|||
"source-map-js": "^1.2.1" |
|||
} |
|||
}, |
|||
"prettier": { |
|||
"version": "2.8.8", |
|||
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz", |
|||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", |
|||
"optional": true |
|||
}, |
|||
"rtcpeerconnection-shim": { |
|||
"version": "1.2.15", |
|||
"resolved": "https://registry.npmmirror.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz", |
|||
"integrity": "sha512-C6DxhXt7bssQ1nHb154lqeL0SXz5Dx4RczXZu2Aa/L1NJFnEVDxFwCBo3fqtuljhHIGceg5JKBV4XJ0gW5JKyw==", |
|||
"requires": { |
|||
"sdp": "^2.6.0" |
|||
} |
|||
}, |
|||
"sdp": { |
|||
"version": "2.12.0", |
|||
"resolved": "https://registry.npmmirror.com/sdp/-/sdp-2.12.0.tgz", |
|||
"integrity": "sha512-jhXqQAQVM+8Xj5EjJGVweuEzgtGWb3tmEEpl3CLP3cStInSbVHSg0QWOGQzNq8pSID4JkpeV2mPqlMDLrm0/Vw==" |
|||
}, |
|||
"source-map": { |
|||
"version": "0.6.1", |
|||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", |
|||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" |
|||
}, |
|||
"source-map-js": { |
|||
"version": "1.2.1", |
|||
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", |
|||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==" |
|||
}, |
|||
"ts-custom-error": { |
|||
"version": "3.3.1", |
|||
"resolved": "https://registry.npmmirror.com/ts-custom-error/-/ts-custom-error-3.3.1.tgz", |
|||
"integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==" |
|||
}, |
|||
"vue": { |
|||
"version": "2.7.16", |
|||
"resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz", |
|||
"integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", |
|||
"requires": { |
|||
"@vue/compiler-sfc": "2.7.16", |
|||
"csstype": "^3.1.0" |
|||
} |
|||
}, |
|||
"vue-qrcode-reader": { |
|||
"version": "3.0.0", |
|||
"resolved": "https://registry.npmmirror.com/vue-qrcode-reader/-/vue-qrcode-reader-3.0.0.tgz", |
|||
"integrity": "sha512-44TT0PQxMOBtSiJg+8/lM9jXGIBEtp2U3sy642uv13IfKquwEv1UtNyof2y8lILsRX7cn7xt0XkUahIHWyEXAQ==", |
|||
"requires": { |
|||
"barcode-detector": "^0.5.0", |
|||
"callforth": "^0.3.1", |
|||
"core-js": "^3.6.5", |
|||
"vue": "^2.6.11", |
|||
"webrtc-adapter": "7.7.0" |
|||
} |
|||
}, |
|||
"webrtc-adapter": { |
|||
"version": "7.7.0", |
|||
"resolved": "https://registry.npmmirror.com/webrtc-adapter/-/webrtc-adapter-7.7.0.tgz", |
|||
"integrity": "sha512-7Bp9OBnx642oJRkom1tNAbeJjUadAq2rh5xLL9YXPw5hVyt2h4hHr5bcoPYDs1stp/mZHSPSQA34YISdnr0DBQ==", |
|||
"requires": { |
|||
"rtcpeerconnection-shim": "^1.2.15", |
|||
"sdp": "^2.12.0" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,20 @@ |
|||
{ |
|||
"name": "tourGuide", |
|||
"version": "1.0.0", |
|||
"description": "", |
|||
"main": "main.js", |
|||
"dependencies": { |
|||
"vue-qrcode-reader": "^3.0.0" |
|||
}, |
|||
"devDependencies": {}, |
|||
"scripts": { |
|||
"test": "echo \"Error: no test specified\" && exit 1" |
|||
}, |
|||
"repository": { |
|||
"type": "git", |
|||
"url": "http://47.114.134.244:3000/chenkainan/tourGuide.git" |
|||
}, |
|||
"keywords": [], |
|||
"author": "", |
|||
"license": "ISC" |
|||
} |
@ -0,0 +1,569 @@ |
|||
<template> |
|||
<view class="bg"> |
|||
<!-- <view class="header-tip">请填写您的信息,稍后平台工作人员会电话联系您~</view> --> |
|||
<view style="height: 20rpx;"></view> |
|||
<view class="user-other-info"> |
|||
<view class="info-title">·基础信息</view> |
|||
<div class="info-avatar-top"> |
|||
<span>头像</span> |
|||
<view @click="uploadAvator()"> |
|||
<image v-if="info.avatar" :src="info.avatar" mode="aspectFill" |
|||
style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image> |
|||
<div v-else style="width: 80rpx;height: 80rpx;border-radius: 50%;background: #0B898E;"></div> |
|||
</view> |
|||
</div> |
|||
<view class="userinfo-item" > |
|||
<span>姓名</span> |
|||
<view class="text-overflow" v-if="info.nickname">{{info.nickname}}</view> |
|||
<view v-else class="empty-value" >请填写</view> |
|||
</view> |
|||
<view class="userinfo-item" > |
|||
<span>性别</span> |
|||
<view class="text-overflow" v-if="info.genderStr">{{info.genderStr}}</view> |
|||
<view v-else class="empty-value" >请选择</view> |
|||
</view> |
|||
<view class="userinfo-item" > |
|||
<span>手机号</span> |
|||
<view v-if="info.mobile">{{info.mobile}}</view> |
|||
<view v-else class="empty-value" >请填写</view> |
|||
</view> |
|||
|
|||
<view class="info-title" style="margin-top: 46rpx;">·工作相关</view> |
|||
<view class="userinfo-item" @click="selectRank"> |
|||
<span>导游等级</span> |
|||
<view v-if="info.group_idStr">{{info.group_idStr}}</view> |
|||
<view v-else class="empty-value">请选择</view> |
|||
</view> |
|||
<view class="userinfo-item" > |
|||
<span>导游证号</span> |
|||
<view class="text-overflow" v-if="info.certificate_number">{{info.certificate_number}}</view> |
|||
<view v-else class="empty-value">请填写</view> |
|||
</view> |
|||
<view class="userinfo-item" @click="changeValue('duration')"> |
|||
<span>工作年限</span> |
|||
<view class="text-overflow" v-if="info.duration">{{info.duration}}</view> |
|||
<view v-else class="empty-value">请填写</view> |
|||
</view> |
|||
<view class="userinfo-item" @click="changeValue('lingo_ids')"> |
|||
<span>语言能力</span> |
|||
<view class="text-overflow" v-if="info.lingo_idsStr">{{info.lingo_idsStr}}</view> |
|||
<view v-else class="empty-value">请选择</view> |
|||
</view> |
|||
<view class="userinfo-item" @click="changeValue('scenic_ids')"> |
|||
<span>擅长景区</span> |
|||
<view class="text-overflow" v-if="info.scenic_idsStr">{{info.scenic_idsStr}}</view> |
|||
<view v-else class="empty-value">请选择</view> |
|||
</view> |
|||
<view class="userinfo-item" @click="changeValue('bio')"> |
|||
<span>个性签名</span> |
|||
<view class="text-overflowRows" v-if="info.bio">{{info.bio}}</view> |
|||
<view v-else class="empty-value">请填写</view> |
|||
</view> |
|||
<view class="userinfo-item" @click="changeValue('sparkle_text')"> |
|||
<span>核心亮点</span> |
|||
<view class="text-overflow" v-if="info.sparkle_textStr">{{info.sparkle_textStr}}</view> |
|||
<view v-else class="empty-value">请填写</view> |
|||
</view> |
|||
|
|||
<view class="info-title" style="margin-top: 46rpx;">·讲解视频</view> |
|||
<view class="userinfo-item" @click="changeValue('video_list')"> |
|||
<span>讲解视频</span> |
|||
<view class="text-overflow" v-if="info.video_list.length>0">{{info.video_list.length}}</view> |
|||
<view v-else class="empty-value">请选择</view> |
|||
</view> |
|||
|
|||
<view class="btn-tao" @click="submit">保存修改</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import {pathToBase64} from "@/static/js/mmmm-image-tools/index.js" |
|||
export default { |
|||
data() { |
|||
|
|||
return { |
|||
info: { |
|||
nickname: '',mobile:'',avatar: '', |
|||
gender: null, genderStr: '', |
|||
group_id: null,group_idStr: '', |
|||
certificate_number: '',duration:'', |
|||
lingo_ids: null, lingo_idsStr:'',lingo_idsFileList: [], |
|||
scenic_ids: null, scenic_idsStr:'', |
|||
bio:'', video_list: [], |
|||
sparkle_text: [], |
|||
sparkle_textStr: '', |
|||
}, |
|||
|
|||
groupIds: [], // 导游等级 |
|||
|
|||
} |
|||
}, |
|||
mounted() { |
|||
uni.$on("updateInfo",this.updateInfo) |
|||
}, |
|||
beforeUnmount () { |
|||
console.log('触发off') |
|||
uni.$off("updateInfo",this.updateInfo) |
|||
}, |
|||
beforeDestroy () { |
|||
console.log('触发off') |
|||
uni.$off("updateInfo",this.updateInfo) |
|||
}, |
|||
|
|||
onLoad () { |
|||
this.getUserInfo() |
|||
this.initSelect() |
|||
}, |
|||
methods: { |
|||
//获取导游信息 |
|||
getUserInfo () { |
|||
this.Post({}, '/api/Merchants/get_login_details').then(res => { |
|||
let resData = res.data |
|||
let lingo_idsFileList = [] |
|||
let video_list = [] |
|||
try { |
|||
lingo_idsFileList = (resData.lingo_image_list || '').split(',').filter(v=>v) |
|||
video_list = (resData.video_list || '').split(',').filter(v=>v) |
|||
} catch(e){} |
|||
|
|||
this.info = { |
|||
id: resData.id,avatar: resData.avatar, |
|||
nickname: resData.nickname, mobile: resData.mobile, |
|||
certificate_number: resData.certificate_number, |
|||
duration:resData.duration,bio:resData.bio, |
|||
gender: resData.gender, genderStr: resData.gender == 1?'男':'女', |
|||
group_id: resData.group_id,group_idStr: resData.group_data.name, |
|||
|
|||
lingo_ids: resData.lingo_data.lingo_id, |
|||
lingo_idsStr:resData.lingo_data.name, |
|||
lingo_idsFileList: lingo_idsFileList, |
|||
|
|||
scenic_ids: resData.scenic_data.scenic_id, |
|||
scenic_idsStr:resData.scenic_data.name, |
|||
|
|||
sparkle_text: (resData.sparkle_text || []), |
|||
sparkle_textStr:(resData.sparkle_text || []).map(v=>v.text).join(','), |
|||
|
|||
video_list: video_list, |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
initSelect () { |
|||
// 获取导游等级 |
|||
this.Post({}, '/api/guide/getGuideGroupList').then(res => { |
|||
this.groupIds = res.data |
|||
}) |
|||
}, |
|||
|
|||
// 上传头像 |
|||
uploadAvator () { |
|||
let _this = this |
|||
let url = this.NEWAPIURL |
|||
// #ifdef H5 |
|||
url = '/api' |
|||
// #endif |
|||
url+='/api/Common/upload' |
|||
uni.chooseImage({ |
|||
count:1, |
|||
success: (res) => { |
|||
const tempFilePaths = res.tempFilePaths; |
|||
const uploadTask = uni.uploadFile({ |
|||
url: url, |
|||
filePath: tempFilePaths[0], |
|||
name: 'file', |
|||
header: {"token": '7e4bd097-8298-4cbe-8c75-535874a5c0e0'}, |
|||
success: (uploadFileRes) => { |
|||
try { |
|||
let res = JSON.parse(uploadFileRes.data) |
|||
if (res.code == 1) { |
|||
_this.info.avatar = res.data.fullurl |
|||
} |
|||
} catch(e) {} |
|||
|
|||
|
|||
}, |
|||
fail:()=> { |
|||
uni.showToast({ |
|||
title:'上传失败', |
|||
icon:'none' |
|||
}) |
|||
} |
|||
}); |
|||
|
|||
}, |
|||
fail:()=> { |
|||
uni.showToast({ |
|||
title:'上传失败', |
|||
icon:'none' |
|||
}) |
|||
} |
|||
}); |
|||
}, |
|||
selectSex () { |
|||
let _this = this |
|||
let itemList = ['男','女'] |
|||
let valueList = ['1','2'] |
|||
uni.showActionSheet({ |
|||
itemList: itemList, |
|||
success: function (res) { |
|||
let index = res.tapIndex; |
|||
_this.info.genderStr = itemList[index] |
|||
_this.info.gender = valueList[index] |
|||
|
|||
}, |
|||
fail: function (res) { |
|||
console.log(res.errMsg); |
|||
} |
|||
}); |
|||
}, |
|||
selectRank () { |
|||
let _this = this |
|||
let itemList = this.groupIds.map(v=>v.name) |
|||
let valueList = this.groupIds.map(v=>v.id) |
|||
uni.showActionSheet({ |
|||
itemList: itemList, |
|||
success: function (res) { |
|||
let index = res.tapIndex; |
|||
_this.info.group_idStr = itemList[index] |
|||
_this.info.group_id = valueList[index] |
|||
|
|||
}, |
|||
fail: function (res) { |
|||
console.log(res.errMsg); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
// 跳转修改数据 |
|||
changeValue(valueType) { |
|||
let inputValue = this.info[valueType] |
|||
if (valueType == "lingo_ids") { |
|||
uni.setStorageSync("userfileList",JSON.stringify(this.info.lingo_idsFileList)) |
|||
} |
|||
if (valueType == 'video_list') { |
|||
uni.setStorageSync("userVideofileList",JSON.stringify(this.info.video_list)) |
|||
} |
|||
if (valueType == 'sparkle_text') { |
|||
inputValue = this.info.sparkle_textStr |
|||
} |
|||
|
|||
uni.navigateTo({ |
|||
url: `/subPackages/user/infoFilling?valueType=${valueType}&inputValue=${inputValue}` |
|||
}) |
|||
}, |
|||
|
|||
// 接受回调 |
|||
updateInfo(data) { |
|||
if (data.msgType == 'registerInfo') { |
|||
console.log(data.data) |
|||
let valueType = data.data.valueType |
|||
let valueTypeStr = valueType + 'Str' |
|||
let fileListStr = valueType+'FileList' |
|||
let inputValue = data.data.inputValue |
|||
let inputValueStr = data.data.inputValueStr |
|||
let fileList = data.data.fileList |
|||
this.info[valueType] = inputValue |
|||
if (this.info[valueTypeStr] !== undefined && inputValueStr) { |
|||
this.info[valueTypeStr] = inputValueStr |
|||
} |
|||
if (this.info[fileListStr] && fileList) { |
|||
this.info[fileListStr] = fileList |
|||
} |
|||
|
|||
console.log(this.info) |
|||
|
|||
} |
|||
}, |
|||
|
|||
|
|||
|
|||
submit() { |
|||
// 校验 |
|||
// if (!this.info.nickname) { |
|||
// uni.showToast({title:"请输入姓名",icon:"none"}) |
|||
// return |
|||
// } |
|||
if(!this.info.avatar) { |
|||
uni.showToast({title:"请上传头像",icon:"none"}) |
|||
return |
|||
} |
|||
// if (!this.info.gender) { |
|||
// uni.showToast({title:"请选择性别",icon:"none"}) |
|||
// return |
|||
// } |
|||
// if (!this.info.mobile || !this.IsTel(this.info.mobile)) { |
|||
// uni.showToast({title: "请输入正确的手机号码",icon: 'none'}) |
|||
// return; |
|||
// } |
|||
if (!this.info.group_id) { |
|||
uni.showToast({title: "请选择导游等级",icon: 'none'}) |
|||
return; |
|||
} |
|||
// if (!this.info.certificate_number) { |
|||
// uni.showToast({title: "请输入导游证号",icon: 'none'}) |
|||
// return; |
|||
// } |
|||
if (!this.info.duration) { |
|||
uni.showToast({title: "请输入工作年限",icon: 'none'}) |
|||
return; |
|||
} |
|||
if (!this.info.lingo_ids || this.info.lingo_idsFileList.length<=0) { |
|||
uni.showToast({title: "请选择语言能力并上传证明材料",icon: 'none'}) |
|||
return; |
|||
} |
|||
if (!this.info.scenic_ids) { |
|||
uni.showToast({title: "请选择擅长景区",icon: 'none'}) |
|||
return; |
|||
} |
|||
if (!this.info.bio) { |
|||
uni.showToast({title: "请输入个性签名",icon: 'none'}) |
|||
return; |
|||
} |
|||
if (this.info.sparkle_text.length<=0) { |
|||
uni.showToast({title: "请输入核心亮点",icon: 'none'}) |
|||
return; |
|||
} |
|||
console.log(this.info) |
|||
|
|||
let param = { |
|||
method: "POST", |
|||
...this.info, |
|||
lingo_image_list: this.info.lingo_idsFileList.join(','), |
|||
video_list: this.info.video_list.join(','), |
|||
sparkle_text: JSON.stringify(this.info.sparkle_text) |
|||
} |
|||
delete param.nickname |
|||
delete param.gender |
|||
delete param.mobile |
|||
delete param.certificate_number |
|||
|
|||
|
|||
|
|||
uni.showModal({ |
|||
title: '提示', |
|||
content: '确认修改您的信息?', |
|||
success: res => { |
|||
if (res.confirm) { |
|||
this.Post(param, '/api/Merchants/update_guide_details').then(res => { |
|||
console.log(res) |
|||
if (res.code == 1) { |
|||
uni.showModal({ |
|||
title: '提示', |
|||
content: res.msg, |
|||
showCancel: false, |
|||
success: res => { |
|||
if (res.confirm) { |
|||
this.getUserInfo() |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
view { |
|||
box-sizing: content-box; |
|||
} |
|||
.bg{ |
|||
min-height: 100vh; |
|||
overflow-x: hidden; |
|||
background: white; |
|||
padding-bottom: 50rpx; |
|||
} |
|||
.header-tip{ |
|||
font-weight: 400; |
|||
font-size: 27rpx; |
|||
color: #585858; |
|||
padding: 33rpx 0; |
|||
text-align: center; |
|||
} |
|||
.empty-value{ |
|||
font-weight: 500; |
|||
font-size: 28rpx; |
|||
color: #999999; |
|||
} |
|||
|
|||
.info-avatar-top { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
font-size: 28rpx; |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
padding: 40rpx 0; |
|||
height: 48rpx; |
|||
color: #333; |
|||
align-items: center; |
|||
} |
|||
.info-avatar-top view{ |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
.info-avatar-top view:after{ |
|||
content: ""; |
|||
width: 20rpx; |
|||
height: 20rpx; |
|||
margin-left: 6rpx; |
|||
background-image: url('https://static.ticket.sz-trip.com/tongli/images/user/rightIcon-gray.png'); |
|||
background-size: 100% 100%; |
|||
} |
|||
.info-avatar-top img { |
|||
width: 80rpx; |
|||
height: 80rpx; |
|||
border-radius: 50%; |
|||
margin-right: 10rpx; |
|||
} |
|||
|
|||
.change-avatar-btn { |
|||
color: #FFF; |
|||
width: 220rpx; |
|||
margin: 0 auto; |
|||
line-height: 70rpx; |
|||
border-radius: 20rpx; |
|||
background: #4C93FF; |
|||
position: relative; |
|||
font-size: 34rpx; |
|||
} |
|||
|
|||
.change-avatar-btn input { |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
opacity: 0; |
|||
} |
|||
|
|||
.user-other-info { |
|||
margin:0 30rpx; |
|||
.info-title{ |
|||
font-weight: bold; |
|||
font-size: 32rpx; |
|||
color: #000000; |
|||
} |
|||
} |
|||
|
|||
.userinfo-item { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
font-size: 28rpx; |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
padding: 40rpx 30rpx 40rpx 0; |
|||
height: 48rpx; |
|||
color: #333; |
|||
position: relative; |
|||
} |
|||
|
|||
.info-avatar-top span { |
|||
font-weight: 500; |
|||
font-size: 31rpx; |
|||
flex-shrink: 0; |
|||
} |
|||
|
|||
.userinfo-item span { |
|||
font-weight: 500; |
|||
font-size: 31rpx; |
|||
flex-shrink: 0; |
|||
color: #000; |
|||
width: 200rpx; |
|||
} |
|||
|
|||
.userinfo-item i { |
|||
font-weight: 500; |
|||
font-size: 24rpx; |
|||
color: #999999; |
|||
} |
|||
|
|||
.userinfo-item { |
|||
& view::after { |
|||
content: ""; |
|||
width: 20rpx; |
|||
height: 20rpx; |
|||
margin-left: 6rpx; |
|||
background-image: url('https://static.ticket.sz-trip.com/tongli/images/user/rightIcon-gray.png'); |
|||
background-size: 100% 100%; |
|||
position: absolute; |
|||
right: 0; |
|||
margin: auto; |
|||
top: 0; |
|||
bottom: 0; |
|||
} |
|||
} |
|||
|
|||
.birthday-box { |
|||
text-align: right; |
|||
} |
|||
|
|||
.cropper { |
|||
width: auto; |
|||
height: 100%; |
|||
} |
|||
|
|||
.cropper-content { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
z-index: 1000; |
|||
} |
|||
|
|||
.dialog-footer .change-avatar-btn { |
|||
position: fixed; |
|||
text-align: center; |
|||
bottom: 80rpx; |
|||
left: 50%; |
|||
margin-left: -110rpx; |
|||
} |
|||
|
|||
.btn-tao { |
|||
text-align: center; |
|||
font-size: 30rpx; |
|||
width: 697rpx; |
|||
height: 80rpx; |
|||
background: #96684F; |
|||
border-radius: 40rpx; |
|||
line-height: 80rpx; |
|||
color: #FFFFFF; |
|||
margin-top: 55rpx; |
|||
} |
|||
|
|||
.popup-box { |
|||
border-radius: 20rpx 20rpx 0rpx 0rpx; |
|||
background: #fff; |
|||
overflow: hidden; |
|||
|
|||
.popup-item { |
|||
width: 697rpx; |
|||
height: 99rpx; |
|||
font-weight: 500; |
|||
font-size: 31rpx; |
|||
color: #12293C; |
|||
margin: auto; |
|||
} |
|||
.popup-item:nth-child(2) { |
|||
border: none; |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
border-top: 1rpx solid #D8D8D8; |
|||
} |
|||
|
|||
.popup-items { |
|||
width: 100%; |
|||
height: 99rpx; |
|||
font-weight: 500; |
|||
font-size: 31rpx; |
|||
color: #12293C; |
|||
border-top: 13rpx solid #F2F2F2; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,41 @@ |
|||
<template> |
|||
<view class="bg"> |
|||
<video class="video" v-if="url" :src="url" preload="metadata" ></video> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
url: '' |
|||
} |
|||
}, |
|||
onLoad(option) { |
|||
console.log(option); |
|||
if (option.url) { |
|||
this.url = decodeURIComponent(option.url) |
|||
}else{ |
|||
this.goBack() |
|||
} |
|||
console.log(this.url) |
|||
// 传入需要跳转的链接 使用web-view标签进行跳转 |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.bg{ |
|||
width: 100%; |
|||
height: calc(100vh - 44px); |
|||
background: black; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
overflow: hidden; |
|||
.video{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue