123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864 |
- <template>
- <view class="all">
- <u-mask :show="show" @click="show = false">
- <u-image width="100%" height="500px" :mode="'widthFix'" src="@/assets/static/img/guide_point2.png"></u-image>
- </u-mask>
- <ujp-navbar title="凭话费领年卡活动" :startGz="false" :isBack="back"></ujp-navbar>
- <view class="InviteFriends" :class="{
- opacityClass:show
- }">
- <view class="text imgHead">
- <view class="imgHead1">
- <img v-if="branchParameterBl('ud')" style="width: 125px; height: 40px;" src="@/assets/logo/logo4Ud.png" alt="">
-
- <img v-else style="width: 125px;" src="@/assets/logo/logo1.png"></img>
- </view>
- <view class="imgHead2">
- <img style="width: 252px;height: 40px;" src="@/assets/img/piccShare/5.png"></img>
- </view>
- </view>
- <view class="main">
- <view class="suited">
- <p class="title">活动对象 :</p>
- <view class="content">
- 不限
- </view>
- <p class="title">活动说明 :</p>
- <view class="content">
- 庆元旦,迎新年,用户凭手机号,免费领取<span
- style="color: rgb(12 11 11);font-weight: bold;">{{projectName}}年卡</span>一张,最低可享<span
- style="color: #ec4f27;font-weight: bold;">两年免充电服务费</span>,最高可享万元礼包,老带新还能有额外红包大礼!
- </view>
- <view class="bottomView" v-if="false">
- <u-button class="button" shape="circle" @click="show=true">分享活动
- <u-icon name="share"></u-icon>
- </u-button>
- </view>
- </view>
- <view class="application-form ">
- <view class="title">
- 线上预约:
- </view>
- <view class="tel">
- <p><span style="color: red;">*</span>填写手机号</p>
- <u-input v-model="subForm.phone" :customStyle="placeholderStyle"
- :placeholderStyle="placeholderStyle" placeholder="请填写手机号"></u-input>
- </view>
- <view class="bottomView">
- <u-button class="button" type="warning" @click="submit">我要预约</u-button>
- </view>
- <view style="margin-top: 24rpx;margin-bottom: 44rpx;">
- <u-icon name="info-circle"></u-icon>
- 预约成功后,会有工作人员跟您联系,请保持电话畅通。
- </view>
- <view class="title">
- 线下办理:
- </view>
- <view class="tel" style="margin-top: 24rpx;margin-bottom: 24rpx;">
- 携带本人<span class="titlespan">身份证</span>、<span class="titlespan">车辆行驶证</span>前往江津东路附155号荆鹏软件园一楼柜台办理。
- </view>
- <view class="telImg" @click="navigate">
- <img src="@/assets/img/map@3x.png" style="width: 100%;"></img>
- </view>
- </view>
-
- <view class="application-table table">
- <view style="text-align: center;color: red;font-size: 36rpx;margin-bottom: 8px;font-weight:bold;">
- 年卡礼包
- </view>
- <table >
- <tr class="th">
-
- <td >年卡</td>
- <td>说明</td>
- <td>价值</td>
- </tr>
- <tr v-for="(item,i) in tableList" :key="i">
- <td class="td1">{{item.name}}</td>
- <td class="td2">{{item.value}}</td>
- <td class="td3">{{item.createBy}}</td>
-
- </tr>
- </table>
- </view>
- </view>
- </view>
- <u-modal v-model="show1" @confirm="gotoGz" cancel-text="暂不关注" confirm-text="前往关注" :show-cancel-button="false"
- confirm-color="#53b56b" ref="uModal2" :asyncClose="true">
- <view style="padding: 15px;">请先关注<span style=" color: #53b56b;">{{projectName}}</span>公众号,然后进行填报</view>
- </u-modal>
- <u-mask :show="carTempBl">
- <ucarkeyboard v-if="carTempBl" :tips="subForm.carNum" style="z-index: 9999;position: fixed !important;"
- ref="uKeyboard" mode="car" @confirm="carTempBl=false" @cancel="carTempBl=false" :showTips="true"
- :mask-close-able="false" @change="valChange" @backspace="backspace"></ucarkeyboard>
- </u-mask>
- </view>
- </template>
- <script>
- import {
- convertCanvasToImage,
- substrMb
- } from '@/utils'
- import {
- checkPhone
- } from '@/utils'
-
- import wx from 'weixin-js-sdk'
- import * as API from '@/apis/friends.js'
- import * as WxJsApi from '@/utils/wxJsApi.js'
- import * as API_weixin from '@/apis/weixin.js'
- import ucarkeyboard from '@/components/Ucarkeyboard.vue'
- export default {
- components: {
- ucarkeyboard
- },
- data() {
- return {
- tableList:[],
- isLogin: false,
- carAuthImg: "",
- id: "",
- carTempBl: false,
- code: "",
- show: false,
- uid: "",
- show1: false,
- show2: false,
- projectName: "",
- name: "",
- back: false,
- subForm: {
- realName: "",
- phone: "",
- carNum: "",
- licenseFileUrl: "",
- openId: "",
- shareUserId: ""
- },
- placeholderStyle: {
- 'font-size': '16px',
- 'padding': '4px 8px',
- },
- shareUserId: "",
- userInfo: null,
- carNum: '',
- carLicense: false,
- }
- },
- onLoad(op) {
- if (op.back) {
- this.back = false
- }
- this.projectName = process.car.ProjectName;
- if (op.sid) {
- this.shareUserId = op.sid
- this.carhelp.set("picc_shareUserId_1230", {
- sid: op.sid,
- time: new Date().getTime()
- });
- } else {
- var obj = this.carhelp.get("picc_shareUserId_1230")
- if (obj) {
- var time1 = new Date().getTime()
- var time2 = obj.time;
- if (time1 - time2 < 1000 * 60 * 5) {
- this.shareUserId = obj.sid;
- }
- }
- }
- //console.log(this.shareUserId )
- if (this.shareUserId) {
- uni.showToast({
- title: "来自好友的分享"
- })
- }
- this.get_wx_config();
- this.getList("凭话费送年卡")
- },
- onReady() {
-
-
- var info = this.carhelp.getPersonInfo();
- if (info.id && info.phone) {
- //this.isLogin=true
- this.userInfo = info;
- this.subForm.phone = info.phone;
- }
- },
- onShow() {
- this.checkSubscribe()
- },
- methods: {
- navigate() {
- // x
- // :
- // "112.276527"
- // y
- // :
- // "30.306427"
- //console.log(item)
- uni.showLoading({
-
- })
- WxJsApi.openLocation({
- latitude: parseFloat(30.306427), //目的地latitude
- longitude: parseFloat(112.276527), //目的地longitude
- name: "江津东路附155号荆鹏软件园",
- address: "携带本人身份证、车辆行驶证前往江津东路附155号荆鹏软件园一楼柜台办理",
- scale: 15, //地图缩放大小,可根据情况具体调整
- success(res) {
- uni.hideLoading()
- },
- complete() {
- // uni.hideLoading()
- }
- });
- // //('station'+JSON.stringify(_self.stationDetail.station))
- // window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
- // "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
-
- },
-
- getList(key) {
- API.findByCatalogName({
- catalogName:key
- }).then((res) => {
- this.tableList=res.data.dataDictionaryList
- //setGzDate
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- checkSubscribe() {
- API_weixin.checkSubscribe({
- openId: this.carhelp.getOpenId()
- }).then((res) => {
- if (res.data == "0") {
- this.show1 = true
- } else {
- //this.init();
- this.show1 = false;
- this.show2 = true;
- //this.carhelp.setGzDate()
- }
- //setGzDate
- }).catch(error => {
- uni.showToast({
- title: error
- })
- })
- },
- gotoGz() {
- this.carhelp.setGzDate()
- // this.gotoGzShow = false;
- var url = process.car.gzUrl;
- window.location.href = url
- },
- submit() {
- this.subForm.openId = this.carhelp.getOpenId();
- this.subForm.shareUserId = this.shareUserId;
- this.subForm.event = 1;
- if (!this.subForm.phone) {
- uni.showToast({
- title: "请填写手机号"
- })
- return
- }
- var checkPhoneResult = checkPhone(this.subForm.phone);
- if (checkPhoneResult !== true) {
- uni.showToast({
- title: checkPhoneResult,
- })
- return;
- }
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.submitEventRegistration(this.subForm).then((res) => {
- uni.hideLoading()
- if (res.result) {
- uni.showModal({
- //showCancel:false,
- title: "提示",
- content: "预约成功!",
- cancelText: "继续填写",
- confirmText: "前往主页",
- success: (me) => {
- this.carAuthImg = "";
- this.subForm = {
- phone: "",
- }
- if (me.confirm) {
- uni.reLaunch({
- url: "/"
- })
- }
- }
- })
- }
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- //获取微信jssdk配置信息
- get_wx_config() {
- //
- var _this = this
- API_weixin.getConfig().then(response => {
- var wxconfig = response.data.wxConfig;
- wx.config({
- debug: false, // 开启调试模式,
- appId: wxconfig.appId, // 必填,企业号的唯一标识,此处填写企业号corpid
- timestamp: wxconfig.timestamp, // 必填,生成签名的时间戳
- nonceStr: wxconfig.nonceStr, // 必填,生成签名的随机串
- signature: wxconfig.signature, // 必填,签名,见附录1
- jsApiList: ['updateAppMessageShareData',
- 'updateTimelineShareData', 'onMenuShareTimeline', 'onMenuShareAppMessage',
- 'onMenuShareQQ', 'onMenuShareQZone',
- 'openLocation'
-
- ], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
- });
- _this.wxShare()
- wx.error(function(res) {
- //('微信api配置出错');
- });
- }).catch(error => {
- //(error);
- })
- },
- //微信分享自定义
- wxShare() {
- var img =
- "http://oss.xiaoxinda.com/charging/chargingconfigure/2022/6/6/ec228c56-487a-4ae1-ac6f-37284060fbba/hongbao.jpg"
- // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
- // if (indexLogo) {
- // this.indexLogo = indexLogo;
- // }
- var info = this.carhelp.getPersonInfo()
- //var img=require("@/static/img/aboutus.png")
- ////(this.nowItem);
- var ProjectName = process.car.ProjectName; //info.nickName+
- var nickName = info.nickName ? info.nickName : '好友';
- var title = nickName + "邀请你参加'凭话费领年卡活动'"
- //"["+ProjectName+"]"+'和好友一起领5元红包'
- var desc = ProjectName
- let joinUrl = window.location.href.split("/team51/")[0] + "/team51/#/pages/user/newYear2024?back=1"
- //this.joinUrl=joinUrl;
- if (info.id) {
- joinUrl += "&sid=" + info.id;
- }
- var _this = this;
- wx.ready(function() {
- wx.onMenuShareAppMessage({
- title: title,
- desc: desc,
- link: joinUrl,
- imgUrl: img,
- success: function() {
- // 设置成功
- _this.$emit("wxShare", null);
- }
- })
- wx.onMenuShareTimeline({
- title: title,
- desc: desc,
- link: joinUrl,
- imgUrl: img,
- success: function() {
- // 设置成功
- _this.$emit("wxShare", null);
- }
- })
- wx.updateAppMessageShareData({
- title: title,
- desc: desc,
- link: joinUrl,
- imgUrl: img,
- success: function() {
- //("updateAppMessageShareData")
- // 设置成功
- _this.$emit("wxShare", null);
- }
- })
- wx.updateTimelineShareData({
- title: title,
- desc: desc,
- link: joinUrl,
- imgUrl: img,
- success: function() {
- //("updateTimelineShareData")
- // 设置成功
- _this.$emit("wxShare", null);
- }
- })
- console.log("readyreadyreadyreadyready")
- });
- }
- }
- }
- </script>
- <style>
- page {
- background: #c9382c;
- }
- </style>
- <style lang="scss" scoped>
- @import "@/_theme.scss";
- .all {
- @include themeify {
- font-size: themed('font-size1');
- }
- }
- .imgHead {
- padding-top: 72rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- .imgHead1 {
- img {
- height: 24px;
- }
- display: flex;
- justify-content: center;
- }
- .imgHead2 {
- display: flex;
- img {
- width: 100%;
- height: 40px;
- }
- margin-top: 16px;
- }
- }
- .main {
- padding: 22rpx 56rpx 170rpx;
- .text {
- color: rgba(255, 255, 255, 100);
- @include themeify {
- font-size: themed('font-size4');
- }
- /* font-size: 18px;*/
- text-align: justify;
- text-indent: 36px;
- }
- .suited {
- background-color: #fff;
- //background: linear-gradient(180deg, rgba(189,255,224,1) 0%,rgba(255,255,255,1) 14%);
- background: linear-gradient(180deg, rgba(255, 224, 223, 1) 0%, rgba(255, 255, 255, 1) 14%);
- margin-top: 24px;
- padding: 24px;
- border-radius: 16px;
- .title {
- /*height: 18px;*/
- color: rgba(16, 16, 16, 100);
- font-size: 18px;
- font-weight: 600;
- }
- .content {
- margin: 16rpx 0;
- //font-weight: 550;
- color: rgba(102, 102, 102, 1);
- line-height: 20px;
- font-size: 14px;
- p {
- margin: 8rpx 0;
- }
- }
- }
- .application-table {
- background-color: #fff;
- border-radius: 16px;
- margin-top: 24px;
- padding: 24rpx 16rpx;
- padding-top:8px;
- }
- .application-form {
- background-color: #fff;
- border-radius: 16px;
- margin-top: 24px;
- padding: 24px;
- .titlespan{
- font-weight: bold;
- color: rgba(16, 16, 16, 1);
- }
- .title{
- color: rgba(16, 16, 16, 1);
- font-size: 36rpx;
- font-weight: bold;
- margin-bottom: 24rpx
- }
-
- .u-input {
- border-radius: 50px;
- background-color: rgba(232, 236, 234, 100);
- margin-top: 12px;
- }
- ::v-deep.uni-input-input {
- margin: 20px;
- }
- ::v-deep.u-input__right-icon {
- margin-right: 10px;
- }
- p {
- font-size: 18px;
- @include themeify {
- line-height: themed('font-size4');
- height: themed('font-size4');
- }
- /* height: 18px;
- line-height: 18px;*/
- color: rgba(16, 16, 16, 100);
- /* font-size: 18px;*/
- }
- .tel,
- .place,
- .type,
- .want {
- //margin-top: 24px;
- }
- .textarea {
- width: 72.2vw;
- height: 140px;
- border-radius: 22px;
- background-color: rgba(232, 236, 234, 100);
- margin-top: 12px;
- overflow-y: scroll;
- @include themeify {
- font-size: themed('font-size2');
- line-height: themed('font-size2');
- }
- .uni-textarea-placeholder {
- padding: 12px 20px;
- @include themeify {
- font-size: themed('font-size2');
- line-height: themed('font-size2');
- }
- }
- ::v-deep.uni-textarea-textarea {
- width: 90%;
- padding: 10px 20px;
- }
- ::v-deep.u-input__right-icon {
- display: none;
- }
- }
- }
- .type {
- .checkbox {
- margin-top: 12px;
- ::v-deep.u-checkbox {
- width: 50% !important;
- margin-top: 4px;
- }
- }
- }
- .want {
- ::v-deep.u-checkbox {
- margin-top: 8px;
- }
- }
- .hint {
- margin-top: 12px;
- @include themeify {
- font-size: themed('font-size2');
- line-height: themed('font-size5');
- }
- /*
- font-size: 14px;
- line-height: 20px;
- */
- text-align: center;
- .tel-num {
- color: #9FC7FF;
- }
- }
- ::v-deep.u-btn {
- border-radius: 50px;
- margin-top: 40rpx;
- }
- }
- .InviteFriends {
- //background-image: linear-gradient(0deg, #a2e9c9, #01b963);
- background: #c9382c;
- }
- .opacityClass {
- opacity: 0.2;
- }
- // 底部
- .bottomView {
- border-radius: 50px;
- color: rgba(0, 185, 98, 100);
- // width: 100%;
- // height: 64px;
- // text-align: center;
- // background-color: #fff;
- .button {
- //width: 90%;
- border-radius: 50px;
- // background-color: #fff;
- color: #fff;
- font-size: 16px;
- background: linear-gradient(90deg, rgba(255, 98, 0, 1) 0%, rgba(255, 150, 0, 1) 100%);
- //border: 1px solid rgba(0, 163, 86, 1);
- }
- // button::after {
- // border: rgba(0, 185, 98, 100);
- // }
- }
- .carAuth {
- border-radius: 12px;
- background-color: rgba(255, 255, 255, 1);
- border: 2px dashed rgba(187, 187, 187, 1);
- //height: 400rpx;
- width: 100%;
- overflow: hidden;
- text-align: center;
- .carAuthImg {
- margin-top: 10px;
- margin-bottom: 10px;
- width: 510rpx;
- height: 360rpx;
- }
- .carAuthIcon {
- position: absolute;
- background: #6e7175;
- width: 44px;
- height: 44px;
- border-radius: 50px;
- /* left: 200px; */
- /* top: 200px; */
- margin: 160rpx 230rpx;
- z-index: 99;
- display: flex;
- justify-content: center;
- }
- }
- // .car-type{
- // display: flex;
- // flex-direction: row;
- // margin: 0 40rpx;
- // flex-wrap: wrap;
- // }
- .want {
- .wantView {
- display: flex;
- }
- button {
- width: 45%;
- color: rgba(51, 51, 51, 1);
- background-color: rgba(232, 236, 234, 1);
- }
- button::after {
- border: none;
- }
- .wantBtn {
- background-color: #fff;
- border: 2px solid #00B962;
- }
- .wanttpis {
- position: relative;
- top: -100rpx;
- left: 180rpx;
- z-index: 99;
- background: #00B962;
- padding: 2px 3px;
- font-size: 10px;
- color: #fff;
- border-radius: 4px;
- }
- }
- .carTempBlInput {
- display: flex;
- align-items: center;
- font-size: 16px;
- min-height: 44px;
- padding: 4px 16px;
- border-radius: 20px;
- background: #e9ecea;
- color: #808080
- }
-
- .table {
- table {
- border-spacing:0;
- font-size: 32rpx;
- .th {
- background-color: #f2efef;
- color: #101010;
- font-weight: bold;
- td{
- border: 1px solid #dbdbdb;
-
- }
- }
-
- .td1 {
- text-align: start;
- // background-color: rgba(243, 245, 247, 1);
- width: 212rpx;
-
- border-left: 1px solid #dbdbdb;
- border-right: 1px solid #dbdbdb;
-
- }
- .td3 {
- text-align: start;
- //background-color: rgba(243, 245, 247, 1);
- //width: 100rpx;
-
- border-left: 1px solid #dbdbdb;
- border-right: 1px solid #dbdbdb;
- }
-
- td {
- //text-align: center;
- border-bottom: 1px solid #dbdbdb;
- //width: 160rpx;
- }
- }
-
-
- }
- </style>
|