123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931 |
- const app = getApp();
- var utils = require("../../../utils/http")
- const util = require("../../../utils/util");
- let page = 1, sharepage = 1;
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- imgUrl: app.globalData.imgUrl,
- clientype: app.globalData.clientype,
- aid: '',
- activityobj: {},
- itemDataMsg: {},
- wshareshow: false,
- showAction: false,
- titype: 1,
- trackflag: false,
- tracktype: '1',
- customerlist: [],
- trackimgarr: [],
- nowimagearr: [],
- actions: [],
- nowcid: '',
- recordtext: '',
- visitobj: {},
- housestate: '预约回访',
- seletime: '',
- visitcount: 0,
- visitlogarr: [],
- statype: '1',
- activitylist: [],
- wactivitylist: [],
- wcolumns: [],
- activityname: '',
- invitecrm: [],
- showUpcrm: [],
- datashow: true,
- start: "",
- end: '',
- columns: [],
- showPicker: false,
- nowaid: '',
- personobj: app.globalData.personMsg,
- typeflag: false,
- ranktype: '预约',
- orgtype: '公司排行',
- shareranklist: [],
- gotranklist: [],
- sharemyrankobj: {},
- gotmyrankobj: {},
- topdataobj: {},
- type: 1,
- tacktype: 1,
- tackarr: [
- { id: 1, text: '自定义' },
- { id: 3, text: '已装修' },
- { id: 4, text: '无需求' },
- { id: 5, text: '有需求' },
- { id: 6, text: '超地域' },
- { id: 7, text: '未交房' },
- { id: 8, text: '在外地' },
- { id: 9, text: '无购买力' },
- { id: 10, text: '未接通电话' },
- ],
- nowtext1: '自定义',
- tacktext: '',
- amountdate: '',
- nowtext: false,
- timeshow: false,
- amountime: 1,
- amountime1: 1,
- visitdate: '',
- apointobj: {},
- customerobj: {},
- nowidx: 0,
- scoleval: 0,
- nowdate: '',
- cluestate: 1,
- activityType: '',
- addwxarr: [],
- addwxtypeflag: false,
- nextvisitflag: false,//true是必填,false不必传 下次回访时间
- measurenum: '',
- measuretime: '',
- amountarr: [],
- signOrderTagText: "转单",
- deliveryTagText: "签单",
- signTag: "转",
- deliveryTag: "签"
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- if (this.data.clientype == 'vL0CQQ') {
- this.setData({
- signOrderTagText: "签单",
- deliveryTagText: "交定",
- signTag: "签",
- deliveryTag: "定"
- })
- }
- let date = new Date();
- let m = date.getMonth() * 1 + 1;
- let d = date.getDate();
- let str = date.getFullYear() + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? ('0' + d) : d);
- this.setData({
- aid: options.aid,
- amountdate: str,
- start: str,
- nowdate: str,
- personobj: app.globalData.personMsg,
- imgUrl: app.globalData.imgUrl,
- })
- if (!!options.type) {
- this.setData({
- activityType: options.type
- })
- }
- if (!!options.type && options.type == 'broker') {
- this.activityfun();
- } else {
- this.crmtopdatafun();
- this.activityfun();
- this.crmlistfun();
- this.ranklistfun();
- this.activitylistfun('0');
- this.activitylistfun('1');
- }
- if(options.ltype){
- this.setData({
- type:options.ltype
- })
- }
- },
- crmtopdatafun() {
- const that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/statistics',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- aid: that.data.aid,
- },
- success: function (res) {
- if (res.data.code == '0') {
- that.setData({
- topdataobj: res.data.data
- })
- }
- }
- })
- },
- setranktypetap(e) {
- this.setData({
- ranktype: e.currentTarget.dataset.text
- })
- this.ranklistfun();
- },
- typeinitfun() {
- const that = this;
- let day = new Date();
- let month = day.getMonth() * 1 + 1;
- let date = day.getDate();
- let year = day.getFullYear();
- let str = year + '-' + month + '-' + date;
- this.setData({
- visitdate: str,
- amountdate: str,
- nowtext1: '自定义',
- tacktext: ''
- })
- },
- openorgtypetap(e) {
- this.setData({
- typeflag: true,
- })
- },
- closeorgtypetap(e) {
- this.setData({
- typeflag: false
- })
- },
- setorgtypetap(e) {
- this.setData({
- orgtype: e.currentTarget.dataset.type,
- typeflag: false
- })
- this.ranklistfun();
- },
- ranklistfun() {
- const that = this;
- sharepage = 1;
- var str = "api/activity/ranking_list";
- let data = {
- id: that.data.aid,
- type: that.data.ranktype,
- is_org: this.data.orgtype == '公司排行' ? 0 : '1',//0公司排行,1团队排行,
- page: sharepage,
- limit: 15,
- };
- if (this.data.orgtype == '部门排行') {
- str = "api/activity/org_ranking_list";
- data = {
- id: that.data.aid,
- type: that.data.ranktype,
- page: sharepage,
- limit: 15,
- };
- }
- utils.$post({
- url: app.globalData.webUrl + str,
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: data,
- success: function (res) {
- setTimeout(() => {
- wx.hideLoading()
- }, 1000)
- if (res.data.code == "0") {
- if (that.data.orgtype == '公司排行' || that.data.orgtype == '团队排行') {
- that.setData({
- shareranklist: res.data.data.data,
- sharemyrankobj: res.data.data.my,
- })
- } else {
- that.setData({
- gotranklist: res.data.data.data,
- gotmyrankobj: res.data.data.my,
- })
- }
- }
- }
- })
- },
- setoptap(obj) {
- const that = this;
- let customerobj = obj.detail;
- // 详情的状态已经修改过了
- if (!customerobj.addtoptime) {
- this.crmlistfun();
- } else {
- if (that.data.statype == 1) {
- let invitecrm = [];
- invitecrm = invitecrm.concat(that.data.invitecrm);
- invitecrm[that.data.nowidx].addtoptime = '2022';
- var obj = invitecrm.splice(that.data.nowidx, 1);
- invitecrm.unshift(obj[0]);
- that.setData({
- invitecrm: invitecrm
- })
- } else {
- let showUpcrm = [];
- showUpcrm = showUpcrm.concat(that.data.showUpcrm);
- showUpcrm[that.data.nowidx].addtoptime = '2022';
- var obj = showUpcrm.splice(that.data.nowidx, 1);
- showUpcrm.unshift(obj[0]);
- that.setData({
- showUpcrm: showUpcrm
- })
- }
- }
- },
- setypetap(e) {
- this.setData({
- type: e.currentTarget.dataset.type
- })
- if (this.data.type == 1) {
- this.setData({
- tacktype: 1,
- cluestate: this.data.customerobj.state == "待确认" ? 1 : 2
- })
- } else if (this.data.type == 2) {
- this.setData({
- tacktype: 3
- })
- }
- },
- bindsignChange: function (e) {
- this.setData({
- amountdate: e.detail.value
- })
- },
- bindsigndate1: function (e) {
- this.setData({
- addtime: e.detail.value
- })
- },
- dothis() { },
- trackfuntap: function (e) {
- this.setData({
- tracktype: e.currentTarget.dataset.type
- })
- },
- textareatap: function (e) {
- const that = this;
- if (this.data.nowtext1 != '自定义') {
- if (this.data.tacktext.indexOf(this.data.nowtext1) != 0) {
- that.setData({
- tacktext: this.data.nowtext1
- })
- } else {
- that.setData({
- tacktext: e.detail.value
- })
- }
- } else {
- that.setData({
- tacktext: e.detail.value
- })
- }
- },
- addtracktap: function (e) {
- this.getsetfun();
- this.setData({
- trackflag: true,
- nowcid: e.currentTarget.dataset.aid,
- nowidx: e.currentTarget.dataset.idx,
- })
- this.selectComponent('#addtrack').setcrmfun();
- this.activitylistfun('0');
- this.activitylistfun('1');
- this.typeinitfun();
- },
- // 加微类型等
- getsetfun() {
- const that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/crm_customer/get_setting',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {},
- success: function (res) {
- if (res.data.code == 0) {
- var arr = res.data.data.img_type, amountarr = [];
- for (let i in arr) {
- let obj = {
- id: i,
- name: "上传" + arr[i],
- color: "#384855",
- };
- amountarr.push(obj);
- }
- that.setData({
- addwxarr: res.data.data.wechat_type,
- nextvisitflag: res.data.data.next_visit_time_is_ok == 1 ? true : false,
- amountarr: amountarr
- })
- }
- that.loginbox = that.selectComponent("#addtrack");
- that.loginbox.crmsgfun();
- }
- })
- },
- activitylistfun(cate) {
- const that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/activity_list',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- cate: cate
- },
- success: function (res) {
- setTimeout(() => {
- wx.hideLoading()
- }, 1000)
- if (res.data.code == "0") {
- if (cate == '0') {
- let columns = [];
- for (let i in res.data.data) {
- columns.push(res.data.data[i].title)
- }
- that.setData({
- activitylist: res.data.data,
- columns: columns
- })
- } else {
- let columns1 = [];
- for (let i in res.data.data) {
- columns1.push(res.data.data[i].title)
- }
- that.setData({
- wactivitylist: res.data.data,
- wcolumns: columns1
- })
- }
- }
- }
- })
- },
- statypetap(e) {
- this.setData({
- statype: e.currentTarget.dataset.type
- })
- this.crmlistfun();
- },
- crmmsgtap(e) {
- wx.navigateTo({
- url: "/pages/other/other?cid=" + e.currentTarget.dataset.aid + '&type=88&aid=' + this.data.aid,
- });
- },
- crmlistfun() {
- const that = this;
- page = 1;
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/invite_list',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- p: page,
- pagesize: 15,
- aid: that.data.aid,
- type: that.data.statype == 1 ? '预约活动' : that.data.statype == 2 ? '已到场' : that.data.statype == 3 ? '已交定' : '已签单'
- },
- success: function (res) {
- if (res.data.code == '0') {
- for (let i = 0; i < res.data.data.length; i++) {
- res.data.data[i].lastday = util.nowdayDiff(
- res.data.data[i].last_contact_date
- );
- }
- if (that.data.statype == 1) {
- that.setData({
- invitecrm: res.data.data
- })
- } else {
- that.setData({
- showUpcrm: res.data.data
- })
- }
- }
- }
- })
- },
- callphonetap(e) {
- const that = this;
- wx.showLoading({
- title: '正在拨打电话...',
- })
- utils.$post({
- url: app.globalData.webUrl + 'api/crmCustomer/getCrmPhone',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- id: e.currentTarget.dataset.aid
- },
- success: function (res) {
- if (res.data.code == 0) {
- wx.hideLoading();
- let dataObj = res.data;
- dataObj.aid = e.currentTarget.dataset.aid;
- that.setData({
- itemDataMsg: dataObj
- })
- if (dataObj.out_call_check == 1) {
- if (dataObj.out_call_phone.length == 1) {
- that.onCallBindFunc(dataObj.out_call_phone[0],dataObj);
- } else {
- let mobileArr = dataObj.out_call_phone.map(v => {
- return {name: v};
- })
- that.setData({
- actions: mobileArr,
- showAction: true
- })
- }
- } else {
- that.onCallBindFunc(dataObj.out_call_phone[0],dataObj);
- }
- } else {
- wx.hideLoading();
- }
- }
- })
- },
- outCallMobileApi(dataObj) {
- const that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/outCall/mobile',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- id: dataObj.aid,
- alertshow: '123'
- },
- success: function (res) {
- if (res.data.code == 1) {}
- }
- })
- },
- onCallBindFunc(phone,dataObj) {
- const that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/outCall/bind',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- phone: phone,
- customer_id: dataObj.aid,
- alertshow: '123'
- },
- success: function (res) {
- wx.hideLoading();
- if (res.data.code == 1) {
- that.outCallMobileApi(dataObj);
- wx.makePhoneCall({
- phoneNumber: dataObj.phone.phone ? dataObj.phone.phone : dataObj.phone.phone1 ? dataObj.phone.phone1 : dataObj.phone.phone2,
- success() {
- that.getsetfun();
- that.setData({
- trackflag: true,
- nowcid: dataObj.aid,
- })
- that.selectComponent('#addtrack').setcrmfun();
- that.activitylistfun('0');
- that.activitylistfun('1');
- that.typeinitfun();
- }
- })
- } else {
- if (res.data.mobile) {
- wx.makePhoneCall({
- phoneNumber: res.data.mobile,
- success() {
- that.getsetfun();
- that.setData({
- trackflag: true,
- nowcid: dataObj.aid,
- })
- that.selectComponent('#addtrack').setcrmfun();
- that.activitylistfun('0');
- that.activitylistfun('1');
- that.typeinitfun();
- }
- })
- } else {
- wx.showLoading({
- title: '电话拨通中,请等待5s-10s',
- duration: 5000,
- icon: "none"
- })
- setTimeout(() => {
- wx.hideLoading();
- },5000)
- }
- }
- }
- })
- },
- onClose() {
- const that = this;
- this.setData({
- showAction: false,
- trackflag: true,
- nowcid: this.data.itemDataMsg.aid,
- })
- that.getsetfun();
- that.selectComponent('#addtrack').setcrmfun();
- that.activitylistfun('0');
- that.activitylistfun('1');
- that.typeinitfun();
- },
- onSelect(e) {
- this.onCallBindFunc(e.detail.name,this.data.itemDataMsg);
- this.setData({
- showAction: false
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- sharewaytap: function () {
- this.setData({
- wshareshow: true
- })
- },
- shareurltap: function () {
- wx.showLoading({
- title: '加载中...',
- })
- if (this.data.activityType && this.data.activityType == 'broker') {
- util.schemefun('/share/pages/activitymsg/activitymsg', 'aid=' + this.data.aid + '&bid=' + app.globalData.brokeruserId + '&ctp=' + app.globalData.clientype + '&t=b', this.data.aid, 'activity', '');
- } else {
- this.activitytap();
- util.schemefun('/share/pages/activitymsg/activitymsg', 'aid=' + this.data.aid + '&uid=' + app.globalData.personMsg.id + '&ctp=' + app.globalData.clientype, this.data.aid, 'activity', '');
- }
- },
- activityfun: function () {
- var that = this;
- if (that.data.activityType && that.data.activityType == 'broker') {
- utils.$post({
- url: app.globalData.webUrl + 'api/agents_work/activity_detail',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- id: that.data.aid,
- uid: app.globalData.personMsg.id
- },
- success: function (res) {
- if (res.data.code == '0') {
- that.setData({
- activityobj: res.data.data
- })
- wx.setNavigationBarTitle({
- title: res.data.data.title
- })
- }
- }
- })
- } else {
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/details',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- id: that.data.aid,
- uid: app.globalData.personMsg.id
- },
- success: function (res) {
- if (res.data.code == '0') {
- that.setData({
- activityobj: res.data.data
- })
- wx.setNavigationBarTitle({
- title: res.data.data.title
- })
- }
- }
- })
- }
- },
- setpostertap: function () {
- if (this.data.activityType && this.data.activityType == 'broker') {
- wx.navigateTo({
- url: '/index/pages/setposter/setposter?type=activity&aid=' + this.data.aid + "&tp=broker" + "&listshare=",
- })
- } else {
- wx.navigateTo({
- url: '/index/pages/setposter/setposter?type=activity&aid=' + this.data.aid + "&listshare=",
- })
- }
- },
- collectap: function () {
- var that = this;
- let activityobj = that.data.activityobj;
- if (!that.data.activityobj.collected) {
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/collection',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- user_id: app.globalData.personMsg.id,
- id: that.data.aid
- },
- success: function (res) {
- if (res.data.code == '0') {
- wx.showToast({
- title: res.data.msg,
- icon: 'success',
- duration: 2000
- })
- activityobj.collected = true;
- that.setData({
- activityobj: activityobj
- })
- }
- }
- })
- } else {
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/collectCancel',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- user_id: app.globalData.personMsg.id,
- id: that.data.aid
- },
- success: function (res) {
- if (res.data.code == '0') {
- wx.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- activityobj.collected = false;
- that.setData({
- activityobj: activityobj
- })
- }
- }
- })
- }
- },
- activitytap: function () {
- let that = this;
- utils.$post({
- url: app.globalData.webUrl + 'api/share/addlog',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- id: that.data.aid,
- type: 'activity',
- },
- success: function (r) {
- }
- })
- },
- prelooktap() {
- wx.previewImage({
- current: this.data.activityobj.cover, // 当前显示图片的http链接
- urls: [this.data.activityobj.cover], // 需要预览的图片http链接列表
- fail(res) {
- console.log(res)
- }
- })
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- if (this.data.type == 1) {
- wx.stopPullDownRefresh();
- return false;
- }
- if (this.data.type == '3') {
- this.ranklistfun();
- wx.stopPullDownRefresh()
- } else {
- this.crmtopdatafun();
- const that = this;
- page = 1;
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/invite_list',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- p: page,
- pagesize: 15,
- aid: that.data.aid,
- type: that.data.statype == 1 ? '预约活动' : that.data.statype == 2 ? '已到场' : that.data.statype == 3 ? '已交定' : '已签单'
- },
- success: function (res) {
- wx.stopPullDownRefresh()
- if (res.data.code == '0') {
- for (let i = 0; i < res.data.data.length; i++) {
- res.data.data[i].lastday = util.nowdayDiff(
- res.data.data[i].last_contact_date
- );
- }
- if (that.data.statype == 1) {
- that.setData({
- invitecrm: res.data.data
- })
- } else {
- that.setData({
- showUpcrm: res.data.data
- })
- }
- }
- }
- })
- }
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- const that = this;
- if (this.data.type == 1) {
- return false;
- }
- if (that.data.type == 3) {
- sharepage = sharepage * 1 + 1;
- var str = "api/activity/ranking_list";
- let data = {
- id: that.data.aid,
- type: that.data.ranktype,
- is_org: this.data.orgtype == '公司排行' ? 0 : '1',//0公司排行,1团队排行,
- page: sharepage,
- limit: 15,
- };
- if (this.data.orgtype == '部门排行') {
- str = "api/activity/org_ranking_list";
- data = {
- id: that.data.aid,
- type: that.data.ranktype,
- page: sharepage,
- limit: 15,
- };
- }
- utils.$post({
- url: app.globalData.webUrl + str,
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: data,
- success: function (res) {
- setTimeout(() => {
- wx.hideLoading()
- }, 1000)
- if (res.data.code == "0") {
- if (that.data.orgtype == '公司排行' || that.data.orgtype == '团队排行') {
- let shareranklist = that.data.shareranklist;
- shareranklist = shareranklist.concat(res.data.data.data);
- that.setData({
- shareranklist: shareranklist
- })
- } else {
- let gotranklist = that.data.gotranklist;
- gotranklist = gotranklist.concat(res.data.data.data);
- that.setData({
- gotranklist: gotranklist
- })
- }
- }
- }
- })
- } else {
- page = page * 1 + 1;
- utils.$post({
- url: app.globalData.webUrl + 'api/activity/invite_list',
- header: {
- 'Authorization': 'bearer ' + app.globalData.token
- },
- data: {
- p: page,
- pagesize: 15,
- aid: that.data.aid,
- type: that.data.statype == 1 ? '预约活动' : that.data.statype == 2 ? '已到场' : that.data.statype == 3 ? '已交定' : '已签单'
- },
- success: function (res) {
- if (res.data.code == '0') {
- for (let i = 0; i < res.data.data.length; i++) {
- res.data.data[i].lastday = util.nowdayDiff(
- res.data.data[i].last_contact_date
- );
- }
- if (that.data.statype == 1) {
- let invitecrm = that.data.invitecrm;
- invitecrm = invitecrm.concat(res.data.data);
- that.setData({
- invitecrm: invitecrm
- })
- } else {
- let showUpcrm = that.data.showUpcrm;
- showUpcrm = showUpcrm.concat(res.data.data);
- that.setData({
- showUpcrm: showUpcrm
- })
- }
- }
- }
- })
- }
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- var img = this.data.activityobj.cover;
- if (this.data.activityType && this.data.activityType == 'broker') {
- return {
- title: this.data.activityobj.title,
- imageUrl: img,
- path: '/share/pages/activitymsg/activitymsg?aid=' + this.data.aid + '&bid=' + app.globalData.brokeruserId + "&ctp=" + app.globalData.clientype + '&t=b'
- }
- } else {
- var poster = this.data.activityobj.poster;
- this.activitytap();
- return {
- title: this.data.activityobj.title,
- imageUrl: poster,
- path: '/share/pages/activitymsg/activitymsg?aid=' + this.data.aid + '&uid=' + app.globalData.personMsg.id + "&ctp=" + app.globalData.clientype
- }
- }
- }
- })
|