123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <template name="alert">
- <view class="alert spec" :class="specClass">
- <!-- 运费弹窗说明 -->
- <view class="freight-alert" @click.stop="hideConfirm">
- <view class="content clearfix">
- <view class="text-content">
- <view class="text-t">
- <text class="text-a">您的分享码:</text>
- <text class="text-c">{{shareCode}}</text>
- <text class="clipboard" @click.stop="clipboard(shareCode)">复制</text>
- </view>
- <view class="text-h1">有效期为72小时,分享后对方需要输入分享码才能查看订单。</view>
- </view>
- <view class="text-btn">
- <!-- #ifdef MP-WEIXIN -->
- <button class="btn" open-type="share" @click="btnConfirm(shareCode)">去分享</button>
- <!-- #endif -->
- <view class="btn-none" @click.stop="hideConfirm(shareCode)">取消</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- const thorui = require("@/components/clipboard/clipboard.thorui.js")
- export default{
- name:'alert',
- props:{
- orderID:{
- type:Number
- }
- },
- data() {
- return{
- shareCode:'',
- }
- },
- created() {
- this.getShareCode(this.orderID)
- },
- onLoad(){
-
- },
- methods:{
- getShareCode(data){
- this.OrderService.QueryOrderShareCode({orderId:data}).then(response =>{
- this.shareCode = response.data
- this.$parent.shareCode = this.shareCode;
- }).catch(error =>{
- this.$parent.isShareModal = false;
- this.$util.modal('提示',error.msg,'确定','',false,() =>{})
- })
- },
- clipboard(data) {
- thorui.getClipboardData(data, (res) => {
- if (res) {
- this.$util.msg("复制成功",2000,true,'success');
- } else {
- this.$util.msg("复制失败",2000,true,'none');
- }
- })
- },
- hideConfirm(){
- this.$parent.isShareModal = false
- },
- btnConfirm(code){//点击事件
- this.$emit('btnConfirm')
- }
- },
- onShow(){
-
- }
- }
- </script>
- <style lang="scss">
- /*弹窗*/
- .model-warp.none{
- display: none;
- }
- .model-warp.show{
- display: block;
- }
- .freight-alert{
- width: 100%;
- height: 100%;
- background: rgba(0,0,0,.5);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 8888;
- transition: all 0.4s;
- &.none{
- display: none;
- }
- &.show{
- display: block;
- }
- .content{
- width: 580rpx;
- height: 630rpx;
- position: absolute;
- background: url(https://static.caimei365.com/app/wisa/img/icon/dd_pop.png) no-repeat;
- background-size: cover;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- margin: auto;
- padding:0 24rpx 20rpx 24rpx;
- box-sizing: border-box;
- border-radius: 12rpx;
- .text-content{
- width: 100%;
- height: auto;
- margin-top: 210rpx;
- .text-t{
- font-size: $font-size-28;
- color: $text-color;
- text-align: left;
- line-height: 80rpx;
- display: inline-block;
- .text-a{
- display: inline-block;
- float: left;
- }
- .text-c{
- font-size: $font-size-44;
- color: #c4761f;
- text-align: center;
- line-height: 80rpx;
- display: inline-block;
- float: left;
- }
- .clipboard{
- width: 84rpx;
- height: 36rpx;
- background: #EFEFEF;
- text-align: center;
- font-size: $font-size-24;
- color: #999999;
- border-radius: 4rpx;
- line-height: 36rpx;
- display: inline-block;
- float: left;
- margin: 20rpx 0 0 20rpx;
- }
- }
- .text-h1{
- line-height: 40rpx;
- font-size: $font-size-28;
- color: $text-color;
- text-align: justify;
- }
- }
- .text-btn{
- width: 100%;
- height: auto;
- margin-top: 40rpx;
- .btn{
- width: 80%;
- height: 70rpx;
- margin: 0 auto;
- background: $btn-confirm;
- line-height: 70rpx;
- font-size: $font-size-28;
- text-align: center;
- color: #FFFFFF;
- border-radius: 35rpx;
- padding: 0;
- }
- .btn-none{
- width: 100%;
- height: 70rpx;
- float: left;
- line-height: 70rpx;
- font-size: $font-size-28;
- text-align: center;
- color: #666666;
- padding: 0;
- }
- }
- }
- }
-
- </style>
|