作者 lihongjuan

1

正在显示 93 个修改的文件 包含 4512 行增加0 行删除

要显示太多修改。

为保证性能只显示 93 of 93+ 个文件。

  1 +//app.js
  2 +App({
  3 + onLaunch: function () {
  4 + // 展示本地存储能力
  5 + var logs = wx.getStorageSync('logs') || []
  6 + logs.unshift(Date.now())
  7 + wx.setStorageSync('logs', logs)
  8 + this.getsharepic()
  9 +
  10 + // 登录
  11 + wx.login({
  12 + success: res => {
  13 + // 发送 res.code 到后台换取 openId, sessionKey, unionId
  14 + }
  15 + })
  16 + // 获取用户信息
  17 + wx.getSetting({
  18 + success: res => {
  19 + if (res.authSetting['scope.userInfo']) {
  20 + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
  21 + wx.getUserInfo({
  22 + success: res => {
  23 + // 可以将 res 发送给后台解码出 unionId
  24 + this.globalData.userInfo = res.userInfo
  25 +
  26 + // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
  27 + // 所以此处加入 callback 以防止这种情况
  28 + if (this.userInfoReadyCallback) {
  29 + this.userInfoReadyCallback(res)
  30 + }
  31 + }
  32 + })
  33 + }
  34 + }
  35 + })
  36 + },
  37 +
  38 + // 获取分享图片
  39 + getsharepic(){
  40 + let that = this;
  41 + var url = 'user/share';
  42 + var params = {
  43 +
  44 +
  45 + }
  46 + that.post(url, params,"post").then((res) => {
  47 + console.log(res);
  48 + that.globalData.sharepic = res.thumbnail;
  49 + console.log(that.globalData)
  50 +
  51 +
  52 +
  53 + }).catch((err) => {
  54 +
  55 + })
  56 +
  57 + },
  58 +
  59 + //封装公共接口
  60 +
  61 + post: function (url, data, headerParams) {
  62 + wx.showNavigationBarLoading()
  63 + var promise = new Promise((resolve, reject) => {
  64 + //init
  65 + let that = this;
  66 + let postData = data;
  67 + let baseUrl = 'https://areial.w.broing.cn/api/';
  68 + //网络请求
  69 + let header = {
  70 + // 'XX-Device-Type': 'wxapp',
  71 + 'token': wx.getStorageSync("token") || ''
  72 + }
  73 + header = Object.assign(header, headerParams)
  74 + //网络请求
  75 + wx.request({
  76 + url: baseUrl + url,
  77 + data: postData,
  78 + method: headerParams,
  79 + header: header,
  80 + success: function (res) {
  81 + console.log(res)//返回取得的数据
  82 + if (res.data.code == '1') {
  83 + resolve(res.data.data);
  84 + }else if(res.data.code=='401'){
  85 + wx.showToast({
  86 + title: '请重新登录',
  87 + icon: 'none'
  88 + })
  89 +
  90 + setTimeout(function () {
  91 + wx.navigateTo({
  92 + url: '/pages/index/index',
  93 + })
  94 + }, 1500)
  95 + }else {
  96 + reject(res.data)
  97 + }
  98 +
  99 + },
  100 + fail: function (e) {
  101 + reject('网络出错');
  102 + // wx.hideLoading()
  103 + wx.hideNavigationBarLoading()
  104 + },
  105 + complete: function () {
  106 + wx.hideNavigationBarLoading()
  107 + },
  108 + })
  109 + });
  110 + return promise;
  111 + },
  112 +
  113 + globalData: {
  114 + userInfo: null
  115 + }
  116 +})
  1 +{
  2 + "pages": [
  3 + "pages/startindex/startindex",
  4 + "pages/homepage/homepage",
  5 +
  6 + "pages/goumaixuzhi/goumaixuzhi",
  7 + "pages/kaifapiao/kaifapiao",
  8 + "pages/lianjie/lianjie",
  9 + "pages/getphone/getphone",
  10 + "pages/index/index",
  11 + "pages/jiesuanpage/jiesuanpage",
  12 + "pages/vipdetail/vipdetail",
  13 + "pages/tupainpic/tupainpic",
  14 + "pages/picdetail/picdetail",
  15 + "pages/videodetail/videodetail",
  16 + "pages/videobox/videobox",
  17 + "pages/xiaofeijilu/xiaofeijilu",
  18 + "pages/picbox/picbox",
  19 + "pages/huiyuanknow/huiyuanknow",
  20 + "pages/chongzhi/chongzhi",
  21 + "pages/mine/mine",
  22 + "pages/orderbox/orderbox",
  23 + "pages/search/search",
  24 + "pages/searchresult/searcgresult",
  25 + "pages/cart/cart",
  26 + "pages/kind/kind",
  27 + "pages/logs/logs",
  28 + "pages/videoplay/videoplay",
  29 + "pages/jingmei/jingmei",
  30 + "pages/fuwuxieyi/fuwuxieyi",
  31 + "pages/pichezi/pichezi",
  32 + "pages/tupianbox/tupianbox",
  33 + "pages/yulanfapiao/yulanfapiao",
  34 + "pages/tousujianyi/tousujianyi"
  35 +
  36 + ],
  37 + "window": {
  38 + "backgroundTextStyle": "light",
  39 + "navigationBarBackgroundColor": "#fff",
  40 + "navigationBarTitleText": "",
  41 + "navigationBarTextStyle": "black"
  42 + },
  43 + "sitemapLocation": "sitemap.json",
  44 + "tabBar": {
  45 + "selectedColor": "#FB6324",
  46 + "list": [
  47 + {
  48 + "pagePath": "pages/homepage/homepage",
  49 + "text": "首页",
  50 + "selectedColor": "#FB6324",
  51 + "iconPath": "img/shouye.png",
  52 + "selectedIconPath": "img/shouyeactive.png"
  53 + },
  54 + {
  55 + "pagePath": "pages/kind/kind",
  56 + "text": "分类",
  57 + "selectedColor": "#FB6324",
  58 + "iconPath": "img/kind.png",
  59 + "selectedIconPath": "img/kindactive.png"
  60 + },
  61 + {
  62 + "pagePath": "pages/cart/cart",
  63 + "text": "购物车",
  64 + "selectedColor": "#FB6324",
  65 + "iconPath": "img/cart.png",
  66 + "selectedIconPath": "img/cartactive.png"
  67 + },
  68 + {
  69 + "pagePath": "pages/mine/mine",
  70 + "text": "我的",
  71 + "selectedColor": "#FB6324",
  72 + "iconPath": "img/mine.png",
  73 + "selectedIconPath": "img/mineactive.png"
  74 + }
  75 + ]
  76 + }
  77 +}
  1 +/**app.wxss**/
  2 +page{
  3 + background: #fff;
  4 +}
  5 +.container {
  6 + height: 100%;
  7 + display: flex;
  8 + flex-direction: column;
  9 + align-items: center;
  10 + justify-content: space-between;
  11 + padding: 200rpx 0;
  12 + box-sizing: border-box;
  13 +}
  14 +image{
  15 + width:100%;
  16 + height:100%;
  17 +}
  18 +
  19 +.anniu{
  20 + width:80rpx;
  21 + height:80rpx;
  22 + font-size: 0;
  23 + position: absolute;
  24 + left:50%;
  25 + top:50%;
  26 + transform: translate(-50%,-50%)
  27 +}
  28 +.anniux{
  29 + width:40rpx;
  30 + height:40rpx;
  31 + font-size: 0;
  32 + position: absolute;
  33 + left:50%;
  34 + top:50%;
  35 + transform: translate(-50%,-50%)
  36 +}
  37 +.searchsanjiao{
  38 + width:21rpx;
  39 + height:27rpx;
  40 + font-size: 0;
  41 + margin-left:8rpx;
  42 +
  43 +}
  44 +
  45 +.xiazairegister {
  46 + width: 100%;
  47 + height: 100%;
  48 + background-color: rgba(0, 0, 0, 0.5);
  49 + position: fixed;
  50 + top: 0;
  51 + left: 0;
  52 + right: 0;
  53 + z-index: 5;
  54 +}
  55 +
  56 +.picxian {
  57 + width: 1rpx;
  58 + height: 48rpx;
  59 + background: #eee;
  60 + margin-left: 18rpx;
  61 +}
  62 +
  63 +.nodata{
  64 + color:#999;
  65 + font-size: 30rpx;
  66 + text-align: center;
  67 + margin-top:260rpx;
  68 +}
  69 +.fangdaimg{
  70 + width:32rpx;
  71 + height:32rpx;
  72 + font-size: 0;
  73 + position: absolute;
  74 + bottom:0;
  75 + right:0
  76 +}
  77 +.xuantype{
  78 + display:flex;
  79 + align-items: center;
  80 + height:60rpx;
  81 + background: #F9F9F9;
  82 + padding-right:24rpx;
  83 + border-radius: 4rpx;
  84 + margin-left:30rpx;
  85 +
  86 +}
  87 +
  88 +
  89 +/* 购买须知 */
  90 +
  91 +.buybox {
  92 + padding: 24rpx;
  93 + box-sizing: border-box;
  94 + color: #3d444d;
  95 + font-size: 28rpx;
  96 + line-height: 1.5;
  97 +}
  98 +
  99 +.secondtitle {
  100 + color: #8c9198;
  101 + font-size: 32rpx;
  102 + text-align: center;
  103 + margin-top:20rpx;
  104 +}
  105 +
  106 +.goumiatext {
  107 + text-indent: 60rpx;
  108 + margin-top:20rpx;
  109 +}
  110 +.text{
  111 + line-height: 1.5
  112 +}
  113 +.gouxuanleft{
  114 + width:36rpx;
  115 + height:36rpx;
  116 + font-size: 0
  117 +}
  118 +.gouxuanleft image{
  119 + width:100%;
  120 + height:100%;
  121 +}
  122 +.gouxuanright{
  123 + color:#5B5E63;
  124 + font-size: 28rpx;
  125 + margin-left:20rpx;
  126 + font-weight: bold;
  127 +}
  128 +.gouxuan{
  129 + display:flex;
  130 + align-items: center;
  131 + justify-content: center;
  132 + margin-top:20rpx;
  133 +}
  134 +
  135 +.quebtn {
  136 + width: 286rpx;
  137 + height: 88rpx;
  138 + background: rgba(251, 99, 36, 1);
  139 + opacity: 1;
  140 + border-radius: 44rpx;
  141 + color: #fff;
  142 + font-size: 32rpx;
  143 + text-align: center;
  144 + line-height: 88rpx;
  145 + margin:40rpx auto 0;
  146 +}
  147 +.register {
  148 + width: 100%;
  149 + height: 100%;
  150 + background-color: rgba(0, 0, 0, 0.7);
  151 + position: fixed;
  152 + top: 0;
  153 + left: 0;
  154 + right: 0;
  155 + z-index: 999;
  156 +}

949 字节

581 字节

898 字节

935 字节

892 字节

839 字节

932 字节

1000 字节

948 字节

455 字节

  1 +// pages/cart/cart.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + array: ['2k', '4k', '8k'],
  10 + cartindex: 0,
  11 + cartlist: [],
  12 + totalmoney: 0,
  13 + video_id: [],
  14 + pic_id: [],
  15 + totalcartarr: [],
  16 + totalsel: false,
  17 + pp: [],
  18 + diannum: 0,
  19 + hebing: [],
  20 + delshow: false,
  21 + video_attr: [],
  22 + goucartid: []
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面加载
  27 + */
  28 + onLoad: function(options) {
  29 +
  30 + },
  31 + ti(){
  32 +
  33 + },
  34 +
  35 + // 图片详情
  36 + picdetail(e) {
  37 + console.log(e)
  38 + let id = e.currentTarget.dataset.id
  39 + wx.navigateTo({
  40 + url: '/pages/picdetail/picdetail?id=' + id,
  41 + })
  42 + },
  43 + // 视频详情
  44 +
  45 + videodetail(e) {
  46 + console.log(e)
  47 + let id = e.currentTarget.dataset.id;
  48 + wx.navigateTo({
  49 + url: '/pages/videodetail/videodetail?id=' + id,
  50 + })
  51 + },
  52 +
  53 + manage() {
  54 + this.setData({
  55 + delshow: !this.data.delshow
  56 + })
  57 + },
  58 +
  59 + bindPickerChange: function(e) {
  60 + let newdiannum = this.data.diannum;
  61 + newdiannum++;
  62 + this.setData({
  63 + diannum: newdiannum
  64 + })
  65 + console.log(newdiannum)
  66 + console.log('picker发送选择改变,携带值为', e.detail.value)
  67 + console.log(e)
  68 + let index = e.currentTarget.dataset.index;
  69 + let newcartlist = this.data.cartlist;
  70 +
  71 + let firmoney = newcartlist[index].videoprice
  72 +
  73 + newcartlist[index].cartindex = e.detail.value;
  74 + if (newcartlist[index].video_id.vipprice == undefined) {
  75 + if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
  76 + newcartlist[index].videoprice = newcartlist[index].video_id.price
  77 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
  78 + newcartlist[index].videoprice = newcartlist[index].video_id.four_price
  79 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
  80 + newcartlist[index].videoprice = newcartlist[index].video_id.eight_price
  81 + }
  82 +
  83 + } else {
  84 + if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
  85 + newcartlist[index].videoprice = newcartlist[index].video_id.vipprice
  86 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
  87 + newcartlist[index].videoprice = newcartlist[index].video_id.four_vipprice
  88 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
  89 + newcartlist[index].videoprice = newcartlist[index].video_id.eight_vipprice
  90 + }
  91 +
  92 + }
  93 +
  94 +
  95 + let tt = 0;
  96 + let newtotalmoney = this.data.totalmoney;
  97 +
  98 +
  99 + let pp = this.data.pp;
  100 + pp.push(Number(newcartlist[index].videoprice));
  101 + console.log(pp)
  102 + let len = pp.length;
  103 + tt = Number(tt) + pp[len - 1]
  104 +
  105 + if (newcartlist[index].sel == true) {
  106 + if (this.data.diannum == 1) {
  107 + console.log(newcartlist[index].videoprice)
  108 + newtotalmoney = newtotalmoney - firmoney;
  109 + newtotalmoney = newtotalmoney + tt
  110 + } else {
  111 + newtotalmoney = newtotalmoney - pp[newdiannum - 2];
  112 + console.log()
  113 + newtotalmoney = newtotalmoney + tt
  114 +
  115 + }
  116 + } else {
  117 + newtotalmoney = newtotalmoney + tt
  118 + }
  119 +
  120 + console.log(newtotalmoney)
  121 + if (newcartlist[index].sel == true) {
  122 + this.setData({
  123 + totalmoney: newtotalmoney
  124 + })
  125 + }
  126 +
  127 + let newhebing=this.data.hebing;
  128 +
  129 + for (var i = 0; i < newcartlist.length; i++) {
  130 + for (var j = 0; j < newhebing.length; j++) {
  131 + if (newhebing[j].id == newcartlist[i].id) {
  132 + newhebing[j] = newcartlist[i]
  133 + }
  134 + }
  135 + }
  136 +
  137 + // newcartlist[index].cartindex = e.detail.value;
  138 +
  139 + this.setData({
  140 + cartlist: newcartlist,
  141 + hebing:newhebing
  142 +
  143 + })
  144 +
  145 + console.log(this.data.cartlist);
  146 + console.log(this.data.hebing)
  147 +
  148 +
  149 + },
  150 +
  151 + //获取购物车列表
  152 + getcartlsit() {
  153 + let that = this;
  154 + let url = 'user/car';
  155 +
  156 + app.post(url, '', 'post').then((res) => {
  157 + console.log(res)
  158 + for (var obj of res) {
  159 + obj.sel = false;
  160 + obj.cartindex = 0;
  161 + if (obj.video_id != null) {
  162 + if (obj.video_id.vipprice == undefined) {
  163 + if (obj.video_id.two_url != '') {
  164 + obj.videoprice = obj.video_id.price
  165 + } else if (obj.video_id.four_url != '') {
  166 + obj.videoprice = obj.video_id.four_price
  167 + } else if (obj.video_id.eight_url != '') {
  168 + obj.videoprice = obj.video_id.eight_price
  169 + }
  170 +
  171 + } else {
  172 + if (obj.video_id.two_url != '') {
  173 + obj.videoprice = obj.video_id.vipprice
  174 + } else if (obj.video_id.four_url != '') {
  175 + obj.videoprice = obj.video_id.four_vipprice
  176 + } else if (obj.video_id.eight_url != '') {
  177 + obj.videoprice = obj.video_id.eight_vipprice
  178 + }
  179 +
  180 +
  181 + }
  182 +
  183 + }
  184 + if(obj.pic_id!=null){
  185 + console.log(obj)
  186 + console.log(obj.pic_id.vipprice)
  187 + }
  188 + }
  189 +
  190 + that.setData({
  191 + cartlist: res
  192 + })
  193 +
  194 +
  195 + let newcartlist = res;
  196 +
  197 +
  198 + for (var obj of newcartlist) {
  199 + if (obj.video_id != null) {
  200 + let arr = [];
  201 + if (obj.video_id.eight_url != '') {
  202 + arr.unshift(8 + 'k')
  203 + }
  204 +
  205 + if (obj.video_id.four_url != '') {
  206 + arr.unshift(4 + 'k')
  207 + }
  208 + if (obj.video_id.two_url != '') {
  209 + arr.unshift(2 + 'k')
  210 + }
  211 +
  212 + obj.video_id.videotype = arr
  213 + }
  214 +
  215 + }
  216 +
  217 + that.setData({
  218 + cartlist: newcartlist
  219 + })
  220 +
  221 + console.log(that.data.cartlist)
  222 +
  223 + }).catch((err) => {
  224 +
  225 + })
  226 + },
  227 +
  228 + // 选择购物车
  229 + selcart(e) {
  230 + let that = this;
  231 + let token = wx.getStorageSync("token");
  232 + if (token == '') {
  233 + wx.showToast({
  234 + title: '请先登录',
  235 + icon: 'none'
  236 + })
  237 +
  238 + setTimeout(function() {
  239 + wx.navigateTo({
  240 + url: '/pages/index/index',
  241 + })
  242 + }, 1500)
  243 + } else {
  244 + console.log(e)
  245 + let cartid = e.currentTarget.dataset.cartid;
  246 + let sel = e.currentTarget.dataset.sel;
  247 + let type = e.currentTarget.dataset.type;
  248 + let newpic_id = that.data.pic_id;
  249 + let newvideo_id = that.data.video_id;
  250 + let newgoucartid = that.data.goucartid;
  251 + let newtotalcartarr = that.data.totalcartarr;
  252 + let newcartlist = this.data.cartlist;
  253 + let newtotalmoney = that.data.totalmoney;
  254 + let newhebing = that.data.hebing;
  255 + let newvideo_attr = that.data.video_attr;
  256 +
  257 + for (var obj of newcartlist) {
  258 + if (obj.id == cartid) {
  259 + obj.sel = !obj.sel;
  260 + if (obj.sel == true && type == 1) {
  261 + newvideo_id.push(obj.video_id.id);
  262 + newtotalcartarr.push(cartid);
  263 + newtotalmoney = Number(newtotalmoney) + Number(obj.videoprice);
  264 + newhebing.push(obj)
  265 + console.log('111', newtotalcartarr)
  266 +
  267 + } else if (obj.sel == false && type == 1) {
  268 +
  269 +
  270 + for(var i=0;i<newtotalcartarr.length;i++){
  271 + if (newtotalcartarr[i]==cartid){
  272 + newtotalcartarr.splice(i,1);
  273 + newtotalmoney = Number(newtotalmoney) - Number(obj.videoprice);
  274 + }
  275 + }
  276 +
  277 + console.log('333', newvideo_id, newtotalcartarr)
  278 +
  279 + for (var j = 0; j < newtotalcartarr.length; j++) {
  280 + if (newtotalcartarr[j] == cartid) {
  281 + newtotalcartarr.splice(j, 1)
  282 + }
  283 + }
  284 +
  285 + for (var k = 0; k < newhebing.length; k++) {
  286 + if (newhebing[k].id == cartid) {
  287 + newhebing.splice(k, 1)
  288 + }
  289 + }
  290 +
  291 + } else if (obj.sel == true && type == 2) {
  292 + newpic_id.push(obj.pic_id.id);
  293 + newtotalcartarr.push(cartid);
  294 + newhebing.push(obj)
  295 + if (obj.pic_id.vipprice == undefined) {
  296 + newtotalmoney = Number(newtotalmoney) + Number(obj.pic_id.price)
  297 + } else {
  298 + newtotalmoney = Number(newtotalmoney) + Number(obj.pic_id.vipprice)
  299 + }
  300 +
  301 + console.log(newpic_id, newtotalcartarr)
  302 +
  303 +
  304 + } else if (obj.sel == false && type == 2) {
  305 + for(var i=0;i<newtotalcartarr.length;i++){
  306 + if(newtotalcartarr[i]==cartid){
  307 + newtotalcartarr.splice(i,1);
  308 + if (obj.pic_id.vipprice == undefined) {
  309 + newtotalmoney = Number(newtotalmoney) - Number(obj.pic_id.price)
  310 + } else {
  311 + newtotalmoney = Number(newtotalmoney) - Number(obj.pic_id.vipprice)
  312 + }
  313 + }
  314 + }
  315 +
  316 + // console.log('444', newpic_id, newtotalcartarr);
  317 + // for (var j = 0; j < newtotalcartarr.length; j++) {
  318 + // if (newtotalcartarr[j] == cartid) {
  319 + // newtotalcartarr.splice(j, 1)
  320 + // }
  321 + // }
  322 +
  323 + for (var k = 0; k < newhebing.length; k++) {
  324 + if (newhebing[k].id == cartid) {
  325 + newhebing.splice(k, 1)
  326 + }
  327 +
  328 + }
  329 + }
  330 + }
  331 + }
  332 +
  333 + if (newcartlist.length == newtotalcartarr.length) {
  334 + that.setData({
  335 + totalsel: true
  336 + })
  337 + } else {
  338 + that.setData({
  339 + totalsel: false
  340 + })
  341 + }
  342 +
  343 + newtotalmoney = newtotalmoney.toFixed(2)
  344 +
  345 + that.setData({
  346 + cartlist: newcartlist,
  347 + video_id: newvideo_id,
  348 + pic_id: newpic_id,
  349 + totalcartarr: newtotalcartarr,
  350 + totalmoney: newtotalmoney,
  351 + hebing: newhebing
  352 + })
  353 + console.log(that.data.video_id);
  354 + // console.log(that.data.pic_id);
  355 + // console.log(that.data.totalcartarr);
  356 + // console.log(that.data.totalmoney);
  357 + // console.log(that.data.hebing)
  358 + }
  359 +
  360 +
  361 +
  362 + },
  363 +
  364 + // 全部选择
  365 + selallcart() {
  366 + this.setData({
  367 + totalsel: !this.data.totalsel
  368 + })
  369 +
  370 + let newcartlist = this.data.cartlist;
  371 + let newtotalmoney = 0;
  372 + let newpic_id = this.data.pic_id;
  373 + let newvideo_id = this.data.video_id;
  374 + let newtotalcartarr = [];
  375 + let newhebing = this.data.hebing
  376 +
  377 + if (this.data.totalsel == true) {
  378 +
  379 +
  380 + for (var obj of newcartlist) {
  381 + obj.sel = true;
  382 +
  383 + if (obj.pic_id == null) {
  384 + console.log(obj.video_id)
  385 + newvideo_id.push(obj.video_id.id);
  386 + newtotalcartarr.push(obj.id);
  387 + newhebing.push(obj)
  388 + newtotalmoney = newtotalmoney + Number(obj.videoprice)
  389 +
  390 + // if (obj.video_id.videotype[0] == '2k') {
  391 + // if (obj.video_id.vipprice == undefined) {
  392 + // newtotalmoney = newtotalmoney + obj.video_id.price
  393 + // } else {
  394 + // newtotalmoney = newtotalmoney + obj.video_id.vipprice
  395 + // }
  396 + // } else if (obj.video_id.videotype[0] == '4k') {
  397 + // if (obj.video_id.four_vipprice == undefined) {
  398 + // newtotalmoney = newtotalmoney + obj.video_id.four_price
  399 + // } else {
  400 + // newtotalmoney = newtotalmoney + obj.video_id.four_vipprice
  401 + // }
  402 + // } else if (obj.video_id.videotype[0] == '8k') {
  403 + // if (obj.video_id.four_vipprice == undefined) {
  404 + // newtotalmoney = newtotalmoney + obj.video_id.eight_price
  405 + // } else {
  406 + // newtotalmoney = newtotalmoney + obj.video_id.eight_vipprice
  407 + // }
  408 + // }
  409 +
  410 +
  411 + } else if (obj.video_id == null) {
  412 + newpic_id.push(obj.pic_id.id);
  413 + newtotalcartarr.push(obj.id)
  414 + newhebing.push(obj)
  415 + if (obj.pic_id.vipprice == undefined) {
  416 + newtotalmoney = newtotalmoney + obj.pic_id.price
  417 + } else {
  418 + newtotalmoney = newtotalmoney + obj.pic_id.vipprice
  419 + }
  420 + }
  421 +
  422 + }
  423 +
  424 + } else {
  425 + for (var obj of newcartlist) {
  426 + obj.sel = false;
  427 +
  428 + }
  429 + newtotalmoney = 0;
  430 + newhebing = [];
  431 + newtotalcartarr=[]
  432 +
  433 + }
  434 + newtotalmoney = newtotalmoney.toFixed(2)
  435 + this.setData({
  436 + totalmoney: newtotalmoney,
  437 + cartlist: newcartlist,
  438 + pic_id: newpic_id,
  439 + video_id: newvideo_id,
  440 + totalcartarr: newtotalcartarr,
  441 + hebing: newhebing
  442 +
  443 + })
  444 +
  445 + console.log('76543', this.data.video_id)
  446 + },
  447 +
  448 + hejisuan() {
  449 +
  450 + if (this.data.totalcartarr.length == 0) {
  451 + wx.showToast({
  452 + title: '请选结算的视频或图片',
  453 + icon: "none"
  454 + })
  455 + } else {
  456 + let newhebing = this.data.hebing;
  457 + newhebing = JSON.stringify(newhebing);
  458 + let newpic_id = JSON.stringify(this.data.pic_id);
  459 + let newvideo_id = JSON.stringify(this.data.video_id);
  460 + let newtotalcartarr=JSON.stringify(this.data.totalcartarr)
  461 + console.log(newpic_id);
  462 + console.log(newvideo_id)
  463 +
  464 + wx.navigateTo({
  465 + url: '/pages/jiesuanpage/jiesuanpage?totalmoney=' + this.data.totalmoney + '&hebing=' + newhebing + '&totalcartarr=' + newtotalcartarr
  466 + })
  467 +
  468 +
  469 + }
  470 +
  471 + },
  472 +
  473 + delcart() {
  474 + let that = this;
  475 +
  476 +
  477 + if (that.data.totalcartarr.length == 0) {
  478 + wx.showToast({
  479 + title: '请选择要删除的图片或视频',
  480 + icon: "none"
  481 + })
  482 + } else {
  483 + let url = 'user/delcar';
  484 +
  485 +
  486 + let param = {
  487 + ids: that.data.totalcartarr.join(",")
  488 + }
  489 + app.post(url, param, 'post').then((res) => {
  490 + console.log(res);
  491 +
  492 + let newcartlist = that.data.cartlist;
  493 + let newtotalmoney = that.data.totalmoney;
  494 + let newtotalcartarr = that.data.totalcartarr;
  495 + let money = 0;
  496 + for (var i = 0; i < newcartlist.length; i++) {
  497 + for (var j = 0; j < newtotalcartarr.length; j++) {
  498 + if (newtotalcartarr[j] == newcartlist[i].id) {
  499 + console.log(newtotalcartarr[j]);
  500 + console.log(newcartlist[i])
  501 + if (newcartlist[i].pic_id == null) {
  502 + console.log(777)
  503 + money = newcartlist[i].videoprice
  504 + newtotalmoney = newtotalmoney - money
  505 +
  506 + } else if (newcartlist[i].video_id == null) {
  507 + if (newcartlist[i].pic_id.vipprice == undefined) {
  508 + money = newcartlist[i].pic_id.price
  509 + } else {
  510 + money = newcartlist[i].pic_id.vipprice
  511 + }
  512 +
  513 + newtotalmoney = newtotalmoney - money
  514 + }
  515 + }
  516 + }
  517 + }
  518 +
  519 +
  520 + that.setData({
  521 + totalmoney: newtotalmoney
  522 + })
  523 +
  524 +
  525 + wx.showToast({
  526 + title: '删除购物车成功',
  527 + icon: 'none'
  528 + })
  529 +
  530 + setTimeout(function() {
  531 + that.getcartlsit();
  532 + that.setData({
  533 + totalcartarr:[],
  534 + totalsel: false
  535 + })
  536 +
  537 + }, 1000)
  538 +
  539 +
  540 + }).catch((err) => {
  541 +
  542 + })
  543 + }
  544 +
  545 +
  546 + },
  547 +
  548 + /**
  549 + * 生命周期函数--监听页面初次渲染完成
  550 + */
  551 + onReady: function() {
  552 +
  553 + },
  554 +
  555 + /**
  556 + * 生命周期函数--监听页面显示
  557 + */
  558 + onShow: function() {
  559 + this.getcartlsit();
  560 + this.setData({
  561 + totalmoney: 0,
  562 + video_id: [],
  563 + pic_id: [],
  564 + totalcartarr: [],
  565 + totalsel: false,
  566 + pp: [],
  567 + diannum: 0,
  568 + hebing: []
  569 + })
  570 + },
  571 +
  572 + /**
  573 + * 生命周期函数--监听页面隐藏
  574 + */
  575 + onHide: function() {
  576 +
  577 + },
  578 +
  579 + /**
  580 + * 生命周期函数--监听页面卸载
  581 + */
  582 + onUnload: function() {
  583 +
  584 + },
  585 +
  586 + /**
  587 + * 页面相关事件处理函数--监听用户下拉动作
  588 + */
  589 + onPullDownRefresh: function() {
  590 +
  591 + },
  592 +
  593 + /**
  594 + * 页面上拉触底事件的处理函数
  595 + */
  596 + onReachBottom: function() {
  597 +
  598 + },
  599 +
  600 +
  601 + /**
  602 + * 用户点击右上角分享
  603 + */
  604 + onShareAppMessage: function() {
  605 +
  606 + }
  607 +})
  1 +{
  2 + "navigationBarTitleText": "购物车"
  3 +
  4 +}
  1 +<view class="cartboxhead">
  2 + <view class="del" wx:if="{{delshow}}" bindtap="delcart">删除</view>
  3 + <view class="managerlist">
  4 + <view class="cartboxheadright" bindtap="manage">
  5 + <image src="/img/seetingimger.png"></image>
  6 + </view>
  7 + <view class="cartboxrightname">管理</view>
  8 + </view>
  9 +
  10 +</view>
  11 +<view class="nodata" wx:if="{{cartlist.length==0}}">暂无数据</view>
  12 +<view class="cartbigboxz" wx:else>
  13 +
  14 +
  15 + <view class="cartbox gouwuche" wx:for="{{cartlist}}" wx:key="">
  16 +
  17 + <!-- 视频 -->
  18 + <view class="cartvideo" wx:if="{{item.video_id!=null}}">
  19 + <view class="cartbboxitem" wx:key="" >
  20 + <block catchtap="ti">
  21 + <view class="cartboxitemleft" catchtap="selcart" data-type="1" data-cartid="{{item.id}}">
  22 + <image src="/img/noselect.png" wx:if="{{item.sel==false}}"></image>
  23 + <image src="/img/selectcart.png" wx:else></image>
  24 + </view>
  25 +
  26 + <view class="cartboxitemright">
  27 + <view class="videoitemimg" data-id="{{item.video_id.id}}" bindtap="videodetail">
  28 + <image src="{{item.video_id.thumbnail}}"></image>
  29 +
  30 + <view class="anniu">
  31 + <image src="/img/anniu.png"></image>
  32 + </view>
  33 + </view>
  34 + <view class="cartboxitembottom">
  35 + <view class="cartboxitembotleft">
  36 + {{item.video_id.title}}
  37 + </view>
  38 + <block catchtap="ti">
  39 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{item.video_id.videotype}}" data-index="{{index}}">
  40 + <view class="cartboxitemrightone">
  41 + <view class="cartbox">{{item.video_id.videotype[item.cartindex]}}</view>
  42 +
  43 + <view class="picxian"></view>
  44 +
  45 + <view class="cartxuansan">
  46 + <image src="/img/sanjiaodown.png"></image>
  47 + </view>
  48 + </view>
  49 + </picker>
  50 + </block>
  51 +
  52 + </view>
  53 +
  54 + <view class="money">¥{{item.videoprice}}</view>
  55 + </view>
  56 + </block>
  57 +
  58 + </view>
  59 + </view>
  60 +
  61 +
  62 + <!-- 图片 -->
  63 +
  64 + <view class="picbox" wx:if="{{item.pic_id!=null}}">
  65 + <view class="cartbboxitem" wx:key="" bindtap="picdetail" data-id="{{item.pic_id.id}}">
  66 + <view class="cartboxitemleft" catchtap="selcart" data-type="2" data-cartid="{{item.id}}" data-sel="{{item.sel}}">
  67 + <image src="/img/noselect.png" wx:if="{{item.sel==false}}"></image>
  68 + <image src="/img/selectcart.png" wx:else></image>
  69 + </view>
  70 +
  71 + <view class="cartboxitemright">
  72 + <view class="videoitemimgp">
  73 + <image src="{{item.pic_id.thumbnail}}"></image>
  74 + </view>
  75 + <view class="cartboxitembottom">
  76 + <view class="cartboxitembotleft">
  77 + {{item.pic_id.title}}
  78 + </view>
  79 +
  80 + <!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  81 +
  82 +
  83 + <view class="cartboxitemrightone">
  84 + <view class="cartbox">{{array[index]}}</view>
  85 +
  86 + <view class="picxian"></view>
  87 +
  88 + <view class="cartxuansan">
  89 + <image src="/img/sanjiaodown.png"></image>
  90 + </view>
  91 + </view>
  92 + </picker> -->
  93 + </view>
  94 +
  95 +
  96 + <view class="money" wx:if="{{item.pic_id.vipprice==undefined}}">¥{{item.pic_id.price}}</view>
  97 + <view class="money" wx:else>¥{{item.pic_id.vipprice}}</view>
  98 + </view>
  99 + </view>
  100 + </view>
  101 + </view>
  102 +</view>
  103 +
  104 +
  105 +<view class="cartfoot">
  106 + <view class="cartfootleft">
  107 + <view class="cartfootlefimg" bindtap="selallcart">
  108 + <image src="/img/noselect.png" wx:if="{{totalsel==false}}"></image>
  109 + <image src="/img/selectcart.png" wx:else></image>
  110 + </view>
  111 +
  112 + <view class="cartfootlefthe">合计:¥{{totalmoney}}</view>
  113 + </view>
  114 +
  115 + <view class="cartfootright" bindtap="hejisuan">合并计算({{totalcartarr.length}})</view>
  116 +</view>
  1 +.cartbox {
  2 + padding: 24rpx;
  3 + box-sizing: border-box;
  4 + color: #5b5e63;
  5 + font-size: 28rpx;
  6 +}
  7 +
  8 +.gouwuche {
  9 + border-bottom: 24rpx solid #f9f9f9;
  10 +}
  11 +
  12 +.cartbigboxz {
  13 + padding-bottom: 100rpx;
  14 +}
  15 +
  16 +.cartbboxitem {
  17 + display: flex;
  18 + align-items: center;
  19 + /* border-bottom: 1rpx solid #f5f5f5;
  20 + padding-bottom: 48rpx; */
  21 +}
  22 +
  23 +.cartboxitemleft {
  24 + width: 32rpx;
  25 + height: 32rpx;
  26 + font-size: 0;
  27 +}
  28 +
  29 +.cartboxhead {
  30 + display: flex;
  31 + justify-content: flex-end;
  32 + align-items: center;
  33 + padding: 14rpx 36rpx;
  34 + box-sizing: border-box;
  35 + border-bottom: 24rpx solid #f9f9f9;
  36 +}
  37 +
  38 +.managerlist {
  39 + display: flex;
  40 + flex-direction: column;
  41 + justify-content: center;
  42 + align-items: flex-end;
  43 + /* padding: 14rpx 26rpx;
  44 + box-sizing: border-box;
  45 + border-bottom: 24rpx solid #f9f9f9; */
  46 +}
  47 +
  48 +.del {
  49 + width: 180rpx;
  50 + height: 60rpx;
  51 + background: #fb6324;
  52 + color: #fff;
  53 + font-size: 22rpx;
  54 + text-align: center;
  55 + line-height: 60rpx;
  56 + border-radius: 16rpx;
  57 + margin-right: 60rpx;
  58 +}
  59 +
  60 +.cartboxheadright {
  61 + width: 35rpx;
  62 + height: 35rpx;
  63 + font-size: 0;
  64 + margin-right: 5rpx;
  65 +}
  66 +
  67 +.cartboxrightname {
  68 + color: #bdc4ce;
  69 + font-size: 22rpx;
  70 + margin-top: 6rpx;
  71 +}
  72 +
  73 +.videoitemimg {
  74 + width: 640rpx;
  75 + height: 360rpx;
  76 + font-size: 0;
  77 + position: relative;
  78 +}
  79 +
  80 +.videoitemimgp {
  81 + width: 640rpx;
  82 + height: 212rpx;
  83 + font-size: 0;
  84 +}
  85 +
  86 +.cartboxitemright {
  87 + margin-left: 24rpx;
  88 +}
  89 +
  90 +.cartboxitembottom {
  91 + display: flex;
  92 + align-items: center;
  93 + justify-content: space-between;
  94 + margin-top: 24rpx;
  95 +}
  96 +
  97 +.cartboxitemrightone {
  98 + display: flex;
  99 + align-items: center;
  100 + background: #f9f9f9;
  101 + height: 60rpx;
  102 + padding: 0 24rpx;
  103 + box-sizing: border-box;
  104 +}
  105 +
  106 +.cartxuansan {
  107 + width: 28rpx;
  108 + height: 30rpx;
  109 + font-size: 0;
  110 +}
  111 +
  112 +.picxian {
  113 + margin-right: 20rpx;
  114 + box-sizing: border-box;
  115 +}
  116 +
  117 +.money {
  118 + color: #ea322b;
  119 + font-size: 32rpx;
  120 + font-weight: bold;
  121 + margin-top: 15rpx;
  122 +}
  123 +
  124 +.cartfoot {
  125 + display: flex;
  126 + align-items: center;
  127 + justify-content: space-between;
  128 + padding: 0;
  129 + box-sizing: border-box;
  130 + height: 88rpx;
  131 + position: fixed;
  132 + bottom: 0;
  133 + left: 0;
  134 +}
  135 +
  136 +.cartfootleft {
  137 + width: 470rpx;
  138 + height: 88rpx;
  139 + padding: 0 32rpx;
  140 + box-sizing: border-box;
  141 + display: flex;
  142 + align-items: center;
  143 + background: #fff;
  144 +}
  145 +
  146 +.cartfootlefimg {
  147 + width: 32rpx;
  148 + height: 32rpx;
  149 + font-size: 0;
  150 + margin-top: 5rpx;
  151 +}
  152 +
  153 +.cartfootlefthe {
  154 + margin-left: 24rpx;
  155 + color: #ea322b;
  156 + font-size: 28rpx;
  157 + font-weight: bold;
  158 +}
  159 +
  160 +.cartfootright {
  161 + width: 280rpx;
  162 + background: #fb6324;
  163 + font-size: 32rpx;
  164 + color: #fff;
  165 + text-align: center;
  166 + height: 88rpx;
  167 + line-height: 88rpx;
  168 +}
  169 +
  170 +.cartboxitembotleft {
  171 + color: #06121e;
  172 + font-size: 28rpx;
  173 + font-weight: bold;
  174 +}
  1 +// pages/chongzhi/chongzhi.js
  2 +const app=getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + weizhi: false,
  10 + agree: false,
  11 + money: '',
  12 + order_id:'',
  13 + hui:1
  14 + },
  15 +
  16 + /**
  17 + * 生命周期函数--监听页面加载
  18 + */
  19 + onLoad: function(options) {
  20 + console.log(this.data.options)
  21 + this.setData({
  22 + hui:options.hui
  23 + })
  24 + },
  25 + chongzhihui(e){
  26 + console.log(e)
  27 + this.setData({
  28 + money:e.detail.value
  29 + })
  30 + },
  31 + chongzhi(e) {
  32 + console.log(e)
  33 + this.setData({
  34 + money: e.detail.value
  35 + })
  36 + },
  37 + huiyuan(){
  38 + console.log(typeof(this.data.hui))
  39 + if(this.data.hui=='1'){
  40 + console.log(9999)
  41 + wx.redirectTo({
  42 + url:'/pages/vipdetail/vipdetail?hui=' + 1,
  43 + })
  44 + }else{
  45 + console.log(888)
  46 + wx.redirectTo({
  47 +
  48 + url: '/pages/vipdetail/vipdetail',
  49 + })
  50 + }
  51 +
  52 + },
  53 +
  54 + xuanzhifu() {
  55 + this.setData({
  56 + weizhi: !this.data.weizhi
  57 + })
  58 + },
  59 +
  60 + agreet() {
  61 + this.setData({
  62 + agree: !this.data.agree
  63 + })
  64 + },
  65 + zhifu(){
  66 + console.log(this.data.money)
  67 +
  68 + if(this.data.money==''){
  69 + wx.showToast({
  70 + title: '请输入充值金额',
  71 + icon:"none"
  72 + })
  73 +
  74 + return false
  75 + }
  76 +
  77 + if (this.data.agree==false){
  78 + wx.showToast({
  79 + title: '请勾选用户须知',
  80 + icon:"none"
  81 + })
  82 +
  83 + return false
  84 + }
  85 +
  86 + if(this.data.money!=''){
  87 + if(this.data.hui==1){
  88 + if(this.data.money<8000){
  89 + wx.showToast({
  90 + title: '请输入超过8000的金额',
  91 + icon:"none"
  92 + })
  93 +
  94 + return false
  95 + }
  96 + }
  97 + }
  98 + if (this.data.hui == 1){
  99 + this.huiyuanorder()
  100 + }else{
  101 + this.feihuiyaun()
  102 + }
  103 +
  104 +
  105 +
  106 + // let that = this;
  107 + // let url = 'user/toporder';
  108 + // let param={
  109 + // money:that.data.money
  110 + // }
  111 + // app.post(url, param, 'post').then((res) => {
  112 + // console.log(res);
  113 + // that.setData({
  114 + // order_id:res.order_id,
  115 + // })
  116 +
  117 + // that.pay()
  118 +
  119 + // }).catch((err) => {
  120 +
  121 + // })
  122 +
  123 + },
  124 + // 非会员订单
  125 + feihuiyaun(){
  126 + let that = this;
  127 + let url = 'user/toporder';
  128 + let param = {
  129 + money: that.data.money
  130 + }
  131 + app.post(url, param, 'post').then((res) => {
  132 + console.log(res);
  133 + that.setData({
  134 + order_id: res.order_id,
  135 + })
  136 +
  137 + that.pay()
  138 +
  139 + }).catch((err) => {
  140 +
  141 + })
  142 + },
  143 +
  144 + // 创建会员订单
  145 + huiyuanorder(){
  146 + let that = this;
  147 + let url = 'user/viporder';
  148 + let param = {
  149 + total: that.data.money
  150 + }
  151 + app.post(url, param, 'post').then((res) => {
  152 + console.log(res);
  153 + that.setData({
  154 + order_id: res.order_id,
  155 + })
  156 +
  157 + that.pay()
  158 +
  159 + }).catch((err) => {
  160 + wx.showToast({
  161 + title: err.msg,
  162 + icon:'none'
  163 + })
  164 +
  165 + })
  166 + },
  167 +
  168 + // 支付接口
  169 + pay(){
  170 + let that = this;
  171 + let url = 'pay/pay';
  172 + let param = {
  173 + order_id: that.data.order_id
  174 + }
  175 + app.post(url, param, 'post').then((res) => {
  176 + console.log(res);
  177 + that.payment(res)
  178 +
  179 + }).catch((err) => {
  180 +
  181 + })
  182 + },
  183 +
  184 + //唤起支付
  185 +
  186 +
  187 + payment(res) {
  188 + let that = this;
  189 + var timeStamp = res.timeStamp.toString();
  190 + // console.log(timeStamp);
  191 + wx.requestPayment({
  192 + timeStamp: timeStamp,
  193 + nonceStr: res.nonceStr,
  194 + package: res.package,
  195 + signType: res.signType,
  196 + paySign: res.paySign,
  197 + success: function (res) {
  198 + console.log(res)
  199 + wx.switchTab({
  200 + url: '/pages/mine/mine',
  201 + })
  202 +
  203 + },
  204 + fail: function (res) {
  205 + console.log(123);
  206 + console.log(res);
  207 + }
  208 + })
  209 + },
  210 +
  211 + /**
  212 + * 生命周期函数--监听页面初次渲染完成
  213 + */
  214 + onReady: function() {
  215 +
  216 + },
  217 +
  218 + /**
  219 + * 生命周期函数--监听页面显示
  220 + */
  221 + onShow: function() {
  222 +
  223 + },
  224 +
  225 + /**
  226 + * 生命周期函数--监听页面隐藏
  227 + */
  228 + onHide: function() {
  229 +
  230 + },
  231 +
  232 + /**
  233 + * 生命周期函数--监听页面卸载
  234 + */
  235 + onUnload: function() {
  236 +
  237 + },
  238 +
  239 + /**
  240 + * 页面相关事件处理函数--监听用户下拉动作
  241 + */
  242 + onPullDownRefresh: function() {
  243 +
  244 + },
  245 +
  246 + /**
  247 + * 页面上拉触底事件的处理函数
  248 + */
  249 + onReachBottom: function() {
  250 +
  251 + },
  252 +
  253 + /**
  254 + * 用户点击右上角分享
  255 + */
  256 + onShareAppMessage: function() {
  257 +
  258 + }
  259 +})
  1 +{
  2 + "navigationBarTitleText": "充值"
  3 +}
  1 +<view class="chongbox">
  2 + <view class='chongzhir'>充值金额</view>
  3 +
  4 + <view class="chongtext">
  5 + <view class="chongtextleft">
  6 +
  7 + </view>
  8 + <view class="chongtextright">
  9 + <input placeholder='充值8000起' type="digit" bindinput="chongzhihui" placeholder-class="enterhui" wx:if="{{hui==1}}"/>
  10 + <input placeholder='请输入充值金额' type="digit" placeholder-class="enterhui" bindinput="chongzhi" wx:else/>
  11 + </view>
  12 + </view>
  13 +
  14 + <view class='zhifu' bindtap="xuanzhifu">
  15 + <view class="zhifuleft" >
  16 + <image src="/img/xuanze.png"></image>
  17 +
  18 + </view>
  19 +
  20 + <view class="zhifuright">
  21 + <view class="zhifurightl">
  22 + <image src="/img/weixinimg.png"></image>
  23 + </view>
  24 + <view class="zhifurightr">微信支付</view>
  25 + </view>
  26 + </view>
  27 +
  28 +
  29 +
  30 +</view>
  31 +<view class="yuedu" bindtap="agreet">
  32 + <view class="yueduleft" >
  33 + <image src="/img/duigou.png" wx:if="{{agree==true}}"></image>
  34 + <image src="/img/noxieyi.png" wx:else></image>
  35 + </view>
  36 + <view class="yuedutext">
  37 + <view class="yueduagree"> 我已阅读并同意</view>
  38 + <view class="yuedujing" catchtap='huiyuan'>《会员介绍》</view>
  39 + </view>
  40 +</view>
  41 +
  42 +<view class="zhifupay" bindtap="zhifu">支付</view>
  1 +.chongbox {
  2 + padding: 24rpx 32rpx;
  3 + box-sizing: border-box;
  4 +}
  5 +
  6 +.chongzhir {
  7 + color: #06121e;
  8 + font-size: 32rpx;
  9 + font-weight: bold;
  10 +}
  11 +
  12 +.chongtext {
  13 + display: flex;
  14 + align-items: center;
  15 + margin-top: 24rpx;
  16 +}
  17 +
  18 +.chongtextleft {
  19 + color: #06121e;
  20 + font-size: 64rpx;
  21 + font-weight: bold;
  22 +}
  23 +
  24 +.chongtextright {
  25 + width: 500rpx;
  26 + height: 90rpx;
  27 + color: #06121E;
  28 + font-size: 64rpx;
  29 + margin-left: 28rpx;
  30 +}
  31 +.enterhui{
  32 + color:#BDC4CE
  33 +}
  34 +
  35 +.chongtextright input {
  36 + width: 100%;
  37 + height: 100%;
  38 +}
  39 +
  40 +.zhifu {
  41 + display: flex;
  42 + align-items: center;
  43 + margin-top: 24rpx;
  44 +}
  45 +
  46 +.zhifuleft {
  47 + width: 32rpx;
  48 + height: 32rpx;
  49 + font-size: 0;
  50 +}
  51 +
  52 +.zhifuright {
  53 + display: flex;
  54 + align-items: center;
  55 + margin-left: 12rpx;
  56 +}
  57 +
  58 +.zhifurightl {
  59 + width: 56rpx;
  60 + height: 60rpx;
  61 + font-size: 0;
  62 +}
  63 +
  64 +.zhifurightr {
  65 + color: #06121e;
  66 + font-size: 28rpx;
  67 + margin-left: 6rpx;
  68 +}
  69 +
  70 +.yuedu {
  71 + display: flex;
  72 + align-items: center;
  73 + margin-top: 60rpx;
  74 + position: fixed;
  75 + bottom: 156rpx;
  76 + left: 24rpx;
  77 +}
  78 +
  79 +.yueduleft {
  80 + width: 40rpx;
  81 + height: 40rpx;
  82 + font-size: 0;
  83 +}
  84 +
  85 +.yuedutext {
  86 + display: flex;
  87 + align-items: center;
  88 + margin-left: 6rpx;
  89 +}
  90 +
  91 +.yueduagree {
  92 + color: #8c9198;
  93 + font-size: 24rpx;
  94 +}
  95 +
  96 +.yuedujing {
  97 + color: #fb6324;
  98 + font-size: 24rpx;
  99 +}
  100 +
  101 +.zhifupay {
  102 + width: 702rpx;
  103 + height: 88rpx;
  104 + background: rgba(251, 99, 36, 1);
  105 + opacity: 1;
  106 + border-radius: 4rpx;
  107 + color:#FFFFFF;
  108 + font-size: 32rpx;
  109 + text-align: center;
  110 + line-height: 88rpx;
  111 + position: fixed;
  112 + bottom:40rpx;
  113 + left:24rpx;
  114 +}
  1 +// pages/fuwuxieyi/fuwuxieyi.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
  1 +{
  2 + "navigationBarTitleText": "服务协议"
  3 +}
  1 +<view class="huiyuanknow">
  2 +
  3 + <view class="xieyi">亲爱的用户,您好</view>
  4 + <view class="buy">
  5 + 欢迎您购买仁甲看见SHOP素材,请您在购买前务必仔细阅读以下内容:
  6 + </view>
  7 + <view class="item">
  8 + 1充值VIP会员均可享有仁甲看见SHOP图片/视频素材七五折优惠。
  9 + </view>
  10 + <view class="item">
  11 + 2购买的素材将以链接形式发送至您百度云账号。
  12 + </view>
  13 + <view class="item">
  14 + 3购买素材前,请您先下载小样仔细进行预览,购买后概不接受因镜头抖动、闪烁、分辨率等问题的退换。
  15 + </view>
  16 + <view class="item">
  17 + 4 购买后如若您需开发票,请联系后台客服人员,仔细填写个人信息,本公司按您填写的地址邮寄发票。
  18 + </view>
  19 + <view class="item">
  20 + 5 此微信小程序中图片/视频涉及的物权与本公司无关。
  21 + </view>
  22 + <view class="item">
  23 + 6购买的素材仅可以使用于本协议中的指定项目,如若在其他项目中继续使用,须联系客服更新授权书(免费),否则我们将保留通过法律途径追究您侵权责任的权利。
  24 + </view>
  25 +
  26 + <view class="xiyigui">
  27 + 本制度最终解释权归山东仁甲看见影像服务有限公司所有。 如若您仍有其他问题,请联系小程序后台客服人员。
  28 + </view>
  29 +
  30 +
  31 +
  32 +
  33 +</view>
  1 +.huiyuanknow{
  2 + padding: 40rpx 32rpx;
  3 + box-sizing: border-box;
  4 + color:#06121E;
  5 + font-size: 28rpx;
  6 +}
  7 +
  8 +.mai {
  9 + width: 702rpx;
  10 + height: 88rpx;
  11 + background: rgba(251, 99, 36, 1);
  12 + opacity: 1;
  13 + border-radius: 4rpx;
  14 + color:#fff;
  15 + font-size: 32rpx;
  16 + text-align: center;
  17 + line-height: 88rpx;
  18 + margin:0 auto 36rpx;
  19 +
  20 + box-sizing: border-box;
  21 +
  22 +
  23 +}
  24 +.buybottom{
  25 + width:750rpx;
  26 + height:124rpx;
  27 + background: #fff;
  28 + position: fixed;
  29 + bottom:0;
  30 +}
  31 +.buy{
  32 + margin-top: 20rpx;
  33 +
  34 +}
  35 +.item{
  36 + margin-top:10rpx;
  37 + line-height: 1.5
  38 +}
  39 +.xiyigui{
  40 + margin-top:20rpx;
  41 +}
  1 +// pages/getphone/getphone.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + session_key: '',
  10 + code: '',
  11 + phone:""
  12 + },
  13 +
  14 + /**
  15 + * 生命周期函数--监听页面加载
  16 + */
  17 + onLoad: function(options) {
  18 + this.getsessionkey()
  19 + },
  20 +
  21 + //获取sessionkey
  22 + getsessionkey() {
  23 + let that = this;
  24 +
  25 +
  26 + wx.login({
  27 + success: (res) => {
  28 + console.log(res)
  29 + that.setData({
  30 + code: res.code
  31 + })
  32 +
  33 + let url = 'user/getSessionKey',
  34 + params = {
  35 + code: that.data.code
  36 + }
  37 + app.post(url, params).then((res) => {
  38 + console.log(res);
  39 + that.setData({
  40 + session_key: res.session_key
  41 + })
  42 + }).catch((err) => {
  43 +
  44 + })
  45 +
  46 + }
  47 + });
  48 +
  49 + },
  50 +
  51 + //微信授权手机号
  52 + getPhoneNumber(e) {
  53 + console.log(e)
  54 +
  55 +
  56 +
  57 + let that = this;
  58 + let url = 'user/getMobile',
  59 + params = {
  60 + sessionKey: that.data.session_key,
  61 + encryptedData: e.detail.encryptedData,
  62 + iv: e.detail.iv
  63 + }
  64 + app.post(url, params,"post").then((res) => {
  65 + console.log(res);
  66 + that.setData({
  67 + phone:res.tel
  68 + })
  69 + wx.switchTab({
  70 + url: '/pages/homepage/homepage',
  71 + })
  72 + that.bangdingshouji()
  73 +
  74 + }).catch((err) => {
  75 + console.log(err)
  76 +
  77 + })
  78 + },
  79 + bangdingshouji() {
  80 + let that = this;
  81 + let url = 'user/phone',
  82 + params = {
  83 + phone:that.data.phone
  84 + }
  85 + app.post(url, params,"post").then((res) => {
  86 + console.log(res);
  87 +
  88 +
  89 +
  90 +
  91 + }).catch((err) => {
  92 +
  93 + })
  94 + },
  95 +
  96 + /**
  97 + * 生命周期函数--监听页面初次渲染完成
  98 + */
  99 + onReady: function() {
  100 +
  101 + },
  102 +
  103 + /**
  104 + * 生命周期函数--监听页面显示
  105 + */
  106 + onShow: function() {
  107 +
  108 + },
  109 +
  110 + /**
  111 + * 生命周期函数--监听页面隐藏
  112 + */
  113 + onHide: function() {
  114 +
  115 + },
  116 +
  117 + /**
  118 + * 生命周期函数--监听页面卸载
  119 + */
  120 + onUnload: function() {
  121 +
  122 + },
  123 +
  124 + /**
  125 + * 页面相关事件处理函数--监听用户下拉动作
  126 + */
  127 + onPullDownRefresh: function() {
  128 +
  129 + },
  130 +
  131 + /**
  132 + * 页面上拉触底事件的处理函数
  133 + */
  134 + onReachBottom: function() {
  135 +
  136 + },
  137 +
  138 + /**
  139 + * 用户点击右上角分享
  140 + */
  141 + onShareAppMessage: function() {
  142 +
  143 + }
  144 +})
  1 +{
  2 + "navigationBarTitleText": "获取用户手机号"
  3 +}
  1 + <view class="shouquanimg">
  2 + <image src="/img/dun.png"></image>
  3 + </view>
  4 +
  5 + <view class="quanname">仁甲看见SHOP申请获得您的手机号</view>
  6 +
  7 +
  8 +
  9 +
  10 + <button class='bottomtextright' open-type='getPhoneNumber' bindgetphonenumber='getPhoneNumber' >授权微信手机号</button>
  1 +/**index.wxss**/
  2 +
  3 +.userinfo {
  4 + display: flex;
  5 + flex-direction: column;
  6 + align-items: center;
  7 +}
  8 +
  9 +.userinfo-avatar {
  10 + width: 128rpx;
  11 + height: 128rpx;
  12 + margin: 20rpx;
  13 + border-radius: 50%;
  14 +}
  15 +
  16 +.userinfo-nickname {
  17 + color: #aaa;
  18 +}
  19 +
  20 +.usermotto {
  21 + margin-top: 200px;
  22 +}
  23 +
  24 +.shouquanimg {
  25 + width: 172rpx;
  26 + height: 202rpx;
  27 + font-size: 0;
  28 + margin: 244rpx auto 0;
  29 +}
  30 +
  31 +.quanname {
  32 + color: #06121e;
  33 + font-size: 32rpx;
  34 + font-weight: bold;
  35 + margin-top: 48rpx;
  36 + text-align: center;
  37 +}
  38 +
  39 +.huoqu {
  40 + color: #5b5e63;
  41 + font-size: 28rpx;
  42 + margin-top: 16rpx;
  43 + text-align: center;
  44 +}
  45 +
  46 +.bottomtextright {
  47 + width: 486rpx;
  48 + height: 88rpx;
  49 + background: rgba(251, 99, 36, 1);
  50 + opacity: 1;
  51 + border-radius: 44rpx;
  52 + color:#fff;
  53 + font-size: 32rpx;
  54 + margin:100rpx auto 0;
  55 +}
  1 +// pages/goumaixuzhi/goumaixuzhi.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + select:false
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 + selxieyi(){
  18 + this.setData({
  19 + select:!this.data.select
  20 + })
  21 + },
  22 + /**
  23 + * 生命周期函数--监听页面初次渲染完成
  24 + */
  25 + onReady: function () {
  26 +
  27 + },
  28 +
  29 + /**
  30 + * 生命周期函数--监听页面显示
  31 + */
  32 + onShow: function () {
  33 +
  34 + },
  35 +
  36 + /**
  37 + * 生命周期函数--监听页面隐藏
  38 + */
  39 + onHide: function () {
  40 +
  41 + },
  42 +
  43 + /**
  44 + * 生命周期函数--监听页面卸载
  45 + */
  46 + onUnload: function () {
  47 +
  48 + },
  49 +
  50 + /**
  51 + * 页面相关事件处理函数--监听用户下拉动作
  52 + */
  53 + onPullDownRefresh: function () {
  54 +
  55 + },
  56 +
  57 + /**
  58 + * 页面上拉触底事件的处理函数
  59 + */
  60 + onReachBottom: function () {
  61 +
  62 + },
  63 +
  64 + /**
  65 + * 用户点击右上角分享
  66 + */
  67 + onShareAppMessage: function () {
  68 +
  69 + }
  70 +})
  1 +{
  2 + "navigationBarTitleText": "购买须知"
  3 +}
  1 +// pages/homepage/homepage.js
  2 +function getRandomColor() {
  3 + let rgb = []
  4 + for (let i = 0; i < 3; ++i) {
  5 + let color = Math.floor(Math.random() * 256).toString(16)
  6 + color = color.length == 1 ? '0' + color : color
  7 + rgb.push(color)
  8 + }
  9 + return '#' + rgb.join('')
  10 +}
  11 +
  12 +const app = getApp();
  13 +
  14 +Page({
  15 +
  16 + /**
  17 + * 页面的初始数据
  18 + */
  19 + data: {
  20 + array: ['视频', '图片', '精彩大片'],
  21 + index: 0,
  22 + jingmeiurl: '',
  23 + picurl: '',
  24 + videourl: '',
  25 + thumbinal: '',
  26 + pic:'',
  27 + image:'',
  28 + phoneshow:false,
  29 + phonenum:''
  30 + },
  31 + bindPickerChange: function(e) {
  32 + console.log('picker发送选择改变,携带值为', e.detail.value)
  33 + this.setData({
  34 + index: e.detail.value
  35 + })
  36 + },
  37 +
  38 + // 图片
  39 + picbox() {
  40 + let token = wx.getStorageSync("token");
  41 + if (token == '') {
  42 + wx.showToast({
  43 + title: '请先登录',
  44 + icon: 'none'
  45 + })
  46 +
  47 + setTimeout(function() {
  48 + wx.navigateTo({
  49 + url: '/pages/index/index',
  50 + })
  51 + }, 1500)
  52 + } else {
  53 + wx.navigateTo({
  54 + url: '/pages/pichezi/pichezi',
  55 + })
  56 + }
  57 +
  58 + },
  59 + videobox() {
  60 + let token = wx.getStorageSync("token");
  61 + if (token == '') {
  62 + wx.showToast({
  63 + title: '请先登录',
  64 + icon: 'none'
  65 + })
  66 +
  67 + setTimeout(function() {
  68 + wx.navigateTo({
  69 + url: '/pages/index/index',
  70 + })
  71 + }, 1500)
  72 + } else {
  73 + // wx.navigateTo({
  74 + // url: '/pages/videobox/videobox',
  75 + // })
  76 + wx.switchTab({
  77 + url: '/pages/kind/kind',
  78 + })
  79 + }
  80 +
  81 + },
  82 + hidewrap(){
  83 + this.setData({
  84 + phoneshow:false
  85 + })
  86 + },
  87 +
  88 + // 输入手机号
  89 + enterphone(e){
  90 + this.setData({
  91 + phonenum:e.detail.value
  92 + })
  93 + },
  94 + yuyue(){
  95 + let token=wx.getStorageSync("token");
  96 + if(token==''){
  97 + wx.showToast({
  98 + title: '请先登录',
  99 + icon:'none'
  100 + })
  101 +
  102 + setTimeout(function(){
  103 + wx.navigateTo({
  104 + url: '/pages/index/index',
  105 + })
  106 + },1500)
  107 + }else{
  108 + this.setData({
  109 + phoneshow: true
  110 + })
  111 + }
  112 +
  113 + },
  114 +
  115 + // 确人提交
  116 + surebtn(){
  117 + let that = this;
  118 + if (!(/^1[3456789]\d{9}$/.test(that.data.phonenum))) {
  119 + wx.showToast({
  120 + title: '请输入正确手机号',
  121 + icon: 'none'
  122 + })
  123 + return false;
  124 + }
  125 + var url = '/pay/appointment';
  126 + var params = {
  127 + phone:that.data.phonenum
  128 +
  129 + }
  130 + app.post(url, params,"post").then((res) => {
  131 + console.log(res);
  132 + wx.showToast({
  133 + title: '提交成功',
  134 + icon:"none"
  135 + })
  136 +
  137 + setTimeout(function(){
  138 + that.setData({
  139 + phoneshow:false
  140 + })
  141 + },1500)
  142 +
  143 +
  144 +
  145 + }).catch((err) => {
  146 +
  147 + })
  148 + },
  149 + enter(){
  150 +
  151 + },
  152 + gosearch() {
  153 +
  154 + let token = wx.getStorageSync("token");
  155 + if (token == '') {
  156 + wx.showToast({
  157 + title: '请先登录',
  158 + icon: 'none'
  159 + })
  160 +
  161 + setTimeout(function() {
  162 + wx.navigateTo({
  163 + url: '/pages/index/index',
  164 + })
  165 + }, 1500)
  166 + } else {
  167 + wx.navigateTo({
  168 + url: '/pages/search/search?index=' + this.data.index,
  169 + })
  170 + }
  171 +
  172 + },
  173 + govideo() {
  174 +
  175 + let token = wx.getStorageSync("token");
  176 + if (token == '') {
  177 + wx.showToast({
  178 + title: '请先登录',
  179 + icon: 'none'
  180 + })
  181 +
  182 + setTimeout(function() {
  183 + wx.navigateTo({
  184 + url: '/pages/index/index',
  185 + })
  186 + }, 1500)
  187 + } else {
  188 + wx.navigateTo({
  189 + url: '/pages/jingmei/jingmei'
  190 + })
  191 + }
  192 +
  193 + },
  194 +
  195 + // 获取首页内容
  196 + getindex(e) {
  197 +
  198 +
  199 + let that = this;
  200 + let url = 'user/index';
  201 + app.post(url, '', 'post').then((res) => {
  202 + console.log(res);
  203 +
  204 + that.setData({
  205 + jingmeiurl: res.wonderful_thumbnail,
  206 + picurl: res.pic_thumbnail,
  207 + videourl: res.video_thumbnail
  208 + })
  209 + }).catch((err) => {
  210 +
  211 + })
  212 +
  213 + },
  214 +
  215 + // 封面管理
  216 + fengmian(){
  217 + let that = this;
  218 + var url = 'user/index';
  219 + var params = {
  220 +
  221 +
  222 + }
  223 + app.post(url, params).then((res) => {
  224 + console.log(res);
  225 + this.setData({
  226 + thumbinal: res.thumbnail,
  227 + pic: res.pic,
  228 + image: res.image
  229 +
  230 + })
  231 +
  232 +
  233 +
  234 + }).catch((err) => {
  235 +
  236 + })
  237 + },
  238 +
  239 +
  240 +
  241 +
  242 +
  243 +
  244 + /**
  245 + * 生命周期函数--监听页面加载
  246 + */
  247 + onLoad: function(options) {
  248 + this.fengmian()
  249 + },
  250 +
  251 + /**
  252 + * 生命周期函数--监听页面初次渲染完成
  253 + */
  254 + onReady: function(res) {
  255 + this.videoContext = wx.createVideoContext('myVideo')
  256 + },
  257 +
  258 + /**
  259 + * 生命周期函数--监听页面显示
  260 + */
  261 + onShow: function() {
  262 + this.getindex()
  263 + },
  264 +
  265 + /**
  266 + * 生命周期函数--监听页面隐藏
  267 + */
  268 + onHide: function() {
  269 +
  270 + },
  271 +
  272 + /**
  273 + * 生命周期函数--监听页面卸载
  274 + */
  275 + onUnload: function() {
  276 +
  277 + },
  278 +
  279 + /**
  280 + * 页面相关事件处理函数--监听用户下拉动作
  281 + */
  282 + onPullDownRefresh: function() {
  283 +
  284 + },
  285 +
  286 + /**
  287 + * 页面上拉触底事件的处理函数
  288 + */
  289 + onReachBottom: function() {
  290 +
  291 + },
  292 +
  293 + /**
  294 + * 用户点击右上角分享
  295 + */
  296 + onShareAppMessage: function() {
  297 + console.log(app.globalData.sharepic)
  298 +
  299 + return {
  300 + title: '仁甲看见SHOP',
  301 + path: '/pages/startindex/startindex',
  302 + imageUrl: app.globalData.sharepic
  303 + }
  304 +
  305 +
  306 + }
  307 +})
  1 +{
  2 + "navigationBarTitleText": "仁甲看见SHOP"
  3 +}
  1 +<view class="videobox">
  2 + <view class="videohead" bindtap="govideo">
  3 + <image src='{{thumbinal}}'></image>
  4 +
  5 + <view class="anniu">
  6 + <image src="/img/anniu.png"></image>
  7 + </view>
  8 + </view>
  9 +
  10 + <view class="search">
  11 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  12 + <!-- <view class="picker">
  13 + 当前选择:{{array[index]}}
  14 + </view> -->
  15 +
  16 + <view class="searchleft">
  17 + <view class="searchleftname">{{array[index]}}</view>
  18 + <view class="searchsanjiao">
  19 + <image src='/img/sanjiaodown.png'></image>
  20 + </view>
  21 + </view>
  22 + </picker>
  23 +
  24 + <view class="picxian"></view>
  25 +
  26 + <view class="searchright" bindtap="gosearch">
  27 + <view class="searchfightimg">
  28 + <image src="/img/sousuo.png"></image>
  29 + </view>
  30 + <view class="searchrightname">
  31 + <input placeholder='点击这里搜一搜' />
  32 + </view>
  33 + </view>
  34 +
  35 + <div class="wrapper">
  36 + <div class="circle">
  37 + <image src="/img/hand.png"></image>
  38 + </div>
  39 + <!-- <div class="finger">
  40 + <image src="/img/shou2.png"></image>
  41 + </div> -->
  42 + </div>
  43 + </view>
  44 +
  45 + <!-- 搜索内容 -->
  46 + <view class="searchbox">
  47 + <!-- 搜索图片 -->
  48 +
  49 + <view class="searchboximg" bindtap="picbox">
  50 + <view class="searchimg">
  51 + <image src="{{pic}}"></image>
  52 + </view>
  53 + </view>
  54 +
  55 + <!-- 搜索视频 -->
  56 + <view class="searchvideo" bindtap="videobox">
  57 + <view class="searchvideoimg">
  58 + <image src="{{image}}"></image>
  59 +
  60 + <view class="anniu">
  61 + <image src="/img/anniu.png"></image>
  62 + </view>
  63 + </view>
  64 +
  65 + </view>
  66 + </view>
  67 +
  68 +</view>
  69 +
  70 +<view class="crema" bindtap="yuyue">
  71 + <view class="cremaimg">
  72 + <image src="/img/crema.png"></image>
  73 + </view>
  74 +
  75 + <view class='yuyeu'>预约</view>
  76 + <view class='yuyeu'>拍摄素材</view>
  77 +</view>
  78 +
  79 +<!-- 预留电话 -->
  80 +<view class="register" wx:if="{{phoneshow}}" bindtap="hidewrap">
  81 +
  82 + <view class="phonewrap" catchtap='enter'>
  83 + <view class="phonename">请输入您的手机号</view>
  84 + <view class="phoneenter">
  85 + <input placeholder='请输入手机号' bindinput="enterphone" type="number"/>
  86 + </view>
  87 +
  88 + <view class="surebtn" bindtap="surebtn">确定</view>
  89 + </view>
  90 +</view>
  1 +page {
  2 + background: #fff;
  3 +}
  4 +
  5 +.videobox {
  6 + padding: 24rpx;
  7 + box-sizing: border-box;
  8 +}
  9 +
  10 +.videohead {
  11 + width: 702rpx;
  12 + height: 395rpx;
  13 + font-size: 0;
  14 + position: relative;
  15 + border-radius: 16rpx;
  16 +}
  17 +
  18 +.videohead image {
  19 + border-radius: 16rpx;
  20 +}
  21 +
  22 +.search {
  23 + display: flex;
  24 + align-items: center;
  25 + margin-top: 24rpx;
  26 + padding:10rpx 20rpx;
  27 + box-sizing: border-box;
  28 + /* background: #F9F9F9; */
  29 + border: 4rpx solid #fb6324;
  30 +}
  31 +
  32 +.searchleft {
  33 + display: flex;
  34 + align-items: center;
  35 +}
  36 +
  37 +.searchright {
  38 + width:440rpx;
  39 + display: flex;
  40 + align-items: center;
  41 + margin-left: 36rpx;
  42 +}
  43 +
  44 +.searchsanjiao {
  45 + width: 28rpx;
  46 + height: 30rpx;
  47 + font-size: 0;
  48 + margin-left: 8rpx;
  49 +}
  50 +
  51 +.searchfightimg {
  52 + width: 40rpx;
  53 + height: 40rpx;
  54 + font-size: 0;
  55 +}
  56 +
  57 +.searchrightname {
  58 + width:378rpx;
  59 + margin-left: 22rpx;
  60 + color: #8c9198;
  61 + font-size: 28rpx;
  62 +}
  63 +.searchrightname input{
  64 + width:100%;
  65 +}
  66 +.searchleftname {
  67 + color: #8c9198;
  68 + font-size: 28rpx;
  69 +}
  70 +
  71 +.searchimg {
  72 + width: 702rpx;
  73 + height: 235rpx;
  74 + font-size: 0;
  75 + margin-top: 24rpx;
  76 + border-radius: 16rpx;
  77 +}
  78 +
  79 +.searchimg image {
  80 + border-radius: 16rpx;
  81 +}
  82 +
  83 +.searchbox {
  84 + margin-top: 48rpx;
  85 + padding-bottom: 80rpx;
  86 +}
  87 +
  88 +.searchvideoimg {
  89 + width: 702rpx;
  90 + height: 395rpx;
  91 + font-size: 0;
  92 + margin-top: 24rpx;
  93 + position: relative;
  94 + border-radius: 16rpx;
  95 +}
  96 +
  97 +.searchvideoimg image {
  98 + border-radius: 16rpx;
  99 +}
  100 +
  101 +.crema {
  102 + width: 145rpx;
  103 + height: 145rpx;
  104 + border-radius: 50%;
  105 + background: #fb6324;
  106 + position: fixed;
  107 + bottom: 20rpx;
  108 + left: 50%;
  109 + transform: translateX(-50%);
  110 + display: flex;
  111 + flex-direction: column;
  112 + align-items: center;
  113 + justify-content: center;
  114 +}
  115 +
  116 +.cremaimg {
  117 + width: 60rpx;
  118 + height: 60rpx;
  119 + font-size: 0;
  120 +}
  121 +
  122 +.yuyeu {
  123 + font-size: 20rpx;
  124 + color: #fff;
  125 + margin-top: 2rpx;
  126 +}
  127 +
  128 +.phonewrap {
  129 + width: 508rpx;
  130 + height: 400rpx;
  131 + background: #fff;
  132 + position: absolute;
  133 + top: 50%;
  134 + left: 50%;
  135 + transform: translate(-50%, -50%);
  136 + border-radius: 20rpx;
  137 + padding: 32rpx;
  138 + box-sizing: border-box;
  139 + z-index: 999;
  140 +}
  141 +
  142 +.phonename {
  143 + color: #333;
  144 + font-size: 28rpx;
  145 + margin-top: 40rpx;
  146 + font-weight: bold;
  147 + text-align: center;
  148 +}
  149 +
  150 +.phoneenter {
  151 + width: 410rpx;
  152 + height: 85rpx;
  153 + background: #f9f9f9;
  154 + border-radius: 10rpx;
  155 + font-size: 0;
  156 + margin: 44rpx auto 0;
  157 +}
  158 +
  159 +.phoneenter input {
  160 + width: 410rpx;
  161 + height: 85rpx;
  162 + padding: 12rpx;
  163 + box-sizing: border-box;
  164 + color: #8c9198;
  165 + font-size: 28rpx;
  166 + text-align: center;
  167 +}
  168 +
  169 +.surebtn {
  170 + width: 180rpx;
  171 + height: 70rpx;
  172 + border-radius: 40rpx;
  173 + color: #fff;
  174 + font-size: 28rpx;
  175 + text-align: center;
  176 + line-height: 70rpx;
  177 + margin: 65rpx auto 0;
  178 + background: #fb6324;
  179 +}
  180 +
  181 +.wrapper {
  182 + /* position: absolute;
  183 + top: 50%;
  184 + left: 50%; */
  185 + position: relative;
  186 + /* overflow: hidden; */
  187 + width: 60rpx;
  188 + height: 60rpx;
  189 + margin: 0 auto;
  190 + background-color: transparent;
  191 +
  192 +
  193 + /* margin: -250px 0 0 -250px; */
  194 +}
  195 +
  196 +.circle {
  197 + position: absolute;
  198 + left: 15rpx;
  199 + top: 8rpx;
  200 + /* transform: translate(-50%,-50%); */
  201 + /* background: url("https://areial.w.broing.cn/uploads/20191120/hand.png") center center no-repeat; */
  202 + width: 40rpx;
  203 + height: 42rpx;
  204 + font-size: 0;
  205 + animation: circleHide 1s ease infinite both;
  206 +}
  207 +image{
  208 + width:100%;
  209 + height:100%;
  210 +}
  211 +
  212 +.finger {
  213 + /* background: url("https://areial.w.broing.cn/uploads/20191120/hand.png") center center no-repeat; */
  214 + width:30rpx;
  215 + height: 30rpx;
  216 + position: absolute;
  217 + top:0;
  218 + left:16rpx;
  219 + animation: fingerHandle 1s ease infinite both;
  220 + font-size: 0
  221 +}
  222 +
  223 +@keyframes fingerHandle {
  224 + 0% {
  225 + transform: none;
  226 + }
  227 +
  228 + 70% {
  229 + transform: scale3d(2, 2, 2);
  230 + }
  231 +
  232 + 100% {
  233 + transform: none;
  234 + }
  235 +}
  236 +
  237 +@keyframes circleHide {
  238 + 0% {
  239 + opacity: 0;
  240 + transform: scale3d(0, 0, 0);
  241 + }
  242 +
  243 + 70% {
  244 + opacity: 1;
  245 + transform: scale3d(1.2, 1.2, 1.2);
  246 + }
  247 +
  248 + 100% {
  249 + opacity: 0;
  250 + transform: scale3d(0, 0, 0);
  251 + }
  252 +}
  1 +// pages/huiyuanknow/huiyuanknow.js
  2 +var WxParse = require('../../wxParse/wxParse.js');
  3 +const app=getApp()
  4 +Page({
  5 +
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + knowdetail:''
  11 + },
  12 +
  13 + /**
  14 + * 生命周期函数--监听页面加载
  15 + */
  16 + onLoad: function (options) {
  17 + this.huiyuankonw()
  18 + },
  19 +
  20 + huiyuankonw(){
  21 + let that = this;
  22 + let url = 'user/vipdetail';
  23 + app.post(url, '', 'post').then((res) => {
  24 + console.log(res);
  25 + this.setData({
  26 + knowdetail:res
  27 + })
  28 + WxParse.wxParse('article', 'html', res.desc, that, 5);
  29 +
  30 +
  31 +
  32 +
  33 +
  34 + }).catch((err) => {
  35 +
  36 + })
  37 + },
  38 +
  39 + buyhuiyuan(){
  40 + wx.navigateTo({
  41 + url: '/pages/chongzhi/chongzhi?hui='+1,
  42 + })
  43 + },
  44 +
  45 + /**
  46 + * 生命周期函数--监听页面初次渲染完成
  47 + */
  48 + onReady: function () {
  49 +
  50 + },
  51 +
  52 + /**
  53 + * 生命周期函数--监听页面显示
  54 + */
  55 + onShow: function () {
  56 +
  57 + },
  58 +
  59 + /**
  60 + * 生命周期函数--监听页面隐藏
  61 + */
  62 + onHide: function () {
  63 +
  64 + },
  65 +
  66 + /**
  67 + * 生命周期函数--监听页面卸载
  68 + */
  69 + onUnload: function () {
  70 +
  71 + },
  72 +
  73 + /**
  74 + * 页面相关事件处理函数--监听用户下拉动作
  75 + */
  76 + onPullDownRefresh: function () {
  77 +
  78 + },
  79 +
  80 + /**
  81 + * 页面上拉触底事件的处理函数
  82 + */
  83 + onReachBottom: function () {
  84 +
  85 + },
  86 +
  87 + /**
  88 + * 用户点击右上角分享
  89 + */
  90 + onShareAppMessage: function () {
  91 +
  92 + }
  93 +})
  1 +{
  2 + "navigationBarTitleText": "会员须知"
  3 +}
  1 +<import src="../../wxParse/wxParse.wxml" />
  2 +
  3 +<view class="huiyuanknow">
  4 + <!-- {{knowdetail.desc}} -->
  5 + <template is="wxParse" data="{{wxParseData:article.nodes}}" />
  6 +</view>
  7 +
  8 +<view class="buybottom" bindtap="buyhuiyuan">
  9 + <view class="mai">确定</view>
  10 +</view>
  1 +.huiyuanknow{
  2 + padding: 40rpx 32rpx;
  3 + box-sizing: border-box;
  4 + color:#06121E;
  5 + font-size: 28rpx;
  6 +}
  7 +
  8 +.mai {
  9 + width: 702rpx;
  10 + height: 88rpx;
  11 + background: rgba(251, 99, 36, 1);
  12 + opacity: 1;
  13 + border-radius: 4rpx;
  14 + color:#fff;
  15 + font-size: 32rpx;
  16 + text-align: center;
  17 + line-height: 88rpx;
  18 + margin:0 auto 36rpx;
  19 +
  20 + box-sizing: border-box;
  21 +
  22 +
  23 +}
  24 +.buybottom{
  25 + width:750rpx;
  26 + height:124rpx;
  27 + background: #fff;
  28 + position: fixed;
  29 + bottom:0;
  30 +}
  1 +//index.js
  2 +//获取应用实例
  3 +const app = getApp()
  4 +
  5 +Page({
  6 + data: {
  7 + url: '',
  8 + thumb: '',
  9 + title: ''
  10 + },
  11 +
  12 + onLoad: function (options) {
  13 + console.log('99999',options)
  14 + if(options.title!=undefined){
  15 + this.setData({
  16 + url:options.url,
  17 + thumb:options.thumb,
  18 + title:options.title
  19 + })
  20 + }
  21 + },
  22 +
  23 + // 登录
  24 + start(e) {
  25 + console.log(e)
  26 + let that = this;
  27 + wx.getSetting({
  28 + success(res) {
  29 + // console.log("res", res)
  30 + if (res.authSetting['scope.userInfo']) {
  31 + console.log("已授权=====")
  32 + // 已经授权,可以直接调用 getUserInfo 获取头像昵称
  33 + // wx.getUserInfo({
  34 + // success(res) {
  35 + // console.log("获取用户信息成功", res)
  36 + // that.setData({
  37 + // name: res.userInfo.nickName
  38 + // })
  39 +
  40 +
  41 +
  42 +
  43 +
  44 + // },
  45 + // fail(res) {
  46 + // console.log("获取用户信息失败", res)
  47 + // }
  48 + // })
  49 +
  50 + wx.login({
  51 + success: (res) => {
  52 + console.log(res)
  53 + // wx.setStorageSync("code", res.code)
  54 + let url = 'user/login';
  55 + let params = {
  56 + code: res.code,
  57 + nickname: e.detail.userInfo.nickName,
  58 + avatar: e.detail.userInfo.avatarUrl, //分享进入的需要此参数
  59 +
  60 + }
  61 + app.post(url, params, 'post').then((res) => {
  62 + console.log(res)
  63 + wx.setStorageSync('token', res.token);
  64 + wx.setStorageSync("openid", res.openid);
  65 + if(that.data.title==''){
  66 + wx.navigateTo({
  67 + url: '/pages/getphone/getphone',
  68 + })
  69 + }else{
  70 + wx.navigateTo({
  71 + url: '/pages/videoplay/videoplay?url=' + that.data.url + '&thumb=' + that.data.thumb + '&title=' + that.data.title,
  72 + })
  73 + }
  74 + // wx.switchTab({
  75 + // url: '/pages/homepage/homepage',
  76 + // })
  77 +
  78 +
  79 + }).catch((errMsg) => {
  80 + console.log(errMsg)
  81 + wx.switchTab({
  82 + url: '/pages/homepage/homepage',
  83 + })
  84 + })
  85 +
  86 + }
  87 + });
  88 + } else {
  89 + console.log("未授权=====")
  90 + wx.switchTab({
  91 + url: '/pages/homepage/homepage',
  92 + })
  93 + }
  94 + }
  95 + })
  96 +
  97 +
  98 + },
  99 +
  100 +})
  1 +{
  2 + "navigationBarTitleText": "仁甲看见SHOP"
  3 +}
  1 + <view class="shouquanimg">
  2 + <image src="/img/dun.png"></image>
  3 + </view>
  4 +
  5 + <view class="quanname">仁甲看见SHOP申请获得以下权限</view>
  6 + <view class="huoqu">获得你的公开信息(昵称,头像等)</view>
  7 +
  8 +
  9 + <button open-type="getUserInfo" bindgetuserinfo='start' class="bottomtextright" >微信授权</button>
  1 +/**index.wxss**/
  2 +
  3 +.userinfo {
  4 + display: flex;
  5 + flex-direction: column;
  6 + align-items: center;
  7 +}
  8 +
  9 +.userinfo-avatar {
  10 + width: 128rpx;
  11 + height: 128rpx;
  12 + margin: 20rpx;
  13 + border-radius: 50%;
  14 +}
  15 +
  16 +.userinfo-nickname {
  17 + color: #aaa;
  18 +}
  19 +
  20 +.usermotto {
  21 + margin-top: 200px;
  22 +}
  23 +
  24 +.shouquanimg {
  25 + width: 172rpx;
  26 + height: 202rpx;
  27 + font-size: 0;
  28 + margin: 244rpx auto 0;
  29 +}
  30 +
  31 +.quanname {
  32 + color: #06121e;
  33 + font-size: 32rpx;
  34 + font-weight: bold;
  35 + margin-top: 48rpx;
  36 + text-align: center;
  37 +}
  38 +
  39 +.huoqu {
  40 + color: #5b5e63;
  41 + font-size: 28rpx;
  42 + margin-top: 16rpx;
  43 + text-align: center;
  44 +}
  45 +
  46 +.bottomtextright {
  47 + width: 686rpx;
  48 + height: 88rpx;
  49 + background: rgba(251, 99, 36, 1);
  50 + opacity: 1;
  51 + border-radius: 44rpx;
  52 + color:#fff;
  53 + font-size: 32rpx;
  54 + position: fixed;
  55 + bottom:48rpx;
  56 + left:32rpx;
  57 +}
  1 +// pages/cart/cart.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + array: ['2k', '4k', '8k'],
  10 + cartindex: 0,
  11 + cartlist: [],
  12 + totalmoney: 0,
  13 + video_id: [],
  14 + pic_id: [],
  15 + totalcartarr: [],
  16 + totalsel: false,
  17 + pp: [],
  18 + diannum: 0,
  19 + hebing: [],
  20 + order_id: '',
  21 + tixian: false,
  22 + xieyi: false,
  23 + money: "",
  24 + type: 1,
  25 + yu: true,
  26 + wei: false,
  27 + myinfo: '',
  28 + video_attr: [],
  29 + totalcartarr: [],
  30 + xuzhi: false,
  31 + select: false,
  32 + },
  33 +
  34 + /**
  35 + * 生命周期函数--监听页面加载
  36 + */
  37 + onLoad: function(options) {
  38 +
  39 +
  40 + console.log(options);
  41 + let newtotal = JSON.parse(options.totalmoney);
  42 + newtotal = newtotal.toFixed(2)
  43 + this.setData({
  44 + cartlist: JSON.parse(options.hebing),
  45 + totalmoney: newtotal,
  46 + totalcartarr: JSON.parse(options.totalcartarr)
  47 + // pic_id: JSON.parse(options.pic_id),
  48 + // video_id: JSON.parse(options.video_id),
  49 +
  50 + })
  51 +
  52 + this.getmyinfo()
  53 +
  54 + console.log(this.data.cartlist);
  55 + console.log(typeof(this.data.totalmoney));
  56 + console.log(this.data.pic_id);
  57 + console.log(this.data.video_id)
  58 +
  59 +
  60 + },
  61 + ti() {
  62 +
  63 + },
  64 +
  65 + getmyinfo() {
  66 + let that = this;
  67 + let url = 'user/mine';
  68 + app.post(url, '', 'post').then((res) => {
  69 + console.log(res);
  70 + that.setData({
  71 + money: res.money,
  72 + myinfo: res
  73 + })
  74 +
  75 + if (res.is_vip==0){
  76 + that.setData({
  77 + type:2,
  78 + wei:true
  79 + })
  80 + }else{
  81 + that.setData({
  82 + type: 1,
  83 + wei: false
  84 + })
  85 + }
  86 +
  87 +
  88 + }).catch((err) => {
  89 +
  90 + })
  91 +
  92 + },
  93 +
  94 + hidetixian() {
  95 + this.setData({
  96 + tixian: false
  97 + })
  98 + },
  99 +
  100 + // 余额支付和微信支付
  101 + yuzhi() {
  102 + this.setData({
  103 + yu: !this.data.yu,
  104 + wei: false
  105 + })
  106 +
  107 + if (this.data.yu == true) {
  108 + this.setData({
  109 + type: 1
  110 + })
  111 + } else {
  112 + this.setData({
  113 + type: 0
  114 + })
  115 + }
  116 + },
  117 +
  118 + weizhi() {
  119 + this.setData({
  120 + wei: !this.data.wei,
  121 + yu: false
  122 + })
  123 +
  124 + if (this.data.wei == true) {
  125 + this.setData({
  126 + type: 2
  127 + })
  128 + } else {
  129 + this.setData({
  130 + type: 0
  131 + })
  132 + }
  133 + },
  134 +
  135 + xuanxie() {
  136 + this.setData({
  137 + xieyi: !this.data.xieyi
  138 + })
  139 + },
  140 +
  141 +
  142 +
  143 + bindPickerChange: function(e) {
  144 + let newdiannum = this.data.diannum;
  145 + newdiannum++;
  146 + this.setData({
  147 + diannum: newdiannum
  148 + })
  149 + console.log(newdiannum)
  150 + console.log('picker发送选择改变,携带值为', e.detail.value)
  151 + console.log(e)
  152 + let index = e.currentTarget.dataset.index;
  153 + let newcartlist = this.data.cartlist;
  154 +
  155 + let firmoney = newcartlist[index].videoprice
  156 +
  157 + newcartlist[index].cartindex = e.detail.value;
  158 + if (newcartlist[index].video_id.vipprice == undefined) {
  159 + if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
  160 + newcartlist[index].videoprice = newcartlist[index].video_id.price
  161 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
  162 + newcartlist[index].videoprice = newcartlist[index].video_id.four_price
  163 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
  164 + newcartlist[index].videoprice = newcartlist[index].video_id.eight_price
  165 + }
  166 +
  167 +
  168 +
  169 + } else {
  170 + if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
  171 + newcartlist[index].videoprice = newcartlist[index].video_id.vipprice
  172 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
  173 + newcartlist[index].videoprice = newcartlist[index].video_id.four_vipprice
  174 + } else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
  175 + newcartlist[index].videoprice = newcartlist[index].video_id.eight_vipprice
  176 + }
  177 +
  178 + }
  179 +
  180 +
  181 + let tt = 0;
  182 + let newtotalmoney = this.data.totalmoney;
  183 + console.log('11223344', newtotalmoney)
  184 +
  185 + let pp = this.data.pp;
  186 + pp.push(Number(newcartlist[index].videoprice));
  187 + console.log(pp)
  188 + let len = pp.length;
  189 + tt = Number(tt) + pp[len - 1]
  190 +
  191 + if (newcartlist[index].sel == true) {
  192 + if (this.data.diannum == 1) {
  193 + console.log(newcartlist[index].videoprice)
  194 + newtotalmoney = newtotalmoney - firmoney;
  195 + newtotalmoney = newtotalmoney + tt
  196 + } else {
  197 + newtotalmoney = newtotalmoney - pp[newdiannum - 2];
  198 + console.log()
  199 + newtotalmoney = newtotalmoney + tt
  200 +
  201 + }
  202 +
  203 + console.log(tt)
  204 + // if (newdiannum == 1) {
  205 + // newtotalmoney = newtotalmoney - newcartlist[index].videoprice;
  206 + // newtotalmoney = newtotalmoney + tt;
  207 + // console.log('9999', newtotalmoney)
  208 + // } else {
  209 + // console.log('990099',newtotalmoney)
  210 + // console.log(pp)
  211 + // for (var i = 0; i < pp.length; i++) {
  212 + // newtotalmoney = newtotalmoney - pp[i]
  213 + // }
  214 + // console.log('666',newtotalmoney)
  215 + // newtotalmoney = newtotalmoney + tt
  216 + // }
  217 +
  218 + } else {
  219 + newtotalmoney = newtotalmoney + tt
  220 + }
  221 +
  222 + console.log(newtotalmoney)
  223 +
  224 + // if(len==1){
  225 + // tt = Number(tt) + pp[len - 1];
  226 + // console.log(tt);
  227 +
  228 + // }else{
  229 + // for (var i = 0; i < pp.length; i++) {
  230 + // newtotalmoney = newtotalmoney - pp[i];
  231 + // console.log(newtotalmoney)
  232 + // }
  233 +
  234 +
  235 + // }
  236 +
  237 +
  238 + // newtotalmoney = Number(newtotalmoney) +tt
  239 + // newcartlist[index].videoprice = newcartlist[index].video_id.videotype[e.detail.value]
  240 + newtotalmoney = newtotalmoney.toFixed(2)
  241 + if (newcartlist[index].sel == true) {
  242 + this.setData({
  243 + totalmoney: newtotalmoney
  244 + })
  245 + }
  246 + this.setData({
  247 + cartlist: newcartlist,
  248 +
  249 + })
  250 +
  251 +
  252 + },
  253 +
  254 +
  255 +
  256 + pay() {
  257 + let that = this;
  258 +
  259 + let newcartlist = that.data.cartlist;
  260 + let newvideo_id = [];
  261 + let newpic_id = [];
  262 + let newvideo_attr = [];
  263 + for (var obj of newcartlist) {
  264 + if (obj.pic_id == null) {
  265 + newvideo_id.push(obj.video_id.id);
  266 + if (obj.video_id.videotype[obj.cartindex] == '2k') {
  267 + newvideo_attr.push(1)
  268 + } else if (obj.video_id.videotype[obj.cartindex] == '4k') {
  269 + newvideo_attr.push(2)
  270 + } else if (obj.video_id.videotype[obj.cartindex] == '8k') {
  271 + newvideo_attr.push(3)
  272 + }
  273 + } else if (obj.video_id == null) {
  274 + newpic_id.push(obj.pic_id.id)
  275 + }
  276 + }
  277 +
  278 + that.setData({
  279 + video_id: newvideo_id,
  280 + pic_id: newpic_id,
  281 + video_attr: newvideo_attr
  282 +
  283 + })
  284 +
  285 +
  286 +
  287 +
  288 + let url = 'user/orders';
  289 + let param = {
  290 + video_id: that.data.video_id.join(","),
  291 + pic_id: that.data.pic_id.join(","),
  292 + total: that.data.totalmoney,
  293 + video_attr: that.data.video_attr.join(",")
  294 + }
  295 + app.post(url, param, 'post').then((res) => {
  296 + console.log(res);
  297 + that.setData({
  298 + order_id: res.order_id,
  299 + tixian: true
  300 + })
  301 +
  302 +
  303 + }).catch((err) => {
  304 + console.log(err);
  305 + let pic_id = err.msg.pic_id;
  306 + let video_id = err.msg.video_id;
  307 + console.log(pic_id);
  308 + console.log(video_id)
  309 + if (pic_id == undefined) {
  310 + let newcartlist = that.data.cartlist;
  311 + console.log(newcartlist);
  312 + for (var obj of newcartlist) {
  313 + if (obj.video_id.id == video_id) {
  314 + wx.showToast({
  315 + title: '已经购买过' + obj.video_id.title,
  316 + icon: 'none'
  317 + })
  318 + }
  319 + }
  320 + } else if (video_id == undefined) {
  321 + let newcartlist = that.data.cartlist;
  322 + console.log(newcartlist);
  323 + for (var obj of newcartlist) {
  324 + if (obj.pic_id.id == pic_id) {
  325 + console.log(9999)
  326 + wx.showToast({
  327 + title: '已经购买过' + obj.pic_id.title,
  328 + icon: 'none'
  329 + })
  330 + }
  331 + }
  332 + }
  333 + console.log(video_id)
  334 + console.log(err.msg.msg)
  335 +
  336 +
  337 + })
  338 +
  339 +
  340 + },
  341 +
  342 + payfinish() {
  343 + let that = this;
  344 + let url = 'user/orders';
  345 + let param = {
  346 + video_id: that.data.video_id.join(","),
  347 + pic_id: that.data.pic_id.join(","),
  348 + total: that.data.totalmoney
  349 + }
  350 + app.post(url, param, 'post').then((res) => {
  351 + console.log(res);
  352 + that.setData({
  353 + order_id: res.order_id
  354 + })
  355 +
  356 +
  357 + }).catch((err) => {
  358 +
  359 + })
  360 + },
  361 +
  362 + zhifuque() {
  363 + let that = this;
  364 +
  365 + console.log(that.data.type)
  366 +
  367 + if (this.data.type == 0) {
  368 + wx.showToast({
  369 + title: '请选择支付方式',
  370 + icon: 'none'
  371 + })
  372 +
  373 + return false
  374 + }
  375 +
  376 + that.setData({
  377 + xuzhi: true,
  378 + tixian: false
  379 +
  380 + })
  381 +
  382 + // if (this.data.xieyi == false) {
  383 + // wx.showToast({
  384 + // title: '请勾选服务协议',
  385 + // icon: 'none'
  386 + // })
  387 +
  388 + // return false
  389 + // }
  390 +
  391 +
  392 +
  393 +
  394 +
  395 + },
  396 +
  397 + selxieyi() {
  398 + this.setData({
  399 + select: !this.data.select
  400 + })
  401 + },
  402 +
  403 + quezhifu() {
  404 + let that = this;
  405 + console.log(that.data.type);
  406 + console.log(that.data.select)
  407 + if (that.data.select == false) {
  408 + wx.showToast({
  409 + title: '请勾选协议内容',
  410 + icon: "none"
  411 + })
  412 +
  413 + return false
  414 + }
  415 + let url = 'pay/picpay';
  416 + let param = {
  417 + order_id: that.data.order_id,
  418 + type: that.data.type
  419 + }
  420 + app.post(url, param, 'post').then((res) => {
  421 + console.log(res);
  422 + if (that.data.type == 1) {
  423 + wx.showToast({
  424 + title: res,
  425 + icon: 'none'
  426 + })
  427 +
  428 + that.delcart()
  429 +
  430 + setTimeout(function () {
  431 + that.setData({
  432 + tixian: false
  433 + })
  434 + wx.navigateTo({
  435 + url: '/pages/orderbox/orderbox',
  436 + })
  437 + }, 1500)
  438 + } else if (that.data.type == 2) {
  439 + that.payment(res);
  440 + that.delcart()
  441 + }
  442 +
  443 +
  444 +
  445 +
  446 + }).catch((err) => {
  447 + console.log('9999', err);
  448 + console.log(err.msg.msg)
  449 + wx.showToast({
  450 + title: err.msg.msg,
  451 + icon: 'none'
  452 + })
  453 +
  454 + })
  455 +
  456 + },
  457 +
  458 +
  459 + payment(res) {
  460 + let that = this;
  461 + var timeStamp = res.timeStamp.toString();
  462 + // console.log(timeStamp);
  463 + wx.requestPayment({
  464 + timeStamp: timeStamp,
  465 + nonceStr: res.nonceStr,
  466 + package: res.package,
  467 + signType: res.signType,
  468 + paySign: res.paySign,
  469 + success: function(res) {
  470 + console.log(res)
  471 + wx.navigateTo({
  472 + url: '/pages/orderbox/orderbox',
  473 + })
  474 + },
  475 + fail: function(res) {
  476 + console.log(123);
  477 + console.log(res);
  478 + }
  479 + })
  480 + },
  481 +
  482 + delcart() {
  483 + let that = this;
  484 +
  485 + let url = 'user/delcar';
  486 + let param = {
  487 + ids: that.data.totalcartarr.join(",")
  488 + }
  489 + app.post(url, param, 'post').then((res) => {
  490 + console.log(res);
  491 +
  492 +
  493 +
  494 + }).catch((err) => {
  495 +
  496 + })
  497 +
  498 +
  499 +
  500 + },
  501 +
  502 +
  503 +
  504 + fuwuxieyi() {
  505 + wx.navigateTo({
  506 + url: '/pages/fuwuxieyi/fuwuxieyi',
  507 + })
  508 + },
  509 + /**
  510 + * 生命周期函数--监听页面初次渲染完成
  511 + */
  512 + onReady: function() {
  513 +
  514 + },
  515 +
  516 + /**
  517 + * 生命周期函数--监听页面显示
  518 + */
  519 + onShow: function() {
  520 +
  521 + },
  522 +
  523 + /**
  524 + * 生命周期函数--监听页面隐藏
  525 + */
  526 + onHide: function() {
  527 +
  528 + },
  529 +
  530 + /**
  531 + * 生命周期函数--监听页面卸载
  532 + */
  533 + onUnload: function() {
  534 +
  535 + },
  536 +
  537 + /**
  538 + * 页面相关事件处理函数--监听用户下拉动作
  539 + */
  540 + onPullDownRefresh: function() {
  541 +
  542 + },
  543 +
  544 + /**
  545 + * 页面上拉触底事件的处理函数
  546 + */
  547 + onReachBottom: function() {
  548 +
  549 + },
  550 +
  551 +
  552 + /**
  553 + * 用户点击右上角分享
  554 + */
  555 + onShareAppMessage: function() {
  556 +
  557 + }
  558 +})
  1 +{
  2 + "navigationBarTitleText": "结算"
  3 +}
  1 +<view class="xiazairegister" wx:if="{{tixian}}" bindtap="hidetixian">
  2 + <view class="selecttixian" catchtap="ti">
  3 + <view class="tixianhead">
  4 + 选择提现账户
  5 + </view>
  6 + <view class="tixianlist" wx:if="{{myinfo.is_vip==1}}">
  7 + <view class="tixianlistleft">
  8 + <view class="tixian">
  9 + <image src="/img/yueimg.png"></image>
  10 + </view>
  11 + <view class="tixianname">余额支付(当前账户余额为{{money}}元)</view>
  12 + </view>
  13 +
  14 + <view class="tixianxuan" catchtap="yuzhi">
  15 + <image src="/img/xuanze.png" wx:if="{{yu==true}}"></image>
  16 + <image src="/img/zhifuno.png" wx:else></image>
  17 + </view>
  18 + </view>
  19 + <view class="tixianlist">
  20 + <view class="tixianlistleft">
  21 + <view class="tixian">
  22 + <image src="/img/weixinimg.png"></image>
  23 + </view>
  24 + <view class="tixianname">微信支付</view>
  25 + </view>
  26 +
  27 + <view class="tixianxuan" catchtap="weizhi">
  28 + <image src="/img/xuanze.png" wx:if="{{wei==true}}"></image>
  29 + <image src="/img/zhifuno.png" wx:else></image>
  30 + </view>
  31 + </view>
  32 +
  33 + <!-- <view class="yuedu">
  34 + <view class="yueduleft" catchtap="xuanxie">
  35 + <image src="/img/duigou.png" wx:if="{{xieyi==true}}"></image>
  36 + <image src="/img/noxieyi.png" wx:else></image>
  37 + </view>
  38 + <view class="yuedutext">
  39 + <view class="yueduagree"> 我已阅读并同意</view>
  40 +
  41 + <view class="yuedujing" bindtap="fuwuxieyi">《服务协议》</view>
  42 + </view>
  43 +
  44 +
  45 + </view> -->
  46 +
  47 + <view class="queren" catchtap="zhifuque">确认</view>
  48 +
  49 + </view>
  50 +</view>
  51 +
  52 +<view wx:if="{{xuzhi==false}}">
  53 +
  54 +
  55 +<view class="minehead">
  56 + <view class="mineheadleft">
  57 + <image src='{{myinfo.avatar}}'></image>
  58 + </view>
  59 +
  60 + <view class="mineright">
  61 + <view class="minertop">
  62 + {{myinfo.nickname}}
  63 + </view>
  64 + <view class="mintbottom" wx:if="{{myinfo.is_vip==1}}">
  65 + <view class="vipimg">
  66 + <image src="/img/vipimg.png"></image>
  67 + </view>
  68 + <view class="vipmember">VIP会员</view>
  69 + </view>
  70 + </view>
  71 +</view>
  72 +
  73 +<view class="cartbigboxz">
  74 + <view class="cartbox gouwubox" wx:for="{{cartlist}}" wx:key="">
  75 +
  76 + <!-- 视频 -->
  77 + <view class="cartvideo" wx:if="{{item.video_id!=null}}">
  78 + <view class="cartbboxitem" wx:key="">
  79 +
  80 +
  81 + <view class="cartboxitemright">
  82 + <view class="videoitemimg">
  83 + <image src="{{item.video_id.thumbnail}}"></image>
  84 +
  85 + <view class="anniu">
  86 + <image src="/img/anniu.png"></image>
  87 + </view>
  88 + </view>
  89 + <view class="cartboxitembottom">
  90 + <view class="cartboxitembotleft">
  91 + {{item.video_id.title}}
  92 + </view>
  93 + <picker bindchange="bindPickerChange" value="{{index}}" range="{{item.video_id.videotype}}" data-index="{{index}}">
  94 + <view class="cartboxitemrightone">
  95 + <view class="cartbox">{{item.video_id.videotype[item.cartindex]}}</view>
  96 +
  97 + <view class="picxian"></view>
  98 +
  99 + <view class="cartxuansan">
  100 + <image src="/img/sanjiaodown.png"></image>
  101 + </view>
  102 + </view>
  103 + </picker>
  104 + </view>
  105 +
  106 + <view class="money">¥{{item.videoprice}}</view>
  107 + </view>
  108 + </view>
  109 + </view>
  110 +
  111 +
  112 + <!-- 图片 -->
  113 +
  114 + <view class="picbox" wx:if="{{item.pic_id!=null}}">
  115 + <view class="cartbboxitem" wx:key="">
  116 +
  117 + <view class="cartboxitemright">
  118 + <view class="videoitemimgp">
  119 + <image src="{{item.pic_id.thumbnail}}"></image>
  120 + </view>
  121 + <view class="cartboxitembottom">
  122 + <view class="cartboxitembotleft">
  123 + {{item.pic_id.title}}
  124 + </view>
  125 +
  126 + <!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
  127 +
  128 +
  129 + <view class="cartboxitemrightone">
  130 + <view class="cartbox">{{array[index]}}</view>
  131 +
  132 + <view class="picxian"></view>
  133 +
  134 + <view class="cartxuansan">
  135 + <image src="/img/sanjiaodown.png"></image>
  136 + </view>
  137 + </view>
  138 + </picker> -->
  139 + </view>
  140 +
  141 + <view class="money" wx:if="{{item.pic_id.vipprice==undefined}}">¥{{item.pic_id.price}}</view>
  142 + <view class="money" wx:else>¥{{item.pic_id.vipprice}}</view>
  143 + </view>
  144 + </view>
  145 + </view>
  146 + </view>
  147 +</view>
  148 +
  149 +
  150 +<view class="cartfoot">
  151 + <view class="cartfootleft">
  152 +
  153 + <view class="cartfootlefthe hejisuan">
  154 + <text> 合计:¥{{totalmoney}}</text>
  155 + <text class="totaljian">共{{cartlist.length}}件</text>
  156 +
  157 + </view>
  158 + </view>
  159 +
  160 + <view class="cartfootright" bindtap="pay">支付</view>
  161 +</view>
  162 +
  163 +
  164 +</view>
  165 +
  166 +
  167 +
  168 +
  169 +<view class="buybox" wx:else>
  170 +
  171 +
  172 + <view class="text">
  173 + 亲爱的用户,您好
  174 + </view>
  175 + <view class="text">
  176 + 欢迎您购买仁甲看见SHOP素材,为了让您购买愉快,请您在购买前务必仔细阅读以下内容:
  177 + </view>
  178 + <view class="secondtitle">关于购买及售后</view>
  179 + <view class="goumiatext">您可充值仁甲看见SHOP小程序账户,通过账户余额或微信钱包进行付费购买。注册本小程序VIP会员均可享有仁甲看见SHOP所有图片/视频素材七五折优惠。购买的素材将以链接形式发送至您百度云账号,您可通过搜索我的订单查找已购买的素材链接。购买后如若您需开发票,请仔细填写个人信息,本公司按您填写的地址及时邮寄发票。</view>
  180 + <view class="secondtitle">关于版权和使用权</view>
  181 + <view class="goumiatext">您购买的素材仅限贵单位使用于本协议中的指定用途,仅拥有使用权,不包含版权及著作权等;如若在其他项目中继续使用,须联系客服更新授权书(无限次免费),以避免日后出现的侵权事件造成的不必要麻烦。</view>
  182 + <view class="secondtitle">关于物权</view>
  183 + <view class="goumiatext">此微信小程序中图片/视频涉及的拍摄目标主要针对城市景观,如果客户在使用过程中出现涉及物权纠纷的案例,本公司及小程序概不负责。如果您介意此事,请慎重下单。</view>
  184 +
  185 + <view class="secondtitle">关于素材质量</view>
  186 + <view class="goumiatext">素材拍摄使用的设备种类很多,本小程序内素材稳定性 分辨率 调色 光比等都会略有差别,建议您在下单购买之前认真查看小样,素材属于虚拟版权物品,一经售出概不接受任何理由的退换货。如果您介意此事,请慎重下单。</view>
  187 + <view class="goumiatext">我们摆上货架的商品都是仁甲看见仔细筛选和挑选的优质素材,部分航拍延时素材可能存在轻微抖动的问题,建议您在购买之前仔细查看预览视频及水印小样,以避免因为素材抖动问题带来的困扰和麻烦。如果您介意此事,请慎重下单。</view>
  188 + <view class="goumiatext">如果您在使用素材的过程中遇到其他问题或是有更好的建议请联系客服,我们会以第一时间与您沟通确保素材的正常使用。</view>
  189 + <view class="goumiatext">本制度最终解释权归山东仁甲看见影像服务有限公司所有。</view>
  190 +
  191 +
  192 + <view class="gouxuan" bindtap="selxieyi">
  193 + <view class="gouxuanleft">
  194 + <image src="/img/selectcart.png" wx:if="{{select}}"></image>
  195 + <image src="/img/noselect.png" wx:else></image>
  196 +
  197 + </view>
  198 +
  199 + <view class="gouxuanright">我已阅读该协议内容,并且同意素材售出概不退换</view>
  200 + </view>
  201 +
  202 + <view class="quebtn" bindtap="quezhifu">确定</view>
  203 +</view>
  1 +.cartbox {
  2 + padding: 24rpx;
  3 + box-sizing: border-box;
  4 + color: #5b5e63;
  5 + font-size: 28rpx;
  6 +
  7 +}
  8 +.gouwubox{
  9 + border-bottom:24rpx solid #f9f9f9
  10 +}
  11 +.cartbigboxz{
  12 + padding-bottom: 100rpx;
  13 +}
  14 +.cartbboxitem {
  15 + display: flex;
  16 + align-items: center;
  17 + /* margin-bottom: 48rpx; */
  18 +}
  19 +
  20 +.cartboxitemleft {
  21 + width: 32rpx;
  22 + height: 32rpx;
  23 + font-size: 0;
  24 +}
  25 +
  26 +.cartboxhead {
  27 + display: flex;
  28 + flex-direction: column;
  29 + justify-content: center;
  30 + align-items: flex-end;
  31 + padding: 14rpx 26rpx;
  32 + box-sizing: border-box;
  33 + border-bottom: 24rpx solid #f9f9f9;
  34 +}
  35 +
  36 +.cartboxheadright {
  37 + width: 35rpx;
  38 + height: 35rpx;
  39 + font-size: 0;
  40 + margin-right: 5rpx;
  41 +}
  42 +
  43 +.cartboxrightname {
  44 + color: #bdc4ce;
  45 + font-size: 22rpx;
  46 + margin-top: 6rpx;
  47 +}
  48 +
  49 +.videoitemimg {
  50 + width: 640rpx;
  51 + height: 360rpx;
  52 + font-size: 0;
  53 + position: relative;
  54 +}
  55 +
  56 +.videoitemimgp {
  57 + width: 640rpx;
  58 + height: 212rpx;
  59 + font-size: 0;
  60 +}
  61 +
  62 +.cartboxitemright {
  63 + margin-left: 24rpx;
  64 +}
  65 +
  66 +.cartboxitembottom {
  67 + display: flex;
  68 + align-items: center;
  69 + justify-content: space-between;
  70 + margin-top: 24rpx;
  71 +}
  72 +
  73 +.cartboxitemrightone {
  74 + display: flex;
  75 + align-items: center;
  76 + background: #f9f9f9;
  77 + height: 60rpx;
  78 + padding: 0 24rpx;
  79 + box-sizing: border-box;
  80 +}
  81 +
  82 +.cartxuansan {
  83 + width: 28rpx;
  84 + height: 30rpx;
  85 + font-size: 0;
  86 +
  87 +}
  88 +.picxian{
  89 + margin-right: 20rpx;
  90 + box-sizing: border-box
  91 +}
  92 +
  93 +.money {
  94 + color: #ea322b;
  95 + font-size: 32rpx;
  96 + font-weight: bold;
  97 + margin-top:15rpx;
  98 +}
  99 +
  100 +.cartfoot {
  101 + display: flex;
  102 + align-items: center;
  103 + justify-content: space-between;
  104 + padding: 0;
  105 + box-sizing: border-box;
  106 + height: 88rpx;
  107 + position: fixed;
  108 + bottom:0;
  109 + left:0
  110 +}
  111 +
  112 +.cartfootleft {
  113 + width: 470rpx;
  114 + height: 88rpx;
  115 + padding: 0 32rpx;
  116 + box-sizing: border-box;
  117 + display: flex;
  118 + align-items: center;
  119 + background: #fff;
  120 +}
  121 +
  122 +.cartfootlefimg {
  123 + width: 32rpx;
  124 + height: 32rpx;
  125 + font-size: 0;
  126 + margin-top: 5rpx;
  127 +}
  128 +
  129 +.cartfootlefthe {
  130 + margin-left: 24rpx;
  131 + color: #ea322b;
  132 + font-size: 28rpx;
  133 + font-weight: bold;
  134 +}
  135 +
  136 +.cartfootright {
  137 + width: 280rpx;
  138 + background: #fb6324;
  139 + font-size: 32rpx;
  140 + color: #fff;
  141 + text-align: center;
  142 + height: 88rpx;
  143 + line-height: 88rpx;
  144 +}
  145 +
  146 +.cartboxitembotleft {
  147 + color: #06121e;
  148 + font-size: 28rpx;
  149 + font-weight: bold;
  150 +}
  151 +.hejisuan{
  152 + display:flex;
  153 + align-items:center;
  154 +}
  155 +.totaljian{
  156 + color:#8C9198;
  157 + font-size: 24rpx;
  158 + font-weight: normal;
  159 + margin-left:24rpx;
  160 +}
  161 +
  162 +.selecttixian {
  163 + width: 750rpx;
  164 + height: 580rpx;
  165 + background: #fff;
  166 + position: fixed;
  167 + bottom: 0;
  168 + left: 0;
  169 + z-index: 9999;
  170 + padding: 0 24rpx;
  171 + box-sizing: border-box;
  172 +}
  173 +
  174 +.tixianhead {
  175 + padding: 24rpx 0;
  176 + box-sizing: border-box;
  177 + color: #5b5e63;
  178 + font-size: 32rpx;
  179 + border-bottom: 1rpx solid #f5f5f5;
  180 +}
  181 +
  182 +.tixianlist {
  183 + display: flex;
  184 + align-items: center;
  185 + justify-content: space-between;
  186 + padding: 34rpx 42rpx 34rpx 0;
  187 + box-sizing: border-box;
  188 + border-bottom: 1rpx solid #f5f5f5;
  189 +}
  190 +
  191 +.tixian {
  192 + width: 56rpx;
  193 + height: 60rpx;
  194 + font-size: 0;
  195 +}
  196 +
  197 +.tixianname {
  198 + color: #06121e;
  199 + font-size: 28rpx;
  200 + margin-left: 10rpx;
  201 +}
  202 +
  203 +.tixianxuan {
  204 + width: 28rpx;
  205 + height: 28rpx;
  206 + font-size: 0;
  207 +}
  208 +
  209 +.tixianlistleft {
  210 + display: flex;
  211 + align-items: center;
  212 +}
  213 +
  214 +.yuedu {
  215 + display: flex;
  216 + align-items: center;
  217 + margin-top: 35rpx;
  218 +}
  219 +
  220 +.yueduleft {
  221 + width: 40rpx;
  222 + height: 40rpx;
  223 + font-size: 0;
  224 +}
  225 +
  226 +.yuedutext {
  227 + display: flex;
  228 + align-items: center;
  229 + margin-left: 6rpx;
  230 +}
  231 +
  232 +.yueduagree {
  233 + color: #8c9198;
  234 + font-size: 24rpx;
  235 +}
  236 +
  237 +.yuedujing {
  238 + color: #fb6324;
  239 + font-size: 24rpx;
  240 +}
  241 +
  242 +.queren {
  243 + width: 702rpx;
  244 + height: 88rpx;
  245 + background: rgba(251, 99, 36, 1);
  246 + opacity: 1;
  247 + border-radius: 4rpx;
  248 + color:#fff;
  249 + font-size: 32rpx;
  250 + text-align: center;
  251 + line-height: 88rpx;
  252 + margin:20rpx auto 0;
  253 + position: fixed;
  254 + bottom:40rpx;
  255 + left:24rpx;
  256 +}
  257 +
  258 +
  259 +.mineheadleft {
  260 + width: 104rpx;
  261 + height: 104rpx;
  262 + font-size: 0;
  263 + border-radius: 50%;
  264 +}
  265 +
  266 +.mineheadleft image {
  267 + border-radius: 50%;
  268 +}
  269 +
  270 +.minebox {
  271 + padding: 32rpx 24rpx;
  272 + box-sizing: border-box;
  273 +}
  274 +
  275 +.minehead {
  276 + display: flex;
  277 + align-items: center;
  278 + padding: 32rpx 24rpx;
  279 +}
  280 +
  281 +.mintbottom {
  282 + display: flex;
  283 + align-items: center;
  284 + margin-top: 18rpx;
  285 +}
  286 +
  287 +.vipimg {
  288 + width: 32rpx;
  289 + height: 32rpx;
  290 + font-size: 0;
  291 +}
  292 +
  293 +.mineright {
  294 + margin-left: 28rpx;
  295 +}
  296 +
  297 +.minertop {
  298 + color: #06121e;
  299 + font-size: 36rpx;
  300 + font-weight: bold;
  301 +}
  302 +
  303 +.vipmember {
  304 + color: #3d444d;
  305 + font-size: 24rpx;
  306 + margin-left: 5rpx;
  307 +}
  308 +
  309 +.minebac {
  310 + width: 750rpx;
  311 + height: 350rpx;
  312 + font-size: 0;
  313 + position: relative;
  314 +}
  315 +
  316 +.minetop {
  317 + color: #ae8538;
  318 + font-size: 30rpx;
  319 + position: absolute;
  320 + top: 68rpx;
  321 + left: 64rpx;
  322 +}
  323 +
  324 +.minemoney {
  325 + color: #977434;
  326 + font-size: 52rpx;
  327 + font-weight: bold;
  328 + position: absolute;
  329 + top: 124rpx;
  330 + left: 64rpx;
  331 +}
  332 +
  333 +.mineqian {
  334 + display: flex;
  335 + align-items: center;
  336 + position: absolute;
  337 + bottom: 78rpx;
  338 + right: 56rpx;
  339 +}
  340 +
  341 +.mineqianleft {
  342 + width: 166rpx;
  343 + height: 64rpx;
  344 + background: linear-gradient(180deg, rgba(255, 253, 248, 1) 0%, rgba(255, 242, 208, 1) 100%);
  345 + opacity: 1;
  346 + border-radius: 36rpx;
  347 + color: #916e2c;
  348 + font-size: 28rpx;
  349 + text-align: center;
  350 + line-height: 64rpx;
  351 + margin-right:24rpx;
  352 +}
  353 +
  354 +.mineqianright {
  355 + width: 166rpx;
  356 + height: 64rpx;
  357 + border: 2rpx solid rgba(255, 255, 255, 1);
  358 + opacity: 1;
  359 + border-radius: 36rpx;
  360 + color:#7B6011;
  361 + font-size: 28rpx;
  362 + text-align: center;
  363 + line-height: 64rpx;
  364 +}
  365 +.minelist{
  366 + padding: 0 32rpx;
  367 + box-sizing: border-box
  368 +}
  369 +.minelsititem{
  370 + display:flex;
  371 + align-items: center;
  372 + padding: 30rpx 0;
  373 + box-sizing: border-box;
  374 + border-bottom:1rpx solid #f5f5f5;
  375 + justify-content: space-between
  376 +}
  377 +.minelistleftimg{
  378 + width:50rpx;
  379 + height:50rpx;
  380 + font-size: 0
  381 +}
  382 +.minelsititemleft{
  383 + display:flex;
  384 + align-items: center
  385 +}
  386 +.minelsitleftname{
  387 + color:#06121E;
  388 + font-size: 30rpx;
  389 + margin-left:24rpx;
  390 +
  391 +}
  392 +.mineleftright{
  393 + width:35rpx;
  394 + height:35rpx;
  395 + font-size: 0
  396 +}
  397 +.chongvip{
  398 + width:750rpx;
  399 + height:166rpx;
  400 + font-size: 0
  401 +}
  1 +// pages/jingmei/jingmei.js
  2 +var WxParse = require('../../wxParse/wxParse.js');
  3 +const app=getApp()
  4 +Page({
  5 +
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + jingmeilist:[],
  11 + page:1
  12 + },
  13 +
  14 + /**
  15 + * 生命周期函数--监听页面加载
  16 + */
  17 + onLoad: function(options) {
  18 + this.getjingmei()
  19 + },
  20 +
  21 + //获取精美大片列表
  22 + getjingmei() {
  23 + let that = this;
  24 + let url = 'user/won';
  25 + let param={
  26 + page:that.data.page,
  27 + pageNum:10
  28 + }
  29 + app.post(url, param, 'post').then((res) => {
  30 + console.log(res);
  31 + that.setData({
  32 + jingmeilist: that.data.jingmeilist.concat(res)
  33 + })
  34 +
  35 + let newjingmeilist = that.data.jingmeilist;
  36 +
  37 + for (let i = 0; i < newjingmeilist.length; i++) {
  38 + console.log(i)
  39 +
  40 + WxParse.wxParse('content' + i, 'html', newjingmeilist[i]['content'], that, 5);
  41 +
  42 + if (i === newjingmeilist.length - 1) {
  43 +
  44 + WxParse.wxParseTemArray("artileList", 'content', newjingmeilist.length, that)
  45 + }
  46 + }
  47 +
  48 + that.setData({
  49 + jingmeilist:newjingmeilist
  50 + })
  51 + console.log(this.data.jingmeilist)
  52 +
  53 +
  54 + }).catch((err) => {
  55 +
  56 + })
  57 +
  58 + },
  59 + govideo(e) {
  60 + let url=e.currentTarget.dataset.url;
  61 + let thumb=e.currentTarget.dataset.thumb;
  62 + let title=e.currentTarget.dataset.title
  63 + wx.navigateTo({
  64 + url: '/pages/videoplay/videoplay?url='+url+'&thumb='+thumb+'&title='+title,
  65 + })
  66 + },
  67 + /**
  68 + * 生命周期函数--监听页面初次渲染完成
  69 + */
  70 + onReady: function() {
  71 +
  72 + },
  73 +
  74 + /**
  75 + * 生命周期函数--监听页面显示
  76 + */
  77 + onShow: function() {
  78 +
  79 + },
  80 +
  81 + /**
  82 + * 生命周期函数--监听页面隐藏
  83 + */
  84 + onHide: function() {
  85 +
  86 + },
  87 +
  88 + /**
  89 + * 生命周期函数--监听页面卸载
  90 + */
  91 + onUnload: function() {
  92 +
  93 + },
  94 +
  95 + /**
  96 + * 页面相关事件处理函数--监听用户下拉动作
  97 + */
  98 + onPullDownRefresh: function() {
  99 +
  100 + },
  101 +
  102 + /**
  103 + * 页面上拉触底事件的处理函数
  104 + */
  105 + onReachBottom: function() {
  106 + let newpage=this.data.page;
  107 + newpage++;
  108 + this.setData({
  109 + page:newpage
  110 + })
  111 +
  112 + this.getjingmei()
  113 + },
  114 +
  115 + /**
  116 + * 用户点击右上角分享
  117 + */
  118 + onShareAppMessage: function() {
  119 +
  120 + }
  121 +})
  1 +{
  2 + "navigationBarTitleText": "精美大片"
  3 +}
  1 +<import src="../../wxParse/wxParse.wxml" />
  2 +
  3 +<view class="searchlist">
  4 +
  5 + <view class="searchlistbox">
  6 +
  7 + <view wx:for="{{jingmeilist}}" wx:for-index="idxs" wx:for-goodsid="{{item.goodsId}}" wx:key=''bindtap="govideo" data-url="{{item.video}}" data-thumb="{{item.share}}" data-title="{{item.title}}">
  8 + <view class="searchboximg">
  9 + <image src="{{item.thumbnail}}"></image>
  10 + <view class="anniu">
  11 + <image src="/img/anniu.png"></image>
  12 + </view>
  13 + </view>
  14 +
  15 + <view class="biaoti">{{item.title}}</view>
  16 + <view class="texttu">
  17 + <block wx:for="{{artileList}}" wx:for-item="item" wx:for-index="idx" wx:key=''>
  18 +
  19 +
  20 + <block wx:if="{{idxs==idx}}">
  21 + <template is="wxParse" data="{{wxParseData:item}}" />
  22 + </block>
  23 + </block>
  24 +
  25 + </view>
  26 +
  27 + </view>
  28 +
  29 +
  30 + </view>
  31 +
  32 + <!-- <view class="moreshuju">
  33 + <view class="moreshujuleft">
  34 + <image src="/img/more.png"></image>
  35 + </view>
  36 +
  37 + <view class="moredata">点击加载更多</view>
  38 + </view> -->
  39 +</view>
  1 +/* pages/jingmei/jingmei.wxss */
  2 +.search{
  3 + width:700rpx;
  4 + margin:0 auto;
  5 + display:flex;
  6 + align-items: center;
  7 + margin-top:24rpx;
  8 + padding: 20rpx;
  9 + box-sizing: border-box;
  10 + background: #F9F9F9
  11 +}
  12 +.searchleft{
  13 + display:flex;
  14 + align-items: center
  15 +}
  16 +.searchright{
  17 + display:flex;
  18 + align-items: center;
  19 + margin-left:60rpx;
  20 +}
  21 +.searchsanjiao{
  22 + width:28rpx;
  23 + height:30rpx;
  24 + font-size: 0;
  25 + margin-left:8rpx;
  26 +
  27 +}
  28 +.searchfightimg{
  29 + width:40rpx;
  30 + height:40rpx;
  31 + font-size: 0
  32 +}
  33 +.searchrightname{
  34 + margin-left:22rpx;
  35 + color:#8C9198;
  36 + font-size:28rpx;
  37 +}
  38 +.searchleftname{
  39 + color:#8C9198;
  40 + font-size:28rpx;
  41 +}
  42 +
  43 +.searchimg{
  44 + width:702rpx;
  45 + height:235rpx;
  46 + font-size: 0;
  47 + margin-top:24rpx;
  48 +}
  49 +.searchbox{
  50 + margin-top:48rpx;
  51 + padding-bottom: 80rpx;
  52 +}
  53 +.searchjilu{
  54 + margin-top:40rpx;
  55 +
  56 +}
  57 +.searchjiluitem{
  58 + /* width:168rpx;
  59 + height:68rpx; */
  60 + padding: 14rpx 24rpx;
  61 + box-sizing: border-box;
  62 + background: #F7F7F7;
  63 + margin-right: 24rpx;
  64 + margin-bottom:38rpx;
  65 + color:#3D444D;
  66 + font-size: 28rpx;
  67 +
  68 +}
  69 +.history{
  70 + color:#06121E;
  71 + font-size:28rpx;
  72 + margin-top:38rpx;
  73 + padding: 0 26rpx;
  74 + box-sizing: border-box
  75 +}
  76 +.searchjilu{
  77 + padding: 40rpx 24rpx;
  78 + box-sizing: border-box;
  79 + display:flex;
  80 + align-items: center;
  81 + flex-wrap: wrap
  82 +}
  83 +.searchtop{
  84 + color:#06121E;
  85 + font-size: 28rpx;
  86 +}
  87 +.searchlist{
  88 + padding: 0 24rpx;
  89 + box-sizing: border-box;
  90 + margin-top:24rpx;
  91 + padding-bottom: 50rpx;
  92 +}
  93 +.searchboximg{
  94 + width:702rpx;
  95 + height:394rpx;
  96 + font-size: 0;
  97 + position: relative;
  98 + margin-top:24rpx;
  99 + border-radius:16rpx;
  100 +}
  101 +.searchboximg image{
  102 + border-radius:16rpx;
  103 +}
  104 +.moreshuju{
  105 + display:flex;
  106 + align-items: center;
  107 + justify-content: center;
  108 + margin-top:28rpx;
  109 +}
  110 +.moreshujuleft{
  111 + width:38rpx;
  112 + height:38rpx;
  113 + font-size: 0
  114 +}
  115 +.moredata{
  116 + color:#BDC4CE;
  117 + font-size: 28rpx;
  118 + margin-left:6rpx;
  119 +}
  120 +.biaoti{
  121 + color:#06121E;
  122 + font-size: 34rpx;
  123 + font-weight:bold;
  124 + margin-top:20rpx;
  125 + text-align: center
  126 +}
  127 +.texttu{
  128 + color:#06121E;
  129 + font-size: 28rpx;
  130 + margin-top:20rpx;
  131 +}