Commit df5eb2ba by 王玉曼

20210316

1 parent 96cb3b2c
.content .van-image[data-v-d41f2d8a]{float:left;margin:0 10px 5px 0;border:1px solid #eee}.content .title[data-v-d41f2d8a]{word-break:break-all}.time[data-v-d41f2d8a]{margin-left:5px}.page[data-v-2e170bdc]{height:100vh;background:#f6f6f6}[data-v-2e170bdc] .list{padding:10px;background:#fff;border-top:1px solid #eee}[data-v-2e170bdc] .list .info{padding-top:10px}[data-v-2e170bdc] .list .action{padding-left:5px}.header[data-v-21051878]{margin:20px 10px 10px;vertical-align:center;text-align:center}.van-icon-cross[data-v-21051878]{position:absolute;left:10px}.title[data-v-21051878]{text-align:center}.addwaiting[data-v-21051878],.details[data-v-21051878],.realationship[data-v-21051878],.userlabel[data-v-21051878]{margin:10px}.detail[data-v-21051878]{display:flex;justify-content:space-between}.detail .c9[data-v-21051878]{color:#9c9c9c}.left[data-v-21051878]{display:flex;margin-bottom:20px}.left .img[data-v-21051878]{width:40px;height:40px;background-color:#f2f2f2;margin-right:10px}.left .right[data-v-21051878]{display:flex;flex-direction:column;justify-content:space-between}.data[data-v-21051878]{font-size:12px;color:#2c8cf0}.divider[data-v-21051878]{width:100%;height:10px;background-color:#f2f2f2}.content[data-v-21051878]{padding:16px 16px 160px}.van-action-sheet__header .van-icon-cross[data-v-21051878]{left:85%;font-size:16px}.labels[data-v-21051878]{display:flex;flex-wrap:wrap;padding-top:10px}.labels .label1[data-v-21051878],.labels .label[data-v-21051878]{width:60px;height:18px;font-size:12px;background-color:#f2f2f2;text-align:center;margin:10px 0;line-height:18px;border-radius:6px}.branch[data-v-21051878]{position:relative}.branch .saveinfo[data-v-21051878]{position:absolute;width:90%;height:30px;left:50%;top:240%;transform:translate(-50%,-50%)}.boxnumber[data-v-21051878]{height:60px;width:100%;margin:20px}.boxnumber .number[data-v-21051878]{text-align:center;margin-top:20px;font-size:24px;font-weight:700}.boxnumber[data-v-21051878]:first-child{border-right:1px solid #f2f2f2;padding-right:16px}.addwaiting .labels .label1[data-v-21051878]{width:80px;margin-bottom:20px;border-radius:40px}.f12[data-v-21051878]{color:#9c9c9c;font-size:12px;font-weight:600}.po[data-v-21051878]{position:relative}.fs14[data-v-21051878]{color:#333;font-size:14px;position:relative;left:20px}.con[data-v-21051878]{left:51px;margin-top:20px}[data-v-21051878] .van-step__circle{width:8px;height:8px;margin-left:110px}[data-v-21051878] .van-step__line{left:39px}.finish[data-v-21051878]{position:relative;color:#2c8cf0;font-size:12px;font-weight:600;right:-165px}.deldynamic[data-v-21051878]{float:right;color:#9c9c9c;font-size:12px;font-weight:600}.van-step--vertical[data-v-21051878]:not(:last-child):after{border-width:1px}[data-v-21051878] .conagency{line-height:40px;flex-direction:column}[data-v-21051878] .conagency .van-field__control{background-color:#f2f2f2;padding:0 10px}[data-v-21051878] .msg:after{border:none}.header[data-v-3ae3bf3b]{margin:20px 10px 10px;vertical-align:center;text-align:center}.van-icon-cross[data-v-3ae3bf3b]{position:absolute;left:10px}.title[data-v-3ae3bf3b]{text-align:center}.details[data-v-3ae3bf3b]{margin:10px 16px}.detail[data-v-3ae3bf3b]{display:flex;justify-content:space-between}.detail .c9[data-v-3ae3bf3b]{color:#c8c9cc}.left[data-v-3ae3bf3b]{display:flex;margin-bottom:20px}.left .img[data-v-3ae3bf3b]{width:40px;height:40px;background-color:#f2f2f2;margin-right:10px}.left .right[data-v-3ae3bf3b]{display:flex;flex-direction:column;justify-content:space-between}.data[data-v-3ae3bf3b]{font-size:12px;color:#5fa7f3;float:right}.divider[data-v-3ae3bf3b]{width:100%;height:10px;background-color:#f2f2f2}[data-v-3ae3bf3b] .others{line-height:40px;flex-direction:column}[data-v-3ae3bf3b] .others .van-field__control--left{float:left;line-height:20px}[data-v-3ae3bf3b] .others .van-field__control--left .textarea{margin-top:20px}[data-v-07a0e618] body{width:100%;height:600px}.labelPge[data-v-07a0e618]{width:100%;height:100%;background-color:#f2f2f2}.header[data-v-07a0e618]{margin:20px 10px 10px;vertical-align:center;text-align:center}.van-icon-cross[data-v-07a0e618]{position:absolute;left:10px}.title[data-v-07a0e618]{text-align:center}.details[data-v-07a0e618]{margin:10px}.detail[data-v-07a0e618]{display:flex;justify-content:space-between}.detail .c9[data-v-07a0e618]{color:#9c9c9c;font-size:12px}.left[data-v-07a0e618]{display:flex;margin-bottom:20px}.left .img[data-v-07a0e618]{width:50px;height:50px;background-color:#f2f2f2;margin-right:10px;border-radius:25px;vertical-align:bottom}.left .right[data-v-07a0e618]{display:flex;flex-direction:column;justify-content:space-between}.groupchat1[data-v-07a0e618]{width:120px;border-radius:20px;margin:10px 20px}.groupchat1[data-v-07a0e618],.groupchat2[data-v-07a0e618]{height:20px;font-size:12px;background-color:#fff;text-align:center;line-height:20px}.groupchat2[data-v-07a0e618]{width:60px;border-radius:5px;margin:10px 0;color:#2c8cf0;border:1px solid #2c8cf0}
\ No newline at end of file \ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["app"],{0:function(t,e,n){t.exports=n("56d7")},"56d7":function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("2b0e"),r={cookieExpires:1,homeName:"home",services:{wecom:"/wecom"}},o=r,s=(n("f5df1"),n("b970")),i=(n("157a"),n("a4b1"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view",{staticClass:"page"})],1)}),c=[],u=(n("c975"),n("ac1f"),n("841c"),n("1276"),n("96cf"),n("1da1")),d=n("b775"),p=o.services.wecom;function l(t,e){return Object(d["a"])({url:p+"/ticket/getAgentTicket",params:{url:t,agentId:e}})}function f(t,e){return Object(d["a"])({url:p+"/user/getUserInfo",params:{code:t,agentId:e}})}n("5319");function m(t){var e=decodeURIComponent(t).split("?")[1].split("#")[0];return e?JSON.parse('{"'+e.replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}'):{}}var b={name:"App",data:function(){return{corpId:"",agentId:""}},created:function(){var t=this;return Object(u["a"])(regeneratorRuntime.mark((function e(){var n,a,r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=m(window.location.search),a=n.code,t.corpId=n.corpId,t.agentId=n.agentId,a){e.next=7;break}return t.$toast("未获得授权"),e.abrupt("return");case 7:return e.next=9,f(a,n.agentId);case 9:r=e.sent,o=r.data,t.$store.state.userId=o.userId;case 12:case"end":return e.stop()}}),e)})))()},watch:{$route:function(){this.wxConfig()}},methods:{wxConfig:function(){var t=this;l(window.location.href.split("#")[0],this.agentId).then((function(e){var n=e.data,a=n.timestamp,r=n.nonceStr,o=n.signature;wx.agentConfig({debug:!0,corpid:t.corpId,agentid:t.agentId,timestamp:a,nonceStr:r,signature:o,jsApiList:["sendChatMessage","getContext","getCurExternalContact"],success:function(t){},fail:function(e){t.$toast("agentId失败:"+JSON.stringify(e)),e.errMsg.indexOf("function not exist")>-1&&alert("版本过低请升级")}})}))}}},h=b,g=(n("7c55"),n("2877")),v=Object(g["a"])(h,i,c,!1,null,null,null),w=v.exports,I=(n("d3b7"),n("8c4f")),x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"home"},[n("div",{staticClass:"logo ac"},[t._v("linkWeChat")]),t._l(t.$router.options.routes,(function(e,a){return n("router-link",{key:a,staticClass:"router-link",attrs:{to:e.path}},[t._v(t._s(e.meta.title))])}))],2)},k=[],C={name:"Home",components:{}},O=C,j=(n("7aba"),Object(g["a"])(O,x,k,!1,null,"4afe9e89",null)),_=j.exports;a["a"].use(I["a"]);var $=[{path:"/",name:"Home",component:_,meta:{title:"首页"}},{path:"/chat",name:"chat",component:function(){return Promise.all([n.e("vendors~about"),n.e("about")]).then(n.bind(null,"6f29"))},meta:{title:"chat"}},{path:"/portrait",name:"portrait",component:function(){return Promise.all([n.e("vendors~about"),n.e("about")]).then(n.bind(null,"a89b"))},meta:{title:"portrait"}},{path:"/detail",name:"detail",component:function(){return Promise.all([n.e("vendors~about"),n.e("about")]).then(n.bind(null,"dc79"))},hidden:!0,meta:{title:""}},{path:"/community",name:"community",component:function(){return Promise.all([n.e("vendors~about"),n.e("about")]).then(n.bind(null,"7f4b"))},hidden:!0,meta:{title:""}}],P=new I["a"]({routes:$}),R=P,S=n("2f62");a["a"].use(S["a"]);var y=new S["a"].Store({state:{userId:""},mutations:{},actions:{},modules:{}}),A=n("3a34"),E=n.n(A);window.CONFIG=o,a["a"].use(s["a"]),new E.a,a["a"].config.productionTip=!1,new a["a"]({router:R,store:y,render:function(t){return t(w)}}).$mount("#app")},"5ba8":function(t,e,n){},"7aba":function(t,e,n){"use strict";n("a268")},"7c55":function(t,e,n){"use strict";n("5ba8")},a268:function(t,e,n){},a4b1:function(t,e,n){},b775:function(t,e,n){"use strict";n("99af"),n("d3b7");var a=n("bc3a"),r=n.n(a),o=n("2241");function s(t){var e=r.a.create({baseURL:t,headers:{Auth_token:""},timeout:1e4});e.interceptors.request.use((function(t){return t}),(function(t){return Promise.reject(t)})),e.interceptors.response.use((function(t){var e=t.data,a=t.status;return 200===a&&200===e.code?e:(201===e.code||n(t),new Promise((function(){})))}),(function(t){return t.response?n(t.response):Object(o["a"])({message:"服务器未启动或连接超时"}),Promise.reject(t)}));var n=function(t){t.data,t.statusText,t.status;var e=t.request,n=e.responseText;e.responseURL;Object(o["a"])({message:n})};return e}e["a"]=s("http://146.56.222.200/api")}},[[0,"runtime","chunk-vant","chunk-libs"]]]);
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,6 @@ export function getCustomerInfo(params) { ...@@ -11,7 +11,6 @@ export function getCustomerInfo(params) {
} }
// 客户画像资料更新 // 客户画像资料更新
export function getWeCustomerInfo(data) { export function getWeCustomerInfo(data) {
debugger
return request({ return request({
url: service + "/updateWeCustomerInfo", url: service + "/updateWeCustomerInfo",
method: 'post', method: 'post',
......
...@@ -39,18 +39,19 @@ ...@@ -39,18 +39,19 @@
input-align="right" input-align="right"
/> />
<van-field <van-field
v-model="getage" v-model="form.age"
name="年龄" name="年龄"
label="年龄" label="年龄"
placeholder="年龄" placeholder="年龄"
input-align="right" input-align="right"
/> />
<div class="details"> <van-field
<div class="detail"> v-model="form.birthday"
<div class="c9">生日</div> name="生日"
<div class="c9">{{ form.birthday }}</div> label="生日"
</div> placeholder="生日"
</div> input-align="right"
/>
<!-- -------------------------- --> <!-- -------------------------- -->
<van-field <van-field
v-model="form.email" v-model="form.email"
...@@ -114,6 +115,7 @@ export default { ...@@ -114,6 +115,7 @@ export default {
name: "", // 昵称 name: "", // 昵称
remarkMobiles: "", // 手机号 remarkMobiles: "", // 手机号
birthday: "", // 客户生日 birthday: "", // 客户生日
age:'',// 年龄
email: "", // 邮箱 email: "", // 邮箱
address: "", // 地址 address: "", // 地址
qq: "", // qq qq: "", // qq
...@@ -125,69 +127,8 @@ export default { ...@@ -125,69 +127,8 @@ export default {
}, },
computed: { computed: {
// 获取客户年龄 // 获取客户年龄
getage: function() {
// `this` 指向 vm 实例
let nowdata = new Date();
let yearnow = nowdata.getFullYear();
let mouthnow = nowdata.getMonth() + 1;
let daynow = nowdata.getDate();
// console.log(yearnow,mouthnow,daynow);
// this.form.birthday = "1995-03-11";
if (this.form.birthday) {
const year = this.form.birthday.substring(0, 4);
const mouth =
this.form.birthday.substring(5, 6) == 0
? this.form.birthday.substring(6, 7)
: this.form.birthday.substring(5, 7);
const day =
this.form.birthday.substring(7, 8) == 0
? this.form.birthday.substring(8, 9)
: this.form.birthday.substring(8, 10);
// console.log(day);
// console.log(mouth);
// console.log(typeof(birthday));
// console.log(birthday);
console.log(parseInt(mouthnow), parseInt(mouth));
if (parseInt(mouthnow) > parseInt(mouth)) {
let age = parseInt(yearnow) - parseInt(year);
return age;
} else if (
parseInt(mouthnow) == parseInt(mouth) &&
parseInt(daynow) >= parseInt(day)
) {
let age = parseInt(yearnow) - parseInt(year);
return age;
} else {
let age = parseInt(yearnow) - parseInt(year) - 1;
return age;
}
} else {
return "";
}
},
}, },
created() { created() {
// 获取用户Id
// let auth_code = location.search
// .slice(1)
// .split('&')[0]
// .split('=')[1]
// if (!auth_code) {
// this.$toast('未获得授权')
// return
// }
// getUserInfo(auth_code)
// .then(({ data }) => {
// this.form.userId = data.userId
// // this.$toast('userId:' + this.userId)
// console.log(this.userId);
// })
// .catch((err) => {
// Dialog.confirm({
// title: '标题',
// message: err,
// })
// })
// 获取客户详细信息 // 获取客户详细信息
getCustomerInfo({ getCustomerInfo({
externalUserid: this.form.externalUserid, externalUserid: this.form.externalUserid,
...@@ -209,6 +150,7 @@ export default { ...@@ -209,6 +150,7 @@ export default {
// 点击保存按钮提交表单 // 点击保存按钮提交表单
saveUserInformation() { saveUserInformation() {
this.flage = !this.flage; this.flage = !this.flage;
getWeCustomerInfo(this.form) getWeCustomerInfo(this.form)
.then((data)=> { .then((data)=> {
console.log(data); console.log(data);
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<van-divider /> <van-divider />
<div class="detail"> <div class="detail">
<div class="c9">年龄</div> <div class="c9">年龄</div>
<div>{{ getage }}</div> <div>{{ form.age }}</div>
</div> </div>
<van-divider /> <van-divider />
<div class="detail"> <div class="detail">
...@@ -372,6 +372,7 @@ export default { ...@@ -372,6 +372,7 @@ export default {
form: { form: {
name: "", // 昵称 name: "", // 昵称
remarkMobiles: "", // 手机号 remarkMobiles: "", // 手机号
age:"", // 年龄
birthday: "", // 客户生日 birthday: "", // 客户生日
email: "", // 邮箱 email: "", // 邮箱
address: "", // 地址 address: "", // 地址
...@@ -383,46 +384,7 @@ export default { ...@@ -383,46 +384,7 @@ export default {
}; };
}, },
computed: { computed: {
// 获取客户年龄
getage: function() {
// `this` 指向 vm 实例
let nowdata = new Date();
let yearnow = nowdata.getFullYear();
let mouthnow = nowdata.getMonth() + 1;
let daynow = nowdata.getDate();
// console.log(yearnow,mouthnow,daynow);
// this.form.birthday = "1995-03-11";
if (this.form.birthday) {
const year = this.form.birthday.substring(0, 4);
const mouth =
this.form.birthday.substring(5, 6) == 0
? this.form.birthday.substring(6, 7)
: this.form.birthday.substring(5, 7);
const day =
this.form.birthday.substring(7, 8) == 0
? this.form.birthday.substring(8, 9)
: this.form.birthday.substring(8, 10);
// console.log(day);
// console.log(mouth);
// console.log(typeof(birthday));
// console.log(birthday);
console.log(parseInt(mouthnow),parseInt(mouth));
if (parseInt(mouthnow) > parseInt(mouth)) {
let age = parseInt(yearnow) - parseInt(year);
return age;
} else if (
(parseInt(mouthnow) == parseInt(mouth) && parseInt(daynow) >= parseInt(day))
) {
let age = parseInt(yearnow) - parseInt(year) ;
return age;
} else {
let age = parseInt(yearnow) - parseInt(year)-1;
return age;
}
} else {
return "";
}
},
}, },
methods: { methods: {
// 添加代办 // 添加代办
...@@ -493,28 +455,6 @@ export default { ...@@ -493,28 +455,6 @@ export default {
saveInfo() {}, saveInfo() {},
}, },
created() { created() {
// 获取用户Id
// let auth_code = location.search
// .slice(1)
// .split('&')[0]
// .split('=')[1]
// if (!auth_code) {
// this.$toast('未获得授权')
// return
// }
// getUserInfo(auth_code)
// .then(({ data }) => {
// this.userId = data.userId
// // this.$toast('userId:' + this.userId)
// console.log(this.userId);
// })
// .catch((err) => {
// Dialog.confirm({
// title: '标题',
// message: err,
// })
// })
// 获取客户详细信息
getCustomerInfo({ getCustomerInfo({
externalUserid: this.externalUserid, externalUserid: this.externalUserid,
userid: this.userid, userid: this.userid,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!