Commit f3bf6a20 by zhouzy
2 parents e143739e be461fff
......@@ -8,9 +8,12 @@
>
<div class="content">
<div class="title flex">
会员套餐名称
<div class="all flex">
<template v-if="true">
{{obj.codeState}}
<div
class="all flex"
@click="selectAll"
>
<template v-if="all">
<div class="sprite-icon icon-active"></div>
</template>
<template v-else>
......@@ -20,20 +23,19 @@
</div>
</div>
<div class="img-box">
<template v-for="(item,ind) in 17">
<template v-for="(item,index) in obj.imgList">
<div
:key="ind"
:key="index"
class="item"
@click="choose({item,index})"
>
<img src="@/assets/images/test.jpg">
<img :src="item.autoUrl">
<div class="radio-box">
<template v-if="item.active">
<div class="sprite-icon icon-active"></div>
</template>
<template v-else>
<div class="radio">
</div>
<div class="radio"></div>
</template>
</div>
</div>
......@@ -53,21 +55,59 @@
<script type='text/ecmascript-6'>
export default {
name: 'ResourcePopup',
props: ['value'],
data () {
props: {
value: Boolean,
data: {
type: Object,
default: () => {}
}
},
data() {
return {
show: false
show: false,
obj: {},
all: false
}
},
watch: {
'value' (n) {
value(n) {
this.show = n
},
data(n) {
console.log('123', n)
this.obj = n
this.checkAll()
}
},
mounted () {
},
mounted() {},
methods: {
close () {
choose({ item, index }) {
item.active = !item.active
this.$set(this.obj.imgList, index, item)
this.checkAll()
},
checkAll() {
let { imgList } = this.obj
try {
imgList.map(e => {
if (!e.active) throw false
})
} catch (error) {
this.all = error
return
}
this.all = true
},
selectAll() {
let {
all,
obj: { imgList }
} = this
imgList.map(e => (e.active = !all))
this.all = !all
this.obj.imgList = imgList
},
close() {
this.show = false
this.$emit('close')
}
......
<template>
<div class="layout">
<div class="search sticky">
<search />
<search @search="search" />
</div>
<scroll-view
class="content"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<template v-for="(i,index) in 10">
<template v-for="(i,index) in list">
<div
class="box"
:key="index"
......@@ -20,21 +20,22 @@
转发
<div class="sprite-icon icon-attract-customer-share"></div>
</div>
<div class="title text-hide">渠道活码名称大概到这个位置…</div>
<div class="title text-hide">{{i.codeState}}</div>
<div class="name-list">
<div class="label">使用人员:</div>
<div class="value">张三、C李四、小陈总、飞天小猪、海的小心心、陈五、金七</div>
<div class="value">{{i.staffName}}</div>
</div>
<div class="remark">
备注:{{i.remark || '- -'}}
备注:{{i.codeRemark || '- -'}}
</div>
<div class="img-box">
<template v-for="(item,ind) in 9">
<template v-for="(item,ind) in i.imgList">
<div
:key="ind"
class="item"
v-if="ind < 9"
>
<img src="@/assets/images/test.jpg">
<img :src="item.autoUrl">
</div>
</template>
</div>
......@@ -44,6 +45,7 @@
<resource-popup
v-model="showPopup"
@close="showPopup = false"
:data="currentItem"
/>
</div>
</template>
......@@ -51,18 +53,59 @@
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
data() {
return {
showPopup: false
showPopup: false,
codeStateOrStaffName: '',
list: [],
currentItem: {}
}
},
mounted () {
mounted() {
this.getList()
},
methods: {
share () {
getList() {
let { codeStateOrStaffName } = this
let data = {
method: 'cn.com.glsx.entmicro.code.listEntmicroChannelCodeList'
}
if(codeStateOrStaffName) data.codeStateOrStaffName = codeStateOrStaffName
window
.$HTTP({
url: 'http://192.168.3.191:8064/rop-scrm-entmicro/router',
data
})
.then(res => {
console.log(res)
res.map(e => {
let imgList = [
{
id: e.id,
autoUrl: e.qrCode
}
]
if (e.codeInfo && e.codeInfo.length) {
e.codeInfo.map(i => {
imgList.push(i)
})
}
e.imgList = imgList
})
this.list = res
})
},
share(e) {
this.showPopup = true
this.currentItem = e
},
search(e) {
console.log(e)
this.codeStateOrStaffName = e
this.getList()
},
onReachBottom () {
onReachBottom() {
console.log('触底')
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!