feat: 个人版本-我的-隐藏微信客服
This commit is contained in:
2
dist/pages/my/index.js
vendored
2
dist/pages/my/index.js
vendored
@@ -1,2 +1,2 @@
|
||||
/*! For license information please see index.js.LICENSE.txt */
|
||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/cell/index.js"),a=t("./node_modules/@antmjs/vantui/es/toast/index.js"),s=t("./node_modules/@antmjs/vantui/es/button/index.js"),l=t("./node_modules/@antmjs/vantui/es/image/index.js"),u=t("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),i=t("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),d=t("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),r=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),c=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),m=t("webpack/container/remote/react"),f=t("./src/pages/components/TabbarCom/index.tsx"),p=t("webpack/container/remote/@tarojs/taro"),x=t.n(p),g=(t("./src/pages/components/ActiveCard/index.tsx"),t("./src/utils/index.ts")),v=t("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,m.useState)({}),t=(0,r.default)(n,2),p=(t[0],t[1],(0,m.useState)([])),j=(0,r.default)(p,2),b=(j[0],j[1],(0,m.useState)(0)),h=(0,r.default)(b,2),k=(h[0],h[1],(0,m.useState)(!0)),w=(0,r.default)(k,2),_=w[0],y=w[1];(0,m.useEffect)((function(){C()}),[]);var C=function(){var e=(0,d.default)((0,i.default)().mark((function _callee(){var e;return(0,i.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.phoneLogin)();case 2:e=n.sent,console.log("isok",e),y(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){}),[]);var N=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){x().cloud.callFunction({name:"getPhoneNum",data:{weRunData:x().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,t,o,a,s,l,i,d,r;console.log("res222",e);var c=null==e||null===(n=e.result)||void 0===n||null===(t=n.event)||void 0===t||null===(o=t.weRunData)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(l=s.context)||void 0===l?void 0:l.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(r=d.userInfo)||void 0===r?void 0:r.openId},okFun:function okFun(e){var n,t;console.log("q",e),(0,g.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(t=n[0])||void 0===t?void 0:t._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:c}},okFun:function okFun(e){C()}})}};(0,g.getTable)((0,u.default)({},f))}))}(e)};return(0,v.jsxs)(c.View,{className:"myContent",children:[(0,v.jsxs)(c.View,{className:"myImage",children:[(0,v.jsx)(l.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!_&&(0,v.jsx)(c.View,{className:"loginBtn",children:(0,v.jsx)(s.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),N(e)},children:"登录"})})]}),(0,v.jsxs)(c.View,{className:"cellArr",children:[(0,v.jsx)(o.default,{icon:"manager",title:"打卡记录",isLink:!0,onClick:function onClick(){_?x().navigateTo({url:"/pages/my/components/CheckinDetail/index"}):a.default.fail({message:"请先登录",selector:"#vanToast-demo2"})}}),(0,v.jsx)(o.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){x().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,v.jsx)(o.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){x().navigateTo({url:"/pages/my/components/AbountUs/index"})}})]}),(0,v.jsx)(a.default,{id:"vanToast-demo2"}),(0,v.jsx)(f.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,t){var o=t("webpack/container/remote/@tarojs/runtime"),a=t("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,o.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["pages/my/index"],{"./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx":function(e,n,o){var t=o("./node_modules/@antmjs/vantui/es/cell/index.js"),a=o("./node_modules/@antmjs/vantui/es/toast/index.js"),s=o("./node_modules/@antmjs/vantui/es/button/index.js"),l=o("./node_modules/@antmjs/vantui/es/image/index.js"),u=o("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),i=o("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),d=o("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),c=o("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),r=o("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),m=o("webpack/container/remote/react"),f=o("./src/pages/components/TabbarCom/index.tsx"),p=o("webpack/container/remote/@tarojs/taro"),x=o.n(p),g=(o("./src/pages/components/ActiveCard/index.tsx"),o("./src/utils/index.ts")),v=o("./config.js"),j=o("webpack/container/remote/react/jsx-runtime");n.default=function my(e){var n=(0,m.useState)({}),o=(0,c.default)(n,2),p=(o[0],o[1],(0,m.useState)([])),b=(0,c.default)(p,2),h=(b[0],b[1],(0,m.useState)(0)),k=(0,c.default)(h,2),w=(k[0],k[1],(0,m.useState)(!0)),_=(0,c.default)(w,2),y=_[0],C=_[1];(0,m.useEffect)((function(){N()}),[]);var N=function(){var e=(0,d.default)((0,i.default)().mark((function _callee(){var e;return(0,i.default)().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.phoneLogin)();case 2:e=n.sent,console.log("isok",e),C(e);case 5:case"end":return n.stop()}}),_callee)})));return function getok(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){}),[]);var I=function getPhoneNumber(e){console.log("点击获取手机事件",e.detail.cloudID),function getLogin(e){x().cloud.callFunction({name:"getPhoneNum",data:{weRunData:x().cloud.CloudID(e.detail.cloudID)}}).then((function(e){var n,o,t,a,s,l,i,d,c;console.log("res222",e);var r=null==e||null===(n=e.result)||void 0===n||null===(o=n.event)||void 0===o||null===(t=o.weRunData)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.phoneNumber,m=null==e||null===(s=e.result)||void 0===s||null===(l=s.context)||void 0===l?void 0:l.tencentcloud_uin,f={tableName:"userInfo",keyValue:{openId:null==e||null===(i=e.result)||void 0===i||null===(d=i.event)||void 0===d||null===(c=d.userInfo)||void 0===c?void 0:c.openId},okFun:function okFun(e){var n,o;console.log("q",e),(0,g.updateTableid)({id:null==e||null===(n=e.data)||void 0===n||null===(o=n[0])||void 0===o?void 0:o._id,tableName:"userInfo",objData:{tencentcloud_uin:m,authInfo:{authPhonenum:r}},okFun:function okFun(e){N()}})}};(0,g.getTable)((0,u.default)({},f))}))}(e)};return(0,j.jsxs)(r.View,{className:"myContent",children:[(0,j.jsxs)(r.View,{className:"myImage",children:[(0,j.jsx)(l.default,{round:!0,width:"100px",height:"100px",src:"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/images/images-2.jpg"}),!y&&(0,j.jsx)(r.View,{className:"loginBtn",children:(0,j.jsx)(s.default,{type:"primary",size:"mini","open-type":"getPhoneNumber",lang:"zh_CN",onGetPhoneNumber:function onGetPhoneNumber(e){console.log("info",e),I(e)},children:"登录"})})]}),(0,j.jsxs)(r.View,{className:"cellArr",children:[(0,j.jsx)(t.default,{icon:"manager",title:"打卡记录",isLink:!0,onClick:function onClick(){y?x().navigateTo({url:"/pages/my/components/CheckinDetail/index"}):a.default.fail({message:"请先登录",selector:"#vanToast-demo2"})}}),"people"!==v.type&&(0,j.jsx)(t.default,{title:"微信客服",icon:"wechat",isLink:!0,value:"",onClick:function onClick(){x().openCustomerServiceChat({corpId:"wwb04af9a97514271c",extInfo:{url:"https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5"},success:function success(e){}})}}),(0,j.jsx)(t.default,{icon:"friends",title:"关于我们",isLink:!0,onClick:function onClick(){x().navigateTo({url:"/pages/my/components/AbountUs/index"})}})]}),(0,j.jsx)(a.default,{id:"vanToast-demo2"}),(0,j.jsx)(f.default,{active:2})]})}},"./src/pages/my/index.tsx":function(e,n,o){var t=o("webpack/container/remote/@tarojs/runtime"),a=o("./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./src/pages/my/index.tsx");Page((0,t.createPageConfig)(a.default,"pages/my/index",{root:{cn:[]}},{navigationBarTitleText:"我的"}||{}))}},function(e){e.O(0,["taro","vendors","common"],(function(){return n="./src/pages/my/index.tsx",e(e.s=n);var n}));e.O()}]);
|
||||
2
dist/pages/my/index.js.LICENSE.txt
vendored
2
dist/pages/my/index.js.LICENSE.txt
vendored
@@ -1,3 +1,5 @@
|
||||
/*! ../../../config */
|
||||
|
||||
/*! ../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[9].use[1]!./index.tsx */
|
||||
|
||||
/*! ../../utils/index */
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
phoneLogin,
|
||||
updateTableid,
|
||||
} from "../../utils/index";
|
||||
import { type } from "../../../config";
|
||||
|
||||
const my = (props: any) => {
|
||||
// const [active, setActive] = react.useState(props?.active ?? 0);
|
||||
@@ -212,31 +213,34 @@ const my = (props: any) => {
|
||||
Taro.navigateTo({
|
||||
url: "/pages/my/components/CheckinDetail/index",
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
Toast.fail({
|
||||
message: '请先登录',
|
||||
selector: '#vanToast-demo2',
|
||||
})
|
||||
message: "请先登录",
|
||||
selector: "#vanToast-demo2",
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{/* <Cell icon="manager" title="个人资料" isLink /> */}
|
||||
|
||||
<Cell
|
||||
title="微信客服"
|
||||
icon="wechat"
|
||||
isLink
|
||||
value=""
|
||||
onClick={() => {
|
||||
Taro.openCustomerServiceChat({
|
||||
corpId: "wwb04af9a97514271c", //企业id
|
||||
extInfo: {
|
||||
url: "https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5",
|
||||
},
|
||||
success: function (res) {},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{type !== "people" && (
|
||||
<Cell
|
||||
title="微信客服"
|
||||
icon="wechat"
|
||||
isLink
|
||||
value=""
|
||||
onClick={() => {
|
||||
Taro.openCustomerServiceChat({
|
||||
corpId: "wwb04af9a97514271c", //企业id
|
||||
extInfo: {
|
||||
url: "https://work.weixin.qq.com/kfid/kfc70f3f112c97a54c5",
|
||||
},
|
||||
success: function (res) {},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Cell
|
||||
icon="friends"
|
||||
title="关于我们"
|
||||
|
||||
Reference in New Issue
Block a user