Commit e0df22c6 authored by xd's avatar xd

去掉alert

parent 52a28bce
File deleted
......@@ -121,17 +121,7 @@ const routes = [
path: '/qrCode',
name: 'qrCode',
component: () => import('@/views/qrCode/index')
},
{
path: '/manInfo',
name: 'ManInfo',
component: () => import('@/views/sideNav/manInfo/index')
},
{
path: '/goodPost',
name: 'GoodPost',
component: () => import('@/views/sideNav/goodPost/index')
},
}
// {
// path: '/about',
// name: 'about',
......
......@@ -196,7 +196,7 @@ function configWx(to) {
wx.ready(function () {
// JS-SDK配置信息验证失败时会进入此方法
wx.error(function (res) {
alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res));
// alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res))
})
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
wx.checkJsApi({
......@@ -249,7 +249,7 @@ function configWx(to) {
// alert(`--->A: err =${JSON.stringify(res)}`)
if (res.errMsg.indexOf('is not a function') > -1) {
alert('<i class="weui-icon-warn">版本过低请升级</i>')
// alert('<i class="weui-icon-warn">版本过低请升级</i>')
}
}
})
......
......@@ -33,7 +33,6 @@
<div class="list-title">任务列表</div>
<img class="list-icon" :src="cache.icon.arrowRightDark" />
</div>
<div class="list"><span>111</span><span>{{ userInfo }}</span></div>
<div class="list list-latest">
<div class="list-title">我的收益</div>
<img class="list-icon" :src="cache.icon.arrowRightDark" />
......@@ -155,7 +154,6 @@ export default {
},
// 获取code
zReadyUserId() {
alert('没code111')
/* zlog(
"%c--->this.zcache.code =",
"color: orange;",
......@@ -163,31 +161,28 @@ export default {
) */
if (this.$route.query.code === undefined){
alert('没code')
// alert('没code')
this.zTestPreAuthCode()
} else {
alert('有code')
alert(this.$route.query.code)
// alert('有code')
this.zTestGetNowUrlInfo();
this.zTestGetUserInfoByOldToken();
}
},
// 测试-获取当前Url信息
zTestGetNowUrlInfo() {
alert('获取url')
// alert('获取url')
this.zcache.nowUrl = JSON.stringify(this.$route.query);
this.zcache.code = String(this.$route.query.code);
alert(this.zcache.code)
alert(this.zcache.nowUrl)
this.url = this.zcache.nowUrl
},
zTestPreAuthCode() {
alert('获取code')
// alert('获取code')
const basicInfo = {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com:8087"),
redirectUrI: encodeURIComponent("oysales.oywanhao.com:8087"),
responseType: "code",
scope: "snsapi_base",
state: "ztest",
......@@ -212,7 +207,7 @@ export default {
},
// 测试-获取用户信息
zTestGetUserInfoByOldToken() {
alert('获取用户信息')
// alert('获取用户信息')
let postData = {
code: this.zcache.code,
};
......@@ -227,7 +222,7 @@ export default {
headers: headerData,
})
.then(res => {
alert('获取用户信息接口成功')
// alert('获取用户信息接口成功')
this.userInfo = JSON.stringify(res);
this.zcache.userInfoResNew = "RESOK:" + res.data.data.userId;
sessionStorage.setItem("userId", String(res.data.data.userId));
......
<template>
<div class="main">
<div class="contents">
<div class="zListActive">
<div class="inputs">
<div class="button" @click="zReadySetVoucherList">ReLoad</div>
</div>
</div>
<div v-for="item of zlist.voucher" :key="item.coupon_id" >
<div class="content">
<div class="content-imgs">
<img class="imgs-img" :src="zcache.defaultImgUrl" alt />
</div>
<div class="content-infos">
<div class="infos-mains">
<div class="mains">
<div class="main-usedPercent">活动ID:{{item.action_id}}</div>
<div class="main-money">{{item.coupon_title}}</div>
</div>
<div class="buttons">
<button class="button-send" @click="zVoucherPick(item.action_id, item.coupon_id)">推送</button>
</div>
</div>
<div class="infos-tips">
<div class="tip-shareMan">优惠券ID:{{item.coupon_id}}</div>
<!-- <div class="tip-commision">佣金:¥ {{item.commision}}</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
// import { ApiTestCfPost, ApiTestEaPost } from "@/api/test/main";
import { ApiEaPost, ApiEaActiveList } from "@/api/test/test";
import { configWx, getUserInfo } from "@/utils/aCommon";
// import * as APISidebarEA from "@/api/sidebar/ea";
import { getVoucherList, getVoucherWxUrl } from "@/api/sidebar/ea";
import { getUserInfoByUserId } from "@/api/sidebar/voucher";
import Vue from "vue";
import { Field } from "vant";
const zlog = console.log.bind(console);
Vue.use(Field);
export default {
name: "discountIndex",
data() {
return {
zcache: {
storeId: 1,
userId: "",
unionId: "",
userInfo: "",
defaultImgUrl: "/mainSale/2.png",
now: {
activeId: "",
voucherId: "",
}
},
zlist: {
voucher: [],
voucherUrl: ""
},
test: {
list: {
main: [
{
imgUrl: "/mainSale/test-city.png",
usedPercent: "10",
money: "100",
shareMan: "Alice",
commision: "11"
},
{
imgUrl: "/mainSale/test-city.png",
usedPercent: "20",
money: "200",
shareMan: "Bob",
commision: "22"
}
]
}
},
dis: {}
};
},
created() {
this.zcache.userId = this.$route.params.userId;
this.zReadyGetUserFromId();
this.getAgentAuth();
},
mounted() {
},
methods: {
// 测试-获取预授权码
zTestPreAuthCode() {
const basicInfo = {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
responseType: "code",
scope: "snsapi_base",
state: "ztest",
tail: "#wechat_redirect"
};
let url =
basicInfo.head +
"appid=" +
basicInfo.appId +
"&redirect_uri=" +
basicInfo.redirectUrI +
"&response_type=" +
basicInfo.responseType +
"&scope=" +
basicInfo.scope +
"&state=" +
basicInfo.state +
basicInfo.tail;
zlog("%c--->zTestPreAuthCode: Url =", "background: orange", url);
// window.location.href = url
},
zReadyGetUserFromId() {
let postData = {
param: this.zcache.userId
// param: 'ZhouHeQiang'
};
// alert(`--->userInfoFromId: postData = ${JSON.stringify(postData)}`);
getUserInfoByUserId(postData)
.then(res => {
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data[0])}`);
this.zcache.userInfo = String(res.data[0].departmentId);
// storeId 暂时写死
this.zcache.storeId = 1;
// this.zcache.storeId = Number(res.data[0].stall);
this.zReadySetVoucherList();
})
.catch(err => {});
},
// 获取优惠券列表
zReadySetVoucherList() {
this.zReadyDelVoucherList();
const postData = {
appCode: "0696", // j接口编码
mdid: this.zcache.storeId
};
// alert(`--->PostToEA: postData = ${JSON.stringify(postData)}`);
zlog("%c--->VoucherList: PD =", "background: orange;", postData);
getVoucherList(postData)
.then(res => {
zlog("%c--->VoucherList: RD =", "background: limegreen;", res);
// alert(`--->PostToEA: Res = ${JSON.stringify(res)}`);
this.zVoucherSet(res.result.coupons);
})
.catch(err => {
// alert(`--->PostToEA: err = ${JSON.stringify(err)}`);
});
},
zReadyDelVoucherList() {
this.zVoucherDel();
this.zVoucherUrlDel();
},
zVoucherPick(inActiveId, inVoucherId) {
this.zcache.now.activeId = String(inActiveId)
this.zcache.now.voucherId = String(inVoucherId)
this.zVoucherUrlDel();
const postData = {
appCode: "0697",
action_id: Number(inActiveId),
coupon_id: Number(inVoucherId)
};
zlog("%c--->VoucherWxUrl: PD =", "background: red;", postData);
getVoucherWxUrl(postData).then(res => {
zlog("%c--->VoucherWxUrl: RD =", "background: green;", res);
this.zVoucherUrlSet(res.result.link);
});
},
zpick(inMsgType, inUrl) {
// alert(`--->discount.vue: zpick: IN.`);
switch (inMsgType) {
case "text":
wx.invoke(
"sendChatMessage",
{
msgtype: "text", //消息类型,必填
text: {
content: inUrl
}
},
function(res) {
if (res.err_msg == "sendChatMessage:ok") {
// alert("--->discount.vue: zpick: text 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") {
// alert(
// `--->discount.vue: zpick: text 分享失败: res =${res.err_msg}`
// );
}
}
);
break;
case "h5":
// alert(`--->discount.vue: zpick: H5: IN.`);
wx.invoke(
"sendChatMessage",
{
msgtype: "text", //消息类型,必填
news: {
link: `http://qywx2.100smartdata.com/qrCode?Url=${inUrl}&activeId=${this.zcache.now.activeId}&voucherId=${this.zcache.now.voucherId}&unionId=1234`, //H5消息页面url 必填
title: "领取优惠券", //H5消息标题
desc: inUrl, //H5消息摘要
imgUrl: inUrl //H5消息封面图片URL
}
},
function(res) {
if (res.err_msg == "sendChatMessage:ok") {
// alert("--->discount.vue: zpick: h5 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") {
// alert(`--->discount.vue: zpick: h5 分享失败.`);
// alert(
// `--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}`
// );
}
}
);
break;
default:
break;
}
// zlog(
// "%c--->Click: Url =",
// "background: orange;",
// String(this.zlist.voucherUrl)
// );
// window.wx.miniProgram.navigateTo({
// url: this.zlist.voucherUrl
// });
},
zVoucherSet(inArray) {
this.zlist.voucher = inArray;
},
zVoucherDel() {
this.zlist.voucher = [];
},
zVoucherUrlSet(inData) {
this.zlist.voucherUrl = String(inData);
this.zpick('h5', String(inData))
},
zVoucherUrlDel() {
this.zlist.voucherUrl = "";
},
// testEaPost() {
// let postData = {
// appCode: '0603',
// condType: 1,
// condValue: '138069094',
// };
// ApiEaPost(postData).then(res => {
// console.log(res);
// });
// },
// testEaPost() {
// let postData = {
// appCode: '0606',
// crmActionDate: '2019-12-12'
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
testEaPost() {
let postData = {
appCode: "0696",
mdid: 1
};
ApiEaActiveList(postData).then(res => {
// console.log(res);
});
},
// testEaPost() {
// let postData = {
// appCode: '0608',
// content: 'text',
// phone: '18801342762',
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
buttonSingleMarketingClick() {
// this.$router.push("");
},
buttonMainMarketingClick() {
this.$router.push("MainSale");
}
}
};
</script>
<style scoped>
.main {
background-color: white;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: start;
}
.tops {
border: 2px solid lightblue;
width: 100%;
height: 100px;
}
.contents {
/* border: 2px solid lightpink; */
width: 100%;
height: 100%;
padding: 16px;
padding-bottom: 40px;
}
.content {
border: 0px solid orange;
height: 100px;
width: 100%;
padding: 4px 0px;
margin-bottom: 16px;
border-radius: 4px;
box-shadow: 0px 2px 4px 0px rgb(187, 187, 187);
display: flex;
flex-direction: row;
justify-content: start;
}
.content-imgs {
/* border: 1px solid pink; */
width: 20%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: start;
align-items: center;
}
.imgs-img {
width: 50px;
height: 50px;
margin-top: 10px;
border-radius: 50%;
object-fit: cover;
}
.content-infos {
/* border: 1px solid orange; */
width: 80%;
height: 100%;
}
.infos-mains {
height: 70%;
width: 100%;
/* border: 1px solid green; */
display: flex;
flex-direction: row;
justify-content: start;
}
.mains {
/* border: 1px solid red; */
width: 70%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.main-usedPercent {
font-size: 14px;
color: grey;
}
.main-money {
/* border: 1px solid lightgreen; */
/* font-size: 24px; */
font-size: 20px;
}
.buttons {
/* border: 1px solid darkorange; */
/* background-color: bisque; */
width: 30%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.button-send {
border: 0px solid blue;
height: 40px;
width: 60px;
border-radius: 4px;
background-color: rgba(68, 93, 251, 1);
color: white;
font-size: 16px;
}
.infos-tips {
height: 30%;
width: 100%;
/* border: 1px solid red; */
border-top: 1px dashed gray;
padding-top: 6px;
display: flex;
flex-direction: row;
justify-content: start;
align-items: center;
}
.tip-shareMan {
/* border: 1px solid orange; */
width: 70%;
height: 100%;
font-size: 14px;
line-height: 16px;
color: rgb(150, 150, 150);
}
.tip-commision {
/* border: 1px solid green; */
width: 30%;
height: 100%;
font-size: 14px;
line-height: 16px;
color: rgb(150, 150, 150);
}
.menus {
border-top: 1px solid rgb(194, 194, 194);
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
height: 50px;
background-color: white;
display: flex;
flex-direction: row;
justify-content: start;
align-items: center;
}
.menu {
/* border: 1px solid red; */
height: 50px;
/* width: 120px; */
width: 50%;
line-height: 50px;
text-align: center;
font-size: 14px;
color: black;
}
.activeMenu {
color: lightcoral;
}
.zListActive {
/*border: 1px solid limegreen;*/
width: 100%;
height: auto;
margin-bottom: 16px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.zListActive > .inputs {
/*border: 1px solid dodgerblue;*/
width: 100%;
height: auto;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.zListActive > .inputs > .input {
/*border-bottom: 2px solid red;*/
border-color: dodgerblue;
border-radius: 4px;
width: 70%;
height: 40px;
font-size: 16px;
}
.zListActive > .inputs > .button {
border: 1px solid dodgerblue;
border-radius: 4px;
width: 40%;
height: 40px;
font-size: 14px;
line-height: 36px;
text-align: center;
}
.zListActive > .lists {
/*border: 1px solid red;*/
width: 100%;
height: auto;
margin-top: 8px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.zListActive > .lists > .item {
border: 1px solid red;
width: 100%;
height: 100px;
margin-bottom: 16px;
padding: 4px 4px;
border-radius: 4px;
box-shadow: 0px 2px 4px 0px rgb(187, 187, 187);
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: flex-start;
font-size: 14px;
}
.zListActive > .lists > .voucherUrl {
border: 1px solid orange;
width: 100%;
height: 100px;
margin-bottom: 16px;
padding: 4px 4px;
border-radius: 4px;
box-shadow: 0px 2px 4px 0px rgb(187, 187, 187);
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
font-size: 14px;
/* text-wrap: none; */
}
</style>
<template>
<div class="main" style="display: flex;flex-direction: column;justify-content: flex-start;font-size: 14px;">
<div>建设中...</div>
</div>
</template>
<script>
import Vue from "vue";
const zlog = console.log.bind(console);
export default {
name: "goodPostIndex",
data() {
return {
};
},
created() {
},
mounted() {
},
methods: {
}
};
</script>
<style scoped>
.main {
background-color: white;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: start;
}
</style>
<template>
<div class="main" style="display: flex;flex-direction: column;justify-content: flex-start;font-size: 14px;">
<div>建设中...</div>
</div>
</template>
<script>
import Vue from "vue";
const zlog = console.log.bind(console);
export default {
name: "manInfoIndex",
data() {
return {
};
},
created() {
},
mounted() {
},
methods: {
}
};
</script>
<style scoped>
.main {
background-color: white;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: start;
}
</style>
<template>
<div class="register_container">
<div v-for="(item, index) of list" :key="index" >
<div class="list">
<div>
<img class="list-logo" :src="item.logoUrl" alt/>
</div>
<div class="list-infos">
<div class="list-info-title">{{item.name}}</div>
<div class="list-info-dsc">{{item.dsc}}</div>
</div>
<button class="button-send" @click="sendMessage">邀请</button>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'register',
data() {
return {
list:[
{
name: "会员拉新",
dsc: "推荐完成注册,完成会员拉新",
logoUrl: "/mainSale/4.png"
}
]
}
},
created() {
this.getAgentAuth();
},
mounted(){
},
methods:{
sendMessage(){
wx.invoke(
"sendChatMessage",
{
msgtype: "text", //消息类型,必填
news: {
link: `http://qywx2.100smartdata.com/register`, //H5消息页面url 必填
title: "会员拉新", //H5消息标题
desc: '注册成为欧亚会员', //H5消息摘要
imgUrl: "" //H5消息封面图片URL
}
},
function(res) {
if (res.err_msg == "sendChatMessage:ok") {
// alert("--->register.vue: zpick: h5 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") {
// alert(`--->register.vue: zpick: h5 分享失败.`);
}
}
);
}
}
}
</script>
<style lang="scss" scoped>
.register_container{
padding: 4px 12px 40px 12px;
.list {
height: 140px;
box-shadow: 0px 2px 4px 0px rgb(187, 187, 187);
margin: 6px 0px;
padding: 0px 12px;
border-radius: 6px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.list-logo {
width: 80px;
height: 80px;
border-radius: 6px;
}
.list-infos {
height: 80px;
padding-left: 12px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.list-info-title {
width: 100%;
height: 18px;
font-size: 16px;
font-weight: bold;
line-height: 18px;
}
.list-info-dsc {
margin-top: 6px;
width: 100%;
height: 16px;
font-size: 12px;
font-weight: normal;
line-height: 18px;
}
.button-send {
border: 0px solid blue;
margin-left: 5px;
height: 40px;
width: 84px;
border-radius: 4px;
background-color: rgba(68, 93, 251, 1);
color: white;
font-size: 16px;
}
}
}
</style>
......@@ -116,4 +116,19 @@ export function getHistoryList(data) {
method: 'delete',
params:data
})
}
export function getAllPeopleList(params) {
return request({
url: '/admin/auth/addressbook/orgnization/getClerkByWXDeptId',
method: 'get',
params
})
}
export function getWxAllDeptList(params) {
return request({
url: '/admin/auth/addressbook/orgnization/getAllInWX',
method: 'get',
params
})
}
\ No newline at end of file
......@@ -8,56 +8,53 @@
:close-on-click-modal="false"
>
<el-form :model="addForm" label-width="auto" ref="addStore" :rules="rules" >
<el-form-item label="部门名称:" prop="deptName">
<el-form-item label="部门名称:" prop="label">
<el-input
size="small"
v-model="addForm.deptName"
v-model="addForm.label"
placeholder="请输入部门名称"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="上级部门:" prop="dept">
<div class="block">
<el-form-item label="上级部门:" prop="parentId">
<!-- <div class="block">
<el-cascader
v-model="addForm.dept"
v-model="addForm.parentId"
placeholder="请选择上级部门"
:options="options"
:options="parentDeptList"
filterable
style="width: 50%;"
></el-cascader>
</div>
</div> -->
<el-cascader :props="props" :options="parentDeptList" filterable ></el-cascader>
</el-form-item>
<el-form-item label="门店名称:" prop="name">
<el-form-item label="门店名称:" prop="oyStallName">
<el-input
size="small"
v-model="addForm.name"
v-model="addForm.oyStallName"
placeholder="请输入门店名称"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="门店Id:" prop="storeId">
<el-form-item label="门店Id:" prop="oyStallCode">
<el-input
size="small"
v-model="addForm.storeId"
v-model="addForm.oyStallCode"
placeholder="请输入门店Id"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="门店会员id:" prop="memberId">
<el-form-item label="门店会员id:" prop="oyStallMemberId">
<el-input
size="small"
v-model="addForm.memberId"
v-model="addForm.oyStallMemberId"
placeholder="门店会员id:"
style="width: 50%;"
/>
</el-form-item>
<el-form-item label="设置主管:" prop="director">
<el-form-item label="设置主管:" prop="supervisor">
<el-cascader
v-model="director"
v-model="addForm.supervisor"
placeholder="请选择主管"
:options="options"
:props="{ multiple: true }"
......@@ -66,40 +63,6 @@
</el-cascader>
</el-form-item>
</el-form>
<!-- <div class="config_item">
<label class="config_name">部门名称</label>
<el-input class="config_value" v-model="params.d_name" placeholder="请输入部门名称" />
</div>
<div class="config_item">
<span class="config_name">上级部门</span>
<div>
<div @click="showTreeData" class="config_value father_group">
<span class="father_name_text">{{ paramsForShow.father_name }}</span>
<span :class="showTree ? 'arrow_up' : 'arrow_down'"></span>
</div>
</div>
</div>
<div class="tree_data" v-if="showTree">
<el-tree
ref="tree"
class="tree"
:check-strictly="true"
:data="treeData"
node-key="id"
@node-click="handleNodeClick"
@check-change="checkChange"
>
</el-tree>
</div>
<div class="config_item">
<label class="config_name">店铺编号</label>
<el-input class="config_value" v-model="params.code" placeholder="请输入店铺编号" />
</div>
<div class="tips" v-if="checked">请将表单填写完整</div>-->
<span slot="footer" class="dialog-footer">
<el-button @click="handleAddCancel" size="small">取 消</el-button>
<el-button type="primary" @click="handleAddFinish" size="small">确 定</el-button>
......@@ -110,7 +73,7 @@
</template>
<script>
import { addGroup, getOrgTree } from "@/api/in/mail";
import { addGroup, getWxAllDeptList, getAllMemberList,getGroupById,getAllPeopleList } from "@/api/in/mail";
import { log } from "util";
export default {
......@@ -135,11 +98,7 @@ export default {
group_name: "",
shop_code: "",
showTree: false,
paramsForShow: {
name: "",
father_name: "",
code: ""
},
params: {
d_name: "",
d_parentId: "",
......@@ -148,33 +107,55 @@ export default {
checked: false,
////
addForm: {
deptName: '',
dept: '',
name: '',
memberId: '',
storeId: '',
director: []
label: '',
parentId: '',
oyStallName: '',
oyStallMemberId: '',
oyStallCode: '',
supervisor: []
},
// 上级部门
parentDeptList: [],
peopleList: [],
rules: {
deptName: [
label: [
{ required: true, message: "请输入部门名称", trigger: "blur" },
{ validator: nameValidate, trigger: "blur" },
{ max: 50, message: "长度在50个字符以内", trigger: "blur" }
],
dept: [{ required: true, message: "请选择上级部门", trigger: "change" }]
parentId: [{ required: true, message: "请选择上级部门", trigger: "change" }]
},
};
props: {
lazy: true,
emitPath: false,
checkStrictly: true,
lazyLoad (node, resolve) {
const { level } = node;
setTimeout(() => {
const nodes = Array.from({ length: level + 1 })
.map(item => ({
value: level.id,
label: level.label,
leaf: level >= 2
}));
// 通过调用resolve将子节点数据返回,通知组件数据加载完成
resolve(nodes);
}, 1000);
}
}
}
},
created() {
this.getList();
this. getGroupMember()
},
methods: {
getList() {
getOrgTree()
getWxAllDeptList()
.then(res => {
console.log(res.data.organizations);
this.treeData = [res.data.organizations];
console.log(res,'全部部门')
this.parentDeptList = res.data
})
.catch(err => {
console.log(err);
......@@ -190,6 +171,14 @@ export default {
// console.log(addGroup)
this.$emit("handleAddFinish");
},
// 获取所有人员
getGroupMember() {
let id = ''
getAllPeopleList({ id }).then(res => {
console.log(res,'人员')
this.peopleList = res.data
});
},
/* handleNodeClick(item, node, self) {
// console.log(item,node,self)
this.params.d_parentId = item.id;
......
......@@ -7,52 +7,6 @@
:show-close="false"
:close-on-click-modal="false"
>
<!-- <div class="choose">
<div class="title">
<div class="cg">选择分组</div>
<div class="circle" @click="handleClose">
<d2-icon-svg name="close" class="icon" />
</div>
</div>
<tree-transfer
:title="title"
:button_text="['添加', '删除']"
:from_data="fromData"
:to_data="toData"
:defaultProps="{ label: 'label' }"
@addBtn="add"
@removeBtn="remove"
:mode="mode"
height="540px"
:filter="false"
openAll
>
</tree-transfer>
<div class="title">
<div class="cg">选择分组</div>
<div class="circle" @click="handleClose">
<d2-icon-svg name="close" class="icon" />
</div>
</div>
<div class="br">
<div style="text-align: center">
<el-transfer
style="text-align: left; display: inline-block"
v-model="value4"
:left-default-checked="[]"
:right-default-checked="[]"
:titles="['选择', '已选']"
:button-texts="['删除', '添加']"
@change="handleChange"
:data="data"
>
<span slot-scope="{ option }"
>{{ option.key }} - {{ option.label }}</span
>
</el-transfer>
</div>
</div>
</div> -->
<el-tree
ref="tree"
class="tree"
......@@ -97,7 +51,8 @@ export default {
};
},
created() {
this.getList();
console.log(this.idList,'idList')
this.getList()
},
methods: {
handleCancel() {
......@@ -108,38 +63,13 @@ export default {
let groupId = this.$refs.tree.getCheckedKeys()[0]
let data = {
departmentId: groupId,
ids: this.idList
ids: this.idList+""
}
moveMember(data).then(res=> {
this.$emit("handleFinish", false);
})
},
/* handleChange() {},
handleClose() {
this.$emit("handleCancel");
},
changeMode() {
if (this.mode == "transfer") {
this.mode = "addressList";
} else {
this.mode = "transfer";
}
},
add(fromData, toData, obj) {
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
console.log("fromData:", fromData);
console.log("toData:", toData);
console.log("obj:", obj);
},
remove(fromData, toData, obj) {
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
console.log("fromData:", fromData);
console.log("toData:", toData);
console.log("obj:", obj);
}, */
handleNodeClick(item, node, self) {
//自己定义的editCheckId,防止单选出现混乱
this.editCheckId = item.id;
......
......@@ -7,13 +7,13 @@
<div class="ty" @click="getMailList(1)">
<div>
<span>全部</span>
<span class="number">{{ allNumber }}</span>
<span class="number">{{ allNumber }}</span>
</div>
</div>
<div class="ty" style="margin:12px 0;" @click="getNoGroupMember(1,1)">
<div>
<span>未分组</span>
<span class="number">{{ wNumber }}</span>
<span class="number">{{ wNumber }}</span>
</div>
</div>
<div class="tree">
......@@ -32,18 +32,12 @@
</div>
<div class="right">
<div class="line">
<span class="number">店铺名{{groupName}}</span>
<span class="number">{{groupName}}</span>
</div>
<div class="line lines">
<div >
<el-button class="button button_group" size="small" @click="addChild">添加子部门</el-button
>
<el-button
class="button buttonlight"
size="small"
@click="synchronismMember"
>同步记录</el-button
>
<el-button class="button button_group" size="small" @click="addChild">添加子部门</el-button>
<el-button class="button button_group" size="small" @click="addChild">编辑部门</el-button>
<el-button class="button buttondark" :disabled="groupId ? false : true" size="small" @click="deleteChild">删除部门</el-button
>
</div>
......@@ -60,8 +54,8 @@
</el-form>
</div>
<div class="line">
<span class="number">全部{{totalNumber}}</span>
<el-button class="button buttondark" size="small" style="margin-left:20px;" @click="handleMove" :disabled="idList.length>0? false:true ">批量移动</el-button>
<span class="number">全部{{totalNumber}}</span>
<el-button class="button buttondark" size="small" style="margin-left:20px;" @click="handleMove" :disabled="idList.length>0? false:true">批量移动</el-button>
</div>
<el-table
stripe
......@@ -74,46 +68,22 @@
@selection-change="handleMemberChange"
>
<el-table-column type="selection" width="60"></el-table-column>
<el-table-column
prop="userName"
label="姓名"
align="center"
></el-table-column>
<el-table-column
prop="userId"
label="企业微信ID"
align="center"
></el-table-column>
<el-table-column
prop="stall"
label="部门"
align="center"
></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="userId" label="企业微信ID" align="center"></el-table-column>
<el-table-column prop="oyStallName" label="门店" align="center"></el-table-column>
<el-table-column prop="oyStallCode" label="门店ID" align="center"></el-table-column>
<el-table-column prop="oyStallMemberId" label="门店会员ID" align="center"></el-table-column>
<el-table-column prop="isManager" label="角色" align="center">
<template slot-scope="scope">
<span v-if="scope.row.isManager == 0">普通用户</span>
<span v-if="scope.row.isManager == 1">管理员</span>
<span v-if="scope.row.isSupervisor == false">普通用户</span>
<span v-if="scope.row.isSupervisor == true">主管</span>
</template>
</el-table-column>
<el-table-column
prop="mobile"
label="手机号"
align="center"
></el-table-column>
<el-table-column
label="同步时间"
width="180"
align="center"
prop="synchronization"
/>
<el-table-column
prop="isManager"
label="操作"
align="center"
>
<el-table-column prop="mobile" label="手机号" align="center"></el-table-column>
<el-table-column prop="synchronization" label="同步时间" align="center"></el-table-column>
<el-table-column prop="isManager" label="操作" align="center">
<template slot-scope="scope">
<span @click="setAdmin(scope.row)" class="setAdmin" v-if="scope.row.isManager == 0">设为管理员</span>
<span @click="cancelAdmin(scope.row)" class="cancelAdmin" v-if="scope.row.isManager == 1">取消管理员</span>
<el-button :disabled="scope.row.isSupervisor? true:false" @click="handleSingleMove(scope.row.id)">移动</el-button>
</template>
</el-table-column>
</el-table>
......@@ -224,7 +194,7 @@ export default {
this.data1 = [data.organizations];
});
},
handleTreeClick(data) {
handleTreeClick(data) {
this.nowNode = data
this.groupName = data.label
this.groupId = data.id
......@@ -265,6 +235,10 @@ export default {
handleMove() {
this.moveDialogShow = true;
},
handleSingleMove(val) {
this.moveDialogShow = true;
this.idList = [val]
},
removeFinish() {
this.handleTypeChange(1,1)
this.moveDialogShow = false;
......@@ -305,14 +279,12 @@ export default {
this.page.total = this.totalNumber = this.wNumber = Number(res.data.pageInfo.total);
});
},
handleMemberChange(val) {
handleMemberChange(val) {
let ids = []
val.map(function(item) {
ids.push(item.id)
});
this.idList = ids
console.log(this.idList,",");
},
handleTypeChange(val,ctPage) {
if(this.type == 1) {
......
......@@ -234,7 +234,7 @@
// alert(`--->qrCode: ajax: res: res =${JSON.stringify(res)}`)
console.log(res)
$('#image').attr('src', res.data)
// $('#image').attr('src', 'http://qywx2.100smartdata.com/qrCode/1584512690487.jpeg')
// $('#image').attr('src', 'http://oysales.oywanhao.com/qrCode/1584512690487.jpeg')
},
error: function (data) {
alert(`--->qrCode: ajax: err.`)
......
......@@ -53,8 +53,6 @@ function isIosOrAndroid() {
}
Vue.prototype.getAgentAuth = function () {
zlog('%c--->IN: getAgentAuth: location.href =', 'color: orange;', location.href)
// alert(`--->zCommon.js: IN.`)
let postData = {
// businessId: sessionStorage.getItem('businessId'),
// pageUrl: encodeURIComponent(this.isIosOrAndroid() === 'android' ? location.href.split('#')[0] : window.initUrl)
......@@ -111,7 +109,7 @@ Vue.prototype.getAgentAuth = function () {
jsApiList: ['config', 'agentConfig', 'sendChatMessage'],
success: function (res) {
if (res.errMsg != "checkJsApi:ok") {
alert("JS-SDK接口检测失败:" + JSON.stringify(res));
// alert("JS-SDK接口检测失败:" + JSON.stringify(res));
return false;
} else {
wxRequest('/workWx/auth/base/getAgentJsSdkSignature', qs.stringify(postData), header)
......@@ -130,7 +128,7 @@ Vue.prototype.getAgentAuth = function () {
signature: agentConfig.agentJsApiSignature.signature,// 必填,签名,agentConfig所以为应用签名
jsApiList: ['sendChatMessage'], //必填
success: function (res) {
alert('agentConfigSuccess')
// alert('agentConfigSuccess')
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res.`)
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res =${JSON.stringify(res)}`)
// alert('agentConfig:ok')
......@@ -141,7 +139,7 @@ Vue.prototype.getAgentAuth = function () {
// alert('wx.agentConfig 回调'+res.errMsg);
},
fail: function (res) {
alert('agentConfigFailed')
// alert('agentConfigFailed')
// alert('回调失败:'+res.errMsg)
if (res.errMsg.indexOf('is not a function') > -1) {
alert('<i class="weui-icon-warn">版本过低请升级</i>')
......@@ -201,7 +199,6 @@ function configWx(to) {
wx.ready(function () {
// JS-SDK配置信息验证失败时会进入此方法
wx.error(function (res) {
alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res));
})
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
wx.checkJsApi({
......@@ -250,9 +247,6 @@ function configWx(to) {
// alert('wx.agentConfig 回调'+res.errMsg);
},
fail: function (res) {
// alert(`--->A: err =${res}`)
// alert(`--->A: err =${JSON.stringify(res)}`)
if (res.errMsg.indexOf('is not a function') > -1) {
alert('<i class="weui-icon-warn">版本过低请升级</i>')
}
......
......@@ -100,7 +100,7 @@
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
redirectUrI: encodeURIComponent("oysales.oywanhao.com"),
responseType: "code",
scope: "snsapi_base",
state: "ztest",
......
......@@ -102,7 +102,7 @@ export default {
head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
// appId: "wwd1cdbca7b8b2b6c4",
appId: "ww4df265003b43fa0d",
redirectUrI: encodeURIComponent("qywx2.100smartdata.com"),
redirectUrI: encodeURIComponent("oysales.oywanhao.com"),
responseType: "code",
scope: "snsapi_base",
state: "ztest",
......@@ -143,16 +143,15 @@ export default {
},
// 获取优惠券列表
zReadySetVoucherList() {
alert('获取优惠券')
// alert('获取优惠券')
this.zReadyDelVoucherList();
const postData = {
appCode: "0696", // j接口编码
// mdid: this.zcache.storeId
mdid: 1
}
alert('准备进入请求优惠券列表')
getVoucherList(postData).then(res => {
alert('getVoucherList')
// alert('getVoucherList')
zlog("%c--->VoucherList: RD =", "background: limegreen;", res);
this.zVoucherSet(res.result.coupons);
})
......@@ -165,7 +164,6 @@ export default {
},
zVoucherPick(inActiveId, inVoucherId) {
alert('推送')
this.zcache.now.activeId = String(inActiveId)
this.zcache.now.voucherId = String(inVoucherId)
......@@ -181,7 +179,7 @@ export default {
getVoucherWxUrl(postData).then(res => {
this.zVoucherUrlSet(res.result.link)
alert('获取列表成功')
// alert('获取列表成功')
});
},
......@@ -199,33 +197,33 @@ export default {
},
function(res) {
if (res.err_msg == "sendChatMessage:ok") {
alert("--->discount.vue: zpick: text 分享成功!")
// alert("--->discount.vue: zpick: text 分享成功!")
} else if (res.err_msg != "sendChatMessage:ok") {
alert('分享失败')
// alert('分享失败')
}
}
);
break;
case "h5":
// alert(`--->discount.vue: zpick: H5: IN.`);
alert('zpick')
// alert('zpick')
wx.invoke(
"sendChatMessage",
{
msgtype: "news", //消息类型,必填
news: {
link: `http://qywx2.100smartdata.com/qrCode?Url=${inUrl}&activeId=${this.zcache.now.activeId}&voucherId=${this.zcache.now.voucherId}&unionId=1234`, //H5消息页面url 必填
link: `http://oysales.oywanhao.com/qrCode?Url=${inUrl}&activeId=${this.zcache.now.activeId}&voucherId=${this.zcache.now.voucherId}&unionId=1234`, //H5消息页面url 必填
title: "领取优惠券", //H5消息标题
desc: inUrl, //H5消息摘要
imgUrl: inUrl //H5消息封面图片URL
}
},
function(res) {
alert('sendChatMessage')
// alert('sendChatMessage')
if (res.err_msg == "sendChatMessage:ok") {
alert("--->discount.vue: zpick: h5 分享成功!")
// alert("--->discount.vue: zpick: h5 分享成功!")
} else if (res.err_msg != "sendChatMessage:ok") {
alert(`--->discount.vue: zpick: h5 分享失败.`)
// alert(`--->discount.vue: zpick: h5 分享失败.`)
// alert(
// `--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}`
// );
......@@ -238,7 +236,7 @@ export default {
}
},
zVoucherSet(inArray) {
alert('zVoucherSet')
// alert('zVoucherSet')
this.zlist.voucher = inArray;
},
......
......@@ -42,8 +42,8 @@
{
msgtype: "news", //消息类型,必填
news: {
link: "http://qywx2.100smartdata.com/register", //H5消息页面url 必填
title: "会员拉新", //H5消息标题
link: "http://oysales.oywanhao.com/register", //H5消息页面url 必填
title: "注册邀请", //H5消息标题
desc: "注册成为欧亚会员", //H5消息摘要
imgUrl: "" //H5消息封面图片URL
}
......@@ -56,11 +56,9 @@
} */
},
function(res) {
alert('sendChatMessage')
// alert('sendChatMessage')
if (res.err_msg == "sendChatMessage:ok") {
// alert("--->register.vue: zpick: h5 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") {
// alert(`--->register.vue: zpick: h5 分享失败.`);
}
}
);
......
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