master
parent
a726d7c75b
commit
989a8f0270
|
@ -19,6 +19,7 @@
|
||||||
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
||||||
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="fon24 col3 mar-s20">所有人可买</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<span v-if="item1.isPing">拼团价</span>
|
<span v-if="item1.isPing">拼团价</span>
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
|
||||||
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="fon24 col3 mar-s20">所有人可买</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<span v-if="item1.isPing">拼团价</span>
|
<span v-if="item1.isPing">拼团价</span>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view :style="{width:cateW+'px'}" class="flexs" style="height: 10px;"></view>
|
<view :style="{width:cateW+'px'}" class="flexs" style="height: 10px;"></view>
|
||||||
<view v-show="isLoading" class="width100 pad-x260">
|
<view v-show="isLoading" class="pad-x260" style="width: 74%;">
|
||||||
<!-- 热门推荐 -->
|
<!-- 热门推荐 -->
|
||||||
<template v-if="ccurrent==0">
|
<template v-if="ccurrent==0">
|
||||||
<!-- 自定义轮播 -->
|
<!-- 自定义轮播 -->
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view v-if="dataShopList.length!=0" style="margin-top: -20rpx;">
|
<view v-if="dataShopList.length!=0" style="margin-top: -20rpx;">
|
||||||
<view class="pad-sx20 pad-z20">
|
<view class="pad-sx20">
|
||||||
<view style="width: 48.6%;float: left;">
|
<view style="width: 48.6%;float: left;">
|
||||||
<view v-if="index1%2==0" v-for="(item1,index1) in dataShopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
|
<view v-if="index1%2==0" v-for="(item1,index1) in dataShopList" :key="index1" class="bacf radius15 mar-x20 animated fadeIn posir" @tap="goPage(item1.id,index1)">
|
||||||
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
<image :src="item1.imgSrc" mode="aspectFill" style="width: 100%;border-top-left-radius: 15rpx;border-top-right-radius: 15rpx;height: 325rpx;"></image>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<!-- 昵称 -->
|
<!-- 昵称 -->
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
|
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
|
||||||
<view class="gao-name">黄金</view>
|
<view class="gao-name">{{userInfo.level.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disac mar-s10" v-if="userPhone!==''">
|
<view class="disac mar-s10" v-if="userPhone!==''">
|
||||||
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
|
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="mar-y25 disac">
|
<view class="mar-y25 disac">
|
||||||
<!-- 二维码 -->
|
<!-- 二维码 -->
|
||||||
<image @tap="isQrcode=true" src="/static/public/staff-qro.png" class="gao-m" mode=""></image>
|
<image @tap="tuneUpqr" src="/static/public/staff-qro.png" class="gao-m" mode=""></image>
|
||||||
<!-- 前进键 -->
|
<!-- 前进键 -->
|
||||||
<view @tap="goNodifyData" class="disac gao-next-box">
|
<view @tap="goNodifyData" class="disac gao-next-box">
|
||||||
<image class="" src="/static/public/next-white.png" mode="aspectFill"></image>
|
<image class="" src="/static/public/next-white.png" mode="aspectFill"></image>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
|
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
|
||||||
<view>
|
<view>
|
||||||
<view class="disac"><span class="bold mar-y20">VIP</span>黄金会员</view>
|
<view class="disac"><span class="bold mar-y20">VIP</span>{{userInfo.level.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator url="/pagesA/member/member" hover-class="none">
|
<navigator url="/pagesA/member/member" hover-class="none">
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
|
@ -120,7 +120,24 @@
|
||||||
<image :src="myqr" class="person-m" mode="aspectFill"></image>
|
<image :src="myqr" class="person-m" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjcac">
|
<view class="disjcac">
|
||||||
<image @tap="isQrcode=false" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
|
<image @tap="closeqr" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 专属客服 -->
|
||||||
|
<view v-if="zCustomer" class="posAll disjcac">
|
||||||
|
<view>
|
||||||
|
<view class="bacf radius20 pad-sx40" style="">
|
||||||
|
<view class="fon32 bold col3 tc pad-x40" v-if="customerInfo.service_name!=''">我的专属客服</view>
|
||||||
|
<view class="fon24 col3 disjb mar20" v-if="customerInfo.service_name!=''">客服名称:{{customerInfo.service_name}}</view>
|
||||||
|
<view class="fon24 col3 disjb mar20" v-if="customerInfo.service_phone!=''">客服手机号:{{customerInfo.service_phone}}<span @tap="countCustomer(customerInfo.service_phone)" class="pcol">联系客服</span></view>
|
||||||
|
<view class="fon24 col3 disjb mar20" v-if="customerInfo.service_wechat!=''">客服微信号:{{customerInfo.service_wechat}}<span @tap="copyWechat" class="pcol">复制</span></view>
|
||||||
|
<image v-if="customerImg!=''" :src="customerImg" class="person-m" style="margin-bottom: 40rpx;" mode="aspectFill"></image>
|
||||||
|
<view class="fon28 colf tc radius10" @tap="saveImg" style="width: 200rpx; padding: 16rpx;background-color: #38CE51;margin: 0 auto;">保存</view>
|
||||||
|
<view class="fon24 col9 tc pad-s40" v-if="customerInfo.service_phone==''">暂无专属客服</view>
|
||||||
|
</view>
|
||||||
|
<view class="disjcac">
|
||||||
|
<image @tap="closeCustomer" class="mar-s50 close-m" src="/static/public/qrcodec.png" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -200,7 +217,14 @@
|
||||||
guanggao:'',
|
guanggao:'',
|
||||||
userToken:'',
|
userToken:'',
|
||||||
contentVal:'',//扫码后的提示内容
|
contentVal:'',//扫码后的提示内容
|
||||||
userPhone:''
|
userPhone:'',
|
||||||
|
timer:null,
|
||||||
|
nonce_str:'',
|
||||||
|
zCustomer:false,
|
||||||
|
customerImg:'',
|
||||||
|
customerInfo:'',
|
||||||
|
times:0,
|
||||||
|
openSettingBtnHidden: true,//是否授权
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {
|
||||||
|
@ -254,6 +278,9 @@
|
||||||
}
|
}
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.closeqr();
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
if(uni.getStorageSync('gao')==''){
|
if(uni.getStorageSync('gao')==''){
|
||||||
const query = wx.createSelectorQuery()
|
const query = wx.createSelectorQuery()
|
||||||
|
@ -263,9 +290,108 @@
|
||||||
}).exec()
|
}).exec()
|
||||||
}
|
}
|
||||||
this.checkSwi()
|
this.checkSwi()
|
||||||
this.checkGM()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
countCustomer(phone){//拨打电话
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
if(res.platform=='ios'){
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber:phone,
|
||||||
|
success: () => {},
|
||||||
|
fail: () => {}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showActionSheet({
|
||||||
|
itemList:[phone,'呼叫'],
|
||||||
|
itemColor:'#3875F6',
|
||||||
|
success: (res) => {
|
||||||
|
if(res.tapIndex==1){
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber:phone
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
copyWechat(){//复制微信号
|
||||||
|
if(this.times==0){
|
||||||
|
this.times++;
|
||||||
|
this.$toolAll.tools.clickCopy(this.customerInfo.service_wechat);
|
||||||
|
this.$toolAll.tools.showToast('复制成功');
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.times = 0;
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
saveImg(e){//保存二维码
|
||||||
|
//获取相册授权
|
||||||
|
uni.getSetting({
|
||||||
|
success:(res)=> {
|
||||||
|
if (!res.authSetting['scope.writePhotosAlbum']) {
|
||||||
|
uni.authorize({
|
||||||
|
scope: 'scope.writePhotosAlbum',
|
||||||
|
success:()=> {
|
||||||
|
//这里是用户同意授权后的回调
|
||||||
|
this.saveImgToLocal();
|
||||||
|
},
|
||||||
|
fail:()=> {//这里是用户拒绝授权后的回调
|
||||||
|
this.openSettingBtnHidden=false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {//用户已经授权过了
|
||||||
|
this.saveImgToLocal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
saveImgToLocal(){//保存图片
|
||||||
|
this.$toolAll.tools.showToast('正在保存','loading');
|
||||||
|
uni.downloadFile({
|
||||||
|
url: this.customerImg,//图片地址
|
||||||
|
success: (res) =>{
|
||||||
|
if (res.statusCode === 200){
|
||||||
|
uni.saveImageToPhotosAlbum({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
success: ()=> {
|
||||||
|
this.$toolAll.tools.showToast('保存成功');
|
||||||
|
},
|
||||||
|
fail: ()=> {
|
||||||
|
this.$toolAll.tools.showToast('保存失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tuneUpqr(){//调起二维码弹框
|
||||||
|
this.isQrcode = true;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.myqr = '';
|
||||||
|
this.nonce_str='';
|
||||||
|
this.checkGM();
|
||||||
|
this.timer = setInterval(()=>{
|
||||||
|
if(this.nonce_str!=''){
|
||||||
|
this.$requst.post('user/check-scan',{nonce_str:this.nonce_str}).then(res=>{
|
||||||
|
if(res.code==0){
|
||||||
|
if(res.data.result==1){
|
||||||
|
this.$toolAll.tools.showToast('已签到');
|
||||||
|
this.isQrcode = false;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},3000)
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.isQrcode = false;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
},60000)
|
||||||
|
},
|
||||||
|
closeqr(){
|
||||||
|
this.isQrcode = false;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
},
|
||||||
chooseone(index){
|
chooseone(index){
|
||||||
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
||||||
},
|
},
|
||||||
|
@ -279,14 +405,33 @@
|
||||||
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
|
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
|
||||||
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
|
||||||
},
|
},
|
||||||
goPageTwo(index){
|
goPageTwo(index){//自助预约、个人海报、收藏、分享中心、消息通知、投诉与建议、关于我们、专属客服
|
||||||
if(index==0){uni.navigateTo({url:'/pagesA/makeAnPppointment/makeAnPppointment'})}
|
if(index!=7){
|
||||||
if(index==1){uni.navigateTo({url:'/pagesB/personalPoster/personalPoster'})}
|
let newUrl = ''
|
||||||
if(index==2){uni.navigateTo({url:'/pagesB/myCollection/myCollection'})}
|
if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
|
||||||
if(index==3){uni.navigateTo({url:'/pagesB/sharingCenter/sharingCenter'})}
|
if(index==1) newUrl = '/pagesB/personalPoster/personalPoster'
|
||||||
if(index==4){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter'})}
|
if(index==2) newUrl = '/pagesB/myCollection/myCollection'
|
||||||
if(index==5){uni.navigateTo({url:'/pagesA/suggestions/suggestions'})}
|
if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter'
|
||||||
if(index==6){uni.navigateTo({url:'/pagesB/aboutUs/aboutUs'})}
|
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
|
||||||
|
if(index==5) newUrl = '/pagesA/suggestions/suggestions'
|
||||||
|
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs'
|
||||||
|
uni.navigateTo({
|
||||||
|
url:newUrl
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$requst.post('user/my-service').then(res=>{
|
||||||
|
if(res.code==0){
|
||||||
|
this.customerInfo = res.data;
|
||||||
|
if(this.customerInfo.service_qr!=''){
|
||||||
|
this.customerImg = this.$http + this.customerInfo.service_qr;
|
||||||
|
}
|
||||||
|
this.zCustomer = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeCustomer(){
|
||||||
|
this.zCustomer = false;
|
||||||
},
|
},
|
||||||
chooseOrderStatus(index){
|
chooseOrderStatus(index){
|
||||||
let statusIndex = ''
|
let statusIndex = ''
|
||||||
|
@ -329,11 +474,18 @@
|
||||||
if(e==0) this.vision = false
|
if(e==0) this.vision = false
|
||||||
},
|
},
|
||||||
checkGM(){//查询个人二维码事件
|
checkGM(){//查询个人二维码事件
|
||||||
|
uni.showToast({
|
||||||
|
title:'正在生成二维码',
|
||||||
|
icon:'none',
|
||||||
|
duration:100000
|
||||||
|
})
|
||||||
this.$requst.post('user/personal-qr').then(res=>{
|
this.$requst.post('user/personal-qr').then(res=>{
|
||||||
// console.log('个人二维码:',res);
|
// console.log('个人二维码:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
|
this.nonce_str = res.data.nonce_str;
|
||||||
base64ToPath(res.data.qr).then(path => {
|
base64ToPath(res.data.qr).then(path => {
|
||||||
this.myqr = path
|
this.myqr = path
|
||||||
|
uni.hideToast();
|
||||||
uni.setStorageSync('imgSrc',path)
|
uni.setStorageSync('imgSrc',path)
|
||||||
}).catch(error => {})
|
}).catch(error => {})
|
||||||
}
|
}
|
||||||
|
@ -357,10 +509,8 @@
|
||||||
this.is_doctor = res.data.is_doctor;//是否为医生,0否,1是
|
this.is_doctor = res.data.is_doctor;//是否为医生,0否,1是
|
||||||
this.is_servicer = res.data.is_servicer;//是否为客服,0否,1是
|
this.is_servicer = res.data.is_servicer;//是否为客服,0否,1是
|
||||||
this.is_staff = res.data.is_staff;//是否为普通员工,0否,1是
|
this.is_staff = res.data.is_staff;//是否为普通员工,0否,1是
|
||||||
if(res.data.is_staff==1){
|
if(res.data.customer_service!=0 && this.toolsList.length==7){
|
||||||
if(this.toolsList.length!=8){
|
this.toolsList.push({src:'/static/public/customer-check.png',title:'专属客服',num:''})
|
||||||
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
uni.setStorageSync('shareAll',res.data)
|
uni.setStorageSync('shareAll',res.data)
|
||||||
if(res.data.rules.length!=0){
|
if(res.data.rules.length!=0){
|
||||||
|
@ -371,21 +521,6 @@
|
||||||
}
|
}
|
||||||
},error=>{})
|
},error=>{})
|
||||||
},
|
},
|
||||||
chooseItem(index){//列表事件
|
|
||||||
// console.log('当前选项:',this.toolsList[index].title);
|
|
||||||
let newUrl = ''
|
|
||||||
if(index==0) newUrl = '/pagesA/makeAnPppointment/makeAnPppointment'
|
|
||||||
if(index==1) newUrl = '/pagesB/personalPoster/personalPoster'
|
|
||||||
if(index==2) newUrl = '/pagesB/myCollection/myCollection'
|
|
||||||
if(index==3) newUrl = '/pagesB/sharingCenter/sharingCenter'
|
|
||||||
if(index==4) newUrl = '/pagesB/messagecenter/messagecenter'
|
|
||||||
if(index==5) newUrl = '/pagesA/suggestions/suggestions'
|
|
||||||
if(index==6) newUrl = '/pagesB/aboutUs/aboutUs'
|
|
||||||
if(index==7) newUrl = '/pagesB/customer/customer'
|
|
||||||
uni.navigateTo({
|
|
||||||
url:newUrl
|
|
||||||
})
|
|
||||||
},
|
|
||||||
chooseYitem(index){//员工功能事件
|
chooseYitem(index){//员工功能事件
|
||||||
// console.log('当前选项:',this.yuanList[index].title);
|
// console.log('当前选项:',this.yuanList[index].title);
|
||||||
if(this.yuanList[index].title=='客户列表') {
|
if(this.yuanList[index].title=='客户列表') {
|
||||||
|
@ -406,11 +541,13 @@
|
||||||
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
scanType: ['qrCode'], // scanType:扫码类型 : 二维码
|
||||||
success: (rt) => { // 接口调用成功的回调函数
|
success: (rt) => { // 接口调用成功的回调函数
|
||||||
if(rt.result.slice(0,1)=='{'){
|
if(rt.result.slice(0,1)=='{'){
|
||||||
let uc = JSON.parse(rt.result).user_coding
|
let uc = JSON.parse(rt.result).user_coding;
|
||||||
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
|
let ns = JSON.parse(rt.result).nonce_str;//随机码
|
||||||
|
console.log(rt);
|
||||||
|
this.$requst.post('user/sign-in',{user_coding:uc,nonce_str:ns}).then(res=>{
|
||||||
// console.log('执行扫码事件:',res);
|
// console.log('执行扫码事件:',res);
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.isQian = true
|
this.isQian = true;
|
||||||
this.contentVal = "签到成功";
|
this.contentVal = "签到成功";
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.isQian = false
|
this.isQian = false
|
||||||
|
|
|
@ -185,58 +185,29 @@
|
||||||
this.isAutoPlay = true;
|
this.isAutoPlay = true;
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
|
console.log(uni.getStorageSync('invite_code'));
|
||||||
var ya = this;
|
var ya = this;
|
||||||
this.$requst.post('user/record',{type:'content',action:'share'}).then(res=>{console.log('分享成功:',res);},error=>{})
|
|
||||||
let maiOjb = {
|
let maiOjb = {
|
||||||
e:0,//内容分享
|
e:6,//内容分享
|
||||||
c:this.detailObj.id*1,
|
|
||||||
t:new Date().getTime()//当前时间戳
|
t:new Date().getTime()//当前时间戳
|
||||||
}
|
}
|
||||||
this.$toolAll.tools.maiDian(maiOjb)
|
this.$toolAll.tools.maiDian(maiOjb)
|
||||||
var shareObj = {
|
var shareObj = {
|
||||||
title: '成都恒美毛发', // 默认是小程序的名称(可以写slogan等)
|
title: '成都恒美毛发', // 默认是小程序的名称(可以写slogan等)
|
||||||
path: `/pagesB/problemDetail/problemDetail?id=${this.detailObj.id}&category_id=${this.category_id}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}}` // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
imageUrl: ya.$http + ya.detailObj.share_img//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
|
||||||
};
|
};
|
||||||
return shareObj;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
// 模拟首次加载列表数据
|
if (options.invite_code!=undefined) {
|
||||||
// setTimeout(()=>{
|
|
||||||
// // this.list = list;
|
|
||||||
// this.$refs.wfalls.init();
|
|
||||||
// },1000)
|
|
||||||
if (options && options.q) {
|
|
||||||
let arr = decodeURIComponent(options.q).split('?')[1].split('&')
|
|
||||||
let obj = {}
|
|
||||||
arr.forEach(item => {
|
|
||||||
let brr = item.split('=')
|
|
||||||
obj[brr[0]] = brr[1]
|
|
||||||
})
|
|
||||||
console.log(obj);
|
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (res)=> {
|
success: (res)=> {
|
||||||
var params = ''
|
var params = {
|
||||||
if(obj.channel!='' && obj.channel!=undefined){
|
|
||||||
params = {
|
|
||||||
code:res.code,
|
code:res.code,
|
||||||
channel:obj.channel,
|
invite_code:options.invite_code,//用户邀请码
|
||||||
source_code:obj.source_code
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(obj.invite_code!='' && obj.invite_code!=undefined){
|
|
||||||
params = {
|
|
||||||
code:res.code,
|
|
||||||
invite_code:obj.invite_code,//用户邀请码
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(obj.coding!='' && obj.coding!=undefined){
|
|
||||||
params = {service_coding:obj.coding}
|
|
||||||
this.$requst.post('user/bind-service',params).then(res => {console.log('调用成功');},error => {})
|
|
||||||
} else {
|
|
||||||
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
|
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- 功能列表 -->
|
<!-- 功能列表 -->
|
||||||
<view class="bacf radius20 mar-s20">
|
<view class="bacf radius20 mar-s20">
|
||||||
<view class="disac fon28 fw pad-x20" style="color: #C27417;">
|
<view v-if="levelInfo.level.name!='普通会员'" class="disac fon28 fw pad-x20" style="color: #C27417;">
|
||||||
<view v-if="levelInfo.level.rights[indexh]==itemh.ntype" v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;">
|
<view v-if="levelInfo.level.rights[indexh]==itemh.ntype" v-for="(itemh,indexh) in huiList" :key="indexh" class="mar-s20" style="width: 25%;">
|
||||||
<view class="disac fc">
|
<view class="disac fc">
|
||||||
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>
|
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<!-- 获取列表,提现列表 -->
|
<!-- 获取列表,提现列表 -->
|
||||||
<view class="pad-zy30">
|
<view class="pad-zy30">
|
||||||
<view class="bacf pad-zy20 pad-x20 radius20">
|
<view class="bacf pad-zy20 pad-x20 radius20">
|
||||||
<scroll-view scroll-y="true" >
|
<scroll-view scroll-y="true" v-if="dataList.length!=0">
|
||||||
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
<view v-for="(item,index) in dataList" :key="index" class="disjbac bbot pad-sx10">
|
||||||
<view>
|
<view>
|
||||||
<view class="fon26 col3">{{item.title}}</view>
|
<view class="fon26 col3">{{item.title}}</view>
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
<view class="fon36 bold pcol">+{{item.num}}</view>
|
<view class="fon36 bold pcol">+{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
<view v-else class="fon24 col6 tc pad-s50">暂无签到记录</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -106,7 +107,7 @@
|
||||||
this.dataList.push(obj);
|
this.dataList.push(obj);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else this.$toolAll.tools.showToast(res.msg);
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkList(){
|
checkList(){
|
||||||
|
|
|
@ -140,9 +140,23 @@
|
||||||
colorDark: '#000000',
|
colorDark: '#000000',
|
||||||
colorLight: '#ffffff',
|
colorLight: '#ffffff',
|
||||||
timer:null,
|
timer:null,
|
||||||
daoTime:''
|
daoTime:'',
|
||||||
|
timerDao:null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShareAppMessage(res) {
|
||||||
|
var ya = this;
|
||||||
|
let maiOjb = {
|
||||||
|
e:6,//内容分享
|
||||||
|
t:new Date().getTime()//当前时间戳
|
||||||
|
}
|
||||||
|
this.$toolAll.tools.maiDian(maiOjb)
|
||||||
|
var shareObj = {
|
||||||
|
title: '成都恒美毛发', // 默认是小程序的名称(可以写slogan等)
|
||||||
|
path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}}` // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||||
|
};
|
||||||
|
return shareObj;
|
||||||
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
this.closeEv();
|
this.closeEv();
|
||||||
},
|
},
|
||||||
|
@ -193,6 +207,7 @@
|
||||||
closeEv(){
|
closeEv(){
|
||||||
this.isHeyan = false;
|
this.isHeyan = false;
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
|
clearInterval(this.timerDao);
|
||||||
},
|
},
|
||||||
cancleEv(){//取消订单
|
cancleEv(){//取消订单
|
||||||
this.times++;
|
this.times++;
|
||||||
|
@ -262,14 +277,18 @@
|
||||||
this.allPrice = this.allPrice;
|
this.allPrice = this.allPrice;
|
||||||
}
|
}
|
||||||
this.orderInfo = narr;
|
this.orderInfo = narr;
|
||||||
|
if(this.orderInfo.group_make_end_at!=null){
|
||||||
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
||||||
|
console.log(daoTime);
|
||||||
this.timerDao = setInterval(()=>{
|
this.timerDao = setInterval(()=>{
|
||||||
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
|
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
|
||||||
this.checkInfo(this.orderInfo.id);
|
this.checkInfo(this.orderInfo.id);
|
||||||
|
clearInterval(this.timerDao)
|
||||||
} else {
|
} else {
|
||||||
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
|
||||||
}
|
}
|
||||||
},1000)
|
},1000)
|
||||||
|
}
|
||||||
let naddress = this.orderInfo.address.split(',');
|
let naddress = this.orderInfo.address.split(',');
|
||||||
if(naddress[0]!='自提'){
|
if(naddress[0]!='自提'){
|
||||||
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())
|
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
<view class="fon24 col7D">无任何额外消费</view>
|
<view class="fon24 col7D">无任何额外消费</view>
|
||||||
<!-- 团购商品详情时显示 -->
|
<!-- 团购商品详情时显示 -->
|
||||||
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
|
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
|
||||||
<view>团购累计参与人员:300人</view>
|
<view>团购累计参与人员:{{detailObj.activity_order_num}}人</view>
|
||||||
<view>还剩余:60人</view>
|
<view>还剩余:{{detailObj.group_surplus_num}}人</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">团购价:</span><span v-if="isNei==1">拼团价:</span>¥{{detailObj.price/100}} <span v-if="isNei!=10">¥{{detailObj.original_price/100}}</span></view>
|
<view class="mar-s20 shop-price" v-if="isNei!=3"><span v-if="isNei==0">团购价:</span><span v-if="isNei==1">拼团价:</span>¥{{detailObj.price/100}} <span v-if="isNei!=10">¥{{detailObj.original_price/100}}</span></view>
|
||||||
<view class="mar-s20 shop-price" v-else>积分:{{detailObj.score}}</view>
|
<view class="mar-s20 shop-price" v-else>积分:{{detailObj.score}}</view>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue