123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <template>
- <view class="content">
- <text class="success-icon iconfont iconroundcheck"></text>
- <text class="tit">支付成功</text>
- <view class="btn-group">
- <navigator url="/pages/order/order?state=1" open-type="redirect" class="mix-btn">查看订单</navigator>
- <navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
- <!-- <navigator v-if="showPink" @click="goShare" open-type="redirect" class="mix-btn hollow">马上分享</navigator> -->
- </view>
- </view>
- </template>
- <script>
- import { allow} from '@/api/user.js';
- import { orderDetail } from '@/api/order.js';
- export default {
- data() {
- return {
- orderId:'',
- showPink: false, // 是否为拼团
- goodsDetail: {},
- pinkUser: '' //是否为团长
- }
- },
- onLoad(opt) {
- console.log(opt)
- // 保存订单号
- this.orderId = opt.orderId;
- if (opt.pink) {
- this.showPink = true;
- }
- this.pinkUser = opt.pinkUser
- if (opt.orderId) {
- orderDetail({}, opt.orderId).then(e => {
- this.goodsDetail = e.data;
- // setTimeout(e => {
- // if (opt.pink) {
- // uni.navigateTo({
- // url: '/pages/groupBooking/groupdetails?id=' + (this.goodsDetail.pink_id || '')
- // });
- // }
- // }, 1500);
- });
- }
- if(opt.pink){
-
- }else{
- this.loadDate();
- }
- },
- methods: {
- goShare() {
- uni.navigateTo({
- url: '/pages/groupBooking/groupdetails?id='+ this.goodsDetail.pink_id + '&pinkUser=' + this.pinkUser + '&order_id=' + this.orderId
- })
- },
- loadDate(){
- let obj = this;
- allow({})
- .then(function(e) {
- let isShow = e.data.allow;
- if(isShow == false){
-
- }else{
- uni.showModal({
- title: '提示',
- content: '您今天有赠品需要领取嘛?',
- success: function (res) {
- if (res.confirm) {
- uni.navigateTo({
- url: `/pages/product/Gift?orderId=`+obj.orderId
- });
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- })
- .catch(function(e) {
- console.log(e);
- });
- },
- }
- }
- </script>
- <style lang='scss'>
- .content{
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .success-icon{
- font-size: 160upx;
- color: #5dbc7c;
- margin-top: 100upx;
- }
- .tit{
- font-size: 38upx;
- color: #303133;
- }
- .btn-group{
- padding-top: 100upx;
- }
- .mix-btn {
- margin-top: 30upx;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 600upx;
- height: 80upx;
- font-size: $font-lg;
- color: #fff;
- background-color: $base-color;
- border-radius: 10upx;
- &.hollow{
- background: #fff;
- color: #303133;
- border: 1px solid #ccc;
- }
- }
- </style>
|