jyt 2 лет назад
Родитель
Сommit
b4cef2d6b6
5 измененных файлов: 66 добавлений и 50 удалений
  1. +13
    -12
      pages/index/consumer/index.vue
  2. +32
    -7
      pages/index/learning.vue
  3. +7
    -20
      pages/mine/registerCode.vue
  4. +12
    -9
      pages/mine/registerForm.vue
  5. +2
    -2
      utils/domain.js

+ 13
- 12
pages/index/consumer/index.vue Просмотреть файл

@@ -396,6 +396,18 @@
this.isnorefresh = 'refresh';
this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
console.log(this.userInfo.showPhoneStatus)
if (this.isnorefresh == 'refresh') {
this.buildingID = uni.getStorageSync('buildingID').id;
this.nextPage = 1;
this.recordList = []
// this.getMyCustom()
this.getFreeList()
this.getfindKeywordsList()
this.getFromSource();
// this.isnorefresh = '';
this.isRefresh = false;
this.getMyCustom()
}
},
onPullDownRefresh() {
@@ -417,18 +429,7 @@
let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
this.permissions.commonly1 = newmenulist.khgl_ck;
this.permissions.commonly2 = newmenulist.khgl_gj;
if (this.isnorefresh == 'refresh') {
this.buildingID = uni.getStorageSync('buildingID').id;
this.nextPage = 1;
this.recordList = []
// this.getMyCustom()
this.getFreeList()
this.getfindKeywordsList()
this.getFromSource();
// this.isnorefresh = '';
this.isRefresh = false;
this.getMyCustom()
}
},
onReachBottom() {
if (this.totalRecord == this.nextPage) {


+ 32
- 7
pages/index/learning.vue Просмотреть файл

@@ -168,10 +168,21 @@
var i = uni.getStorageSync('fendianindex')
this.buildingID = uni.getStorageSync('buildingID').id;
this.clocktab(i)
this.leftIndex = 0
this.infoinit()
// this.leftIndex = 0
// this.infoinit()
let left = uni.getStorageSync('left');
if(left!=undefined){
this.leftIndex = left.split(',')[0]
this.getSecond(left.split(',')[1])
this.infoinit(left.split(',')[1])
}else{
this.leftIndex = 0
this.infoinit()
}
},

// onLoad() {
// this.infoinit()
// },
methods: {
// 跳转部分学习
quclicks(item) {
@@ -249,7 +260,10 @@
routerclick(item, index) {
if (this.leftIndex === index) return
this.leftIndex = index
this.getSecond(this.equinoctial[index].marketingId)
uni.setStorageSync("left", index+','+item.marketingId); //写入缓存
let mid = uni.getStorageSync('left').split(',')[1]
this.getSecond(mid)
// // return
// uni.navigateTo({
// url: "/pages/learning/Equinoctiallearning?id=" + item.marketingId + "&biaoqian=" + item.name
@@ -263,7 +277,14 @@
this.ceninit()
} else {
uni.setStorageSync("fendianindex", 1); //写入缓存
this.infoinit()
this.leftIndex = uni.getStorageSync('left').split(',')[0]
let mid = uni.getStorageSync('left').split(',')[1]
if(mid!=undefined){
this.getSecond(mid)
}else{
this.infoinit()
}
}
},

@@ -332,7 +353,7 @@
},


infoinit() {
infoinit(mid) {
let obj = {
itemId: this.buildingID
}
@@ -347,7 +368,11 @@
success: (data) => {
if (data.data.code == 10000) {
this.equinoctial = data.data.data
this.getSecond(data.data.data[0].marketingId)
if(mid!=undefined){
this.getSecond(mid)
}else{
this.getSecond(data.data.data[0].marketingId)
}
} else {
uni.showToast({
title: data.data.message,


+ 7
- 20
pages/mine/registerCode.vue Просмотреть файл

@@ -1,7 +1,7 @@
<template>
<view class="registerCode">
<view class="registerImg">
<image :src="qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+projectId" mode=""></image>
<image :src="qrCodeUrl+'/customer/getQrCode?appid='+appid+'&page=pages/mine/registerForm&scene='+projectId" mode=""></image>
</view>
<view class="registerBtn" @click="down">
保存图片到手机
@@ -15,15 +15,18 @@
data() {
return {
qrCodeUrl: "",
projectId:""
projectId:"",
appid:"",
};
},
onShow() {
this.projectId = uni.getStorageSync('buildingID').id;
this.appid = uni.getAccountInfoSync().miniProgram.appId;
this.qrCodeUrl = domain.baseUrl;
},
methods: {
down() {
let url = this.qrCodeUrl+'/customer/getQrCode?page=pages/mine/registerForm&scene='+this.projectId
let url = this.qrCodeUrl+'/customer/getQrCode?appid='+this.appid+'&page=pages/mine/registerForm&scene='+this.projectId
console.log(url)
uni.getImageInfo({
src:url,
@@ -34,7 +37,7 @@
success: () => {
uni.showToast({
title: "保存成功",
icon: "none"
icon: "none",
})
},
fail: () => {
@@ -108,22 +111,6 @@
}
},
onLoad() {
this.qrCodeUrl = domain.baseUrl
// let urlData = {
// page:'pages/mine/registerForm',
// scene:'556',
// width:300
// }
// uni.request({
// url:this.qrCodeUrl + '/customer/getQrCode',
// method:"POST",
// data:urlData,
// success(res) {
// console.log(res)
// }
// })
}
}
</script>


+ 12
- 9
pages/mine/registerForm.vue Просмотреть файл

@@ -33,7 +33,6 @@
</view>
</view>
</view>

<view class="title" @click="Buildingselection()">
<view class="titletext">到访途径</view>
<view class="titletext2"
@@ -67,7 +66,6 @@
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list"
@cancel="cancel" @confirm="confirm"></u-select>
</view>
</view>
</template>

@@ -106,7 +104,7 @@
onLoad(options){
const sceneStr = decodeURIComponent(options.scene);
console.log(options)
this.projectId = sceneStr
this.parames.projectId = sceneStr
},
watch:{
parames:{
@@ -122,27 +120,28 @@
},
methods: {
save() {
save() {
if (this.parames.name.length == 0) {
uni.showToast({
uni.showToast({
icon: "none",
title: "姓名不能为空"
})
return;
}
},
getPhoneNumber(e){
console.log(e)
getPhoneNumber(e){
this.qrCodeUrl = domain.baseUrl
if(e.detail.errMsg=="getPhoneNumber:ok"){
let data = {
code:e.detail.code,
appid:uni.getAccountInfoSync().miniProgram.appId,
}
uni.request({
url:this.qrCodeUrl + '/code/loginSessionKey',
method:"GET",
data,
success:(res)=> {
console.log(res.data.data)
let phoneNum = JSON.parse(res.data.data).phone_info.phoneNumber
this.parames.phone = phoneNum
if(this.parames.phone!=null && this.parames.phone!=""){
@@ -161,14 +160,19 @@
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (addres) => {
console.log(addres.data,111)
if(addres.data.code == 10000){
uni.reLaunch({
url:'/pages/mine/registerResult'
})
}else{
uni.showToast({
icon: "none",
title: addres.data.message
})
}
}
})
}
}
@@ -177,7 +181,6 @@
}else{
return;
}
},
changeSex(sex) {
this.parames.sex = sex;


+ 2
- 2
utils/domain.js Просмотреть файл

@@ -2,8 +2,8 @@
// const base = 'http://8kdmng.natappfree.cc' ;// 佳豪
// const base = 'http://192.168.31.134:9999' ;// 佳豪
// const base = 'http://192.168.31.167:9999' // 长龙
const base = 'https://zanyong.hfju.com';// 正式 AI销管
// const base = 'https://hxz.quhouse.com';// 正式 AI销讲助手
// const base = 'https://zanyong.hfju.com';// 正式 AI销管
const base = 'https://hxz.quhouse.com';// 正式 AI销讲助手

// http.js使用
const baseUrl = `${base}/autoSR/api`;


Загрузка…
Отмена
Сохранить