123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <template>
- <view class="page">
- <view class="list_info">
- <view class="item" v-for="(item,index) in list" :key="index" @click="goPage(item.path)">
- <text>{{item.name}}</text>
- <image v-if="item.desc == '' && item.switch != 1" class="arrow"
- src="../../static/me/arrow_right_gray.png" mode="widthFix">
- </image>
- <text class="desc" v-else>{{item.desc}}</text>
- <switch v-if="item.switch == 1" checked color="#FFCC33" style="transform:scale(0.7)" />
- </view>
- <view class="blankHeight"></view>
- </view>
- <!-- <view class="btn_submit">退出登录</view> -->
- <DialogBox ref="DialogBox"></DialogBox>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- title: '',
- sel: 1,
- myinfo: {},
- list: [{
- 'name': '实名认证',
- 'desc': '',
- 'path': '/pages/my/idcheck'
- },
- {
- 'name': '修改密码',
- 'desc': '',
- 'path': '/pages/my/forgetPass'
- },
- {
- 'name': '修改手机号',
- 'desc': '',
- 'path': '/pages/my/editMobile'
- },
- // {
- // 'name': '打赏设置',
- // 'desc': '',
- // 'path': '/pages/my/dashang'
- // },
- {
- 'name': '收款账户设置',
- 'desc': '',
- 'path': '/pages/my/alipaySet'
- },
- {
- 'name': '收货地址设置',
- 'desc': '',
- 'path': '/pages/my/addressSet'
- },
- // {
- // 'name': '举报记录',
- // 'desc': '',
- // 'path': ''
- // },
- {
- 'name': '用户协议',
- 'desc': '',
- 'path': '/pages/AboutUs/yhxy'
- },
- {
- 'name': '隐私政策',
- 'desc': '',
- 'path': '/pages/AboutUs/yszc'
- },
- {
- 'name': '注销账号',
- 'desc': '',
- 'path': 'delete'
- },
- // {
- // 'name': '青少年模式',
- // 'switch': 1,
- // 'desc': '',
- // 'path': ''
- // },
- {
- 'name': '企业客服',
- 'desc': '',
- 'path': 'kefu'
- },
- ]
- }
- },
- onLoad() {
- this.getAppVersion()
- },
- onShow() {
- this.loadData();
- },
- methods: {
- getAppVersion() {
- uni.getSystemInfo({
- success: (info) => {
- // app系统环境
- let appPlatform = info.platform;
- console.log("appPlatform", info)
- // #ifdef H5
- this.list.push({
- 'name': '版本号',
- 'desc': 'V' + info.appVersion,
- 'path': ''
- })
- // #endif
- // #ifdef APP-PLUS
- plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
- this.list.push({
- 'name': '版本号',
- 'desc': 'V' + wgtinfo.version,
- 'path': ''
- })
- });
- // #endif
- }
- });
- },
- onBack() {},
- chkSel() {
- if (this.sel == 1) {
- this.sel = 0;
- } else {
- this.sel = 1;
- }
- },
- goPage(page) {
- if (page == 'delete') {
- this.DelMem();
- } else if (page == 'kefu') {
- let that = this;
- // #ifdef APP-PLUS
- plus.share.getServices(res => {
- const wechat = res.find(i => i.id === 'weixin')
- if (wechat) {
- wechat.openCustomerServiceChat({
- corpid: 'wwbc06aa8311b6ac08',
- // url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
- url: that.myinfo.wxkf
- }, src => {
- console.log("success:")
- }, err => {
- console.log("error:")
- })
- } else {
- uni.showToast({
- title: '没有检测到微信,请先安装',
- icon: "error"
- });
- }
- });
- // #endif
- } else if (page != '') {
- uni.navigateTo({
- url: page,
- })
- }
- },
- DelMem() {
- var that = this;
- this.$refs['DialogBox'].confirm({
- title: '警告',
- content: '1、注销账号是不可逆操作,该账号下所有一切资料一旦注销无法恢复;\n2、注销后,你账号下所有权益将被清除。',
- DialogType: 'inquiry',
- btn1: '否',
- btn2: '是',
- animation: 0
- }).then(() => {
- uni.request({
- url: that.$apiHost + '/My/delete', //检测是否已绑定
- data: {
- uuid: getApp().globalData.uuid
- },
- header: {
- 'content-type': 'application/json' //自定义请求头信息
- },
- success: (res) => {
- uni.removeStorageSync("wapptoken");
- uni.redirectTo({
- url: '/pages/login/login',
- })
- }
- });
- })
- },
- loadData() {
- console.log({
- uuid: getApp().globalData.uuid,
- skey: getApp().globalData.skey
- });
- uni.request({
- url: this.$apiHost + '/Web/getinfo',
- data: {
- uuid: getApp().globalData.uuid
- },
- header: {
- "content-type": "application/json",
- 'sign': getApp().globalData.headerSign
- },
- success: (res) => {
- console.log("----:", res.data);
- this.myinfo = res.data;
- },
- complete: (com) => {
- // uni.hideLoading();
- },
- fail: (e) => {
- console.log("----e:", e);
- }
- });
- },
- EditNickname() {
- let that = this;
- this.$refs['DialogBox'].confirm({
- title: '更改昵称',
- placeholder: '请输入修改的昵称',
- value: that.myinfo.nickname,
- DialogType: 'input',
- animation: 0
- }).then((res) => {
- if (res.value.length < 1) {
- uni.showToast({
- title: "请输入有效的昵称",
- icon: 'none'
- });
- return;
- }
- that.myinfo.nickname = res.value;
- let obj2 = {
- nickname: res.value
- }
- const postData = Object.assign({}, getApp().globalData.postHeader, obj2);
- uni.request({
- url: that.$apiHost + '/Gushi/editinfo', //检测是否已绑定
- data: postData,
- method: 'POST',
- header: {
- 'content-type': 'application/json', //自定义请求头信息
- 'Access-Control-Allow-Origin': '*'
- },
- success: (res) => {
- uni.showToast({
- title: res.data.str,
- icon: 'none'
- });
- }
- });
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'setting.scss';
- </style>
|