master
chen 2021-11-16 17:48:58 +08:00
parent a726d7c75b
commit 989a8f0270
27 changed files with 244 additions and 114 deletions

View File

@ -19,6 +19,7 @@
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
<view v-else class="fon24 col3 mar-s20">所有人可买</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>
@ -57,6 +58,7 @@
<image src="/static/public/huiy.png" style="width: 40rpx;height: 33rpx;" mode=""></image>
<view class="fon24 col3 mar-z10">{{item1.level_text}}</view>
</view>
<view v-else class="fon24 col3 mar-s20">所有人可买</view>
</view>
<view v-else>
<span v-if="item1.isPing"></span>

View File

@ -13,7 +13,7 @@
</view>
</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">
<!-- 自定义轮播 -->
@ -33,7 +33,7 @@
</block>
<block v-else>
<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 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>

View File

@ -14,7 +14,7 @@
<!-- 昵称 -->
<view class="disac">
<view class="fon36 bold">{{userInfo.nickname || ''}}</view>
<view class="gao-name">黄金</view>
<view class="gao-name">{{userInfo.level.name}}</view>
</view>
<view class="disac mar-s10" v-if="userPhone!==''">
<image src="/static/public/phone-02.png" class="gao-phone" mode=""></image>
@ -25,7 +25,7 @@
</view>
<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">
<image class="" src="/static/public/next-white.png" mode="aspectFill"></image>
@ -34,7 +34,7 @@
</view>
<view class="disjbac posir mar-s40 fon24 pad-zy50" style="z-index: 1;color: #F8CE59;">
<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>
<navigator url="/pagesA/member/member" hover-class="none">
<view class="disac">
@ -120,7 +120,24 @@
<image :src="myqr" class="person-m" mode="aspectFill"></image>
</view>
<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>
@ -200,7 +217,14 @@
guanggao:'',
userToken:'',
contentVal:'',//
userPhone:''
userPhone:'',
timer:null,
nonce_str:'',
zCustomer:false,
customerImg:'',
customerInfo:'',
times:0,
openSettingBtnHidden: true,//
}
},
onUnload: function() {
@ -254,6 +278,9 @@
}
},error=>{})
},
onUnload() {
this.closeqr();
},
onLoad() {
if(uni.getStorageSync('gao')==''){
const query = wx.createSelectorQuery()
@ -263,9 +290,108 @@
}).exec()
}
this.checkSwi()
this.checkGM()
},
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){
if(index==2){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
},
@ -279,14 +405,33 @@
if(index==6){uni.navigateTo({url:'/pagesA/integralManage/integralManage'})}
if(index==7){uni.navigateTo({url:'/pagesA/signIn/signIn'})}
},
goPageTwo(index){
if(index==0){uni.navigateTo({url:'/pagesA/makeAnPppointment/makeAnPppointment'})}
if(index==1){uni.navigateTo({url:'/pagesB/personalPoster/personalPoster'})}
if(index==2){uni.navigateTo({url:'/pagesB/myCollection/myCollection'})}
if(index==3){uni.navigateTo({url:'/pagesB/sharingCenter/sharingCenter'})}
if(index==4){uni.navigateTo({url:'/pagesB/messagecenter/messagecenter'})}
if(index==5){uni.navigateTo({url:'/pagesA/suggestions/suggestions'})}
if(index==6){uni.navigateTo({url:'/pagesB/aboutUs/aboutUs'})}
goPageTwo(index){//
if(index!=7){
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'
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){
let statusIndex = ''
@ -329,11 +474,18 @@
if(e==0) this.vision = false
},
checkGM(){//
uni.showToast({
title:'正在生成二维码',
icon:'none',
duration:100000
})
this.$requst.post('user/personal-qr').then(res=>{
// console.log('',res);
if(res.code==0){
this.nonce_str = res.data.nonce_str;
base64ToPath(res.data.qr).then(path => {
this.myqr = path
uni.hideToast();
uni.setStorageSync('imgSrc',path)
}).catch(error => {})
}
@ -357,10 +509,8 @@
this.is_doctor = res.data.is_doctor;//01
this.is_servicer = res.data.is_servicer;//01
this.is_staff = res.data.is_staff;//01
if(res.data.is_staff==1){
if(this.toolsList.length!=8){
this.toolsList.push({src:'/static/public/aboutus.png',title:'客服二维码',num:''})
}
if(res.data.customer_service!=0 && this.toolsList.length==7){
this.toolsList.push({src:'/static/public/customer-check.png',title:'专属客服',num:''})
}
uni.setStorageSync('shareAll',res.data)
if(res.data.rules.length!=0){
@ -371,21 +521,6 @@
}
},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){//
// console.log('',this.yuanList[index].title);
if(this.yuanList[index].title=='客户列表') {
@ -406,11 +541,13 @@
scanType: ['qrCode'], // scanType :
success: (rt) => { //
if(rt.result.slice(0,1)=='{'){
let uc = JSON.parse(rt.result).user_coding
this.$requst.post('user/sign-in',{user_coding:uc}).then(res=>{
let uc = JSON.parse(rt.result).user_coding;
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);
if(res.code==0){
this.isQian = true
this.isQian = true;
this.contentVal = "签到成功";
setTimeout(()=>{
this.isQian = false

View File

@ -185,60 +185,31 @@
this.isAutoPlay = true;
},
onShareAppMessage(res) {
console.log(uni.getStorageSync('invite_code'));
var ya = this;
this.$requst.post('user/record',{type:'content',action:'share'}).then(res=>{console.log('分享成功:',res);},error=>{})
let maiOjb = {
e:0,//
c:this.detailObj.id*1,
e:6,//
t:new Date().getTime()//
}
this.$toolAll.tools.maiDian(maiOjb)
var shareObj = {
     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')}`, // /
     imageUrl: ya.$http + ya.detailObj.share_img//PNGJPG imageUrl 使 5:4
     path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}}` // 默认是当前页面,必须是以‘/开头的完整路径
  };
  return shareObj;
},
onLoad(options) {
//
// 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({
provider: 'weixin',
success: (res)=> {
var params = ''
if(obj.channel!='' && obj.channel!=undefined){
params = {
code:res.code,
channel:obj.channel,
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 => {})
}
},
});
if (options.invite_code!=undefined) {
uni.login({
provider: 'weixin',
success: (res)=> {
var params = {
code:res.code,
invite_code:options.invite_code,//
}
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {})
},
});
}
const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => {

View File

@ -25,7 +25,7 @@
</view>
<!-- 功能列表 -->
<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 class="disac fc">
<image :src="itemh.src" style="width: 50rpx;height: 50rpx;" mode="aspectFill"></image>

View File

@ -30,7 +30,7 @@
<!-- 获取列表提现列表 -->
<view class="pad-zy30">
<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>
<view class="fon26 col3">{{item.title}}</view>
@ -39,6 +39,7 @@
<view class="fon36 bold pcol">+{{item.num}}</view>
</view>
</scroll-view>
<view v-else class="fon24 col6 tc pad-s50">暂无签到记录</view>
</view>
</view>
</view>
@ -106,7 +107,7 @@
this.dataList.push(obj);
})
}
} else this.$toolAll.tools.showToast(res.msg);
}
})
},
checkList(){

View File

@ -140,9 +140,23 @@
colorDark: '#000000',
colorLight: '#ffffff',
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() {
this.closeEv();
},
@ -193,6 +207,7 @@
closeEv(){
this.isHeyan = false;
clearInterval(this.timer);
clearInterval(this.timerDao);
},
cancleEv(){//
this.times++;
@ -262,14 +277,18 @@
this.allPrice = this.allPrice;
}
this.orderInfo = narr;
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
this.timerDao = setInterval(()=>{
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
this.checkInfo(this.orderInfo.id);
} else {
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
}
},1000)
if(this.orderInfo.group_make_end_at!=null){
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
console.log(daoTime);
this.timerDao = setInterval(()=>{
if(new Date().getTime()-new Date().getTime(this.orderInfo.group_make_end_at)>0){
this.checkInfo(this.orderInfo.id);
clearInterval(this.timerDao)
} else {
this.daoTime = this.$toolAll.tools.dayTime(this.orderInfo.group_make_end_at,new Date().getTime());
}
},1000)
}
let naddress = this.orderInfo.address.split(',');
if(naddress[0]!='自提'){
let nphone = this.$toolAll.tools.hideMPhone(naddress[1].trim())

View File

@ -29,8 +29,8 @@
<view class="fon24 col7D">无任何额外消费</view>
<!-- 团购商品详情时显示 -->
<view v-if="isNei==0" class="disjbac fon24 mar-s20 col7D">
<view>团购累计参与人员300</view>
<view>还剩余60</view>
<view>团购累计参与人员{{detailObj.activity_order_num}}</view>
<view>还剩余{{detailObj.group_surplus_num}}</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-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