123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <template>
- <view class="container outbound-content">
- <!-- 这里顶部安全是状态栏 -->
- <view class="status_bar" color="#000000" :style="'height:'+ demoTop+ 'px;'"> </view>
- <!-- 自定义状态栏 -->
- <view class="status_title">
- <u-icon name="arrow-left" size="38" @click="backArrowleft"></u-icon>
- <view class="status_center">{{isShowTitle}}</view>
- </view>
- <!-- 文本提示 -->
- <view class="top-box" v-if="isShowTitle=='修改外呼号码' ||identification=='邮箱'">
- 修改后的外呼号码,将作为您的默认外呼号码,若后期还需修改,可在【我的】-【外呼号码】页面设置
- </view>
- <!-- 输入外呼手机号 -->
- <view class="item-box">
- <view class="ipt-item">
- <label class="item-label item-iphone" @click="areaCode">+{{telephone}} <u-icon :name="areacodeShow?'arrow-up':'arrow-down'" color="#3385FF" size="28"></u-icon></label>
- <input type="text" v-model="phoneIpt" class="ipt" placeholder="请输入外呼号码">
- </view>
- <text class="text-box">座机号请填写区号,分机号用"-"分隔,例:02150509999-8888</text>
- </view>
- <!-- 底部确认 和取消 -->
- <view class="bottom-btn">
- <view class="submit-box" @click="submit">
- 提交
- </view>
- <view class="cancel" v-if="isShowTitle!=='设置外呼号码'" @click="cancelModification">
- 取消修改
- </view>
- </view>
- <!-- 选择区号部分 -->
- <view class="select-box">
- <u-popup v-model="areacodeShow" mode="bottom" @close="areacodeShow=false">
- <view class="box" style="color: #333333;font-size: 28rpxrpx;">请选择您的国际区号</view>
- <view class="box" style="color: #2C83FF;" @click="areacode('86')">大陆+86</view>
- <view class="box" style="color: #2C83FF;" @click="areacode('852')">香港+852</view>
- <view class="box" style="color: #2C83FF;" @click="areacode('886')">台湾+886</view>
- <view class="box" style="color: #2C83FF;" @click="areacode('1')">美国+1</view>
- <view class="box" style="color: #2C83FF;" @click="areacode('65')">新加坡+65</view>
- <view class="box box-bottom" style="color: #A9AFB8;" @click="areacodeShow=false">取消</view>
- </u-popup>
- </view>
- <!-- 关注公众号 弹框 -->
- <u-modal v-model="goFollowShow" :content-style="{fontSize: '32rpx'}" @confirm="goFollowShowBtn"
- :show-cancel-button="true" confirm-text="去关注" @cancel="cancelDialog" :show-title="false"
- :cancel-style="{borderRight:'1rpx solid #EBEBEB'}" :confirm-style="{fontWeight: '700'}">
- <view class="slot-content">
- <rich-text :nodes="accounts"></rich-text>
- </view>
- </u-modal>
- <!-- 知道的弹框 -->
- <u-modal v-model="show" :content="content" :content-style="{fontSize: '32rpx'}" @confirm="cancelDialog"
- :show-title="false" confirm-text="知道了" :confirm-style="{fontWeight: '700'}">
- <view class="slot-content">
- <rich-text :nodes="content"></rich-text>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- import {activity} from "@/config/api.js";
- export default {
- data() {
- return {
- phoneIpt:'',
- isShowTitle:'设置',
- telephone:'86',
- areacodeShow: false,
- identification:'',
- goFollowShow:false,
- accounts:'',
- show:false,
- content:'',
- demoTop:'',
- id:'',
- goOnNextStep:'',
- cellphone:''
- }
- },
- methods: {
- areaCode(){
- this.areacodeShow= true
- },
- areacode(code){
- this.telephone=code
- this.areacodeShow= false
- },
- //提交
- submit(){
- activity.addOutboundMobile({
- ActivityId:Number(this.id),
- OutboundCountryCode:this.telephone,
- OutboundMobile:this.phoneIpt
- }).then(res=>{
- if(res.Ret !== 200 ) return
- if(this.identification=='修改'||this.identification=='邮箱'){
- if(this.identification=="邮箱"){
- let pages = getCurrentPages()
- let prevPage = pages[pages.length - 2]
- if(prevPage.$page.fullPath=='/pages/activity/activity'||prevPage.$page.fullPath=='/activityPages/activitySearch/activitySearch'){
- const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == this.id)
- prevPage.$vm.collectList[index].IsSignup = 1
- }
-
- }
- if(this.goOnNextStep=='true') {
- this.accounts=`
- ${this.telephone}-${this.phoneIpt}<br/>
- 预约成功,已加入您的活动日程<br/><br/>
-
- 想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号
- `
- this.goFollowShow=true
-
- }else {
- this.content=`
- ${this.telephone}-${this.phoneIpt}<br/><br/>
- 预约外呼成功,已加入您的活动日程
- `
- this.show=true
- }
- }else {
- uni.navigateBack()
- }
- })
- },
- //取消修改
- cancelModification(){
- if(this.identification=='修改'){
- if(this.goOnNextStep=='true') {
- this.accounts=`
- ${this.cellphone}<br/>
- 预约成功,已加入您的活动日程<br/><br/>
-
- 想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号
- `
- this.goFollowShow=true
- }else {
- this.content=`
- ${this.cellphone}<br/><br/>
- 预约外呼成功,已加入您的活动日程
- `
- this.show=true
- }
- }else {
- uni.navigateBack()
- }
- },
- //去关注公众号
- goFollowShowBtn(){
- uni.redirectTo({
- url: '/activityPages/accountsOfficial/accountsOfficial'
- })
- },
- //弹框的取消
- cancelDialog(){
- uni.navigateBack()
- },
- //右上角的返回
- backArrowleft(){
- if(this.identification=='修改'){
- if(this.goOnNextStep=='true') {
- this.accounts=`
- ${this.cellphone}<br/>
- 预约成功,已加入您的活动日程<br/><br/>
-
- 想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号
- `
- this.goFollowShow=true
- }else {
- this.content=`
- ${this.cellphone}<br/><br/>
- 预约外呼成功,已加入您的活动日程
- `
- this.show=true
- }
- }else {
- uni.navigateBack()
- }
- },
- },
- onLoad(option) {
- this.isShowTitle=option.title
- this.identification=option.identification
- this.id= option.id || ''
- this.goOnNextStep=option.goOnNextStep||''
- this.cellphone=option.cellphone||''
- const res = uni.getSystemInfoSync()
- this.demoTop=res.safeArea.top
- },
-
-
- }
- </script>
- <style scoped lang="scss">
- .outbound-content {
- /* 自定义状态栏 */
- .status_bar {
- width: 100%;
- }
-
- /* 自定义导航栏 */
- .status_title {
- box-sizing: border-box;
- display: flex;
- align-items: center;
- width: 100%;
- height: 88rpx;
- padding: 10rpx 62rpx 15rpx 30rpx;
- background-color: #FFFFFF;
- box-sizing: border-box;
- }
- .status_center {
- margin: 0 auto;
- font-size: 34rpx;
- font-weight: 400;
- color: #000000;
- }
- .top-box {
- width: 100%;
- background-color: #F7F7F7;
- padding: 20rpx 34rpx ;
- font-size: 28rpx;
- font-weight: 400;
- line-height: 48rpx;
- color: #666666;
- }
- .item-box {
- width: 100%;
- margin-top: 35rpx;
- padding: 0 32rpx;
- .text-box {
- height: 30rpx;
- font-size: 22rpx;
- line-height: 30px;
- color: #999999;
- }
- }
- .ipt-item {
- padding: 33rpx 0 10rpx;
- border-bottom: 1rpx solid #D6D6D6;
- display: flex;
- align-items: center;
- font-size: 28rpx;
- .item-label {
- display: flex;
- justify-content: space-between;
- width: 105rpx;
- color: #3385FF;
- }
- .ipt {
- margin-left: 40rpx;
- width: 500rpx;
- font-size: 32rpx;
- color: #666;
- }
- }
- .bottom-btn {
- margin-top: 247rpx;
- font-size: 34rpx;
- text-align: center;
- .submit-box {
- margin: 0 auto;
- width: 368rpx;
- height: 80rpx;
- background: linear-gradient(268deg, #2DDBFF 0%, #1599FF 49%, #005EFF 100%);
- color: #FFFFFF;
- line-height: 80rpx;
- border-radius: 4rpx;
- }
- .cancel {
- margin: 30rpx auto;
- width: 368rpx;
- height: 80rpx;
- border: 2px solid #2C83FF;
- border-radius: 4rpx;
- line-height: 80rpx;
- color: #2C83FF;
- }
- }
- .select-box {
- width: 100%;
-
- .box {
- height: 95prx;
- line-height: 95rpx;
- text-align: center;
- font-size: 32rpx;
- border-bottom: 1rpx solid #EBEBEB;
- }
-
- .box-bottom {
- border-bottom: none !important;
- }
- }
- }
- .slot-content {
- width: 100%;
- padding: 50rpx;
- text-align: center;
- font-size: 32rpx;
- color: #0F1826;
- line-height: 48rpx;
- }
- .u-model__footer__button.data-v-3626fcec {
- border-right: 1rpx solid #333;
- }
- </style>
|