修改绑定手机号错误的问题
This commit is contained in:
233
api/user.js
233
api/user.js
@ -1,20 +1,20 @@
|
|||||||
import request from "@/utils/request";
|
import request from '@/utils/request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 省市区
|
* 省市区
|
||||||
*/
|
*/
|
||||||
export function getCity(data) {
|
export function getCity(data) {
|
||||||
return request.get("/city_list", data, {
|
return request.get('/city_list', data, {
|
||||||
// return request.get("/citys", data, {
|
// return request.get("/citys", data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function district(data) {
|
export function district(data) {
|
||||||
// return request.get("/city_list", data, {
|
// return request.get("/city_list", data, {
|
||||||
return request.get("/citys", data, {
|
return request.get('/citys', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,9 +22,9 @@ export function district(data) {
|
|||||||
* @param data object 用户账号密码
|
* @param data object 用户账号密码
|
||||||
*/
|
*/
|
||||||
export function login(data) {
|
export function login(data) {
|
||||||
return request.post("/login", data, {
|
return request.post('/login', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,9 +32,9 @@ export function login(data) {
|
|||||||
* @param data object 用户手机号 也只能
|
* @param data object 用户手机号 也只能
|
||||||
*/
|
*/
|
||||||
export function loginMobile(data) {
|
export function loginMobile(data) {
|
||||||
return request.post("/login/mobile", data, {
|
return request.post('/login/mobile', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,9 +42,9 @@ export function loginMobile(data) {
|
|||||||
* @param data object 用户手机号
|
* @param data object 用户手机号
|
||||||
*/
|
*/
|
||||||
export function registerVerify(data) {
|
export function registerVerify(data) {
|
||||||
return request.post("/register/verify", data, {
|
return request.post('/register/verify', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,9 +52,9 @@ export function registerVerify(data) {
|
|||||||
* @param data object 用户手机号 验证码 密码
|
* @param data object 用户手机号 验证码 密码
|
||||||
*/
|
*/
|
||||||
export function register(data) {
|
export function register(data) {
|
||||||
return request.post("/register", data, {
|
return request.post('/register', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,364 +62,375 @@ export function register(data) {
|
|||||||
* @param data object 用户手机号 验证码 密码
|
* @param data object 用户手机号 验证码 密码
|
||||||
*/
|
*/
|
||||||
export function registerReset(data) {
|
export function registerReset(data) {
|
||||||
return request.post("/register/reset", data, {
|
return request.post('/register/reset', data, {
|
||||||
login: false
|
login: false,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 领取优惠券列表
|
* 领取优惠券列表
|
||||||
* */
|
* */
|
||||||
export function getCoupon(q) {
|
export function getCoupon(q) {
|
||||||
return request.get("/coupons", q, {
|
return request.get('/coupons', q, {
|
||||||
login: true
|
login: true,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 点击领取优惠券
|
* 点击领取优惠券
|
||||||
* */
|
* */
|
||||||
export function getCouponReceive(id) {
|
export function getCouponReceive(id) {
|
||||||
return request.post("/coupon/receive", {
|
return request.post(
|
||||||
couponId: id
|
'/coupon/receive',
|
||||||
}, {
|
{
|
||||||
login: true
|
couponId: id,
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
login: true,
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 批量领取优惠券
|
* 批量领取优惠券
|
||||||
* */
|
* */
|
||||||
export function couponReceiveBatch(couponId) {
|
export function couponReceiveBatch(couponId) {
|
||||||
return request.post("/coupon/receive/batch", {
|
return request.post('/coupon/receive/batch', {
|
||||||
couponId
|
couponId,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 我的优惠券
|
* 我的优惠券
|
||||||
* */
|
* */
|
||||||
export function getCouponsUser(type) {
|
export function getCouponsUser(type) {
|
||||||
return request.get("/coupons/user/" + type);
|
return request.get('/coupons/user/' + type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 个人中心
|
* 个人中心
|
||||||
* */
|
* */
|
||||||
export function getUser() {
|
export function getUser() {
|
||||||
return request.get("/user");
|
return request.get('/user')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 用户信息
|
* 用户信息
|
||||||
* */
|
* */
|
||||||
export function getUserInfo() {
|
export function getUserInfo() {
|
||||||
|
return request.get('/userinfo', {
|
||||||
return request.get("/userinfo", {
|
login: true,
|
||||||
login: true
|
})
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 小程序登陆
|
* 小程序登陆
|
||||||
* */
|
* */
|
||||||
export function wxappAuth(data) {
|
export function wxappAuth(data) {
|
||||||
|
return request.post('/wxapp/auth', data, {
|
||||||
return request.post("/wxapp/auth", data, {
|
login: false,
|
||||||
login: false
|
})
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 个人中心(功能列表)
|
* 个人中心(功能列表)
|
||||||
* */
|
* */
|
||||||
export function getMenuUser() {
|
export function getMenuUser() {
|
||||||
return request.get("/menu/user");
|
return request.get('/menu/user')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 地址列表
|
* 地址列表
|
||||||
* */
|
* */
|
||||||
export function getAddressList(data) {
|
export function getAddressList(data) {
|
||||||
return request.get("/address/list", data || {});
|
return request.get('/address/list', data || {})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 删除地址
|
* 删除地址
|
||||||
* */
|
* */
|
||||||
export function getAddressRemove(id) {
|
export function getAddressRemove(id) {
|
||||||
return request.post("/address/del", {
|
return request.post('/address/del', {
|
||||||
id: id
|
id: id,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 设置默认地址
|
* 设置默认地址
|
||||||
* */
|
* */
|
||||||
export function getAddressDefaultSet(id) {
|
export function getAddressDefaultSet(id) {
|
||||||
return request.post("/address/default/set", {
|
return request.post('/address/default/set', {
|
||||||
id: id
|
id: id,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 获取默认地址
|
* 获取默认地址
|
||||||
* */
|
* */
|
||||||
export function getAddressDefault() {
|
export function getAddressDefault() {
|
||||||
return request.get("/address/default");
|
return request.get('/address/default')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 获取单个地址
|
* 获取单个地址
|
||||||
* */
|
* */
|
||||||
export function getAddress(id) {
|
export function getAddress(id) {
|
||||||
return request.get("/address/detail/" + id);
|
return request.get('/address/detail/' + id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 修改 添加地址
|
* 修改 添加地址
|
||||||
* */
|
* */
|
||||||
export function postAddress(data) {
|
export function postAddress(data) {
|
||||||
return request.post("/address/edit", data);
|
return request.post('/address/edit', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 获取收藏产品
|
* 获取收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectUser(page, limit, type) {
|
export function getCollectUser(page, limit, type) {
|
||||||
return request.get("/collect/user", {
|
return request.get('/collect/user', {
|
||||||
page: page,
|
page: page,
|
||||||
limit: limit,
|
limit: limit,
|
||||||
type
|
type,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 删除收藏产品
|
* 删除收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectDel(id, category) {
|
export function getCollectDel(id, category) {
|
||||||
return request.post("/collect/del", {
|
return request.post('/collect/del', {
|
||||||
id: id,
|
id: id,
|
||||||
category: category
|
category: category,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 批量收藏产品
|
* 批量收藏产品
|
||||||
* */
|
* */
|
||||||
export function postCollectAll(data) {
|
export function postCollectAll(data) {
|
||||||
return request.post("/collect/all", data);
|
return request.post('/collect/all', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 添加收藏产品
|
* 添加收藏产品
|
||||||
* */
|
* */
|
||||||
export function getCollectAdd(id, category) {
|
export function getCollectAdd(id, category) {
|
||||||
return request.post("collect/add", {
|
return request.post('collect/add', {
|
||||||
id: id,
|
id: id,
|
||||||
category: category
|
category: category,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到配置
|
* 签到配置
|
||||||
* */
|
* */
|
||||||
export function getSignConfig() {
|
export function getSignConfig() {
|
||||||
return request.get("/sign/config");
|
return request.get('/sign/config')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到里的签到列表
|
* 签到里的签到列表
|
||||||
* */
|
* */
|
||||||
export function getSignList(page, limit) {
|
export function getSignList(page, limit) {
|
||||||
return request.get("/sign/list", {
|
return request.get('/sign/list', {
|
||||||
page: page,
|
page: page,
|
||||||
limit: limit
|
limit: limit,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到列表
|
* 签到列表
|
||||||
* */
|
* */
|
||||||
export function getSignMonth(page, limit) {
|
export function getSignMonth(page, limit) {
|
||||||
return request.get("/sign/month", {
|
return request.get('/sign/month', {
|
||||||
page: page,
|
page: page,
|
||||||
limit: limit
|
limit: limit,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到用户信息
|
* 签到用户信息
|
||||||
* */
|
* */
|
||||||
export function postSignUser(sign) {
|
export function postSignUser(sign) {
|
||||||
return request.post("/sign/user", sign);
|
return request.post('/sign/user', sign)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 签到
|
* 签到
|
||||||
* */
|
* */
|
||||||
export function postSignIntegral(sign) {
|
export function postSignIntegral(sign) {
|
||||||
return request.post("/sign/integral", sign);
|
return request.post('/sign/integral', sign)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 推广数据
|
* 推广数据
|
||||||
* */
|
* */
|
||||||
export function getSpreadInfo() {
|
export function getSpreadInfo() {
|
||||||
return request.get("/commission");
|
return request.get('/commission')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 推广人列表
|
* 推广人列表
|
||||||
* */
|
* */
|
||||||
export function getSpreadUser(screen) {
|
export function getSpreadUser(screen) {
|
||||||
return request.post("/spread/people", screen);
|
return request.post('/spread/people', screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 推广人订单
|
* 推广人订单
|
||||||
* */
|
* */
|
||||||
export function getSpreadOrder(where) {
|
export function getSpreadOrder(where) {
|
||||||
return request.post("/spread/order", where);
|
return request.post('/spread/order', where)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 资金明细(types|0=全部,1=消费,2=充值,3=返佣,4=提现)
|
* 资金明细(types|0=全部,1=消费,2=充值,3=返佣,4=提现)
|
||||||
* */
|
* */
|
||||||
export function getCommissionInfo(q, types) {
|
export function getCommissionInfo(q, types) {
|
||||||
return request.get("/spread/commission/" + types, q);
|
return request.get('/spread/commission/' + types, q)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 积分记录
|
* 积分记录
|
||||||
* */
|
* */
|
||||||
export function getIntegralList(q) {
|
export function getIntegralList(q) {
|
||||||
return request.get("/integral/list", q);
|
return request.get('/integral/list', q)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 提现银行
|
* 提现银行
|
||||||
* */
|
* */
|
||||||
export function getBank() {
|
export function getBank() {
|
||||||
return request.get("/extract/bank");
|
return request.get('/extract/bank')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 提现申请
|
* 提现申请
|
||||||
* */
|
* */
|
||||||
export function postCashInfo(cash) {
|
export function postCashInfo(cash) {
|
||||||
return request.post("/extract/cash", cash);
|
return request.post('/extract/cash', cash)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 会员中心
|
* 会员中心
|
||||||
* */
|
* */
|
||||||
export function getVipInfo() {
|
export function getVipInfo() {
|
||||||
return request.get("/user/level/grade");
|
return request.get('/user/level/grade')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 会员等级任务
|
* 会员等级任务
|
||||||
* */
|
* */
|
||||||
export function getVipTask(id) {
|
export function getVipTask(id) {
|
||||||
return request.get("/user/level/task/" + id);
|
return request.get('/user/level/task/' + id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 资金统计
|
* 资金统计
|
||||||
* */
|
* */
|
||||||
export function getBalance() {
|
export function getBalance() {
|
||||||
return request.get("/user/balance");
|
return request.get('/user/balance')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 活动状态
|
* 活动状态
|
||||||
* */
|
* */
|
||||||
export function getActivityStatus() {
|
export function getActivityStatus() {
|
||||||
return request.get("/user/activity", {}, {
|
return request.get(
|
||||||
login: false
|
'/user/activity',
|
||||||
});
|
{},
|
||||||
|
{
|
||||||
|
login: false,
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 活动状态
|
* 活动状态
|
||||||
* */
|
* */
|
||||||
export function getSpreadImg(data) {
|
export function getSpreadImg(data) {
|
||||||
|
return request.get('/spread/banner', data)
|
||||||
return request.get("/spread/banner", data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 用户修改信息
|
* 用户修改信息
|
||||||
* */
|
* */
|
||||||
export function postUserEdit(data) {
|
export function postUserEdit(data) {
|
||||||
return request.post("/user/edit", data);
|
return request.post('/user/edit', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 用户修改信息
|
* 用户修改信息
|
||||||
* */
|
* */
|
||||||
export function getChatRecord(to_uid, data) {
|
export function getChatRecord(to_uid, data) {
|
||||||
return request.get("user/service/record/" + to_uid, data);
|
return request.get('user/service/record/' + to_uid, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 用户修改信息
|
* 用户修改信息
|
||||||
* */
|
* */
|
||||||
export function serviceList() {
|
export function serviceList() {
|
||||||
return request.get("user/service/list");
|
return request.get('user/service/list')
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 公众号充值
|
* 公众号充值
|
||||||
* */
|
* */
|
||||||
export function rechargeWechat(data) {
|
export function rechargeWechat(data) {
|
||||||
return request.post("/recharge/wechat", data);
|
return request.post('/recharge/wechat', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 退出登录
|
* 退出登录
|
||||||
* */
|
* */
|
||||||
export function getLogout() {
|
export function getLogout() {
|
||||||
return request.post("/auth/logout");
|
return request.post('/auth/logout')
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 小程序绑定手机号
|
||||||
|
* */
|
||||||
|
export function bindingPhone(data) {
|
||||||
|
return request.post('/binding', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 绑定手机号
|
* 绑定手机号
|
||||||
* */
|
* */
|
||||||
export function bindingPhone(data) {
|
export function wxappBindingPhone(data) {
|
||||||
return request.post("wxapp/binding", data);
|
return request.post('wxapp/binding', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* h5切换公众号登陆
|
* h5切换公众号登陆
|
||||||
* */
|
* */
|
||||||
export function switchH5Login() {
|
export function switchH5Login() {
|
||||||
return request.post("switch_h5", {
|
return request.post('switch_h5', {
|
||||||
from: "wechat"
|
from: 'wechat',
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* 获取推广人排行
|
* 获取推广人排行
|
||||||
* */
|
* */
|
||||||
export function getRankList(q) {
|
export function getRankList(q) {
|
||||||
return request.get("rank", q);
|
return request.get('rank', q)
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* 获取佣金排名
|
* 获取佣金排名
|
||||||
* */
|
* */
|
||||||
export function getBrokerageRank(q) {
|
export function getBrokerageRank(q) {
|
||||||
return request.get("brokerage_rank", q);
|
return request.get('brokerage_rank', q)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测会员等级
|
* 检测会员等级
|
||||||
*/
|
*/
|
||||||
export function setDetection() {
|
export function setDetection() {
|
||||||
return request.get("user/level/detection");
|
return request.get('user/level/detection')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function getRechargeApi() {
|
export function getRechargeApi() {
|
||||||
return request.get("recharge/index");
|
return request.get('recharge/index')
|
||||||
}
|
}
|
||||||
|
@ -1,209 +1,210 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="adv-box mx20 mb10">
|
<view class="adv-box mx20 mb10">
|
||||||
<!-- 模板1-->
|
<!-- 模板1-->
|
||||||
<view class="x-f" v-if="detail.style == 1">
|
<view class="x-f" v-if="detail.style == 1">
|
||||||
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image style="width: 710rpx; height: 220rpx" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板2-->
|
<!-- 模板2-->
|
||||||
<view class="type1 x-f" v-if="detail.style == 2">
|
<view class="type1 x-f" v-if="detail.style == 2">
|
||||||
<image class="type1-img" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type1-img" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type1-img" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type1-img" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板3-->
|
<!-- 模板3-->
|
||||||
<view class="type2 x-bc" v-if="detail.style == 3">
|
<view class="type2 x-bc" v-if="detail.style == 3">
|
||||||
<image class="type2-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type2-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<view class="y-f type2-box">
|
<view class="y-f type2-box">
|
||||||
<image class="type2-img2" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
<image class="type2-img2" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill" style="border-bottom: 1rpx solid #f6f6f6"></image>
|
||||||
<image class="type2-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type2-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板4-->
|
<!-- 模板4-->
|
||||||
<view class="type3 x-bc" v-if="detail.style == 4">
|
<view class="type3 x-bc" v-if="detail.style == 4">
|
||||||
<view class="type3-box y-f">
|
<view class="type3-box y-f">
|
||||||
<image class="type3-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type3-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type3-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type3-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type3-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type3-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板5-->
|
<!-- 模板5-->
|
||||||
<view class="type4 y-f" v-if="detail.style == 5">
|
<view class="type4 y-f" v-if="detail.style == 5">
|
||||||
<view class="type4-box x-f">
|
<view class="type4-box x-f">
|
||||||
<image class="type4-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type4-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type4-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type4-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type4-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type4-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板6-->
|
<!-- 模板6-->
|
||||||
<view class="type5 y-f" v-if="detail.style == 6">
|
<view class="type5 y-f" v-if="detail.style == 6">
|
||||||
<image class="type5-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type5-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<view class="type5-box x-bc">
|
<view class="type5-box x-bc">
|
||||||
<image class="type5-img2" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
|
<image class="type5-img2" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill" style="border-bottom: 1rpx solid #f6f6f6"></image>
|
||||||
<image class="type5-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type5-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板7-->
|
<!-- 模板7-->
|
||||||
<view class="type6 y-f" v-if="detail.style == 7">
|
<view class="type6 y-f" v-if="detail.style == 7">
|
||||||
<view class="x-f type6-box1">
|
<view class="x-f type6-box1">
|
||||||
<image class="type6-img1" @tap="jump(detail.list[0].uniapp_url)" :src="detail.list[0].image" mode="aspectFill"></image>
|
<image class="type6-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img1" @tap="jump(detail.list[1].uniapp_url)" :src="detail.list[1].image" mode="aspectFill"></image>
|
<image class="type6-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="x-f type6-box2">
|
<view class="x-f type6-box2">
|
||||||
<image class="type6-img2" @tap="jump(detail.list[2].uniapp_url)" :src="detail.list[2].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[3].uniapp_url)" :src="detail.list[3].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[3])" :src="detail.list[3].image" mode="aspectFill"></image>
|
||||||
<image class="type6-img2" @tap="jump(detail.list[4].uniapp_url)" :src="detail.list[4].image" mode="aspectFill"></image>
|
<image class="type6-img2" @tap="jump(detail.list[4])" :src="detail.list[4].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: Object
|
detail: Object,
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
jump(path) {
|
jump(item) {
|
||||||
if (item.uniapp_url) {
|
console.log(item)
|
||||||
this.$yrouter.push(path)
|
if (item) {
|
||||||
}
|
this.$yrouter.push(path)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.adv-box {
|
.adv-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.type1 {
|
.type1 {
|
||||||
.type1-img {
|
.type1-img {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2 {
|
.type2 {
|
||||||
.type2-img1 {
|
.type2-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type2-box {
|
.type2-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
|
|
||||||
.type2-img2 {
|
.type2-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3 {
|
.type3 {
|
||||||
.type3-box {
|
.type3-box {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
.type3-img1 {
|
.type3-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type3-img2 {
|
.type3-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4 {
|
.type4 {
|
||||||
.type4-box {
|
.type4-box {
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
.type4-img1 {
|
.type4-img1 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type4-img2 {
|
.type4-img2 {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5 {
|
.type5 {
|
||||||
.type5-img1 {
|
.type5-img1 {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type5-box {
|
.type5-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
|
|
||||||
.type5-img2 {
|
.type5-img2 {
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6 {
|
.type6 {
|
||||||
.type6-box1 {
|
.type6-box1 {
|
||||||
.type6-img1 {
|
.type6-img1 {
|
||||||
width: (710rpx/2);
|
width: (710rpx/2);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type6-box2 {
|
.type6-box2 {
|
||||||
border-top: 1rpx solid #f6f6f6;
|
border-top: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
.type6-img2 {
|
.type6-img2 {
|
||||||
width: (710rpx/3);
|
width: (710rpx/3);
|
||||||
height: (340rpx/2);
|
height: (340rpx/2);
|
||||||
border-right: 1rpx solid #f6f6f6;
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
// background-color: #ccc;
|
// background-color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,240 +1,217 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="adv-box mx20 mb10">
|
<view class="adv-box mx20 mb10">
|
||||||
<!-- 模板1-->
|
<!-- 模板1-->
|
||||||
<view class="x-f" v-if="detail.style == 1">
|
<view class="x-f" v-if="detail.style == 1">
|
||||||
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image style="width: 710rpx; height: 220rpx" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
mode="aspectFill"></image>
|
</view>
|
||||||
</view>
|
<!-- 模板2-->
|
||||||
<!-- 模板2-->
|
<view class="type1 x-f" v-if="detail.style == 2">
|
||||||
<view class="type1 x-f" v-if="detail.style == 2">
|
<image class="type1-img" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"> </image>
|
||||||
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<image class="type1-img" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"> </image>
|
||||||
</image>
|
</view>
|
||||||
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill">
|
<!-- 模板3-->
|
||||||
</image>
|
<view class="type2 x-bc" v-if="detail.style == 3">
|
||||||
</view>
|
<image class="type2-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"> </image>
|
||||||
<!-- 模板3-->
|
<view class="y-f type2-box">
|
||||||
<view class="type2 x-bc" v-if="detail.style == 3">
|
<image class="type2-img2" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill" style="border-bottom: 1rpx solid #f6f6f6"></image>
|
||||||
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<image class="type2-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
</image>
|
</view>
|
||||||
<view class="y-f type2-box">
|
</view>
|
||||||
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
<!-- 模板4-->
|
||||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
<view class="type3 x-bc" v-if="detail.style == 4">
|
||||||
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
<view class="type3-box y-f">
|
||||||
mode="aspectFill"></image>
|
<image class="type3-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
</view>
|
<image class="type3-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 模板4-->
|
<image class="type3-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"> </image>
|
||||||
<view class="type3 x-bc" v-if="detail.style == 4">
|
</view>
|
||||||
<view class="type3-box y-f">
|
<!-- 模板5-->
|
||||||
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<view class="type4 y-f" v-if="detail.style == 5">
|
||||||
mode="aspectFill"></image>
|
<view class="type4-box x-f">
|
||||||
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
<image class="type4-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
mode="aspectFill"></image>
|
<image class="type4-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
<image class="type4-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"> </image>
|
||||||
</image>
|
</view>
|
||||||
</view>
|
<!-- 模板6-->
|
||||||
<!-- 模板5-->
|
<view class="type5 y-f" v-if="detail.style == 6">
|
||||||
<view class="type4 y-f" v-if="detail.style == 5">
|
<image class="type5-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"> </image>
|
||||||
<view class="type4-box x-f">
|
<view class="type5-box x-bc">
|
||||||
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
<image class="type5-img2" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill" style="border-bottom: 1rpx solid #f6f6f6"></image>
|
||||||
mode="aspectFill"></image>
|
<image class="type5-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
</view>
|
||||||
mode="aspectFill"></image>
|
</view>
|
||||||
</view>
|
<!-- 模板7-->
|
||||||
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
|
<view class="type6 y-f" v-if="detail.style == 7">
|
||||||
</image>
|
<view class="x-f type6-box1">
|
||||||
</view>
|
<image class="type6-img1" @tap="jump(detail.list[0])" :src="detail.list[0].image" mode="aspectFill"></image>
|
||||||
<!-- 模板6-->
|
<image class="type6-img1" @tap="jump(detail.list[1])" :src="detail.list[1].image" mode="aspectFill"></image>
|
||||||
<view class="type5 y-f" v-if="detail.style == 6">
|
</view>
|
||||||
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
|
<view class="x-f type6-box2">
|
||||||
</image>
|
<image class="type6-img2" @tap="jump(detail.list[2])" :src="detail.list[2].image" mode="aspectFill"></image>
|
||||||
<view class="type5-box x-bc">
|
<image class="type6-img2" @tap="jump(detail.list[3])" :src="detail.list[3].image" mode="aspectFill"></image>
|
||||||
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
|
<image class="type6-img2" @tap="jump(detail.list[4])" :src="detail.list[4].image" mode="aspectFill"></image>
|
||||||
style="border-bottom:1rpx solid #f6f6f6"></image>
|
</view>
|
||||||
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
</view>
|
||||||
mode="aspectFill"></image>
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 模板7-->
|
|
||||||
<view class="type6 y-f" v-if="detail.style == 7">
|
|
||||||
<view class="x-f type6-box1">
|
|
||||||
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
<view class="x-f type6-box2">
|
|
||||||
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image"
|
|
||||||
mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {}
|
||||||
|
},
|
||||||
};
|
props: {
|
||||||
},
|
detail: Object,
|
||||||
props: {
|
},
|
||||||
detail:Object
|
computed: {},
|
||||||
},
|
created() {},
|
||||||
computed: {},
|
mounted() {
|
||||||
created() {
|
console.log(this)
|
||||||
},
|
},
|
||||||
mounted() {
|
methods: {
|
||||||
console.log(this)
|
// 路由跳转
|
||||||
},
|
jump(item) {
|
||||||
methods: {
|
if (item.uniapp_url) {
|
||||||
// 路由跳转
|
this.$yrouter.push(item.uniapp_url)
|
||||||
jump(path) {
|
}
|
||||||
this.$yrouter.push({
|
},
|
||||||
path
|
},
|
||||||
});
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.adv-box {
|
.adv-box {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
image{
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
.type1 {
|
||||||
|
.type1-img {
|
||||||
|
flex: 1;
|
||||||
|
height: 220rpx;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type2 {
|
||||||
|
.type2-img1 {
|
||||||
|
width: (710rpx/2);
|
||||||
|
height: 340rpx;
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type2-box {
|
||||||
|
flex: 1;
|
||||||
|
height: 340rpx;
|
||||||
|
width: (710rpx/2);
|
||||||
|
|
||||||
|
.type2-img2 {
|
||||||
|
height: (340rpx/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type3 {
|
||||||
|
.type3-box {
|
||||||
|
width: (710rpx/2);
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
|
.type3-img1 {
|
||||||
|
flex: 1;
|
||||||
|
height: (340rpx/2);
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type3-img2 {
|
||||||
|
flex: 1;
|
||||||
|
height: 340rpx;
|
||||||
|
width: (710rpx/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type4 {
|
||||||
|
.type4-box {
|
||||||
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
|
.type4-img1 {
|
||||||
|
flex: 1;
|
||||||
|
height: (340rpx/2);
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type4-img2 {
|
||||||
|
flex: 1;
|
||||||
|
height: (340rpx/2);
|
||||||
|
width: 710rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type5 {
|
||||||
|
.type5-img1 {
|
||||||
|
width: 710rpx;
|
||||||
|
height: (340rpx/2);
|
||||||
|
border-bottom: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type5-box {
|
||||||
|
flex: 1;
|
||||||
|
height: (340rpx/2);
|
||||||
|
width: 710rpx;
|
||||||
|
|
||||||
|
.type5-img2 {
|
||||||
|
height: (340rpx/2);
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type6 {
|
||||||
|
.type6-box1 {
|
||||||
|
.type6-img1 {
|
||||||
|
width: (710rpx/2);
|
||||||
|
height: (340rpx/2);
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.type6-box2 {
|
||||||
|
border-top: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
|
.type6-img2 {
|
||||||
|
width: (710rpx/3);
|
||||||
|
height: (340rpx/2);
|
||||||
|
border-right: 1rpx solid #f6f6f6;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
// background-color: #ccc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.type1 {
|
|
||||||
.type1-img {
|
|
||||||
flex: 1;
|
|
||||||
height: 220rpx;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type2 {
|
|
||||||
.type2-img1 {
|
|
||||||
width: (710rpx/2);
|
|
||||||
height: 340rpx;
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type2-box {
|
|
||||||
flex: 1;
|
|
||||||
height: 340rpx;
|
|
||||||
width: (710rpx/2);
|
|
||||||
|
|
||||||
.type2-img2 {
|
|
||||||
height: (340rpx/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type3 {
|
|
||||||
.type3-box {
|
|
||||||
width: (710rpx/2);
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
|
|
||||||
.type3-img1 {
|
|
||||||
flex: 1;
|
|
||||||
height: (340rpx/2);
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type3-img2 {
|
|
||||||
flex: 1;
|
|
||||||
height: 340rpx;
|
|
||||||
width: (710rpx/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type4 {
|
|
||||||
.type4-box {
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
|
|
||||||
.type4-img1 {
|
|
||||||
flex: 1;
|
|
||||||
height: (340rpx/2);
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type4-img2 {
|
|
||||||
flex: 1;
|
|
||||||
height: (340rpx/2);
|
|
||||||
width: 710rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type5 {
|
|
||||||
.type5-img1 {
|
|
||||||
width: 710rpx;
|
|
||||||
height: (340rpx/2);
|
|
||||||
border-bottom: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type5-box {
|
|
||||||
flex: 1;
|
|
||||||
height: (340rpx/2);
|
|
||||||
width: 710rpx;
|
|
||||||
|
|
||||||
.type5-img2 {
|
|
||||||
height: (340rpx/2);
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type6 {
|
|
||||||
.type6-box1 {
|
|
||||||
.type6-img1 {
|
|
||||||
width: (710rpx/2);
|
|
||||||
height: (340rpx/2);
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.type6-box2 {
|
|
||||||
border-top: 1rpx solid #f6f6f6;
|
|
||||||
|
|
||||||
.type6-img2 {
|
|
||||||
width: (710rpx/3);
|
|
||||||
height: (340rpx/2);
|
|
||||||
border-right: 1rpx solid #f6f6f6;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-right: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
// background-color: #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,131 +1,131 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="banner-swiper-box">
|
<view class="banner-swiper-box">
|
||||||
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
|
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
|
||||||
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
|
<swiper class="banner-carousel Shop-selector-rect" circular @change="swiperChange" :autoplay="true">
|
||||||
<swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item">
|
<swiper-item v-for="(item, index) in detail" :key="index" class="carousel-item">
|
||||||
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
|
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
|
||||||
</image>
|
</image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="banner-swiper-dots">
|
<view class="banner-swiper-dots">
|
||||||
<text :class="swiperCurrent === index ? 'banner-dot-active' : 'banner-dot'"
|
<text :class="swiperCurrent === index ? 'banner-dot-active' : 'banner-dot'" v-for="(dot, index) in detail.length"
|
||||||
v-for="(dot, index) in detail.length" :key="index"></text>
|
:key="index"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import colorThief from 'miniapp-color-thief';
|
import colorThief from 'miniapp-color-thief';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperCurrent: 0, //轮播下标
|
swiperCurrent: 0, //轮播下标
|
||||||
webviewId: 0,
|
webviewId: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
detail: {
|
detail: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: async function () {
|
created: async function() {
|
||||||
await this.doColorThief();
|
await this.doColorThief();
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
async doColorThief() {
|
async doColorThief() {
|
||||||
let that = this;
|
let that = this;
|
||||||
// 获取轮播图
|
// 获取轮播图
|
||||||
let item = this.detail[this.swiperCurrent];
|
let item = this.detail[this.swiperCurrent];
|
||||||
// 获取轮播图颜色
|
// 获取轮播图颜色
|
||||||
let bgcolor = item.color;
|
let bgcolor = item.color;
|
||||||
// 颜色不存在
|
// 颜色不存在
|
||||||
if (bgcolor === '') {
|
if (!bgcolor) {
|
||||||
that.$set(item, 'bgcolor', '#c40414');
|
that.$set(item, 'bgcolor', '#c40414');
|
||||||
that.$emit('getbgcolor', '#c40414');
|
that.$emit('getbgcolor', '#c40414');
|
||||||
} else {
|
} else {
|
||||||
that.$set(item, 'bgcolor', bgcolor);
|
that.$set(item, 'bgcolor', bgcolor);
|
||||||
that.$emit('getbgcolor', bgcolor);
|
that.$emit('getbgcolor', bgcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
swiperChange(e) {
|
swiperChange(e) {
|
||||||
this.swiperCurrent = e.detail.current;
|
this.swiperCurrent = e.detail.current;
|
||||||
this.doColorThief();
|
this.doColorThief();
|
||||||
let bgcolor = this.detail[this.swiperCurrent].bgcolor;
|
let bgcolor = this.detail[this.swiperCurrent].bgcolor;
|
||||||
this.$emit('getbgcolor', bgcolor);
|
this.$emit('getbgcolor', bgcolor);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 路由跳转
|
// 路由跳转
|
||||||
goRoll(item) {
|
goRoll(item) {
|
||||||
if (item.uniapp_url) {
|
if (item.uniapp_url) {
|
||||||
this.$yrouter.push(item.uniapp_url)
|
this.$yrouter.push(item.uniapp_url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
// 轮播
|
// 轮播
|
||||||
.banner-swiper-box {
|
.banner-swiper-box {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-swiper-box,
|
.banner-swiper-box,
|
||||||
.banner-carousel {
|
.banner-carousel {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 350upx;
|
height: 350upx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.carousel-item {
|
.carousel-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// padding: 0 28upx;
|
// padding: 0 28upx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-image {
|
.swiper-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// border-radius: 10upx;
|
// border-radius: 10upx;
|
||||||
// background: #ccc;
|
// background: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-swiper-dots {
|
.banner-swiper-dots {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
bottom: 20rpx;
|
bottom: 20rpx;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
|
||||||
.banner-dot {
|
.banner-dot {
|
||||||
width: 14rpx;
|
width: 14rpx;
|
||||||
height: 14rpx;
|
height: 14rpx;
|
||||||
background: rgba(255, 255, 255, 1);
|
background: rgba(255, 255, 255, 1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-dot-active {
|
.banner-dot-active {
|
||||||
width: 14rpx;
|
width: 14rpx;
|
||||||
height: 14rpx;
|
height: 14rpx;
|
||||||
background: #a8700d;
|
background: #a8700d;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.hide-canvas {
|
.hide-canvas {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: -99999upx;
|
top: -99999upx;
|
||||||
left: -99999upx;
|
left: -99999upx;
|
||||||
z-index: -99999;
|
z-index: -99999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<Banner v-if="item.type=='banner'" :detail="item.componentContent.bannerData" @getbgcolor="getbgcolor"></Banner>
|
<Banner v-if="item.type=='banner'" :detail="item.componentContent.bannerData" @getbgcolor="getbgcolor"></Banner>
|
||||||
<uni-notice-bar v-if="item.type=='noticeBar'" scrollable="true" @click="goRoll(item.componentContent.roll[0])" single="true" :speed="10"
|
<uni-notice-bar v-if="item.type=='noticeBar'" scrollable="true" @click="goRoll(item.componentContent.roll[0])"
|
||||||
showIcon="true" :text="item.componentContent.roll[0].info"></uni-notice-bar>
|
single="true" :speed="10" showIcon="true" :text="item.componentContent.roll[0].info"></uni-notice-bar>
|
||||||
<view class="content_box home_content_box">
|
<view class="content_box home_content_box">
|
||||||
<!-- 菜单 -->
|
<!-- 菜单 -->
|
||||||
<Menu :list="item.componentContent.menus" v-if="item.type=='menu'"></Menu>
|
<Menu :list="item.componentContent.menus" v-if="item.type=='menu'&&item.componentContent.menus"></Menu>
|
||||||
<!-- 滚动新闻 -->
|
<!-- 滚动新闻 -->
|
||||||
<!-- 广告 -->
|
<!-- 广告 -->
|
||||||
<Adv v-if="item.type=='adv'" :detail="item.componentContent.detail" />
|
<Adv v-if="item.type=='adv'&&item.componentContent.detail" :detail="item.componentContent.detail" />
|
||||||
<!-- 热门榜单 -->
|
<!-- 热门榜单 -->
|
||||||
<HotCommodity v-if="item.type=='hotCommodity'" :detail="likeInfo"></HotCommodity>
|
<HotCommodity v-if="item.type=='hotCommodity'" :detail="likeInfo"></HotCommodity>
|
||||||
<!-- 超值拼团 -->
|
<!-- 超值拼团 -->
|
||||||
@ -213,26 +213,26 @@
|
|||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
// title: "加载中",
|
// title: "加载中",
|
||||||
// });
|
// });
|
||||||
getCanvas().then(res => {
|
getCanvas().then(res => {}).catch(error => {
|
||||||
}).catch(error => {
|
this.homeData = JSON.parse(error.data.json)
|
||||||
this.homeData = JSON.parse(error.data.json)
|
console.log(this.homeData)
|
||||||
console.log(this.homeData[4])
|
console.log(222)
|
||||||
})
|
})
|
||||||
getHomeData().then((res) => {
|
getHomeData().then((res) => {
|
||||||
that.logoUrl = res.data.logoUrl;
|
that.logoUrl = res.data.logoUrl;
|
||||||
res.data.banner.map((item) => (item.bgcolor = item.color || ""));
|
res.data.banner.map((item) => (item.bgcolor = item.color || ""));
|
||||||
that.$set(that, "info", res.data.info);
|
that.$set(that, "info", res.data.info);
|
||||||
that.$set(that, "firstList", res.data.firstList);
|
that.$set(that, "firstList", res.data.firstList);
|
||||||
that.$set(that, "bastList", res.data.bastList);
|
that.$set(that, "bastList", res.data.bastList);
|
||||||
that.$set(that, "likeInfo", res.data.likeInfo);
|
that.$set(that, "likeInfo", res.data.likeInfo);
|
||||||
that.$set(that, "live", res.data.liveList);
|
that.$set(that, "live", res.data.liveList);
|
||||||
that.$set(that, "lovely", res.data.lovely);
|
that.$set(that, "lovely", res.data.lovely);
|
||||||
that.$set(that, "benefit", res.data.benefit);
|
that.$set(that, "benefit", res.data.benefit);
|
||||||
that.$set(that, "couponList", res.data.couponList);
|
that.$set(that, "couponList", res.data.couponList);
|
||||||
that.$set(that, "combinationList", res.data.combinationList);
|
that.$set(that, "combinationList", res.data.combinationList);
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
that.setOpenShare();
|
that.setOpenShare();
|
||||||
// that.doColorThief()
|
// that.doColorThief()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -6,158 +6,143 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||||
<button
|
<button class="code font-color-red" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">{{ text }}</button>
|
||||||
class="code font-color-red"
|
|
||||||
:disabled="disabled"
|
|
||||||
:class="disabled === true ? 'on' : ''"
|
|
||||||
@click="code"
|
|
||||||
>{{ text }}</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="confirmBnt bg-color-red" @click="confirm">确认绑定</view>
|
<view class="confirmBnt bg-color-red" @click="confirm">确认绑定</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from 'vuex'
|
||||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
import sendVerifyCode from '@/mixins/SendVerifyCode'
|
||||||
import { required, alpha_num, chs_phone } from "@/utils/validate";
|
import { required, alpha_num, chs_phone } from '@/utils/validate'
|
||||||
import { validatorDefaultCatch } from "@/utils/dialog";
|
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||||
import { registerVerify, bindingPhone } from "@/api/user";
|
import { registerVerify, wxappBindingPhone } from '@/api/user'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BindingPhone",
|
name: 'BindingPhone',
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
captcha: "",
|
captcha: '',
|
||||||
phone: "" //手机号
|
phone: '', //手机号
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mixins: [sendVerifyCode],
|
mixins: [sendVerifyCode],
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: mapGetters(['userInfo']),
|
||||||
mounted: function() {},
|
mounted: function () {},
|
||||||
methods: {
|
methods: {
|
||||||
async confirm() {
|
async confirm() {
|
||||||
let that = this;
|
let that = this
|
||||||
const { phone, captcha } = that;
|
const { phone, captcha } = that
|
||||||
try {
|
try {
|
||||||
await that
|
await that
|
||||||
.$validator({
|
.$validator({
|
||||||
phone: [
|
phone: [chs_phone(chs_phone.message('手机号码')), alpha_num(alpha_num.message())],
|
||||||
chs_phone(chs_phone.message("手机号码")),
|
captcha: [required(required.message('验证码')), alpha_num(alpha_num.message('验证码'))],
|
||||||
alpha_num(alpha_num.message())
|
|
||||||
],
|
|
||||||
captcha: [
|
|
||||||
required(required.message("验证码")),
|
|
||||||
alpha_num(alpha_num.message("验证码"))
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
.validate({ phone, captcha });
|
.validate({ phone, captcha })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return validatorDefaultCatch(e);
|
return validatorDefaultCatch(e)
|
||||||
}
|
}
|
||||||
bindingPhone({
|
wxappBindingPhone({
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
captcha: this.captcha
|
captcha: this.captcha,
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.data !== undefined && res.data.is_bind) {
|
if (res.data !== undefined && res.data.is_bind) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: '提示',
|
||||||
content: "确认绑定?",
|
content: '确认绑定?',
|
||||||
success: function(res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
bindingPhone({
|
wxappBindingPhone({
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
captcha: this.captcha,
|
captcha: this.captcha,
|
||||||
step: 1
|
step: 1,
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
that.$yrouter.replace({
|
that.$yrouter.replace({
|
||||||
path: "/pages/user/PersonalData/index"
|
path: '/pages/user/PersonalData/index',
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
that.$yrouter.replace({
|
that.$yrouter.replace({
|
||||||
path: "/pages/user/PersonalData/index"
|
path: '/pages/user/PersonalData/index',
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "已取消绑定",
|
title: '已取消绑定',
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
that.$yrouter.replace({
|
that.$yrouter.replace({
|
||||||
path: "/pages/user/PersonalData/index"
|
path: '/pages/user/PersonalData/index',
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
that.$yrouter.replace({ path: "/pages/user/PersonalData/index" });
|
that.$yrouter.replace({ path: '/pages/user/PersonalData/index' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
async code() {
|
async code() {
|
||||||
let that = this;
|
let that = this
|
||||||
const { phone } = that;
|
const { phone } = that
|
||||||
try {
|
try {
|
||||||
await that
|
await that
|
||||||
.$validator({
|
.$validator({
|
||||||
phone: [
|
phone: [required(required.message('手机号码')), chs_phone(chs_phone.message())],
|
||||||
required(required.message("手机号码")),
|
|
||||||
chs_phone(chs_phone.message())
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
.validate({ phone });
|
.validate({ phone })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return validatorDefaultCatch(e);
|
return validatorDefaultCatch(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
registerVerify({ phone: phone })
|
registerVerify({ phone: phone })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
that.sendCode();
|
that.sendCode()
|
||||||
})
|
})
|
||||||
.catch(res => {
|
.catch(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: "none",
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="">
|
<style lang=""></style>
|
||||||
</style>
|
|
||||||
|
Reference in New Issue
Block a user