Browse Source

来活动修改

master
slj 3 years ago
parent
commit
353016b70f
  1. 4
      app.js
  2. 2
      config.js
  3. 9
      models/topic.js
  4. 13
      pages/topics/activity/activitySign/index.js
  5. 2
      pages/topics/index.js
  6. 56
      pages/user/index.js
  7. 5
      pages/user/index.wxml
  8. 5
      pages/user/index.wxss
  9. 29
      pages/weChatAuth/index.js
  10. 18
      project.config.json
  11. 27
      project.private.config.json
  12. 2
      utils/http.js

4
app.js

@ -13,7 +13,8 @@ App({
if(options.referrerInfo.hasOwnProperty('extraData')){
this.globalData.navigate.mobile = options.referrerInfo.extraData.mobile,
this.globalData.navigate.nickname = options.referrerInfo.extraData.nickname,
this.globalData.navigate.faceImg = options.referrerInfo.extraData.faceImg
this.globalData.navigate.faceImg = options.referrerInfo.extraData.faceImg,
this.globalData.navigate.id = options.referrerInfo.extraData.id
}
http.fetchAuthToken(res => {
console.log('app登录--->',res)
@ -37,6 +38,7 @@ App({
mobile:'',
nickname:'',
faceImg:'',
id:''
},
windowHeight:'',
screenHeight:'',

2
config.js

@ -1,5 +1,5 @@
const config = {
// api_url: 'http://10.10.11.107:7101/fqsb', // 服务器地址
// api_url: 'http://10.10.11.44:7101/fqsb', // 服务器地址
api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境
// api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境
}

9
models/topic.js

@ -381,13 +381,18 @@ class TopicModel extends HTTP {
this.request(params)
}
// 在线报名
onlineSign(aId, success) {
onlineSign(aId,id,phone,nickName,company, success) {
let params = {
url: TopicBaseUrl.activity_online_url,
success: success,
method: Method.GET,
data: {
activityId: aId
activityId: aId,
id:id,
phone:phone,
nickName:nickName,
company:company
}
}
this.request(params)

13
pages/topics/activity/activitySign/index.js

@ -16,7 +16,8 @@ Page({
aId: '',
username: '',
company: '',
phone: ''
phone: '',
id:''
},
/**
* 生命周期函数--监听页面加载
@ -31,11 +32,14 @@ Page({
initFormData() {
let {
nickName,
phone
phone,
id
} = store.readUserInfo()
console.log(store.readUserInfo())
this.setData({
username: nickName,
phone: phone
phone: phone,
id:id
})
},
changeCompany: function (e) {
@ -93,7 +97,8 @@ Page({
},
//在线报名
onlineSignApi() {
topicModel.onlineSign(this.data.aId, res => {
console.log(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company)
topicModel.onlineSign(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company, res => {
if (res.code == 200) {
console.log(res.code);
wx.showModal({

2
pages/topics/index.js

@ -142,7 +142,7 @@ Page({
success(res) {
if (res.confirm) {
wx.redirectTo({
url: '/pages/weChatAuth/index',
url: '/pages/weChatAuth/index?tabType=funeng',
})
} else if (res.cancel) {
wx.switchTab({

56
pages/user/index.js

@ -124,24 +124,24 @@ Page({
id: 3,
name: '政务服务'
},
// {
// id: 4,
// name: '学历教育'
// },
// {
// id: 5,
// name: '场景开放'
// },
// {
// id: 6,
// name: '企业招聘'
// },
// {
// id: 7,
// name: '名人堂'
// },
{
id: 4,
name: '学历教育'
},
{
id: 5,
name: '场景开放'
},
{
id: 6,
name: '企业招聘'
},
{
id: 7,
name: '名人堂'
},
{
id: 8,
name: '法律服务'
},
],
@ -200,13 +200,15 @@ Page({
var params = {
phone: app.globalData.navigate.mobile,
nickName: app.globalData.navigate.nickname,
avatarUrl: app.globalData.navigate.faceImg
avatarUrl: app.globalData.navigate.faceImg,
id:app.globalData.navigate.id,
}
userModel.navigateUser(params, res => {
store.saveUserInfo({
nickName: params.nickName,
avatarUrl: params.avatarUrl,
phone: params.phone
phone: params.phone,
id:params.id
})
wx.reLaunch({
@ -252,13 +254,15 @@ Page({
var params = {
phone: app.globalData.navigate.mobile,
nickName: app.globalData.navigate.nickname,
avatarUrl: app.globalData.navigate.faceImg
avatarUrl: app.globalData.navigate.faceImg,
id:app.globalData.navigate.id
}
userModel.navigateUser(params, res => {
store.saveUserInfo({
nickName: params.nickName,
avatarUrl: params.avatarUrl,
phone: params.phone
phone: params.phone,
id:params.id
})
wx.reLaunch({
@ -291,20 +295,23 @@ Page({
store.saveUserInfo({
nickName: res.result.nickName,
avatarUrl: res.result.avatarUrl,
phone: res.result.phone || ''
phone: res.result.phone || '',
id: res.result.id
})
} else {
if (app.globalData.navigate.mobile) {
var params = {
phone: app.globalData.navigate.mobile,
nickName: app.globalData.navigate.nickname,
avatarUrl: app.globalData.navigate.faceImg
avatarUrl: app.globalData.navigate.faceImg,
id: app.globalData.navigate.id
}
userModel.navigateUser(params, res => {
store.saveUserInfo({
nickName: params.nickName,
avatarUrl: params.avatarUrl,
phone: params.phone
phone: params.phone,
id: params.id
})
wx.reLaunch({
@ -344,7 +351,6 @@ Page({
type
} = e.currentTarget.dataset
console.log('type-->',type)
if (this.data.isAuth) {
if (type === 'myInfo') {
console.log('进入个人信息页面');
@ -359,7 +365,7 @@ Page({
}
} else {
wx.redirectTo({
url: '/pages/weChatAuth/index',
url: '/pages/weChatAuth/index?tabType=login',
})
}
},

5
pages/user/index.wxml

@ -35,6 +35,7 @@
</view>
</view>
<!-- wx:if="{{talentsType != 0 && talentsType != 9}}"-->
<block wx:if="{{isAuth}}">
<view class="title-cell" wx:if="{{talentsType}}">
<view class="con">
<view class="t">人才服务</view>
@ -103,7 +104,7 @@
</swiper>
<!--普通人才、企业人才-->
<swiper class="nav" indicator-dots="{{false}}" indicator-color="rgb(217,217,217)"
<swiper class="nav_public" indicator-dots="{{false}}" indicator-color="rgb(217,217,217)"
indicator-active-color="rgb(230,208,68)" wx:if="{{talentsType == 0 || talentsType == 9}}">
<block wx:for="{{servicePublic}}">
<swiper-item>
@ -138,6 +139,8 @@
</swiper-item>
</block>
</swiper>
</block>
<mp-cells ext-class="page_hd" wx:if="{{!isAuth}}">
<mp-cell bindtap="onTapItem" data-type="myInfo">
<view class="user_hd">

5
pages/user/index.wxss

@ -72,7 +72,10 @@ page{
height:410rpx;
background-color: white;
}
.nav_public{
height:200rpx;
background-color: white;
}
.circular{
width: 70rpx;
height: 70rpx;

29
pages/weChatAuth/index.js

@ -5,7 +5,7 @@ let userModel = new UserModel()
import { AuthModel } from '../../models/auth.js'
let authModel = new AuthModel()
import { config } from '../../config.js'
const app = getApp()
Page({
/**
@ -20,7 +20,8 @@ Page({
type: Object,
value: {}
},
type:1
type:1,
tabType:""
},
/**
@ -28,7 +29,8 @@ Page({
*/
onLoad: function (options) {
this.setData({
type:options.type
type:options.type,
tabType:options.tabType
})
},
@ -74,13 +76,27 @@ Page({
userInfo: res.result,
avatarUrl: res.result.avatarUrl,
nickName: res.result.nickName,
id:res.result.id,
reAuth: true,
isAuth: false
}, () => {
if (store.hasPhone()) {
//console.log('已经绑定手机号码')
console.log('已经绑定手机号码')
let tabType=this.data.tabType
console.log('tabType--',tabType)
if(tabType=='funeng'){
app.globalData.currentTab = "1"
wx.switchTab({
url: '/pages/topics/index'
})
}
if(tabType=='login'){
wx.switchTab({
url: '/pages/user/index'
})
}
} else {
//console.log('未绑定手机号码')
console.log('未绑定手机号码')
wx.showModal({
title: '温馨提示',
content: '是否前往验证手机号码?',
@ -102,7 +118,8 @@ Page({
store.saveUserInfo({
nickName: res.result.nickName,
avatarUrl: res.result.avatarUrl,
phone: res.result.phone || ''
phone: res.result.phone || '',
id:res.result.id,
})
} else {
//console.log('未授权')

18
project.config.json

@ -1,7 +1,8 @@
{
"description": "项目配置文件",
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": []
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
@ -36,16 +37,15 @@
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false
"showES6CompileOption": false,
"disableUseStrict": false,
"useStaticServer": true,
"useCompilerPlugins": false
},
"compileType": "miniprogram",
"libVersion": "2.8.1",
"appid": "wx8f4ebf5537cf4962",
"projectname": "fqsb_wx",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
@ -174,5 +174,9 @@
}
]
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

27
project.private.config.json

@ -1,117 +1,93 @@
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": -1,
"name": "Boillboard",
"pathName": "pages/billboards/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Park",
"pathName": "pages/billboards/park/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Policy",
"pathName": "pages/billboards/policy/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Artice",
"pathName": "pages/article/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "policy-list",
"pathName": "pages/billboards/policy/policy-list/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Register",
"pathName": "pages/register/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "User",
"pathName": "pages/user/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "Topics",
"pathName": "pages/topics/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/weChatAuth/index",
"pathName": "pages/weChatAuth/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/topics/message/index",
"pathName": "pages/topics/message/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/user/myWhistle/evaluate/index",
"pathName": "pages/user/myWhistle/evaluate/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/user/myInfo/index",
"pathName": "pages/user/myInfo/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/user/myInfo/register/index",
"pathName": "pages/user/myInfo/register/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/resource/index",
"pathName": "pages/resource/index",
"query": "",
"scene": null
},
{
"id": 14,
"name": "pages/resource/detail/index",
"pathName": "pages/resource/detail/index",
"query": "",
@ -161,5 +137,6 @@
}
]
}
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
}

2
utils/http.js

@ -84,7 +84,7 @@ class HTTP {
// 获取token
this._fetchWXCode().then(res => {
//console.log('啦啦啦啦凉啊')
//console.log(res)
console.log(res)
if (!res) return
let params = {
url: HTTPConst.TokenURL,

Loading…
Cancel
Save