main
liudan 2 years ago
parent 844d4974d6
commit aaafb4b058
  1. 6
      common/api.js
  2. 12
      manifest.json
  3. 10
      pages.json
  4. 2
      pages/detail/detail.vue
  5. 2
      pages/index/index.vue
  6. 2
      pages/index/searchPage.vue
  7. 73
      pages/login/login.vue
  8. 148
      pages/register/register.vue

@ -9,7 +9,7 @@ export const wxapplogin= (params, config = {}) => http.post('/user/wxapplogin',
export const profileUser= (params, config = {}) => http.post('/user/profile', params, config);
//获取首页轮播图
export const getBanner = (params, config = {custom: { auth: true }}) => http.post('/wx_adv/index', params, config);
export const getBanner = (params, config = {}) => http.post('/wx_adv/index', params, config);
//协议
export const getRichText = (params, config = {}) => http.post('/shopro_richtext/view', params, config);
//获取验证码
@ -23,7 +23,7 @@ export const downloadApp = (params, config = {}) => http.post('/app_url/index',
//上传图片
export const uploadPic = (params, config = {}) => http.post('/index/upload', params, config);
//列表数据
export const listData = (params, config = {custom: { auth: true }}) => http.post('/wx_category/index', params, config);
export const listData = (params, config = {}) => http.post('/wx_category/index', params, config);
//文章详情
export const articleDetails = (params, config = {}) => http.post('/wx_article/view', params, config);
//收藏记录
@ -39,7 +39,7 @@ export const addShare = (params, config = {}) => http.post('/wx_article_share/ad
//退出登录
export const logout = (params, config = {custom: { auth: true }}) => http.post('/user/logout', params, config);
//文章列表
export const articalList = (params, config = {custom: { auth: true }}) => http.post('/wx_article/index', params, config);
export const articalList = (params, config = {}) => http.post('/wx_article/index', params, config);

@ -2,8 +2,8 @@
"name" : "留学万象",
"appid" : "__UNI__CF90E01",
"description" : "",
"versionName" : "2.0.0",
"versionCode" : 200,
"versionName" : "2.1.1",
"versionCode" : 211,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -60,13 +60,7 @@
},
/* SDK */
"sdkConfigs" : {
"oauth" : {
"weixin" : {
"appid" : "wx4ef4d1bae93a66ab",
"appsecret" : "a84395adeb28a9cf66553a7c162a783f",
"UniversalLinks" : "https://lxwx.njrenzhou.cn/"
}
},
"oauth" : {},
"ad" : {},
"share" : {
"weixin" : {

@ -1,6 +1,11 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},{
"path" : "pages/login/login",
"style" :
{
@ -8,11 +13,6 @@
"enablePullDownRefresh": false
}
},{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},{
"path" : "pages/my/richText",
"style" :

@ -172,7 +172,7 @@
// }).catch((res) =>{
// })
articleDetails({ids:this.id},{ custom: { auth: true }}).then(res=>{
articleDetails({ids:this.id},{custom: { auth: true }}).then(res=>{
this.titleInfo = res;
if(res.is_collect==0){
this.isCollect = false

@ -119,7 +119,7 @@
// order:'desc'
}
indexNav(params, {
custom: { auth: true },
// custom: { auth: true },
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},

@ -130,7 +130,7 @@ export default{
order:'asc'
}
listData(params,{
custom: { auth: true },
// custom: { auth: true },
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},

@ -9,13 +9,12 @@
</view>
<view class="contentForm">
<!-- #ifdef APP-NVUE || APP-PLUS -->
<view class="wx" @click="appwxLogin">
<!-- <view class="wx" @click="appwxLogin">
<image src="/static/wxIcon.png" mode="widthFix"></image>
<!-- <button type="primary" class="wxText">微信登录</button> -->
<view class="wxText">
微信登录
</view>
</view>
</view> -->
<!-- #endif -->
<view class="phone" @click="mobileNumLogin">
手机号登录/注册
@ -69,41 +68,41 @@
url:'/pages/my/richText?id='+ids
})
},
appwxLogin(){
var that = this
if(this.checked.length==0){
uni.$u.toast('请先勾选同意用户协议和隐私政策')
}else{
uni.login({
provider: 'weixin',
success: function(loginRes) {
console.log('-------获取openid(unionid)-----');
console.log(loginRes);
const params={
access_token: loginRes.authResult.access_token,
openid: loginRes.authResult.openid,
event:'login'
}
console.log(params)
wxapplogin(params,{}).then(res=>{
console.log(res)
that.$store.commit('login',res.userinfo)
uni.setStorageSync('source','phone')
if(that.$store.state.share){
uni.navigateTo({
url:'/'+that.$store.state.share
})
}else{
uni.reLaunch({
url:'/pages/my/my'
})
}
})
}
});
// appwxLogin(){
// var that = this
// if(this.checked.length==0){
// uni.$u.toast('')
// }else{
// uni.login({
// provider: 'weixin',
// success: function(loginRes) {
// console.log('-------openid(unionid)-----');
// console.log(loginRes);
// const params={
// access_token: loginRes.authResult.access_token,
// openid: loginRes.authResult.openid,
// event:'login'
// }
// console.log(params)
// wxapplogin(params,{}).then(res=>{
// console.log(res)
// that.$store.commit('login',res.userinfo)
// uni.setStorageSync('source','phone')
// if(that.$store.state.share){
// uni.navigateTo({
// url:'/'+that.$store.state.share
// })
// }else{
// uni.reLaunch({
// url:'/pages/my/my'
// })
// }
// })
// }
// });
}
}
// }
// }
}
}
</script>

@ -31,7 +31,7 @@
</view>
</view>
<!-- #ifdef APP-NVUE || APP-PLUS -->
<view class="changeType">
<!-- <view class="changeType">
<view class="top">
<view class="devideLine"></view>
<view class="devideText">
@ -45,7 +45,7 @@
微信
</view>
</view>
</view>
</view> -->
<!-- #endif -->
</view>
</template>
@ -90,79 +90,79 @@
})
},
appwxLogin(){
var that = this
if(this.checked.length==0){
uni.$u.toast('请先勾选同意用户协议和隐私政策')
}else{
uni.login({
provider: 'weixin',
success: function(loginRes) {
console.log('-------获取openid(unionid)-----');
console.log(loginRes);
const params={
access_token: loginRes.authResult.access_token,
openid: loginRes.authResult.openid,
event:'login'
}
console.log(params)
wxapplogin(params,{}).then(res=>{
console.log(res)
that.$store.commit('login',res.userinfo)
uni.setStorageSync('source','phone')
// uni.reLaunch({
// url:'/pages/my/my'
// })
if(that.$store.state.share){
uni.navigateTo({
url:"/"+that.$store.state.share
})
}else{
uni.reLaunch({
url:'/pages/my/my'
})
}
})
}
});
// appwxLogin(){
// var that = this
// if(this.checked.length==0){
// uni.$u.toast('')
// }else{
// uni.login({
// provider: 'weixin',
// success: function(loginRes) {
// console.log('-------openid(unionid)-----');
// console.log(loginRes);
// const params={
// access_token: loginRes.authResult.access_token,
// openid: loginRes.authResult.openid,
// event:'login'
// }
// console.log(params)
// wxapplogin(params,{}).then(res=>{
// console.log(res)
// that.$store.commit('login',res.userinfo)
// uni.setStorageSync('source','phone')
// // uni.reLaunch({
// // url:'/pages/my/my'
// // })
// if(that.$store.state.share){
// uni.navigateTo({
// url:"/"+that.$store.state.share
// })
// }else{
// uni.reLaunch({
// url:'/pages/my/my'
// })
// }
// })
// }
// });
}
}
,
appwxLogin1(){
if(this.checked.length==0){
uni.$u.toast('请先勾选同意用户协议和隐私政策');
return;
}
var that = this
uni.getProvider({
service: 'oauth',
success: function(res) {
//qq
if (~res.provider.indexOf('weixin')) {
uni.login({
provider: 'weixin',
success: function(loginRes) {
console.log('-------获取openid(unionid)-----');
console.log(loginRes);
//
uni.getUserInfo({
provider: 'weixin',
success: function(infoRes) {
console.log(infoRes.userInfo);
that.$store.commit('login',infoRes.userInfo)
uni.setStorageSync('source','wx')
uni.reLaunch({
url:'/pages/my/my'
})
}
});
}
});
}
}
});
}
// }
// }
// ,
// appwxLogin1(){
// if(this.checked.length==0){
// uni.$u.toast('');
// return;
// }
// var that = this
// uni.getProvider({
// service: 'oauth',
// success: function(res) {
// //qq
// if (~res.provider.indexOf('weixin')) {
// uni.login({
// provider: 'weixin',
// success: function(loginRes) {
// console.log('-------openid(unionid)-----');
// console.log(loginRes);
// //
// uni.getUserInfo({
// provider: 'weixin',
// success: function(infoRes) {
// console.log(infoRes.userInfo);
// that.$store.commit('login',infoRes.userInfo)
// uni.setStorageSync('source','wx')
// uni.reLaunch({
// url:'/pages/my/my'
// })
// }
// });
// }
// });
// }
// }
// });
// }
}
}
</script>

Loading…
Cancel
Save