Commit 18595172 authored by Facius's avatar Facius
parents 71cc172a 1a086996
......@@ -46,14 +46,37 @@ export default {
// 授权用户信息
authUserInfo: "",
// 用户入驻信息
settledInfo: {},
settledInfo: {},
navHeight: 0, //导航栏高度
rpxScreenHeight: 0,// 照相视框高度
safeHeight:0, // 安全高度
//拍照相关数据
photo: {
product: {
brandId: '', // 品牌id
brandName: '', // 品牌名称
classifyId: '', // 分类id
systemId: '', // 系统id
},
topIndex:0,
itemIndex:0,
currentItemLength: 0,//已拍摄照片张数
productList: [],
currentItem: null, // 选择的某一项
setting: null, //自定义设置
waterSetting: null, // 水印设置
tempPath: {
origin: '', // 缓存拍照图片
mixWater: '' // 缓存水印拍照图片
}
},
},
onLaunch: function () {
// 应用初始化(全局只触发一次)
AnalysysAgent.registerSuperProperty("platform", "self-support");
this.getSystemInfo()
// 版本更新
this.updateApp();
},
......@@ -64,7 +87,22 @@ export default {
onHide: function () {
// 应用从前台进入后台
},
methods: {
methods: {
getSystemInfo() {
try {
let a = wx.getSystemInfoSync();
// this.globalData.platform = systemInfo.platform, this.globalData.pixelRatio = a.pixelRatio,
// this.globalData.statusBarHeight = a.statusBarHeight, this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90,
// this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750, this.globalData.screenWidth = a.screenWidth,
// this.globalData.screenHeight = a.screenHeight;
this.globalData.navHeight = a.statusBarHeight / a.screenWidth * 750 + 90
this.globalData.rpxScreenHeight = a.screenHeight / a.screenWidth * 750
this.globalData.screenHeight = a.screenHeight
this.globalData.safeHeight = a.safeArea.bottom
} catch (a) {
}
},
async getBaseInfo(vm, callBack) {
uni.showLoading({
title: "加载中……",
......
let commonApiFun = function(vm){
let loginWxByUser = async (params = {}) => await vm.$u.get('/wxh-support-rest/rest/ssoinfo/v3/getUsersByCode', params);
let loginWxByPhone = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/v3/findByMobile', params,{'content-type': 'application/x-www-form-urlencoded'});
let loginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization', params, {'content-type': 'application/x-www-form-urlencoded'});
let loginWechatAuth = async (params = {}) => await vm.$u.post('/wxh-support-rest/rest/ssoinfo/wxapp/unify/authorization', params, {'content-type': 'application/x-www-form-urlencoded'});
// 水印-查询用户自定义设置
let getUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/getUserWatermark', params);
// 水印-保存用户自定义设置
let saveUserWatermark = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/saveUserWatermark', params);
// 保存图片
let saveImage = async (params = {}) => await vm.$u.post('http://apidoc.banshouhui.com:3000/mock/89/saveImage', params);
const commonApi = {
loginWxByUser,
loginWxByPhone,
loginWechatAuth,
loginWechatAuth,
getUserWatermark,
saveUserWatermark,
saveImage
}
return commonApi
}
......
<template>
<view>
<view class="contentView">
<!-- <u-image class="pic" :src="files[0]" bg-color="transparent" @click="showPreviewFn"></u-image> -->
<image class="pic" :src="files[0]" v-lazy mode="aspectFit" @click="showPreviewFn"></image>
</view>
<view class="bottomView">
<image class="btn" :src="btn_remake" @click="$u.throttle(remakePhoto, 3000)"></image>
<image class="btn" :src="btn_continue" @click="$u.throttle(continuePhoto, 3000)"></image>
</view>
<image class="btn finish" src="/static/photo/finish.png" @click="$u.throttle(finishPhoto, 3000)"></image>
</view>
</template>
<script>
import qiniup from '@/components/upload/qiniup';
const app = getApp()
export default {
props: {},
mixins: [qiniup],
data() {
return {
protocolContent: '',
btn_remake: 'https://qn-static.banshouhui.com/take_order/photo/remake.png',
btn_continue: '/static/photo/continue.png',
standardId: '',
images: [],
files: [],
fileMaps: [],
keys: [],
token: '',
product: '',
}
},
created(e) {
// 获取照片选项对象
console.log(getApp().globalData.photo.currentItem)
const product = app.globalData.photo.product
this.product = `?brandId=${product.brandId}&brand=${product.brandName}&classifyId=${product.classifyId}&systemId=${product.systemId}`
// if(app.globalData.photo.currentItem) {
// // 获取规格Id
// this.standardId = app.globalData.photo.currentItem._id
// }
getApp().trackPage('照片预览页')
const globalTempPath = getApp().globalData.photo.tempPath
if(globalTempPath && globalTempPath.mixWater){
this.files = [globalTempPath.mixWater]
}
// if(e.standardId) {
// this.standardId = e.standardId
// }
console.log(this.files)
this.token = getApp().globalData.token
},
methods: {
// 保存照片到本地
async saveTempToLocal(tempImagePath) {
//has_origin //是否保存原图
let that = this
const photo = getApp().globalData.photo
if(!photo.tempPath){
return
}
let path = ''
if(photo.tempPath.origin && photo.waterSetting && photo.waterSetting.has_origin){
// 保存原图到本地
path = photo.tempPath.origin
let result = await this.saveLocal(path)
if(result){
uni.showToast({
icon: 'none',
title: '已将照片原图保存到本地相册'
})
}
}
if(photo.currentItem){
photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
}
// if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex]
// if(topArr[photo.itemIndex]){
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// }
// }
// photo.
if(photo.tempPath.mixWater){
// 保存水印处理图片到本地
path = photo.tempPath.mixWater
let result1 = await this.saveLocal(path)
if(result1){
uni.showToast({
icon: 'none',
title: '已将水印图片保存到本地相册'
})
}
}
},
saveLocal(path){
return new Promise((resolve,reject)=>{
uni.saveImageToPhotosAlbum({
filePath: path,
success() {
resolve(true)
},
fail() {
reject('保存失败')
}
})
})
},
showPreviewFn(img) {
uni.previewImage({
current: 0,
urls: this.files
});
},
// 重拍图片
remakePhoto() {
this.$emit('changeType', 1)
},
finishPhoto(){
const photo = getApp().globalData.photo
photo.currentItemLength = 10
this.continuePhoto()
// 完成本项
this.$emit('finish')
},
// 确认图片
continuePhoto() {
const photo = getApp().globalData.photo
let self = this
uni.showLoading({
title:'图片保存中…'
})
self.saveTempToLocal()
self.confirmUpload(true)
},
submitFile() {
let self = this
if(self.keys.length) {
for (let s of self.keys) {
self.$u.api.saveImage({
"token": self.token,
"standardId": self.standardId,
"url": s,
}).then(async res =>{
console.log(res, "云服务保存图片");
if(res.result.code) {
// TODO 参数是否要来回传递
const photo = getApp().globalData.photo
photo.currentItemLength = photo.currentItemLength + 1
uni.hideLoading()
// 当前项的图片显示
// 拍照项张数目增加 等于10张
if(photo.currentItemLength<10){
this.$emit('changeType', 1)
}else{
this.$emit('finish')
}
} else {
uni.showToast({
title:'图片上传失败 '+ res.result.msg
})
}
})
}
}
},
downloadImages() {
let self = this;
for (let url of this.images) {
uni.downloadFile({
url: url, //仅为示例,并非真实的资源
success(res) {
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
if (res.statusCode === 200) {
self.files.push(res.tempFilePath)
}
},
fail(e) {
debugger
}
})
}
},
}
}
</script>
<style lang="scss">
.contentView {
background-color: #333333;
/* padding-top: 120rpx; */
padding-bottom:228rpx;
height: 100vh;
display: flex;
flex-direction: column;
}
/deep/ .u-image{
height:100%!important;
}
/deep/ .u-image__loading{
background-color: transparent!important;
}
/deep/ .u-image__error{
background-color: transparent!important;
}
.pic {
flex:1;
width: 100%;
/* height:auto */
/* height: 760rpx; */
}
.bottomView {
box-shadow: 0 0 1rpx 6rpx rgba(255,255,255,0.05);
background-color: #333333;
width: 100%;
padding:70rpx 0;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-around;
align-items: center;
.btn{
display: block;
width: 200rpx;
height: 88rpx;
}
}
.btn{
display: block;
width: 232rpx;
height: 80rpx;
&.finish{
position: fixed;
top:180rpx;
right:30rpx;
}
}
</style>
This diff is collapsed.
<!-- 拍照规范弹窗 -->
<template>
<view class="standard-box">
<swiper class="swiper-box" :current="swiperCurrent" @change="changeTab" @transition="transition" @animationfinish="animationfinish">
<swiper-item class="swiper-item" key="swiper1">
<view class="title">
拍照要求
</view>
<view class="txt-box" >
<view class="txt" v-for="(txt,index) in currentItem.main_point" :key="index">
{{index+1}}. {{txt}}
</view>
<view class="txt tips">
注意:{{currentItem.note}}
</view>
</view>
</swiper-item>
<swiper-item class="swiper-item" v-for="(src, index) in swiperList" :key="index">
<image @click="previewImage(index)" class="icon" mode="aspectFit" :src="src"></image>
</swiper-item>
</swiper>
<view class="tab-box">
<u-tabs-swiper bg-color="transparent" inactive-color="#999"
ref="uTabs" :list="tabList" :current="current"
@change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
</view>
</view>
</template>
<script>
export default {
name:"photo-standard",
props:{
currentItem:{
type: Object,
default () {
return {
images: [],
}
}
},
},
data() {
return {
tabList: [{
name: '十年'
}, {
name: '青春'
}, {
name: '之约'
}],
swiperList:[],
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
current: 0, // tabs组件的current值,表示当前活动的tab选项
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
height:0,
}
},
watch:{
"currentItem.images"(val){
if(val.length>0){
this.changeList(val)
// let swiperList = JSON.parse(JSON.stringify(val))
// let len = tabs.length
// let tabList = [{name:'拍照要求'}].concat(Array.from({name:'示意图'},len))
// console.log(tabList,'tabList')
}
},
},
created() {
// getApp().trackPage('照片预览页')
// console.log(e, 'e')
// if (e.img) {
// this.images = [e.img]
// }
// console.log(this.images, 'this.images')
},
mounted(){
this.changeList(this.currentItem.images)
this.getSwiperHeight()
},
methods: {
changeList(list){
let swiperList = JSON.parse(JSON.stringify(list))
let len = list.length
let tabList = []
for(let i=0;i<len;i++){
let item = {
name:'示意图' + (i + 1)
}
tabList.push(item)
}
tabList = [{name:'拍照要求'}].concat(tabList)
this.swiperList = swiperList
this.tabList = tabList
},
getSwiperHeight(){
const globalData = getApp().globalData
this.height = globalData.screenHeight*2 - globalData.navHeight - 200
},
previewImage(index){
uni.previewImage({
current:index,
urls:this.swiperList,
})
},
// tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
// console.log(e.detail,'e.detail-transition')
// let dx = e.detail.dx;
// this.$refs.uTabs.setDx(dx);
},
changeTab(){
this.current = this.swiperCurrent
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) {
// console.log(e.detail,'e.detail-animationfinish')
// let current = e.detail.current;
// this.$refs.uTabs.setFinishCurrent(current);
// this.swiperCurrent = current;
// this.current = current;
},
// scroll-view到底部加载更多
onreachBottom() {
}
}
}
</script>
<style lang="scss">
.standard-box{
position: absolute;
left:0;right:0;
/* height: calc(100vh - 240rpx); */
z-index: 100;
bottom:240rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color:#fff;
}
.swiper-box{
width: 690rpx;
min-height: 690rpx;
margin-bottom: 150rpx;
border-radius: 12rpx;
background-color: #fff;
}
.tab-box{
position: absolute;
bottom:0;
left:30rpx;
right:30rpx;
}
.swiper-item{
box-sizing: border-box;
// width:690rpx;
padding:30rpx;
.title{
margin-top:20rpx;
font-weight: bold;
line-height: 50rpx;
color:#333;
font-size: 36rpx;
}
&>image{
width:630rpx;
min-height: 630rpx;
}
.txt-box{
max-height: 560rpx;
overflow: auto;
}
.txt{
white-space: normal;
padding-top:26rpx;
line-height: 34rpx;
color:#666;
font-size: 28rpx;
&.tips{
padding-bottom:26rpx;
color:#D73400
}
}
}
/* .pic {
display: block;
width: 100%;
height: auto;
}
.scroll-view_H {
white-space: nowrap;
width: 750rpx;
height: 300rpx;
}
.view-content {
display: flex;
} */
</style>
<template>
<view>
<view class="wrap">
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish">
<swiper-item class="swiper-item">
<view class="inner txt-inner" :style="{'background-image':'url(/static/photo/shadow-bg.png)'}">
<view class="title">
拍照要求
</view>
<view class="txt-box" >
<view class="txt" v-for="(txt,index) in currentItem.main_point" :key="index">
{{index+1}}. {{txt}}
</view>
<view class="txt tips" v-if="currentItem.note">
注意:{{currentItem.note}}
</view>
</view>
</view>
</swiper-item>
<swiper-item class="swiper-item" v-for="(src, index) in swiperList" :key="index">
<view class="inner pic">
<image @click="previewImage(index)" class="icon" mode="aspectFit" :src="src"></image>
</view>
</swiper-item>
</swiper>
<view class="u-tabs-box">
<u-tabs-swiper bg-color="transparent" inactive-color="#999" activeColor="#2272FF" ref="tabs"
:list="tabList" :current="current" @change="change" :is-scroll="false" swiperWidth="750">
</u-tabs-swiper>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
currentItem: {
type: Object,
default () {
return {
images: [],
}
}
},
},
data() {
return {
current: 0,
swiperCurrent: 0,
dx: 0,
};
},
onLoad() {},
computed: {
swiperList() {
let list = this.currentItem.images || []
return list
},
tabList() {
let list = this.currentItem.images || []
let swiperList = JSON.parse(JSON.stringify(list))
let len = list.length
let tabList = []
for (let i = 0; i < len; i++) {
let item = {
name: '示意图' + (i + 1)
}
tabList.push(item)
}
tabList = [{
name: '拍照要求'
}].concat(tabList)
return tabList
},
},
methods: {
previewImage(index){
uni.previewImage({
current:index,
urls:this.swiperList,
})
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
// this.getOrderList(index);
},
transition({
detail: {
dx
}
}) {
this.$refs.tabs.setDx(dx);
},
animationfinish({
detail: {
current
}
}) {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
}
}
};
</script>
<style>
/* #ifndef H5 */
page {
height: 100%;
background-color: #f2f2f2;
}
/* #endif */
</style>
<style lang="scss" scoped>
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top) - 200rpx);
padding-top:100rpx;
width: 100%;
padding-bottom: 0;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);;
}
.swiper-box {
flex: 1;
}
.swiper-item {
display: flex;
align-items: center;
height: 100%;
padding: 0 30rpx;
box-sizing: border-box;
}
.swiper-item .inner {
padding: 30rpx;
background-color: #fff;
width:690rpx;
height: 690rpx;
overflow: hidden;
&.txt-inner{
background-position: bottom right;
background-size: 340rpx 380rpx;
background-repeat: no-repeat;
}
.title {
margin-top: 20rpx;
font-weight: bold;
line-height: 50rpx;
color: #333;
font-size: 36rpx;
}
&.pic{
padding:0;
background-color: transparent;
}
&>image {
width: 690rpx;
min-height: 690rpx;
}
.txt-box {
// max-height: 560rpx;
overflow: auto;
width:100%;
height: 560rpx;
}
.txt {
white-space: normal;
padding-top: 26rpx;
line-height: 34rpx;
color: #666;
font-size: 28rpx;
&.tips {
padding-bottom: 26rpx;
color: #D73400
}
}
}
</style>
This diff is collapsed.
import qiniuUploader from '@/include/libs/qiniuUploader.js';
const globalUrl = process.uniEnv || {}'
const globalUrl = process.uniEnv || {}
export default {
name: 'qiniup',
components: {},
......
import qiniuUploader from '@/include/libs/qiniuUploader.js';
const globalUrl = process.uniEnv || {}
export default {
name: 'qiniup',
components: {},
data() {
return {
domain: 'http://upload.qiniup.com', // 七牛上传域名地址
uptokenURL: globalUrl.ucenterUrl.apiUrl + '/v1/tokens', // 上传token地址
files:[], // 上传文件
fileMaps:[], // 上传文件返回对象
keys:[], // 七牛返回key
uploadToken: '', // 上传token
maximum:999, // 最大上传数量
qiniuOptions: {}, // 七牛上传配置
};
},
created() {
this.initQiniu()
},
methods: {
initQiniu: function() {
var defaulfs = {
// bucket所在区域,这里是华北区。ECN, SCN, NCN, NA, ASG,分别对应七牛云的:华东,华南,华北,北美,新加坡 5 个区域
region: 'ECN',
bucket: 'fa-cms',
qiniuBucketURLPrefix: 'uploads',
// 获取uptoken方法三选一即可,执行优先级为:uptoken > uptokenURL > uptokenFunc。三选一,剩下两个置空。推荐使用uptokenURL,详情请见 README.md
// 由其他程序生成七牛云uptoken,然后直接写入uptoken
uptoken: '',
// 从指定 url 通过 HTTP GET 获取 uptoken,返回的格式必须是 json 且包含 uptoken 字段,例如: {"uptoken": "0MLvWPnyy..."}
uptokenURL: this.uptokenURL,
// uptokenFunc 这个属性的值可以是一个用来生成uptoken的函数,详情请见 README.md
uptokenFunc: function() {
},
// bucket 外链域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 fileURL 字段。否则需要自己拼接
domain: this.domain,
// qiniuShouldUseQiniuFileName 如果是 true,则文件的 key 由 qiniu 服务器分配(全局去重)。如果是 false,则文件的 key 使用微信自动生成的 filename。出于初代sdk用户升级后兼容问题的考虑,默认是 false。
// 微信自动生成的 filename较长,导致fileURL较长。推荐使用{qiniuShouldUseQiniuFileName: true} + "通过fileURL下载文件时,自定义下载名" 的组合方式。
// 自定义上传key 需要两个条件:1. 此处shouldUseQiniuFileName值为false。 2. 通过修改qiniuUploader.upload方法传入的options参数,可以进行自定义key。(请不要直接在sdk中修改options参数,修改方法请见demo的index.js)
// 通过fileURL下载文件时,自定义下载名,请参考:七牛云“对象存储 > 产品手册 > 下载资源 > 下载设置 > 自定义资源下载名”(https://developer.qiniu.com/kodo/manual/1659/download-setting)。本sdk在README.md的"常见问题"板块中,有"通过fileURL下载文件时,自定义下载名"使用样例。
shouldUseQiniuFileName: true
};
let options = {}
if(Object.keys(this.qiniuOptions).length) {
Object.assign(options, defaulfs, this.qiniuOptions);
} else {
options = defaulfs;
}
// 将七牛云相关配置初始化进本sdk
qiniuUploader.init(options);
},
getUrlKey(file) {
let index = file.lastIndexOf('/');
let len = file.length
let name = file.substring(index + 1, len)
return name;
},
/**
* 确认上传
* @param {boolean} submit
*/
confirmUpload(submit = false) {
let self = this
const fileList = self.files
if (self.maximum - fileList.length <= 0) {
uni.showToast({
title: '图片数量不能大于' + self.maximum,
icon: 'none'
})
return
}
for (let file of fileList) {
let name = self.getUrlKey(file)
// 交给七牛上传
let item = {
src: '',
id: '',
key:'',
// filesize: '',
progress: 0
}
const params = {
name:name,
file:file,
}
qiniuUploader.upload(params, (res) => {
console.log(res,'res')
let inLen = self.maximum - fileList.length
if (inLen > 0) {
item.src = file
item.key = res.key || res.src
self.fileMaps.push(item);
self.keys.push(item.key)
if(submit) {
self.submitFile()
}
} else {
uni.showToast({
title: '图片数量不能大于9'
})
}
}, (error) => {
console.log('error: ' + error);
}, null, (res) => {
item.progress = res.progress
}, () => {
// 取消上传
}, () => {
// `before` 上传前执行的操作
}, (err) => {
// `complete` 上传接受后执行的操作(无论成功还是失败都执行)
});
}
}
}
}
......@@ -42,7 +42,8 @@
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
......@@ -269,8 +270,8 @@
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
"name": "入驻提示", //模式名称
"path": "pages/settle/prompt", //启动页面,必选
"name": "完工配置", //模式名称
"path": "pages/order/complete", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},
{
......
<template>
<view>
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
<view class="u-m-r-10">
<u-avatar :src="pic" size="140"></u-avatar>
<u-navbar v-if="!takeStatus" :is-back="false" :title-size="26" title-color="#000" title="我的"></u-navbar>
<view v-if="!takeStatus">
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
<view class="u-m-r-10">
<u-avatar :src="pic" size="140"></u-avatar>
</view>
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20">uView ui</view>
<view class="u-font-14 u-tips-color">微信号:helang_uView</view>
</view>
</view>
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20">uView ui</view>
<view class="u-font-14 u-tips-color">微信号:helang_uView</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item v-for="(item, index) in items" :title="item.title" :value="item.value" :key="index">
<u-icon slot="icon" size="32" name="search"></u-icon>
</u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20" @click="take">
<u-cell-group>
<u-cell-item icon="setting" title="相机组件测试"></u-cell-item>
</u-cell-group>
</view>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item v-for="(item, index) in items" :title="item.title" :value="item.value" :key="index">
<u-icon slot="icon" size="32" name="search"></u-icon>
</u-cell-item>
</u-cell-group>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="setting" title="设置"></u-cell-item>
</u-cell-group>
</view>
<take-photo type="test" v-if="takeStatus" @close="closeTake"></take-photo>
</view>
</template>
<script>
import takePhoto from '@/components/take/index.vue'
export default {
components: {
'take-photo': takePhoto
},
data() {
return {
pic:'https://uviewui.com/common/logo.png',
show:true
show:true,
takeStatus: false
}
},
computed: {
......@@ -50,7 +64,13 @@
},
methods: {
take() {
uni.hideTabBar()
this.takeStatus = true
},
closeTake() {
this.takeStatus = false
}
}
}
</script>
......
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