zhengshuiqi 3 years ago
parent
commit
3f376487c8
  1. 2
      api/request.js
  2. 13
      manifest.json
  3. 6
      pages/account/index.vue
  4. 65
      pages/login/index.vue
  5. 19
      pages/productDetails/index.vue

2
api/request.js

@ -17,7 +17,7 @@ const httpRequest = (params) => {
const json_data = { const json_data = {
appcode: 'DOPE+', //应用编码 appcode: 'DOPE+', //应用编码
appchannel: 'DOPEFACEBOOK', //应用发布渠道 appchannel: 'DOPEFACEBOOK', //应用发布渠道
appver: '1.3.0', //应用版本 appver: '1.5.0', //应用版本
appname: 'cnic_buyer', //应用名称 appname: 'cnic_buyer', //应用名称
manufacturer: 'HUAWEI', //设备生产商 manufacturer: 'HUAWEI', //设备生产商
phonebrand: 'HORNOR', //设备品牌 phonebrand: 'HORNOR', //设备品牌

13
manifest.json

@ -3,8 +3,8 @@
"appid" : "__UNI__EA8CB08", "appid" : "__UNI__EA8CB08",
// "appid" : "__UNI__7D4CA0F",__UNI__9088064 // "appid" : "__UNI__7D4CA0F",__UNI__9088064
"description" : "", "description" : "",
"versionName" : "1.3.0", "versionName" : "1.5.0",
"versionCode" : 200, "versionCode" : 220,
"transformPx" : false, "transformPx" : false,
// "targetSdkVersion" : 31, // "targetSdkVersion" : 31,
"channel_list" : [ "channel_list" : [
@ -45,8 +45,7 @@
"Speech" : {}, "Speech" : {},
"iBeacon" : {}, "iBeacon" : {},
"OAuth" : {}, "OAuth" : {},
"Messaging" : {}, "Messaging" : {}
"Share" : {}
}, },
/* */ /* */
"distribute" : { "distribute" : {
@ -92,9 +91,6 @@
"__platform__" : [ "ios", "android" ] "__platform__" : [ "ios", "android" ]
} }
}, },
"push" : {
"unipush" : null
},
"speech" : {}, "speech" : {},
"oauth" : { "oauth" : {
"google" : { "google" : {
@ -104,8 +100,7 @@
"facebook" : { "facebook" : {
"appid" : "884982142884404" "appid" : "884982142884404"
} }
}, }
"share" : {}
}, },
"splashscreen" : { "splashscreen" : {
"androidStyle" : "default", "androidStyle" : "default",

6
pages/account/index.vue

@ -492,9 +492,9 @@
onShow() { onShow() {
// this.getIndex() // this.getIndex()
// this.getCatList() // this.getCatList()
this.getUserInfo() // this.getImg()
this.getImg() // this.getUserInfo()
this.getList() // this.getList()
uni.hideTabBar() uni.hideTabBar()
// uni.showTabBar() // uni.showTabBar()
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')

65
pages/login/index.vue

@ -34,16 +34,13 @@
</view> </view>
</view> --> </view> -->
<view class="cellphone"> <!-- <view class="cellphone">
<view class="cellphone-box"> <view class="cellphone-box">
<view class="cellphone-minBox" v-if="cellphone == 2" @click="apple()"> <image src="../../static/img/AppleD.png" mode=""></image></view> <view class="cellphone-minBox" v-if="cellphone == 2" @click="apple()"> <image src="../../static/img/AppleD.png" mode=""></image></view>
<!-- v-if="cellphone == 2" -->
<view class="cellphone-minBox" @click="facebook()"><image src="../../static/img/FacebookD.png" mode=""></image></view> <view class="cellphone-minBox" @click="facebook()"><image src="../../static/img/FacebookD.png" mode=""></image></view>
<view class="cellphone-minBox" v-if="cellphone == 1" @click="google()"> <image src="../../static/img/GoogleD.png" mode=""></image></view> <view class="cellphone-minBox" v-if="cellphone == 1" @click="google()"> <image src="../../static/img/GoogleD.png" mode=""></image></view>
<!-- v-if="cellphone == 1" -->
</view> </view>
</view> </view> -->
</view> </view>
<view class="login" v-show="current==1"> <view class="login" v-show="current==1">
<input type="text" class="login_input" placeholder="name" @input="verificationReg" <input type="text" class="login_input" placeholder="name" @input="verificationReg"
@ -68,15 +65,13 @@
</text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>. </text> and <text class="text" @click="gotonewpage(2)"> privacy policy</text>.
</view> </view>
</view> </view>
<view class="cellphone" style="padding-top: 15px;"> <!-- <view class="cellphone" style="padding-top: 15px;">
<view class="cellphone-box"> <view class="cellphone-box">
<view class="cellphone-minBox" v-if="cellphone == 2" @click="apple()"> <image src="../../static/img/AppleZ.png" mode=""></image></view> <view class="cellphone-minBox" v-if="cellphone == 2" @click="apple()"> <image src="../../static/img/AppleZ.png" mode=""></image></view>
<!-- v-if="cellphone == 2" -->
<view class="cellphone-minBox" @click="facebook()"><image src="../../static/img/facebookZ.png" mode=""></image></view> <view class="cellphone-minBox" @click="facebook()"><image src="../../static/img/facebookZ.png" mode=""></image></view>
<view class="cellphone-minBox" v-if="cellphone == 1" @click="google()"> <image src="../../static/img/GoogleZ.png" mode=""></image></view> <view class="cellphone-minBox" v-if="cellphone == 1" @click="google()"> <image src="../../static/img/GoogleZ.png" mode=""></image></view>
<!-- v-if="cellphone == 1" -->
</view>
</view> </view>
</view> -->
</view> </view>
<!-- <view class="mode"> <!-- <view class="mode">
@ -298,8 +293,8 @@
ap_user_last_name: oauth.target.appleInfo.familyName, ap_user_last_name: oauth.target.appleInfo.familyName,
ap_user_email: oauth.target.appleInfo.email ap_user_email: oauth.target.appleInfo.email
} }
uni.setStorageSync('user_info', {nickname: oauth.target.appleInfo.familyName}) // uni.setStorageSync('user_info', {nickname: oauth.target.appleInfo.familyName})
uni.setStorageSync('user_info', {email: oauth.target.appleInfo.email}) // uni.setStorageSync('user_info', {email: oauth.target.appleInfo.email})
defaultRequest(data).then(res => { defaultRequest(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -339,11 +334,17 @@
this.errMsg = res.message this.errMsg = res.message
console.log(this.errMsg); console.log(this.errMsg);
} }
uni.showToast({ uni.showLoading({
title:'Login is successful, please reopen the App to load information', title: '加载中'
icon:'none', });
duration: 2000 uni.navigateBack({
}) delta: 1
});
// uni.showToast({
// title:'Login is successful, please reopen the App to load information',
// icon:'none',
// duration: 2000
// })
} }
}) })
// defaultRequest(data).then(res => { // defaultRequest(data).then(res => {
@ -448,11 +449,20 @@
fb_user_last_name: '', fb_user_last_name: '',
fb_user_email: info.userInfo.email fb_user_email: info.userInfo.email
} }
uni.setStorageSync('user_info', {nickname: info.userInfo.nickName}) // uni.setStorageSync('user_info', {nickname: info.userInfo.nickName})
uni.setStorageSync('user_info', {email: info.userInfo.email}) // uni.setStorageSync('user_info', {email: info.userInfo.email})
// uni.setStorageSync('user_info', 'info.userInfo'); // uni.setStorageSync('user_info', 'info.userInfo');
defaultRequest(data).then(res => { defaultRequest(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) {
uni.showLoading({
title: 'Logining',
})
console.log(this.loginDate)
defaultRequest1(this.loginDate).then(res => {
app.globalData.error = res.error
console.log('======================', res.error)
if (res.error == 0) { if (res.error == 0) {
this.loginErr = false this.loginErr = false
res.data.isLogin = true res.data.isLogin = true
@ -490,17 +500,16 @@
this.errMsg = res.message this.errMsg = res.message
console.log(this.errMsg); console.log(this.errMsg);
} }
uni.showLoading({ }
title: '加载中' })
});
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
// uni.showLoading({ uni.showLoading({
// title: '', title: '脸书用户登录成功',
// icon: 'none', icon: 'none',
// duration: 2000 duration: 2000
// }) })
} }
}) })
} }
@ -547,8 +556,8 @@
gg_user_last_name: '', gg_user_last_name: '',
gg_user_email: googleOauth.authResult.email gg_user_email: googleOauth.authResult.email
} }
uni.setStorageSync('user_info', {email: googleOauth.authResult.email}) // uni.setStorageSync('user_info', {email: googleOauth.authResult.email})
uni.setStorageSync('user_info', {nickname: googleOauth.authResult.nickName}) // uni.setStorageSync('user_info', {nickname: googleOauth.authResult.nickName})
// uni.setStorageSync('user_info.data.nickname', 'googleOauth.authResult.nickName'); // uni.setStorageSync('user_info.data.nickname', 'googleOauth.authResult.nickName');
defaultRequest(data).then(res => { defaultRequest(data).then(res => {
console.info(res) console.info(res)

19
pages/productDetails/index.vue

@ -437,7 +437,7 @@
<image src="../../static/img/close1.png" mode="" @click="Isshare=false"></image> <image src="../../static/img/close1.png" mode="" @click="Isshare=false"></image>
</view> </view>
<view class="share_icon"> <view class="share_icon">
<view class="icon_item" @click="facebookShare()"> <view class="icon_item" @click="facebookShare(ID)">
<image src="../../static/img/facebook1.png" mode=""></image> <image src="../../static/img/facebook1.png" mode=""></image>
<view>Facebook</view> <view>Facebook</view>
</view> </view>
@ -1083,7 +1083,7 @@
} }
}, },
// Facebook // Facebook
facebookShare() { facebookShare(id) {
// 使 SDK // 使 SDK
//FB.ui({ //FB.ui({
// method: 'share', // method: 'share',
@ -1098,19 +1098,8 @@
// }) // })
// plus.runtime.openURL("urlStr") // plus.runtime.openURL("urlStr")
// plus.runtime.openURL('https://www.dopeplus.com/facebookShare.html') // plus.runtime.openURL('https://www.dopeplus.com/facebookShare.html')
// uni.shareWithSystem({ // console.log(id);
// type: 'image',
// imageUrl: this.img,
// success: function() {
// uni.showToast({ title: '' });
// },
// fail: function(e) {
// uni.showModal({
// title: '',
// content: JSON.stringify(e)
// });
// }
// });
}, },

Loading…
Cancel
Save